diff --git a/.github/actions/create-check/action.yml b/.github/actions/create-check/action.yml index 0e7d6ce..aa24a5b 100644 --- a/.github/actions/create-check/action.yml +++ b/.github/actions/create-check/action.yml @@ -17,7 +17,7 @@ runs: using: "composite" steps: - name: Get Workflow Job - uses: actions/github-script@v6 + uses: actions/github-script@v7 id: workflow env: JOB_NAME: "${{ inputs.name }}" diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index fa3163a..a3ae725 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -18,17 +18,17 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: - node-version: 20.x - check-latest: contains('20.x', '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') - name: Install Latest npm uses: ./.github/actions/install-latest-npm with: diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index c21673c..ae2532c 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -28,7 +28,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} - name: Setup Git User @@ -44,11 +44,11 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: - node-version: 20.x - check-latest: contains('20.x', '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') - name: Install Latest npm uses: ./.github/actions/install-latest-npm with: @@ -80,6 +80,9 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd @@ -91,13 +94,31 @@ jobs: - 18.0.0 - 18.x - 20.x + - 22.x + exclude: + - platform: { name: macOS, os: macos-latest, shell: bash } + node-version: 14.17.0 + - platform: { name: macOS, os: macos-latest, shell: bash } + node-version: 14.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 16.13.0 + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 16.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 18.0.0 + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 18.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 20.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} - name: Setup Git User @@ -113,7 +134,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} sha: ${{ inputs.check-sha }} - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9b2487..28dca18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,17 +22,17 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: - node-version: 20.x - check-latest: contains('20.x', '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') - name: Install Latest npm uses: ./.github/actions/install-latest-npm with: @@ -57,6 +57,9 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd @@ -68,19 +71,37 @@ jobs: - 18.0.0 - 18.x - 20.x + - 22.x + exclude: + - platform: { name: macOS, os: macos-latest, shell: bash } + node-version: 14.17.0 + - platform: { name: macOS, os: macos-latest, shell: bash } + node-version: 14.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 16.13.0 + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 16.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 18.0.0 + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 18.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 20.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: ${{ matrix.platform.os }} defaults: run: shell: ${{ matrix.platform.shell }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f7e691d..13efe1b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -23,7 +23,7 @@ jobs: security-events: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" diff --git a/.github/workflows/post-dependabot.yml b/.github/workflows/post-dependabot.yml index 11a7b7c..a7ebe12 100644 --- a/.github/workflows/post-dependabot.yml +++ b/.github/workflows/post-dependabot.yml @@ -17,7 +17,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} - name: Setup Git User @@ -25,11 +25,11 @@ jobs: git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: - node-version: 20.x - check-latest: contains('20.x', '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') - name: Install Latest npm uses: ./.github/actions/install-latest-npm with: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0b5789e..7dbdfd4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -20,7 +20,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Git User @@ -28,11 +28,11 @@ jobs: git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: - node-version: 20.x - check-latest: contains('20.x', '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') - name: Install Latest npm uses: ./.github/actions/install-latest-npm with: diff --git a/.github/workflows/release-integration.yml b/.github/workflows/release-integration.yml index fbf1972..9bb7bf2 100644 --- a/.github/workflows/release-integration.yml +++ b/.github/workflows/release-integration.yml @@ -25,17 +25,17 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: - node-version: 20.x - check-latest: contains('20.x', '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') - name: Install Latest npm uses: ./.github/actions/install-latest-npm with: @@ -46,17 +46,10 @@ jobs: run: | EXIT_CODE=0 - function each_release { - if npm view "$@" --loglevel=error > /dev/null; then - echo 0 - else - echo 1 - fi - } - for release in $(echo $RELEASES | jq -r '.[] | @base64'); do SPEC="$(echo "$release" | base64 --decode | jq -r .pkgName)@$(echo "$release" | base64 --decode | jq -r .version)" - STATUS=$(each_release "$SPEC") + npm view "$SPEC" --json + STATUS=$? if [[ "$STATUS" -eq 1 ]]; then EXIT_CODE=$STATUS echo "$SPEC ERROR" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a410ccf..2761782 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,17 +30,17 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Git User run: | git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: - node-version: 20.x - check-latest: contains('20.x', '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') - name: Install Latest npm uses: ./.github/actions/install-latest-npm with: @@ -54,7 +54,7 @@ jobs: run: npx --offline template-oss-release-please --branch="${{ github.ref_name }}" --backport="" --defaultTag="latest" - name: Create Release Manager Comment Text if: steps.release.outputs.pr-number - uses: actions/github-script@v6 + uses: actions/github-script@v7 id: comment-text with: result-encoding: string @@ -107,7 +107,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ needs.release.outputs.pr-branch }} @@ -116,11 +116,11 @@ jobs: git config --global user.email "npm-cli+bot@github.com" git config --global user.name "npm CLI robot" - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: - node-version: 20.x - check-latest: contains('20.x', '.x') + node-version: 22.x + check-latest: contains('22.x', '.x') - name: Install Latest npm uses: ./.github/actions/install-latest-npm with: @@ -215,7 +215,7 @@ jobs: steps: - name: Create Release PR Comment Text id: comment-text - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: RELEASES: ${{ needs.release.outputs.releases }} with: @@ -276,7 +276,7 @@ jobs: - name: Create Release PR Comment Text id: comment-text if: steps.found-comment.outputs.comment-id - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: RESULT: ${{ steps.conclusion.outputs.result }} BODY: ${{ steps.found-comment.outputs.comment-body }} diff --git a/docs/examples/cli-progress.js b/docs/examples/cli-progress.js index 42cdad5..c9ba923 100644 --- a/docs/examples/cli-progress.js +++ b/docs/examples/cli-progress.js @@ -34,7 +34,7 @@ client.on('progress', (key, data) => { bars[key].setTotal(data.total) }) // a bar is done, tell multibar to stop updating it -client.on('barDone', (key, data) => { +client.on('barDone', (key) => { bars[key].stop() }) // all bars done, tell multibar to close entirely diff --git a/package.json b/package.json index 94f71c5..97e1ee4 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "description": "Progress bar updates at a distance", "repository": { "type": "git", - "url": "https://github.com/npm/proggy.git" + "url": "git+https://github.com/npm/proggy.git" }, "author": "GitHub Inc.", "license": "ISC", @@ -25,7 +25,7 @@ }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.21.4", + "@npmcli/template-oss": "4.22.0", "chalk": "^4.1.2", "cli-progress": "^3.10.0", "npmlog": "^7.0.0", @@ -43,6 +43,6 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.4" + "version": "4.22.0" } } diff --git a/release-please-config.json b/release-please-config.json index 559ef7d..a1676b9 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -5,32 +5,27 @@ { "type": "feat", "section": "Features", - "hidden": false, - "collapse": false + "hidden": false }, { "type": "fix", "section": "Bug Fixes", - "hidden": false, - "collapse": false + "hidden": false }, { "type": "docs", "section": "Documentation", - "hidden": false, - "collapse": false + "hidden": false }, { "type": "deps", "section": "Dependencies", - "hidden": false, - "collapse": false + "hidden": false }, { "type": "chore", "section": "Chores", - "hidden": false, - "collapse": false + "hidden": true } ], "packages": { diff --git a/test/client.js b/test/client.js index 622cdf1..fae1a6f 100644 --- a/test/client.js +++ b/test/client.js @@ -15,7 +15,7 @@ t.test('basic', t => { t.equal(c.listening, true, 'still listening') c.stop() - c.once('progress', (key, data) => {}) + c.once('progress', () => {}) t.equal(c.listening, true, 'listening because once handler added') c.emit('progress') t.equal(c.listening, false, 'not listening because once handler removed') @@ -24,7 +24,7 @@ t.test('basic', t => { t.equal(c.listening, true, 'listening, because progress event handler added') let sawProgress = false - c.once('progress', (key, data) => { + c.once('progress', () => { sawProgress = true })