From df03d8bec39e5e5245b272f1fc9c21556185a95d Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Sun, 21 Apr 2024 19:23:34 -0700 Subject: [PATCH 01/11] fix: dont create chore only PRs (#433) --- lib/content/index.js | 10 ++--- lib/release/changelog.js | 28 ++++++------ release-please-config.json | 15 +++---- .../test/apply/source-snapshots.js.test.cjs | 45 +++++++------------ test/release/changelog.js | 22 +++++++++ 5 files changed, 61 insertions(+), 59 deletions(-) diff --git a/lib/content/index.js b/lib/content/index.js index 1e1b6e80..e10cd318 100644 --- a/lib/content/index.js +++ b/lib/content/index.js @@ -199,10 +199,10 @@ module.exports = { }, allowedPackages: [], changelogTypes: [ - { type: 'feat', section: 'Features', hidden: false, collapse: false }, - { type: 'fix', section: 'Bug Fixes', hidden: false, collapse: false }, - { type: 'docs', section: 'Documentation', hidden: false, collapse: false }, - { type: 'deps', section: 'Dependencies', hidden: false, collapse: false }, - { type: 'chore', section: 'Chores', hidden: false, collapse: false }, + { type: 'feat', section: 'Features', hidden: false }, + { type: 'fix', section: 'Bug Fixes', hidden: false }, + { type: 'docs', section: 'Documentation', hidden: false }, + { type: 'deps', section: 'Dependencies', hidden: false }, + { type: 'chore', section: 'Chores', hidden: true }, ], } diff --git a/lib/release/changelog.js b/lib/release/changelog.js index 355edbb7..8358e6c2 100644 --- a/lib/release/changelog.js +++ b/lib/release/changelog.js @@ -29,28 +29,28 @@ class Changelog { } #getEntries (type) { - const section = this.#sections[type] - const entries = this.#entries[type].map(list) - // Ignoring coverage until we use this again - /* istanbul ignore next */ - if (section?.collapse) { - entries.unshift('
Commits\n') - entries.push('\n
') - } - return entries.join('\n') + return this.#entries[type].map(list).join('\n') } toString () { const body = [this.#title] + const includedTypes = [] + for (const type of this.#types) { - const title = this.#titles[type] if (this.#entries[type]?.length) { - body.push( - `### ${title}`, - this.#getEntries(type) - ) + includedTypes.push(type) + body.push(`### ${this.#titles[type]}`, this.#getEntries(type)) } } + + // If every commit is from a hidden section then we return an + // empty string which will skip the release PR being created. + // We do this because we don't want PRs opened if they only contain + // chores but we do want to rebuild existing PRs if chores are added. + if (includedTypes.every((type) => this.#sections[type]?.hidden)) { + return '' + } + return body.join('\n\n').trim() } } diff --git a/release-please-config.json b/release-please-config.json index ca92ecb2..62cd93d9 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -3,32 +3,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/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index c649b4d7..b3271948 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -1368,32 +1368,27 @@ release-please-config.json { "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 } ], "prerelease-type": "pre", @@ -3031,32 +3026,27 @@ release-please-config.json { "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 } ], "prerelease-type": "pre", @@ -4410,32 +4400,27 @@ release-please-config.json { "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 } ], "prerelease-type": "pre", diff --git a/test/release/changelog.js b/test/release/changelog.js index 838b0d74..06030bca 100644 --- a/test/release/changelog.js +++ b/test/release/changelog.js @@ -121,6 +121,10 @@ t.test('filters out multiple template oss commits', async t => { const changelog = await mockChangelog({ authors: false, commits: [{ + sha: 'z', + type: 'fix', + bareMessage: 'just a fix', + }, { sha: 'a', type: 'chore', bareMessage: 'postinstall for dependabot template-oss PR', @@ -152,6 +156,8 @@ t.test('filters out multiple template oss commits', async t => { }) t.strictSame(changelog, [ '## [1.0.0](https://github.com/npm/cli/compare/v0.1.0...v1.0.0) (DATE)', + '### Bug Fixes', + '* [`z`](https://github.com/npm/cli/commit/z) just a fix', '### Chores', // eslint-disable-next-line max-len '* [`b`](https://github.com/npm/cli/commit/b) [#101](https://github.com/npm/cli/pull/101) postinstall for dependabot template-oss PR', @@ -159,3 +165,19 @@ t.test('filters out multiple template oss commits', async t => { '* [`c`](https://github.com/npm/cli/commit/c) [#101](https://github.com/npm/cli/pull/101) bump @npmcli/template-oss from 1 to 2', ]) }) + +t.test('empty change log with only chore commits', async t => { + const changelog = await mockChangelog({ + authors: false, + commits: [{ + sha: 'a', + type: 'chore', + bareMessage: 'some chore', + }, { + sha: 'a', + type: 'chore', + bareMessage: 'another chore', + }], + }) + t.strictSame(changelog, []) +}) From d0bf7c28f9b3244132243067705a524abd18b84b Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Wed, 24 Apr 2024 17:24:06 -0700 Subject: [PATCH 02/11] fix: update license (#435) --- lib/content/LICENSE-md.hbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/content/LICENSE-md.hbs b/lib/content/LICENSE-md.hbs index 845be76f..02cd9a9a 100644 --- a/lib/content/LICENSE-md.hbs +++ b/lib/content/LICENSE-md.hbs @@ -7,10 +7,10 @@ software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, +EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER From 6d54cbf0016403779906d1f563d8ba249d2d9f0e Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Thu, 25 Apr 2024 09:23:50 -0700 Subject: [PATCH 03/11] fix: get correct exit code from npm publish/view (#436) Closes #417 --- .github/workflows/release-integration.yml | 11 ++----- lib/content/_job-release-integration-yml.hbs | 13 ++------ .../test/apply/source-snapshots.js.test.cjs | 33 ++++--------------- 3 files changed, 11 insertions(+), 46 deletions(-) diff --git a/.github/workflows/release-integration.yml b/.github/workflows/release-integration.yml index d986e4be..090ef8ca 100644 --- a/.github/workflows/release-integration.yml +++ b/.github/workflows/release-integration.yml @@ -58,17 +58,10 @@ jobs: run: | EXIT_CODE=0 - function each_release { - if npm publish --provenance --tag="$1"; then - echo 0 - else - echo 1 - fi - } - for release in $(echo $RELEASES | jq -r '.[] | @base64'); do PUBLISH_TAG=$(echo "$release" | base64 --decode | jq -r .publishTag) - STATUS=$(each_release "$PUBLISH_TAG") + npm publish --provenance --tag="$PUBLISH_TAG" + STATUS=$? if [[ "$STATUS" -eq 1 ]]; then EXIT_CODE=$STATUS fi diff --git a/lib/content/_job-release-integration-yml.hbs b/lib/content/_job-release-integration-yml.hbs index 4596acdc..daeba3c2 100644 --- a/lib/content/_job-release-integration-yml.hbs +++ b/lib/content/_job-release-integration-yml.hbs @@ -23,22 +23,15 @@ steps: run: | EXIT_CODE=0 - function each_release { - if {{#if publish}}npm publish --provenance --tag="$1"{{else}}npm view "$@" --loglevel=error > /dev/null{{/if}}; then - echo 0 - else - echo 1 - fi - } - for release in $(echo $RELEASES | jq -r '.[] | @base64'); do {{#if publish}} PUBLISH_TAG=$(echo "$release" | base64 --decode | jq -r .publishTag) - STATUS=$(each_release "$PUBLISH_TAG") + npm publish --provenance --tag="$PUBLISH_TAG" {{else}} SPEC="$(echo "$release" | base64 --decode | jq -r .pkgName)@$(echo "$release" | base64 --decode | jq -r .version)" - STATUS=$(each_release "$SPEC") + npm view "$SPEC" --json {{/if}} + STATUS=$? if [[ "$STATUS" -eq 1 ]]; then EXIT_CODE=$STATUS {{#unless publish}} diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index b3271948..76b45964 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -889,17 +889,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" @@ -2526,17 +2519,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" @@ -4035,17 +4021,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" From 7949ec36484786abeb1c425fb0d9c378064365b5 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Mon, 29 Apr 2024 18:41:43 -0700 Subject: [PATCH 04/11] fix: add node 22 to CI matrix (#438) --- .github/workflows/audit.yml | 4 +- .github/workflows/ci-release.yml | 5 +- .github/workflows/ci-test-workspace.yml | 5 +- .github/workflows/ci.yml | 5 +- .github/workflows/post-dependabot.yml | 4 +- .github/workflows/pull-request.yml | 4 +- .github/workflows/release-integration.yml | 4 +- .github/workflows/release.yml | 8 +- lib/content/index.js | 2 +- .../test/apply/source-snapshots.js.test.cjs | 122 +++++++++--------- .../test/check/diff-snapshots.js.test.cjs | 6 +- test/apply/engines.js | 11 +- 12 files changed, 92 insertions(+), 88 deletions(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index fa3163a8..420a4fdf 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -27,8 +27,8 @@ jobs: uses: actions/setup-node@v3 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 165fed0a..c02812c1 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -47,8 +47,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -88,6 +88,7 @@ jobs: - 18.x - 20.5.0 - 20.x + - 22.x runs-on: ${{ matrix.platform.os }} defaults: run: diff --git a/.github/workflows/ci-test-workspace.yml b/.github/workflows/ci-test-workspace.yml index 5d05b6d6..c0214a69 100644 --- a/.github/workflows/ci-test-workspace.yml +++ b/.github/workflows/ci-test-workspace.yml @@ -35,8 +35,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -69,6 +69,7 @@ jobs: - 18.x - 20.5.0 - 20.x + - 22.x runs-on: ${{ matrix.platform.os }} defaults: run: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a458d931..cb14fc2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,8 +35,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -69,6 +69,7 @@ jobs: - 18.x - 20.5.0 - 20.x + - 22.x runs-on: ${{ matrix.platform.os }} defaults: run: diff --git a/.github/workflows/post-dependabot.yml b/.github/workflows/post-dependabot.yml index 11a7b7c8..7f3a3a71 100644 --- a/.github/workflows/post-dependabot.yml +++ b/.github/workflows/post-dependabot.yml @@ -28,8 +28,8 @@ jobs: uses: actions/setup-node@v3 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 0b5789e0..44de0dfa 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -31,8 +31,8 @@ jobs: uses: actions/setup-node@v3 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 090ef8ca..09d025cc 100644 --- a/.github/workflows/release-integration.yml +++ b/.github/workflows/release-integration.yml @@ -41,8 +41,8 @@ jobs: uses: actions/setup-node@v3 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.yml b/.github/workflows/release.yml index ba73bb8d..b031a1fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,8 +39,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -119,8 +119,8 @@ jobs: uses: actions/setup-node@v3 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/lib/content/index.js b/lib/content/index.js index e10cd318..84315218 100644 --- a/lib/content/index.js +++ b/lib/content/index.js @@ -172,7 +172,7 @@ module.exports = { /* to be provided by consuming package */ ], ciVersions: {}, - latestCiVersion: 20, + latestCiVersion: 22, lockfile: false, codeowner: '@npm/cli-team', eslint: true, diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index 76b45964..a507e3ec 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -374,8 +374,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -438,8 +438,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -475,7 +475,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 20.x + - 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -558,8 +558,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -588,7 +588,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 20.x + - 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -692,8 +692,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -821,8 +821,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -877,8 +877,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -948,8 +948,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -1028,8 +1028,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -1798,8 +1798,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -1852,8 +1852,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -1882,7 +1882,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 20.x + - 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -1952,8 +1952,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -1982,7 +1982,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 20.x + - 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -2062,8 +2062,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -2099,7 +2099,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 20.x + - 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -2188,8 +2188,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -2218,7 +2218,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 20.x + - 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -2322,8 +2322,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -2451,8 +2451,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -2507,8 +2507,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -2578,8 +2578,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -2658,8 +2658,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -3499,8 +3499,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -3529,7 +3529,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 20.x + - 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -3599,8 +3599,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -3629,7 +3629,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 20.x + - 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -3709,8 +3709,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -3746,7 +3746,7 @@ jobs: os: windows-latest shell: cmd node-version: - - 20.x + - 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -3824,8 +3824,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -3953,8 +3953,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -4009,8 +4009,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -4080,8 +4080,8 @@ jobs: uses: actions/setup-node@v3 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: @@ -4160,8 +4160,8 @@ jobs: uses: actions/setup-node@v3 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/tap-snapshots/test/check/diff-snapshots.js.test.cjs b/tap-snapshots/test/check/diff-snapshots.js.test.cjs index 9bd10de1..5ec168e3 100644 --- a/tap-snapshots/test/check/diff-snapshots.js.test.cjs +++ b/tap-snapshots/test/check/diff-snapshots.js.test.cjs @@ -153,8 +153,8 @@ The repo file audit.yml needs to be updated: uses: actions/setup-node@v3 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: @@ -175,7 +175,7 @@ The repo file ci.yml needs to be updated: .github/workflows/ci.yml ======================================== - @@ -76,4 +76,24 @@ + @@ -77,4 +77,24 @@ shell: \${{ matrix.platform.shell }} steps: - name: Checkout diff --git a/test/apply/engines.js b/test/apply/engines.js index bd363a10..9744a50c 100644 --- a/test/apply/engines.js +++ b/test/apply/engines.js @@ -29,7 +29,7 @@ t.test('sets ci versions from engines', async (t) => { t.equal(pkg.engines.node, '>=10') const versions = await getCiJobs(s) - t.equal(versions.lint, '20.x') + t.equal(versions.lint, '22.x') t.strictSame(versions.test, [ '10.0.0', '10.x', @@ -37,6 +37,7 @@ t.test('sets ci versions from engines', async (t) => { '16.x', '18.x', '20.x', + '22.x', ]) }) @@ -55,11 +56,11 @@ t.test('can set ci to latest plus other versions', async (t) => { t.equal(pkg.engines.node, '*') const versions = await getCiJobs(s) - t.equal(versions.lint, '20.x') + t.equal(versions.lint, '22.x') t.strictSame(versions.test, [ '6.x', '8.x', - '20.x', + '22.x', ]) }) @@ -111,8 +112,8 @@ t.test('latest ci versions', async (t) => { t.equal(pkg.engines, undefined) const versions = await getCiJobs(s) - t.equal(versions.lint, '20.x') + t.equal(versions.lint, '22.x') t.strictSame(versions.test, [ - '20.x', + '22.x', ]) }) From 732dddc38244f4e4a0d6e1a06da416a4d8519dac Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Mon, 29 Apr 2024 18:41:53 -0700 Subject: [PATCH 05/11] fix: update actions workflow versions (#439) Closes #414 --- .github/actions/create-check/action.yml | 2 +- .github/workflows/audit.yml | 4 +- .github/workflows/ci-release.yml | 8 +- .github/workflows/ci-test-workspace.yml | 8 +- .github/workflows/ci.yml | 8 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/post-dependabot.yml | 4 +- .github/workflows/pull-request.yml | 4 +- .github/workflows/release-integration.yml | 4 +- .github/workflows/release.yml | 14 +- lib/content/_step-git-yml.hbs | 2 +- lib/content/_step-node-yml.hbs | 2 +- lib/content/action-create-check-yml.hbs | 2 +- lib/content/release-yml.hbs | 6 +- .../test/apply/source-snapshots.js.test.cjs | 168 +++++++++--------- .../test/check/diff-snapshots.js.test.cjs | 8 +- 16 files changed, 123 insertions(+), 123 deletions(-) diff --git a/.github/actions/create-check/action.yml b/.github/actions/create-check/action.yml index 0e7d6ce0..aa24a5b0 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 420a4fdf..a3ae7257 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -18,13 +18,13 @@ 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: 22.x diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index c02812c1..d1c056c0 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,7 +44,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: 22.x @@ -95,7 +95,7 @@ jobs: shell: ${{ matrix.platform.shell }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ inputs.ref }} - name: Setup Git User @@ -111,7 +111,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-test-workspace.yml b/.github/workflows/ci-test-workspace.yml index c0214a69..64a0df3c 100644 --- a/.github/workflows/ci-test-workspace.yml +++ b/.github/workflows/ci-test-workspace.yml @@ -26,13 +26,13 @@ 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: 22.x @@ -76,13 +76,13 @@ jobs: 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/ci.yml b/.github/workflows/ci.yml index cb14fc2e..ca625af4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,13 +26,13 @@ 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: 22.x @@ -76,13 +76,13 @@ jobs: 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 f7e691d9..13efe1b4 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 7f3a3a71..a7ebe12d 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,7 +25,7 @@ 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: 22.x diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 44de0dfa..7dbdfd41 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,7 +28,7 @@ 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: 22.x diff --git a/.github/workflows/release-integration.yml b/.github/workflows/release-integration.yml index 09d025cc..130578e6 100644 --- a/.github/workflows/release-integration.yml +++ b/.github/workflows/release-integration.yml @@ -30,7 +30,7 @@ jobs: id-token: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ fromJSON(inputs.releases)[0].tagName }} - name: Setup Git User @@ -38,7 +38,7 @@ 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: 22.x diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b031a1fa..e9842179 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,13 +30,13 @@ 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: 22.x @@ -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,7 +116,7 @@ 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: 22.x @@ -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: @@ -280,7 +280,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/lib/content/_step-git-yml.hbs b/lib/content/_step-git-yml.hbs index 2211d118..9a44b719 100644 --- a/lib/content/_step-git-yml.hbs +++ b/lib/content/_step-git-yml.hbs @@ -1,5 +1,5 @@ - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 {{#if jobCheckout}} with: {{#each jobCheckout}} diff --git a/lib/content/_step-node-yml.hbs b/lib/content/_step-node-yml.hbs index 7e9af4fc..71d982b2 100644 --- a/lib/content/_step-node-yml.hbs +++ b/lib/content/_step-node-yml.hbs @@ -1,5 +1,5 @@ - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 id: node with: node-version: {{#if jobIsMatrix}}$\{{ matrix.node-version }}{{else}}{{ last ciVersions }}{{/if}} diff --git a/lib/content/action-create-check-yml.hbs b/lib/content/action-create-check-yml.hbs index 44aeeef9..1ac91f97 100644 --- a/lib/content/action-create-check-yml.hbs +++ b/lib/content/action-create-check-yml.hbs @@ -15,7 +15,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/lib/content/release-yml.hbs b/lib/content/release-yml.hbs index 100b3328..7fc88e57 100644 --- a/lib/content/release-yml.hbs +++ b/lib/content/release-yml.hbs @@ -30,7 +30,7 @@ jobs: run: {{ rootNpxPath }} --offline template-oss-release-please --branch="$\{{ github.ref_name }}" --backport="{{ backport }}" --defaultTag="{{ defaultPublishTag }}" - 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 @@ -156,7 +156,7 @@ jobs: {{> jobYml jobName="Post Release - Release" jobIf="needs.release.outputs.releases" jobSkipSetup=true }} - 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: @@ -217,7 +217,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/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index a507e3ec..e44a1f9f 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -64,7 +64,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 }}" @@ -365,13 +365,13 @@ 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: 22.x @@ -419,7 +419,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: \${{ inputs.ref }} - name: Setup Git User @@ -435,7 +435,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: 22.x @@ -482,7 +482,7 @@ jobs: shell: \${{ matrix.platform.shell }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: \${{ inputs.ref }} - name: Setup Git User @@ -498,7 +498,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 }} @@ -549,13 +549,13 @@ 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: 22.x @@ -595,13 +595,13 @@ jobs: 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 }} @@ -648,7 +648,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" @@ -681,7 +681,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 @@ -689,7 +689,7 @@ 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: 22.x @@ -810,7 +810,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Git User @@ -818,7 +818,7 @@ 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: 22.x @@ -868,13 +868,13 @@ 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: 22.x @@ -939,13 +939,13 @@ 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: 22.x @@ -963,7 +963,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 @@ -1016,7 +1016,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 }} @@ -1025,7 +1025,7 @@ 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: 22.x @@ -1124,7 +1124,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: @@ -1185,7 +1185,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 }} @@ -1488,7 +1488,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 }}" @@ -1789,13 +1789,13 @@ 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: 22.x @@ -1843,13 +1843,13 @@ 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: 22.x @@ -1889,13 +1889,13 @@ jobs: 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 }} @@ -1943,13 +1943,13 @@ 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: 22.x @@ -1989,13 +1989,13 @@ jobs: 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 }} @@ -2043,7 +2043,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: \${{ inputs.ref }} - name: Setup Git User @@ -2059,7 +2059,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: 22.x @@ -2106,7 +2106,7 @@ jobs: shell: \${{ matrix.platform.shell }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: \${{ inputs.ref }} - name: Setup Git User @@ -2122,7 +2122,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 }} @@ -2179,13 +2179,13 @@ 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: 22.x @@ -2225,13 +2225,13 @@ jobs: 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 }} @@ -2278,7 +2278,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" @@ -2311,7 +2311,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 @@ -2319,7 +2319,7 @@ 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: 22.x @@ -2440,7 +2440,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Git User @@ -2448,7 +2448,7 @@ 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: 22.x @@ -2498,13 +2498,13 @@ 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: 22.x @@ -2569,13 +2569,13 @@ 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: 22.x @@ -2593,7 +2593,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 @@ -2646,7 +2646,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 }} @@ -2655,7 +2655,7 @@ 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: 22.x @@ -2754,7 +2754,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: @@ -2815,7 +2815,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 }} @@ -3248,7 +3248,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 }}" @@ -3490,13 +3490,13 @@ 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: 22.x @@ -3536,13 +3536,13 @@ jobs: 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 }} @@ -3590,13 +3590,13 @@ 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: 22.x @@ -3636,13 +3636,13 @@ jobs: 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 }} @@ -3690,7 +3690,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: \${{ inputs.ref }} - name: Setup Git User @@ -3706,7 +3706,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: 22.x @@ -3753,7 +3753,7 @@ jobs: shell: \${{ matrix.platform.shell }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: \${{ inputs.ref }} - name: Setup Git User @@ -3769,7 +3769,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 }} @@ -3813,7 +3813,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 @@ -3821,7 +3821,7 @@ 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: 22.x @@ -3942,7 +3942,7 @@ jobs: shell: bash steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Git User @@ -3950,7 +3950,7 @@ 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: 22.x @@ -4000,13 +4000,13 @@ 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: 22.x @@ -4071,13 +4071,13 @@ 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: 22.x @@ -4095,7 +4095,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 @@ -4148,7 +4148,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 }} @@ -4157,7 +4157,7 @@ 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: 22.x @@ -4256,7 +4256,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: @@ -4317,7 +4317,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/tap-snapshots/test/check/diff-snapshots.js.test.cjs b/tap-snapshots/test/check/diff-snapshots.js.test.cjs index 5ec168e3..a14c85c3 100644 --- a/tap-snapshots/test/check/diff-snapshots.js.test.cjs +++ b/tap-snapshots/test/check/diff-snapshots.js.test.cjs @@ -144,13 +144,13 @@ The repo file audit.yml needs to be updated: 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: 22.x @@ -179,13 +179,13 @@ The repo file ci.yml needs to be updated: 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 }} From 21c92624a9342d6fdbaafdf322ded5216b9188e5 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Wed, 1 May 2024 20:37:06 -0700 Subject: [PATCH 06/11] feat: use macos-(latest|13) based on node version (#440) --- .github/workflows/ci-release.yml | 14 +++++ .github/workflows/ci-test-workspace.yml | 14 +++++ .github/workflows/ci.yml | 14 +++++ lib/content/_job-matrix-yml.hbs | 10 ++++ lib/util/template.js | 3 ++ .../test/apply/source-snapshots.js.test.cjs | 54 +++++++++++++++++++ .../test/check/diff-snapshots.js.test.cjs | 2 +- 7 files changed, 110 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index d1c056c0..af138475 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -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 @@ -89,6 +92,17 @@ jobs: - 20.5.0 - 20.x - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 18.17.0 + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 18.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 20.5.0 + - 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: diff --git a/.github/workflows/ci-test-workspace.yml b/.github/workflows/ci-test-workspace.yml index 64a0df3c..585d888e 100644 --- a/.github/workflows/ci-test-workspace.yml +++ b/.github/workflows/ci-test-workspace.yml @@ -61,6 +61,9 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd @@ -70,6 +73,17 @@ jobs: - 20.5.0 - 20.x - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 18.17.0 + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 18.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 20.5.0 + - 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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca625af4..b934a8d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,9 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd @@ -70,6 +73,17 @@ jobs: - 20.5.0 - 20.x - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 18.17.0 + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 18.x + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 20.5.0 + - 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: diff --git a/lib/content/_job-matrix-yml.hbs b/lib/content/_job-matrix-yml.hbs index 5ad768b0..c8b731e1 100644 --- a/lib/content/_job-matrix-yml.hbs +++ b/lib/content/_job-matrix-yml.hbs @@ -11,6 +11,9 @@ strategy: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash {{/if}} {{#if windowsCI}} - name: Windows @@ -21,6 +24,13 @@ strategy: {{#each ciVersions}} - {{ . }} {{/each}} + {{#if macCI}} + exclude: + {{#each ciVersions}} + - platform: {name: macOS, os: macos-{{#if (lte (semverRangeMajor .) 14)}}latest{{else}}13{{/if}}, shell: bash} + node-version: {{ . }} + {{/each}} + {{/if}} runs-on: $\{{ matrix.platform.os }} defaults: run: diff --git a/lib/util/template.js b/lib/util/template.js index d035b3db..8a291f48 100644 --- a/lib/util/template.js +++ b/lib/util/template.js @@ -1,5 +1,6 @@ const Handlebars = require('handlebars') const { basename, extname, join } = require('path') +const { Range } = require('semver') const fs = require('fs') const DELETE = '__DELETE__' @@ -39,6 +40,8 @@ const setupHandlebars = (dirs) => { Handlebars.registerHelper('last', (arr) => arr[arr.length - 1]) Handlebars.registerHelper('json', (c) => JSON.stringify(c)) Handlebars.registerHelper('del', () => JSON.stringify(DELETE)) + Handlebars.registerHelper('semverRangeMajor', (v) => new Range(v).set[0][0].semver.major) + Handlebars.registerHelper('lte', (a, b) => a <= b) if (Array.isArray(dirs)) { const [baseDir, ...otherDirs] = dirs diff --git a/tap-snapshots/test/apply/source-snapshots.js.test.cjs b/tap-snapshots/test/apply/source-snapshots.js.test.cjs index e44a1f9f..5ef24507 100644 --- a/tap-snapshots/test/apply/source-snapshots.js.test.cjs +++ b/tap-snapshots/test/apply/source-snapshots.js.test.cjs @@ -471,11 +471,17 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -584,11 +590,17 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -1878,11 +1890,17 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -1978,11 +1996,17 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -2095,11 +2119,17 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -2214,11 +2244,17 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -3525,11 +3561,17 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -3625,11 +3667,17 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: \${{ matrix.platform.os }} defaults: run: @@ -3742,11 +3790,17 @@ jobs: - name: macOS os: macos-latest shell: bash + - name: macOS + os: macos-13 + shell: bash - name: Windows os: windows-latest shell: cmd node-version: - 22.x + exclude: + - platform: { name: macOS, os: macos-13, shell: bash } + node-version: 22.x runs-on: \${{ matrix.platform.os }} defaults: run: diff --git a/tap-snapshots/test/check/diff-snapshots.js.test.cjs b/tap-snapshots/test/check/diff-snapshots.js.test.cjs index a14c85c3..2913d7bd 100644 --- a/tap-snapshots/test/check/diff-snapshots.js.test.cjs +++ b/tap-snapshots/test/check/diff-snapshots.js.test.cjs @@ -175,7 +175,7 @@ The repo file ci.yml needs to be updated: .github/workflows/ci.yml ======================================== - @@ -77,4 +77,24 @@ + @@ -97,4 +97,24 @@ shell: \${{ matrix.platform.shell }} steps: - name: Checkout From 2eca24bcfbfc1fad6cfa51cd44555e9c2dfc3536 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Thu, 2 May 2024 08:09:05 -0700 Subject: [PATCH 07/11] fix: use git+https protocol for repo url (#441) --- lib/util/git.js | 2 +- package.json | 2 +- workspace/test-workspace/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/util/git.js b/lib/util/git.js index c28760db..681af788 100644 --- a/lib/util/git.js +++ b/lib/util/git.js @@ -23,7 +23,7 @@ const getRemoteUrl = async (path, remote) => { try { const urlStr = await tryGit(path, 'remote', 'get-url', remote) const { domain, user, project } = hgi.fromUrl(urlStr) - const url = new URL(`https://${domain}`) + const url = new URL(`git+https://${domain}`) url.pathname = `/${user}/${project}.git` return url.toString() } catch { diff --git a/package.json b/package.json index b20dfb4f..4f88b817 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/npm/template-oss.git" + "url": "git+https://github.com/npm/template-oss.git" }, "keywords": [ "npm", diff --git a/workspace/test-workspace/package.json b/workspace/test-workspace/package.json index 4f304a50..cd0d379d 100644 --- a/workspace/test-workspace/package.json +++ b/workspace/test-workspace/package.json @@ -20,7 +20,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/npm/template-oss.git", + "url": "git+https://github.com/npm/template-oss.git", "directory": "workspace/test-workspace" }, "keywords": [], From 0df268d62802b613ce5015d3f30f12f92591dd90 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Fri, 3 May 2024 07:10:37 -0700 Subject: [PATCH 08/11] fix: properly check for diff with multiple files from overwrite:false (#442) --- lib/check/check-apply.js | 3 +-- lib/util/files.js | 27 +++++++++++++-------------- lib/util/parser.js | 9 +++++++++ test/apply/overwrite-false.js | 21 +++++++++++++++++++++ 4 files changed, 44 insertions(+), 16 deletions(-) diff --git a/lib/check/check-apply.js b/lib/check/check-apply.js index b1cde376..749ca60f 100644 --- a/lib/check/check-apply.js +++ b/lib/check/check-apply.js @@ -12,8 +12,7 @@ const run = async (type, dir, files, options) => { const { add: addFiles, rm: rmFiles } = files const rm = await rmEach(dir, rmFiles, options, (f) => rel(f)) - const parseOpts = { allowMultipleSources: false } - const [add, update] = partition(await parseEach(dir, addFiles, options, parseOpts, async (p) => { + const [add, update] = partition(await parseEach(dir, addFiles, options, {}, async (p) => { const diff = await p.applyDiff() const target = rel(p.target) if (diff === null) { diff --git a/lib/util/files.js b/lib/util/files.js index 713c01e0..0842c6e8 100644 --- a/lib/util/files.js +++ b/lib/util/files.js @@ -31,29 +31,28 @@ const mergeFiles = mergeWithCustomizers((value, srcValue, key, target, source, s } }, customizers.overwriteArrays) -const fileEntries = (dir, files, options, { allowMultipleSources = true } = {}) => { +const fileEntries = (dir, files, options) => { const results = [] - for (const [key, source] of Object.entries(files)) { + for (const [key, value] of Object.entries(files)) { // remove any false values first since that means those targets are skipped - if (source === false) { + if (value === false) { continue } // target paths need to be joined with dir and templated const target = join(dir, template(key, options)) - if (Array.isArray(source)) { - // When turning an object of files into all its entries, we allow - // multiples when applying changes, but not when checking for changes - // since earlier files would always return as needing an update. So we - // either allow multiples and return the array or only return the last - // source file in the array. - const sources = allowMultipleSources ? source : source.slice(-1) - results.push(...sources.map(s => [target, s])) - } else { - results.push([target, source]) - } + // Allow an array of values to merge into a single source to be + // applied or diffed against the target. This is how overwrite:false + // works and they are merged. + const source = Array.isArray(value) + ? value.reduce((acc, { file, ...rest }) => { + acc.file.push(file) + return Object.assign(acc, rest) + }, { file: [] }) : value + + results.push([target, source]) } return results diff --git a/lib/util/parser.js b/lib/util/parser.js index 27f498b7..48b5f4e8 100644 --- a/lib/util/parser.js +++ b/lib/util/parser.js @@ -62,10 +62,16 @@ class Base { } read (s) { + if (Array.isArray(s)) { + return Promise.all(s.map(f => this.read(f))) + } return fs.readFile(s, { encoding: 'utf-8' }) } template (s) { + if (Array.isArray(s)) { + return Promise.all(s.map(f => this.template(f))) + } return template(s, this.options) } @@ -285,6 +291,9 @@ class Json extends Base { } parse (s) { + if (Array.isArray(s)) { + return s.map(f => this.parse(f)).reduce((a, f) => this.merge(a, f), {}) + } return jsonParse(s) } diff --git a/test/apply/overwrite-false.js b/test/apply/overwrite-false.js index ca0bedbd..260d7f7f 100644 --- a/test/apply/overwrite-false.js +++ b/test/apply/overwrite-false.js @@ -31,10 +31,31 @@ t.test('json merge', async (t) => { }) await s.apply() + t.strictSame(await s.check(), []) const pkg = await s.readJson('package.json') t.equal(pkg.scripts.test, 'tap test/') t.equal(pkg.scripts.snap, 'tap') + await s.writeJson('package.json', { + ...pkg, + author: 'What?', + scripts: { + ...pkg.scripts, + test: 'tap', + }, + templateOSS: { + ...pkg.templateOSS, + version: '1.0.0', + }, + }) + + const checks = await s.check() + t.equal(checks.length, 1) + t.match(checks[0].title, 'package.json needs to be updated') + t.match(checks[0].body[0], `"author" is "What?", expected "GitHub Inc."`) + t.match(checks[0].body[0], `scripts.test" is "tap", expected "tap test/"`) + + await s.apply() t.strictSame(await s.check(), []) }) From dff1b5b54b1393755d59169877cdb31b4466b524 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:31:07 +0000 Subject: [PATCH 09/11] deps: bump release-please from 16.3.1 to 16.10.2 Bumps [release-please](https://github.com/googleapis/release-please) from 16.3.1 to 16.10.2. - [Release notes](https://github.com/googleapis/release-please/releases) - [Changelog](https://github.com/googleapis/release-please/blob/main/CHANGELOG.md) - [Commits](https://github.com/googleapis/release-please/compare/v16.3.1...v16.10.2) --- updated-dependencies: - dependency-name: release-please dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f88b817..919e166f 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "minimatch": "^9.0.2", "npm-package-arg": "^11.0.1", "proc-log": "^4.0.0", - "release-please": "16.3.1", + "release-please": "16.10.2", "semver": "^7.3.5", "undici": "^6.7.0", "yaml": "^2.1.1" From 8b2e7382cd28c7d25dfaa320b3878443187fee88 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Thu, 2 May 2024 21:40:05 -0700 Subject: [PATCH 10/11] fix: remove custom node-workspace plugin release-please now has all the fixes we need and we can use the upstream plugin --- lib/release/node-workspace-format.js | 37 ++++++---- lib/release/node-workspace.js | 103 --------------------------- lib/release/release-please.js | 3 - 3 files changed, 25 insertions(+), 118 deletions(-) delete mode 100644 lib/release/node-workspace.js diff --git a/lib/release/node-workspace-format.js b/lib/release/node-workspace-format.js index 4eca1ea5..57135d1a 100644 --- a/lib/release/node-workspace-format.js +++ b/lib/release/node-workspace-format.js @@ -3,7 +3,7 @@ const { ManifestPlugin } = require('release-please/build/src/plugin.js') const { addPath } = require('release-please/build/src/plugins/workspace.js') const { TagName } = require('release-please/build/src/util/tag-name.js') const { ROOT_PROJECT_PATH } = require('release-please/build/src/manifest.js') -const { DEPS, link, wrapSpecs } = require('./util.js') +const { DEPS, link, wrapSpecs, list } = require('./util.js') /* istanbul ignore next: TODO fix flaky tests and enable coverage */ module.exports = class extends ManifestPlugin { @@ -11,7 +11,6 @@ module.exports = class extends ManifestPlugin { #releasesByPackage = new Map() #pathsByComponent = new Map() - #WORKSPACE_SCOPE = /(?workspace): `?(?\S+?)[@\s](?\S+?)`?$/gm async preconfigure (strategiesByPath) { // First build a list of all releases that will happen based on @@ -32,6 +31,16 @@ module.exports = class extends ManifestPlugin { return candidates } + #replaceWorkspace ({ name, versionRange }) { + const version = versionRange.replace(/^[\^~]/, '') + const { path, component } = this.#releasesByPackage.get(name) + const { tagSeparator, includeVInTag } = this.repositoryConfig[path] + const { repository: { owner, repo } } = this.github + const tag = new TagName(version, component, tagSeparator, includeVInTag).toString() + const url = `https://github.com/${owner}/${repo}/releases/tag/${tag}` + return list(`${link('workspace', url)}: ${wrapSpecs(`${name}@${version}`)}`) + } + // I don't like how release-please formats workspace changelog entries // so this rewrites them to look like the rest of our changelog. This can't // be part of the changelog plugin since they are written after that by the @@ -42,16 +51,20 @@ module.exports = class extends ManifestPlugin { for (const release of candidate.pullRequest.body.releaseData) { // Update notes with a link to each workspaces release notes // now that we have all of the releases in a single pull request - release.notes = - release.notes.replace(this.#WORKSPACE_SCOPE, (...args) => { - const { scope, name, version } = args.pop() - const { path, component } = this.#releasesByPackage.get(name) - const { tagSeparator, includeVInTag } = this.repositoryConfig[path] - const { repository: { owner, repo } } = this.github - const tag = new TagName(version, component, tagSeparator, includeVInTag).toString() - const url = `https://github.com/${owner}/${repo}/releases/tag/${tag}` - return `${link(scope, url)}: ${wrapSpecs(`${name}@${version}`)}` - }) + release.notes = release.notes + .replace(/^\* The following workspace dependencies were updated\n/gm, '') + .replace(/^\s{2}\* dependencies\n/gm, '') + .replace(/^\s{2}\* devDependencies\n/gm, '') + .replace(/^\s{2}\* peerDependencies\n/gm, '') + .replace(/^\s{2}\* optionalDependencies\n/gm, '') + .replace( + /^\s{4}\* (?[^\s]+) bumped to (?[^\s]+)/gm, + (...args) => this.#replaceWorkspace(args.at(-1)) + ) + .replace( + /^\s{4}\* (?[^\s]+) bumped from (?:[^\s]+) to (?[^\s]+)/gm, + (...args) => this.#replaceWorkspace(args.at(-1)) + ) // Find the associated changelog and update that too const path = this.#pathsByComponent.get(release.component) diff --git a/lib/release/node-workspace.js b/lib/release/node-workspace.js deleted file mode 100644 index 93ef00f6..00000000 --- a/lib/release/node-workspace.js +++ /dev/null @@ -1,103 +0,0 @@ -const { NodeWorkspace } = require('release-please/build/src/plugins/node-workspace') -const { parseConventionalCommits } = require('release-please/build/src/commit') -const { DEPS } = require('./util') -const { WORKSPACE_MESSAGE } = require('./node-workspace-format') - -// This adds a preconfigure method to the release-please node-workspace plugin -// which fixes https://github.com/googleapis/release-please/issues/2089 for our -// use case. We should attempt to upstream this to release-please but it -// fundamentally changes the way the node-workspace plugin behaves so it might -// not be easy to land. For now we extend the base plugin and add one method -// which is much better than previously when we needed to fork and maintain -// release-please ourselves. -/* istanbul ignore next: TODO fix flaky tests and enable coverage */ -class NpmNodeWorkspace extends NodeWorkspace { - updateCandidate (pr) { - // no-op so release-please node-workspace plugin does not add - // its broken changelog to the workspace releases. our changelog - // formatting and the preconfigure method below fix this. - return pr - } - - async preconfigure (strategiesByPath, commitsByPath, releasesByPath) { - // First build a list of all releases that will happen based on the - // conventional commits - const candidates = [] - for (const path in strategiesByPath) { - const pullRequest = await strategiesByPath[path].buildReleasePullRequest( - parseConventionalCommits(commitsByPath[path]), - releasesByPath[path] - ) - // Release please types say this sometimes will return undefined but I could not - // get any scenario where that was the case. If it was undefined we would want to - // just ignore it anyway. - /* istanbul ignore else */ - if (pullRequest) { - candidates.push({ - path, - pullRequest, - config: this.repositoryConfig[path], - }) - } - } - - // Then build the graph of all those releases + any other connected workspaces - const { allPackages, candidatesByPackage } = await this.buildAllPackages(candidates) - const graph = await this.buildGraph(allPackages) - const packageNamesToUpdate = this.packageNamesToUpdate(graph, candidatesByPackage) - const graphPackages = this.buildGraphOrder(graph, packageNamesToUpdate) - - // Then build a list of all the updated versions - const updatedVersions = {} - for (const pkg of graphPackages) { - const path = this.pathFromPackage(pkg) - const packageName = this.packageNameFromPackage(pkg) - const existingCandidate = candidatesByPackage[packageName] - - if (existingCandidate) { - // If there is an existing pull request use that version - updatedVersions[packageName] = existingCandidate.pullRequest?.version - } else { - // Otherwise build another pull request (that will be discarded) just - // to see what the version would be if it only contained a deps commit. - // This is to make sure we use any custom versioning or release strategy. - const releasePullRequest = await strategiesByPath[path].buildReleasePullRequest( - parseConventionalCommits([{ message: `${DEPS}: ${Math.random()}` }]), - releasesByPath[path] - ) - updatedVersions[packageName] = releasePullRequest?.version - } - } - - // Then go through all the packages again and add deps commits for each - // updated workspace - for (const pkg of graphPackages) { - const path = this.pathFromPackage(pkg) - const packageName = this.packageNameFromPackage(pkg) - const graphPackage = graph.get(packageName) - - // Update dependency versions add a deps commit to each path so it gets - // processed later. This else never happens in our cases because our - // packages always have deps, but keeping this around to make it easier to - // upstream in the future. - /* istanbul ignore else */ - if (graphPackage.deps) { - for (const depName of graphPackage.deps) { - const depVersion = updatedVersions[depName] - // Same as the above check, we always have a version here but technically - // we could not in which it would be safe to ignore it. - /* istanbul ignore else */ - if (depVersion) { - commitsByPath[path].push({ - message: WORKSPACE_MESSAGE(depName, depVersion.toString()), - }) - } - } - } - } - - return strategiesByPath - } -} - -module.exports = NpmNodeWorkspace diff --git a/lib/release/release-please.js b/lib/release/release-please.js index 42cd3bb9..96811c2b 100644 --- a/lib/release/release-please.js +++ b/lib/release/release-please.js @@ -11,7 +11,6 @@ const assert = require('assert') const core = require('@actions/core') const omit = require('just-omit') const ChangelogNotes = require('./changelog.js') -const NodeWorkspace = require('./node-workspace.js') const NodeWorkspaceFormat = require('./node-workspace-format.js') const { getPublishTag, noop } = require('./util.js') @@ -69,8 +68,6 @@ class ReleasePlease { new ChangelogNotes(github, o)) RP.registerVersioningStrategy('default', (o) => o.prerelease ? new PrereleaseVersioningStrategy(o) : new DefaultVersioningStrategy(o)) - RP.registerPlugin('node-workspace', ({ github, targetBranch, repositoryConfig, ...o }) => - new NodeWorkspace(github, targetBranch, repositoryConfig, o)) RP.registerPlugin('node-workspace-format', ({ github, targetBranch, repositoryConfig, ...o }) => new NodeWorkspaceFormat(github, targetBranch, repositoryConfig, o)) From f966bcf2037bc9224b1bc91043a3fe441137185d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 09:00:12 -0700 Subject: [PATCH 11/11] chore: release 4.22.0 (#434) :robot: I have created a release *beep* *boop* --- ## [4.22.0](https://github.com/npm/template-oss/compare/v4.21.4...v4.22.0) (2024-05-03) ### Features * [`21c9262`](https://github.com/npm/template-oss/commit/21c92624a9342d6fdbaafdf322ded5216b9188e5) [#440](https://github.com/npm/template-oss/pull/440) use macos-(latest|13) based on node version (#440) (@lukekarrys) ### Bug Fixes * [`8b2e738`](https://github.com/npm/template-oss/commit/8b2e7382cd28c7d25dfaa320b3878443187fee88) [#432](https://github.com/npm/template-oss/pull/432) remove custom node-workspace plugin (@lukekarrys) * [`0df268d`](https://github.com/npm/template-oss/commit/0df268d62802b613ce5015d3f30f12f92591dd90) [#442](https://github.com/npm/template-oss/pull/442) properly check for diff with multiple files from overwrite:false (#442) (@lukekarrys) * [`2eca24b`](https://github.com/npm/template-oss/commit/2eca24bcfbfc1fad6cfa51cd44555e9c2dfc3536) [#441](https://github.com/npm/template-oss/pull/441) use git+https protocol for repo url (#441) (@lukekarrys) * [`732dddc`](https://github.com/npm/template-oss/commit/732dddc38244f4e4a0d6e1a06da416a4d8519dac) [#439](https://github.com/npm/template-oss/pull/439) update actions workflow versions (#439) (@lukekarrys) * [`7949ec3`](https://github.com/npm/template-oss/commit/7949ec36484786abeb1c425fb0d9c378064365b5) [#438](https://github.com/npm/template-oss/pull/438) add node 22 to CI matrix (#438) (@lukekarrys) * [`6d54cbf`](https://github.com/npm/template-oss/commit/6d54cbf0016403779906d1f563d8ba249d2d9f0e) [#436](https://github.com/npm/template-oss/pull/436) get correct exit code from npm publish/view (#436) (@lukekarrys) * [`d0bf7c2`](https://github.com/npm/template-oss/commit/d0bf7c28f9b3244132243067705a524abd18b84b) [#435](https://github.com/npm/template-oss/pull/435) update license (#435) (@lukekarrys) * [`df03d8b`](https://github.com/npm/template-oss/commit/df03d8bec39e5e5245b272f1fc9c21556185a95d) [#433](https://github.com/npm/template-oss/pull/433) dont create chore only PRs (#433) (@lukekarrys) ### Dependencies * [`dff1b5b`](https://github.com/npm/template-oss/commit/dff1b5b54b1393755d59169877cdb31b4466b524) [#432](https://github.com/npm/template-oss/pull/432) bump release-please from 16.3.1 to 16.10.2 (@dependabot[bot]) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 21 +++++++++++++++++++++ package.json | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 00e4e2d1..60136e2f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.21.4" + ".": "4.22.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 883f8567..79fd0ce1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## [4.22.0](https://github.com/npm/template-oss/compare/v4.21.4...v4.22.0) (2024-05-03) + +### Features + +* [`21c9262`](https://github.com/npm/template-oss/commit/21c92624a9342d6fdbaafdf322ded5216b9188e5) [#440](https://github.com/npm/template-oss/pull/440) use macos-(latest|13) based on node version (#440) (@lukekarrys) + +### Bug Fixes + +* [`8b2e738`](https://github.com/npm/template-oss/commit/8b2e7382cd28c7d25dfaa320b3878443187fee88) [#432](https://github.com/npm/template-oss/pull/432) remove custom node-workspace plugin (@lukekarrys) +* [`0df268d`](https://github.com/npm/template-oss/commit/0df268d62802b613ce5015d3f30f12f92591dd90) [#442](https://github.com/npm/template-oss/pull/442) properly check for diff with multiple files from overwrite:false (#442) (@lukekarrys) +* [`2eca24b`](https://github.com/npm/template-oss/commit/2eca24bcfbfc1fad6cfa51cd44555e9c2dfc3536) [#441](https://github.com/npm/template-oss/pull/441) use git+https protocol for repo url (#441) (@lukekarrys) +* [`732dddc`](https://github.com/npm/template-oss/commit/732dddc38244f4e4a0d6e1a06da416a4d8519dac) [#439](https://github.com/npm/template-oss/pull/439) update actions workflow versions (#439) (@lukekarrys) +* [`7949ec3`](https://github.com/npm/template-oss/commit/7949ec36484786abeb1c425fb0d9c378064365b5) [#438](https://github.com/npm/template-oss/pull/438) add node 22 to CI matrix (#438) (@lukekarrys) +* [`6d54cbf`](https://github.com/npm/template-oss/commit/6d54cbf0016403779906d1f563d8ba249d2d9f0e) [#436](https://github.com/npm/template-oss/pull/436) get correct exit code from npm publish/view (#436) (@lukekarrys) +* [`d0bf7c2`](https://github.com/npm/template-oss/commit/d0bf7c28f9b3244132243067705a524abd18b84b) [#435](https://github.com/npm/template-oss/pull/435) update license (#435) (@lukekarrys) +* [`df03d8b`](https://github.com/npm/template-oss/commit/df03d8bec39e5e5245b272f1fc9c21556185a95d) [#433](https://github.com/npm/template-oss/pull/433) dont create chore only PRs (#433) (@lukekarrys) + +### Dependencies + +* [`dff1b5b`](https://github.com/npm/template-oss/commit/dff1b5b54b1393755d59169877cdb31b4466b524) [#432](https://github.com/npm/template-oss/pull/432) bump release-please from 16.3.1 to 16.10.2 (@dependabot[bot]) + ## [4.21.4](https://github.com/npm/template-oss/compare/v4.21.3...v4.21.4) (2024-04-15) ### Bug Fixes diff --git a/package.json b/package.json index 919e166f..ee52ed43 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/template-oss", - "version": "4.21.4", + "version": "4.22.0", "description": "templated files used in npm CLI team oss projects", "main": "lib/content/index.js", "bin": {