Skip to content

[code-infra] Write version overrides to pnpm-workspace.yaml#1549

Merged
Janpot merged 9 commits into
masterfrom
worktree-set-version-overrides-pnpm-workspace
Jun 16, 2026
Merged

[code-infra] Write version overrides to pnpm-workspace.yaml#1549
Janpot merged 9 commits into
masterfrom
worktree-set-version-overrides-pnpm-workspace

Conversation

@Janpot

@Janpot Janpot commented Jun 16, 2026

Copy link
Copy Markdown
Member

set-version-overrides wrote overrides into package.json resolutions. Under pnpm 11, an existing pnpm-workspace.yaml overrides: block drops resolutions wholesale, so pins were silently ignored and CI legacy-browser jobs stopped matching their Playwright image.

Now writes to pnpm-workspace.yaml overrides: (preserving comments/anchors via the yaml doc API), rejects a resolutions field, and writes where overrides already live. Override-computation logic unchanged.

@oliviertassinari
oliviertassinari temporarily deployed to worktree-set-version-overrides-pnpm-workspace - code-infra-dashboard PR #1549 June 16, 2026 10:44 — with Render Destroyed
@code-infra-dashboard

code-infra-dashboard Bot commented Jun 16, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-1549--mui-internal.netlify.app/

Bundle size

Total Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%)
Files: 64 total (0 added, 0 removed, 0 changed)

Show details for 64 more bundles

@mui/internal-docs-infra/abstractCreateDemoparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateDemoClientparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateStreamparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/abstractCreateTypesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/ChunkProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/cliparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeControllerContextparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeExternalsContextparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighterparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighter/errorsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeHighlighter/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CodeProviderparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CoordinatedLazyparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/CoordinatedLazy/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createDemoDataparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createDemoData/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createSitemapparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/createSitemap/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCodeparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCodeWindowparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCoordinatedparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useCopierparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useDemoparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useErrorsparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useLocalStorageStateparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/usePreferenceparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useScrollAnchorparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useSearchparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useSearch/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useStreamparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useStream/typesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useTypeparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useTypesparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/useUrlHashStateparsed: 0B(0.00%) gzip: 0B(0.00%)
@mui/internal-docs-infra/withDocsInfraparsed: 0B(0.00%) gzip: 0B(0.00%)
addLineGuttersparsed: 0B(0.00%) gzip: 0B(0.00%)
chunkparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeHighlighterChunkparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeHighlighterClientparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeInitialSourceLoaderparsed: 0B(0.00%) gzip: 0B(0.00%)
CodeSourceLoaderparsed: 0B(0.00%) gzip: 0B(0.00%)
createFrameparsed: 0B(0.00%) gzip: 0B(0.00%)
createParseSourceWorkerClientparsed: 0B(0.00%) gzip: 0B(0.00%)
EditingEngineparsed: 0B(0.00%) gzip: 0B(0.00%)
embedTransformsparsed: 0B(0.00%) gzip: 0B(0.00%)
enhanceCodeEmphasisparsed: 0B(0.00%) gzip: 0B(0.00%)
findExpandingRangesparsed: 0B(0.00%) gzip: 0B(0.00%)
getHastTextContentparsed: 0B(0.00%) gzip: 0B(0.00%)
grammarLoadersparsed: 0B(0.00%) gzip: 0B(0.00%)
grammarsparsed: 0B(0.00%) gzip: 0B(0.00%)
isFrameSpanparsed: 0B(0.00%) gzip: 0B(0.00%)
loadIsomorphicCodeVariantparsed: 0B(0.00%) gzip: 0B(0.00%)
parseSourceparsed: 0B(0.00%) gzip: 0B(0.00%)
source.cssparsed: 0B(0.00%) gzip: 0B(0.00%)
source.jsparsed: 0B(0.00%) gzip: 0B(0.00%)
source.jsonparsed: 0B(0.00%) gzip: 0B(0.00%)
source.mdxparsed: 0B(0.00%) gzip: 0B(0.00%)
source.shellparsed: 0B(0.00%) gzip: 0B(0.00%)
source.tsparsed: 0B(0.00%) gzip: 0B(0.00%)
source.tsxparsed: 0B(0.00%) gzip: 0B(0.00%)
source.yamlparsed: 0B(0.00%) gzip: 0B(0.00%)
text.html.basicparsed: 0B(0.00%) gzip: 0B(0.00%)
text.mdparsed: 0B(0.00%) gzip: 0B(0.00%)
TransformEngineparsed: 0B(0.00%) gzip: 0B(0.00%)

Details of bundle changes

Performance

Total duration: 19.97 ms +1.84 ms(+10.1%) | Renders: 5 (+0)

No significant changes — details


Check out the code infra dashboard for more information about this PR.

set-version-overrides wrote computed overrides into the root package.json
resolutions field. Under pnpm 11 a pnpm-workspace.yaml overrides: block
(which consumer repos already use) replaces the resolutions wholesale, so
the requested pin was silently dropped and CI legacy-browser jobs no longer
matched their Playwright image.

Write the overrides into pnpm-workspace.yaml overrides: instead, preserving
comments/anchors via the yaml document API. Reject a resolutions field
outright and write where overrides already live, defaulting to the workspace
file.
@Janpot
Janpot force-pushed the worktree-set-version-overrides-pnpm-workspace branch from dc0d8fc to fbb0643 Compare June 16, 2026 12:05
@oliviertassinari
oliviertassinari temporarily deployed to worktree-set-version-overrides-pnpm-workspace - mui-tools-public PR #1549 June 16, 2026 12:05 — with Render Destroyed
Janpot added 7 commits June 16, 2026 15:08
Extract the manifest read/decide/write from the handler into
writeOverridesToWorkspace and cover it with temp-dir fixtures, mirroring
the build tool's disk-based tests (makeTempDir): preserving an existing
pnpm-workspace.yaml, creating one when absent, writing to package.json
pnpm.overrides, and rejecting resolutions without writing anything.
Merge the pure decision helper and its IO wrapper into a single function,
parallelize the two independent manifest reads, and test the one layer
through disk fixtures.
Drop the local readPackageJson and writeFile-for-package.json helpers in
favor of the shared utils from pnpm.mjs.
It's a generic workspace-manifest helper, not command-specific glue, and
pnpm.mjs already owns readPackageJson/writePackageJson. Tests move alongside
it into pnpm.test.mjs.
@Janpot
Janpot requested a review from a team June 16, 2026 13:44
@Janpot Janpot added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Jun 16, 2026
@Janpot
Janpot marked this pull request as ready for review June 16, 2026 13:46

@brijeshb42 brijeshb42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 minor comment

Comment thread packages/code-infra/src/utils/pnpm.mjs Outdated
Comment on lines +409 to +410
const rootPackageJson = await readPackageJson(workspaceDir);
const yamlSource = await yamlPromise;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const rootPackageJson = await readPackageJson(workspaceDir);
const yamlSource = await yamlPromise;
const [rootPackageJson, yamlSource] = await Promise.all([readPackageJson(workspaceDir), yamlPromise]);

@Janpot
Janpot merged commit e08081f into master Jun 16, 2026
15 checks passed
@Janpot
Janpot deleted the worktree-set-version-overrides-pnpm-workspace branch June 16, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants