Commit 24b9619
committed
[v2][bugfix] Patching shebangs of the bundled dependencies
Some npm dependencies are bundled, meaning their node_modules
directory is contained as part of their parent tgz distribution.
Like a regular package, a bundled package can contain some executable scripts.
That being said, these exec scripts won't be listed in the `bin`
section of their parent's package-lock.json file. This is to be
expected, those are transitive dependencies, they're not meant to be
listed there.
When patching a package through a source_override, we look whether or
not a node_modules directory is present. If it's there, it means we
potentially have some unpatched shebangs in these transitive
dependencies. We recurse in them using "patchShebangs".1 parent 991dba3 commit 24b9619
File tree
5 files changed
+939
-0
lines changed- tests/tests-v2
- examples-projects/bundled-dep-require-patch-shebang
5 files changed
+939
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
176 | 180 | | |
177 | 181 | | |
178 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments