From 3af49a08a090fee639da619548f57a4054e63560 Mon Sep 17 00:00:00 2001 From: Edward Bebbington Date: Sun, 22 Nov 2020 22:50:24 +0000 Subject: [PATCH 1/5] [minor-chores] Use latest deno version always in ci --- .github/workflows/master.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index a26b430..c1a848c 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -10,7 +10,6 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - deno: ["1.5.3"] runs-on: ${{ matrix.os }} steps: @@ -18,8 +17,6 @@ jobs: - name: Install Deno uses: denolib/setup-deno@master - with: - deno-version: ${{ matrix.deno }} - name: Integration run: | @@ -31,9 +28,6 @@ jobs: cd tests/integration/out-of-date-deps deno run --allow-read='.' --allow-write='deps.ts' --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' ../../../mod.ts update linting: - strategy: - matrix: - deno: ["1.5.3"] # Doesn't need to be checked in all OS runs-on: ubuntu-latest @@ -42,8 +36,6 @@ jobs: - name: Install Deno uses: denolib/setup-deno@master - with: - deno-version: ${{ matrix.deno }} - name: Check Code FMT run: deno fmt --check From 84d5ef89001103da3760b3dd2b03e976728b48b1 Mon Sep 17 00:00:00 2001 From: Edward Bebbington Date: Sun, 22 Nov 2020 22:52:20 +0000 Subject: [PATCH 2/5] [minor-chores] Remove duplication in readme --- README.md | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 7e36b41..006bd86 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ --- -`dmm` (pronounced "dim") is a Deno module manager. It can update your `deps.ts` file, check if any of your dependencies are out of date, and give you information about any module in the Deno world. Managing your dependencies hasn't been easier. +`dmm` is a Deno module manager. It can update your `deps.ts` file, check if any of your dependencies are out of date, and give you information about any module in the Deno world. Managing your dependencies hasn't been easier. # Table of Contents @@ -49,28 +49,7 @@ # Quick Start -There are two ways you can use this module: - -1. You can install it through the `deno` command. - ```sh - $ deno install \ - --allow-net='cdn.deno.land,api.deno.land,x.nest.land,raw.githubusercontent.com,github.com,api.github.com' \ - --allow-read='.' \ - --allow-write='deps.ts' \ - https://deno.land/x/dmm@v1.3.0/mod.ts - - $ dmm help - ```` - -2. Run it through a URL. - ```sh - $ deno run \ - --allow-net='cdn.deno.land,api.deno.land,x.nest.land,raw.githubusercontent.com,github.com,api.github.com' \ - --allow-read='.' \ - --allow-write='deps.ts' \ - https://deno.land/x/dmm@v1.3.0/mod.ts \ - help - ``` +Get started [here](https://drash.land/dmm/#/#quickstart) with a basic example. # How It Works From e4e13937b90bce09e246089f5f03eda6b687a77f Mon Sep 17 00:00:00 2001 From: Edward Bebbington Date: Sun, 22 Nov 2020 22:54:28 +0000 Subject: [PATCH 3/5] [minor-chores] Reduce amount of files needed in bumper script --- console/bumper_ci_service_files.ts | 52 +---------------------------- tests/data/expected_help_message.ts | 46 +++++++++++++++++++++++++ tests/integration/error_test.ts | 46 ++----------------------- tests/integration/help_test.ts | 46 ++----------------------- 4 files changed, 51 insertions(+), 139 deletions(-) create mode 100644 tests/data/expected_help_message.ts diff --git a/console/bumper_ci_service_files.ts b/console/bumper_ci_service_files.ts index 463fd50..9a9cc6b 100644 --- a/console/bumper_ci_service_files.ts +++ b/console/bumper_ci_service_files.ts @@ -1,5 +1,3 @@ -import { version } from "../src/commands/version.ts"; - export const regexes = { const_statements: /version = ".+"/g, deps_drash: /drash@v[0-9.]+[0-9.]+[0-9]/g, @@ -16,59 +14,11 @@ export const preReleaseFiles = [ replaceTheRegex: regexes.egg_json, replaceWith: `"version": "{{ thisModulesLatestVersion }}"`, }, - { - filename: "./README.md", - replaceTheRegex: regexes.urls, - replaceWith: `dmm@v{{ thisModulesLatestVersion }}`, - }, { filename: "./src/commands/version.ts", replaceTheRegex: regexes.const_statements, replaceWith: `version = "{{ thisModulesLatestVersion }}"`, }, - { - filename: "./tests/integration/error_test.ts", - replaceTheRegex: regexes.urls, - replaceWith: "dmm@v{{ thisModulesLatestVersion }}", - }, - { - filename: "./tests/integration/help_test.ts", - replaceTheRegex: regexes.urls, - replaceWith: "dmm@v{{ thisModulesLatestVersion }}", - }, - { - filename: "./tests/integration/info_test.ts", - replaceTheRegex: regexes.urls, - replaceWith: "dmm@v{{ thisModulesLatestVersion }}", - }, - { - filename: "./tests/integration/info_test.ts", - replaceTheRegex: regexes.deps_drash, - replaceWith: "drash@v{{ latestDrashVersion }}", - }, ]; -export const bumperFiles = [ - { - filename: "./tests/integration/up-to-date-deps/original_deps.ts", - replaceTheRegex: regexes.deps_std, - replaceWith: "std@{{ latestStdVersion }}", - }, - // Yes... this is NOT a deno version file, but we're trying to keep the tests - // up to date and it has a Drash version... so gtfo... leave this alone kthx. - { - filename: "./tests/integration/up-to-date-deps/original_deps.ts", - replaceTheRegex: regexes.deps_drash, - replaceWith: "drash@v{{ latestDrashVersion }}", - }, - { - filename: "./.github/workflows/master.yml", - replaceTheRegex: regexes.yml_deno, - replaceWith: `deno: ["{{ latestDenoVersion }}"]`, - }, - { - filename: "./tests/integration/info_test.ts", - replaceTheRegex: regexes.deps_drash, - replaceWith: "drash@v{{ latestDrashVersion }}", - }, -]; +export const bumperFiles = []; diff --git a/tests/data/expected_help_message.ts b/tests/data/expected_help_message.ts new file mode 100644 index 0000000..94e7d52 --- /dev/null +++ b/tests/data/expected_help_message.ts @@ -0,0 +1,46 @@ +import {version} from "../../src/commands/version.ts"; + +export const expectedHelpMessage = ` +A module manager for Deno. + +USAGE + + deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/dmm@v${version}/mod.ts + dmm [SUBCOMMAND] + +SUBCOMMANDS + + check [modules] + Checks the specified modules for newer version. Will check all if modules are + omitted. + + update [modules] + Updates the specified modules to the newest version. Will update all if modules + are omitted. + + info [modules] + Displays information about the given modules, be it std or 3rd party. The 3rd + party module must be referenced at https://deno.land/x/ + + help, --help + Prints the help message + + version, --version + Prints the current dmm version + + +EXAMPLE USAGE + + Install dmm + deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/dmm@v${version}/mod.ts + + Check a single module + dmm check fs + + Update a single module + dmm update fs + + Get information about a module + dmm info http + +` \ No newline at end of file diff --git a/tests/integration/error_test.ts b/tests/integration/error_test.ts index 5c58e2f..36f7920 100644 --- a/tests/integration/error_test.ts +++ b/tests/integration/error_test.ts @@ -1,5 +1,6 @@ import { assertEquals, colours } from "../../deps.ts"; import { outOfDateDepsDir, upToDateDepsDir } from "./test_constants.ts"; +import {expectedHelpMessage} from "../data/expected_help_message.ts"; Deno.test({ name: "No Purpose", @@ -18,50 +19,7 @@ Deno.test({ const stderr = new TextDecoder("utf-8").decode(error); assertEquals( stdout, - ` -A module manager for Deno. - -USAGE - - deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/dmm@v1.3.0/mod.ts - dmm [SUBCOMMAND] - -SUBCOMMANDS - - check [modules] - Checks the specified modules for newer version. Will check all if modules are - omitted. - - update [modules] - Updates the specified modules to the newest version. Will update all if modules - are omitted. - - info [modules] - Displays information about the given modules, be it std or 3rd party. The 3rd - party module must be referenced at https://deno.land/x/ - - help, --help - Prints the help message - - version, --version - Prints the current dmm version - - -EXAMPLE USAGE - - Install dmm - deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/dmm@v1.3.0/mod.ts - - Check a single module - dmm check fs - - Update a single module - dmm update fs - - Get information about a module - dmm info http - -`, + expectedHelpMessage, ); assertEquals(stderr, ""); assertEquals(status.code, 0); diff --git a/tests/integration/help_test.ts b/tests/integration/help_test.ts index 900c86f..7b72ffb 100644 --- a/tests/integration/help_test.ts +++ b/tests/integration/help_test.ts @@ -1,6 +1,7 @@ import { assertEquals, colours } from "../../deps.ts"; import { version } from "../../src/commands/version.ts"; import { outOfDateDepsDir, upToDateDepsDir } from "./test_constants.ts"; +import {expectedHelpMessage} from "../data/expected_help_message.ts"; Deno.test({ name: "Help", @@ -20,50 +21,7 @@ Deno.test({ assertEquals(stderr, ""); assertEquals( stdout, - ` -A module manager for Deno. - -USAGE - - deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/dmm@v1.3.0/mod.ts - dmm [SUBCOMMAND] - -SUBCOMMANDS - - check [modules] - Checks the specified modules for newer version. Will check all if modules are - omitted. - - update [modules] - Updates the specified modules to the newest version. Will update all if modules - are omitted. - - info [modules] - Displays information about the given modules, be it std or 3rd party. The 3rd - party module must be referenced at https://deno.land/x/ - - help, --help - Prints the help message - - version, --version - Prints the current dmm version - - -EXAMPLE USAGE - - Install dmm - deno install --allow-net='x.nest.land,cdn.deno.land,api.deno.land,raw.githubusercontent.com,github.com,api.github.com' --allow-read='.' --allow-write='deps.ts' https://deno.land/x/dmm@v1.3.0/mod.ts - - Check a single module - dmm check fs - - Update a single module - dmm update fs - - Get information about a module - dmm info http - -`, + expectedHelpMessage, ); assertEquals(status.code, 0); assertEquals(status.success, true); From a6bf06ae0d12005f6c5688403c5e3eb8586c012d Mon Sep 17 00:00:00 2001 From: Edward Bebbington Date: Sun, 22 Nov 2020 22:55:18 +0000 Subject: [PATCH 4/5] deno fmt --- tests/data/expected_help_message.ts | 4 ++-- tests/integration/error_test.ts | 2 +- tests/integration/help_test.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/data/expected_help_message.ts b/tests/data/expected_help_message.ts index 94e7d52..e68ce48 100644 --- a/tests/data/expected_help_message.ts +++ b/tests/data/expected_help_message.ts @@ -1,4 +1,4 @@ -import {version} from "../../src/commands/version.ts"; +import { version } from "../../src/commands/version.ts"; export const expectedHelpMessage = ` A module manager for Deno. @@ -43,4 +43,4 @@ EXAMPLE USAGE Get information about a module dmm info http -` \ No newline at end of file +`; diff --git a/tests/integration/error_test.ts b/tests/integration/error_test.ts index 36f7920..666bfcb 100644 --- a/tests/integration/error_test.ts +++ b/tests/integration/error_test.ts @@ -1,6 +1,6 @@ import { assertEquals, colours } from "../../deps.ts"; import { outOfDateDepsDir, upToDateDepsDir } from "./test_constants.ts"; -import {expectedHelpMessage} from "../data/expected_help_message.ts"; +import { expectedHelpMessage } from "../data/expected_help_message.ts"; Deno.test({ name: "No Purpose", diff --git a/tests/integration/help_test.ts b/tests/integration/help_test.ts index 7b72ffb..f52c279 100644 --- a/tests/integration/help_test.ts +++ b/tests/integration/help_test.ts @@ -1,7 +1,7 @@ import { assertEquals, colours } from "../../deps.ts"; import { version } from "../../src/commands/version.ts"; import { outOfDateDepsDir, upToDateDepsDir } from "./test_constants.ts"; -import {expectedHelpMessage} from "../data/expected_help_message.ts"; +import { expectedHelpMessage } from "../data/expected_help_message.ts"; Deno.test({ name: "Help", From a2545e89eb701e1ae791a70b9f3c591769afce87 Mon Sep 17 00:00:00 2001 From: Eric Crooks Date: Sun, 22 Nov 2020 21:33:18 -0500 Subject: [PATCH 5/5] further remove bloat --- README.md | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 006bd86..1a80bea 100644 --- a/README.md +++ b/README.md @@ -21,21 +21,7 @@ `dmm` is a Deno module manager. It can update your `deps.ts` file, check if any of your dependencies are out of date, and give you information about any module in the Deno world. Managing your dependencies hasn't been easier. -# Table of Contents - -* [Documentation](#documentation) -* [Features](#features) -* [Quick Start](#quick-start) -* [How it Works](#how-it-works) -* [Mirrors](#mirrors) -* [Contributing](#contributing) -* [License](#license) - -# Documentation - -* [Full Documentation](https://drash.land/dmm/) - -# Features +### Features * Zero dependencies * Easy and simple to use @@ -47,26 +33,16 @@ * No variants of `node_modules` and `package.json` * No extra configuration around import maps -# Quick Start +### Getting Started Get started [here](https://drash.land/dmm/#/#quickstart) with a basic example. -# How It Works +### How It Works dmm reads the `deps.ts` file at the current working directory -- checking versioned `import` and `export` statements and checking to see if they can be updated. If any dependency can be updated, it lets you know which ones can be updated; and if you want to update them, dmm will rewrite your `deps.ts` file so that your dependencies reflect their latest versions. _Note: nest.land may not reflect the latest Deno Standard Modules version immediately after Deno releases a new version. Please keep this in mind when importing your modules via nest.land._ -## Mirrors - -* https://nest.land/package/dmm - -## Contributing - -Contributors are welcomed! - -Please read through our [contributing guidelines](./.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development. - -## License +--- -By contributing your code, you agree to license your contribution under the [MIT License](./LICENSE). +Want to contribute? Follow the Contributing Guidelines [here](https://github.com/drashland/.github/blob/master/CONTRIBUTING.md). All code is released under the [MIT License](./LICENSE).