83 KiB
Changelog
[unreleased]
Bug Fixes
-
(es/codegen) Check for trailing comments while emitting an arrow (#8257) (0faa2c4)
-
(es/codegen) Fix codegen of type args of an import type and a type query (#8296) (369fb21)
-
(es/decorators) Minimize class declarations transformation (#8245) (6992d83)
-
(es/minifier) Use
cooked
while converting tpls into strings (#8248) (be748f0) -
(es/minifier) Enable seq inliner for const declarations (#8255) (ebcd825)
-
(es/minifier) Keep class with a static block (#8283) (20fb5ba)
-
(es/minifier) Respect
pure_funcs
for tagged tpls (#8280) (1ccfc07) -
(es/minifier) Make
Finalizer
inline literals (#8285) (73fec94) -
(es/minifier) Remove hack for built-in class names (#8293) (7985e02)
-
(es/minifier) Apply new
SyntaxContext
to inlinedArrow
(#8301) (c18a959) -
(es/minifier) Apply new
SyntaxContext
to inlinedArrow
correctly (#8312) (572ad63) -
(es/parser) Consider ASI while parsing TypeScript type aliases (#8263) (e589126)
-
(es/parser) Adjust the context for cond expr while parsing JSX (#8261) (0678c3c)
-
(es/parser) Fix parsing of
import type from from
(#8309) (00b8839) -
(es/proposal) Improve resolving of
design:returntype
(#8303) (fab51e1) -
(es/resolver) Ignore qualifiers of
TsImportType
(#8299) (2113bb3)
Features
Performance
Refactor
Testing
Build
[1.3.97] - 2023-11-09
Bug Fixes
-
(css/modules) Allow out-of-order class names for
composes
(#8218) (aeb9caf) -
(css/modules) Fix handling of
:global()
selector (#8219) (02cd7c2)
Features
Miscellaneous Tasks
Performance
-
(atoms) Update
hstr
to make global APIs fast (#8241) (c01454a) -
(es) Delete useless partition and extend in comments (#8214) (67e2c4a)
-
(es/lexer) Remove needless clones of
Rc<RefCell<AtomStore>>
(#8231) (37657b8) -
(es/minifier) Remove needless operations for char freq analysis (#8222) (b745ed7)
-
(es/parser) Use smarter lookup table for lexer (#8226) (d4ae44a)
-
(es/typescript) Visit ts import/export only once (#8213) (a00f575)
Refactor
Build
-
(cargo) Update rustc to
nightly-2023-11-04
(#8221) (14ea705) -
(preset-env/base) Upgrade
browserslist-rs
tov0.13.0
(#8229) (f9f305c)
[1.3.96] - 2023-11-03
Bug Fixes
-
(es/compat) Make
block-scoping
pass rename exports correctly (#8175) (b13bc32) -
(es/compat) Use dummy span for blocks in
parameters
(#8202) (c1b255a) -
(es/compat) Handle private names from class properties pass (#8090) (83a5a0c)
-
(es/react) Visit children nodes in
jsx-src
pass (#8212) (47733a9) -
(es/transforms) Do not add
PURE
comment toBytePos(0)
(#8207) (c061356) -
(es/typescript) Preserve const enum for named export (#8208) (abced23)
Features
-
(es/minifier) Respect inline level and preserve native names (#8205) (dd805e9)
-
(es/testing) Support babel-like fixture testing officially (#8190) (e960614)
-
(es/testing) Use
__swc_snapshots__
fortest!
macro (#8191) (0aafa75)
Performance
Refactor
[1.3.95] - 2023-10-24
Bug Fixes
-
(es/compat) Don't add pure annotations to dummy spans (#8172) (9ceb57b)
-
(es/minifier) Always consider
reassigned
when inlining (#8168) (c26a225) -
(es/typescript) Support
ts_enum_is_mutable
with const enums (#8171) (02d0613)
Build
[1.3.94] - 2023-10-21
Bug Fixes
-
(css/ast) Make
.hash()
ofToken
not recursive (#8151) (8d7894c) -
(es/minifier) Abort seq inliner if
b
can short-circuit (#8128) (111de26) -
(es/minifier) Abort function inliner if
keep_fnames
istrue
(#8145) (35601e4) -
(es/parser) Skip
this
parameters in setter (#8158) (826386f) -
(es/utils) Skip var declarator name in
RefRewriter
(#8125) (fb81a36)
Features
-
(es/compat) Implement decorator metadata proposal (#8097) (9c029ef)
-
(es/compat) Skip empty class static blocks (#8138) (e186b80)
-
(es/minifier) Evaluate more
toFixed
expressions (#8109) (7da3f52) -
(es/minifier) Inline into the arguments of
new
using seq inliner (#8127) (4f67794) -
(es/parser) Implement
AsRef<str>
forIdentLike
(#8133) (bffe33a) -
(es/typescript) Add
ts_enum_is_mutable
to disable enum inlining (#8115) (57b171d)
Miscellaneous Tasks
Refactor
[1.3.93] - 2023-10-13
Bug Fixes
-
(es/codegen) Fix codegen of type-only imports (#8070) (6f45b46)
-
(es/compat) Handle
__proto__
edge case inshorthand
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/minifier) Don't inline functions if
keep_fnames
is enabled (#8093) (94bb42e)
Features
Miscellaneous Tasks
Refactor
-
(atoms) Remove usage of
js_word!
to dropstring-cache
(#7976) (84cec87) -
(es/compat) Split
swc_ecma_transforms_compat
(#8110) (affb6fb) -
(es/module) Reimplement some functions of module/typescript (#8063) (3e5b062)
-
(es/parser) Introduce
TokenKind
along withToken
(#8071) (9b9bc51) -
(es/preset-env) Rename parameter to avoid confusion (#8106) (95eb147)
[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
andawait
correctly inblock-scoping
pass (#8056) (8318ea8)
Refactor
[1.3.91] - 2023-10-01
Bug Fixes
-
(es/compat) Use return statements for method and setter decorator (#8017) (38bc710)
-
(es/compat) Generate
OptCall
forOptCall
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
Features
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
[1.3.88] - 2023-09-24
Features
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
inlogical_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
[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
istrue
(#7943) (b87ac64)
Features
-
(es/compat) Support
pure_getters
foroptional_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) Fix
jsc.paths
for projects using pnpm (#7918) (a86e9f3)
Features
[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 ofblock-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
-
(es) Add an option to disable builtin transforms (#7873) (71d01ec)
-
(es/ast) Support import attributes proposal (#7868) (4d3fcb8)
-
(swc-info) Add a CLI to help issue reporting (#7871) (d6952ea)
Miscellaneous Tasks
Performance
Refactor
[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
fromTscResolver
(#7866) (11ebae1)
[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/module) Make
jsc.paths
work for a nest.js app (#7852) (d33a973)
Features
Refactor
-
(common) Mark some methods of
Input
unsafe (#7848) (c657324) -
(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
istrue
(#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
Refactor
[1.3.77] - 2023-08-16
Bug Fixes
Features
Refactor
[1.3.76] - 2023-08-10
Bug Fixes
-
(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
Performance
[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
withstart >= 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)
Features
Refactor
-
(es/ast) Avoid
transmute
in impl ofHash
forNumber
(#7771) (2258274) -
(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
Testing
[1.3.72] - 2023-07-28
Bug Fixes
-
(es/compat) Fix handling of private members in optional chaining pass (#7610) (7ba7b6e)
-
(es/module) Do not determine module name for modules without exports in UMD (#7718) (40136f7)
Features
Refactor
[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
Refactor
-
(es/minifier) Respect
toplevel
andmodule
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
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 thegenerator
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
Refactor
Build
[1.3.68] - 2023-07-05
Bug Fixes
-
(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) -
(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) Compress common sub expressions in sequences (#7587) (ff1ad95)
-
(es/optimization) Support
default
imports for const modules (#7604) (ac02b84)
Refactor
[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)
Features
-
(es/minifier) Enable
hoist_props
by default (#7535) (07a8580) -
(es/minifier) Inline constants even if they are exported (#7583) (398e922)
-
(testing) Add
CARGO_TARGET_DIR
and use it from other crates (#7552) (46fb461)
Refactor
Build
[1.3.66] - 2023-06-20
Bug Fixes
-
(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/module) Add
"use strict"
while preserving directives (#7537) (f42fdd2) -
(es/typescript) Don't panic of
@jsxFrag null
(#7540) (76aa91f)
Features
[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
andKeyValuePatProp
(#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/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
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
;
forTsImportEqualsDecl
(#7464) (3935d02) -
(es/parser) Fix parsing of generic jsx element name (#7449) (77850dd)
Features
Miscellaneous Tasks
Testing
[1.3.60] - 2023-05-25
Bug Fixes
-
(es) Init filesystem cache only if plugin exists (#7436) (786cf3a)
-
(es/compat) Fix destructuring handling of
block_scoping
(#7425) (66d52ec) -
(es/compat) Fix variable scoping of object rest pass. (#7437) (f3d660f)
-
(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)
-
(swc_core) Correctly expose plugin with host (#7427) (558ca40)
Features
Refactor
-
(plugin/runner) Add attributes to the module bytes (#7419) (c03a74c)
-
(swc_core) Make
common_plugin_transform
agnostic to mode (#7422) (cfdd407)
[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
Testing
[1.3.58] - 2023-05-15
Bug Fixes
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)
-
(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
Refactor
[1.3.57] - 2023-05-09
Bug Fixes
Features
Refactor
Build
[1.3.56] - 2023-04-29
Bug Fixes
Features
[1.3.55] - 2023-04-25
Bug Fixes
Features
[1.3.54] - 2023-04-25
Bug Fixes
-
(bindings/node) Support
TsSatisfiesExpression
(#7317) (761ef83) -
(common) Workaround the
Arc
andrkyv
issue (#7321) (577f81e) -
(es/compat) Transform curried function call with optional chaining (#7313) (66b5b11)
Testing
[1.3.53] - 2023-04-21
Bug Fixes
-
(es/helpers) Remove unnecessary parameters in
helper_expr!
macro (#7296) (38dfb91) -
(es/modules) Support
jsc.baseUrl
withoutjsc.paths
(#7302) (9c279b8) -
(es/parser) Fix handling of
in
andout
of typescript (#7308) (6f81cb9) -
(testing) Fix path normalization on windows for testing diffs (#7299) (3422923)
Testing
[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
Refactor
Build
[1.3.50] - 2023-04-13
Bug Fixes
-
(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) 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
ifoutput.charset
is not specified (#7258) (1fe5c3a) -
(es/minifier) Support
PURE
comment of seq exprs (#7245) (559d120)