Use cwd node_modules/.bin entry first in workspace #8591
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/.bin
in workspace rootTo-Bo
'yarn bin myBin' returns
workspace-*/node_modules/.bin
respectivelyTest 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.