Conversation
Contributor
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Contributor
Monitor Oxc
|
CodSpeed Performance ReportMerging #8434 will not alter performanceComparing Summary
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
[0.45.0] - 2025-01-11
7f69561 ast: [BREAKING]
oxc_astdo not exportBigUint(refactor(ast)!:oxc_astdo not exportBigUint#8428) (overlookmotel)d8b27af ast: [BREAKING] No unneccesary trailing underscores on
AstBuildermethod names (refactor(ast)!: no unneccesary trailing underscores onAstBuildermethod names #8283) (overlookmotel)5106088 ast: [BREAKING] Remove
FromIn<Expression> for Statement(refactor(ast)!: removeFromIn<Expression> for Statement#8280) (overlookmotel)Features
IntoIteratorfor&mut Vec(feat(allocator): implementIntoIteratorfor&mut Vec#8389) (overlookmotel)rawfield ofNumericLiteralandStringLiteralinContentEq(feat(ast_tools): ignorerawfield ofNumericLiteralandStringLiteralinContentEq#8417) (Boshen)\nis inside template literals (feat(codegen): print real newline when\nis inside template literals #8178) (Boshen)CompressOptions::target(feat(minfier): addCompressOptions::target#8179) (Boshen)0fromnew Int8Array(0)and other TypedArrays (feat(minifier): drop0fromnew Int8Array(0)and other TypedArrays #8431) (sapphi-red)newfrom NativeErrors /AggregateError(feat(minifier): removenewfrom NativeErrors /AggregateError#8430) (sapphi-red)!(x === undefined)->x !== undefined(feat(minifier): minimize not!(x === undefined)->x !== undefined#8429) (Boshen)if(false){}in a single pass (feat(minifier): removeif(false){}in a single pass #8421) (Boshen)ambiguous if else(feat(minifier): foldambiguous if else#8415) (Boshen)a != null ? a : b->a ?? b(feat(minifier):a != null ? a : b->a ?? b#8352) (camc314)x = x || 1tox ||= 1(feat(minifier): compressx = x || 1tox ||= 1#8368) (sapphi-red)a.b = a.b + ctoa.b += c(feat(minifier): compressa.b = a.b + ctoa.b += c#8367) (sapphi-red)a.b || (a.b = c)toa.b ||= c(feat(minifier): compressa.b || (a.b = c)toa.b ||= c#8366) (sapphi-red)new Array(2)->[,,](feat(minifier): compressnew Array(2)->[,,]#8344) (sapphi-red)new Array(7n)->[7n](feat(minifier): compressnew Array(7n)->[7n]#8343) (sapphi-red)({ ...null })->({})(feat(minifier): fold object spread({ ...null })->({})#8339) (Boshen)if (test) {}->test(feat(minifier): remove empty if statmentif (test) {}->test#8336) (Boshen)!0 + null !== 1->!0 + null != 1(feat(minifier): minimize!0 + null !== 1->!0 + null != 1#8332) (Boshen)a || (a = b)toa ||= b(feat(minifier): compressa || (a = b)toa ||= b#8315) (sapphi-red)a = a + btoa += b(feat(minifier): compressa = a + btoa += b#8314) (sapphi-red)newfromnew Error/new Function/new RegExp(feat(minifier): removenewfromnew Error/new Function/new RegExp#8313) (sapphi-red)x["0"]-> x[0] (feat(minifier): minimizex["0"]-> x[0] #8316) (Boshen)do{}while(true)->do;while(true)(feat(minifier): minimizedo{}while(true)->do;while(true)#8311) (Boshen)(x = 1) === 1->(x = 1) == 1(feat(minifier): minimize(x = 1) === 1->(x = 1) == 1#8310) (Boshen)trystatement (feat(minifier): minimize emptytrystatement #8309) (Boshen).toString()(feat(minifier): fold.toString()#8308) (Boshen)if(x >> y == 0){}->if(!(x >> y)){}(feat(minifier): foldif(x >> y == 0){}->if(!(x >> y)){}#8277) (Boshen)String()->'',Number()->false(feat(minifier): foldString()->'',Number()->false#8274) (Boshen){[1]: _}-> {1: _} (feat(minifier): compress property key{[1]: _}-> {1: _} #8272) (Boshen)BigInt(1n)->1n(feat(minifier): foldBigInt(1n)->1n#8270) (Boshen)Number(feat(minifier): minify call expressionstoNumber#8267) (camc314){}evals tof64::NaN(Boshen)String.fromCharCode(feat(minifier): constant foldString.fromCharCode#8248) (Boshen)~undefined,~null,~true,~false(feat(minifier): minimize~undefined,~null,~true,~false#8247) (Boshen)'x'.toString()andtrue.toString()(feat(minifier): constant fold'x'.toString()andtrue.toString()#8246) (Boshen)Numberconstructor (feat(minifier): minimizeNumberconstructor #8245) (Boshen)!!!foo ? bar : baz->foo ? baz : bar(feat(minifier): minsize!!!foo ? bar : baz->foo ? baz : bar#8244) (Boshen)1==x=>x==1(feat(minifier): always put literals on the rhs of equal op1==x=>x==1#8240) (Boshen)returnstatement (feat(minifier): remove last redundantreturnstatement #8234) (Boshen)foo ? foo : barandfoo ? bar : foo(feat(minifier): minimizefoo ? foo : barandfoo ? bar : foo#8229) (Boshen)typeof x == 'undefined'(feat(minifier): minimize all variants oftypeof x == 'undefined'#8227) (Boshen)if(x)return;y->if(!x)y(feat(minifier): foldif(x)return;y->if(!x)y#8226) (Boshen)ConvertToDottedProperties(feat(minifier): addConvertToDottedProperties#8212) (Boshen)RemoveUnusedCode(feat(minifier): addRemoveUnusedCode#8210) (Boshen)MinimizeExitPointsand ExploitAssigns` boilerplate (feat(minifier): addMinimizeExitPointsand ExploitAssigns` boilerplate #8203) (Boshen)StatementFusion(feat(minifier): improveStatementFusion#8194) (Boshen)NaNtof64::NAN(feat(minifier): changeNaNtof64::NAN#8191) (Boshen)foo?.['bar']tofoo?.bar(feat(minifier): changefoo?.['bar']tofoo?.bar#8176) (翠 / green)string.length/array.length(feat(minifier): foldstring.length/array.length#8172) (sapphi-red)foo['bar']-> foo.bar (feat(minifier): changefoo['bar']-> foo.bar #8169) (Boshen)typeof foo == undefinedintofoo == undefinedwhen possible (feat(minifier): foldtypeof foo == undefinedintofoo == undefinedwhen possible #8160) (翠 / green)typeof foo != "undefined"intotypeof foo < "u"(feat(minifier): foldtypeof foo != "undefined"intotypeof foo < "u"#8159) (翠 / green)Infinityintof64::Infinity(feat(minifier): normalizeInfinityintof64::Infinity#8148) (Boshen)PropertyKey(feat(minifier): minify stringPropertyKey#8147) (Boshen)instanceof(feat(minifier): constant foldinstanceof#8142) (翠 / green)a + 'b' + 'c'->a + 'bc'(feat(minifier): minimizea + 'b' + 'c'->a + 'bc'#8137) (Boshen)if (x) if (y) z->if (x && y) z(feat(minifier): minimizeif (x) if (y) z->if (x && y) z#8136) (Boshen)if(foo) bar else baz->foo ? bar : baz(feat(minifier): minimizeif(foo) bar else baz->foo ? bar : baz#8133) (Boshen)if (x) return; return 1->return x ? void 0 : 1(feat(minifier): minimizeif (x) return; return 1->return x ? void 0 : 1#8130) (Boshen)if(!x) foo()->x || foo()(feat(minifier): minimizeif(!x) foo()->x || foo()#8122) (Boshen)if(foo) bar->foo && bar(feat(minifier): minimizeif(foo) bar->foo && bar#8121) (Boshen)Normalizeast pass (feat(minifier): addNormalizeast pass #8120) (Boshen)varinto for loop initializer (feat(minifier): collapsevarinto for loop initializer #8119) (Boshen)typeof foo === 'number'=>typeof foo == 'number'(feat(minifier):typeof foo === 'number'=>typeof foo == 'number'#8112) (Boshen)a instanceof b == true(feat(mininifier): minimize variants ofa instanceof b == true#8241) (Boshen)Bug Fixes
IntoIteratorforVec(fix(allocator): fix lifetimes onIntoIteratorforVec#8388) (overlookmotel)ContentEqandContentHashimpls for literal types (fix(ast): fixContentEqandContentHashimpls for literal types #8426) (overlookmotel)return 1noutput (fix(codegen): fix incorrect minifiedreturn 1noutput #8374) (Boshen)search_original_line_and_column(fix(codegen): source map builder panicked because it attempted to subtract with overflow insearch_original_line_and_column#8185) (Dunqing)to_int_32value for Infinity (fix(ecmascript): incorrectto_int_32value for Infinity #8144) (翠 / green)Sourceis notClone(fix(lexer):Sourceis notClone#8294) (overlookmotel)top_level: true(fix(mangler): keep exported symbols fortop_level: true#7927) (翠 / green)self.changedwhen minimizing if stmts (fix(minifier): correctly setself.changedwhen minimizing if stmts #8420) (camc314)!!xis not idempotent inRemoveDeadCode(fix(minifier):!!xis not idempotent inRemoveDeadCode#8419) (Boshen)Object.definePropertyin sequence expressions (fix(minifier): do not minifyObject.definePropertyin sequence expressions #8416) (Boshen)+0nproducesTypeError(fix(minifier):+0nproducesTypeError#8410) (Boshen)a in bhas error throwing side effect (fix(minifier):a in bhas error throwing side effect #8406) (Boshen)#constructor(fix(minifier): cannot transform property key#constructor#8405) (Boshen)instanceofhas error throwing side effect (fix(minifier):instanceofhas error throwing side effect #8378) (Boshen)prototypecannot be changed (fix(minifier): computed property keyprototypecannot be changed #8373) (Boshen)undefinedin return statement (fix(minifier): do not remove shadownedundefinedin return statement #8371) (Boshen)-0 != +0(fix(minifier): do not fold literals in-0 != +0#8278) (Boshen)is_in_boolean_context(fix(minifier): handle arrow fn expressions correctly inis_in_boolean_context#8260) (camc314)peephole_minimize_conditions(fix(minifier): fix panic inpeephole_minimize_conditions#8242) (Boshen)(x ? true : y)(fix(minifier): fix incorrect return value for(x ? true : y)#8233) (Boshen)Expression::AssignmentExpression(fix(minifier): remove incorrect foldExpression::AssignmentExpression#8211) (Boshen)0 instanceof F(fix(minifier): do not constant fold0 instanceof F#8199) (Boshen)PropertyKey(fix(minifier): minify stringPropertyKey#8177) (sapphi-red)constandenum(fix(parser): allow line breaks betweenconstandenum#8193) (branchseer)super()in nested class (fix(transformer/arrow-functions): outersuper()in nested class #8382) (Dunqing)super_methodson aStackto fix nested async methods (fix(transformer/arrow-functions): storesuper_methodson aStackto fix nested async methods #8331) (Dunqing)_this = thisshould be inserted after super call expression (fix(transformer/arrow-functions):_this = thisshould be inserted after super call expression #8024) (Dunqing)varin hoist scope (fix(transformer/private-methods): create brand bindingvarin hoist scope #8361) (overlookmotel)import =whenonly_remove_type_importsis true (fix(transformer/typescript): remove type-onlyimport =whenonly_remove_type_importsis true #8275) (Dunqing)Referenceforrequire(fix(transformer/typescript): createReferenceforrequire#8355) (overlookmotel)ReferenceforInfinity(fix(transformer/typescript): createReferenceforInfinity#8354) (overlookmotel)only_remove_type_imports(fix(transformer/typescript): should strip import specifiers type withonly_remove_type_imports#8141) (underfin)Performance
NonEmptyStackinstead ofStack(perf(transformer/arrow-functions): useNonEmptyStackinstead ofStack#8318) (overlookmotel)Documentation
Refactor
AstBuilderenum builder methods usealloc_*methods (refactor(ast):AstBuilderenum builder methods usealloc_*methods #8281) (overlookmotel)get_identifier_referenceofTSTypeandTSTypeName(refactor(ast): simplifyget_identifier_referenceofTSTypeandTSTypeName#8273) (Dunqing)NonNullshim (refactor(data_structures): removeNonNullshim #8423) (overlookmotel)usestatement (refactor(ecmascript): remove unnecessaryusestatement #8284) (overlookmotel)SourcePosition(refactor(lexer): tighten safety of lexer by always including lifetime onSourcePosition#8293) (overlookmotel)handle_bytea method ofLexer(refactor(lexer): makehandle_bytea method ofLexer#8291) (overlookmotel)#[allow]with#[expect](refactor(lexer): replace#[allow]with#[expect]#8289) (overlookmotel)??transform (refactor(minifier): remove the buggy??transform #8411) (Boshen)!in_fixed_loophappen last (refactor(minifier): change ast passes order,!in_fixed_loophappen last #8380) (Boshen)minimize_exit_pointsimplementation (refactor(minifier): remove the buggyminimize_exit_pointsimplementation #8349) (Boshen)peephole_substitute_alternate_syntax(refactor(minifier): clean uppeephole_substitute_alternate_syntax#8327) (Boshen)peephole_replace_known_methods(refactor(minifier): clean uppeephole_replace_known_methods#8306) (Boshen)ReplaceKnownMethods(Boshen)peephole_fold_constants(Boshen)peephole_substitute_alternate_syntaxa little bit (Boshen)try_optimize_block(refactor(minifier): clean uptry_optimize_block#8139) (Boshen)peephole_substitute_alternate_syntax.rs(refactor(minifier): clean uppeephole_substitute_alternate_syntax.rs#8111) (Boshen)AstBuildercall (refactor(transformer/arrow-functions): shortenAstBuildercall #8317) (overlookmotel)TraverseCtxto function notAstBuilder(refactor(transformer/async-to-generator): passTraverseCtxto function notAstBuilder#8279) (overlookmotel)replace_class_name_with_temp_varin class_properties (refactor(transformer/class-properties): sharereplace_class_name_with_temp_varin class_properties #8105) (Dunqing)*_if_supermethods instatic_block_and_prop_init(refactor(transformer/class-properties): remove all*_if_supermethods instatic_block_and_prop_init#8104) (Dunqing)superstosuper_converter(refactor(transformer/class-properties): movesuperstosuper_converter#8103) (Dunqing)Styling
Testing
Tokenin 32-bit WASM (test(lexer): assert size ofTokenin 32-bit WASM #8292) (overlookmotel)