-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support configuring link mode across plugins #4990
Merged
arcanis
merged 14 commits into
yarnpkg:master
from
jeff-wishnie:feat(folderLinkMode)/support-configuring-link-mode-accross-plugins
Nov 1, 2022
Merged
feat: support configuring link mode across plugins #4990
arcanis
merged 14 commits into
yarnpkg:master
from
jeff-wishnie:feat(folderLinkMode)/support-configuring-link-mode-accross-plugins
Nov 1, 2022
Conversation
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
Remove stay console.log Changes to be committed: modified: packages/acceptance-tests/pkg-tests-specs/sources/features/pnpm.test.ts modified: packages/plugin-nm/sources/NodeModulesLinker.ts modified: packages/plugin-pnp/sources/index.ts
We'll try to review when we get the chance, no need to rush. |
Understood. More asking about the process! |
The PR looks good to me, I'm not sure about |
arcanis
requested changes
Oct 31, 2022
…erLinkMode)/support-configuring-link-mode-accross-plugins
larixer
reviewed
Oct 31, 2022
larixer
previously approved these changes
Nov 1, 2022
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's the problem this PR addresses?
When creating package and workspace links in
node_modules
folders theplugin-nm
andplugin-pnpm
node-linkers use symbolic-links on *nix platforms and Windows Junctions on Windows.Because Junctions are always absolute paths, this creates potential inconsistencies in behavior across platforms--with realtive-path symlinks created on *nix and absolute-path Junctions on Windows.
This is particularly problematic when mounting local folders into Docker containers as volumes and abolsute-path links will be broken inside the container.
PR #4981 added a configuration setting to use symlinks on WIndows (which may be relative-path) in with
nodeLinker: node-modules
, supporting container-compatible consistent behavior across *nix and Windows.This PR, per @merceyz 's request adds the same option for
plugin-pnpm
and refactors the setting intoplugin-pnp
...
How did you fix it?
Generalized the setting
nmFolderLinkMode
by:nodeLinkerFolderLinkMode
plugin-nm
toplugin-pnp
QUESTION Is this the correct place to place the setting? It is now used by both
plugin-nm
andplugin-pnpm
so it should not be in one or the other of those plugins. I placed it inplugin-pnp
because it is related (subservient) tonodeLinker
, which is inplugin-pnp
Updated
plugin-nm
to use the renamed settingUpdated
plugin-pnpm
to respect the settingThe PR also generalizes a couple helpers out of the integration tests of the feature from
plugin-nm
so that they can also be used in integration tests ofplugin-pnpm
...
Checklist