-
Notifications
You must be signed in to change notification settings - Fork 643
Description
Summary
I am trying to configure subspace-specific dependency versions using the common-versions.json file located in the subspace-specific configuration directory (common/config/subspaces//common-versions.json). Despite setting preferredVersions in this subspace-specific file, the specified versions are not being respected when installing dependencies for that subspace. Instead, the dependencies use versions from either the root common-versions.json or default resolutions.
Repro steps
- Set up a Rush monorepo with at least one subspace configured
- Create a subspace-specific common-versions.json file at: common/config/subspaces//common-versions.json
- Add preferredVersions entries to this subspace-specific file (e.g.,
"react": "18.2.0"
) - Run
rush update --subspace <subspace-name>
targeting the specific subspace - Check the installed dependency versions in the subspace's node_modules
Expected result: The subspace should use the dependency versions specified in its own common/config/subspaces//common-versions.json file
Actual result: The subspace ignores its specific common-versions.json and uses either root configuration or other version resolutions. No errors are logged regarding the subspace-specific configuration file.
Details
It seems that Rush is not properly loading or applying the common-versions.json files located in subspace-specific configuration directories. The subspace isolation mechanism may not be correctly resolving the path to these subspace-specific configuration files, or there may be a missing step in the configuration aggregation process that should prioritize subspace-specific settings.
A potential fix would involve updating the configuration loading logic to check for and apply subspace-specific common-versions.json files, ensuring they take precedence over root configurations for their respective subspaces.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
Question | Answer |
---|---|
@microsoft/rush globally installed version? |
@microsoft/rush@5.157.0 |
rushVersion from rush.json? |
5.122.0 |
useWorkspaces from rush.json? |
Yes |
Operating system? | Mac |
Would you consider contributing a PR? | No |
Node.js version (node -v )? |
19.9.0 |
Metadata
Metadata
Assignees
Labels
Type
Projects
Status