Commit 483215f
committed
feat(yarn2): Enforce using the "node-modules" node linker
The Yarn 2 implementation requires that the "node-modules" node linker
[1] is used to filter out optional dependencies that were not installed.
Enforce that setting with the `YARN_NODE_LINKER` environment variable to
avoid the issue that no dependencies are found for projects that do not
set `nodeLinker=node-modules` in their `.yarnrc.yml`.
It has also been verified that the environment variable overrides any
different setting for `nodeLinker` in the `.yarnrc.yml`.
Also adapt the `.yarnrc.yml` files for all functional test projects as
they do not need to set `nodeLinker=node-modules` anymore.
[1]: https://yarnpkg.com/features/linkers
Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.com>1 parent 1bc5d1d commit 483215f
File tree
4 files changed
+10
-6
lines changed- plugins/package-managers/node/src
- funTest/assets/projects/synthetic/yarn2
- dependency-with-patch
- project-with-lockfile
- workspaces
- main/kotlin/yarn2
4 files changed
+10
-6
lines changedLines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
186 | 195 | | |
187 | 196 | | |
188 | 197 | | |
| |||
0 commit comments