swc/CHANGELOG.md
2023-10-12 00:42:04 +00:00

95 KiB

Changelog

[unreleased]

Bug Fixes

  • (es/minifier) Don't inline functions if keep_fnames is enabled (#8093) (94bb42e)

Miscellaneous Tasks

[1.3.93-nightly.20231011.1] - 2023-10-11

Bug Fixes

  • (ci) Fix CI (#8079) (7073e83)

  • (es/codegen) Fix codegen of type-only imports (#8070) (6f45b46)

  • (es/compat) Handle __proto__ edge case in shorthand pass (#8077) (a912937)

  • (es/compat) Handle export default decorator only if not empty (#8099) (bf523f5)

  • (es/decorators) Fix a regression about class expressions (#8102) (cb4361f)

  • (es/helpers) Override mistake in _interop_require_wildcard (#8076) (1346528)

  • (es/parser) Fix parsing of await using (#8101) (e1043fa)

  • (xtask) Fix nightly command (#8105) (db4ca65)

Features

Miscellaneous Tasks

Refactor

  • (atoms) Remove usage of js_word! to drop string-cache (#7976) (84cec87)

  • (es/module) Reimplement some functions of module/typescript (#8063) (3e5b062)

  • (es/parser) Introduce TokenKind along with Token (#8071) (9b9bc51)

[1.3.92] - 2023-10-05

Bug Fixes

  • (es/compat) Fix scoping of explicit-resource-management (#8044) (96a7a4d)

  • (es/compat) Transform default-exported class decorators correctly (#8050) (a751f1c)

  • (es/compat) Use async and await correctly in block-scoping pass (#8056) (8318ea8)

  • (es/module) Handle directives (#8048) (4d8e101)

Miscellaneous Tasks

Refactor

  • (cli) Make CLI testable/managable with swc-bump (#8045) (f717cf2)

[1.3.91] - 2023-10-01

Bug Fixes

  • (es/compat) Use return statements for method and setter decorator (#8017) (38bc710)

  • (es/compat) Generate OptCall for OptCall for private fields (#8031) (06b6eb9)

  • (es/minifier) Check if object shorthand is skippable for seq inliner (#8036) (01391e3)

  • (es/module) Sort the exported ESM bindings (#8024) (990ca06)

  • (es/typescript) Rename wrong unresolved_mark (#8018) (5817268)

  • (es/typescript) Preserve default value of an exported binding in a namespace (#8029) (cf96171)

Documentation

  • (counter) Document the purpose of the package (#8032) (b6b5a4d)

Features

  • (bindings) Create a minifier-only package (#7993) (64d8f4b)

Miscellaneous Tasks

Refactor

  • (es) Extract parser/codegen code for swc::Compiler (#8030) (a13f5cb)

  • (es/minifier) Move JS options to swc_ecma_minifier (#8028) (725f7f5)

[1.3.90] - 2023-09-27

Bug Fixes

  • (es/codegen) Fix codegen of unicode surrogates (#7985) (39c680d)

  • (es/codegen) Fix codegen of optional chaining expr with a comment (#8005) (f07bb48)

  • (es/typescript) Handle DeclareCollect correctly (#8008) (9d08b8a)

  • (es/typescript) Handle qualified access in assign pat (#8012) (2f01aba)

[1.3.89] - 2023-09-25

Bug Fixes

  • (es) Enable resolver if jsc.baseUrl is specified (#7998) (f374ad9)

  • (es/compat) Skip function scope in block-scoped-fns pass (#7975) (d91a554)

Refactor

  • (es/typescript) Reimplement TypeScript pass (#7202) (9c9a538)

[1.3.88] - 2023-09-24

Features

  • (es/config) Accept jsc.experimental.keepImportAssertions (#7995) (4d777ee)

Refactor

[1.3.87] - 2023-09-22

Bug Fixes

  • (bindings/type) Update types of jsc.experimental (#7972) (e40fccb)

  • (es/compat) Handle nullish in fn expr scope (#7980) (5050f58)

  • (es/minifier) Do not inline into a template literal with sequential inliner (#7971) (b3d3a7b)

[1.3.86] - 2023-09-18

Bug Fixes

  • (es/compat) Handle PrivateName in logical_assignments (#7958) (28318f0)

  • (es/minifier) Handle ModuleDecl when transform const modules (#7959) (06ca1fe)

  • (es/module) Preserve import specifier if resolving fails (#7955) (be5b02a)

Miscellaneous Tasks

  • (es/preset-env) Add the repository url to Cargo.toml (#7941) (ca22359)

  • (es/preset-env) Ignore tp in the version of a browser version (#7968) (005ddc5)

Refactor

Build

  • (bindings/node) Link msvc runtime statically (#7965) (0759779)

[1.3.85] - 2023-09-15

Bug Fixes

  • (css/modules) Support composes when using multiple subclass selectors (#7949) (05ca19b)

  • (es/compat) Handle single expression case in static block (#7944) (a80aec4)

  • (es/minifier) Parse a file as a module only if opts.module is true (#7943) (b87ac64)

Features

  • (es/compat) Support pure_getters for optional_chaining (#7933) (c091c5e)

  • (es/module) Add an option to make resolver fully resolve index.js (#7945) (7e8d72d)

[1.3.84] - 2023-09-11

Bug Fixes

  • (es/codegen) Emit leading comments for ExprStmt (#7916) (2da5895)

  • (es/codegen) Use emitAssertForImportAttributes (#7936) (dac8888)

  • (es/compat) Visit assign expr in generator (#7932) (97068e1)

[1.3.83] - 2023-09-07

Bug Fixes

  • (css/modules) Aggregate class names when composes is chained. (#7917) (0db25a2)

  • (es/module) Revert #7901 (#7906) (85d6e9b)

  • (es/module) Fix jsc.paths for projects using pnpm (#7918) (a86e9f3)

Features

  • (es/codegen) Add an option to print assert for import attributes (#7914) (ee75756)

[1.3.82] - 2023-09-01

Bug Fixes

  • (common) Fix logic for excluding FileName from source maps (#7900) (aa64955)

  • (es/module) Make jsc.paths fully resolve TypeScript files (#7901) (c714dd2)

  • (es/resolver) Correctly resolve global value (#7893) (2db10e9)

[1.3.81] - 2023-08-30

Bug Fixes

  • (es/codegen) Fix placing of comments of yield arguments (#7858) (122d14c)

  • (es/compat) Apply transforms for explicit resource management (#7881) (3180e68)

  • (es/compat) Make SwitchCase handler of block-scoping stateless (#7888) (4b33d41)

  • (es/dep-graph) Analyze import type children (#7883) (057bd5f)

  • (es/minifier) Report is_fn_local even if var is hoisted (#7876) (87a47bf)

  • (es/module) Don't create absolute paths for jsc.paths on Windows (#7892) (5fbc251)

  • (swc-info) Use correct path while getting local package versions (#7872) (67afaf1)

Features

Miscellaneous Tasks

Performance

  • (es/transforms) Remove wrong parallelism (#7889) (a505012)

Refactor

  • (es/minifier) Remove mutated and mutation_by_call_count (#7890) (8db968a)

[1.3.80] - 2023-08-25

Bug Fixes

  • (es/module) Fix logic for exact matches in jsc.paths (#7860) (52a1ee7)

  • (es/module) Don't resolve as node_modules from TscResolver (#7866) (11ebae1)

Miscellaneous Tasks

[1.3.79] - 2023-08-25

Bug Fixes

  • (es) Fix default value of jsc.minify.format.comments (#7853) (64e51d3)

  • (es/minifier) Don't inline properties if the var is not fn-local (#7839) (7fe01e6)

  • (es/minifier) Don't remove exports (#7856) (ae8cd94)

  • (es/module) Make jsc.paths work for a nest.js app (#7852) (d33a973)

Features

Miscellaneous Tasks

Refactor

  • (common) Mark some methods of Input unsafe (#7848) (c657324)

  • (es/helpers) Move packages for monorepo (#7833) (1ab406c)

  • (es/minifier) Pre-calculate reassigned (#7832) (65db1ba)

  • (es/types) Extract @swc/types as a small, reusable package (#7834) (f713f1b)

[1.3.78] - 2023-08-17

Bug Fixes

  • (es/codegen) Add quotes to property names when ascii_only is true (#7820) (04921f3)

  • (es/compat) Remove wrong logic for object patterns in object_rest (#7788) (3766a7c)

  • (es/minifier) Preserve cooked while compressing template literals (#7773) (05990a9)

  • (es/minifier) Abort seq inliner if var is not fn_local or reassigned (#7804) (f8ca366)

  • (es/minifier) Preserve more analysis data upon inlining (#7823) (31de19e)

Features

  • (es/module) Improve error message about relative jsc.baseUrl (#7827) (9099883)

Refactor

[1.3.77] - 2023-08-16

Bug Fixes

Features

Refactor

  • (es/parser) Don't attempt to handle shebangs in read_token_number_sign (#7803) (5e7834a)

[1.3.76] - 2023-08-10

Bug Fixes

  • (es/ast) Bump version (#7793) (13bedc0)

  • (es/minifier) Abort seq inliner if a same var is defined in outer scope (#7772) (ef8d121)

  • (es/minifier) Do not drop properties used via this (#7785) (552d9aa)

  • (es/module) Use jsc.baseUrl while resolving absolute paths (#7775) (5c4bfa6)

Features

Miscellaneous Tasks

Performance

  • (es/compat) Improve time complexity of class_properties (#7786) (76c6258)

[1.3.75] - 2023-08-08

Bug Fixes

  • (es/codegen) Don't strip necessary escape characters (#7687) (b45649b)

  • (es/compat) Fix loose mode of the spread pass (#7760) (b69ae8f)

  • (es/minifier) Abort on Array.slice with start >= end (#7745) (36ccbec)

  • (es/module) Fix handling of continuous assignments in systemjs (#7741) (f713f6a)

  • (es/utils) Ignore typeof Id while preserving side effects (#7763) (d57ac0d)

  • (plugin/runner) Use fs cache properly (#7748) (1122de7)

Features

  • (es) Alias format as output for minify() (#7746) (28dfc51)

Miscellaneous Tasks

Refactor

  • (es/ast) Avoid transmute in impl of Hash for Number (#7771) (2258274)

  • (es/minifier) Support stable rustc (#7734) (f7afe7e)

  • (es/parser) Do not use lexical (#7758) (e50cfde)

  • (es/parser) Do not validate top-level await with target (#7774) (5f97f86)

[1.3.74] - 2023-08-02

Bug Fixes

[1.3.73] - 2023-08-01

Bug Fixes

  • (es/minifier) Handle synthesized export default expression (#7707) (5ea6f27)

  • (es/utils) Fix string evaluation of array literals (#7731) (e8c58cf)

Features

  • (es/preset-env) Update builtin definitions for core-js imports (#7715) (b4f3332)

Testing

  • (es/compat) Add a test for optional chaining with loose mode (#7726) (216c4f1)

[1.3.72] - 2023-07-28

Bug Fixes

  • (es/compat) Fix handling of private members in optional chaining pass (#7610) (7ba7b6e)

  • (es/minifier) Do not drop used properties (#7702) (f901b41)

  • (es/module) Do not determine module name for modules without exports in UMD (#7718) (40136f7)

Features

  • (es) Add a validation for a wrong config (#7704) (900701f)

  • (swc_core) Expose visit/serde as serde feature (#7722) (2bc9637)

Refactor

  • (es/parser) Make stacker an optional dependency (#7720) (864bdef)

[1.3.71] - 2023-07-25

Bug Fixes

  • (css/modules) Preserve attr selectors used with :global (#7670) (11b4679)

  • (es/minifier) Only cast global Infinity/undefined/NaN (#7684) (241c04a)

  • (es/minifier) Drop line comments starting with ! (#7689) (951138c)

  • (es/minifier) Abort seq inliner using visitor (#7699) (a26dbce)

  • (es/typescript) Fix handling of optional chaining (#7660) (c017874)

Features

Miscellaneous Tasks

Refactor

  • (es/minifier) Respect toplevel and module options (#7671) (9893bd2)

  • (es/minifier) Respect top-level when invoking IIFE (#7690) (bf72362)

[1.3.70] - 2023-07-18

Bug Fixes

  • (es/minifier) Fix a bug about eval of name mangler (#7615) (6be1f70)

  • (es/minifier) Do not reuse identifier used for import bindings (#7639) (a65be14)

  • (es/module) Skip CJS and AMD transformations for Script (#7661) (a2d0408)

Features

  • (es/minifier) Drop recursively used var declaration (#7649) (04b0f6d)

Testing

  • (es) Add a test for a unreproducible issue (#7656) (c0e4805)

  • (es/modules) Add a test for unreproducible issue (#7655) (7528de1)

Buiild

[1.3.69] - 2023-07-13

Bug Fixes

  • (es/compat) Visit children of while statement in the generator pass (#7624) (d2ac2c1)

  • (es/compat) Fix loose mode of the spread pass (#7608) (a7daa5b)

  • (es/minifier) Don't drop unused properties of top-level vars (#7638) (19ba714)

Features

Miscellaneous Tasks

  • (es/parser) Scope use of lexical to certain features (#7644) (a961090)

Refactor

  • (bindings/node) Remove unused babelify type (#7625) (73c7769)

Build

[1.3.68] - 2023-07-05

Bug Fixes

  • (css/modules) Fix :local and :global (#7600) (f0ab5b3)

  • (es/compat) Visit transformed expression in optional chaining pass (#7614) (c087c82)

  • (es/fixer) Don't change default decls to default expr exports (#7585) (e272545)

  • (es/minifier) Add usage to inlined ident eagerly (#7597) (4f866de)

  • (es/parser) Re-lex << as two <-s if required (#7439) (6850372)

  • (plugin/runner) Disable wasi env cleanup (#7607) (8209594)

  • (xml/codegen) Fix wrong minification of spaces in a self-closing tag (#7595) (769d651)

Features

  • (es/compat) Implement transform for explicit resource management (#7376) (bcd5a1d)

  • (es/minifier) Drop unused properties (#7534) (47d2edd)

  • (es/minifier) Compress common sub expressions in sequences (#7587) (ff1ad95)

  • (es/optimization) Support default imports for const modules (#7604) (ac02b84)

Refactor

  • (es/compat) Remove usage of box_patterns (#7613) (0a26066)

[1.3.67] - 2023-06-29

Bug Fixes

  • (es/minifier) Don't drop assignments to unused top-level variables (#7581) (a685c88)

  • (es/parser) Adjust context while parsing type arguments of TypeScript type queries (#7582) (9d5dda1)

  • (estree/compat) Adjust loc.col (#7565) (d86f8f6)

Features

  • (es/minifier) Support __NO_SIDE_EFFECTS__ (#7532) (3ad07a7)

  • (es/minifier) Enable hoist_props by default (#7535) (07a8580)

  • (es/minifier) Inline constants even if they are exported (#7583) (398e922)

  • (plugin/runner) Update wasmer to v4 (#7576) (ab7b17c)

  • (plugin/runner) Share runtime Engine (#7590) (9512ea3)

  • (testing) Add CARGO_TARGET_DIR and use it from other crates (#7552) (46fb461)

Miscellaneous Tasks

Refactor

  • (common) Remove add_bitflags and update bitflags (#7571) (95ac74e)

Build

[1.3.66] - 2023-06-20

Bug Fixes

  • (es) Accept parse option for minify() (#7543) (1d84e95)

  • (es/compat) Visit arrow body from optional chaining pass (#7549) (bc6e950)

  • (es/preset-env) Don't log Yield to the console (#7548) (8cfc4f9)

  • (es/resolver) Resolve the super class before registering a class name (#7550) (1d9f972)

Features

Testing

[1.3.65] - 2023-06-19

Bug Fixes

  • (es/compat) Fix optional chaining (#7530) (990e48e)

  • (es/module) Add "use strict" while preserving directives (#7537) (f42fdd2)

  • (es/typescript) Don't panic of @jsxFrag null (#7540) (76aa91f)

Features

  • (es/module) Preserve custom use directives (#7528) (3e9dd88)

[1.3.64] - 2023-06-14

Bug Fixes

  • (es/codegen) Emit type arguments of jsx element names (#7522) (a0da02d)

  • (es/codegen) Fix regression of source maps (#7523) (f27838d)

  • (es/compat) Fix handling of this of optional chaining pass (#7527) (4644d00)

[1.3.63] - 2023-06-13

Bug Fixes

  • (es/codegen) Remove extra spaces in AssignPatProp and KeyValuePatProp (#7488) (064bcf4)

  • (es/compat) Make stage 3 decorator pass use correct state for inner classes (#7508) (cc4146c)

  • (es/minifier) Infect mutation when assigning a property (#7503) (7f9f0b8)

  • (es/react) Default to empty string when emitting refresh signature (#7514) (8e933c8)

Features

  • (es/codegen) Add ability to set indentation string via rust api (#7494) (a343e7c)

  • (es/minifier) Remove unused labels (#7478) (62075fa)

  • (es/parser) Disallow tagged tpl in optional chaining (#7515) (6c00a24)

  • (plugin/runner) Support shared wasix runtime (#7504) (73929fc)

Performance

  • (css/prefixer) Convert macro to a function call to reduce binary size (#7507) (d545df6)

  • (es) Use &dyn Comments to reduce binary size (#7489) (2c3ac68)

  • (es) Use &dyn Comments for jsx and TypeScript (#7490) (abd62bc)

Refactor

[1.3.62] - 2023-06-03

Bug Fixes

  • (es/minifier) Don't generate generator arrows (#7466) (e506635)

Miscellaneous Tasks

Performance

  • (bindings) Enable share-generics to reduce binary size (#7482) (d623db4)

  • (es/minifier) Make minifier not overly generic (#7483) (65ce5d1)

[1.3.61] - 2023-05-30

Bug Fixes

  • (css/modules) Don't drop the correct selector (#7450) (d370324)

  • (es/codegen) Emit ; for TsImportEqualsDecl (#7464) (3935d02)

  • (es/parser) Fix parsing of generic jsx element name (#7449) (77850dd)

  • (plugin/runner) Disable wasi_env cleanup (#7458) (1868d36)

Features

  • (common) Enable bytecheck for missing structs (#7465) (56ac9eb)

  • (es/minifier) Inline for loop variables (#7445) (0cd2b61)

Miscellaneous Tasks

Testing

  • (es/parser) Add a test for a fixed issue (#7467) (8274cce)

[1.3.60] - 2023-05-25

Bug Fixes

  • (es) Init filesystem cache only if plugin exists (#7436) (786cf3a)

  • (es) Ignore input sourcemap error (#7446) (0c92e53)

  • (es/compat) Fix destructuring handling of block_scoping (#7425) (66d52ec)

  • (es/compat) Fix stage 3 decorator pass (#7392) (97d0f79)

  • (es/compat) Fix variable scoping of object rest pass. (#7437) (f3d660f)

  • (es/parser) Reset class context (#7433) (1cab43f)

  • (es/parser) Allow using package as a parameter name in interface (#7438) (33a922b)

  • (es/parser) Fix parsing of tsx with a type annotation in a conditional expression (#7440) (a37d59a)

  • (es/preset-env) Fix pass ordering (#7434) (2071f89)

  • (swc_core) Correctly expose plugin with host (#7427) (558ca40)

Features

  • (plugin/runner) Enable in-memory precompiled module cache (#7420) (f8fe365)

Refactor

  • (plugin/runner) Add attributes to the module bytes (#7419) (c03a74c)

  • (swc_core) Make common_plugin_transform agnostic to mode (#7422) (cfdd407)

  • (visit) Reduce expanded LOCs (#7442) (e83368e)

[1.3.59] - 2023-05-19

Bug Fixes

  • (common) Disable tracing/release_max_level_info (#7401) (95291f2)

  • (es/codegen) Do not create duplicate source map entry (#7309) (40ba242)

  • (es/compat) Mark reserved function names private (#7298) (dba78a0)

  • (es/minifier) Mark all function params as potential property mutation (#7409) (5dbbbea)

  • (es/minifier) Prevent inlining vars assigned outside current function scope (#7414) (40d2bf7)

  • (es/parser) Fix parsing of module identifier (#7400) (1d3f320)

  • (es/parser) Fix parsing of > in typescript mode (#7407) (57ad722)

Miscellaneous Tasks

Refactor

  • (plugin/runner) Revise cache, module loading (#7408) (ac5ab60)

Testing

[1.3.58] - 2023-05-15

Bug Fixes

  • (es/minifier) Fix remapping of vars upon inlining (#7362) (1dced17)

  • (es/parser) Fix >= with type instantiate (#7388) (fa7a352)

Features

  • (es/compat) Partially support auto accessors (#7364) (97ec259)

  • (es/compat) Implement auto accessors fully (#7370) (cad18fa)

  • (es/parser) Implement explicit resource management (#7322) (041b491)

  • (plugin) Add versioned wrapper struct (#7382) (bba1fad)

  • (swc_core) Allow native env plugin to use memory cache (#7390) (e3868a7)

  • (swc_core) Expose plugin proxy to the host env (#7391) (05b4c11)

Miscellaneous Tasks

  • (es) Enable tracing spans for release builds (#7379) (166e77c)

Refactor

[1.3.57] - 2023-05-09

Bug Fixes

  • (es/compat) Fix is_setter in parameters pass (#7348) (e0de83e)

  • (xml/codegen) Escape < and > in child (#7351) (b180d09)

Features

  • (es/compat) Support export class from stage 3 decorator pass (#7363) (9c052db)

  • (plugin) Enable bytecheck (#7280) (d2c1f45)

Refactor

Build

[1.3.56] - 2023-04-29

Bug Fixes

  • (es/codegen) Emit type arguments for call expressions (#7335) (7e99e5f)

  • (es/parser) Parse decorators after export (#7340) (985f0ca)

  • (es/typescript) Fix typescript strip pass (#7342) (d061d29)

  • (plugin/runner) Revert #7341 (#7344) (d6999ba)

Features

  • (es/minifier) Drop expressions using sequential inliner (#6936) (246300a)

  • (plugin/runner) Improve caching (#7341) (245163a)

[1.3.55] - 2023-04-25

Bug Fixes

Features

  • (es/module) Add export_interop_annotation flag (#7330) (caee073)

[1.3.54] - 2023-04-25

Bug Fixes

  • (bindings/node) Support TsSatisfiesExpression (#7317) (761ef83)

  • (common) Workaround the Arc and rkyv issue (#7321) (577f81e)

  • (es/codegen) Fix codegen of TsModuleDecl (#7319) (0ca05d8)

  • (es/compat) Transform curried function call with optional chaining (#7313) (66b5b11)

Testing

[1.3.53] - 2023-04-21

Bug Fixes

  • (es) Fix a crash related to source map (#7307) (e7f7b01)

  • (es/helpers) Remove unnecessary parameters in helper_expr! macro (#7296) (38dfb91)

  • (es/modules) Support jsc.baseUrl without jsc.paths (#7302) (9c279b8)

  • (es/parser) Fix handling of in and out of typescript (#7308) (6f81cb9)

  • (testing) Fix path normalization on windows for testing diffs (#7299) (3422923)

Miscellaneous Tasks

  • Update issue template to prevent useless issues (#7303) (9816ba2)

Testing

  • (es/compat) Add a test for a wrong issue (#7300) (38495a9)

[1.3.52] - 2023-04-19

Bug Fixes

  • (es/minifier) Fix a inliner bug related to Script (#7288) (0aab90c)

  • (es/resolver) Hoist parameter in arrow and constructor (#7292) (7a00f2e)

Performance

Build

[1.3.51] - 2023-04-16

Bug Fixes

  • (es) Allow extra comments after sourceMappingURL (#7262) (219a738)

  • (es/helpers) Do not duplicate property names (#7266) (30a4e52)

  • (es/loader) Fix browser overwrites not applying correctly (#7243) (beefdd4)

  • (es/minifier) Use UTF16 length for str.length (#7275) (4c06a56)

  • (es/renamer) Ensure that param and function body are in same scope (#7271) (93a264c)

Features

  • (es/modules) Use function instead of arrow function unconditionally (#7273) (5d3313a)

Miscellaneous Tasks

Refactor

  • (es/parser) Remove :: token as it's not used (#7268) (635bf81)

Build

[1.3.50] - 2023-04-13

Bug Fixes

  • (es) Fix a crash related to an empty source map (#7229) (c665918)

  • (es/codegen) Respect ascii_only for identifiers (#7247) (e35097f)

  • (es/compat) Handle export function in reserved_word (#7251) (2e947e7)

  • (es/minifier) Fix handling of optional chaining when hoist_props is enabled (#7246) (a44fea1)

  • (es/parser) Use a hard error for missing r-paren in an if stmt (#7223) (b1c40a4)

  • (es/parser) Reset ctx for cond while parsing a stmt (#7232) (01db30f)

  • (es/parser) Parse const type parameters in arrow function expressions (#7242) (6614886)

Features

  • (es) Provide more information when loading of input source map failed (#7249) (f0e3b1d)

  • (es) Use minify.format.ascii_only if output.charset is not specified (#7258) (1fe5c3a)

  • (es/minifier) Support PURE comment of seq exprs (#7245) (559d120)

  • (plugin) Enable validation (#7250) (efad714)

Refactor

Testing

Build

[1.3.49] - 2023-04-10

Features

Refactor

[1.3.47] - 2023-04-10

Bug Fixes

  • (bindings/node) Make peer dependency of helpers optional (#7216) (e86d598)

  • (es/compat) Fix finally handling of generator (#7215) (f5c62fb)

  • (es/minifier) Don't remove used var decl (#7200) (73bc29e)

  • (es/testing) Ensure that we call fold_program (#7222) (e241201)

  • (es/typescript) Fix computation of enum bits (#7219) (29bf176)

Features

Refactor

  • (macros/ast-node) Drop darling to reduce compile time (#7214) (3f61638)

[1.3.45] - 2023-04-04

Bug Fixes

  • (es) Allow missing .map file (#7141) (3e6a186)

  • (es/compat) Handle shorthand object prop while renaming (#7176) (0a80e05)

  • (es/helpers) Use snake_case for helpers (#7147) (3ca954b)

  • (es/modules) Hint nodejs for multiple export * (#7184) (98f1493)

  • (es/parser) Fix infinite loop on jsx in js (#7191) (414e669)

  • (es/typescript) Mark A as a type in export { type A } (#7196) (ddfbc93)

  • (swc_core) Fix a feature name (#7198) (bfe6544)

Features

  • (css/modules) Preserve spans of CSS class names (#7185) (df7b4e7)

  • (es/compat) Implement stage 3 decorator, without auto accessor (#6950) (7a863ad)

  • (es/helpers) Use named export and unify import path (#7182) (a13a78e)

  • (plugin/runner) Improve cache path (#7188) (976667f)

Testing

[1.3.44] - 2023-03-30

Bug Fixes

  • (css/codegen) Preserve raw of numbers (#7131) (150c2b6)

  • (css/compat) Remove usage of box_syntax (#7153) (6f0bf66)

  • (es/compat) Handle import/export in reserved_word (#7165) (065d11c)

  • (es/compat) Fix the position for temp var injection (#7171) (23fb8c5)

  • (es/react) Respect import_source in new jsx (#7128) (5d7acfd)

  • (es/renamer) Don't use symbols used by declarations if eval exists (#7116) (6d9763e)

  • (es/visit) Fix handling of Program of AndThen (#7120) (d50689e)

  • (fast-graph) Use fxhash instead of ahash to make iteration order consistent (#7133) (b13eb4c)

Documentation

Features

  • (css/parser) Add legacy_ie to the ParserConfig (#7109) (5e58b3e)

  • (es/react) Support script within automatic runtime (#7126) (05a2815)

Miscellaneous Tasks

  • (cargo) Refactor Cargo.toml to reduce merge conflict (#7139) (2826198)

Refactor

  • (ast) Make serde optional (#7138) (30bc086)

  • (es) Remove needless build scripts to reduce compile time (#7129) (dfe1a3f)

  • (es/codegen) Extract code from generic functions to reduce compile time (#7127) (08fa94f)

  • (es/parser) Remove EnumKind to reduce compile time (#7137) (915f747)

  • (macros) Reduce compile time (#7132) (2154a3f)

Build

[1.3.42] - 2023-03-22

Bug Fixes

  • (bindings/node) Fix loading of spack.config.js (#7105) (a4d1af1)

  • (es/ast) Fix EqIgnoreSpan impl of Number (#7112) (6a570a3)

  • (es/compat) Don't modify private fields from reserved_words pass (#7113) (2bc631d)

  • (es/minifier) Pass keep_* in config to compress and mangle (#7102) (6a1201c)

  • (es/minifier) Don't inline into arrow heads (#7099) (610e1bb)

  • (es/parser) Fix parsing of static accessors (#7108) (dd2b16d)

Features

  • (es/resolver) Make scope context identical to the vars (#7095) (0f09e35)

  • Feat(css/minifier) Follow the CSS spec more rigorously (#6291)

Description:

Full refactor of the "calc" simplification to be more compliant with the spec. (df09d2f)

Refactor

  • (es/fixer) Move comments with the insertion order (#7097) (f250f24)

  • (es/resolver) Make syntax context for unresolved and top-level stable (#7096) (c114f00)

[1.3.41] - 2023-03-17

Bug Fixes

  • (bindings/cli) Change order of checking inputs to workaround a Windows issue (#7077) (7bbec92)

  • (css/codegen) Respect raw of Str (#7078) (7849a2d)

  • (css/parser) Fix parsing of :global(> *) (#7082) (60f74ea)

  • (es/codegen) Emit type_params for TsConstructSignatureDecl (#7080) (8353acc)

  • (es/minifier) Preserve delete of unresolved variables (#7072) (86295ba)

  • (es/minifier) Accept keep_fnames and keep_classnames (#7090) (0086914)

  • (es/minifier) Remove wrong optimization of new RegExp(…) (#7091) (493a4f7)

  • (es/react) Align to babel@8 behavior (#7081) (7b491a6)

  • (testing) Ignore non_snake_case for generated test names (#7087) (1c254b1)

Performance

  • (es/lexer) Use jump table for skip_space (#7073) (f854d51)

Refactor

  • Fix lints using clippy from nightly-2023-03-13 (#6920) (963c460)

[1.3.40] - 2023-03-13

Bug Fixes

  • (bindings/cli) Update swc_ecma_ast (#7060) (1b40689)

  • (es) Support stable rustc again (#7057) (fbb3016)

  • (es) Respect the value of assumptions (#7065) (11d4874)

  • (es/ast) Fix memory layout (#7062) (085c6f3)

  • (es/compat) Handle useDefineForClassFields: false (#7055) (bb6dde7)

  • (es/compat) Insert the variable declaration nearest to the available statements (#7067) (ae348e3)

  • (es/parser) Handle class members with accessor as the name (#7046) (9acaf4d)

  • (es/preset-env) Update data for core-js3 (#7023) (3730463)

Features

  • (es/compat) Simplify static blocks in classes (#7056) (b78ce8b)

Miscellaneous Tasks

Performance

[1.3.39] - 2023-03-10

Bug Fixes

  • (es/minifier) Bailout regex optimization on invalid flags (#7020) (1318afe)

  • (es/transforms) Handle member object in missing else branch (#7027) (5c7c8e0)

  • (es/transforms) Handle object shorthand in const_modules (#7022) (0314869)

Documentation

Features

  • (common) Add an API to create a SourceFile without allocation (#7029) (81495f5)

Miscellaneous Tasks

Performance

  • (atoms) Update string-cache for per-bucket mutex (#6980) (9841f0b)

  • (es/ast) Shrink size of Expr (#7041) (a9fe1d2)

  • (es/lexer) Use string searcher for lexing line comments (#7043) (962b0fc)

  • (es/parser) Use Cow for _ in numeric literals (#7031) (30546a2)

  • (es/parser) Use SmartString as the buffer (#7033) (f378a14)

  • (es/utils) Introduce NodeIgnoringSpan (#7030) (8bfef35)

Testing

[1.3.38] - 2023-03-06

Bug Fixes

  • (bindings/node) Fix visitBindingIdentifier (#7000) (30cff01)

  • (es) Allow any kind of input source maps if it's enabled (#7002) (da5367b)

  • (es/minifier) Don't skip expressions with side effects from seq inliner (#7007) (cfeb088)

  • (es/minifier) Don't create invalid property names (#7010) (bb2486c)

  • (es/parser) Fix parsing of an array spread in tsx properties (#7011) (6d6731f)

  • (es/preset-env) Move findLast and findLastIndex to finished proposals (#7012) (b46a724)

  • (es/typescript) Treat export default declarations as declarations (#7017) (34f9ad3)

Features

  • (es/minifier) Optimize calls to Boolean/Number/String/Symbol (#7006) (06cbb90)

  • (es/parser) Support auto accessors (#6981) (37533a2)

  • (es/parser) Add an option to disallow ambiguous jsx (#6913) (a6471f3)

  • (es/transforms) Add an option to drop unused imports (#6962) (67d0a89)

  • (es/transforms) Support namespace imports from const_modules (#7013) (3cb03d5)

  • (es/typescript) Support export type * from "mod" (#6867) (beb38d3)

Miscellaneous Tasks

Refactor

  • (es/parser) Make lexer not generic over Input (#6993) (367ac82)