-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(install): Make sure target node_modules exists when symlinking (#…
- Loading branch information
1 parent
51f5f57
commit 292344a
Showing
6 changed files
with
67 additions
and
2 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
15 changes: 15 additions & 0 deletions
15
tests/specs/install/workspace_node_modules_not_exists/__test__.jsonc
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,15 @@ | ||
// Regression test for https://github.com/denoland/deno/issues/25493 | ||
// | ||
// `deno install` where we need to create a `node_modules` for a workspace member | ||
// due to conflicting package versions, but when we go to set it up, the | ||
// symlink target path (`package2/node_modules/chalk`) has `node_modules` as its parent, | ||
// and it doesn't exist yet | ||
{ | ||
"tempDir": true, | ||
"steps": [ | ||
{ | ||
"args": "install", | ||
"output": "install.out" | ||
} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/specs/install/workspace_node_modules_not_exists/deno.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,7 @@ | ||
{ | ||
"nodeModulesDir": "auto", | ||
"workspace": [ | ||
"./package1", | ||
"./package2" | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
tests/specs/install/workspace_node_modules_not_exists/install.out
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,22 @@ | ||
[UNORDERED_START] | ||
Download http://localhost:4260/chalk | ||
Download http://localhost:4260/ansi-styles | ||
Download http://localhost:4260/supports-color | ||
Download http://localhost:4260/color-convert | ||
Download http://localhost:4260/has-flag | ||
Download http://localhost:4260/color-name | ||
Download http://localhost:4260/chalk/chalk-4.1.2.tgz | ||
Download http://localhost:4260/chalk/chalk-5.0.1.tgz | ||
Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz | ||
Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz | ||
Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz | ||
Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz | ||
Download http://localhost:4260/color-name/color-name-1.1.4.tgz | ||
Initialize supports-color@7.2.0 | ||
Initialize chalk@4.1.2 | ||
Initialize ansi-styles@4.3.0 | ||
Initialize color-name@1.1.4 | ||
Initialize color-convert@2.0.1 | ||
Initialize has-flag@4.0.0 | ||
Initialize chalk@5.0.1 | ||
[UNORDERED_END] |
5 changes: 5 additions & 0 deletions
5
tests/specs/install/workspace_node_modules_not_exists/package1/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,5 @@ | ||
{ | ||
"dependencies": { | ||
"chalk": "4.1.2" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
tests/specs/install/workspace_node_modules_not_exists/package2/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,5 @@ | ||
{ | ||
"dependencies": { | ||
"chalk": "5.0.1" | ||
} | ||
} |