From 7148c886aa08511f86c3cc0a1f8e7f957372eba3 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Sat, 26 Feb 2022 13:44:24 -0500 Subject: [PATCH 1/4] deps: update rollup-plugin-ts/puppeteer (#435) --- package.json | 4 ++-- rollup.config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c4b03225..4e37f127 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,6 @@ "@types/node": "^16.11.4", "@typescript-eslint/eslint-plugin": "^3.10.1", "@typescript-eslint/parser": "^3.10.1", - "@wessberg/rollup-plugin-ts": "^1.2.28", "c8": "^7.3.0", "chai": "^4.2.0", "cross-env": "^7.0.2", @@ -62,10 +61,11 @@ "eslint-plugin-node": "^11.0.0", "gts": "^3.0.0", "mocha": "^9.0.0", - "puppeteer": "^11.0.0", + "puppeteer": "^13.4.0", "rimraf": "^3.0.2", "rollup": "^2.22.1", "rollup-plugin-cleanup": "^3.1.1", + "rollup-plugin-ts": "^2.0.5", "serve": "^13.0.0", "standardx": "^7.0.0", "start-server-and-test": "^1.11.2", diff --git a/rollup.config.js b/rollup.config.js index ff47101d..15fd65db 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,5 +1,5 @@ import cleanup from 'rollup-plugin-cleanup' -import ts from '@wessberg/rollup-plugin-ts' +import ts from 'rollup-plugin-ts' import transformDefaultExport from 'ts-transform-default-export' const output = { From 91b569eec55fc0f31112d0ca64d64f4dc1123079 Mon Sep 17 00:00:00 2001 From: "bencoe@google.com" Date: Sat, 26 Feb 2022 18:45:14 +0000 Subject: [PATCH 2/4] build: use newer release-please build --- .github/workflows/release-please.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index b068d68d..dccda7e8 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -7,7 +7,7 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: google-github-actions/release-please-action@v2 + - uses: google-github-actions/release-please-action@v3 id: release with: token: ${{ secrets.GITHUB_TOKEN }} From b00eb87b4860a890dd2dab0d6058241bbfd2b3ec Mon Sep 17 00:00:00 2001 From: Johan Holmerin Date: Sun, 27 Feb 2022 16:04:23 +0100 Subject: [PATCH 3/4] fix: return deno env object (#432) Fixes yargs/yargs#2136 --- .github/workflows/ci.yaml | 4 +++- deno.ts | 2 +- test/deno/yargs-test.ts | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5bcd95ae..51f1f43d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -61,7 +61,9 @@ jobs: deno-version: v1.x - run: | deno --version - deno test --allow-read test/deno/yargs-test.ts + deno test --allow-read --allow-env test/deno/yargs-test.ts + env: + MY_PREFIX_MY_KEY: "my value" browser: runs-on: ubuntu-latest steps: diff --git a/deno.ts b/deno.ts index 1074dc64..ea42bced 100644 --- a/deno.ts +++ b/deno.ts @@ -10,7 +10,7 @@ import type { Arguments, ArgsInput, Parser, Options, DetailedArguments } from '. const parser = new YargsParser({ cwd: Deno.cwd, env: () => { - Deno.env.toObject() + return Deno.env.toObject() }, format: (str: string, arg: string) => { return str.replace('%s', arg) }, normalize: path.posix.normalize, diff --git a/test/deno/yargs-test.ts b/test/deno/yargs-test.ts index f025ac62..8bb250ec 100644 --- a/test/deno/yargs-test.ts +++ b/test/deno/yargs-test.ts @@ -63,3 +63,8 @@ Deno.test('it detects strings that could be parsed as numbers', () => { assertEquals(parser.looksLikeNumber('0100'), false) assertEquals(parser.looksLikeNumber('apple'), false) }) + +Deno.test('should load values from environment variables', () => { + const argv = parser([], { envPrefix: 'MY_PREFIX_' }) + assertEquals(argv.myKey, 'my value') +}) From 0fdbfa1fe960f76d520f75437e97c79727804908 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 27 Feb 2022 10:09:08 -0500 Subject: [PATCH 4/4] chore(main): release yargs-parser 21.0.1 (#436) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6b84c484..456110db 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"21.0.0"} \ No newline at end of file +{".":"21.0.1"} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f34e4dfd..ca50b82e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [21.0.1](https://github.com/yargs/yargs-parser/compare/yargs-parser-v21.0.0...yargs-parser-v21.0.1) (2022-02-27) + + +### Bug Fixes + +* return deno env object ([#432](https://github.com/yargs/yargs-parser/issues/432)) ([b00eb87](https://github.com/yargs/yargs-parser/commit/b00eb87b4860a890dd2dab0d6058241bbfd2b3ec)) + ## [21.0.0](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v20.2.9...yargs-parser-v21.0.0) (2021-11-15) diff --git a/package.json b/package.json index 4e37f127..89412fcf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yargs-parser", - "version": "21.0.0", + "version": "21.0.1", "description": "the mighty option parser used by yargs", "main": "build/index.cjs", "exports": {