This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/shrinkwrap.js b/lib/shrinkwrap.js | |
index cff9f096..0a19ef93 100644 | |
--- a/lib/shrinkwrap.js | |
+++ b/lib/shrinkwrap.js | |
@@ -714,6 +714,7 @@ class Shrinkwrap { | |
resolved, | |
integrity, | |
hasShrinkwrap, | |
+ version, | |
} = this.get(node.path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -rf packages package-lock.json node_modules | |
cat >package.json <<PJ | |
{ | |
"devDependencies": { | |
"abbrev": "1.1.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TAP version 13 | |
# Subtest: create all fixtures | |
ok 1 - manual/sync created | |
ok 2 - manual/async created | |
ok 3 - windows/sync created | |
ok 4 - windows/async created | |
ok 5 - posix/sync created | |
ok 6 - posix/async created | |
ok 7 - native/sync created | |
ok 8 - native/async created |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { | |
rmSync, | |
promises: { | |
rm, | |
}, | |
} = require('fs') | |
const rimrafNative = (path, opts) => rm(path, { | |
...opts, | |
force: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docs/content/commands/npm-ls.md b/docs/content/commands/npm-ls.md | |
index fb752742d..3c6621763 100644 | |
--- a/docs/content/commands/npm-ls.md | |
+++ b/docs/content/commands/npm-ls.md | |
@@ -199,6 +199,16 @@ brand new workspace within the project. | |
This value is not exported to the environment for child processes. | |
+#### `workspaces` | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/utils/explain-dep.js b/lib/utils/explain-dep.js | |
index 765839231..944b4be62 100644 | |
--- a/lib/utils/explain-dep.js | |
+++ b/lib/utils/explain-dep.js | |
@@ -108,7 +108,7 @@ const explainDependents = ({ name, dependents }, depth, color) => { | |
const explainEdge = ({ name, type, bundled, from, spec }, depth, color) => { | |
const { bold } = color ? chalk : nocolor | |
const dep = type === 'workspace' | |
- ? bold(relative('.', spec.slice('file:'.length))) | |
+ ? bold(relative(from.location, spec.slice('file:'.length))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/utils/explain-dep.js b/lib/utils/explain-dep.js | |
index c01bc780b..7cb726296 100644 | |
--- a/lib/utils/explain-dep.js | |
+++ b/lib/utils/explain-dep.js | |
@@ -7,19 +7,24 @@ const nocolor = { | |
cyan: s => s, | |
magenta: s => s, | |
blue: s => s, | |
+ green: s => s, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/node.js b/lib/node.js | |
index 1bb84140..d17e4b2a 100644 | |
--- a/lib/node.js | |
+++ b/lib/node.js | |
@@ -400,6 +400,10 @@ class Node { | |
for (const edge of edges) | |
why.dependents.push(edge.explain(seen)) | |
} | |
+ | |
+ if (this.linksIn.size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docs/content/commands/npm-exec.md b/docs/content/commands/npm-exec.md | |
index 2364da32c..f728ac6e0 100644 | |
--- a/docs/content/commands/npm-exec.md | |
+++ b/docs/content/commands/npm-exec.md | |
@@ -260,18 +260,21 @@ an error. | |
#### workspace | |
-* Alias: `-w` | |
-* Type: Array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// package.json in the project root | |
{ | |
"name": "my-workspace-project", | |
"version": "1.2.3", | |
"workspaces": { | |
"packages": [ | |
// four packages in the folder | |
// w: should share peer and intra-project deps with other workspaces | |
// x: has peerDependency on react-native, should be isolated | |
// y: depends on z, but at a different version, by design |