-
-
Notifications
You must be signed in to change notification settings - Fork 230
[code-infra] Migrate error code extraction to code-infra #2670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@@ -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'); |
There was a problem hiding this comment.
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.
commit: |
✅ Deploy Preview for base-ui ready!
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'); |
There was a problem hiding this comment.
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}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented here #1463
There was a problem hiding this comment.
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.'); |
There was a problem hiding this comment.
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.
1516364
to
10cb971
Compare
Bundle size report
|
d936046
to
2dbc69c
Compare
604f17f
to
3e1029c
Compare
3e1029c
to
4a7124d
Compare
Also migrated
markdownlint
config to import fromcode-infra
.