You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@testing-library/dom is a package in test-library subspace. I expect @testing-library/dom-npm can be downloaded from npm instead of directly creating a local symbol link.
pnpm directly links to a package named @testing-library/dom in another sub-space.
I also tried adding @testing-library/dom-npm to decoupledLocalDependencies, but got the same result.
The rush pnpmfile script will resolve npm aliases. As long as there is a dependency with the same name in the workspace, it will directly change to link:.
I think that the original specifier should be maintained and should not be changed to link: When this dependency is added to decoupledLocalDependencies.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
Question
Answer
@microsoft/rush globally installed version?
5.153.1
rushVersion from rush.json?
5.153.1
useWorkspaces from rush.json?
Yes
Operating system?
Mac
Would you consider contributing a PR?
Yes
Node.js version (node -v)?
20.16.0
The text was updated successfully, but these errors were encountered:
Summary
Rush treats npm alias as link when subspace is enabled.
Repro steps
This repository can reproduce this issue:https://github.com/fzxen/rushstack_reproduce
My project has two subspaces, one is default subspace, and the other is named test-library.
There is a package existing under the default space, which uses npm alias to declare its dependencies.
@testing-library/dom is a package in test-library subspace. I expect @testing-library/dom-npm can be downloaded from npm instead of directly creating a local symbol link.
Expected result:
pnpm will download @testing-library/dom from npm.
Actual result:
pnpm directly links to a package named @testing-library/dom in another sub-space.
I also tried adding
@testing-library/dom-npm
to decoupledLocalDependencies, but got the same result.Details
I located the code causing this problem.
rushstack/libraries/rush-lib/src/logic/pnpm/SubspaceGlobalPnpmfileShim.ts
Lines 127 to 148 in 66196ff
The
rush
pnpmfile script will resolve npm aliases. As long as there is a dependency with the same name in the workspace, it will directly change tolink:
.I think that the original specifier should be maintained and should not be changed to
link:
When this dependency is added todecoupledLocalDependencies
.Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?The text was updated successfully, but these errors were encountered: