diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2021-06-07 22:24:33 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-06-11 23:52:41 +0300 |
commit | e5abf2a2171d95bafc0993f337230d2b6633a6ed (patch) | |
tree | 94a719a44f8336ea92c6beeffdbe8955ede9881e /scripts/bundle-and-gitignore-deps.js | |
parent | 40829ec40c33a6d23f18715e60e3395bdcb0467e (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/bundle-and-gitignore-deps.js')
-rw-r--r-- | scripts/bundle-and-gitignore-deps.js | 5 |
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)) { |