## [0.35.0] - 2024-11-04 -f543a8dast: [**BREAKING**] Remove `AstBuilder::*_from_*` methods (#7073) (overlookmotel) -b8daab3transformer: [**BREAKING**] API to `TryFrom<&EnvOptions> for TransformOptions` and `TryFrom<&BabelOptions> TransformOptions` (#7020) (Boshen) -9a6a2f9semantic: [**BREAKING**] Remove `SymbolTable::get_symbol_id_from_span` API (#6955) (Boshen) ### Features -854870east: Label AST fields with #[ts] (#6987) (ottomated) -ce5b609ast: Remove explicit untagged marker on enums (#6915) (ottomated) -9725e3cast_tools: Add #[estree(always_flatten)] to Span (#6935) (ottomated) -fbc297east_tools: Move tsify custom types to estree attribute macro (#6934) (ottomated) -169fa22ast_tools: Default enums to rename_all = "camelCase" (#6933) (ottomated) -caa4b1fcodegen: Improve printing of comments (#7108) (Boshen) -001058acodegen: Always print legal comments on its own line (#7089) (Boshen) -413973dcodegen: Print linked and external legal comment (#7059) (Boshen) -ee27b92codegen: Print eof legal comments (#7058) (Boshen) -6516f9ecodegen: Print inline legal comments (#7054) (Boshen) -1e2f012linter: Add `oxc/no-map-spread` (#6751) (DonIsaac) -6d97af4rust: Use `oxc-miette` (#6938) (Boshen) -bfdbcf1transformer: Add `EnvOptions::from_browerslist_query` API (#7098) (Boshen) -21b8e49transformer: Add `ESTarget` (#7091) (Boshen) -fcaba4atransformer: Add `TransformerOptions::env` with `EnvOptions` (#7037) (Boshen) -1d906c6transformer: Class properties transform skeleton (#7038) (overlookmotel) -934cb5etransformer: Add `async_generator_functions` plugin (#6573) (Dunqing) ### Bug Fixes -0601271ast: Fix `StaticMemberExpression.get_first_object` (#6969) (tomoya yanagibashi) -da199c7ecmascript: Allow getting PropName for object methods (#6967) (camchenry) -f5a7134linter/no-unused-vars: False positive for discarded reads within sequences (#6907) (DonIsaac) -9ed9501module_lexer: Add missing `export * from 'foo';` case (#7103) (Boshen) -d15e408napi/transform: Fix 'typescript.declaration' option not working (#7012) (Boshen) -dcdb9eanapi/transform: Fix test (Boshen) -caaf00eparser: Fix incorrect parsed `TSIndexSignature` (#7016) (Boshen) -b188b4atransformer: Fix typescript globals being recognized as globals (#7100) (Boshen) -a2244fftransformer/async-to-generator: Output is incorrect when arrow function without params (#7052) (Dunqing) -7d12669types: Move @oxc-project/types to dependencies (#6909) (ottomated) ### Performance -6ca01b9ast: Reduce size of `Comment` (#6921) (overlookmotel) -c58ec89data_structures: Optimize `NonEmptyStack::pop` (#7021) (overlookmotel) -fa9a4ecparser: Check `.` before `[` in `parse_member_expression_rest` (#6979) (Boshen) ### Refactor -b0211a1ast: `StaticMemberExpression::get_first_object` use loop instead of recursion (#7065) (overlookmotel) -fc07458ast: Move custom types `.d.ts` file (#6931) (overlookmotel) -c41c013ast: Rename lifetime (#6922) (overlookmotel) -335eb38ast_tools: Faster formatting Rust code (#6972) (overlookmotel) -4cf0085ast_tools: Reorder imports in generated code (#6926) (overlookmotel) -dd79c1bcodegen: Replace `daachorse` with string match for annotation comment (#7064) (Boshen) -0bb1aa4codegen: Move options to its own file (#7053) (Boshen) -b021147data_structures: Make all methods of `NonNull` shim `#[inline(always)]` (#7024) (overlookmotel) -fb1710adata_structures: Add `#[repr(transparent)]` to `NonNull` shim (#7023) (overlookmotel) -f1fc8dbdata_structures: Add `read` method to `NonNull` shim (#7022) (overlookmotel) -cea0e6bisolated_declarations: Do not use `AstBuilder::*_from_*` methods (#7071) (overlookmotel) -97caae1minifier: Do not use `AstBuilder::*_from_*` methods (#7072) (overlookmotel) -2c7ac29minifier: Remove `Tri`, use `Option<bool>` instead (#6912) (Boshen) -9926990napi: Move custom types to bottom of file (#6930) (overlookmotel) -23157bdnapi: Types file in root of types package (#6929) (overlookmotel) -953b051parser: Remove `oxc_ecmascript` crate (#7109) (Boshen) -fdd480dparser: Do not use `AstBuilder::*_from_*` methods (#7068) (overlookmotel) -9e85b10parser: Add `ParserImpl::alloc` method (#7063) (overlookmotel) -17a938eparser: Use function `parse_type_member_semicolon` (#7018) (Boshen) -aa1b29cparser: Remove `parse_ts_index_signature_member` function (#7017) (Boshen) -7f1d1fetransform: Deserialize `BabelPreests::env` directly (#7051) (Boshen) -76947e2transform: Refactor Babel Targets (#7026) (Boshen) -d03e622transformer: Do not use `AstBuilder::*_from_*` methods (#7070) (overlookmotel) -9d384adtransformer: Use `identifier_reference_with_reference_id` builder method (#7056) (overlookmotel) -4688a06transformer: Use `*_with_scope_id` builder methods where possible (#7055) (overlookmotel) -7122e00transformer: Use `ctx.alloc` over `ctx.ast.alloc` where possible (#7066) (overlookmotel) -a3b68b4transformer: Flatten dir structure of options/babel/env (#7049) (Boshen) -6d92f36transformer: Deserialize `BabelOptions::compiler_assumptions` (#7048) (Boshen) -f83a760transformer: Deserialize `BabelOptions::presets` (#7047) (Boshen) -52c20d6transformer: Deserialize `BabelOptions::plugins` (#7045) (Boshen) -e921df6transformer: Rename `EnvOptions` to `BabelEnvOptions` (#7036) (Boshen) -af5140ftransformer: Isolate babel options logic (#7034) (Boshen) -12aa910transformer: Clean up `env/targets/query.rs` (#7033) (Boshen) -3d174bbtransformer: Clean up `BabelOptions` (#7029) (Boshen) -6284f84transformer: Use `Browserslist::Version` (#7028) (Boshen) -5b11cdftransformer: Clean up TransformerOptions (#7005) (Boshen) -f0c87d4transformer: Mark all EnvOptions as not implemented (#7004) (Boshen) -d9edef6transformer: Combine ObjectRestSpread into a single file (#7002) (Boshen) -c945fe7transformer: Import `oxc_allocator::Box` as `ArenaBox` (#6999) (overlookmotel) -fc1af2etransformer: Import `oxc_allocator::Vec` as `ArenaVec` (#6998) (overlookmotel) -63e8bfetransformer: Rename `AString` to `ArenaString` (#6997) (overlookmotel) -562bb9atransformer/async-to-generator: Move transform methods to `AsyncGeneratorExecutor` and make it public (#6992) (Dunqing) -e23f7e6transformer/common: `VarDeclarations` insert either `var` or `let` statements (#7043) (overlookmotel) -e5ecbb9transformer/jsx: Return `&mut T` not `&mut ArenaBox<T>` (#7001) (overlookmotel) -9e66c29transformer/react-refresh: Small refactor (#6973) (overlookmotel) -1ca8cd2transformer/react-refresh: Avoid panic for `init` of `VariableDeclarator` isn't a `BindingIdentifier` (#6937) (Dunqing) -5f153actransformer/react-refresh: Use `VarDeclarations` to insert declarators (#6884) (Dunqing) -df3b089transformer/react-refresh: Use `StatementInjector` to insert statements (#6881) (Dunqing) -ae22671transformer/typescript: Pass `&mut T` not `&mut ArenaBox<T>` (#7000) (overlookmotel) -938ee87traverse: Do not use `AstBuilder::*_from_*` methods (#7069) (overlookmotel) ### Styling -86ab091transformer/common: Split up `StatementInjectorStore` methods into blocks (#7042) (overlookmotel) ### Testing -64e2499module_lexer: Use a single integration test for faster compilation (#7097) (Boshen) -6133a50transformer: Use a single integration test for faster compilation (#7099) (Boshen) --------- Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
16 KiB
Changelog
All notable changes to this package will be documented in this file.
The format is based on Keep a Changelog, and this project does not adhere to Semantic Versioning until v1.0.0.
[0.35.0] - 2024-11-04
Features
6d97af4rust: Useoxc-miette(#6938) (Boshen)
Refactor
cea0e6bisolated_declarations: Do not useAstBuilder::*_from_*methods (#7071) (overlookmotel)
[0.34.0] - 2024-10-26
Refactor
423d54crust: Remove the annoyingclippy::wildcard_imports(#6860) (Boshen)
[0.33.0] - 2024-10-24
Refactor
2e2b748isolated-declarations: Protect internal transform methods (#6723) (DonIsaac)
[0.32.0] - 2024-10-19
-
7645e5ccodegen: [BREAKING] Remove CommentOptions API (#6451) (Boshen) -
5200960oxc: [BREAKING] Remove passingTriviasaround (#6446) (Boshen) -
2808973ast: [BREAKING] AddProgram::comments(#6445) (Boshen)
Features
15dfc1disolated-declarations: ImplDefaultfor options (#6372) (DonIsaac)
Bug Fixes
2673397isolated_declarations: Fix potential memory leak (#6622) (overlookmotel)
Refactor
073b02aast: Type params field before params in TS function declaration types (#6391) (overlookmotel)856cab5ecmascript: Move ToInt32 fromoxc_syntaxtooxc_ecmascript(#6471) (Boshen)a504f96isolated-declarations: Mark return struct as non exhaustive (#6374) (DonIsaac)
[0.31.0] - 2024-10-08
020bb80codegen: [BREAKING] Change toCodegenReturn::codeandCodegenReturn::map(#6310) (Boshen)
Features
9e62396syntax_operations: Add crateoxc_ecmascript(#6202) (Boshen)
Bug Fixes
e9eeae0isolated-declarations: False positive for function with a type asserted parameters (#6181) (Dunqing)
Refactor
[0.30.3] - 2024-09-27
Bug Fixes
a8338ddisolated-declarations: Accidentally collected references of original ast (#6102) (Dunqing)
[0.30.2] - 2024-09-27
Bug Fixes
418ae25isolated-declarations: Report uninferrable types in arrays (#6084) (michaelm)c8682e9semantic,codegen,transformer: Handle definite!operator in variable declarator (#6019) (Boshen)
Performance
6b7d3edisolated-declarations: Should clone transformed AST rather than original AST (#6078) (Dunqing)
[0.30.1] - 2024-09-24
Bug Fixes
9ca202acodegen: Preserve newlines between comments (#6014) (Boshen)97a2c41isolated-declarations: False positive for class private getter with non-inferrable return type (#5987) (michaelm)
[0.30.0] - 2024-09-23
Features
4a62703isolated-declarations: Handleexportin thenamespacecorrectly (#5950) (Dunqing)84a5816isolated_declarations: AddstripInternal(#5878) (Boshen)dfbde2cisolated_declarations: Print jsdoc comments (#5858) (Boshen)
Bug Fixes
5901d2acodegen: Various spacing issues (#5820) (Boshen)fd1c46cisolated-declarations: Infer failed if there are two setter/getter methods that need to be inferred (#5967) (Dunqing)6df82eeisolated-declarations: False positive for class private method that has arguments without type annotations (#5964) (Dunqing)6a9e71disolated-declarations: Wrap TSFunctionType in parentheses if it is inside theTSUnionType(#5963) (Dunqing)ea32d5bisolated-declarations: Should print constructor assignments first (#5934) (Dunqing)0f96b59isolated-declarations: Missing print comments in class's private method (#5931) (Dunqing)8780c54isolated-declarations: Do not union a undefined when the param type is any or unknown (#5930) (Dunqing)f07ff14isolated-declarations: Should not transform signature that has type annotation (#5927) (Dunqing)b6a9178isolated-declarations: Don't collect references whenExportNamedDeclarationhas source (#5926) (Dunqing)756a571isolated-declarations: Missing empty export when has an export declare (#5925) (Dunqing)e148c80isolated_declarations: Try fix fixtures (Boshen)9b3f763isolated_declarations: Try fix new line issue (Boshen)ee748b0isolated_declarations: Fix fixture spacing (Boshen)
Performance
cd34f07isolated-declarations: Combine type/value bindings and type/value references into one (#5968) (Dunqing)
Refactor
c84bd28isolated-declarations: Simplify to infer the getter and setter methods (#5966) (Dunqing)67b4220isolated-declarations: Simplify handling VariableDeclaration transform (#5916) (Dunqing)2fd5c2aisolated-declarations: Pre-filter statements that do not need to be transformed (#5909) (Dunqing)1c1353btransformer: Use AstBuilder instead of using struct constructor (#5778) (Boshen)
Testing
d6cbbe7isolated-declarations: Arrow function unions in return signature (#5973) (DonIsaac)
[0.29.0] - 2024-09-13
Features
953fe17ast: ProvideNONEtype for AST builder calls (#5737) (overlookmotel)
[0.28.0] - 2024-09-11
-
ee4fb42ast: [BREAKING] Reduce size ofWithClausebyBoxing it (#5677) (Boshen) -
4a8aec1span: [BREAKING] ChangeSourceType::jstoSourceType::cjsandSourceType::mjs(#5606) (Boshen)
Features
Bug Fixes
b9bf544isolated-declarations: False positive for setter method ininterface(#5681) (Dunqing)6e8409aisolated-declarations: Bindings referenced inTSModuleDeclarationare removed incorrectly (#5680) (Dunqing)
Performance
Testing
dc92489Add trailing line breaks to conformance fixtures (#5541) (overlookmotel)
[0.26.0] - 2024-09-03
234a24cast: [BREAKING] MergeUsingDeclarationintoVariableDeclaration(#5270) (Kevin Deng 三咲智子)
Features
180b1a1ast: AddFunction::name()(#5361) (DonIsaac)5505749ast: Addaccessibilityfield toAccessorProperty(#5290) (Dunqing)49cd5dbast,parser: Adddefiniteflag toAccessorPropertynode (#5182) (DonIsaac)c2fa725ast,parser: ParseTSTypeAnnotationsonAccessorProperty(#5179) (DonIsaac)
Bug Fixes
Refactor
946c867ast: BoxTSThisParameter(#5325) (overlookmotel)
[0.25.0] - 2024-08-23
Bug Fixes
185eb20isolated_declarations: Namespaces that are default exported should be considered for expando functions (#4935) (michaelm)
[0.24.3] - 2024-08-18
Bug Fixes
d3bbc62isolated-declarations: Declare modifier of PropertyDefinition should not be retained (#4941) (Dunqing)8e80f59isolated_declarations: Class properties should still be lifted from private constructors (#4934) (michaelm)b3ec9e5isolated_declarations: Always emit module declarations that perform augmentation (#4919) (michaelm)0fb0b71isolated_declarations: Always emit module declarations (#4911) (michaelm)4a16916isolated_declarations: Support expando functions (#4910) (michaelm)
Refactor
1eb59d2ast, isolated_declarations, transformer: MarkAstBuilder::copyas an unsafe function (#4907) (overlookmotel)
[0.24.0] - 2024-08-08
Features
e12bd1east: Allow conversion from TSAccessibility into &'static str (#4711) (DonIsaac)
Refactor
475266dast: Use correct lifetimes for name-related methods (#4712) (DonIsaac)
[0.23.0] - 2024-08-01
Bug Fixes
d5c4b19parser: Fix enum member parsing (#4543) (DonIsaac)
[0.22.0] - 2024-07-23
Bug Fixes
aece1dfast: VisitProgramshashbangfield first (#4368) (overlookmotel)3d88f20codegen: Print shorthand for all{ x }variants (#4374) (Boshen)
Performance
a207923Replace some CompactStr usages with Cows (#4377) (DonIsaac)
Refactor
0e1ea90isolated-declarations: Remove useless code from scope (#4420) (Dunqing)
[0.21.0] - 2024-07-18
Features
83c2c62codegen: Add option for choosing quotes; remove slowchoose_quotmethod (#4219) (Boshen)20cdb1fsemantic: Align class scope with typescript (#4195) (Dunqing)
Bug Fixes
3df9e69mangler: No shorthandBindingProperty; handle var hoisting and export variables (#4319) (Boshen)
Refactor
2c7bb9fast: Pass finalScopeFlagsintovisit_function(#4283) (overlookmotel)ace4f1fsemantic: Update the order ofvisit_functionandVisitfields in the builder to be consistent (#4248) (Dunqing)
[0.20.0] - 2024-07-11
Features
67fe75east, ast_codegen: Pass thescope_idto theenter_scopeevent. (#4168) (rzvxa)
Bug Fixes
48947a2ast: Putdecoratorsbefore everything else. (#4143) (rzvxa)
[0.19.0] - 2024-07-09
b936162ast/ast_builder: [BREAKING] Shorter allocator utility method names. (#4122) (rzvxa)
Refactor
[0.18.0] - 2024-07-09
d347aedast: [BREAKING] Generateast_builder.rs. (#3890) (rzvxa)
Features
Bug Fixes
cb1af04isolated-declarations: Remove theasyncandgeneratorkeywords fromMethodDefinition(#4130) (Dunqing)
[0.17.2] - 2024-07-08
Bug Fixes
5c31236isolated-declarations: Keep literal value for readonly property (#4106) (Dunqing)e67c7d1isolated-declarations: Do not infer type for private parameters (#4105) (Dunqing)3fcad5eisolated_declarations: Remove nested AssignmentPatterns from inside parameters (#4077) (michaelm)f8d77e4isolated_declarations: Infer type of template literal expressions as string (#4068) (michaelm)
Performance
7ed27b7isolated-declarations: UseFxHashSetinstead ofVecto speed up thecontain(#4074) (Dunqing)
[0.17.1] - 2024-07-06
Bug Fixes
adee728isolated_declarations: Don't report an error for parameters if they are ObjectPattern or ArrayPattern with an explicit type (#4065) (michaelm)1b8f208isolated_declarations: Correct emit for private static methods (#4064) (michaelm)
Refactor
65aee19isolated-declarations: Reorganize scope tree (#4070) (Luca Bruno)
[0.17.0] - 2024-07-05
c98d8aaast: [BREAKING] Renamevisit_arrow_expressiontovisit_arrow_function_expression. (#3995) (rzvxa)
Features
7768d23isolated-declarations: Support optional class methods (#4035) (Egor Blinov)
Bug Fixes
3d29e9cisolated-declarations: Eliminate imports incorrectly when they are used inTSInferType(#4043) (Dunqing)02ea19aisolated-declarations: Should emitexport {}when only havingImportDeclaration(#4026) (Dunqing)7c915f4isolated-declarations: Binding elements with export should report an error (#4025) (Dunqing)05a047cisolated-declarations: Method following an abstract method gets dropped (#4024) (Dunqing)c043becisolated_declarations: Add mapped-type constraint to the scope (#4037) (Egor Blinov)b007553isolated_declarations: Fix readonly specifier on class constructor params (#4030) (Egor Blinov)da62839isolated_declarations: Inferring literal types for readonly class fileds (#4027) (Egor Blinov)
Refactor
[0.16.2] - 2024-06-30
Features
dc6d45east,codegen: AddTSParenthesizedTypeand print type parentheses correctly (#3979) (Boshen)
Bug Fixes
bd1141disolated-declarations: If declarations is referenced indeclare globalthen keep it (#3982) (Dunqing)
[0.16.1] - 2024-06-29
Bug Fixes
51e54f9codegen: Should printTSModuleDeclarationKindinstead of justmodule(#3957) (Dunqing)31e4c3bisolated-declarations:declare global {}should be kept even if it is not exported (#3956) (Dunqing)
[0.16.0] - 2024-06-26
-
6796891ast: [BREAKING] Rename all instances ofBigintLiteraltoBigIntLiteral. (#3898) (rzvxa) -
1f85f1aast: [BREAKING] Revert addingspanfield to theBindingPatterntype. (#3899) (rzvxa) -
ae09a97ast: [BREAKING] RemoveModifiersfrom ts nodes (#3846) (Boshen) -
1af5ed3ast: [BREAKING] ReplaceModifierswithdeclareandconstonEnumDeclaration(#3845) (Boshen) -
0673677ast: [BREAKING] ReplaceModifierswithdeclareonFunction(#3844) (Boshen) -
ee6ec4east: [BREAKING] ReplaceModifierswithdeclareandabstractonClass(#3841) (Boshen) -
9b38119ast: [BREAKING] ReplaceModifierswithdeclareonVariableDeclaration(#3839) (Boshen) -
cfcef24ast: [BREAKING] Adddirectivesfield toTSModuleBlock(#3830) (Boshen) -
4456034ast: [BREAKING] AddIdentifierReferencetoExportSpecifier(#3820) (Boshen)
Features
497769cast: Add some visitor functions (#3785) (Dunqing)2821e0ecodegen: Print readonly keyword for TSIndexSignature (#3791) (Dunqing)97575d8codegen: Print TSClassImplements and TSThisParameter (#3786) (Dunqing)5e2baf3isolated-declarations: Report error for expando functions (#3872) (Dunqing)2cdb34fisolated-declarations: Support for class function overloads (#3811) (Dunqing)231b8f0isolated-declarations: Support for export default function overloads (#3809) (Dunqing)a37138fisolated-declarations: Improve the inference template literal (#3797) (Dunqing)b0d7355isolated-declarations: Transform const expression correctly (#3793) (Dunqing)b38c34disolated-declarations: Support inferring ParenthesizedExpression (#3769) (Dunqing)4134de8isolated-declarations: Add ts error code to the error message (#3755) (Dunqing)94202deisolated-declarations: Addexport {}when needed (#3754) (Dunqing)e95d8e3isolated-declarations: Shrink span for arrow function that needs an explicit return type (#3752) (Dunqing)df9971disolated-declarations: Improve inferring the return type from function (#3750) (Dunqing)4aea2b1isolated-declarations: Improve inferring the type of accessor (#3749) (Dunqing)9ea30c4isolated-declarations: Treat AssignmentPattern as optional (#3748) (Dunqing)
Bug Fixes
2766594codegen: Print type parameters for MethodDefinition (#3922) (Dunqing)27f0531isolated-declarations: Private constructor reaching unreachable (#3921) (Dunqing)59ce38bisolated-declarations: Inferring of UnrayExpression incorrectly (#3920) (Dunqing)58e54f4isolated-declarations: Report an error for parameters if they are ObjectPattern or ArrayPattern without an explicit type (#3810) (Dunqing)cb8a272isolated-declarations: Cannot infer nestedas const(#3807) (Dunqing)d8ecce5isolated-declarations: Infer BigInt number asbiginttype (#3806) (Dunqing)4e241fcisolated-declarations: Missingconstafter transformed const enum (#3805) (Dunqing)683c7b0isolated-declarations: Shouldn’t add declare in declaration with export default (#3804) (Dunqing)7d47fc3isolated-declarations: Should stripe async and generator keyword after transformed (#3790) (Dunqing)8ce794disolated-declarations: Inferring an incorrect return type when there is an arrow function inside a function (#3768) (Dunqing)d29316aisolated-declarations: Transform incorrectly when there are multiple functions with the same name (#3753) (Dunqing)bf1c250isolated-declarations: False positives for non-exported binding elements (#3751) (Dunqing)
Performance
4f7ff7eDo not pass&Atomto functions (#3818) (overlookmotel)
Refactor
363d3d5ast: Add span field to theBindingPatterntype. (#3855) (rzvxa)2f5d50eisolated-declarations: RemoveModifiers(#3847) (Boshen)
[0.15.0] - 2024-06-18
5c38a0fcodegen: [BREAKING] New code gen API (#3740) (Boshen)
Features
ee627c3isolated-declarations: Create unique name for_default(#3730) (Dunqing)81e9526isolated-declarations: Inferring set accessor parameter type from get accessor return type (#3725) (Dunqing)77d5533isolated-declarations: Report errors that are consistent with typescript. (#3720) (Dunqing)0b8098anapi: Isolated-declaration (#3718) (Boshen)
Bug Fixes
f1b793fisolated-declarations: Function overloads reaching unreachable (#3739) (Dunqing)0fbecdcisolated-declarations: Should be added to references, not bindings (#3726) (Dunqing)