Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
251 changes: 126 additions & 125 deletions Cargo.lock

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,34 @@ sha2 = "0.10"
similar-asserts = "1.4.2"
swc_atoms = "10.0.0"
swc_cached = "2.0.0"
swc_common = "25.0.0"
swc_core = "76.0.0"
swc_css_ast = "25.0.0"
swc_css_codegen = "25.0.0"
swc_css_compat = "25.0.0"
swc_css_minifier = "25.0.0"
swc_css_parser = "25.0.0"
swc_css_prefixer = "30.0.0"
swc_css_visit = "25.0.0"
swc_ecma_ast = "28.0.0"
swc_ecma_codegen = "31.0.0"
swc_ecma_minifier = "60.0.0"
swc_ecma_parser = "44.0.0"
swc_ecma_transforms = "61.0.0"
swc_ecma_transforms_base = "48.0.0"
swc_ecma_transforms_react = "54.0.0"
swc_ecma_transforms_testing = "52.0.0"
swc_ecma_utils = "34.0.0"
swc_ecma_visit = "28.0.0"
swc_common = "26.0.0"
swc_core = "77.0.0"
swc_css_ast = "26.0.0"
swc_css_codegen = "26.0.0"
swc_css_compat = "26.0.0"
swc_css_minifier = "26.0.0"
swc_css_parser = "26.0.0"
swc_css_prefixer = "31.0.0"
swc_css_visit = "26.0.0"
swc_ecma_ast = "29.0.0"
swc_ecma_codegen = "32.0.0"
swc_ecma_minifier = "61.0.0"
swc_ecma_parser = "45.0.0"
swc_ecma_transforms = "62.0.0"
swc_ecma_transforms_base = "49.0.0"
swc_ecma_transforms_react = "55.0.0"
swc_ecma_transforms_testing = "53.0.0"
swc_ecma_utils = "35.0.0"
swc_ecma_visit = "29.0.0"
swc_plugin_macro = "2.0.0"
swc_plugin_proxy = "29.0.0"
swc_plugin_proxy = "30.0.0"
swc_sourcemap = "10.0.2"
swc_trace_macro = "2.0.2"
testing = "26.0.0"
testing = "27.0.0"
tracing = "0.1.40"
widestring = "1.0.2"

swc_icu_messageformat_parser = { version = "35.0.0", path = "./crates/swc_icu_messageformat_parser" }
swc_icu_messageformat_parser = { version = "36.0.0", path = "./crates/swc_icu_messageformat_parser" }


[profile.release]
Expand Down
6 changes: 6 additions & 0 deletions contrib/graphql-codegen-client-preset/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @swc-contrib/plugin-graphql-codegen-client-preset

## 0.32.0

### Minor Changes

- 74931df: build!: Update swc_core to v77.0.0

## 0.31.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion contrib/graphql-codegen-client-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc-contrib/plugin-graphql-codegen-client-preset",
"version": "0.31.0",
"version": "0.32.0",
"publishConfig": {
"access": "public",
"provenance": true
Expand Down
6 changes: 6 additions & 0 deletions contrib/mut-cjs-exports/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @swc-contrib/mut-cjs-exports

## 15.0.0

### Major Changes

- 74931df: build!: Update swc_core to v77.0.0

## 14.19.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion contrib/mut-cjs-exports/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT"
name = "swc_mut_cjs_exports"
readme = "README.md"
repository = "https://github.com/magic-akari/swc_mut_cjs_exports"
version = "27.0.0"
version = "28.0.0"

[lib]
crate-type = ["cdylib", "lib"]
Expand Down
6 changes: 3 additions & 3 deletions contrib/mut-cjs-exports/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc-contrib/mut-cjs-exports",
"version": "14.19.0",
"version": "15.0.0",
"publishConfig": {
"access": "public",
"provenance": true
Expand Down Expand Up @@ -41,7 +41,7 @@
"jest": "^29.7.0"
},
"peerDependencies": {
"@swc/core": "^1.10.0",
"@swc/core": "^1.16.0",
"@swc/jest": "^0.2.37"
}
}
}
2 changes: 1 addition & 1 deletion contrib/mut-cjs-exports/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl TransformVisitor {
vec![Function {
params: vec![key.clone().into()],
span: DUMMY_SP,
body: Some(BlockStmt {
body: Some(FunctionBody {
stmts: vec![
// if (key === "default" || key === "__esModule") return;
IfStmt {
Expand Down
2 changes: 1 addition & 1 deletion contrib/mut-cjs-exports/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub(crate) fn prop_method_setter(ident: Ident) -> Prop {
let setter_param = private_ident!("v");
let params = vec![setter_param.clone().into()];

let body = BlockStmt {
let body = FunctionBody {
stmts: vec![setter_param
.make_assign_to(op!("="), ident.clone().into())
.into_stmt()],
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_experimental_babel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
rust-version = { workspace = true }
version = "16.0.0"
version = "17.0.0"

[dependencies]
anyhow = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_feature_flags/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
description = "Feature flag transformation for SWC - build-time marking and runtime dead code elimination"
name = "swc_feature_flags"
version = "16.0.0"
version = "17.0.0"

authors = { workspace = true }
edition = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_icu_messageformat_parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = { workspace = true }
license = { workspace = true }
name = "swc_icu_messageformat_parser"
repository = { workspace = true }
version = "35.0.0"
version = "36.0.0"


[features]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@swc/core": "^1.15.43",
"@swc/core": "^1.16.0",
"@taplo/cli": "^0.7.0",
"@types/node": "^22.13.9",
"husky": "^9.0.11",
Expand Down
6 changes: 6 additions & 0 deletions packages/emotion/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @swc/plugin-emotion

## 15.0.0

### Major Changes

- 74931df: build!: Update swc_core to v77.0.0

## 14.19.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/emotion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ swc_core = { workspace = true, features = ["ecma_plugin_transform"] }
swc_ecma_ast = { workspace = true }
swc_ecma_utils = { workspace = true }
swc_ecma_visit = { workspace = true }
swc_emotion = { path = "./transform", version = "16.0.0" }
swc_emotion = { path = "./transform", version = "17.0.0" }
swc_plugin_macro = { workspace = true }
swc_plugin_proxy = { workspace = true }
tracing = { workspace = true, features = ["release_max_level_off"] }
6 changes: 6 additions & 0 deletions packages/emotion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ Source code for plugin itself (not transforms) are copied from https://github.co

# @swc/plugin-emotion

## 15.0.0

### Major Changes

- 74931df: build!: Update swc_core to v77.0.0

## 14.19.0

### Minor Changes
Expand Down
4 changes: 1 addition & 3 deletions packages/emotion/__tests__/__snapshots__/wasm.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ export var anotherStyle = /*#__PURE__*/ css("color:red;", "label:anotherStyle");

exports[`Should transform emotion css correctly 1`] = `
"function _tagged_template_literal(strings, raw) {
if (!raw) {
raw = strings.slice(0);
}
if (!raw) raw = strings.slice(0);
return Object.freeze(Object.defineProperties(strings, {
raw: {
value: Object.freeze(raw)
Expand Down
2 changes: 1 addition & 1 deletion packages/emotion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/plugin-emotion",
"version": "14.19.0",
"version": "15.0.0",
"description": "SWC plugin for emotion css-in-js library",
"main": "swc_plugin_emotion.wasm",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/emotion/transform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = { workspace = true }
name = "swc_emotion"
repository = { workspace = true }
rust-version = { workspace = true }
version = "16.0.0"
version = "17.0.0"


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
6 changes: 6 additions & 0 deletions packages/feature-flags/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @swc/plugin-experimental-feature-flags

## 0.19.0

### Minor Changes

- 74931df: build!: Update swc_core to v77.0.0

## 0.18.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/feature-flags/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ swc_common = { workspace = true, features = ["concurrent"] }
swc_core = { workspace = true, features = ["ecma_plugin_transform"] }
swc_ecma_ast = { workspace = true }
swc_ecma_visit = { workspace = true }
swc_feature_flags = { path = "../../crates/swc_feature_flags", version = "16.0.0" }
swc_feature_flags = { path = "../../crates/swc_feature_flags", version = "17.0.0" }
6 changes: 6 additions & 0 deletions packages/feature-flags/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,12 @@ This package includes TypeScript definitions. See `types.d.ts` for the full API.

# @swc/plugin-experimental-feature-flags

## 0.19.0

### Minor Changes

- 74931df: build!: Update swc_core to v77.0.0

## 0.18.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/feature-flags/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/plugin-experimental-feature-flags",
"version": "0.18.0",
"version": "0.19.0",
"publishConfig": {
"access": "public",
"provenance": true
Expand Down
6 changes: 6 additions & 0 deletions packages/formatjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @swc/plugin-formatjs

## 10.0.0

### Major Changes

- 74931df: build!: Update swc_core to v77.0.0

## 9.19.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/formatjs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ swc_core = { workspace = true, features = [
"ecma_plugin_transform",
"ecma_ast_serde",
] }
swc_formatjs_transform = { path = "./transform", version = "39.0.0" }
swc_formatjs_transform = { path = "./transform", version = "40.0.0" }
6 changes: 6 additions & 0 deletions packages/formatjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ Will extract the metadata: `{project: "web", locale: "en", region: "us"}` that g

# @swc/plugin-formatjs

## 10.0.0

### Major Changes

- 74931df: build!: Update swc_core to v77.0.0

## 9.19.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/formatjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/plugin-formatjs",
"version": "9.19.0",
"version": "10.0.0",
"publishConfig": {
"access": "public",
"provenance": true
Expand Down
4 changes: 2 additions & 2 deletions packages/formatjs/transform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = { workspace = true }
license = { workspace = true }
name = "swc_formatjs_transform"
repository = { workspace = true }
version = "39.0.0"
version = "40.0.0"

[features]
custom_transform = []
Expand All @@ -31,7 +31,7 @@ swc_ecma_minifier = { workspace = true }

swc_icu_messageformat_parser = { features = [
"utf16",
], path = "../../../crates/swc_icu_messageformat_parser", version = "35.0.0" }
], path = "../../../crates/swc_icu_messageformat_parser", version = "36.0.0" }

[dev-dependencies]
pretty_assertions = { workspace = true }
Expand Down
18 changes: 13 additions & 5 deletions packages/formatjs/transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ use swc_core::{
ecma::{
ast::{
ArrayLit, AssignExpr, AssignTarget, BinaryOp, BlockStmt, Bool, CallExpr, Callee, Expr,
ExprOrSpread, Id, IdentName, JSXAttr, JSXAttrName, JSXAttrOrSpread, JSXAttrValue,
JSXElementName, JSXExpr, JSXExprContainer, JSXNamespacedName, JSXOpeningElement,
KeyValueProp, Lit, MemberExpr, MemberProp, ModuleDecl, ModuleItem, Number, ObjectLit,
Pat, Prop, PropName, PropOrSpread, SimpleAssignTarget, Stmt, Str, Tpl, UnaryOp,
VarDecl, VarDeclKind, VarDeclarator,
ExprOrSpread, FunctionBody, Id, IdentName, JSXAttr, JSXAttrName, JSXAttrOrSpread,
JSXAttrValue, JSXElementName, JSXExpr, JSXExprContainer, JSXNamespacedName,
JSXOpeningElement, KeyValueProp, Lit, MemberExpr, MemberProp, ModuleDecl, ModuleItem,
Number, ObjectLit, Pat, Prop, PropName, PropOrSpread, SimpleAssignTarget, Stmt, Str,
Tpl, UnaryOp, VarDecl, VarDeclKind, VarDeclarator,
},
visit::{noop_visit_mut_type, VisitMut, VisitMutWith},
},
Expand Down Expand Up @@ -1437,6 +1437,14 @@ impl<C: Clone + Comments, S: SourceMapper> VisitMut for FormatJSVisitor<C, S> {
block.visit_mut_children_with(self);
}

fn visit_mut_function_body(&mut self, body: &mut FunctionBody) {
for stmt in &body.stmts {
self.collect_stmt_bindings(stmt);
}

body.visit_mut_children_with(self);
}

fn visit_mut_jsx_opening_element(&mut self, jsx_opening_elem: &mut JSXOpeningElement) {
jsx_opening_elem.visit_mut_children_with(self);

Expand Down
6 changes: 6 additions & 0 deletions packages/jest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @swc/plugin-jest

## 13.0.0

### Major Changes

- 74931df: build!: Update swc_core to v77.0.0

## 12.19.0

### Minor Changes
Expand Down
6 changes: 6 additions & 0 deletions packages/jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

# @swc/plugin-jest

## 13.0.0

### Major Changes

- 74931df: build!: Update swc_core to v77.0.0

## 12.19.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/plugin-jest",
"version": "12.19.0",
"version": "13.0.0",
"publishConfig": {
"access": "public",
"provenance": true
Expand Down
Loading
Loading