Skip to content

[code-infra] Remove redundant prebuild cleanup - #5977

Open
bernardobelchior wants to merge 1 commit into
mui:masterfrom
bernardobelchior:bernardobelchior/remove-prebuild-cleanup
Open

bernardobelchior wants to merge 1 commit into
mui:masterfrom
bernardobelchior:bernardobelchior/remove-prebuild-cleanup

Conversation

@bernardobelchior

@bernardobelchior bernardobelchior commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Removes the cleanup in the prebuild scripts of @base-ui/utils and @base-ui/react.

Changes

  • @base-ui/utils: removed prebuild. Nothing it deleted needs deleting:
    • build/: code-infra build already deletes it before building (cmdBuild.mjs#L276; buildDir is publishConfig.directory). The line is still there in the version we use (0.1.1-canary.6).
    • *.tsbuildinfo: the build doesn't write any. code-infra emits declarations with --composite false --incremental false, into a temp dir. The only ones in the package folder come from tsc -b (pnpm typescript). The build never reads them, and .npmignore already excludes them.
    • build-tests/: only the output of tsconfig.test.json type-checking. The build never reads it, so a stale one is harmless.
  • @base-ui/react: prebuild is now just node ./scripts/stagePublishedDocs.mjs. The same reasoning applies to build/, build-tests/, build-typecheck/ (output of tsconfig.typecheck.json) and *.tsbuildinfo. published-docs/ is the exception: stagePublishedDocs.mjs now deletes it before the BASE_UI_PUBLISH_DOCS early exit. Otherwise a stale published-docs/ would be copied into the package through --copy "published-docs/**:docs" when the env var is unset.

Verification (Node 24.19.0)

  • utils and react: ran pnpm build on master and saved find build -type f | sort | xargs shasum. Then, on this branch, added a stale build/stale.js, build-tests/, build-typecheck/ (react) and stale.tsbuildinfo, and built again. The build passes, build/stale.js is gone and the checksums match master.
  • Same checksum match when build/ holds tsc -b output before the build. pnpm typescript still passes after a build wipes build/ and leaves tsconfig.build.tsbuildinfo behind.
  • react: with a stale published-docs/foo.md and BASE_UI_PUBLISH_DOCS unset, published-docs/ is removed and build/docs/ doesn't exist.
  • react: after pnpm docs:generate-llms, built with BASE_UI_PUBLISH_DOCS=1 and a stale published-docs/foo.md. 80 files were staged, build/docs/ matches docs/public/**/*.md byte for byte, and foo.md is not included.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@pkg-pr-new

pkg-pr-new Bot commented Oct 12, 2026

Copy link
Copy Markdown

commit: df9524e

@bernardobelchior bernardobelchior added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Oct 12, 2026
@bernardobelchior
bernardobelchior marked this pull request as ready for review October 12, 2026 12:52
Copilot AI balanced review requested due to automatic review settings October 12, 2026 12:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@code-infra-dashboard

code-infra-dashboard Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 472.46 ms -1.66 ms(-0.3%) | Renders: 76 (+0) | Paint: 860.68 ms -12.73 ms(-1.5%)

Test Duration Renders
Menu mount (300 instances) 28.25 ms 🔺+4.85 ms(+20.7%) 1 (+0)

14 tests within noise — details


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

@netlify

netlify Bot commented Oct 12, 2026

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit df9524e
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6accd7a849471d8a4fce03e2
😎 Deploy Preview https://deploy-preview-5977--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

No deployments
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.

2 participants