-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(builtin): fix npm_install & yarn_install post_install_patches whe…
…n symlink_node_modules is enabled
- Loading branch information
1 parent
fcf24c2
commit de90747
Showing
15 changed files
with
222 additions
and
42 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
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,9 @@ | ||
load("//:index.bzl", "nodejs_test") | ||
|
||
nodejs_test( | ||
name = "test", | ||
data = [ | ||
"@internal_npm_install_test_patches_npm_symlinked//semver", | ||
], | ||
entry_point = "test.js", | ||
) |
11 changes: 11 additions & 0 deletions
11
internal/npm_install/test/patches_npm_symlinked/package-lock.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"semver": "1.0.0" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
internal/npm_install/test/patches_npm_symlinked/semver+1.0.0.patch
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 @@ | ||
--- internal/npm_install/test/patches_npm_symlinked/node_modules/semver/semver.js | ||
+++ internal/npm_install/test/patches_npm_symlinked/node_modules/semver/semver.js | ||
@@ -34,6 +34,7 @@ exports.valid = valid | ||
exports.validPackage = validPackage | ||
exports.validRange = validRange | ||
exports.maxSatisfying = maxSatisfying | ||
+exports.patched = true | ||
|
||
function clean (ver) { | ||
v = exports.parse(ver) |
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 @@ | ||
const semver = require('semver') | ||
if (!semver.patched) { | ||
console.error('Expected semver to be patched'); | ||
process.exitCode = 1; | ||
} |
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,9 @@ | ||
load("//:index.bzl", "nodejs_test") | ||
|
||
nodejs_test( | ||
name = "test", | ||
data = [ | ||
"@internal_npm_install_test_patches_yarn_symlinked//semver", | ||
], | ||
entry_point = "test.js", | ||
) |
5 changes: 5 additions & 0 deletions
5
internal/npm_install/test/patches_yarn_symlinked/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": { | ||
"semver": "1.0.0" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
internal/npm_install/test/patches_yarn_symlinked/semver+1.0.0.patch
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 @@ | ||
--- internal/npm_install/test/patches_yarn_symlinked/node_modules/semver/semver.js | ||
+++ internal/npm_install/test/patches_yarn_symlinked/node_modules/semver/semver.js | ||
@@ -34,6 +34,7 @@ exports.valid = valid | ||
exports.validPackage = validPackage | ||
exports.validRange = validRange | ||
exports.maxSatisfying = maxSatisfying | ||
+exports.patched = true | ||
|
||
function clean (ver) { | ||
v = exports.parse(ver) |
Oops, something went wrong.