From 4e2911fd384966f141c3deea449bd0c0e9e5c0c4 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 17 Mar 2021 13:38:34 -0700 Subject: [PATCH 1/2] [Tests] use `ljharb/actions/node/install` instead of `ljharb/actions/node/run` --- .github/workflows/node-4+.yml | 14 +++++++++----- .github/workflows/node-iojs.yml | 14 ++++++++------ .github/workflows/node-pretest.yml | 16 ++++++---------- .github/workflows/node-zero.yml | 12 ++++++++---- 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/.github/workflows/node-4+.yml b/.github/workflows/node-4+.yml index ba174e1d..0483dda9 100644 --- a/.github/workflows/node-4+.yml +++ b/.github/workflows/node-4+.yml @@ -24,11 +24,13 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' + - uses: ljharb/actions/node/install@main + name: 'nvm install ${{ matrix.node-version }} && npm install' with: node-version: ${{ matrix.node-version }} - command: 'tests-only' + - run: npm run tests-only + - run: bash <(curl -s https://codecov.io/bash) -f coverage/*.json; + minors: needs: [matrix, latest] name: 'non-latest minors' @@ -41,10 +43,12 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main + - uses: ljharb/actions/node/install@main + name: 'nvm install ${{ matrix.node-version }} && npm install' with: node-version: ${{ matrix.node-version }} - command: 'tests-only' + - run: npm run tests-only + - run: bash <(curl -s https://codecov.io/bash) -f coverage/*.json; node: name: 'node 4+' diff --git a/.github/workflows/node-iojs.yml b/.github/workflows/node-iojs.yml index f707c3cf..ee47695f 100644 --- a/.github/workflows/node-iojs.yml +++ b/.github/workflows/node-iojs.yml @@ -24,12 +24,13 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' + - uses: ljharb/actions/node/install@main + name: 'nvm install ${{ matrix.node-version }} && npm install' with: node-version: ${{ matrix.node-version }} - command: 'tests-only' skip-ls-check: true + - run: npm run tests-only + - run: bash <(curl -s https://codecov.io/bash) -f coverage/*.json; minors: needs: [matrix, latest] @@ -43,12 +44,13 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' + - uses: ljharb/actions/node/install@main + name: 'nvm install ${{ matrix.node-version }} && npm install' with: node-version: ${{ matrix.node-version }} - command: 'tests-only' skip-ls-check: true + - run: npm run tests-only + - run: bash <(curl -s https://codecov.io/bash) -f coverage/*.json; node: name: 'io.js' diff --git a/.github/workflows/node-pretest.yml b/.github/workflows/node-pretest.yml index 3921e0ae..16461736 100644 --- a/.github/workflows/node-pretest.yml +++ b/.github/workflows/node-pretest.yml @@ -8,19 +8,15 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run pretest' - with: - node-version: 'lts/*' - command: 'pretest' + - uses: ljharb/actions/node/install@main + name: 'nvm install ${{ matrix.node-version }} && npm install' + - run: npm run pretest posttest: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run posttest' - with: - node-version: 'lts/*' - command: 'posttest' + - uses: ljharb/actions/node/install@main + name: 'nvm install ${{ matrix.node-version }} && npm install' + - run: npm run posttest diff --git a/.github/workflows/node-zero.yml b/.github/workflows/node-zero.yml index d044c603..4e72a688 100644 --- a/.github/workflows/node-zero.yml +++ b/.github/workflows/node-zero.yml @@ -24,12 +24,14 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main + - uses: ljharb/actions/node/install@main + name: 'nvm install ${{ matrix.node-version }} && npm install' with: node-version: ${{ matrix.node-version }} - command: 'tests-only' cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} skip-ls-check: true + - run: npm run tests-only + - run: bash <(curl -s https://codecov.io/bash) -f coverage/*.json; unstable: needs: [matrix, stable] @@ -43,12 +45,14 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main + - uses: ljharb/actions/node/install@main + name: 'nvm install ${{ matrix.node-version }} && npm install' with: node-version: ${{ matrix.node-version }} - command: 'tests-only' cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} skip-ls-check: true + - run: npm run tests-only + - run: bash <(curl -s https://codecov.io/bash) -f coverage/*.json; node: name: 'node 0.x' From 834f690b3c6f9c4db50db9f99980c1ce9c766a3d Mon Sep 17 00:00:00 2001 From: Sou Mizobuchi <27652080+mizozobu@users.noreply.github.com> Date: Thu, 11 Mar 2021 17:19:51 +0900 Subject: [PATCH 2/2] [meta] fix README.md - `defaultEncoder`=> `defaultDecoder` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d2676bd7..09e2cc9e 100644 --- a/README.md +++ b/README.md @@ -352,7 +352,7 @@ var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str, defaultE The type argument is also provided to the decoder: ```javascript -var decoded = qs.parse('x=z', { decoder: function (str, defaultEncoder, charset, type) { +var decoded = qs.parse('x=z', { decoder: function (str, defaultDecoder, charset, type) { if (type === 'key') { return // Decoded key } else if (type === 'value') {