npm-deprecated-check
Advanced tools
Comparing version 0.1.7 to 1.0.0
{ | ||
"name": "npm-deprecated-check", | ||
"type": "module", | ||
"version": "0.1.7", | ||
"version": "1.0.0", | ||
"description": "Check for deprecated packages", | ||
@@ -18,3 +18,5 @@ "author": "KID-joker <kid_joker@126.com>", | ||
"dependencies", | ||
"deprecated" | ||
"deprecated", | ||
"OpenAI", | ||
"ai-recommend" | ||
], | ||
@@ -29,13 +31,23 @@ "main": "dist/cli.mjs", | ||
], | ||
"preferGlobal": true, | ||
"scripts": { | ||
"lint": "eslint .", | ||
"build": "unbuild", | ||
"dev": "esno ./src/cli.ts", | ||
"build": "unbuild", | ||
"typecheck": "tsc --noEmit", | ||
"prepublishOnly": "nr build", | ||
"release": "bumpp && pnpm publish --no-git-checks" | ||
"lint": "eslint . --fix", | ||
"release": "bumpp && pnpm publish --no-git-checks", | ||
"typecheck": "tsc --noEmit" | ||
}, | ||
"dependencies": { | ||
"@pnpm/lockfile-file": "^6.0.2", | ||
"@pnpm/logger": "^5.0.0", | ||
"@yarnpkg/lockfile": "^1.1.0", | ||
"chalk": "^5.1.2", | ||
"commander": "^11.0.0", | ||
"fs-extra": "^10.1.0", | ||
"node-fetch": "^3.3.1", | ||
"ora": "^6.1.2", | ||
"semver": "^7.3.8" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^0.27.0", | ||
"@antfu/ni": "^0.18.0", | ||
"@antfu/utils": "^0.5.2", | ||
@@ -45,4 +57,2 @@ "@types/fs-extra": "^9.0.13", | ||
"@types/semver": "^7.3.13", | ||
"@types/validate-npm-package-name": "^4.0.0", | ||
"@types/yargs": "^17.0.13", | ||
"@types/yarnpkg__lockfile": "^1.1.5", | ||
@@ -54,17 +64,3 @@ "bumpp": "^8.2.1", | ||
"unbuild": "^0.8.11" | ||
}, | ||
"dependencies": { | ||
"@pnpm/lockfile-file": "^6.0.2", | ||
"@pnpm/logger": "^5.0.0", | ||
"@yarnpkg/lockfile": "^1.1.0", | ||
"chalk": "^5.1.2", | ||
"dependency-path": "^9.2.8", | ||
"execa": "^6.1.0", | ||
"fs-extra": "^10.1.0", | ||
"got": "^12.5.3", | ||
"ora": "^6.1.2", | ||
"semver": "^7.3.8", | ||
"validate-npm-package-name": "^5.0.0", | ||
"yargs": "^17.6.2" | ||
} | ||
} |
<h1 align="center">🐦 npm-deprecated-check</h1> | ||
<p align="center">Check for deprecated packages</p> | ||
## Preview | ||
<p align="center"><img src="./assets/preview.png" /></p> | ||
## Install | ||
@@ -14,3 +18,3 @@ | ||
- According to the version range of lockfile and package.json. | ||
- Do a deep inspection of the dependency tree. | ||
- Recommend alternative packages through OpenAI. | ||
@@ -20,36 +24,43 @@ ## Usage | ||
```bash | ||
ndc [args] | ||
Usage: ndc <command> [options] | ||
command: | ||
ndc current Check the packages of the current project | ||
ndc global Check global packages | ||
ndc package <packageName> Check for specified package | ||
ndc version Show version | ||
ndc * Check the packages of the current project | ||
Options: | ||
-V, --version output the version number | ||
-h, --help display help for command | ||
option: | ||
-a, --all | ||
-d, --deep | ||
-h, --help | ||
Commands: | ||
current [options] check the packages of the current project | ||
global [options] check global packages, default: npm | ||
package [options] <packageName> check for specified package | ||
config [options] inspect and modify the config | ||
help [command] display help for command | ||
``` | ||
For `current`, `global` and `package`, you can view all dependency checks deeply. | ||
For `OpenAI` config: | ||
```bash | ||
option: | ||
-a, --all show all packages info | ||
-d, --deep Deep check the dependencies of packages | ||
Options: | ||
--openaiKey <value> recommend alternative packages via ChatGPT | ||
--openaiModel <value> ChatGPT model (choices: "gpt-3.5-turbo", "gpt-4") | ||
--openaiBaseURL <value> override the default base URL for the API | ||
``` | ||
And `package`, a version range can be specified. | ||
You can also save them to global configuration: | ||
```bash | ||
option: | ||
-r, --range check the specify versions | ||
Usage: ndc config [options] | ||
inspect and modify the config | ||
Options: | ||
-g, --get <path> get value from option | ||
-s, --set <path> <value> set option value | ||
-d, --delete <path> delete option from config | ||
-l, --list list all options | ||
``` | ||
See `ndc --help` for more details. | ||
The path should be `openaiKey`, `openaiModel`, `openaiBaseURL`. | ||
## Credits | ||
`npm-deprecated-check` is inspired by [`check-is-deprecated`](https://github.com/awesome-cli/check-is-deprecated) and [`taze`](https://github.com/antfu/taze) | ||
`npm-deprecated-check` is inspired by [`check-is-deprecated`](https://github.com/awesome-cli/check-is-deprecated). |
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
18751
9
11
403
0
65
3
+ Addedcommander@^11.0.0
+ Addednode-fetch@^3.3.1
+ Addedcommander@11.1.0(transitive)
+ Addeddata-uri-to-buffer@4.0.1(transitive)
+ Addedfetch-blob@3.2.0(transitive)
+ Addedformdata-polyfill@4.0.10(transitive)
+ Addednode-domexception@1.0.0(transitive)
+ Addednode-fetch@3.3.2(transitive)
+ Addedweb-streams-polyfill@3.3.3(transitive)
- Removeddependency-path@^9.2.8
- Removedexeca@^6.1.0
- Removedgot@^12.5.3
- Removedvalidate-npm-package-name@^5.0.0
- Removedyargs@^17.6.2
- Removed@pnpm/types@8.9.0(transitive)
- Removed@sindresorhus/is@5.6.0(transitive)
- Removed@szmarczak/http-timer@5.0.1(transitive)
- Removed@types/http-cache-semantics@4.0.4(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedcacheable-lookup@7.0.0(transitive)
- Removedcacheable-request@10.2.14(transitive)
- Removedcliui@8.0.1(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removeddecompress-response@6.0.0(transitive)
- Removeddefer-to-connect@2.0.1(transitive)
- Removeddependency-path@9.2.8(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedescalade@3.2.0(transitive)
- Removedexeca@6.1.0(transitive)
- Removedform-data-encoder@2.1.4(transitive)
- Removedget-caller-file@2.0.5(transitive)
- Removedgot@12.6.1(transitive)
- Removedhttp-cache-semantics@4.1.1(transitive)
- Removedhttp2-wrapper@2.2.1(transitive)
- Removedhuman-signals@3.0.1(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedis-stream@3.0.0(transitive)
- Removedjson-buffer@3.0.1(transitive)
- Removedkeyv@4.5.4(transitive)
- Removedlowercase-keys@3.0.0(transitive)
- Removedmimic-fn@4.0.0(transitive)
- Removedmimic-response@3.1.04.0.0(transitive)
- Removednormalize-url@8.0.1(transitive)
- Removednpm-run-path@5.3.0(transitive)
- Removedonetime@6.0.0(transitive)
- Removedp-cancelable@3.0.0(transitive)
- Removedpath-key@4.0.0(transitive)
- Removedquick-lru@5.1.1(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedresolve-alpn@1.2.1(transitive)
- Removedresponselike@3.0.0(transitive)
- Removedstring-width@4.2.3(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedstrip-final-newline@3.0.0(transitive)
- Removedvalidate-npm-package-name@5.0.1(transitive)
- Removedwrap-ansi@7.0.0(transitive)
- Removedy18n@5.0.8(transitive)
- Removedyargs@17.7.2(transitive)
- Removedyargs-parser@21.1.1(transitive)