You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// local `file:` deps (non-workspace fsChildren) should be treated as local dependencies, not external, so they get symlinked directly instead of being extracted into the store.
// A file: dep surfaces as a Link edge whose resolved spec starts with file:; detect it from the edge so the target is treated as local even when it is absent from idealTree.fsChildren (a workspace consumer, or a target outside the repo root via npm link).
t.notOk(fs.readdirSync(storePath).some(e=>e.startsWith('local-dep@')),'local-dep is NOT in the store')
1935
+
}
1936
+
1937
+
// The package should be requireable from inside the workspace
1938
+
t.ok(setupRequire(path.join(dir,'packages','ws-a'))('local-dep'),'local-dep can be required from the workspace')
1939
+
})
1940
+
1941
+
tap.test('workspace file: dependency on a package outside the repo root with linked strategy',asynct=>{
1942
+
// Regression test for the out-of-repo variant of https://github.com/npm/cli/issues/9589 (the real `npm --workspace link <external>` case, https://github.com/npm/cli/issues/9115).
1943
+
// A workspace file: dep whose target resolves OUTSIDE the repo root was silently skipped.
1944
+
// The target is not in idealTree.fsChildren, so the fix must detect it from the file: link edge.
0 commit comments