Use cwd node_modules/.bin entry first in workspace#8591
Open
sglim wants to merge 1 commit intoyarnpkg:masterfrom
Open
Use cwd node_modules/.bin entry first in workspace#8591sglim wants to merge 1 commit intoyarnpkg:masterfrom
sglim wants to merge 1 commit intoyarnpkg:masterfrom
Conversation
- If there are multiple project which has dependency for the different version of 3rd party modules, only workspace root .bin was resolved. - This change fixes this bug by changing order of bin entries when resolving binary locations which are in several different package folders - See https://github.com/sglim/yarn-workspace-bin-bug to reproduce the bug
Author
|
This PR is fix for the issue: #8590 |
This file contains hidden or 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
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.
version of 3rd party modules, only workspace root .bin was resolved.
resolving binary locations which are in several different package
folders
bug
Summary
As-is
'yarn bin myBin' always returns
node_modules/.binin workspace rootTo-Bo
'yarn bin myBin' returns
workspace-*/node_modules/.binrespectivelyTest plan
Create two project which has 'binary', my_project_with_bin/v1 with cli_v1.js, my_project_with_bin/v2 with cli_v2.js, respectively.
Also, create a workspace with two workspace projects: 'workspace-1', 'workspace-2'. 'workspace-1' depends on my_project_with_bin:v1, 'workspace-2' depends on my_project_with_bin:v2 as well.
Install them in workspace, .bin will be create in each workspace-* folder.
Check the result of output buffer report contains workspace-* folder in binary path.