rushstack
rushstack copied to clipboard
[rush] Design note: Subspace configuration improvements
Today @william2958 and I chatted about some remaining design questions for the Subspace config files, related to his PR https://github.com/microsoft/rushstack/pull/4715:
Here's a summary of the proposed changes:
-
The
rush init
template for.npmrc
needs a#
comment clearly explaining how the subspace.npmrc
gets merged withcommon/config/rush/.npmrc
-
The
subspaces/<name>/.pnpmfile-subspace.cjs
file (inherited from split workspaces) should get renamed to.pnpmfile.cjs
, since we forbidcomnmon/config/rush/.pnpmfile.cjs
when the feature is enabled -
common/config/rush/pnpm-config.json
should be treated as an all-or-nothing fallback in the case wheresubspaces/<name>/pnpm-config.json
is absent.@octogonz will double-check with the maintainers whether this is intuitive enough or needs some clarification (such as
subnspaces/_fallback/pnpm-config.json
orcommon/config/rush/pnpm-config-fallback.json
) -
ensureConsistentVersions
always applies within a subspace; there is no mode where it applies across all projects in the monorepo -
The
ensureConsistentVersions
setting should be moved fromrush.json
tocommon-versions.json
so it is alongsideallowedAlternativeVersions
-
--subspace
is mandatory forrush check
when the feature is enabled -
rush version
,rush install
, etc always need to invokerush check
in a loop for each subspace withensureConsistentVersions=true
(or if we are optimizing, for the subset of subspaces affected by that operation). -
rush version
should NOT support the--subspace
parameter` since its operation isn't associated with any particular subspace
@iclanton @chengcyber