Repository navigation
feat(minify): optimize Error constructors by removing 'new' keyword #22493
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
59fe054
feat(minify): optimize Error constructors by removing 'new' keyword
b5f92c9
feat(minify): convert Object/Array constructors to literals
30ebd57
test: update source map positions and file size for ReactSSR test
f3fd6ec
Merge branch 'main' into claude/minify-error-constructors
c30688d
[autofix.ci] apply automated fixes
autofix-ci[bot] 69ca5ae
fix: address CodeRabbit feedback
8170f7d
[autofix.ci] apply automated fixes
autofix-ci[bot] 852115e
refactor: extract callFromNew helper to reduce code duplication
9a381e5
Fix Array constructor optimization to preserve sparse array semantics
a0a8bbe
Fix: Don't apply minification to node_modules code at runtime
64bd06e
Fix test expectations for updated minification
b11b823
Fix
657ce27
[autofix.ci] apply automated fixes
autofix-ci[bot] a11cc56
Update inspect-error.test.js
Jarred-Sumner 91153ba
Apply suggestion from @Jarred-Sumner
Jarred-Sumner 943a112
Extend Array minification to handle object/array literals
d27a2fc
[autofix.ci] apply automated fixes
autofix-ci[bot] 84ebe74
Remove RegExp optimization to preserve identity semantics
1237cc8
Fix tests
Jarred-Sumner db6e0ed
more minification
dylan-conway 53ff1ed
[autofix.ci] apply automated fixes
autofix-ci[bot] e6f98ca
fix bug
dylan-conway ae2bf8a
revert
dylan-conway File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
💡 Verification agent
🧩 Analysis chain
Include minify_whitespace in the runtime transpiler cache key
Features.minify_whitespaceaffects emitted code but isn’t part ofhash_fields_for_runtime_transpiler. Toggling the flag may return stale cached output.Apply:
const hash_fields_for_runtime_transpiler = .{ .top_level_await, .auto_import_jsx, .allow_runtime, .inlining, .commonjs_named_exports, - .minify_syntax, - .minify_identifiers, + .minify_syntax, + .minify_identifiers, + .minify_whitespace, .dead_code_elimination, .set_breakpoint_on_first_line, .trim_unused_imports, .dont_bundle_twice, .commonjs_at_runtime, .emit_decorator_metadata, .lower_using,Run to ensure no other cache-key lists exist that also need this field:
Also applies to: 212-230
🏁 Script executed:
Length of output: 40602
Include
minify_whitespacein runtime transpiler cache keysrc/runtime.zig lines 212–230:
@@ 212 .minify_syntax, .minify_identifiers, + .minify_whitespace, .dead_code_elimination,📝 Committable suggestion
🤖 Prompt for AI Agents