Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2020-08-04 21:47:36 +0300
committerisaacs <i@izs.me>2020-08-04 21:47:36 +0300
commit938369bf0f25810bd0769b588a37f9564f06401e (patch)
tree6353c997d35b7dd22ec24737da07527c8e9c2519 /scripts
parent731df81640e08b2fe5387ee8c7f87b91c7089f60 (diff)
script to check that all bundled deps are actually used
Diffstat (limited to 'scripts')
-rw-r--r--scripts/check-deps.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/check-deps.js b/scripts/check-deps.js
new file mode 100644
index 000000000..f4fd3bf52
--- /dev/null
+++ b/scripts/check-deps.js
@@ -0,0 +1,9 @@
+const { bundleDependencies } = require('./package.json')
+const { spawnSync } = require('child_process')
+for (const dep of bundleDependencies) {
+ const lib = spawnSync('git', ['grep', dep, 'lib'])
+ const bin = spawnSync('git', ['grep', dep, 'bin'])
+ if (!lib.stdout.length && !bin.stdout.length) {
+ console.log(dep)
+ }
+}