Skip to content

Conversation

brijeshb42
Copy link
Contributor

Also migrated markdownlint config to import from code-infra.

@brijeshb42 brijeshb42 requested a review from a team September 5, 2025 13:30
@brijeshb42 brijeshb42 added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Sep 5, 2025
@@ -125,7 +125,7 @@ export const createSelector = ((
} else if (a) {
selector = a;
} else {
throw new Error('Missing arguments');
throw /* minify-error-disabled */ new Error('Missing arguments');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't really save that much.

Copy link

pkg-pr-new bot commented Sep 5, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@2670
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@2670

commit: 4a7124d

Copy link

netlify bot commented Sep 5, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 4a7124d
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/68bef3ad733aa9000859de6f
😎 Deploy Preview https://deploy-preview-2670--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@@ -206,7 +206,7 @@ export const createSelectorMemoized: CreateSelectorFunction = (...selectors: any
case 2: return fn(state, a1, a2);
case 3: return fn(state, a1, a2, a3);
default:
throw new Error('unreachable');
throw /* minify-error-disabled */ new Error('unreachable');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same.

* ...
*/
export default function formatErrorMessage(code: number, ...args: string[]): string {
const url = new URL(`https://base-ui.com/production-error/${code}`);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Implemented here #1463

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can be this or https://base-ui.com/production-error?code=${code}

if (process.env.NODE_ENV !== 'production') {
throw new Error('Base UI: Cannot call an event handler while rendering.');
}
throw new Error('Base UI: Cannot call an event handler while rendering.');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

NODE_ENV check not needed now with extraction enabled.

@mui-bot
Copy link

mui-bot commented Sep 5, 2025

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react ▼-5.38KB(-1.55%) ▼-947B(-0.86%)

Details of bundle changes

@brijeshb42 brijeshb42 force-pushed the error-code-extraction branch 5 times, most recently from d936046 to 2dbc69c Compare September 5, 2025 14:54
@oliviertassinari oliviertassinari changed the title [infra] Migrate error code extraction to code-infra [code-infra] Migrate error code extraction to code-infra Sep 6, 2025
@brijeshb42 brijeshb42 force-pushed the error-code-extraction branch 3 times, most recently from 604f17f to 3e1029c Compare September 8, 2025 11:17
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 8, 2025
@brijeshb42 brijeshb42 force-pushed the error-code-extraction branch from 3e1029c to 4a7124d Compare September 8, 2025 15:18
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged. and removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance PR: out-of-date The pull request has merge conflicts and can't be merged. 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