From 6fe7663cd7ee5bbb76be672f4936302156242603 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Oct 2022 14:30:27 +0000 Subject: [PATCH 1/3] deps: bump npm-package-arg from 9.1.2 to 10.0.0 Bumps [npm-package-arg](https://github.com/npm/npm-package-arg) from 9.1.2 to 10.0.0. - [Release notes](https://github.com/npm/npm-package-arg/releases) - [Changelog](https://github.com/npm/npm-package-arg/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/npm-package-arg/compare/v9.1.2...v10.0.0) --- updated-dependencies: - dependency-name: npm-package-arg dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4addec06..191a29d6 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "just-deep-map-values": "^1.1.1", "just-diff": "^5.0.1", "lodash": "^4.17.21", - "npm-package-arg": "^9.0.1", + "npm-package-arg": "^10.0.0", "proc-log": "^3.0.0", "release-please": "npm:@npmcli/release-please@^14.2.6", "semver": "^7.3.5", From a722962521b049f45c690d861fe5fccafa91321a Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 18 Oct 2022 09:55:27 -0700 Subject: [PATCH 2/3] fix: account for new npm-package-arg behavior --- lib/check/check-required.js | 2 +- lib/util/has-package.js | 4 ---- tap-snapshots/test/check/snapshots.js.test.cjs | 10 +++++----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/check/check-required.js b/lib/check/check-required.js index c7c114b4..cb0485bf 100644 --- a/lib/check/check-required.js +++ b/lib/check/check-required.js @@ -36,7 +36,7 @@ const run = ({ pkg, path, config: { requiredPackages = {} } }) => { return { title: `The following required ${location} were not found:`, - body: specs.map((s) => s.rawSpec ? `${s.name}@${s.rawSpec}` : s.name), + body: specs.map((s) => s.rawSpec === '*' ? s.name : `${s.name}@${s.rawSpec}`), // solution is to remove any existing all at once but add back in by --save- solution: [ rmCommand(specs), diff --git a/lib/util/has-package.js b/lib/util/has-package.js index 00794924..bffddfad 100644 --- a/lib/util/has-package.js +++ b/lib/util/has-package.js @@ -20,10 +20,6 @@ const getSpecVersion = (spec, where) => { switch (arg.type) { case 'range': return new semver.Range(arg.fetchSpec) - case 'tag': { - // special case an empty spec to mean any version - return arg.rawSpec === '' && new semver.Range('*') - } case 'version': return new semver.SemVer(arg.fetchSpec) case 'directory': { diff --git a/tap-snapshots/test/check/snapshots.js.test.cjs b/tap-snapshots/test/check/snapshots.js.test.cjs index af8da9ee..e9d4657e 100644 --- a/tap-snapshots/test/check/snapshots.js.test.cjs +++ b/tap-snapshots/test/check/snapshots.js.test.cjs @@ -103,7 +103,7 @@ The following required devDependencies were not found: @npmcli/eslint-config tap -To correct it: npm rm @npmcli/template-oss @npmcli/eslint-config tap && npm i @npmcli/eslint-config@latest tap@latest --save-dev && npm i @npmcli/template-oss@{{VERSION}} --save-dev --save-exact +To correct it: npm rm @npmcli/template-oss @npmcli/eslint-config tap && npm i @npmcli/eslint-config@* tap@* --save-dev && npm i @npmcli/template-oss@{{VERSION}} --save-dev --save-exact ------------------------------------------------------------------- ` @@ -250,7 +250,7 @@ The following required devDependencies were not found: @npmcli/eslint-config tap -To correct it: npm rm @npmcli/template-oss @npmcli/eslint-config tap && npm i @npmcli/eslint-config@latest tap@latest --save-dev && npm i @npmcli/template-oss@{{VERSION}} --save-dev --save-exact +To correct it: npm rm @npmcli/template-oss @npmcli/eslint-config tap && npm i @npmcli/eslint-config@* tap@* --save-dev && npm i @npmcli/template-oss@{{VERSION}} --save-dev --save-exact ------------------------------------------------------------------- ` @@ -357,7 +357,7 @@ The following required devDependencies were not found: @npmcli/eslint-config tap -To correct it: npm rm @npmcli/template-oss @npmcli/eslint-config tap && npm i @npmcli/eslint-config@latest tap@latest --save-dev && npm i @npmcli/template-oss@{{VERSION}} --save-dev --save-exact +To correct it: npm rm @npmcli/template-oss @npmcli/eslint-config tap && npm i @npmcli/eslint-config@* tap@* --save-dev && npm i @npmcli/template-oss@{{VERSION}} --save-dev --save-exact ------------------------------------------------------------------- @@ -427,7 +427,7 @@ The following required devDependencies were not found: @npmcli/eslint-config tap -To correct it: npm rm @npmcli/template-oss @npmcli/eslint-config tap && npm i @npmcli/eslint-config@latest tap@latest --save-dev && npm i @npmcli/template-oss@{{VERSION}} --save-dev --save-exact +To correct it: npm rm @npmcli/template-oss @npmcli/eslint-config tap && npm i @npmcli/eslint-config@* tap@* --save-dev && npm i @npmcli/template-oss@{{VERSION}} --save-dev --save-exact ------------------------------------------------------------------- @@ -497,7 +497,7 @@ The following required devDependencies were not found: @npmcli/eslint-config tap -To correct it: npm rm @npmcli/template-oss @npmcli/eslint-config tap && npm i @npmcli/eslint-config@latest tap@latest --save-dev && npm i @npmcli/template-oss@{{VERSION}} --save-dev --save-exact +To correct it: npm rm @npmcli/template-oss @npmcli/eslint-config tap && npm i @npmcli/eslint-config@* tap@* --save-dev && npm i @npmcli/template-oss@{{VERSION}} --save-dev --save-exact ------------------------------------------------------------------- ` From c7a0604b8ee47b0bc1ae07de9415134475cadab7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 18 Oct 2022 17:23:09 +0000 Subject: [PATCH 3/3] chore: release 4.6.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ package.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f58e9bb8..38625df7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.6.1" + ".": "4.6.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 32982fbc..95aba194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [4.6.2](https://github.com/npm/template-oss/compare/v4.6.1...v4.6.2) (2022-10-18) + +### Bug Fixes + +* [`a722962`](https://github.com/npm/template-oss/commit/a722962521b049f45c690d861fe5fccafa91321a) [#244](https://github.com/npm/template-oss/pull/244) account for new npm-package-arg behavior (@wraithgar) + +### Dependencies + +* [`6fe7663`](https://github.com/npm/template-oss/commit/6fe7663cd7ee5bbb76be672f4936302156242603) bump npm-package-arg from 9.1.2 to 10.0.0 + ## [4.6.1](https://github.com/npm/template-oss/compare/v4.6.0...v4.6.1) (2022-10-17) ### Bug Fixes diff --git a/package.json b/package.json index 191a29d6..20fb8a0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/template-oss", - "version": "4.6.1", + "version": "4.6.2", "description": "templated files used in npm CLI team oss projects", "main": "lib/content/index.js", "bin": {