-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not support mixing pnpm.patchedDependencies and npm_translate…
- Loading branch information
1 parent
f83467b
commit bfb2293
Showing
7 changed files
with
26 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
const meaningOfLife = require('meaning-of-life') | ||
|
||
// meaning-of-life should have been patched twice: | ||
// | ||
// First, by the `pnpm.patchedDependencies` patch: | ||
// Verify meaning-of-life was patched with | ||
// examples/npm_deps/patches/meaning-of-life@1.0.0-pnpm.patch | ||
// 42 => "forty two" | ||
// | ||
// Then by the the following patch in the `patches` attr: | ||
// examples/npm_deps/patches/meaning-of-life@1.0.0-after_pnpm.patch | ||
// "forty two" => 32 | ||
|
||
if (meaningOfLife === 42) { | ||
throw new Error('Patches were not applied!') | ||
} else if (meaningOfLife === 'forty two') { | ||
throw new Error('Only `pnpm.patchedDependencies` patch was applied!') | ||
} else if (meaningOfLife !== 32) { | ||
throw new Error('Patch in `patches` was not applied!') | ||
} | ||
|
||
if (meaningOfLife !== 'forty two') { | ||
throw new Error('`pnpm.patchedDependencies` was not applied!') | ||
} |
7 changes: 0 additions & 7 deletions
7
examples/npm_deps/patches/meaning-of-life@1.0.0-after_pnpm.patch
This file was deleted.
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
examples/npm_deps/patches/meaning-of-life@1.0.0-after_pnpm.patch | ||
examples/npm_deps/patches/meaning-of-life@1.0.0-pnpm.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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.