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:
authorRuy Adorno <ruyadorno@hotmail.com>2021-06-07 22:24:33 +0300
committerGar <gar+gh@danger.computer>2021-06-11 23:52:41 +0300
commite5abf2a2171d95bafc0993f337230d2b6633a6ed (patch)
tree94a719a44f8336ea92c6beeffdbe8955ede9881e /scripts
parent40829ec40c33a6d23f18715e60e3395bdcb0467e (diff)
chore(libnpmdiff): added as workspace
- Setup ./packages/* as workspaces - Moved source from: https://github.com/npm/libnpmdiff to ./packages/libnpmdiff - Added CI target for workspaces Relates to: https://github.com/npm/statusboard/issues/362 PR-URL: https://github.com/npm/cli/pull/3386 Credit: @ruyadorno Close: #3386 Reviewed-by: @wraithgar
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bundle-and-gitignore-deps.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/bundle-and-gitignore-deps.js b/scripts/bundle-and-gitignore-deps.js
index 84a3ab3ad..407b9e598 100644
--- a/scripts/bundle-and-gitignore-deps.js
+++ b/scripts/bundle-and-gitignore-deps.js
@@ -10,7 +10,10 @@ const shouldIgnore = []
arb.loadVirtual().then(tree => {
for (const node of tree.children.values()) {
- if (node.dev || node.isLink) {
+ const has = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key)
+ const nonProdWorkspace =
+ node.isWorkspace && !(has(tree.package.dependencies, node.name))
+ if (node.dev || nonProdWorkspace) {
console.error('ignore', node.name)
shouldIgnore.push(node.name)
} else if (tree.edgesOut.has(node.name)) {