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/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/package.json b/package.json index 4addec06..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": { @@ -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", 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 ------------------------------------------------------------------- `