swc/CHANGELOG.md
2024-06-25 13:40:14 +00:00

68 KiB
Raw Blame History

Changelog

[unreleased]

Performance

[1.6.4] - 2024-06-22

Features

  • (cli) Support generating .d.ts files (#9097) (e71b6d3)

  • (common) Add fallible methods to swc_common::SourceMap (#9090) (e423d1b)

  • (es/transform) Add experimental .d.ts generation (#9093) (51a2702)

  • (swc_core) Reexport swc_typescript (#9092) (a2645e2)

  • (typescript) Implement Isolated Declaration (#9086) (a855159)

Miscellaneous Tasks

Performance

  • (es/lexer) Apply various optimizations (#9095) (2f02630)

  • (es/lexer) Use memchr::memmem for lexing block comments (#9096) (1b3672f)

Refactor

  • (es/parser) Rename EsConfig and TsConfig (#9094) (5520b23)

[1.6.3] - 2024-06-19

Bug Fixes

  • (css/minifier) Don't tranform rotate deg (#9072) (8d37dae)

  • (es/decorators) Reduce the number of sourcemap mappings (#9074) (cfe3ba3)

Performance

  • (common) Use Chars in StringInput (#9073) (7698eaa)

  • (es/lexer) Optimize lexer (#9075) (6426928)

  • (es/lexer) Make lexing of string literals faster (#9077) (373bac5)

  • (es/lexer) Reduce allocation while lexing identifiers (#9076) (69f00b8)

  • (es/lexer) Add a fast-path to template literal lexer (#9080) (238f1c5)

  • (es/lexer) Add fast-path to jsx lexer (#9081) (af58606)

Refactor

  • (common) Simplify StringInput implementation (#9071) (c3a8c0b)

[1.6.1] - 2024-06-16

Bug Fixes

  • (common) Revert Use SourceMap::adjust_mappings (#9058) (cdd20cd)

Performance

  • (es/parser) Reduce allocations while lexing numbers (#9057) (ca26eb7)

[1.6.0] - 2024-06-15

Features

Performance

  • (es/lints) Avoid needless allocations in no-dupe-args (#9041) (e560198)

  • (es/parser) Do not track raw by hand (#9047) (60fe5f0)

  • (es/parser) Reduce allocations for raw while lexing numbers (#9056) (bc8ec62)

Refactor

Testing

[1.5.29] - 2024-06-13

Bug Fixes

Performance

  • (es/minifier) Do not visit var init multiple times (#9039) (675916c)

  • (es/parser) Optimize lexing of template literals (#9036) (6ab19a1)

  • (es/parser) Optimize lexing of template literals, again (#9037) (5bffd0f)

[1.5.28] - 2024-06-11

Bug Fixes

  • (es/minifier) Fix typescript enum detection (#9031) (6669343)

[1.5.26] - 2024-06-10

Bug Fixes

  • (es/es2015) Remove needless unreachable! (#9021) (555e71c)

Features

  • (es) Integrate experimental data API (#9027) (825749f)

  • (es/minifier) Support module: "unknown" (#9026) (cada50b)

  • (es/renamer) Workaround a bug of Safari (#9029) (54ac992)

  • (es/transforms) Add experimental output API for transforms (#9000) (6fa79be)

  • (es/transforms) Add an API for returning metadata to JS (#9022) (6ce112c)

[1.5.25] - 2024-06-05

Bug Fixes

  • (es/es2015) Fix injection location of this for getter/setter properties (#8993) (09121a6)

  • (es/minifier) Preserve unused special properties (#9005) (e764ff6)

  • (es/minifier) Fix comparison of -0.0 (#9012) (8a29577)

  • (es/minifier) Do not index a string with a surrogate pair (#9013) (2879a4d)

  • (es/minifier) Fix evaluation of -0 as a string (#9011) (9f8e24a)

  • (es/resolver) Fix hoisting of const and let (#8987) (0d9ecf3)

Features

  • (es/minifier) Detect TypeScript enum initialization pattern (#8986) (cc8c155)

  • (x) Initialize project (#8999) (da70ebe)

Performance

  • (es/parser) Add feature named tracing-spans (#9019) (3bf3114)

[1.5.23] - 2024-05-30

Bug Fixes

[1.5.9] - 2024-05-28

Bug Fixes

  • (es/codegen) Accept &impl Node instead of impl Node (#8969) (a456799)

  • (es/es2015) Fix typeof comparions with "object" (#8976) (51e0639)

  • (es/minifier) Add type check to & and | (#8965) (545ec51)

  • (es/minifier) Fix comparison of -0.0 and 0 (#8973) (2a43df4)

  • (es/minifier) Mark usage in TaggedTpl as ref (#8975) (a753c8d)

Features

  • (es/codegen) Add to_code (#8968) (e80fd41)

  • (plugin/runner) Add description about wasi and file system (#8963) (ced63a9)

Testing

  • (es/decorators) Add tests written by evanw (#8967) (95472e4)

  • (es/minifier) Update the passing terser test list (#8984) (c0dc5e4)

[1.5.8] - 2024-05-20

Bug Fixes

  • (es/minifier) Abort array property inliner if the array is used as a ref (#8956) (255485e)

  • (es/minifier) Abort property hoisting on eval (#8957) (02729f2)

Refactor

[1.5.7] - 2024-05-14

Documentation

[1.5.6] - 2024-05-14

Bug Fixes

  • (es) Allow input source map file to be omitted (#8951) (606cb67)

  • (es/ast) Pin version of unicodes (#8941) (6362ff4)

  • (es/compat) Avoid reserved name for private method (#8949) (7053bb1)

  • (es/minifier) Abort inliner on mutation via property (#8938) (257afc9)

  • (es/minifier) Don't invoke IIFE containing reserved words (#8939) (5a3456c)

  • (es/minifier) Fix evaluation of String.charCodeAt (#8946) (772c50f)

  • (es/minifier) Abort seq inliner on ** (#8947) (3046d71)

[1.5.5] - 2024-05-08

Bug Fixes

  • (css/modules) Allow any order of composes (#8930) (7014c63)

  • (css/modules) Fix :global selectors without preceding whitespace (#8926) (2405dc6)

  • (es/fixer) Wrap class expressions in callee (#8928) (6b60bdb)

  • (es/minifier) Respect module: false (#8925) (aca6a77)

  • (es/minifier) Consider side effects of operands of binary expressions (#8929) (4d4a7a9)

  • (es/minifier) Fix operand handling of ** (#8933) (c9d72cd)

  • (es/minifier) Fix a bug about Tpl => Str (#8934) (d4be383)

  • (es/module) Resolve .jsx imports fully (#8936) (c536d2a)

Refactor

[1.5.4] - 2024-05-06

Bug Fixes

  • (es/decorators) Handle ref of decorated class (#8905) (af96e39)

  • (es/minifier) Increment ref_count while invoking IIFE (#8904) (86e2bb0)

  • (es/proposal) Fix scoping of explicit resource management pass (#8903) (762b0d4)

Miscellaneous Tasks

[1.5.1] - 2024-04-27

Bug Fixes

  • (es/decorator) Support for legacy decorators in class expressions (#8892) (8fe57ad)

  • (es/helpers) Remove unused export from _using_ctx.js (#8891) (438d0b3)

  • (es/minifier) Do not add vars if eval exists (#8888) (be359fa)

[1.5.0] - 2024-04-24

Bug Fixes

  • (es/minifier) Abort seq inline on recursive usage (#8887) (cd4548f)

Features

  • (es/ast) Support abstract auto-accessors (#8736) (1155ac7)

[1.4.17] - 2024-04-23

Bug Fixes

  • (es) Ignore sourceMappingURL in string literals (#8879) (d7188cd)

  • (es/codegen) Use Str.raw for es5 (#8873) (c7a06b1)

  • (es/compat) Fix async generator (#8881) (063eabd)

  • (es/resolver) Prioritze jsc.paths by length in tsc resolver (#8875) (e22c368)

  • (html/codegen) Expand elements before which body isnt elided (#8877) (5419a94)

[1.4.16] - 2024-04-18

Bug Fixes

  • (es/helpers) Fix resolving of usingCtx helper (#8874) (6e9d1a4)

[1.4.15] - 2024-04-17

Bug Fixes

  • (es/codegen) Fix ascii_only for identifiers (#8866) (2075a23)

  • (es/minifier) Remove raw of strings after modification (#8865) (740c0bb)

  • (es/parser) Fix span of BindingIdent (#8859) (fbd32fb)

  • (es/proposal) Update explicit resource management to match spec (#8860) (6d24076)

Features

  • (es/transforms) Allocate stacks dynamically (#8867) (a1c5415)

Refactor

Build

  • (cargo) Update rustc to nightly-2024-04-03 (#8821) (ca9c76b)

  • (cargo) Update rustc to nightly-2024-04-16 (#8870) (f9459a8)

[1.4.14] - 2024-04-15

Bug Fixes

Documentation

  • (swc_core) Resolve build issue with --all-features flag (#8848) (c0d901e)

Refactor

Testing

  • (es) Update conformance test suite from tsc (#8834) (ea5d9cc)

[1.4.13] - 2024-04-09

Bug Fixes

  • (es/decorators) Fix capacity overflow with decorators (#8818) (9ed93c1)

  • (es/minifier) Respect top_retain for top-level functions (#8814) (811308c)

  • (es/minifier) Abort IIFE invoker in function parameters (#8828) (ebb68db)

  • (es/module) Respect module.resolveFully in more cases (#8820) (e1f7704)

  • (es/transforms) Fix capacity overflow with decorators (#8815) (974f5c7)

  • (plugin/runner) Pin version of virtual-fs (#8827) (089f61b)

  • (visit) Improve Map implementation for Box (#8819) (dc04657)

[1.4.12] - 2024-04-04

Bug Fixes

  • (common) Fix source index for inputSourceMap (#8800) (4f9ab81)

  • (es) Change default value of inputSourceMap to true (#8801) (9ffcd18)

  • (es/bugfixes) Fix fn transform in nameless fns (#8796) (7ad004e)

  • (es/helpers) Fix metadata of decorators being undefined (#8768) (263ce6e)

  • (es/minifier) Abort fn inliner if there's a spread arg (#8809) (730ded2)

  • (es/module) Fix jsc.paths with resolveFully (#8784) (4961bb0)

  • (es/parser) Tweak msg of SyntaxError::UsingDeclNotEnabled (#8791) (95c822e)

Features

  • (es/minifier) Evaluate spread of arrays (#8811) (47714c5)

  • (plugin/runner) Improve error message for Wasm plugin crashes (#8794) (571d297)

Miscellaneous Tasks

  • (deps) Update dependencies (#8810) (207582f)

  • (es/transforms) Add repository field to swc_ecma_ext_transforms (#8793) (37f0a79)

Performance

[1.4.9] - 2024-03-26

Bug Fixes

  • (es/minifier) Abort eval on valueOf or toString (#8763) (9f98a70)

  • (es/minifier) Fix tpl-to-string conversion (#8778) (e7bca10)

  • (es/module) Fix interop of jsc.paths with symlinks (#8757) (e2c6db5)

  • (es/parser) Fix parsing of TypeScript type instantiation (#8758) (2d6de94)

  • (es/parser) Parse await using in for head (#8775) (53fd09c)

  • (es/utils) Mark ident of default fn/class as binding (#8764) (f62097c)

Features

  • (es/lints) Detect duplicate bindings in export defaults (#8760) (c9c971a)

Miscellaneous Tasks

Refactor

  • (common) Debug-print spans more compactly (#8746) (f2300da)

Build

[1.4.8] - 2024-03-14

Bug Fixes

  • (es/module) Fix regression of resolving relative modules (#8748) (f988b66)

  • (es/parser) Allow export after decorators when valid (#8739) (663261b)

Miscellaneous Tasks

[1.4.7] - 2024-03-13

Bug Fixes

  • (es/minifier) Fix eval of toString of array with holes (#8727) (f3fbd9d)

  • (es/minifier) Do not evaluate slice calls with negative index (#8726) (23f9635)

  • (es/minifier) Handle cyclic references while dropping unused properties (#8725) (102241b)

  • (es/minifier) Fix evaluation of array literals with void 0 (#8733) (aa0154d)

  • (es/minifier) Fix removal of array pattern bindings (#8730) (312f0d8)

  • (es/minifier) Make Finalizer handle hoisted_props correctly (#8738) (95761b7)

  • (es/proposal) Fix var placement for using transform (#8732) (633cd89)

Features

  • (es/lints) Add no-prototype-builtins rule (#8684) (a5dbb17)

  • (es/lints) Add prefer-object-spread rule (#8696) (aa9297b)

Refactor

  • (es) Prepare wasm32-wasi-preview1-threads target support (#8724) (e3acd14)

[1.4.6] - 2024-03-08

Bug Fixes

  • (es/minifier) Do not drop used properties (#8703) (6069217)

Performance

  • (es) Do not create tokio runtime if not required (#8711) (9a1f04f)

[1.4.5] - 2024-03-06

Bug Fixes

  • (es/module) Fix relativeness check for jsc.paths (#8702) (d37125f)

Features

  • (es/parser) Support Regular Expression v flag (#8690) (4ce39eb)

[1.4.3] - 2024-03-05

Bug Fixes

  • (css/parser) Fix parsing of @import without ; or space (#8657) (60b2340)

  • (es/codegen) Emit computed getter and setter signatures (#8656) (66bf8e9)

  • (es/codegen) Fix replacement when inline_script is on (#8659) (e179134)

  • (es/codegen) Emit namespace keyword of TsModuleDecl if possible (#8676) (64c9b8f)

  • (es/compat) Split declaration and init in block-scoping pass (#8648) (6fe6810)

  • (es/decorators) Handle default exported class (#8691) (570483a)

  • (es/module) Allow FileName::Anon from node resolver (#8686) (761365e)

  • (es/modules) Do not call Path::parent() for FileName::Anon (#8662) (1bc4cb7)

  • (es/modules) Fix resolution of jsc.paths with exact match (#8685) (08ed0fb)

  • (es/parser) Check for existence of modifiers while parsing accessor token (#8649) (ca23a33)

  • (es/typescript) Handle accessibility in private method (#8689) (baba663)

  • (es/visit) Skip TsExprWithTypeArgs from noop_visit/fold_type macros (#8677) (a7a00aa)

Documentation

  • (contributing) Remove enum_kind from ARCHITECTURE.md (#8666) (f5651e8)

  • (es/minifier) Update examples code (#8652) (3bf3a62)

Features

  • (es/ast) Add alias to EsVersion (#8653) (7d62c76)

  • (es/lints) Add no-cond-assign rule (#8661) (c0d01df)

  • (es/lints) Add no-new-object rule (#8663) (15eef4d)

  • (es/minifier) Allow expr_simplifier to do arithmetic with string literals (#8683) (7e05adf)

Performance

  • (visit) Use quote::quote! instead of pmutil::q! (#8485) (8defcb2)

  • (visit) Use qualified paths for generated codes (#8655) (671c4a7)

  • (visit) Drop pmutil to improve compile time (#8673) (b474382)

[1.4.2] - 2024-02-19

Bug Fixes

  • (es/helpers) Add addInitializer to field decorators (#8619) (cd38ef3)

  • (es/minifier) Abort property hoister on this usage (#8647) (9715320)

  • (es/react) Validate pragma before parsing (#8637) (5f1cf01)

  • (es/typescript) Handle exported JSX members (#8642) (22c8e2e)

Features

  • (es/minifier) Remove unused parameters of arrow functions (#8636) (8cd4813)

  • (swc_core) Expose ES linter (#8635) (762959c)

Testing

[1.4.1] - 2024-02-13

Bug Fixes

  • (binding/types) Update typings for options.envs to match implementation (#8620) (2a115cf)

  • (es/compat) Visit AssignExpr right branch in FnEnvHoister (#8633) (e5d6de0)

  • (es/decorators) Do not insert duplicate constructors (#8631) (21a447f)

  • (es/parser) Set class property to abstract or override even in error states (#8610) (5a77306)

  • (es/parser) Fix parsing of dynamic source phase imports (#8611) (7d724d8)

  • (es/parser) Rescan << as < when parsing type args (#8607) (9e6dad9)

  • (es/parser) Fix detection of use strict directive (#8617) (95236e9)

  • (es/plugin) Fix schema version issue (#8621) (132be95)

  • (es/quote) Allow variables typed AssignTarget (#8602) (6a48be4)

  • (es/quote) Support AssignTarget, really (#8603) (ef91661)

  • (es/quote) Fix code generation of AssignTarget (#8604) (16e9d4c)

Features

  • (es/minifier) Implement correct hoist_props (#8593) (3122e94)

Miscellaneous Tasks

Refactor

  • (bindings) Remove bindings for experimental packages (#8600) (6c50ff1)

Testing

  • (es) Update tsc conformance test suite (#8615) (c0beba7)

  • Update @swc/plguin-jest used for plugin e2e testing (#8601) (95fe3db)

Build

[1.4.0] - 2024-02-05

Bug Fixes

  • (cli) Make Rust CLI use sourcemap code from the swc crate (#8576) (82bc061)

  • (es/codegen) Fix codegen of async methods with decorators (#8575) (8c32225)

  • (es/lexer) Fix typo in package keyword (#8589) (8413a6c)

  • (es/minifier) Fix top-level check (#8583) (a7c5255)

  • (es/proposals) Support using using keyword with functions (#8574) (d81596c)

  • (es/resolver) Skip property in JSX member (#8598) (d480ab9)

  • (es/testing) Make test_inline! not read output as a file (#8569) (d683089)

  • (es/typescript) Handle exported JSX binding name in TypeScript namespace (#8596) (2a70a6b)

Features

Refactor

  • (es/ast) Improve type definitions of patterns (#8532) (7f2a2c1)

Testing

  • (es/minifer) Update the passing terser test list (#8573) (8b86638)

  • (es/testing) Ensure that test_inline! is working properly (#8590) (872a47b)

[1.3.107] - 2024-01-28

Bug Fixes

  • (es/codegen) Do not produce octal literals (#8565) (07634a0)

  • (es/decorator) Skip TypeScript class method/prop declarations (#8555) (6a8dd8c)

  • (es/decorator) Preserve state while traversing the module_items scope (#8556) (f416aff)

  • (es/loader) Make tsc resolver work for bare specifier (#8550) (d6a4615)

[1.3.106] - 2024-01-25

Bug Fixes

  • (binding/types) Add bugfixes field to EnvConfig (#8538) (49ebdf9)

  • (common) Fix source map generation with inputSourceMap (#8546) (043ee85)

  • (es/ast) Add definite and is_override to AutoAccessor (#8436) (572bcae)

  • (es/ast) Fix definition of SetterProp (#8314) (bc38ac9)

  • (es/codegen) Set sourceRoot of sourcemaps (#6086) (ae78669)

  • (es/compat) Support vars from reserved_word pass (#8543) (fc929e9)

  • (es/loader) Don't use browser versions for jsc.paths (#8548) (fab27da)

  • (es/minifier) Fix a bug related to inliner and the variable scoping (#8542) (aa70131)

  • (es/module) Fix resolving of dependencies (#8533) (71fb5c1)

  • (es/module) Fix handling of * in jsc.paths (#8535) (2d8bd9e)

  • (es/quote) Add support for import phase to quote macro (#8536) (71930ff)

Features

  • (css/parser) Implement error reporting for @value of CSS Modules (#8547) (00619b1)

  • (es/ast) Support import phase (#8279) (72048ae)

  • (swc_core) Expose preset_env_base (#8537) (793f265)

Miscellaneous Tasks

[1.3.105] - 2024-01-21

Bug Fixes

  • (common) Remove < and > from Display impl of FileName::Custom (#8530) (014a6cd)

  • (es/codegen) Fix codegen of \\0 (#8433) (9f1ce3a)

  • (es/minifier) Fix a bug in tpl string <-> string logic (#8510) (4946a11)

  • (es/typescript) Fix panic on invalid jsx pragma (#8513) (f40f59b)

Miscellaneous Tasks

Testing

  • (es/codegen) Add tests for @ctrl/tinycolor (#8518) (1c4eb1f)

  • (es/codegen) Add a JS test for ascii-only mode (#8519) (974c6a0)

  • (es/minifier) Add a test for a fixed issue (#8520) (8fac2bb)

  • (es/module) Add a test for a fixed issue (#8521) (4b4a0a2)

[1.3.104] - 2024-01-17

Bug Fixes

  • (es) Fix plugin template & restore test! as test_inline! (#8508) (10449e0)

  • (es/systemjs) Handle top level this (#8506) (0f94c8c)

  • (plugin) Set swc_common::errors::HANDLER while invoking plugins (#8511) (ba753f1)

[1.3.103] - 2024-01-15

Bug Fixes

  • (binding/types) Add type for decoratorVersion (#8468) (79438e6)

  • (es/codegen) Emit abstract keyword (#8479) (a12eaae)

  • (es/codegen) Emit declare keyword for class properties (#8478) (2076ef8)

  • (es/codegen) Emit implements clause with commas (#8477) (d98a282)

  • (es/codegen) Emit ? for an optional computed property (#8481) (e0bdc0f)

  • (es/codegen) Fix codegen of a property key in ascii-only mode (#8493) (8d9bf4c)

  • (es/compat) Set inserted var inside export class in destructing (#8470) (4416077)

  • (es/compat) Correctly handle this in arrow function parameters (#8489) (52a8f05)

  • (es/minifier) Correctly escape more characters (#8490) (f7c4934)

  • (es/module) Fix resolving of .js files (#8480) (b70e96f)

  • (es/parser) Correctly parse the keyword (#8483) (740e6f3)

  • (es/resolver) Resolve top-level undefined, NaN, and Infinity correctly (#8471) (82bd807)

Documentation

  • Replace string_cache with hstr in ARCHITECTURE.md (#8487) (abd7c51)

Features

  • (html/parser) Allow self-closing /> on non-void HTML elements via a flag (#8460) (566063d)

Refactor

Testing

  • (es/minifier) Enable non esm mode for tests (#8472) (1120336)

  • (es/minifier) Enable script mode for terser_exec and mangle (#8474) (b676e75)

[1.3.102] - 2023-12-31

Bug Fixes

  • (css/parser) Fix parsing of hsla(var(--foo), 1) (#8443) (d89b60a)

  • (es) Apply paren_remover for minify (#8442) (e68720a)

  • (es/codegen) Fix codegen of type-only export declarations (#8447) (65dec90)

  • (es/codegen) Emit override keyword (#8449) (0dd96f8)

  • (es/compat) Use correct span.lo in class transforms (#8439) (a06d5b2)

  • (es/minifier) Add WeakRef as a safe global reference (#8458) (d681785)

  • (es/parser) Disallowing await as an identifier in class static block (#8450) (0b188cc)

  • (es/renamer) Correctly check top level (#8456) (1e44e57)

[1.3.101] - 2023-12-18

Bug Fixes

  • (es/codegen) Emit extra paren emitting AssignExpr (#8413) (dce3693)

  • (es/codegen) Fix codegen of ts specific syntax in class props (#8426) (7566ddf)

  • (es/compat) Fix destructuring of export class/function (#8371) (630f9d3)

  • (es/compat) Preserve spread in the generator pass (#8401) (29bec98)

  • (es/compat) Preserve comment for arrow body (#8427) (56992e3)

  • (es/fixer) Preserve parenthesis for optional chaining (#8399) (a69f172)

  • (es/lints) Ignore ambient context binding (#8368) (83c8fe5)

  • (es/resolver) Handle TsInterfaceDecl and UsingDecl correctly (#8403) (f8ce316)

Features

  • (es/ast) Add as_import_with to ObjectLit to provide easier API (#8405) (daf6265)

Miscellaneous Tasks

Performance

Refactor

Build

  • (macros) Drop pmutil to improve compile time (#8404) (835151e)

[1.3.100] - 2023-11-30

Bug Fixes

  • (es/codegen) Fix panic due to \\ud (#8346) (1891afa)

  • (es/codegen) Wrap quote for length greater than one (#8351) (2cdea3f)

  • (es/fixer) Wrap yield expression in await expression (#8357) (ff719f0)

  • (es/minifier) Give up terminate merge if in try with finally (#8342) (ed5a9b3)

  • (es/parser) Fix conditional compilation (#8343) (a423681)

  • (es/react) Make jsx with single spread child static (#8339) (58568fa)

Miscellaneous Tasks

  • (css/linter) Document rules require porting (#8352) (55da0bb)