-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve symlinked modules correctly (#92)
Some systems (e.g. rush, pnpm) use symlinks to create a recursive dependency graph instead of relying on the hoisting aspect of the node module resolution algorithm (like npm and yarn do) in these cases, we want to resolve to the real path of a module, so that the tree structure below only ever tries to run the `x` module once (rather than once on each module that depends on it) - node_modules - a - node_modules - symlink to x - b - node_modules - symlink to x Co-authored-by: Ryan Tsao <[email protected]>
- Loading branch information
Showing
8 changed files
with
193 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- "0.8" | ||
- "0.10" | ||
- "4" | ||
- "5" | ||
- "6" | ||
- "8" | ||
- "10" | ||
- "12" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var fs = require('fs'); | ||
|
||
try { | ||
fs.mkdirSync(__dirname + '/../test/fixtures/node_modules/linker/node_modules'); | ||
} catch (e) {} | ||
process.chdir(__dirname + '/../test/fixtures/node_modules/linker/node_modules'); | ||
try { | ||
fs.unlinkSync('linked'); | ||
} catch (e) {} | ||
fs.symlinkSync('../../../linked', 'linked', 'dir'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// dummy |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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