unstale

npm / @swc/core

@swc/core

What changed in @swc/core 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.

8 breaking2 security16 new APIs and options9 performance8 behavior and defaults217 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@swc/core 1260 changes

Breaking changes 8

  • Fixes AST roundtrip bugs and implements missing conversions, changing ESTree conversion behavior.

    1.16.17release notes

  • The native addon's minimum supported Rust version is raised to 1.85.

    1.16.17release notes

  • The parser rejects unicode escapes in RegExp flags.

    1.16.12release notes

  • Adds body_ctxt to the Switch AST node, changing the AST structure.

    1.16.0release notes

  • Uses Function for object accessors in the AST, changing the AST representation.

    1.16.0release notes

  • The React Compiler no longer uses the React-like prefilter.

    1.15.46release notes

  • Fast strip now rejects unsafe assertion erasure in binary expressions.

    1.15.40release notes

  • The parser now rejects object-rest assignment to array and object literals.

    1.15.40release notes

Security 2

  • Falls back to a safe cache root on Unix.

    1.16.18release notes

  • Bindings fall back to a secure Windows profile cache.

    1.16.17release notes

New APIs and options 16

  • Code generation now supports configurable output indentation.

    1.16.17release notes

  • Bindings now allow opting out of Unix cache root security checks.

    1.16.17release notes

  • moduleRoot is supported for AMD module IDs.

    1.16.12release notes

  • Adds opt-in parser-only TSRX lowering.

    1.16.2release notes

  • Introduces FunctionBody in the AST.

    1.16.0release notes

  • Exposes reactCompiler.environment.enableFunctionOutlining as a configuration option.

    1.15.47release notes

  • The @swc/nodejs-support-wasm package was added.

    1.15.46release notes

  • The bindings add lint and lintSync APIs to @swc/react-compiler.

    1.15.46release notes

  • Adds React Compiler support to SWC.

    1.15.43release notes

  • Adds jsc.preserveSymlinks to swc::Options.

    1.15.32release notes

  • Adds support for extracting comments during minification.

    1.15.30release notes

  • Adds an opt-in resolver that preserves symlinks.

    1.15.30release notes

  • Adds support for the 2023-11 decorators proposal.

    1.15.21release notes

  • Flow stripping is enabled in @swc/core, with parser syntax support and compatibility work for core syntax gaps and Hermes parity.

    1.15.21release notes

  • npm bindings now support linux ppc64le and s390x.

    1.15.21release notes

  • Implements the named-capturing-groups regex transform.

    1.15.21release notes

Performance 9

  • Compatibility transforms skip empty block-scoping renames.

    1.16.17release notes

  • The parser scans template literals with byte search.

    1.16.17release notes

  • The first load of the macOS native addon is optimized.

    1.16.13release notes

  • Deflating browserslist reduces binary size.

    1.16.12release notes

  • Skips identity rename mappings when applying renames.

    1.15.47release notes

  • Position and source map tracking in JsWriter is faster.

    1.15.40release notes

  • Minifier profiling hotspots are reduced.

    1.15.40release notes

  • The ES parser optimizes comment finalization.

    1.15.40release notes

  • Transformer compatibility overhead is reduced.

    1.15.40release notes

Behavior and default changes 8

  • The minifier can evaluate Math.floor, Math.ceil, Math.round and additional Math functions.

    1.16.2release notes

  • The minifier expands its support for trivial spreads.

    1.15.47release notes

  • The minifier removes unused parameters for new Function or Class expressions.

    1.15.46release notes

  • The minifier removes unused parameters for new expressions.

    1.15.46release notes

  • The minifier adds fine-grained effect analysis of classes.

    1.15.40release notes

  • The minifier removes useless arguments for callees that are not inlined.

    1.15.24release notes

  • React Compiler dependency handling gains parity with upstream.

    1.15.24release notes

  • React Compiler validation and diagnostics gain parity with upstream, including early-return, hooks, memo, lint-gating, and validation aggregation behavior.

    1.15.24release notes

Fixes and other changes 217

  • The minifier checks declarations for side effects.

    1.16.18release notes

  • Compatibility transforms preserve consecutive loop labels.

    1.16.17release notes

  • Preset-env lowers for-await in native async functions.

    1.16.17release notes

  • The fixer preserves parentheses in JSX sequence expressions.

    1.16.17release notes

  • Protects long call chains from stack overflow.

    1.16.17release notes

  • With out-dir, source map paths are resolved relative to the output.

    1.16.17release notes

  • Options object deserialization failures now show why deserialization failed, making configuration errors easier to diagnose.

    1.16.13release notes

  • The HTML minifier preserves adjacent script elements.

    1.16.12release notes

  • Node.js completes Amaro REPL support APIs.

    1.16.12release notes

  • Ambient function declarations allow eval and arguments.

    1.16.12release notes

  • The parser allows trailing commas after ambient rest parameters.

    1.16.12release notes

  • Minification preserves arguments after IIFE spreads.

    1.16.12release notes

  • Minification preserves Array spread arity.

    1.16.12release notes

  • The parser preserves elisions in arrow binding patterns.

    1.16.12release notes

  • The minifier avoids inlining an arrow with this when it is used as an argument.

    1.16.12release notes

  • Minification preserves async IIFE return values.

    1.16.12release notes

  • Explicit Script parsing allows await identifiers.

    1.16.12release notes

  • The parser allows of bindings in await using loops.

    1.16.12release notes

  • Branches are preserved when assignments are collapsed.

    1.16.12release notes

  • Minification preserves catch assignments before finally blocks.

    1.16.12release notes

  • Minification preserves catch returns before finally blocks.

    1.16.12release notes

  • Minification preserves class scope when negating if-return statements.

    1.16.12release notes

  • The minifier checks class side effects.

    1.16.12release notes

  • Minification preserves computed update targets.

    1.16.12release notes

  • Minification preserves conditional assignment target order.

    1.16.12release notes

  • Minification preserves effects from constant switch tests.

    1.16.12release notes

  • Constructor function contexts are isolated.

    1.16.12release notes

  • The HTML parser preserves customizable select markup.

    1.16.12release notes

  • The parser respects line breaks after declare.

    1.16.12release notes

  • Valid declare readonly field initializers are accepted.

    1.16.12release notes

  • The parser respects line breaks before definite assignment assertions.

    1.16.12release notes

  • Minification preserves delete operand effects.

    1.16.12release notes

  • Minification preserves destructuring patterns with PURE-annotated initializers.

    1.16.12release notes

  • Properties assigned through destructuring targets are marked as mutated.

    1.16.12release notes

  • Minification preserves empty array assignments.

    1.16.12release notes

  • Minification preserves empty IIFE parameter effects.

    1.16.12release notes

  • Minification preserves empty join coercion.

    1.16.12release notes

  • Minification preserves errors from empty object destructuring.

    1.16.12release notes

  • The parser allows line breaks before enum names.

    1.16.12release notes

  • Escaped keywords are accepted as property names.

    1.16.12release notes

  • The Node binding returns an error when a file cannot be read instead of panicking.

    1.16.12release notes

  • Minification preserves finalizer breaks in switches.

    1.16.12release notes

  • Minification preserves finalizer completions.

    1.16.12release notes

  • Folded Object.keys results are deduplicated.

    1.16.12release notes

  • Minification preserves function expression names.

    1.16.12release notes

  • Minification preserves Function.length arity.

    1.16.12release notes

  • The code generator separates generic type assertion openers.

    1.16.12release notes

  • Global defs respect root bindings.

    1.16.12release notes

  • Minification preserves holes in array joins.

    1.16.12release notes

  • The parser allows line breaks before import attributes.

    1.16.12release notes

  • Flow match patterns support leading pipes.

    1.16.12release notes

  • Let initialization is preserved when unused variables are dropped.

    1.16.12release notes

  • Minification preserves lexical method defaults.

    1.16.12release notes

  • Local deletes are folded to false.

    1.16.12release notes

  • Minification preserves lone surrogate template values.

    1.16.12release notes

  • A missing codePointAt is folded to undefined.

    1.16.12release notes

  • The parser recognizes named optional and rest tuple elements.

    1.16.12release notes

  • Lowering nested object rest preserves array rest.

    1.16.12release notes

  • Non-decimal numeric literals are rounded correctly.

    1.16.12release notes

  • The minifier drops unused object pattern defaults.

    1.16.12release notes

  • Prototype setters are skipped when optimizing Object.keys.

    1.16.12release notes

  • Minification preserves throws from optional-chain continuations.

    1.16.12release notes

  • Optional-chained enum member reads are folded.

    1.16.12release notes

  • The parser accepts optional generator methods.

    1.16.12release notes

  • Property callees are hoisted safely.

    1.16.12release notes

  • Minification preserves access to reassigned arguments.

    1.16.12release notes

  • The parser accepts optional renamed Flow component parameters.

    1.16.12release notes

  • Rest params are retained in dynamic scopes.

    1.16.12release notes

  • Minification preserves rest RegExp identity.

    1.16.12release notes

  • Minification preserves returns in finalizers.

    1.16.12release notes

  • Function and class declarations are retained when their self-reference is dropped.

    1.16.12release notes

  • Minification preserves sequence IIFE argument evaluation.

    1.16.12release notes

  • Sequences are not merged across array spreads.

    1.16.12release notes

  • Minification preserves Set and Map iteration.

    1.16.12release notes

  • Minification preserves shadowed undefined yield values.

    1.16.12release notes

  • The minifier guards similar if merges.

    1.16.12release notes

  • Minification preserves spread iteration in unused builtins.

    1.16.12release notes

  • The parser resets static block context for nested declarations.

    1.16.12release notes

  • The parser accepts static constructor methods in JavaScript.

    1.16.12release notes

  • Static helper evaluation is guarded during minification.

    1.16.12release notes

  • The parser restores strict context after classes.

    1.16.12release notes

  • Minification preserves strict equality for repeated calls.

    1.16.12release notes

  • The parser allows string import and export names after type.

    1.16.12release notes

  • Minification preserves string import names.

    1.16.12release notes

  • Minification preserves string method arguments.

    1.16.12release notes

  • String.raw templates are evaluated using raw quasis.

    1.16.12release notes

  • Minification preserves switch fallthrough cases.

    1.16.12release notes

  • Template raw values are decoded when the cooked value is missing.

    1.16.12release notes

  • Tiny toPrecision calls are preserved.

    1.16.12release notes

  • toExponential formatting is made compatible.

    1.16.12release notes

  • Type references named asserts are preserved before line breaks.

    1.16.12release notes

  • Minification preserves unary comparison evaluation order.

    1.16.12release notes

  • The code generator minifies unicode escapes in template literals.

    1.16.12release notes

  • Unsafe Symbol call arguments are retained.

    1.16.12release notes

  • Minification preserves unsigned shift coercion.

    1.16.12release notes

  • The minifier checks eval and arguments usage in var define scope.

    1.16.12release notes

  • Retries parsing when a Program is ambiguous.

    1.16.2release notes

  • Preserves grammar boundaries for await expressions during parsing.

    1.16.2release notes

  • Restores await parsing in the quote feature.

    1.16.2release notes

  • Drops spans from cached globals values during minification.

    1.16.2release notes

  • Avoids replacing value-used console.*.bind() calls with undefined.

    1.16.2release notes

  • Drops parameters from a getter that replaces a decorated private method.

    1.16.2release notes

  • Preserves control-flow targets in do-while loops during minification.

    1.16.2release notes

  • Preserves Flow component type semantics.

    1.16.2release notes

  • Reports for-loop var declarations as assignments during minification.

    1.16.2release notes

  • Preserves the scope of var bindings in for-of loops during compatibility transforms.

    1.16.2release notes

  • Preserves bindings in copied inline arrow functions.

    1.16.2release notes

  • The visitor now panics on invalid AST paths.

    1.16.2release notes

  • Avoids a loop when inlining JSX sequences.

    1.16.2release notes

  • Corrects marking for update and test expressions as executed multiple times.

    1.16.2release notes

  • Keys the optimizer environment cache by configured values.

    1.16.2release notes

  • Preserves ownership of pure annotations during minification.

    1.16.2release notes

  • Preserves effects of calls whose values are returned.

    1.16.2release notes

  • Treats const variable references as enum constants.

    1.16.2release notes

  • The ES minifier preserves for init expressions.

    1.16.1release notes

  • The React transform handles apos JSX entities.

    1.16.1release notes

  • SystemJS output preserves destructuring assignment targets.

    1.16.1release notes

  • Fixes parameter injection involving bound arguments in the minifier.

    1.16.0release notes

  • Fixes an incorrect fields count in encoding.

    1.16.0release notes

  • Fixes a panic when processing JSX surrogate entities.

    1.16.0release notes

  • Prevents mutable reference escape in the ES AST.

    1.16.0release notes

  • Makes the React Compiler fast check more conservative.

    1.16.0release notes

  • Preserves this in static field parameters.

    1.16.0release notes

  • Preserves TypeScript function overload signatures in the React Compiler.

    1.16.0release notes

  • Splits TypeScript this parameters in the AST.

    1.16.0release notes

  • Lowers async generators unsupported by the target environment.

    1.16.0release notes

  • Removes unused variable initializer cycles in the minifier.

    1.16.0release notes

  • The minifier preserves non-canonical arguments access.

    1.15.47release notes

  • The minifier preserves invalid Array lengths.

    1.15.47release notes

  • The minifier applies ToInt32 when folding bitwise NOT.

    1.15.47release notes

  • Preserves top-level declarations referenced only by direct eval.

    1.15.47release notes

  • Evaluates cooked enum templates.

    1.15.47release notes

  • The TypeScript fast-strip transform preserves ASI before interpolated templates.

    1.15.47release notes

  • Preserves JSON numeric values during optimization.

    1.15.47release notes

  • The HTML minifier preserves JSON script boundaries.

    1.15.47release notes

  • Prevents class state from leaking when nested classes are undecorated.

    1.15.47release notes

  • Transforms non-finite enum values using numeric literals.

    1.15.47release notes

  • Supports hashing non-finite numbers in the JavaScript AST.

    1.15.47release notes

  • Code generation now emits non-finite numeric literals.

    1.15.47release notes

  • The minifier uses numeric literals for non-finite values.

    1.15.47release notes

  • Avoids inexact number radix folding in the minifier.

    1.15.47release notes

  • Preserves the identity of numeric property keys.

    1.15.47release notes

  • The minifier indexes strings by UTF-16 code unit.

    1.15.47release notes

  • The minifier applies ToUint16 when evaluating fromCharCode.

    1.15.47release notes

  • The TypeScript fast-strip transform preserves UTF-16 source positions.

    1.15.47release notes

  • React Compiler scope resolution for catches and parameters was corrected.

    1.15.46release notes

  • The default hygiene pass ignores eval.

    1.15.46release notes

  • The fixer now normalizes identifier patterns in for-head positions.

    1.15.46release notes

  • Fast TypeScript stripping now handles line breaks in generic arrows.

    1.15.46release notes

  • The minifier’s IIFE invocation behavior was adjusted in relation to eval.

    1.15.46release notes

  • The minifier’s IIFE invocation behavior was adjusted for cases with eval.

    1.15.46release notes

  • The React transform emits jsxdev source for fragments.

    1.15.46release notes

  • The minifier now checks the last case.

    1.15.46release notes

  • The minifier measures number length precisely.

    1.15.46release notes

  • The fixer preserves parentheses around PURE-annotated receivers.

    1.15.46release notes

  • Relative symlinked inputs are resolved from the current working directory.

    1.15.46release notes

  • The minifier preserves switch fallthrough termination.

    1.15.46release notes

  • The SystemJS transform was rewritten.

    1.15.46release notes

  • Module transforms rewrite .tsx imports to .js unless JSX is preserved.

    1.15.46release notes

  • The minifier can eliminate unused classes that have cyclic references.

    1.15.46release notes

  • Infect Collect now collects every used identifier.

    1.15.46release notes

  • The React compiler treats these blocks as variable boundaries.

    1.15.43release notes

  • The parser now parses Flow bare renders types.

    1.15.43release notes

  • The minifier performs this conversion only when the unsafe flag is enabled.

    1.15.43release notes

  • Corrects scope handling for private property brand checks in ES2022 output.

    1.15.43release notes

  • The React compiler no longer reports non-fatal success errors as diagnostics.

    1.15.43release notes

  • Preserves cooked values when the minifier concatenates template literals.

    1.15.43release notes

  • The React compiler scope collector skips TypeScript this pseudo-parameters.

    1.15.43release notes

  • Fixes React compiler AST conversion for wrapped assignment targets.

    1.15.43release notes

  • AST transforms preserve source context.

    1.15.41release notes

  • The renamer avoids duplicate mangled names across eval scope boundaries.

    1.15.41release notes

  • Code generation emits export as namespace correctly, including when minified.

    1.15.41release notes

  • The parser handles Flow async generic arrows.

    1.15.41release notes

  • Plugins no longer import __free from env.

    1.15.41release notes

  • Decorator metadata handling now supports import types.

    1.15.41release notes

  • Plugin errors preserve their context.

    1.15.41release notes

  • Fixes a sourcemap panic for multibyte mapping positions.

    1.15.41release notes

  • The fixer preserves parentheses around new tagged template callees.

    1.15.41release notes

  • Compatibility transforms rewrite this correctly in destructuring defaults.

    1.15.41release notes

  • The minifier handles unknown member properties.

    1.15.41release notes

  • The minifier now preserves object properties in default parameters.

    1.15.40release notes

  • Fast DTS now strips definite assertions in generated declarations.

    1.15.40release notes

  • The minifier now preserves arguments for destructured callbacks.

    1.15.40release notes

  • The minifier now respects ecma when generating IIFE temporary variables.

    1.15.40release notes

  • The minifier avoids generating mangled property names that collide with existing properties.

    1.15.40release notes

  • TypeScript declaration output now strips parameter binding defaults.

    1.15.40release notes

  • Self-recursive hooks are now excluded from the React refresh dependency array.

    1.15.40release notes

  • Fixes parsing of empty Flow exact object types.

    1.15.33release notes

  • Fixes the minifier to preserve sequence order in for-loop initializers.

    1.15.33release notes

  • Fixes minifier folding of unary boolean nullish coalescing expressions.

    1.15.33release notes

  • Aligns parser disambiguation for Flow generic arrows and JSX.

    1.15.32release notes

  • Fixes handling of Flow type-only modules in script transforms.

    1.15.32release notes

  • Preserves frozen spread registry keys in the minifier.

    1.15.32release notes

  • Avoids restoring module context when Flow syntax is enabled.

    1.15.32release notes

  • Adds parser support for anonymous keyof indexers in Flow.

    1.15.30release notes

  • Allows return type annotations on Flow constructors.

    1.15.30release notes

  • Supports parsing full ES version values in minify.

    1.15.30release notes

  • Preserves newlines in quoted JSX attributes.

    1.15.30release notes

  • Rewrites class references in non-static members.

    1.15.26release notes

  • The parser now handles mixed Flow anonymous callable parameters.

    1.15.26release notes

  • Preserves super references in moved static members and scopes their rewrite correctly.

    1.15.26release notes

  • The enum transformation now handles TypeScript expressions.

    1.15.26release notes

  • The minifier now inlines property shorthand in computed props.

    1.15.24release notes

  • The 2023-11 implicit-global rewrite is now scoped to decorator-lifted expressions, avoiding unintended rewrites elsewhere.

    1.15.24release notes

  • The parser closes Flow syntax gaps by parsing key Flow forms.

    1.15.24release notes

  • The minifier now caps deep if_return conditional chains.

    1.15.24release notes

  • The regexp transform preserves source for wrapped named groups.

    1.15.24release notes

  • HTML code generation keeps the closing paragraph tag for paragraphs with a span parent.

    1.15.24release notes

  • The minifier now handles toExponential(undefined).

    1.15.24release notes

  • Preserves an explicit index.js import path when baseUrl is set.

    1.15.21release notes

  • Resolves issues with the 2022-03 decorators behavior.

    1.15.21release notes

  • The Rust CLI binary now honors externalHelpers=false.

    1.15.21release notes

  • The fixer now wraps newly generated optional chains.

    1.15.21release notes

  • Skips mkdir when the output file targets the current directory.

    1.15.21release notes

  • Module rewriting now avoids changing unknown relative extensions.

    1.15.21release notes

  • Falls back to the system allocator on linux gnu s390x and powerpc.

    1.15.21release notes

  • Fixes minifier compatibility for Wasm plugins using swc_ast_unknown.

    1.15.21release notes