forked from yarnpkg/yarn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(linker): Fix yarn removing linked deps during link stage (yarnpkg…
…#4757) **Summary** Actual fix: changed fs.readlink to fs.realpath when checking if a symlink is a linked dependency in package-linker.js This fixes yarn removing linked deps when installing or updating. Fixes yarnpkg#3288, fixes yarnpkg#4770, fixes yarnpkg#4635, fixes yarnpkg#4603. Potential fix for yarnpkg#3202. **Test plan** See yarnpkg#3288 (comment) for repro steps. See yarnpkg#3288 (comment) for my explanation of the problem. With a real world test scenario this works, but I'm unable to have it break from a unit test. I added a test in the integration suite but with the bug added back in it still passes because both generated paths are identical. I would like some help with the unit test.
- Loading branch information
1 parent
35687eb
commit c6d4534
Showing
12 changed files
with
106 additions
and
68 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
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
1 change: 0 additions & 1 deletion
1
__tests__/fixtures/install/install-dont-overwrite-linked-scoped/.npmrc
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
__tests__/fixtures/install/install-dont-overwrite-linked-scoped/dir-to-link/package.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-576 Bytes
...tall-dont-overwrite-linked-scoped/mirror-for-offline/@fakescope-fake-dependency-1.0.1.tgz
Binary file not shown.
5 changes: 0 additions & 5 deletions
5
__tests__/fixtures/install/install-dont-overwrite-linked-scoped/package.json
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
__tests__/fixtures/install/install-dont-overwrite-linked-scoped/yarn.lock
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
__tests__/fixtures/install/install-dont-overwrite-linked/package.json
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,8 @@ | ||
{ | ||
"dependencies": { | ||
"left-pad": "1.1.3" | ||
}, | ||
"devDependencies": { | ||
"is-buffer": "^1.1.5" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
__tests__/fixtures/link/package-with-name-scoped/package.json
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,3 @@ | ||
{ | ||
"name": "@fakescope/a-package" | ||
} |
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