@favware/npm-deprecate
Advanced tools
Comparing version 1.0.8-next.296bb25.0 to 1.0.8-next.297b5dd
@@ -16,3 +16,3 @@ #!/usr/bin/env node | ||
.version(packageJson.version) | ||
.option('-n, --name <nameGlob>', 'A glob pattern that will determine which packages are deprecated. Anything that passes [Micromatch](https://www.npmjs.com/package/micromatch) will work here. For example set `*dev*` to match `13.2.0-dev.123a`.') | ||
.option('-n, --name <nameGlob>', 'A glob pattern that will determine which packages are deprecated. Anything that passes [picomatch](https://www.npmjs.com/package/picomatch) or [micromatch](https://www.npmjs.com/package/micromatch) will work here. For example set `*dev*` to match `13.2.0-dev.123a`.') | ||
.option('-d, --deprecate-dist-tag [deprecateDistTag]', 'Whether the version that is in the current dist tags should be preserved or not. By default dist tags are preserved. When set to `true`, dist tags are pruned.') | ||
@@ -19,0 +19,0 @@ .option('-m, --message [message]', 'A custom message to show for all the deprecated versions.') |
@@ -5,3 +5,3 @@ import { NodeAuthToken, NpmBaseUrl } from '#lib/constants'; | ||
import { isNullish } from '@sapphire/utilities'; | ||
import micromatch from 'micromatch'; | ||
import picomatch from 'picomatch'; | ||
import npa from 'npm-package-arg'; | ||
@@ -46,2 +46,3 @@ import npmFetch from 'npm-registry-fetch'; | ||
let amountVersionsChanged = 0; | ||
const isVersionMatch = picomatch(options.name, { nocase: true }); | ||
for (const pkg of registryJsonFiles) { | ||
@@ -57,3 +58,3 @@ const distTags = Object.values(pkg['dist-tags']); | ||
continue; | ||
if (!micromatch.isMatch(version.version, options.name, { nocase: true })) | ||
if (!isVersionMatch(version.version)) | ||
continue; | ||
@@ -60,0 +61,0 @@ logVerboseInfo([`Deprecating version ${version.name}@${version.version}`], options.verbose); |
{ | ||
"name": "@favware/npm-deprecate", | ||
"version": "1.0.8-next.296bb25.0", | ||
"version": "1.0.8-next.297b5dd", | ||
"description": "Programmatically deprecate your NPM published packages", | ||
@@ -35,36 +35,36 @@ "author": "@favware", | ||
"dependencies": { | ||
"@sapphire/fetch": "^3.0.0", | ||
"@sapphire/utilities": "^3.14.0", | ||
"@sapphire/fetch": "^3.0.3", | ||
"@sapphire/utilities": "^3.17.0", | ||
"colorette": "^2.0.20", | ||
"commander": "^11.1.0", | ||
"commander": "^12.1.0", | ||
"js-yaml": "^4.1.0", | ||
"micromatch": "^4.0.5", | ||
"npm-package-arg": "^11.0.1", | ||
"npm-registry-fetch": "^16.1.0" | ||
"npm-package-arg": "^12.0.0", | ||
"npm-registry-fetch": "^18.0.2", | ||
"picomatch": "^4.0.2" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^18.4.3", | ||
"@commitlint/config-conventional": "^18.4.3", | ||
"@favware/cliff-jumper": "^2.2.3", | ||
"@sapphire/eslint-config": "^5.0.3", | ||
"@commitlint/cli": "^19.5.0", | ||
"@commitlint/config-conventional": "^19.5.0", | ||
"@favware/cliff-jumper": "^4.1.0", | ||
"@sapphire/eslint-config": "^5.0.5", | ||
"@sapphire/prettier-config": "^2.0.0", | ||
"@sapphire/ts-config": "^5.0.0", | ||
"@sapphire/ts-config": "^5.0.1", | ||
"@types/js-yaml": "^4.0.9", | ||
"@types/micromatch": "^4.0.6", | ||
"@types/node": "^20.10.4", | ||
"@types/node-fetch": "^2.6.9", | ||
"@types/node": "^20.16.13", | ||
"@types/node-fetch": "^2.6.11", | ||
"@types/npm-package-arg": "^6.1.4", | ||
"@types/npm-registry-fetch": "^8.0.7", | ||
"@typescript-eslint/eslint-plugin": "^6.14.0", | ||
"@typescript-eslint/parser": "^6.14.0", | ||
"@types/picomatch": "^3.0.1", | ||
"@typescript-eslint/eslint-plugin": "^7.18.0", | ||
"@typescript-eslint/parser": "^7.18.0", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"eslint": "^8.56.0", | ||
"eslint": "^8.57.1", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"lint-staged": "^15.2.0", | ||
"prettier": "^3.1.1", | ||
"typescript": "^5.3.3" | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"lint-staged": "^15.2.10", | ||
"prettier": "^3.3.3", | ||
"typescript": "^5.6.3" | ||
}, | ||
"resolutions": { | ||
"acorn": "^8.11.2", | ||
"acorn": "^8.12.1", | ||
"ansi-regex": "^5.0.1", | ||
@@ -104,3 +104,3 @@ "minimist": "^1.2.8" | ||
}, | ||
"packageManager": "yarn@4.0.2" | ||
"packageManager": "yarn@4.5.0" | ||
} |
30760
337
+ Addedpicomatch@^4.0.2
+ Added@isaacs/fs-minipass@4.0.1(transitive)
+ Added@npmcli/agent@3.0.0(transitive)
+ Added@npmcli/fs@4.0.0(transitive)
+ Added@npmcli/redact@3.1.1(transitive)
+ Addedcacache@19.0.1(transitive)
+ Addedchownr@3.0.0(transitive)
+ Addedcommander@12.1.0(transitive)
+ Addedhosted-git-info@8.0.2(transitive)
+ Addedmake-fetch-happen@14.0.3(transitive)
+ Addedminipass-fetch@4.0.0(transitive)
+ Addedminizlib@3.0.1(transitive)
+ Addedmkdirp@3.0.1(transitive)
+ Addednegotiator@1.0.0(transitive)
+ Addednpm-package-arg@12.0.2(transitive)
+ Addednpm-registry-fetch@18.0.2(transitive)
+ Addedp-map@7.0.3(transitive)
+ Addedpicomatch@4.0.2(transitive)
+ Addedproc-log@5.0.0(transitive)
+ Addedrimraf@5.0.10(transitive)
+ Addedssri@12.0.0(transitive)
+ Addedtar@7.4.3(transitive)
+ Addedunique-filename@4.0.0(transitive)
+ Addedunique-slug@5.0.0(transitive)
+ Addedvalidate-npm-package-name@6.0.0(transitive)
+ Addedyallist@5.0.0(transitive)
- Removedmicromatch@^4.0.5
- Removed@npmcli/agent@2.2.2(transitive)
- Removed@npmcli/fs@3.1.1(transitive)
- Removed@npmcli/redact@1.1.0(transitive)
- Removedaggregate-error@3.1.0(transitive)
- Removedbraces@3.0.3(transitive)
- Removedcacache@18.0.4(transitive)
- Removedchownr@2.0.0(transitive)
- Removedclean-stack@2.2.0(transitive)
- Removedcommander@11.1.0(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedfs-minipass@2.1.0(transitive)
- Removedhosted-git-info@7.0.2(transitive)
- Removedindent-string@4.0.0(transitive)
- Removedis-lambda@1.0.1(transitive)
- Removedis-number@7.0.0(transitive)
- Removedmake-fetch-happen@13.0.1(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedminipass@5.0.0(transitive)
- Removedminipass-fetch@3.0.5(transitive)
- Removedminipass-json-stream@1.0.2(transitive)
- Removedminizlib@2.1.2(transitive)
- Removedmkdirp@1.0.4(transitive)
- Removednegotiator@0.6.4(transitive)
- Removednpm-package-arg@11.0.3(transitive)
- Removednpm-registry-fetch@16.2.1(transitive)
- Removedp-map@4.0.0(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedproc-log@4.2.0(transitive)
- Removedssri@10.0.6(transitive)
- Removedtar@6.2.1(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedunique-filename@3.0.0(transitive)
- Removedunique-slug@4.0.0(transitive)
- Removedvalidate-npm-package-name@5.0.1(transitive)
Updated@sapphire/fetch@^3.0.3
Updated@sapphire/utilities@^3.17.0
Updatedcommander@^12.1.0
Updatednpm-package-arg@^12.0.0
Updatednpm-registry-fetch@^18.0.2