From b54750f284cca64690156a8df4a698b55f12275f Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 19 Aug 2024 10:03:51 +0000 Subject: [PATCH 01/59] chore: Publish `1.7.13-nightly-20240819.1` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 24 +++++++++---------- bindings/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../core/scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 28 files changed, 39 insertions(+), 39 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 22a6b7316dfd9..dc6b8436a80ff 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.12" +version = "1.7.13-nightly-20240819.1" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.12" +version = "1.7.13-nightly-20240819.1" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.12" +version = "1.7.13-nightly-20240819.1" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.375" +version = "0.91.376" dependencies = [ "anyhow", "swc_cli_impl", @@ -3192,9 +3192,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.101.2" +version = "0.101.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a39c81a6a214be4ed421e2ac9f406c9bfe3af72c83d00b416e85ce240c5098" +checksum = "de85ba13fd2151074a55ce155d2d0aec96a85453813cafcd1e543831b9131c30" dependencies = [ "binding_macros", "swc", @@ -3301,9 +3301,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd07cbb52c1ac41115c9ddd5a4d046a7388008bd950b61a48df7f7f490f19827" +checksum = "dade6e0c6e8ddb61281fee2331c3775a920c31535b91e8cace2e0c4eed6158d3" dependencies = [ "arrayvec", "indexmap 2.2.6", @@ -3344,9 +3344,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2017" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a564f1b5e852a0ac656626ba689d49dd2751ba5b980903154aebc971729959d" +checksum = "4aa87a6861b2adc8b0178fb450165101c4396409481c8726ec90ad28398cae5d" dependencies = [ "serde", "swc_atoms", @@ -3763,9 +3763,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.178.0" +version = "0.178.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c7ddb3aae86f19eb9e41b0c62509d8e400c1dc79c0889df98f6df1ab893f3f" +checksum = "b252ea08cfd11e434f4c625ec95493e06c8b000b50eb8e908d76f3325dd5dfa8" dependencies = [ "either", "rustc-hash", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 1aba306b40b07..b34dad45519f7 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -26,7 +26,7 @@ resolver = "2" swc_common = "0.37.3" swc_compiler_base = "0.18.0" swc_config = "0.1.15" - swc_core = "0.101.2" + swc_core = "0.101.3" swc_error_reporters = "0.21.0" swc_fast_ts_strip = "0.6.0" swc_malloc = "0.5.11" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 3e6ed6b3a8d84..ef0b538d03a36 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.12" +version = "1.7.13-nightly-20240819.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index daae4b1ec4280..325476d766d19 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.12" +version = "1.7.13-nightly-20240819.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 054fa236707cd..41cd45ae921e6 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.12" +version = "1.7.13-nightly-20240819.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 5804363440132..c81a7a8360ccb 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.375" +version = "0.91.376" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 293b115b23fb8..9269addd3ef0c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 49687f3fbfb25..cf449e33c1263 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index c2c7fcd336ec8..e452c36f59ef8 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index fd6d6186c6201..4a29edd2678e7 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 48a0e66750d84..224bdab929e9e 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index c09be6a553668..5e4c8d4c6acd3 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 3efea4a1c8401..c1c6676022db6 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 2e5caf299516c..ce1fdb72855ff 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index fa6ec54327213..0a3d72e18e3b9 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index e4e04718fd9b3..ddb5b5a30cf8d 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 2deb06026408c..248e55ca6f5a1 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index fea3dbea17529..c321e243f2992 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 39bc544ed1a86..24d5b1fd2062d 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index d1acddd70c210..e027e8620573a 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 06c0e78e942ad..4540ca5f06c8f 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index b57e2b1f0f28b..3422d28ee4db6 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 4907238d2d57a..eb31003167977 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index cfd532c439e17..139b22e978a27 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index dcee86b9ae04a..b87aba0924410 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index a6bca9551a12d..f900fa105df68 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 40fcae86a9c09..c699f95e2c799 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 141f0bb921730..46e01de3e428d 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.12", + "version": "1.7.13-nightly-20240819.1", "os": [ "win32" ], From 2cd5aea34391c27376fc1bbd3289ba33f7bb312a Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 19 Aug 2024 10:03:52 +0000 Subject: [PATCH 02/59] chore: Update changelog --- CHANGELOG.md | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72dcd67d6ca1a..2ad66de6ea39f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,27 @@ # Changelog +## [unreleased] + +### Bug Fixes + + + +- **(common)** Use `SourceMap::adjust_mappings` in correct order ([#9447](https://github.com/swc-project/swc/issues/9447)) ([05961eb](https://github.com/swc-project/swc/commit/05961eb018e2e76ed5ef95de9bad923b2fe1df88)) + + +- **(es)** Preserve more comments ([#9449](https://github.com/swc-project/swc/issues/9449)) ([673655c](https://github.com/swc-project/swc/commit/673655c1697ff1d507f7acbfa937cbf1f58eb1d9)) + +### Features + + + +- **(es/decorators)** Groundwork for stage 3 decorator ([#9450](https://github.com/swc-project/swc/issues/9450)) ([238ba8b](https://github.com/swc-project/swc/commit/238ba8b1d2220202129595185bd4411b9415cc99)) + +### Refactor + + + +- **(visit)** Remove `VisitAll` ([#9448](https://github.com/swc-project/swc/issues/9448)) ([8845b76](https://github.com/swc-project/swc/commit/8845b76ac40b36791c79618c5ee89f05d2d08c96)) + ## [1.7.12] - 2024-08-19 ### Bug Fixes @@ -1306,16 +1329,4 @@ - **(es/parser)** Parse `await using` in for head ([#8775](https://github.com/swc-project/swc/issues/8775)) ([53fd09c](https://github.com/swc-project/swc/commit/53fd09cbd7f559ea65dbcbf8c77eea1fcf67b691)) -### Miscellaneous Tasks - - - -- **(deps)** Update `sourcemap` to `v8.0.0` ([#8771](https://github.com/swc-project/swc/issues/8771)) ([f8681c9](https://github.com/swc-project/swc/commit/f8681c9299813580849dc39240d29441b6038192)) - -### Build - - - -- **(bindings/node)** Update `sourcemap` ([#8777](https://github.com/swc-project/swc/issues/8777)) ([2920a88](https://github.com/swc-project/swc/commit/2920a88cf772092b63a16d2913704e4e5ebed754)) - From 25edb1c41ea9a6cc46037508775831be2afbd0d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Mon, 19 Aug 2024 19:30:48 +0900 Subject: [PATCH 03/59] chore: Publish crates --- Cargo.lock | 2 +- crates/swc/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4c2b96e547464..a0669e65f56e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3747,7 +3747,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "swc" -version = "0.284.0" +version = "0.284.1" dependencies = [ "ansi_term", "anyhow", diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index 3351be1bc7a94..cc68296f3135b 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc" repository = "https://github.com/swc-project/swc.git" -version = "0.284.0" +version = "0.284.1" [lib] bench = false From b7df16d0a6f0a7141e31d6b87ea73ec10ea3d663 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 19 Aug 2024 10:40:01 +0000 Subject: [PATCH 04/59] chore: Publish `1.7.13-nightly-20240819.2` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 28 +++++++++---------- bindings/Cargo.toml | 4 +-- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../core/scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 28 files changed, 42 insertions(+), 42 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index dc6b8436a80ff..b0a304af8d339 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.13-nightly-20240819.1" +version = "1.7.13-nightly-20240819.2" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.13-nightly-20240819.1" +version = "1.7.13-nightly-20240819.2" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.13-nightly-20240819.1" +version = "1.7.13-nightly-20240819.2" dependencies = [ "anyhow", "getrandom", @@ -2946,9 +2946,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "swc" -version = "0.284.0" +version = "0.284.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fff48619bd4fcc630b885484e314489b4dd772cf5a8fd0f984d90e9c43e32ed" +checksum = "833bb7f4073f08aec7144619a2cf682413b7a0cc8f21b7e76abd2fd02373685d" dependencies = [ "anyhow", "base64", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.376" +version = "0.91.377" dependencies = [ "anyhow", "swc_cli_impl", @@ -3105,9 +3105,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.37.3" +version = "0.37.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4a06183537a32e2213b4eebfacd8e0a3e9191c9c6f6b50fae8c19d808bb601" +checksum = "70265894dfc70e4f01475d3fd11ddfcd25fae781d7352d1228168072ee6a0a40" dependencies = [ "ahash 0.8.11", "anyhow", @@ -3137,9 +3137,9 @@ dependencies = [ [[package]] name = "swc_compiler_base" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d180a1b80ded6073963e96ffaae67bf06a81ac5b2b34af07f950539d5e5c89e" +checksum = "9859d605bfa3ba8323f37bc4f51839c0e21ea59b657f65865388b0adfeb0a413" dependencies = [ "anyhow", "base64", @@ -3220,9 +3220,9 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.118.1" +version = "0.118.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6c1b94abbaf080a4e4ae47101a83d4eedef90d733dd98e32b361356d3f5e4b" +checksum = "a6f866d12e4d519052b92a0a86d1ac7ff17570da1272ca0c89b3d6f802cd79df" dependencies = [ "bitflags 2.6.0", "bytecheck", @@ -3863,9 +3863,9 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.104.5" +version = "0.104.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71f5f97db49b96208805104b381c5e117f55fad5f3d178e626c92934a4d0e36" +checksum = "dbc4752373e273b1d2bc870a7d084a0f765270247fa82b8b9b6d746dd5282647" dependencies = [ "new_debug_unreachable", "num-bigint", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index b34dad45519f7..a864fd007ae6a 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -23,8 +23,8 @@ resolver = "2" serde_json = "1.0.120" sourcemap = "8.0.1" swc_cli_impl = "0.19.0" - swc_common = "0.37.3" - swc_compiler_base = "0.18.0" + swc_common = "0.37.4" + swc_compiler_base = "0.18.1" swc_config = "0.1.15" swc_core = "0.101.3" swc_error_reporters = "0.21.0" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index ef0b538d03a36..24bb7f41c43a1 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.13-nightly-20240819.1" +version = "1.7.13-nightly-20240819.2" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 325476d766d19..6c8c326a701f6 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.13-nightly-20240819.1" +version = "1.7.13-nightly-20240819.2" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 41cd45ae921e6..bec317589104c 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.13-nightly-20240819.1" +version = "1.7.13-nightly-20240819.2" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index c81a7a8360ccb..4f484f50df307 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.376" +version = "0.91.377" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 9269addd3ef0c..ba42691aea502 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index cf449e33c1263..bb38e123b0935 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index e452c36f59ef8..6403c7570681d 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 4a29edd2678e7..d93535497fdb5 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 224bdab929e9e..960aa53d7b5be 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 5e4c8d4c6acd3..db537cfa58f65 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index c1c6676022db6..9034b7b9f0ffc 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index ce1fdb72855ff..3bd293601ffaa 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 0a3d72e18e3b9..b43570f094c27 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index ddb5b5a30cf8d..74b7df1e93660 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 248e55ca6f5a1..46f336a4d7a7b 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index c321e243f2992..6864a214e9dd4 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 24d5b1fd2062d..eb21bfa2afd2c 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index e027e8620573a..252a4e491e0f4 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 4540ca5f06c8f..e4e93415106ab 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 3422d28ee4db6..45f5302efbfcf 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index eb31003167977..445337f828e82 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 139b22e978a27..4c7b7af94fb46 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index b87aba0924410..ba635caf6f5d6 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index f900fa105df68..a8b94d6548468 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index c699f95e2c799..22b473eb5b665 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 46e01de3e428d..2c319f97b1021 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.13-nightly-20240819.1", + "version": "1.7.13-nightly-20240819.2", "os": [ "win32" ], From da7c8315024d0afdddf87d22fdbef175bbb81bfc Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 19 Aug 2024 10:40:02 +0000 Subject: [PATCH 05/59] chore: Update changelog --- CHANGELOG.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ad66de6ea39f..c7e90d09f5696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1318,15 +1318,4 @@ - **(es/parser)** Use faster unicode crate ([#8785](https://github.com/swc-project/swc/issues/8785)) ([6f780ca](https://github.com/swc-project/swc/commit/6f780ca749a611f54aa4deb628e532fd0a12228f)) -## [1.4.9] - 2024-03-26 - -### Bug Fixes - - - -- **(es/minifier)** Fix tpl-to-string conversion ([#8778](https://github.com/swc-project/swc/issues/8778)) ([e7bca10](https://github.com/swc-project/swc/commit/e7bca101424ed3a3195ca6f45fd4993318cf105d)) - - -- **(es/parser)** Parse `await using` in for head ([#8775](https://github.com/swc-project/swc/issues/8775)) ([53fd09c](https://github.com/swc-project/swc/commit/53fd09cbd7f559ea65dbcbf8c77eea1fcf67b691)) - From 339f828774e1c163fc58c43fea056e974f618490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Mon, 19 Aug 2024 21:13:35 +0900 Subject: [PATCH 06/59] chore: Publish crates --- Cargo.lock | 4 ++-- crates/swc_ecma_transforms_typescript/Cargo.toml | 2 +- crates/swc_fast_ts_strip/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0669e65f56e0..199eefbe34bbf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4939,7 +4939,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.197.0" +version = "0.197.1" dependencies = [ "codspeed-criterion-compat", "criterion", @@ -5094,7 +5094,7 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.6.0" +version = "0.6.1" dependencies = [ "anyhow", "codspeed-criterion-compat", diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index 657a87c269703..bae738a4febc0 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_typescript" repository = "https://github.com/swc-project/swc.git" -version = "0.197.0" +version = "0.197.1" [lib] bench = false diff --git a/crates/swc_fast_ts_strip/Cargo.toml b/crates/swc_fast_ts_strip/Cargo.toml index edb7909100353..04dfddd465172 100644 --- a/crates/swc_fast_ts_strip/Cargo.toml +++ b/crates/swc_fast_ts_strip/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_fast_ts_strip" repository = { workspace = true } -version = "0.6.0" +version = "0.6.1" [dependencies] From 4d46388c7fca4a7bea02fa9e49e4f99075b6626d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Mon, 19 Aug 2024 21:18:11 +0900 Subject: [PATCH 07/59] chore: Exclude `bunchee` from `swc-ecosystem-ci` temporarily --- .github/swc-ecosystem-ci/{tests => todos}/bunchee.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/swc-ecosystem-ci/{tests => todos}/bunchee.ts (100%) diff --git a/.github/swc-ecosystem-ci/tests/bunchee.ts b/.github/swc-ecosystem-ci/todos/bunchee.ts similarity index 100% rename from .github/swc-ecosystem-ci/tests/bunchee.ts rename to .github/swc-ecosystem-ci/todos/bunchee.ts From f95cdab3a323fcb72f197fc5529821933434a2d2 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 19 Aug 2024 12:26:34 +0000 Subject: [PATCH 08/59] chore: Publish `1.7.14-nightly-20240819.1` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 16 ++++++++-------- bindings/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../core/scripts/npm/darwin-arm64/package.json | 2 +- .../core/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../core/scripts/npm/linux-x64-gnu/package.json | 2 +- .../core/scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../minifier/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 28 files changed, 35 insertions(+), 35 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index b0a304af8d339..24b2d89c75daa 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.13-nightly-20240819.2" +version = "1.7.14-nightly-20240819.1" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.13-nightly-20240819.2" +version = "1.7.14-nightly-20240819.1" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.13-nightly-20240819.2" +version = "1.7.14-nightly-20240819.1" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.377" +version = "0.91.378" dependencies = [ "anyhow", "swc_cli_impl", @@ -3809,9 +3809,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.197.0" +version = "0.197.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad18ed5db1ae471da58452dc69221c9dccb03b33f3fc9c7a4d54f6ea8fd09c09" +checksum = "19b5f73e9996c6f374c05ff724afea6e6b5de03253ef856c321ff47f23717b5e" dependencies = [ "ryu-js", "serde", @@ -3915,9 +3915,9 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a7a1992f390337f39e15ee25762cf92720cd48752c0b189f1853ceab252bdf" +checksum = "1011ac056bae7c822a518ad32a90077ccb1f534cd29c983f8f688d0bf33c98e4" dependencies = [ "anyhow", "serde", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index a864fd007ae6a..6c0f96dccef6b 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -28,7 +28,7 @@ resolver = "2" swc_config = "0.1.15" swc_core = "0.101.3" swc_error_reporters = "0.21.0" - swc_fast_ts_strip = "0.6.0" + swc_fast_ts_strip = "0.6.1" swc_malloc = "0.5.11" swc_nodejs_common = "0.0.8" tracing = "0.1.40" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 24bb7f41c43a1..5fbc4fc54c925 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.13-nightly-20240819.2" +version = "1.7.14-nightly-20240819.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 6c8c326a701f6..bd838e574c365 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.13-nightly-20240819.2" +version = "1.7.14-nightly-20240819.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index bec317589104c..4131a53cc8ebe 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.13-nightly-20240819.2" +version = "1.7.14-nightly-20240819.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 4f484f50df307..43f31b040a5d4 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.377" +version = "0.91.378" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index ba42691aea502..8bdb7d366f733 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index bb38e123b0935..19ecbb03a1756 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 6403c7570681d..8eb203e077a77 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index d93535497fdb5..f80c6efa723de 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 960aa53d7b5be..f1e2c2d8d403a 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index db537cfa58f65..409fffc042dc5 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 9034b7b9f0ffc..53a97fa20e87b 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 3bd293601ffaa..02111d439e8a4 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index b43570f094c27..4ceabd635a935 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 74b7df1e93660..d6a6c3d3676fa 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 46f336a4d7a7b..077486bc21593 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 6864a214e9dd4..5b1d257c1a3c2 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index eb21bfa2afd2c..f15cd0edb11c9 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 252a4e491e0f4..a836750d1b17a 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index e4e93415106ab..0b4294fba0f72 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 45f5302efbfcf..53808681ca920 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 445337f828e82..86ae02e924071 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 4c7b7af94fb46..aedb28d184a8f 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index ba635caf6f5d6..36c5d915cfebc 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index a8b94d6548468..1ba0969a38a51 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 22b473eb5b665..31dae2db1f35e 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 2c319f97b1021..2e12d02adb786 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.13-nightly-20240819.2", + "version": "1.7.14-nightly-20240819.1", "os": [ "win32" ], From 56f6c0e6babcda878a72b9191b616bfff1f6e9bd Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 19 Aug 2024 13:24:51 +0000 Subject: [PATCH 09/59] chore: Publish `1.7.14` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 24b2d89c75daa..b5b87553c5c2b 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.14-nightly-20240819.1" +version = "1.7.14" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.14-nightly-20240819.1" +version = "1.7.14" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.14-nightly-20240819.1" +version = "1.7.14" dependencies = [ "anyhow", "getrandom", @@ -3074,7 +3074,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.378" +version = "0.91.379" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 5fbc4fc54c925..8881a7ae7c6cf 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.14-nightly-20240819.1" +version = "1.7.14" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index bd838e574c365..8ff234aadea32 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.14-nightly-20240819.1" +version = "1.7.14" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 4131a53cc8ebe..be67cb3b4bfe6 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.14-nightly-20240819.1" +version = "1.7.14" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 43f31b040a5d4..b56c4571eadf2 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.378" +version = "0.91.379" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 8bdb7d366f733..164be03accff5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 19ecbb03a1756..d39bdd7ff77d6 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 8eb203e077a77..909afe2a670a4 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index f80c6efa723de..03408dbc702b1 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index f1e2c2d8d403a..1624e25ae65c6 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 409fffc042dc5..6c9accc491e70 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 53a97fa20e87b..33a1942a66e76 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 02111d439e8a4..47d7787ba8bbf 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 4ceabd635a935..247417eec41e6 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index d6a6c3d3676fa..e4c9b21a9bad6 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 077486bc21593..771b53b91d71a 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 5b1d257c1a3c2..0640c7dc8be71 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index f15cd0edb11c9..9141701a65412 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index a836750d1b17a..fe6056484d9cd 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 0b4294fba0f72..d7d5554e56ed1 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 53808681ca920..8681c30bc2f05 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 86ae02e924071..34f1f65cab63a 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index aedb28d184a8f..92b966c4b9c30 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 36c5d915cfebc..920e0597dd94a 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 1ba0969a38a51..0044a4c037702 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 31dae2db1f35e..84a93ae9acbfd 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 2e12d02adb786..750145496af91 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.14-nightly-20240819.1", + "version": "1.7.14", "os": [ "win32" ], From 3ecee9fc1bf32d269eaf1d9faa9210b63b8726e9 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 19 Aug 2024 13:24:52 +0000 Subject: [PATCH 10/59] chore: Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7e90d09f5696..9338a3cfaeb10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.7.14] - 2024-08-19 ### Bug Fixes From 868be56a2515b96a7720bbe4620d14e07da16d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 20 Aug 2024 09:49:19 +0900 Subject: [PATCH 11/59] chore(ci): Configure publish pipeline for html binding (#9458) **Related issue:** - https://github.com/swc-project/swc/issues/9457 --- .github/actions/tag-git-release/action.yml | 41 ++ .github/workflows/publish-npm-package.yml | 40 -- .github/workflows/publish.yml | 73 ++- bindings/Cargo.lock | 483 ++++++++++++++--- bindings/Cargo.toml | 6 + bindings/binding_html_node/Cargo.toml | 35 ++ bindings/binding_html_node/build.rs | 23 + bindings/binding_html_node/src/lib.rs | 510 ++++++++++++++++++ bindings/binding_html_node/src/util.rs | 35 ++ .../scripts/npm/darwin-arm64/package.json | 82 +-- .../core/scripts/npm/darwin-x64/package.json | 82 +-- .../npm/linux-arm-gnueabihf/package.json | 82 +-- .../scripts/npm/linux-arm64-gnu/package.json | 88 +-- .../scripts/npm/linux-arm64-musl/package.json | 88 +-- .../scripts/npm/linux-x64-gnu/package.json | 88 +-- .../scripts/npm/linux-x64-musl/package.json | 88 +-- .../scripts/npm/win32-arm64-msvc/package.json | 82 +-- .../scripts/npm/win32-ia32-msvc/package.json | 82 +-- .../scripts/npm/win32-x64-msvc/package.json | 82 +-- packages/html/.gitignore | 2 + packages/html/.npmignore | 71 +++ packages/html/binding.d.ts | 71 +++ packages/html/binding.js | 284 ++++++++++ packages/html/index.ts | 74 +++ packages/html/package.json | 59 ++ .../scripts/npm/android-arm-eabi/README.md | 3 + .../scripts/npm/android-arm-eabi/package.json | 41 ++ .../html/scripts/npm/android-arm64/README.md | 3 + .../scripts/npm/android-arm64/package.json | 41 ++ .../html/scripts/npm/darwin-arm64/README.md | 3 + .../scripts/npm/darwin-arm64/package.json | 41 ++ .../html/scripts/npm/darwin-x64/README.md | 3 + .../html/scripts/npm/darwin-x64/package.json | 41 ++ .../html/scripts/npm/freebsd-x64/README.md | 3 + .../html/scripts/npm/freebsd-x64/package.json | 41 ++ .../scripts/npm/linux-arm-gnueabihf/README.md | 3 + .../npm/linux-arm-gnueabihf/package.json | 41 ++ .../scripts/npm/linux-arm64-gnu/README.md | 3 + .../scripts/npm/linux-arm64-gnu/package.json | 44 ++ .../scripts/npm/linux-arm64-musl/README.md | 3 + .../scripts/npm/linux-arm64-musl/package.json | 44 ++ .../html/scripts/npm/linux-x64-gnu/README.md | 3 + .../scripts/npm/linux-x64-gnu/package.json | 44 ++ .../html/scripts/npm/linux-x64-musl/README.md | 3 + .../scripts/npm/linux-x64-musl/package.json | 44 ++ .../scripts/npm/win32-arm64-msvc/README.md | 3 + .../scripts/npm/win32-arm64-msvc/package.json | 41 ++ .../scripts/npm/win32-ia32-msvc/README.md | 3 + .../scripts/npm/win32-ia32-msvc/package.json | 41 ++ .../html/scripts/npm/win32-x64-msvc/README.md | 3 + .../scripts/npm/win32-x64-msvc/package.json | 41 ++ packages/html/tsconfig.json | 103 ++++ .../scripts/npm/darwin-arm64/package.json | 82 +-- .../scripts/npm/darwin-x64/package.json | 82 +-- .../npm/linux-arm-gnueabihf/package.json | 74 +-- .../scripts/npm/linux-arm64-gnu/package.json | 88 +-- .../scripts/npm/linux-arm64-musl/package.json | 88 +-- .../scripts/npm/linux-x64-gnu/package.json | 88 +-- .../scripts/npm/linux-x64-musl/package.json | 88 +-- .../scripts/npm/win32-arm64-msvc/package.json | 82 +-- .../scripts/npm/win32-ia32-msvc/package.json | 82 +-- .../scripts/npm/win32-x64-msvc/package.json | 82 +-- yarn.lock | 38 ++ 63 files changed, 3241 insertions(+), 971 deletions(-) create mode 100644 .github/actions/tag-git-release/action.yml create mode 100644 bindings/binding_html_node/Cargo.toml create mode 100644 bindings/binding_html_node/build.rs create mode 100644 bindings/binding_html_node/src/lib.rs create mode 100644 bindings/binding_html_node/src/util.rs create mode 100644 packages/html/.gitignore create mode 100644 packages/html/.npmignore create mode 100644 packages/html/binding.d.ts create mode 100644 packages/html/binding.js create mode 100644 packages/html/index.ts create mode 100644 packages/html/package.json create mode 100644 packages/html/scripts/npm/android-arm-eabi/README.md create mode 100644 packages/html/scripts/npm/android-arm-eabi/package.json create mode 100644 packages/html/scripts/npm/android-arm64/README.md create mode 100644 packages/html/scripts/npm/android-arm64/package.json create mode 100644 packages/html/scripts/npm/darwin-arm64/README.md create mode 100644 packages/html/scripts/npm/darwin-arm64/package.json create mode 100644 packages/html/scripts/npm/darwin-x64/README.md create mode 100644 packages/html/scripts/npm/darwin-x64/package.json create mode 100644 packages/html/scripts/npm/freebsd-x64/README.md create mode 100644 packages/html/scripts/npm/freebsd-x64/package.json create mode 100644 packages/html/scripts/npm/linux-arm-gnueabihf/README.md create mode 100644 packages/html/scripts/npm/linux-arm-gnueabihf/package.json create mode 100644 packages/html/scripts/npm/linux-arm64-gnu/README.md create mode 100644 packages/html/scripts/npm/linux-arm64-gnu/package.json create mode 100644 packages/html/scripts/npm/linux-arm64-musl/README.md create mode 100644 packages/html/scripts/npm/linux-arm64-musl/package.json create mode 100644 packages/html/scripts/npm/linux-x64-gnu/README.md create mode 100644 packages/html/scripts/npm/linux-x64-gnu/package.json create mode 100644 packages/html/scripts/npm/linux-x64-musl/README.md create mode 100644 packages/html/scripts/npm/linux-x64-musl/package.json create mode 100644 packages/html/scripts/npm/win32-arm64-msvc/README.md create mode 100644 packages/html/scripts/npm/win32-arm64-msvc/package.json create mode 100644 packages/html/scripts/npm/win32-ia32-msvc/README.md create mode 100644 packages/html/scripts/npm/win32-ia32-msvc/package.json create mode 100644 packages/html/scripts/npm/win32-x64-msvc/README.md create mode 100644 packages/html/scripts/npm/win32-x64-msvc/package.json create mode 100644 packages/html/tsconfig.json diff --git a/.github/actions/tag-git-release/action.yml b/.github/actions/tag-git-release/action.yml new file mode 100644 index 0000000000000..24a7619dadbd3 --- /dev/null +++ b/.github/actions/tag-git-release/action.yml @@ -0,0 +1,41 @@ +name: "Git tag release" +description: "Tags a release" +inputs: + version: + description: "The version" + required: true + +runs: + using: "composite" + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: "main" + + - uses: ./.github/actions/setup-node + + - name: Install git-cliff + uses: taiki-e/install-action@v2 + with: + tool: git-cliff@1.3.1 + + - name: Install cargo-edit + uses: taiki-e/install-action@v2 + with: + tool: cargo-edit@0.12.2 + + - name: "Setup jq" + uses: dcarbone/install-jq-action@v2 + with: + version: "1.7" + force: true + + - uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.SWC_BOT_SSH }} + + - name: Create git tag commit + shell: bash + run: | + ./scripts/publish.sh ${{ inputs.version }} diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index 13ec5224d7c08..057d06b0f50e4 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -56,50 +56,10 @@ jobs: run: | echo "need-build=true" >> $GITHUB_OUTPUT - create-git-tag-commit: - name: Create git tag commit - runs-on: ubuntu-latest - needs: - - check-if-build-required - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: "main" - - - uses: ./.github/actions/setup-node - - - name: Install git-cliff - uses: taiki-e/install-action@v2 - with: - tool: git-cliff@1.3.1 - - - name: Install cargo-edit - uses: taiki-e/install-action@v2 - with: - tool: cargo-edit@0.12.2 - - - name: "Setup jq" - uses: dcarbone/install-jq-action@v2 - with: - version: "1.7" - force: true - - - uses: webfactory/ssh-agent@v0.9.0 - if: needs.check-if-build-required.outputs.need-build == 'true' && !inputs.skipPublishing - with: - ssh-private-key: ${{ secrets.SWC_BOT_SSH }} - - - name: Create git tag commit - if: needs.check-if-build-required.outputs.need-build == 'true' && !inputs.skipPublishing - run: | - ./scripts/publish.sh ${{ inputs.version }} - build: if: needs.check-if-build-required.outputs.need-build == 'true' needs: - check-if-build-required - - create-git-tag-commit strategy: fail-fast: false matrix: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5f2e53a5cd983..1ea33fe19001c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,6 +13,9 @@ env: SKIP_YARN_COREPACK_CHECK: 1 on: + pull_request: + branches: + - main workflow_dispatch: inputs: version: @@ -47,27 +50,33 @@ jobs: - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 + if: github.event_name == 'workflow_dispatch' with: profile: minimal - name: Install cargo-edit + if: github.event_name == 'workflow_dispatch' uses: taiki-e/install-action@v2 with: tool: cargo-edit@0.12.2 - - name: Install cargo-edit + - name: Install cargo-mono + if: github.event_name == 'workflow_dispatch' uses: taiki-e/install-action@v2 with: tool: cargo-mono@0.4.1 - run: cargo bump + if: github.event_name == 'workflow_dispatch' continue-on-error: true - uses: webfactory/ssh-agent@v0.9.0 + if: github.event_name == 'workflow_dispatch' with: ssh-private-key: ${{ secrets.SWC_BOT_SSH }} - name: Push bump commit + if: github.event_name == 'workflow_dispatch' run: | git push git@github.com:swc-project/swc.git --no-verify @@ -80,26 +89,30 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-node + if: github.event_name == 'workflow_dispatch' - uses: actions-rs/toolchain@v1 + if: github.event_name == 'workflow_dispatch' with: profile: minimal - name: Install cargo-edit + if: github.event_name == 'workflow_dispatch' uses: taiki-e/install-action@v2 with: tool: cargo-edit@0.12.2 - name: Install cargo-edit + if: github.event_name == 'workflow_dispatch' uses: taiki-e/install-action@v2 with: tool: cargo-mono@0.4.1 - name: Update constant of swc_core + if: github.event_name == 'workflow_dispatch' run: npx ts-node .github/bot/src/cargo/update-constants.ts - name: Publish crates - # Skip on pull requests if: github.event_name == 'workflow_dispatch' env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} @@ -120,9 +133,24 @@ jobs: run: | npx ts-node .github/bot/src/nightly-version.ts ${{ github.event.inputs.version }} >> $GITHUB_OUTPUT - publish-npm-nightly: + git-tag-nightly: + name: "Git tag nightly" + runs-on: ubuntu-latest + needs: + - publish-cargo + - determine-nightly-version + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/tag-git-release + with: + version: ${{ needs.determine-nightly-version.outputs.version }} + + publish-core-nightly: + if: github.event_name == 'workflow_dispatch' name: "Publish ${{ needs.determine-nightly-version.outputs.version }}" + needs: + - git-tag-nightly - publish-cargo - determine-nightly-version uses: ./.github/workflows/publish-npm-package.yml @@ -132,13 +160,30 @@ jobs: version: ${{ needs.determine-nightly-version.outputs.version }} buildCli: true skipBuild: ${{ inputs.skipBuild || false }} - skipPublishing: false + skipPublishing: ${{ github.event_name == 'pull_request' }} + + publish-html-nightly: + name: "Publish html@${{ needs.determine-nightly-version.outputs.version }}" + + needs: + - git-tag-nightly + - publish-cargo + - determine-nightly-version + uses: ./.github/workflows/publish-npm-package.yml + secrets: inherit + with: + package: "html" + version: ${{ needs.determine-nightly-version.outputs.version }} + buildCli: false + skipBuild: ${{ inputs.skipBuild || false }} + skipPublishing: ${{ github.event_name == 'pull_request' }} run-ecosystem-ci-with-nightly: name: "Test nightly using ecosystem CI" + needs: - determine-nightly-version - - publish-npm-nightly + - publish-core-nightly uses: ./.github/workflows/ecosystem-ci.yml with: version: ${{ needs.determine-nightly-version.outputs.version }} @@ -146,8 +191,21 @@ jobs: suites: '["_"]' allowBreakingWasm: ${{ inputs.allowBreakingWasm || false }} - publish-npm-stable: + git-tag-stable: + name: "Git tag stable" + runs-on: ubuntu-latest + needs: + - publish-cargo + - run-ecosystem-ci-with-nightly + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/tag-git-release + with: + version: ${{ inputs.version }} + + publish-core-stable: name: "Publish ${{ inputs.version || 'stable' }} to npm" + needs: - publish-cargo - run-ecosystem-ci-with-nightly @@ -159,5 +217,4 @@ jobs: version: ${{ inputs.version }} buildCli: true skipBuild: ${{ inputs.skipBuild || inputs.onlyNightly || false }} - # Skip on pull requests - skipPublishing: ${{ inputs.onlyNightly }} + skipPublishing: ${{ github.event_name == 'pull_request' }} diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index b5b87553c5c2b..ad0b644f360fa 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -102,9 +102,9 @@ checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ast_node" @@ -115,7 +115,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -126,7 +126,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -157,7 +157,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -248,6 +248,28 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "binding_html_node" +version = "0.1.0" +dependencies = [ + "anyhow", + "napi", + "napi-build", + "napi-derive", + "serde", + "serde_json", + "swc_atoms", + "swc_cached", + "swc_common", + "swc_error_reporters", + "swc_html", + "swc_html_ast", + "swc_html_minifier", + "swc_nodejs_common", + "tracing", + "tracing-subscriber", +] + [[package]] name = "binding_macros" version = "0.76.0" @@ -380,7 +402,7 @@ dependencies = [ "ahash 0.8.11", "chrono", "either", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools", "nom", "once_cell", @@ -438,9 +460,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.1" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" dependencies = [ "serde", ] @@ -488,9 +510,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.6" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" [[package]] name = "cfg-if" @@ -782,7 +804,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -829,7 +851,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -851,7 +873,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -1009,7 +1031,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -1091,7 +1113,7 @@ checksum = "32016f1242eb82af5474752d00fd8ebcd9004bd69b462b1c91de833972d08ed4" dependencies = [ "proc-macro2", "swc_macros_common", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -1162,7 +1184,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -1357,9 +1379,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hstr" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96274be293b8877e61974a607105d09c84caebe9620b47774aa8a6b942042dd4" +checksum = "dae404c0c5d4e95d4858876ab02eecd6a196bb8caa42050dfa809938833fc412" dependencies = [ "hashbrown 0.14.5", "new_debug_unreachable", @@ -1460,9 +1482,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -1483,14 +1505,14 @@ dependencies = [ [[package]] name = "is-macro" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a85abdc13717906baccb5a1e435556ce0df215f242892f721dff62bf25288f" +checksum = "2069faacbe981460232f880d26bf3c7634e322d49053aa48c27e3ae642f728f1" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -1544,6 +1566,49 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" +[[package]] +name = "lexical" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7aefb36fd43fef7003334742cbf77b243fcd36418a1d1bdd480d613a67968f6" +dependencies = [ + "lexical-core", +] + +[[package]] +name = "lexical-core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +dependencies = [ + "lexical-parse-float", + "lexical-parse-integer", + "lexical-util", + "lexical-write-float", + "lexical-write-integer", +] + +[[package]] +name = "lexical-parse-float" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +dependencies = [ + "lexical-parse-integer", + "lexical-util", + "static_assertions", +] + +[[package]] +name = "lexical-parse-integer" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +dependencies = [ + "lexical-util", + "static_assertions", +] + [[package]] name = "lexical-sort" version = "0.3.1" @@ -1553,11 +1618,41 @@ dependencies = [ "any_ascii", ] +[[package]] +name = "lexical-util" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +dependencies = [ + "static_assertions", +] + +[[package]] +name = "lexical-write-float" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +dependencies = [ + "lexical-util", + "lexical-write-integer", + "static_assertions", +] + +[[package]] +name = "lexical-write-integer" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +dependencies = [ + "lexical-util", + "static_assertions", +] + [[package]] name = "libc" -version = "0.2.155" +version = "0.2.157" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "374af5f94e54fa97cf75e945cce8a6b201e88a1a07e688b47dfd2a59c66dbd86" [[package]] name = "libloading" @@ -1566,7 +1661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -1725,7 +1820,7 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -1802,7 +1897,7 @@ dependencies = [ "napi-derive-backend", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -1817,7 +1912,7 @@ dependencies = [ "quote", "regex", "semver 1.0.23", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -2048,7 +2143,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.4.0", ] [[package]] @@ -2081,7 +2176,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -2110,7 +2205,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -2133,9 +2228,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "preset_env_base" @@ -2341,9 +2439,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -2565,7 +2663,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -2618,9 +2716,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] @@ -2659,13 +2757,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -2676,16 +2774,17 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2705,7 +2804,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "itoa", "ryu", "serde", @@ -2917,7 +3016,7 @@ checksum = "9cf483ea7e0e3a03d1b91687895814425149ad77facd3e2b6839dde26da98454" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -2935,7 +3034,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -2954,7 +3053,7 @@ dependencies = [ "base64", "dashmap", "either", - "indexmap 2.2.6", + "indexmap 2.4.0", "jsonc-parser", "lru", "napi", @@ -3035,7 +3134,7 @@ dependencies = [ "anyhow", "crc", "dashmap", - "indexmap 2.2.6", + "indexmap 2.4.0", "is-macro", "once_cell", "parking_lot", @@ -3170,7 +3269,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4740e53eaf68b101203c1df0937d5161a29f3c13bceed0836ddfe245b72dd000" dependencies = [ "anyhow", - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", "serde_json", "sourcemap 9.0.0", @@ -3187,7 +3286,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -3218,6 +3317,102 @@ dependencies = [ "vergen", ] +[[package]] +name = "swc_css_ast" +version = "0.144.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "931a3c25a6bae42537783eab131b34d8fd2913d14f975106ceb3287716072ee0" +dependencies = [ + "is-macro", + "string_enum", + "swc_atoms", + "swc_common", +] + +[[package]] +name = "swc_css_codegen" +version = "0.155.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09080a69fd9c07d76141f02c9d2826e46f08ffab5fdb8942cd8a95f38712f038" +dependencies = [ + "auto_impl", + "bitflags 2.6.0", + "rustc-hash", + "serde", + "swc_atoms", + "swc_common", + "swc_css_ast", + "swc_css_codegen_macros", + "swc_css_utils", +] + +[[package]] +name = "swc_css_codegen_macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de2ece8c7dbdde85aa1bcc9764c5f41f7450d8bf1312eac2375b8dc0ecbc13d7" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.75", +] + +[[package]] +name = "swc_css_minifier" +version = "0.120.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db2730dce248bf3ebab2d39885e7494b14a74279f93afcef4054c19aca61d17" +dependencies = [ + "serde", + "swc_atoms", + "swc_common", + "swc_css_ast", + "swc_css_utils", + "swc_css_visit", +] + +[[package]] +name = "swc_css_parser" +version = "0.154.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02babeae8d3a1dad9858e6ade577b27cc463f8eb60139df0d05d58605e6c0554" +dependencies = [ + "lexical", + "serde", + "swc_atoms", + "swc_common", + "swc_css_ast", +] + +[[package]] +name = "swc_css_utils" +version = "0.141.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28e930b27b85b95329f29b1fa36be032fb9bd04f20b0a7180c9c0fc19a368979" +dependencies = [ + "once_cell", + "serde", + "serde_json", + "swc_atoms", + "swc_common", + "swc_css_ast", + "swc_css_visit", +] + +[[package]] +name = "swc_css_visit" +version = "0.143.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7de0c51931641e580a68dab2c7f04940475d396b23f403062e6064abfac5020" +dependencies = [ + "serde", + "swc_atoms", + "swc_common", + "swc_css_ast", + "swc_visit", +] + [[package]] name = "swc_ecma_ast" version = "0.118.2" @@ -3266,7 +3461,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -3306,7 +3501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dade6e0c6e8ddb61281fee2331c3775a920c31535b91e8cace2e0c4eed6158d3" dependencies = [ "arrayvec", - "indexmap 2.2.6", + "indexmap 2.4.0", "is-macro", "serde", "serde_derive", @@ -3526,7 +3721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13ee1a0975dc79d2cb23456bf45c7862b61f9a8890ade3025af8dc728e730db" dependencies = [ "arrayvec", - "indexmap 2.2.6", + "indexmap 2.4.0", "num-bigint", "num_cpus", "once_cell", @@ -3585,7 +3780,7 @@ checksum = "e5c01c4097d54b6992d926474546472f10f1f94799a6eb9b70176fc33e778573" dependencies = [ "anyhow", "dashmap", - "indexmap 2.2.6", + "indexmap 2.4.0", "once_cell", "preset_env_base", "rustc-hash", @@ -3630,7 +3825,7 @@ checksum = "7c0a71579d030e12fd3cfbfc8712c4ce21afc526f2a759903c77d8df61950f5e" dependencies = [ "better_scoped_tls", "bitflags 2.6.0", - "indexmap 2.2.6", + "indexmap 2.4.0", "once_cell", "phf", "rayon", @@ -3667,7 +3862,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bb500b65423646da940e289ad37e7c88332d7194248c33fc63a9e768e104fe5" dependencies = [ "arrayvec", - "indexmap 2.2.6", + "indexmap 2.4.0", "is-macro", "num-bigint", "rayon", @@ -3706,7 +3901,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -3718,7 +3913,7 @@ dependencies = [ "Inflector", "anyhow", "bitflags 2.6.0", - "indexmap 2.2.6", + "indexmap 2.4.0", "is-macro", "path-clean 1.0.1", "pathdiff", @@ -3743,7 +3938,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc9b6dcb79ac6f396988c13ce2f782116aeb92e8ee77656072d1146697f66022" dependencies = [ "dashmap", - "indexmap 2.2.6", + "indexmap 2.4.0", "once_cell", "petgraph", "rayon", @@ -3789,7 +3984,7 @@ checksum = "c3e54a8c87d90812bf69b0f07931bb629111a3f24efe83b9190c3a40a5ebc25e" dependencies = [ "base64", "dashmap", - "indexmap 2.2.6", + "indexmap 2.4.0", "once_cell", "rayon", "serde", @@ -3830,7 +4025,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b04b74fc4525b03d1402018ca00855c10421631e4bbda4e202fc877d801acfa" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "rustc-hash", "swc_atoms", "swc_common", @@ -3847,7 +4042,7 @@ version = "0.134.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cde8f1ef3f7bd53340c7bd679f1ec563a45225ac8fb63f22d6de1ff4b345475d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "num_cpus", "once_cell", "rayon", @@ -3885,7 +4080,7 @@ checksum = "63db0adcff29d220c3d151c5b25c0eabe7e32dd936212b84cdaa1392e3130497" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -3907,7 +4102,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357e2c97bb51431d65080f25b436bc4e2fc1a7f64a643bc21a8353e478dc799f" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "petgraph", "rustc-hash", "swc_common", @@ -3945,6 +4140,127 @@ dependencies = [ "tracing", ] +[[package]] +name = "swc_html" +version = "0.148.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706509020207c5e4dc17e9c6c3adcec901ec5e0d06314050643c3efce8be7fb7" +dependencies = [ + "swc_html_ast", + "swc_html_codegen", + "swc_html_minifier", + "swc_html_parser", + "swc_html_visit", +] + +[[package]] +name = "swc_html_ast" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c425a3a19e94bd40f94da719691e19be6187a65e1fe6b294fd4d065e841c8e9" +dependencies = [ + "is-macro", + "serde", + "string_enum", + "swc_atoms", + "swc_common", +] + +[[package]] +name = "swc_html_codegen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ade76d2999f98677284d1a961b41cf8f9405cfe492531164ead3d1c6796c768" +dependencies = [ + "auto_impl", + "bitflags 2.6.0", + "rustc-hash", + "swc_atoms", + "swc_common", + "swc_html_ast", + "swc_html_codegen_macros", + "swc_html_utils", +] + +[[package]] +name = "swc_html_codegen_macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e593a6cbb3a49230fbab3171d4493f7d0fb1e20a34d9a9f9e972550690408ba8" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.75", +] + +[[package]] +name = "swc_html_minifier" +version = "0.145.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f944d0cf2352767ddee5f65a02c73dadcd2050a75eab8bee45a30f80b318199f" +dependencies = [ + "once_cell", + "serde", + "serde_json", + "swc_atoms", + "swc_cached", + "swc_common", + "swc_css_ast", + "swc_css_codegen", + "swc_css_minifier", + "swc_css_parser", + "swc_ecma_ast", + "swc_ecma_codegen", + "swc_ecma_minifier", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_visit", + "swc_html_ast", + "swc_html_codegen", + "swc_html_parser", + "swc_html_utils", + "swc_html_visit", +] + +[[package]] +name = "swc_html_parser" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34cff1743fcfe3f83df6c4f65fa769f991d18372b38b578dc1192560f4b2037" +dependencies = [ + "swc_atoms", + "swc_common", + "swc_html_ast", + "swc_html_utils", +] + +[[package]] +name = "swc_html_utils" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5153f5769f3425ecb6ec5f9d26166b5a9e837732450e07db8c4fd9a2c809456f" +dependencies = [ + "once_cell", + "serde", + "serde_json", + "swc_atoms", + "swc_common", +] + +[[package]] +name = "swc_html_visit" +version = "0.37.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07c70421acb2813335cba6c6c99b0013a8d60e8e1e6b74b8b67132c795150f5f" +dependencies = [ + "serde", + "swc_atoms", + "swc_common", + "swc_html_ast", + "swc_visit", +] + [[package]] name = "swc_macros_common" version = "0.3.13" @@ -3953,7 +4269,7 @@ checksum = "f486687bfb7b5c560868f69ed2d458b880cebc9babebcb67e49f31b55c5bf847" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -4075,7 +4391,7 @@ checksum = "ff9719b6085dd2824fd61938a881937be14b08f95e2d27c64c825a9f65e052ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -4126,9 +4442,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.71" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -4237,7 +4553,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -4337,7 +4653,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -4404,7 +4720,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", "serde_spanned", "toml_datetime", @@ -4417,7 +4733,7 @@ version = "0.22.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", "serde_spanned", "toml_datetime", @@ -4444,7 +4760,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -4666,9 +4982,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "virtual-fs" @@ -4871,7 +5187,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", "wasm-bindgen-shared", ] @@ -4905,7 +5221,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5024,7 +5340,7 @@ dependencies = [ "bytesize", "derive_builder", "hex", - "indexmap 2.2.6", + "indexmap 2.4.0", "schemars", "semver 1.0.23", "serde", @@ -5046,7 +5362,7 @@ dependencies = [ "bytesize", "derive_builder", "hex", - "indexmap 2.2.6", + "indexmap 2.4.0", "schemars", "semver 1.0.23", "serde", @@ -5243,7 +5559,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ "bitflags 2.6.0", - "indexmap 2.2.6", + "indexmap 2.4.0", "semver 1.0.23", ] @@ -5590,6 +5906,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -5601,5 +5918,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 6c0f96dccef6b..6247fd66a7ddc 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -2,6 +2,7 @@ members = [ "binding_core_node", "binding_core_wasm", + "binding_html_node", "binding_minifier_node", "binding_minifier_wasm", "binding_typescript_wasm", @@ -22,6 +23,8 @@ resolver = "2" serde-wasm-bindgen = "0.6.5" serde_json = "1.0.120" sourcemap = "8.0.1" + swc_atoms = "0.6.5" + swc_cached = "0.3.18" swc_cli_impl = "0.19.0" swc_common = "0.37.4" swc_compiler_base = "0.18.1" @@ -29,6 +32,9 @@ resolver = "2" swc_core = "0.101.3" swc_error_reporters = "0.21.0" swc_fast_ts_strip = "0.6.1" + swc_html = "0.148.0" + swc_html_ast = "0.37.0" + swc_html_minifier = "0.145.0" swc_malloc = "0.5.11" swc_nodejs_common = "0.0.8" tracing = "0.1.40" diff --git a/bindings/binding_html_node/Cargo.toml b/bindings/binding_html_node/Cargo.toml new file mode 100644 index 0000000000000..8ebc5a72ac255 --- /dev/null +++ b/bindings/binding_html_node/Cargo.toml @@ -0,0 +1,35 @@ +[package] +authors = ["강동윤 "] +build = "build.rs" +edition = "2021" +exclude = ["artifacts.json", "index.node"] +license = "Apache-2.0" +name = "binding_html_node" +publish = false +version = "0.1.0" + +[lib] +bench = false +crate-type = ["cdylib"] + +[features] + +[build-dependencies] +napi-build = { workspace = true } + +[dependencies] +anyhow = { workspace = true } +napi = { workspace = true, features = ["napi3", "serde-json"] } +napi-derive = { workspace = true, features = ["type-def"] } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +swc_atoms = { workspace = true } +swc_cached = { workspace = true } +swc_common = { workspace = true, features = ["diagnostic-serde"] } +swc_error_reporters = { workspace = true } +swc_html = { workspace = true, features = ["minifier"] } +swc_html_ast = { workspace = true, features = ["serde"] } +swc_html_minifier = { workspace = true } +swc_nodejs_common = { workspace = true } +tracing = { workspace = true, features = ["release_max_level_info"] } +tracing-subscriber = { workspace = true, features = ["env-filter"] } diff --git a/bindings/binding_html_node/build.rs b/bindings/binding_html_node/build.rs new file mode 100644 index 0000000000000..d3ec53b10cd1c --- /dev/null +++ b/bindings/binding_html_node/build.rs @@ -0,0 +1,23 @@ +use std::{ + env, + fs::File, + io::{BufWriter, Write}, + path::Path, +}; + +extern crate napi_build; + +fn main() { + let out_dir = env::var("OUT_DIR").expect("Out dir should exist"); + let dest_path = Path::new(&out_dir).join("triple.txt"); + let mut f = + BufWriter::new(File::create(dest_path).expect("Failed to create target triple text")); + write!( + f, + "{}", + env::var("TARGET").expect("Target should be specified") + ) + .expect("Failed to write target triple text"); + + napi_build::setup(); +} diff --git a/bindings/binding_html_node/src/lib.rs b/bindings/binding_html_node/src/lib.rs new file mode 100644 index 0000000000000..9e1e9bdd5d67e --- /dev/null +++ b/bindings/binding_html_node/src/lib.rs @@ -0,0 +1,510 @@ +#[macro_use] +extern crate napi_derive; + +mod util; + +use std::{backtrace::Backtrace, env, panic::set_hook}; + +use anyhow::{bail, Context}; +use napi::{bindgen_prelude::*, Task}; +use serde::{Deserialize, Serialize}; +use swc_atoms::js_word; +use swc_cached::regex::CachedRegex; +use swc_common::{FileName, DUMMY_SP}; +use swc_html::{ + ast::{DocumentMode, Namespace}, + codegen::{ + writer::basic::{BasicHtmlWriter, BasicHtmlWriterConfig}, + CodeGenerator, CodegenConfig, Emit, + }, + parser::{parse_file_as_document, parse_file_as_document_fragment}, +}; +use swc_html_ast::{Document, DocumentFragment}; +use swc_html_minifier::{ + minify_document, minify_document_fragment, + option::{ + CollapseWhitespaces, MinifierType, MinifyCssOption, MinifyJsOption, MinifyJsonOption, + RemoveRedundantAttributes, + }, +}; +use swc_nodejs_common::{deserialize_json, get_deserialized, MapErr}; + +use crate::util::try_with; + +#[napi::module_init] +fn init() { + if cfg!(debug_assertions) || env::var("SWC_DEBUG").unwrap_or_default() == "1" { + set_hook(Box::new(|panic_info| { + let backtrace = Backtrace::force_capture(); + println!("Panic: {:?}\nBacktrace: {:?}", panic_info, backtrace); + })); + } +} + +#[napi_derive::napi(object)] +#[derive(Debug, Serialize)] +pub struct Diagnostic { + pub level: String, + pub message: String, + pub span: serde_json::Value, +} + +#[napi_derive::napi(object)] +#[derive(Debug, Serialize)] +pub struct TransformOutput { + pub code: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub errors: Option>, +} + +struct MinifyTask { + code: String, + options: String, + is_fragment: bool, +} + +#[napi_derive::napi(object)] +#[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Attribute { + #[serde(default)] + pub namespace: Option, + #[serde(default)] + pub prefix: Option, + pub name: String, + #[serde(default)] + pub value: Option, +} + +#[napi_derive::napi(object)] +#[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Element { + pub tag_name: String, + pub namespace: String, + pub attributes: Vec, + pub is_self_closing: bool, +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct MinifyOptions { + #[serde(default)] + filename: Option, + + // Parser options + #[serde(default)] + iframe_srcdoc: bool, + #[serde(default)] + scripting_enabled: bool, + /// Used only for Document Fragment + /// Default: NoQuirks + #[serde(default)] + mode: Option, + /// Used only for Document Fragment + /// Default: `template` in HTML namespace + #[serde(default)] + context_element: Option, + /// Used only for Document Fragment + /// Default: None + #[serde(default)] + form_element: Option, + + // Minification options + #[serde(default)] + force_set_html5_doctype: bool, + #[serde(default = "default_collapse_whitespaces")] + collapse_whitespaces: CollapseWhitespaces, + // Remove safe empty elements with metadata content, i.e. the `script` and `style` element + // without content and attributes, `meta` and `link` elements without attributes and etc + #[serde(default = "true_by_default")] + remove_empty_metadata_elements: bool, + #[serde(default = "true_by_default")] + remove_comments: bool, + #[serde(default = "default_preserve_comments")] + preserve_comments: Option>, + #[serde(default = "true_by_default")] + minify_conditional_comments: bool, + #[serde(default = "true_by_default")] + remove_empty_attributes: bool, + #[serde(default)] + remove_redundant_attributes: RemoveRedundantAttributes, + #[serde(default = "true_by_default")] + collapse_boolean_attributes: bool, + #[serde(default = "true_by_default")] + normalize_attributes: bool, + #[serde(default = "minify_json_by_default")] + minify_json: MinifyJsonOption, + #[serde(default = "minify_js_by_default")] + minify_js: MinifyJsOption, + #[serde(default = "minify_css_by_default")] + minify_css: MinifyCssOption, + #[serde(default)] + minify_additional_scripts_content: Option>, + #[serde(default)] + minify_additional_attributes: Option>, + #[serde(default = "true_by_default")] + sort_space_separated_attribute_values: bool, + #[serde(default)] + sort_attributes: bool, + #[serde(default = "true_by_default")] + merge_metadata_elements: bool, + + // Codegen options + #[serde(default)] + tag_omission: Option, + #[serde(default)] + self_closing_void_elements: Option, + #[serde(default)] + quotes: Option, +} + +const fn true_by_default() -> bool { + true +} + +const fn minify_json_by_default() -> MinifyJsonOption { + MinifyJsonOption::Bool(true) +} + +const fn minify_js_by_default() -> MinifyJsOption { + MinifyJsOption::Bool(true) +} + +const fn minify_css_by_default() -> MinifyCssOption { + MinifyCssOption::Bool(true) +} + +fn default_preserve_comments() -> Option> { + Some(vec![ + // License comments + CachedRegex::new("@preserve").unwrap(), + CachedRegex::new("@copyright").unwrap(), + CachedRegex::new("@lic").unwrap(), + CachedRegex::new("@cc_on").unwrap(), + // Allow to keep custom comments + CachedRegex::new("^!").unwrap(), + // Server-side comments + CachedRegex::new("^\\s*#").unwrap(), + // Conditional IE comments + CachedRegex::new("^\\[if\\s[^\\]+]").unwrap(), + CachedRegex::new("\\[endif]").unwrap(), + ]) +} + +const fn default_collapse_whitespaces() -> CollapseWhitespaces { + CollapseWhitespaces::OnlyMetadata +} + +#[napi] +impl Task for MinifyTask { + type JsValue = TransformOutput; + type Output = TransformOutput; + + fn compute(&mut self) -> napi::Result { + let opts = deserialize_json(&self.options) + .context("failed to deserialize minifier options") + .convert_err()?; + + minify_inner(&self.code, opts, self.is_fragment).convert_err() + } + + fn resolve(&mut self, _env: napi::Env, output: Self::Output) -> napi::Result { + Ok(output) + } +} + +enum DocumentOrDocumentFragment { + Document(Document), + DocumentFragment(DocumentFragment), +} + +fn create_namespace(namespace: &str) -> anyhow::Result { + match &*namespace.to_lowercase() { + "http://www.w3.org/1999/xhtml" => Ok(Namespace::HTML), + "http://www.w3.org/1998/math/mathml" => Ok(Namespace::MATHML), + "http://www.w3.org/2000/svg" => Ok(Namespace::SVG), + "http://www.w3.org/1999/xlink" => Ok(Namespace::XLINK), + "http://www.w3.org/xml/1998/namespace" => Ok(Namespace::XML), + "http://www.w3.org/2000/xmlns/" => Ok(Namespace::XMLNS), + _ => { + bail!("failed to parse namespace of context element") + } + } +} + +fn create_element(context_element: Element) -> anyhow::Result { + let mut attributes = Vec::with_capacity(context_element.attributes.len()); + + for attribute in context_element.attributes.into_iter() { + let namespace = match attribute.namespace { + Some(namespace) => Some(create_namespace(&namespace)?), + _ => None, + }; + + attributes.push(swc_html_ast::Attribute { + span: DUMMY_SP, + namespace, + prefix: attribute.prefix.map(|value| value.into()), + name: attribute.name.into(), + raw_name: None, + value: attribute.value.map(|value| value.into()), + raw_value: None, + }) + } + + Ok(swc_html_ast::Element { + span: DUMMY_SP, + tag_name: context_element.tag_name.into(), + namespace: create_namespace(&context_element.namespace)?, + attributes, + children: vec![], + content: None, + is_self_closing: context_element.is_self_closing, + }) +} + +fn minify_inner( + code: &str, + opts: MinifyOptions, + is_fragment: bool, +) -> anyhow::Result { + swc_common::GLOBALS.set(&swc_common::Globals::new(), || { + try_with(|cm, handler| { + let filename = match opts.filename { + Some(v) => FileName::Real(v.into()), + None => FileName::Anon, + }; + + let fm = cm.new_source_file(filename, code.into()); + + let scripting_enabled = opts.scripting_enabled; + let mut errors = vec![]; + + let (mut document_or_document_fragment, context_element) = if is_fragment { + let context_element = match opts.context_element { + Some(context_element) => create_element(context_element)?, + _ => swc_html_ast::Element { + span: DUMMY_SP, + tag_name: js_word!("template"), + namespace: Namespace::HTML, + attributes: vec![], + children: vec![], + content: None, + is_self_closing: false, + }, + }; + let mode = match opts.mode { + Some(mode) => mode, + _ => DocumentMode::NoQuirks, + }; + let form_element = match opts.form_element { + Some(form_element) => Some(create_element(form_element)?), + _ => None, + }; + let document_fragment = parse_file_as_document_fragment( + &fm, + &context_element, + mode, + form_element.as_ref(), + swc_html::parser::parser::ParserConfig { + scripting_enabled, + iframe_srcdoc: opts.iframe_srcdoc, + ..Default::default() + }, + &mut errors, + ); + + let document_fragment = match document_fragment { + Ok(v) => v, + Err(err) => { + err.to_diagnostics(handler).emit(); + + for err in errors { + err.to_diagnostics(handler).emit(); + } + + bail!("failed to parse input as document fragment") + } + }; + + ( + DocumentOrDocumentFragment::DocumentFragment(document_fragment), + Some(context_element), + ) + } else { + let document = parse_file_as_document( + &fm, + swc_html::parser::parser::ParserConfig { + scripting_enabled, + iframe_srcdoc: opts.iframe_srcdoc, + ..Default::default() + }, + &mut errors, + ); + + let document = match document { + Ok(v) => v, + Err(err) => { + err.to_diagnostics(handler).emit(); + + for err in errors { + err.to_diagnostics(handler).emit(); + } + + bail!("failed to parse input as document") + } + }; + + (DocumentOrDocumentFragment::Document(document), None) + }; + + let mut returned_errors = None; + + if !errors.is_empty() { + returned_errors = Some(Vec::with_capacity(errors.len())); + + for err in errors { + let mut buf = vec![]; + + err.to_diagnostics(handler).buffer(&mut buf); + + for i in buf { + returned_errors.as_mut().unwrap().push(Diagnostic { + level: i.level.to_string(), + message: i.message(), + span: serde_json::to_value(&i.span)?, + }); + } + } + } + + let options = swc_html_minifier::option::MinifyOptions { + force_set_html5_doctype: opts.force_set_html5_doctype, + collapse_whitespaces: opts.collapse_whitespaces, + remove_empty_metadata_elements: opts.remove_empty_metadata_elements, + remove_comments: opts.remove_comments, + preserve_comments: opts.preserve_comments, + minify_conditional_comments: opts.minify_conditional_comments, + remove_empty_attributes: opts.remove_empty_attributes, + remove_redundant_attributes: opts.remove_redundant_attributes, + collapse_boolean_attributes: opts.collapse_boolean_attributes, + normalize_attributes: opts.normalize_attributes, + minify_json: opts.minify_json, + minify_js: opts.minify_js, + minify_css: opts.minify_css, + minify_additional_scripts_content: opts.minify_additional_scripts_content, + minify_additional_attributes: opts.minify_additional_attributes, + sort_space_separated_attribute_values: opts.sort_space_separated_attribute_values, + sort_attributes: opts.sort_attributes, + merge_metadata_elements: opts.merge_metadata_elements, + }; + + match document_or_document_fragment { + DocumentOrDocumentFragment::Document(ref mut document) => { + minify_document(document, &options); + } + DocumentOrDocumentFragment::DocumentFragment(ref mut document_fragment) => { + minify_document_fragment( + document_fragment, + context_element.as_ref().unwrap(), + &options, + ); + } + } + + let code = { + let mut buf = String::new(); + + { + let mut wr = BasicHtmlWriter::new( + &mut buf, + None, + BasicHtmlWriterConfig { + ..Default::default() + }, + ); + let mut gen = CodeGenerator::new( + &mut wr, + CodegenConfig { + minify: true, + scripting_enabled, + context_element: context_element.as_ref(), + tag_omission: opts.tag_omission, + self_closing_void_elements: opts.self_closing_void_elements, + quotes: opts.quotes, + }, + ); + + match document_or_document_fragment { + DocumentOrDocumentFragment::Document(document) => { + gen.emit(&document).context("failed to emit")?; + } + DocumentOrDocumentFragment::DocumentFragment(document_fragment) => { + gen.emit(&document_fragment).context("failed to emit")?; + } + } + } + + buf + }; + + Ok(TransformOutput { + code, + errors: returned_errors, + }) + }) + }) +} + +#[allow(unused)] +#[napi] +fn minify(code: Buffer, opts: Buffer, signal: Option) -> AsyncTask { + let code = String::from_utf8_lossy(code.as_ref()).to_string(); + let options = String::from_utf8_lossy(opts.as_ref()).to_string(); + + let task = MinifyTask { + code, + options, + is_fragment: false, + }; + + AsyncTask::with_optional_signal(task, signal) +} + +#[allow(unused)] +#[napi] +fn minify_fragment( + code: Buffer, + opts: Buffer, + signal: Option, +) -> AsyncTask { + let code = String::from_utf8_lossy(code.as_ref()).to_string(); + let options = String::from_utf8_lossy(opts.as_ref()).to_string(); + + let task = MinifyTask { + code, + options, + is_fragment: true, + }; + + AsyncTask::with_optional_signal(task, signal) +} + +#[allow(unused)] +#[napi] +pub fn minify_sync(code: Buffer, opts: Buffer) -> napi::Result { + let code = String::from_utf8_lossy(code.as_ref()); + let options = get_deserialized(opts)?; + + minify_inner(&code, options, false).convert_err() +} + +#[allow(unused)] +#[napi] +pub fn minify_fragment_sync(code: Buffer, opts: Buffer) -> napi::Result { + let code = String::from_utf8_lossy(code.as_ref()); + let options = get_deserialized(opts)?; + + minify_inner(&code, options, true).convert_err() +} diff --git a/bindings/binding_html_node/src/util.rs b/bindings/binding_html_node/src/util.rs new file mode 100644 index 0000000000000..23b3ff745503e --- /dev/null +++ b/bindings/binding_html_node/src/util.rs @@ -0,0 +1,35 @@ +use anyhow::{anyhow, Error}; +use swc_common::{errors::Handler, sync::Lrc, FilePathMapping, SourceMap}; +use swc_error_reporters::handler::{try_with_handler, HandlerOpts}; + +pub fn try_with(op: F) -> Result +where + F: FnOnce(&Lrc, &Handler) -> Result, +{ + let cm = Lrc::new(SourceMap::new(FilePathMapping::empty())); + try_with_handler( + cm.clone(), + HandlerOpts { + skip_filename: false, + ..Default::default() + }, + |handler| { + // + let result = + std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| op(&cm, handler))); + + let p = match result { + Ok(v) => return v, + Err(v) => v, + }; + + if let Some(s) = p.downcast_ref::() { + Err(anyhow!("failed to handle: {}", s)) + } else if let Some(s) = p.downcast_ref::<&str>() { + Err(anyhow!("failed to handle: {}", s)) + } else { + Err(anyhow!("failed to handle with unknown panic message")) + } + }, + ) +} diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index d39bdd7ff77d6..b590a764263b0 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-darwin-arm64", - "version": "1.7.14", - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ], - "main": "swc.darwin-arm64.node", - "files": [ - "swc.darwin-arm64.node", - "swc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/core-darwin-arm64", + "version": "1.7.14", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "swc.darwin-arm64.node", + "files": [ + "swc.darwin-arm64.node", + "swc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 909afe2a670a4..e1e7bc20c39d7 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-darwin-x64", - "version": "1.7.14", - "os": [ - "darwin" - ], - "cpu": [ - "x64" - ], - "main": "swc.darwin-x64.node", - "files": [ - "swc.darwin-x64.node", - "swc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/core-darwin-x64", + "version": "1.7.14", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "swc.darwin-x64.node", + "files": [ + "swc.darwin-x64.node", + "swc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 03408dbc702b1..2c7c1e532d339 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm" - ], - "main": "swc.linux-arm-gnueabihf.node", - "files": [ - "swc.linux-arm-gnueabihf.node", - "swc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/core-linux-arm-gnueabihf", + "version": "1.7.14", + "os": [ + "linux" + ], + "cpu": [ + "arm" + ], + "main": "swc.linux-arm-gnueabihf.node", + "files": [ + "swc.linux-arm-gnueabihf.node", + "swc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 1624e25ae65c6..d3e1d92465f7c 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "swc.linux-arm64-gnu.node", - "files": [ - "swc.linux-arm64-gnu.node", - "swc" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/core-linux-arm64-gnu", + "version": "1.7.14", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "swc.linux-arm64-gnu.node", + "files": [ + "swc.linux-arm64-gnu.node", + "swc" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 6c9accc491e70..b7fcdb19acd5a 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/core-linux-arm64-musl", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "swc.linux-arm64-musl.node", - "files": [ - "swc.linux-arm64-musl.node", - "swc" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/core-linux-arm64-musl", + "version": "1.7.14", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "swc.linux-arm64-musl.node", + "files": [ + "swc.linux-arm64-musl.node", + "swc" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 33a1942a66e76..024ace290d1ab 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/core-linux-x64-gnu", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "swc.linux-x64-gnu.node", - "files": [ - "swc.linux-x64-gnu.node", - "swc" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/core-linux-x64-gnu", + "version": "1.7.14", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "swc.linux-x64-gnu.node", + "files": [ + "swc.linux-x64-gnu.node", + "swc" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 47d7787ba8bbf..0d5dd6f2d29dd 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/core-linux-x64-musl", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "swc.linux-x64-musl.node", - "files": [ - "swc.linux-x64-musl.node", - "swc" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/core-linux-x64-musl", + "version": "1.7.14", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "swc.linux-x64-musl.node", + "files": [ + "swc.linux-x64-musl.node", + "swc" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 247417eec41e6..4750f8374f907 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "arm64" - ], - "main": "swc.win32-arm64-msvc.node", - "files": [ - "swc.win32-arm64-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/core-win32-arm64-msvc", + "version": "1.7.14", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "swc.win32-arm64-msvc.node", + "files": [ + "swc.win32-arm64-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index e4c9b21a9bad6..1ad309faa03f6 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "ia32" - ], - "main": "swc.win32-ia32-msvc.node", - "files": [ - "swc.win32-ia32-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/core-win32-ia32-msvc", + "version": "1.7.14", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "swc.win32-ia32-msvc.node", + "files": [ + "swc.win32-ia32-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 771b53b91d71a..73cf3afdfa537 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-win32-x64-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "main": "swc.win32-x64-msvc.node", - "files": [ - "swc.win32-x64-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/core-win32-x64-msvc", + "version": "1.7.14", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "swc.win32-x64-msvc.node", + "files": [ + "swc.win32-x64-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/.gitignore b/packages/html/.gitignore new file mode 100644 index 0000000000000..e273a1fa551f7 --- /dev/null +++ b/packages/html/.gitignore @@ -0,0 +1,2 @@ +/*.js +!binding.js \ No newline at end of file diff --git a/packages/html/.npmignore b/packages/html/.npmignore new file mode 100644 index 0000000000000..ed6bd0593e5c7 --- /dev/null +++ b/packages/html/.npmignore @@ -0,0 +1,71 @@ +target/ +native/index.node +native/artifacts.json +**/*~ +**/node_modules +**/.DS_Store +artifacts/ + +pkg/ + +yarn.lock +package-lock.json +*.log +.idea/ +docs/ + +wasm/ + +# Reduce package size +**/tests.rs +**/tests/ +**/benches/ +**/target/ +*.svg + +# napi is cool +*.rs +/scripts/npm +/native/ +/src +/.vscode +/ecmascript/transforms/src/helpers +/node-swc/__tests__/ +/*.node + +atoms +bundler +Cargo.lock +Cargo.toml +common +CONTRIBUTING.md +ecmascript +macros +node +node-swc +examples +scripts +spack +testing +ARCHITECTURE.md +tsconfig.json +rust-toolchain +.github +.cargo +.gitmodules +.rustfmt.toml +.gitattributes +.travis.yml +.husky/ +.prettierrc +crates/ +packages/ +cspell.json +deny.toml +.mocha.setup.js +.mocharc.js +jest.config.js +cliff.toml +.kodiak.toml +clippy.toml +.tsbuildinfo diff --git a/packages/html/binding.d.ts b/packages/html/binding.d.ts new file mode 100644 index 0000000000000..88474cf7a70e5 --- /dev/null +++ b/packages/html/binding.d.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ + +/* auto-generated by NAPI-RS */ + +export interface Diagnostic { + level: string; + message: string; + span: any; +} +export interface TransformOutput { + code: string; + errors?: Array; +} +export interface Attribute { + namespace?: string; + prefix?: string; + name: string; + value?: string; +} +export interface Element { + tagName: string; + namespace: string; + attributes: Array; + isSelfClosing: boolean; +} +export function minify( + code: Buffer, + opts: Buffer, + signal?: AbortSignal | undefined | null +): Promise; +export function minifyFragment( + code: Buffer, + opts: Buffer, + signal?: AbortSignal | undefined | null +): Promise; +export function minifySync(code: Buffer, opts: Buffer): TransformOutput; +export function minifyFragmentSync(code: Buffer, opts: Buffer): TransformOutput; +export interface Diagnostic { + level: string; + message: string; + span: any; +} +export interface TransformOutput { + code: string; + errors?: Array; +} +export interface Attribute { + namespace?: string; + prefix?: string; + name: string; + value?: string; +} +export interface Element { + tagName: string; + namespace: string; + attributes: Array; + isSelfClosing: boolean; +} +export function minify( + code: Buffer, + opts: Buffer, + signal?: AbortSignal | undefined | null +): Promise; +export function minifyFragment( + code: Buffer, + opts: Buffer, + signal?: AbortSignal | undefined | null +): Promise; +export function minifySync(code: Buffer, opts: Buffer): TransformOutput; +export function minifyFragmentSync(code: Buffer, opts: Buffer): TransformOutput; diff --git a/packages/html/binding.js b/packages/html/binding.js new file mode 100644 index 0000000000000..26d9325a31932 --- /dev/null +++ b/packages/html/binding.js @@ -0,0 +1,284 @@ +/* tslint:disable */ +/* eslint-disable */ +/* prettier-ignore */ + +/* auto-generated by NAPI-RS */ + +const { existsSync, readFileSync } = require('fs') +const { join } = require("path"); + +const { platform, arch } = process; + +let nativeBinding = null; +let localFileExisted = false; +let loadError = null; + +function isMusl() { + // For Node 10 + if (!process.report || typeof process.report.getReport !== "function") { + try { + const lddPath = require("child_process") + .execSync("which ldd") + .toString() + .trim(); + return readFileSync(lddPath, "utf8").includes("musl"); + } catch (e) { + return true; + } + } else { + const { glibcVersionRuntime } = process.report.getReport().header; + return !glibcVersionRuntime; + } +} + +switch (platform) { + case "android": + switch (arch) { + case "arm64": + localFileExisted = existsSync( + join(__dirname, "html.android-arm64.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.android-arm64.node"); + } else { + nativeBinding = require("@swc/html-android-arm64"); + } + } catch (e) { + loadError = e; + } + break; + case "arm": + localFileExisted = existsSync( + join(__dirname, "html.android-arm-eabi.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.android-arm-eabi.node"); + } else { + nativeBinding = require("@swc/html-android-arm-eabi"); + } + } catch (e) { + loadError = e; + } + break; + default: + throw new Error(`Unsupported architecture on Android ${arch}`); + } + break; + case "win32": + switch (arch) { + case "x64": + localFileExisted = existsSync( + join(__dirname, "html.win32-x64-msvc.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.win32-x64-msvc.node"); + } else { + nativeBinding = require("@swc/html-win32-x64-msvc"); + } + } catch (e) { + loadError = e; + } + break; + case "ia32": + localFileExisted = existsSync( + join(__dirname, "html.win32-ia32-msvc.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.win32-ia32-msvc.node"); + } else { + nativeBinding = require("@swc/html-win32-ia32-msvc"); + } + } catch (e) { + loadError = e; + } + break; + case "arm64": + localFileExisted = existsSync( + join(__dirname, "html.win32-arm64-msvc.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.win32-arm64-msvc.node"); + } else { + nativeBinding = require("@swc/html-win32-arm64-msvc"); + } + } catch (e) { + loadError = e; + } + break; + default: + throw new Error(`Unsupported architecture on Windows: ${arch}`); + } + break; + case "darwin": + localFileExisted = existsSync( + join(__dirname, "html.darwin-universal.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.darwin-universal.node"); + } else { + nativeBinding = require("@swc/html-darwin-universal"); + } + break; + } catch {} + switch (arch) { + case "x64": + localFileExisted = existsSync( + join(__dirname, "html.darwin-x64.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.darwin-x64.node"); + } else { + nativeBinding = require("@swc/html-darwin-x64"); + } + } catch (e) { + loadError = e; + } + break; + case "arm64": + localFileExisted = existsSync( + join(__dirname, "html.darwin-arm64.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.darwin-arm64.node"); + } else { + nativeBinding = require("@swc/html-darwin-arm64"); + } + } catch (e) { + loadError = e; + } + break; + default: + throw new Error(`Unsupported architecture on macOS: ${arch}`); + } + break; + case "freebsd": + if (arch !== "x64") { + throw new Error(`Unsupported architecture on FreeBSD: ${arch}`); + } + localFileExisted = existsSync(join(__dirname, "html.freebsd-x64.node")); + try { + if (localFileExisted) { + nativeBinding = require("./html.freebsd-x64.node"); + } else { + nativeBinding = require("@swc/html-freebsd-x64"); + } + } catch (e) { + loadError = e; + } + break; + case "linux": + switch (arch) { + case "x64": + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, "html.linux-x64-musl.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.linux-x64-musl.node"); + } else { + nativeBinding = require("@swc/html-linux-x64-musl"); + } + } catch (e) { + loadError = e; + } + } else { + localFileExisted = existsSync( + join(__dirname, "html.linux-x64-gnu.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.linux-x64-gnu.node"); + } else { + nativeBinding = require("@swc/html-linux-x64-gnu"); + } + } catch (e) { + loadError = e; + } + } + break; + case "arm64": + if (isMusl()) { + localFileExisted = existsSync( + join(__dirname, "html.linux-arm64-musl.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.linux-arm64-musl.node"); + } else { + nativeBinding = require("@swc/html-linux-arm64-musl"); + } + } catch (e) { + loadError = e; + } + } else { + localFileExisted = existsSync( + join(__dirname, "html.linux-arm64-gnu.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.linux-arm64-gnu.node"); + } else { + nativeBinding = require("@swc/html-linux-arm64-gnu"); + } + } catch (e) { + loadError = e; + } + } + break; + case "arm": + localFileExisted = existsSync( + join(__dirname, "html.linux-arm-gnueabihf.node") + ); + try { + if (localFileExisted) { + nativeBinding = require("./html.linux-arm-gnueabihf.node"); + } else { + nativeBinding = require("@swc/html-linux-arm-gnueabihf"); + } + } catch (e) { + loadError = e; + } + break; + default: + throw new Error(`Unsupported architecture on Linux: ${arch}`); + } + break; + default: + throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); +} + +if (!nativeBinding) { + if (loadError) { + throw loadError; + } + throw new Error(`Failed to load native binding`); +} + +const { + minify, + minifyFragment, + minifySync, + minifyFragmentSync, + minify, + minifyFragment, + minifySync, + minifyFragmentSync, +} = nativeBinding; + +module.exports.minify = minify; +module.exports.minifyFragment = minifyFragment; +module.exports.minifySync = minifySync; +module.exports.minifyFragmentSync = minifyFragmentSync; +module.exports.minify = minify; +module.exports.minifyFragment = minifyFragment; +module.exports.minifySync = minifySync; +module.exports.minifyFragmentSync = minifyFragmentSync; diff --git a/packages/html/index.ts b/packages/html/index.ts new file mode 100644 index 0000000000000..7161fba082a9f --- /dev/null +++ b/packages/html/index.ts @@ -0,0 +1,74 @@ +import * as binding from "./binding"; + +export type MinifierType = "js-module" | "js-script" | "json" | "css" | "html"; + +export type Options = { + filename?: string; + iframeSrcdoc?: boolean; + scriptingEnabled?: boolean; + forceSetHtml5Doctype?: boolean; + collapseWhitespaces?: + | "none" + | "all" + | "smart" + | "conservative" + | "advanced-conservative" + | "only-metadata"; + removeEmptyMetadataElements?: boolean; + removeComments?: boolean; + preserveComments: string[]; + minifyConditionalComments?: boolean; + removeEmptyAttributes?: boolean; + removeRedundantAttributes?: boolean; + collapseBooleanAttributes?: boolean; + normalizeAttributes?: boolean; + minifyJson?: boolean | { pretty?: boolean }; + // TODO improve me after typing `@swc/css` + minifyJs?: boolean | { parser?: any; minifier?: any; codegen?: any }; + minifyCss?: boolean | { parser?: any; minifier?: any; codegen?: any }; + minifyAdditionalScriptsContent?: [string, MinifierType][]; + minifyAdditionalAttributes?: [string, MinifierType][]; + sortSpaceSeparatedAttributeValues?: boolean; + sortAttributes?: boolean; + tagOmission?: boolean; + selfClosingVoidElements?: boolean; + quotes?: boolean; +}; + +export type FragmentOptions = Options & { + mode?: "no-quirks" | "limited-quirks" | "quirks"; + context_element?: binding.Element; + form_element?: binding.Element; +}; + +export async function minify( + content: Buffer, + options?: Options +): Promise { + return binding.minify(content, toBuffer(options ?? {})); +} + +export async function minifyFragment( + content: Buffer, + options?: FragmentOptions +): Promise { + return binding.minifyFragment(content, toBuffer(options ?? {})); +} + +export function minifySync( + content: Buffer, + options?: Options +): binding.TransformOutput { + return binding.minifySync(content, toBuffer(options ?? {})); +} + +export async function minifyFragmentSync( + content: Buffer, + options?: FragmentOptions +): Promise { + return binding.minifyFragmentSync(content, toBuffer(options ?? {})); +} + +function toBuffer(t: any): Buffer { + return Buffer.from(JSON.stringify(t)); +} diff --git a/packages/html/package.json b/packages/html/package.json new file mode 100644 index 0000000000000..c81619175a6ac --- /dev/null +++ b/packages/html/package.json @@ -0,0 +1,59 @@ +{ + "name": "@swc/html", + "version": "0.0.29", + "description": "Super-fast alternative for posthtml", + "homepage": "https://swc.rs", + "main": "./index.js", + "author": "강동윤 ", + "license": "Apache-2.0", + "keywords": [ + "swc", + "html" + ], + "engines": { + "node": ">=14" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + }, + "napi": { + "name": "html", + "triples": { + "defaults": true, + "additional": [ + "x86_64-unknown-linux-musl", + "i686-pc-windows-msvc", + "aarch64-unknown-linux-gnu", + "armv7-unknown-linux-gnueabihf", + "aarch64-apple-darwin", + "aarch64-linux-android", + "aarch64-unknown-linux-musl", + "aarch64-pc-windows-msvc", + "armv7-linux-androideabi" + ] + } + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "scripts": { + "artifacts": "napi artifacts --dist scripts/npm", + "prepublishOnly": "tsc -d && napi prepublish -p scripts/npm --tagstyle npm", + "pack": "wasm-pack", + "build:ts": "tsc -d", + "build:wasm": "npm-run-all \"pack -- build ./crates/wasm --scope swc {1} -t {2} \" --", + "build": "tsc -d && napi build --platform --cargo-name html_node --js ./binding.js --dts binding.d.ts -p html_node --release --cargo-cwd ../..", + "build:dev": "tsc -d && napi build --platform --cargo-name html_node --js ./binding.js --dts binding.d.ts -p html_node --cargo-cwd ../..", + "test": "echo 'done!'", + "version": "napi version -p scripts/npm" + }, + "devDependencies": { + "@napi-rs/cli": "^2.16.1", + "typescript": "^5.1.6" + } +} diff --git a/packages/html/scripts/npm/android-arm-eabi/README.md b/packages/html/scripts/npm/android-arm-eabi/README.md new file mode 100644 index 0000000000000..106a5e7316aa6 --- /dev/null +++ b/packages/html/scripts/npm/android-arm-eabi/README.md @@ -0,0 +1,3 @@ +# `@swc/html-android-arm-eabi` + +This is the **armv7-linux-androideabi** binary for `@swc/html` diff --git a/packages/html/scripts/npm/android-arm-eabi/package.json b/packages/html/scripts/npm/android-arm-eabi/package.json new file mode 100644 index 0000000000000..fc3d774f4fec4 --- /dev/null +++ b/packages/html/scripts/npm/android-arm-eabi/package.json @@ -0,0 +1,41 @@ +{ + "name": "@swc/html-android-arm-eabi", + "version": "1.2.122", + "os": [ + "android" + ], + "cpu": [ + "arm" + ], + "main": "html.android-arm-eabi.node", + "files": [ + "html.android-arm-eabi.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/android-arm64/README.md b/packages/html/scripts/npm/android-arm64/README.md new file mode 100644 index 0000000000000..723cc22a97b89 --- /dev/null +++ b/packages/html/scripts/npm/android-arm64/README.md @@ -0,0 +1,3 @@ +# `@swc/html-android-arm64` + +This is the **aarch64-linux-android** binary for `@swc/html` diff --git a/packages/html/scripts/npm/android-arm64/package.json b/packages/html/scripts/npm/android-arm64/package.json new file mode 100644 index 0000000000000..d3f4afc956716 --- /dev/null +++ b/packages/html/scripts/npm/android-arm64/package.json @@ -0,0 +1,41 @@ +{ + "name": "@swc/html-android-arm64", + "version": "0.0.1", + "os": [ + "android" + ], + "cpu": [ + "arm64" + ], + "main": "html.android-arm64.node", + "files": [ + "html.android-arm64.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/darwin-arm64/README.md b/packages/html/scripts/npm/darwin-arm64/README.md new file mode 100644 index 0000000000000..30abda33d9dfd --- /dev/null +++ b/packages/html/scripts/npm/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `@swc/html-darwin-arm64` + +This is the **aarch64-apple-darwin** binary for `@swc/html` diff --git a/packages/html/scripts/npm/darwin-arm64/package.json b/packages/html/scripts/npm/darwin-arm64/package.json new file mode 100644 index 0000000000000..d88527a9afc77 --- /dev/null +++ b/packages/html/scripts/npm/darwin-arm64/package.json @@ -0,0 +1,41 @@ +{ + "name": "@swc/html-darwin-arm64", + "version": "0.0.1", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "html.darwin-arm64.node", + "files": [ + "html.darwin-arm64.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/darwin-x64/README.md b/packages/html/scripts/npm/darwin-x64/README.md new file mode 100644 index 0000000000000..cda9612ccd24e --- /dev/null +++ b/packages/html/scripts/npm/darwin-x64/README.md @@ -0,0 +1,3 @@ +# `@swc/html-darwin-x64` + +This is the **x86_64-apple-darwin** binary for `@swc/html` diff --git a/packages/html/scripts/npm/darwin-x64/package.json b/packages/html/scripts/npm/darwin-x64/package.json new file mode 100644 index 0000000000000..dbb4a51207a15 --- /dev/null +++ b/packages/html/scripts/npm/darwin-x64/package.json @@ -0,0 +1,41 @@ +{ + "name": "@swc/html-darwin-x64", + "version": "0.0.1", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "html.darwin-x64.node", + "files": [ + "html.darwin-x64.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/freebsd-x64/README.md b/packages/html/scripts/npm/freebsd-x64/README.md new file mode 100644 index 0000000000000..66cba2f5e8803 --- /dev/null +++ b/packages/html/scripts/npm/freebsd-x64/README.md @@ -0,0 +1,3 @@ +# `@swc/html-freebsd-x64` + +This is the **x86_64-unknown-freebsd** binary for `@swc/html` diff --git a/packages/html/scripts/npm/freebsd-x64/package.json b/packages/html/scripts/npm/freebsd-x64/package.json new file mode 100644 index 0000000000000..0775efa3129de --- /dev/null +++ b/packages/html/scripts/npm/freebsd-x64/package.json @@ -0,0 +1,41 @@ +{ + "name": "@swc/html-freebsd-x64", + "version": "0.0.1", + "os": [ + "freebsd" + ], + "cpu": [ + "x64" + ], + "main": "html.freebsd-x64.node", + "files": [ + "html.freebsd-x64.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/linux-arm-gnueabihf/README.md b/packages/html/scripts/npm/linux-arm-gnueabihf/README.md new file mode 100644 index 0000000000000..50b6b52fe3c41 --- /dev/null +++ b/packages/html/scripts/npm/linux-arm-gnueabihf/README.md @@ -0,0 +1,3 @@ +# `@swc/html-linux-arm-gnueabihf` + +This is the **armv7-unknown-linux-gnueabihf** binary for `@swc/html` diff --git a/packages/html/scripts/npm/linux-arm-gnueabihf/package.json b/packages/html/scripts/npm/linux-arm-gnueabihf/package.json new file mode 100644 index 0000000000000..9fde68abddda7 --- /dev/null +++ b/packages/html/scripts/npm/linux-arm-gnueabihf/package.json @@ -0,0 +1,41 @@ +{ + "name": "@swc/html-linux-arm-gnueabihf", + "version": "0.0.1", + "os": [ + "linux" + ], + "cpu": [ + "arm" + ], + "main": "html.linux-arm-gnueabihf.node", + "files": [ + "html.linux-arm-gnueabihf.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/linux-arm64-gnu/README.md b/packages/html/scripts/npm/linux-arm64-gnu/README.md new file mode 100644 index 0000000000000..eb06be100b023 --- /dev/null +++ b/packages/html/scripts/npm/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `@swc/html-linux-arm64-gnu` + +This is the **aarch64-unknown-linux-gnu** binary for `@swc/html` diff --git a/packages/html/scripts/npm/linux-arm64-gnu/package.json b/packages/html/scripts/npm/linux-arm64-gnu/package.json new file mode 100644 index 0000000000000..11bc285db3c4d --- /dev/null +++ b/packages/html/scripts/npm/linux-arm64-gnu/package.json @@ -0,0 +1,44 @@ +{ + "name": "@swc/html-linux-arm64-gnu", + "version": "0.0.1", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "html.linux-arm64-gnu.node", + "files": [ + "html.linux-arm64-gnu.node" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/linux-arm64-musl/README.md b/packages/html/scripts/npm/linux-arm64-musl/README.md new file mode 100644 index 0000000000000..59a3a4dc0d8e1 --- /dev/null +++ b/packages/html/scripts/npm/linux-arm64-musl/README.md @@ -0,0 +1,3 @@ +# `@swc/html-linux-arm64-musl` + +This is the **aarch64-unknown-linux-musl** binary for `@swc/html` diff --git a/packages/html/scripts/npm/linux-arm64-musl/package.json b/packages/html/scripts/npm/linux-arm64-musl/package.json new file mode 100644 index 0000000000000..e67be082e6e71 --- /dev/null +++ b/packages/html/scripts/npm/linux-arm64-musl/package.json @@ -0,0 +1,44 @@ +{ + "name": "@swc/html-linux-arm64-musl", + "version": "0.0.1", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "html.linux-arm64-musl.node", + "files": [ + "html.linux-arm64-musl.node" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/linux-x64-gnu/README.md b/packages/html/scripts/npm/linux-x64-gnu/README.md new file mode 100644 index 0000000000000..2f08c21b89965 --- /dev/null +++ b/packages/html/scripts/npm/linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `@swc/html-linux-x64-gnu` + +This is the **x86_64-unknown-linux-gnu** binary for `@swc/html` diff --git a/packages/html/scripts/npm/linux-x64-gnu/package.json b/packages/html/scripts/npm/linux-x64-gnu/package.json new file mode 100644 index 0000000000000..686a8a1ab53df --- /dev/null +++ b/packages/html/scripts/npm/linux-x64-gnu/package.json @@ -0,0 +1,44 @@ +{ + "name": "@swc/html-linux-x64-gnu", + "version": "0.0.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "html.linux-x64-gnu.node", + "files": [ + "html.linux-x64-gnu.node" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/linux-x64-musl/README.md b/packages/html/scripts/npm/linux-x64-musl/README.md new file mode 100644 index 0000000000000..b603ac65f1c0a --- /dev/null +++ b/packages/html/scripts/npm/linux-x64-musl/README.md @@ -0,0 +1,3 @@ +# `@swc/html-linux-x64-musl` + +This is the **x86_64-unknown-linux-musl** binary for `@swc/html` diff --git a/packages/html/scripts/npm/linux-x64-musl/package.json b/packages/html/scripts/npm/linux-x64-musl/package.json new file mode 100644 index 0000000000000..0f5656b0776fc --- /dev/null +++ b/packages/html/scripts/npm/linux-x64-musl/package.json @@ -0,0 +1,44 @@ +{ + "name": "@swc/html-linux-x64-musl", + "version": "0.0.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "html.linux-x64-musl.node", + "files": [ + "html.linux-x64-musl.node" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/win32-arm64-msvc/README.md b/packages/html/scripts/npm/win32-arm64-msvc/README.md new file mode 100644 index 0000000000000..470550054c983 --- /dev/null +++ b/packages/html/scripts/npm/win32-arm64-msvc/README.md @@ -0,0 +1,3 @@ +# `@swc/html-win32-arm64-msvc` + +This is the **aarch64-pc-windows-msvc** binary for `@swc/html` diff --git a/packages/html/scripts/npm/win32-arm64-msvc/package.json b/packages/html/scripts/npm/win32-arm64-msvc/package.json new file mode 100644 index 0000000000000..bdb1890b4fa32 --- /dev/null +++ b/packages/html/scripts/npm/win32-arm64-msvc/package.json @@ -0,0 +1,41 @@ +{ + "name": "@swc/html-win32-arm64-msvc", + "version": "0.0.1", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "html.win32-arm64-msvc.node", + "files": [ + "html.win32-arm64-msvc.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/win32-ia32-msvc/README.md b/packages/html/scripts/npm/win32-ia32-msvc/README.md new file mode 100644 index 0000000000000..17122d1e55c92 --- /dev/null +++ b/packages/html/scripts/npm/win32-ia32-msvc/README.md @@ -0,0 +1,3 @@ +# `@swc/html-win32-ia32-msvc` + +This is the **i686-pc-windows-msvc** binary for `@swc/html` diff --git a/packages/html/scripts/npm/win32-ia32-msvc/package.json b/packages/html/scripts/npm/win32-ia32-msvc/package.json new file mode 100644 index 0000000000000..3fa5c16275268 --- /dev/null +++ b/packages/html/scripts/npm/win32-ia32-msvc/package.json @@ -0,0 +1,41 @@ +{ + "name": "@swc/html-win32-ia32-msvc", + "version": "0.0.1", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "html.win32-ia32-msvc.node", + "files": [ + "html.win32-ia32-msvc.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/win32-x64-msvc/README.md b/packages/html/scripts/npm/win32-x64-msvc/README.md new file mode 100644 index 0000000000000..b1b72cf1857ca --- /dev/null +++ b/packages/html/scripts/npm/win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `@swc/html-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `@swc/html` diff --git a/packages/html/scripts/npm/win32-x64-msvc/package.json b/packages/html/scripts/npm/win32-x64-msvc/package.json new file mode 100644 index 0000000000000..d8db520b485bc --- /dev/null +++ b/packages/html/scripts/npm/win32-x64-msvc/package.json @@ -0,0 +1,41 @@ +{ + "name": "@swc/html-win32-x64-msvc", + "version": "0.0.1", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "html.win32-x64-msvc.node", + "files": [ + "html.win32-x64-msvc.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/tsconfig.json b/packages/html/tsconfig.json new file mode 100644 index 0000000000000..2b7ad90e16b59 --- /dev/null +++ b/packages/html/tsconfig.json @@ -0,0 +1,103 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2019" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs" /* Specify what module code is generated. */, + // "rootDir": "./src", /* Specify the root folder within your source files. */ + "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */, + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + + /* Type Checking */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 9141701a65412..db4e0e6f53d5a 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/minifier-darwin-arm64", - "version": "1.7.14", - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ], - "main": "minifier.darwin-arm64.node", - "files": [ - "minifier.darwin-arm64.node", - "swc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/minifier-darwin-arm64", + "version": "1.7.14", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "minifier.darwin-arm64.node", + "files": [ + "minifier.darwin-arm64.node", + "swc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index fe6056484d9cd..ccc7d0867efec 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/minifier-darwin-x64", - "version": "1.7.14", - "os": [ - "darwin" - ], - "cpu": [ - "x64" - ], - "main": "minifier.darwin-x64.node", - "files": [ - "minifier.darwin-x64.node", - "swc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/minifier-darwin-x64", + "version": "1.7.14", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "minifier.darwin-x64.node", + "files": [ + "minifier.darwin-x64.node", + "swc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index d7d5554e56ed1..a65f0c0f697b8 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,38 +1,38 @@ { - "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm" - ], - "main": "minifier.linux-arm-gnueabihf.node", - "files": [ - "minifier.linux-arm-gnueabihf.node", - "swc" - ], - "description": "Super-fast alternative for terser", - "keywords": [ - "swc", - "terser", - "minifier" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0", - "engines": { - "node": ">=12" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/minifier-linux-arm-gnueabihf", + "version": "1.7.14", + "os": [ + "linux" + ], + "cpu": [ + "arm" + ], + "main": "minifier.linux-arm-gnueabihf.node", + "files": [ + "minifier.linux-arm-gnueabihf.node", + "swc" + ], + "description": "Super-fast alternative for terser", + "keywords": [ + "swc", + "terser", + "minifier" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0", + "engines": { + "node": ">=12" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 8681c30bc2f05..271e0fd568db0 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "minifier.linux-arm64-gnu.node", - "files": [ - "minifier.linux-arm64-gnu.node", - "swc" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/minifier-linux-arm64-gnu", + "version": "1.7.14", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "minifier.linux-arm64-gnu.node", + "files": [ + "minifier.linux-arm64-gnu.node", + "swc" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 34f1f65cab63a..e1246f9f6c906 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "minifier.linux-arm64-musl.node", - "files": [ - "minifier.linux-arm64-musl.node", - "swc" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/minifier-linux-arm64-musl", + "version": "1.7.14", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "minifier.linux-arm64-musl.node", + "files": [ + "minifier.linux-arm64-musl.node", + "swc" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 92b966c4b9c30..152ed3c907c10 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "minifier.linux-x64-gnu.node", - "files": [ - "minifier.linux-x64-gnu.node", - "swc" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/minifier-linux-x64-gnu", + "version": "1.7.14", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "minifier.linux-x64-gnu.node", + "files": [ + "minifier.linux-x64-gnu.node", + "swc" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 920e0597dd94a..4870386c71ebc 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "minifier.linux-x64-musl.node", - "files": [ - "minifier.linux-x64-musl.node", - "swc" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/minifier-linux-x64-musl", + "version": "1.7.14", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "minifier.linux-x64-musl.node", + "files": [ + "minifier.linux-x64-musl.node", + "swc" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 0044a4c037702..f3a805e1f4b43 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "arm64" - ], - "main": "minifier.win32-arm64-msvc.node", - "files": [ - "minifier.win32-arm64-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/minifier-win32-arm64-msvc", + "version": "1.7.14", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "minifier.win32-arm64-msvc.node", + "files": [ + "minifier.win32-arm64-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 84a93ae9acbfd..5df1ae9abf4e2 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "ia32" - ], - "main": "minifier.win32-ia32-msvc.node", - "files": [ - "minifier.win32-ia32-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/minifier-win32-ia32-msvc", + "version": "1.7.14", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "minifier.win32-ia32-msvc.node", + "files": [ + "minifier.win32-ia32-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 750145496af91..2dbb3ac61c5f8 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "main": "minifier.win32-x64-msvc.node", - "files": [ - "minifier.win32-x64-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/minifier-win32-x64-msvc", + "version": "1.7.14", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "minifier.win32-x64-msvc.node", + "files": [ + "minifier.win32-x64-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/yarn.lock b/yarn.lock index fc1a6795bfd96..452e4b6063d6e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3032,6 +3032,15 @@ __metadata: languageName: node linkType: hard +"@napi-rs/cli@npm:^2.16.1": + version: 2.18.4 + resolution: "@napi-rs/cli@npm:2.18.4" + bin: + napi: scripts/index.js + checksum: b9bdb0e0f96328315a5ad7846df5c72f5f00c707aa58bf2e8b753ad419c4a45989ba6967c8a27acf1552051d2693ae43a9be9ab2c173671040c1861e6d920ac6 + languageName: node + linkType: hard + "@napi-rs/cli@npm:^3.0.0-alpha.22": version: 3.0.0-alpha.55 resolution: "@napi-rs/cli@npm:3.0.0-alpha.55" @@ -4644,6 +4653,15 @@ __metadata: languageName: unknown linkType: soft +"@swc/html@workspace:packages/html": + version: 0.0.0-use.local + resolution: "@swc/html@workspace:packages/html" + dependencies: + "@napi-rs/cli": "npm:^2.16.1" + typescript: "npm:^5.1.6" + languageName: unknown + linkType: soft + "@swc/minifier-darwin-arm64@workspace:packages/minifier/scripts/npm/darwin-arm64": version: 0.0.0-use.local resolution: "@swc/minifier-darwin-arm64@workspace:packages/minifier/scripts/npm/darwin-arm64" @@ -16973,6 +16991,16 @@ __metadata: languageName: node linkType: hard +"typescript@npm:^5.1.6": + version: 5.5.4 + resolution: "typescript@npm:5.5.4" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 1689ccafef894825481fc3d856b4834ba3cc185a9c2878f3c76a9a1ef81af04194849840f3c69e7961e2312771471bb3b460ca92561e1d87599b26c37d0ffb6f + languageName: node + linkType: hard + "typescript@npm:^5.2.2": version: 5.4.5 resolution: "typescript@npm:5.4.5" @@ -17003,6 +17031,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A^5.1.6#optional!builtin": + version: 5.5.4 + resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin::version=5.5.4&hash=e012d7" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 2c065f0ef81855eac25c9b658a3c9da65ffc005260c12854c2286f40f3667e1b1ecf8bdbdd37b59aa0397920378ce7900bff8cb32e0f1c7af6fd86efc676718c + languageName: node + linkType: hard + "typescript@patch:typescript@npm%3A^5.2.2#optional!builtin": version: 5.4.5 resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin::version=5.4.5&hash=e012d7" From fde1653c453c89a0615201b4690587dc404b1501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 09:59:25 +0900 Subject: [PATCH 12/59] chore: Fix publish action --- .github/actions/tag-git-release/action.yml | 5 ++++- .github/workflows/publish.yml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/tag-git-release/action.yml b/.github/actions/tag-git-release/action.yml index 24a7619dadbd3..9fd74e1efb2c5 100644 --- a/.github/actions/tag-git-release/action.yml +++ b/.github/actions/tag-git-release/action.yml @@ -4,6 +4,9 @@ inputs: version: description: "The version" required: true + ssh-private-key: + description: "The SSH private key" + required: true runs: using: "composite" @@ -33,7 +36,7 @@ runs: - uses: webfactory/ssh-agent@v0.9.0 with: - ssh-private-key: ${{ secrets.SWC_BOT_SSH }} + ssh-private-key: ${{ inputs.ssh-private-key }} - name: Create git tag commit shell: bash diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1ea33fe19001c..2383f9261b6a9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -144,6 +144,7 @@ jobs: - uses: ./.github/actions/tag-git-release with: version: ${{ needs.determine-nightly-version.outputs.version }} + ssh-private-key: ${{ secrets.SWC_BOT_SSH }} publish-core-nightly: if: github.event_name == 'workflow_dispatch' @@ -202,6 +203,7 @@ jobs: - uses: ./.github/actions/tag-git-release with: version: ${{ inputs.version }} + ssh-private-key: ${{ secrets.SWC_BOT_SSH }} publish-core-stable: name: "Publish ${{ inputs.version || 'stable' }} to npm" From 462232ed35668acf3248011f0708f298ee53c06b Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 01:13:24 +0000 Subject: [PATCH 13/59] chore: Publish `1.7.15-nightly-20240820.1` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 10 +-- bindings/Cargo.toml | 4 +- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 82 ++++++++--------- .../core/scripts/npm/darwin-x64/package.json | 82 ++++++++--------- .../npm/linux-arm-gnueabihf/package.json | 82 ++++++++--------- .../scripts/npm/linux-arm64-gnu/package.json | 88 +++++++++---------- .../scripts/npm/linux-arm64-musl/package.json | 88 +++++++++---------- .../scripts/npm/linux-x64-gnu/package.json | 88 +++++++++---------- .../scripts/npm/linux-x64-musl/package.json | 88 +++++++++---------- .../scripts/npm/win32-arm64-msvc/package.json | 82 ++++++++--------- .../scripts/npm/win32-ia32-msvc/package.json | 82 ++++++++--------- .../scripts/npm/win32-x64-msvc/package.json | 82 ++++++++--------- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 82 ++++++++--------- .../scripts/npm/darwin-x64/package.json | 82 ++++++++--------- .../npm/linux-arm-gnueabihf/package.json | 74 ++++++++-------- .../scripts/npm/linux-arm64-gnu/package.json | 88 +++++++++---------- .../scripts/npm/linux-arm64-musl/package.json | 88 +++++++++---------- .../scripts/npm/linux-x64-gnu/package.json | 88 +++++++++---------- .../scripts/npm/linux-x64-musl/package.json | 88 +++++++++---------- .../scripts/npm/win32-arm64-msvc/package.json | 82 ++++++++--------- .../scripts/npm/win32-ia32-msvc/package.json | 82 ++++++++--------- .../scripts/npm/win32-x64-msvc/package.json | 82 ++++++++--------- 28 files changed, 853 insertions(+), 853 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index ad0b644f360fa..6b98ae5d5ab0e 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.14" +version = "1.7.15-nightly-20240820.1" dependencies = [ "anyhow", "getrandom", @@ -319,7 +319,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.14" +version = "1.7.15-nightly-20240820.1" dependencies = [ "anyhow", "getrandom", @@ -332,7 +332,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.14" +version = "1.7.15-nightly-20240820.1" dependencies = [ "anyhow", "getrandom", @@ -1661,7 +1661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -3173,7 +3173,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.379" +version = "0.91.380" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 6247fd66a7ddc..2e325bbde3ae8 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -23,8 +23,8 @@ resolver = "2" serde-wasm-bindgen = "0.6.5" serde_json = "1.0.120" sourcemap = "8.0.1" - swc_atoms = "0.6.5" - swc_cached = "0.3.18" + swc_atoms = "0.6.7" + swc_cached = "0.3.20" swc_cli_impl = "0.19.0" swc_common = "0.37.4" swc_compiler_base = "0.18.1" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 8881a7ae7c6cf..1c935b589f0a2 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.14" +version = "1.7.15-nightly-20240820.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 8ff234aadea32..097f95cb788d4 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.14" +version = "1.7.15-nightly-20240820.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index be67cb3b4bfe6..30a7c4ddb0bb9 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.14" +version = "1.7.15-nightly-20240820.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index b56c4571eadf2..ed227135863d7 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.379" +version = "0.91.380" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 164be03accff5..a27205d5a80b5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.14", + "version": "1.7.15-nightly-20240820.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index b590a764263b0..629cb2f76b4a8 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-darwin-arm64", - "version": "1.7.14", - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ], - "main": "swc.darwin-arm64.node", - "files": [ - "swc.darwin-arm64.node", - "swc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/core-darwin-arm64", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "swc.darwin-arm64.node", + "files": [ + "swc.darwin-arm64.node", + "swc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index e1e7bc20c39d7..1468dd1f29d34 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-darwin-x64", - "version": "1.7.14", - "os": [ - "darwin" - ], - "cpu": [ - "x64" - ], - "main": "swc.darwin-x64.node", - "files": [ - "swc.darwin-x64.node", - "swc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/core-darwin-x64", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "swc.darwin-x64.node", + "files": [ + "swc.darwin-x64.node", + "swc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 2c7c1e532d339..7a0eafb336168 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm" - ], - "main": "swc.linux-arm-gnueabihf.node", - "files": [ - "swc.linux-arm-gnueabihf.node", - "swc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/core-linux-arm-gnueabihf", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "arm" + ], + "main": "swc.linux-arm-gnueabihf.node", + "files": [ + "swc.linux-arm-gnueabihf.node", + "swc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index d3e1d92465f7c..5a092f980c887 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "swc.linux-arm64-gnu.node", - "files": [ - "swc.linux-arm64-gnu.node", - "swc" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/core-linux-arm64-gnu", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "swc.linux-arm64-gnu.node", + "files": [ + "swc.linux-arm64-gnu.node", + "swc" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index b7fcdb19acd5a..10af2b9dde9dd 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/core-linux-arm64-musl", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "swc.linux-arm64-musl.node", - "files": [ - "swc.linux-arm64-musl.node", - "swc" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/core-linux-arm64-musl", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "swc.linux-arm64-musl.node", + "files": [ + "swc.linux-arm64-musl.node", + "swc" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 024ace290d1ab..11d59729cc73e 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/core-linux-x64-gnu", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "swc.linux-x64-gnu.node", - "files": [ - "swc.linux-x64-gnu.node", - "swc" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/core-linux-x64-gnu", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "swc.linux-x64-gnu.node", + "files": [ + "swc.linux-x64-gnu.node", + "swc" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 0d5dd6f2d29dd..78bad7965317a 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/core-linux-x64-musl", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "swc.linux-x64-musl.node", - "files": [ - "swc.linux-x64-musl.node", - "swc" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/core-linux-x64-musl", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "swc.linux-x64-musl.node", + "files": [ + "swc.linux-x64-musl.node", + "swc" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 4750f8374f907..99aa887f3542c 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "arm64" - ], - "main": "swc.win32-arm64-msvc.node", - "files": [ - "swc.win32-arm64-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/core-win32-arm64-msvc", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "swc.win32-arm64-msvc.node", + "files": [ + "swc.win32-arm64-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 1ad309faa03f6..f9120620336eb 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "ia32" - ], - "main": "swc.win32-ia32-msvc.node", - "files": [ - "swc.win32-ia32-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/core-win32-ia32-msvc", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "swc.win32-ia32-msvc.node", + "files": [ + "swc.win32-ia32-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 73cf3afdfa537..93a7492ebf82b 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/core-win32-x64-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "main": "swc.win32-x64-msvc.node", - "files": [ - "swc.win32-x64-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/core-win32-x64-msvc", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "swc.win32-x64-msvc.node", + "files": [ + "swc.win32-x64-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 0640c7dc8be71..1bb86df813a0d 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.14", + "version": "1.7.15-nightly-20240820.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index db4e0e6f53d5a..d1e9a457a8df8 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/minifier-darwin-arm64", - "version": "1.7.14", - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ], - "main": "minifier.darwin-arm64.node", - "files": [ - "minifier.darwin-arm64.node", - "swc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/minifier-darwin-arm64", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "minifier.darwin-arm64.node", + "files": [ + "minifier.darwin-arm64.node", + "swc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index ccc7d0867efec..ceb2396cdb676 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/minifier-darwin-x64", - "version": "1.7.14", - "os": [ - "darwin" - ], - "cpu": [ - "x64" - ], - "main": "minifier.darwin-x64.node", - "files": [ - "minifier.darwin-x64.node", - "swc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/minifier-darwin-x64", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "minifier.darwin-x64.node", + "files": [ + "minifier.darwin-x64.node", + "swc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index a65f0c0f697b8..6b01808097b59 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,38 +1,38 @@ { - "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm" - ], - "main": "minifier.linux-arm-gnueabihf.node", - "files": [ - "minifier.linux-arm-gnueabihf.node", - "swc" - ], - "description": "Super-fast alternative for terser", - "keywords": [ - "swc", - "terser", - "minifier" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0", - "engines": { - "node": ">=12" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/minifier-linux-arm-gnueabihf", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "arm" + ], + "main": "minifier.linux-arm-gnueabihf.node", + "files": [ + "minifier.linux-arm-gnueabihf.node", + "swc" + ], + "description": "Super-fast alternative for terser", + "keywords": [ + "swc", + "terser", + "minifier" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0", + "engines": { + "node": ">=12" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 271e0fd568db0..5decd9343182b 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "minifier.linux-arm64-gnu.node", - "files": [ - "minifier.linux-arm64-gnu.node", - "swc" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/minifier-linux-arm64-gnu", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "minifier.linux-arm64-gnu.node", + "files": [ + "minifier.linux-arm64-gnu.node", + "swc" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index e1246f9f6c906..f8cd33e37fc1a 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "minifier.linux-arm64-musl.node", - "files": [ - "minifier.linux-arm64-musl.node", - "swc" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/minifier-linux-arm64-musl", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "minifier.linux-arm64-musl.node", + "files": [ + "minifier.linux-arm64-musl.node", + "swc" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 152ed3c907c10..07bbafd05147c 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "minifier.linux-x64-gnu.node", - "files": [ - "minifier.linux-x64-gnu.node", - "swc" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/minifier-linux-x64-gnu", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "minifier.linux-x64-gnu.node", + "files": [ + "minifier.linux-x64-gnu.node", + "swc" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 4870386c71ebc..98acc5e9f8785 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,45 +1,45 @@ { - "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.14", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "minifier.linux-x64-musl.node", - "files": [ - "minifier.linux-x64-musl.node", - "swc" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/minifier-linux-x64-musl", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "minifier.linux-x64-musl.node", + "files": [ + "minifier.linux-x64-musl.node", + "swc" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index f3a805e1f4b43..055a5322587c7 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "arm64" - ], - "main": "minifier.win32-arm64-msvc.node", - "files": [ - "minifier.win32-arm64-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/minifier-win32-arm64-msvc", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "minifier.win32-arm64-msvc.node", + "files": [ + "minifier.win32-arm64-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 5df1ae9abf4e2..8556d77caa9eb 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "ia32" - ], - "main": "minifier.win32-ia32-msvc.node", - "files": [ - "minifier.win32-ia32-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/minifier-win32-ia32-msvc", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "minifier.win32-ia32-msvc.node", + "files": [ + "minifier.win32-ia32-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 2dbb3ac61c5f8..271a484e74a20 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,42 +1,42 @@ { - "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.14", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "main": "minifier.win32-x64-msvc.node", - "files": [ - "minifier.win32-x64-msvc.node", - "swc.exe" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/minifier-win32-x64-msvc", + "version": "1.7.15-nightly-20240820.1", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "minifier.win32-x64-msvc.node", + "files": [ + "minifier.win32-x64-msvc.node", + "swc.exe" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file From 465735594bea1f6bc4b108b73bf4794652a0c9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 10:15:52 +0900 Subject: [PATCH 14/59] chore: Remove `if` from nightly publish action --- .github/workflows/publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2383f9261b6a9..ae16e56c0ec1c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -147,7 +147,6 @@ jobs: ssh-private-key: ${{ secrets.SWC_BOT_SSH }} publish-core-nightly: - if: github.event_name == 'workflow_dispatch' name: "Publish ${{ needs.determine-nightly-version.outputs.version }}" needs: From cf73dbbb92ac64018d5a3b0aa1c18dfd17f1b47f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 11:13:48 +0900 Subject: [PATCH 15/59] chore: Use matrix for npm && Fix test directory --- .github/workflows/publish-npm-package.yml | 26 +++++++------- .github/workflows/publish.yml | 44 ++++++++++------------- 2 files changed, 32 insertions(+), 38 deletions(-) diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index 057d06b0f50e4..91bc898682c54 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -233,13 +233,13 @@ jobs: image: ${{ matrix.settings.docker }} options: -v ${{ env.HOME }}/.cargo/git:/root/.cargo/git -v ${{ env.HOME }}/.cargo/registry:/root/.cargo/registry -v ${{ github.workspace }}:/build -w /build run: >- - cd ./packages/core && + cd ./packages/${{ inputs.package }} && npm install -f -g yarn@1.22 && corepack enable && npm i -g wasm-pack && ${{ matrix.settings.build }} - name: Build - working-directory: ./packages/core + working-directory: ./packages/${{ inputs.package }} if: ${{ !matrix.settings.docker }} run: ${{ matrix.settings.build }} shell: bash @@ -285,15 +285,15 @@ jobs: uses: actions/download-artifact@v3 with: name: bindings-${{ matrix.settings.target }} - path: ./packages/core + path: ./packages/${{ inputs.package }} - name: List packages run: ls -R . shell: bash - name: Build TypeScript - working-directory: ./packages/core + working-directory: ./packages/${{ inputs.package }} run: yarn build:ts - name: Test bindings - working-directory: ./packages/core + working-directory: ./packages/${{ inputs.package }} run: yarn test test-linux-x64-gnu-binding: name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }} @@ -324,7 +324,7 @@ jobs: uses: actions/download-artifact@v3 with: name: bindings-x86_64-unknown-linux-gnu - path: ./packages/core + path: ./packages/${{ inputs.package }} - name: List packages run: ls -R . shell: bash @@ -364,7 +364,7 @@ jobs: uses: actions/download-artifact@v3 with: name: bindings-x86_64-unknown-linux-musl - path: ./packages/core + path: ./packages/${{ inputs.package }} - name: List packages run: ls -R . shell: bash @@ -387,7 +387,7 @@ jobs: # uses: actions/download-artifact@v3 # with: # name: bindings-aarch64-unknown-linux-musl - # path: ./packages/core + # path: ./packages/${{ inputs.package }} # - name: List packages # run: ls -R . # shell: bash @@ -435,7 +435,7 @@ jobs: # uses: actions/download-artifact@v3 # with: # name: bindings-armv7-unknown-linux-gnueabihf - # path: ./packages/core + # path: ./packages/${{ inputs.package }} # - name: List packages # run: ls -R . # shell: bash @@ -491,15 +491,15 @@ jobs: - name: Download all artifacts uses: actions/download-artifact@v3 with: - path: ./packages/core/artifacts + path: ./packages/${{ inputs.package }}/artifacts - name: List binaries - run: ls -R ./packages/core/artifacts + run: ls -R ./packages/${{ inputs.package }}/artifacts shell: bash - name: Move binaries shell: bash - working-directory: ./packages/core + working-directory: ./packages/${{ inputs.package }} run: | ./scripts/cli_artifacts.sh ls -R ./artifacts_cli @@ -507,7 +507,7 @@ jobs: - name: List npm run: ls -R ./scripts/npm - working-directory: ./packages/core + working-directory: ./packages/${{ inputs.package }} shell: bash - name: Set fallback dependencies diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ae16e56c0ec1c..b58a0702c8bef 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -146,9 +146,14 @@ jobs: version: ${{ needs.determine-nightly-version.outputs.version }} ssh-private-key: ${{ secrets.SWC_BOT_SSH }} - publish-core-nightly: - name: "Publish ${{ needs.determine-nightly-version.outputs.version }}" - + publish-npm-nightly: + name: "Publish ${{ matrix.package }}@${{ needs.determine-nightly-version.outputs.version }}" + strategy: + fail-fast: false + matrix: + package: + - core + - html needs: - git-tag-nightly - publish-cargo @@ -156,34 +161,18 @@ jobs: uses: ./.github/workflows/publish-npm-package.yml secrets: inherit with: - package: "core" + package: ${{ matrix.package }} version: ${{ needs.determine-nightly-version.outputs.version }} buildCli: true skipBuild: ${{ inputs.skipBuild || false }} skipPublishing: ${{ github.event_name == 'pull_request' }} - publish-html-nightly: - name: "Publish html@${{ needs.determine-nightly-version.outputs.version }}" - - needs: - - git-tag-nightly - - publish-cargo - - determine-nightly-version - uses: ./.github/workflows/publish-npm-package.yml - secrets: inherit - with: - package: "html" - version: ${{ needs.determine-nightly-version.outputs.version }} - buildCli: false - skipBuild: ${{ inputs.skipBuild || false }} - skipPublishing: ${{ github.event_name == 'pull_request' }} - run-ecosystem-ci-with-nightly: name: "Test nightly using ecosystem CI" needs: - determine-nightly-version - - publish-core-nightly + - publish-npm-nightly uses: ./.github/workflows/ecosystem-ci.yml with: version: ${{ needs.determine-nightly-version.outputs.version }} @@ -204,9 +193,14 @@ jobs: version: ${{ inputs.version }} ssh-private-key: ${{ secrets.SWC_BOT_SSH }} - publish-core-stable: - name: "Publish ${{ inputs.version || 'stable' }} to npm" - + publish-npm-stable: + name: "Publish ${{ matrix.package }}}}@${{ inputs.version || 'stable' }} to npm" + strategy: + fail-fast: false + matrix: + package: + - core + - html needs: - publish-cargo - run-ecosystem-ci-with-nightly @@ -214,7 +208,7 @@ jobs: uses: ./.github/workflows/publish-npm-package.yml secrets: inherit with: - package: "core" + package: ${{ matrix.package }} version: ${{ inputs.version }} buildCli: true skipBuild: ${{ inputs.skipBuild || inputs.onlyNightly || false }} From c30db7fb45cc9016feb46c907e9d51fc153bba9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 11:14:33 +0900 Subject: [PATCH 16/59] chore: Build Wasm only for core --- .github/workflows/publish-npm-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index 91bc898682c54..56a06cf868b63 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -537,6 +537,7 @@ jobs: publish-wasm: name: Build - wasm (${{ matrix.settings.npm }}) + if: ${{ inputs.package == 'core' }} runs-on: ubuntu-latest needs: - publish From 99ea95869a10cc58d6a7035e728c3db862c7de0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 11:16:54 +0900 Subject: [PATCH 17/59] chore: Build stable after tagging stable --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b58a0702c8bef..4c576c2a7ce52 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -204,6 +204,7 @@ jobs: needs: - publish-cargo - run-ecosystem-ci-with-nightly + - git-tag-stable uses: ./.github/workflows/publish-npm-package.yml secrets: inherit From b22b53285a17724e527f481f410cbfb05c2cc393 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 02:29:39 +0000 Subject: [PATCH 18/59] chore: Publish `1.7.15-nightly-20240820.2` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 6b98ae5d5ab0e..9fec9001fa76c 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.15-nightly-20240820.1" +version = "1.7.15-nightly-20240820.2" dependencies = [ "anyhow", "getrandom", @@ -319,7 +319,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.15-nightly-20240820.1" +version = "1.7.15-nightly-20240820.2" dependencies = [ "anyhow", "getrandom", @@ -332,7 +332,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.15-nightly-20240820.1" +version = "1.7.15-nightly-20240820.2" dependencies = [ "anyhow", "getrandom", @@ -3173,7 +3173,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.380" +version = "0.91.381" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 1c935b589f0a2..eefb3ebac2a4a 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.1" +version = "1.7.15-nightly-20240820.2" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 097f95cb788d4..18aaf894b8488 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.1" +version = "1.7.15-nightly-20240820.2" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 30a7c4ddb0bb9..870dbd78617af 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.1" +version = "1.7.15-nightly-20240820.2" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index ed227135863d7..aa9835a669d53 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.380" +version = "0.91.381" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index a27205d5a80b5..c5bd9dd1127b0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 629cb2f76b4a8..6bbf297f799c0 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 1468dd1f29d34..f78c498bf6c21 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 7a0eafb336168..b273e4266e968 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 5a092f980c887..6d0b7f67e7252 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 10af2b9dde9dd..cea4ccdb5ffc9 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 11d59729cc73e..360519e7bb42c 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 78bad7965317a..ad24f53ce6beb 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 99aa887f3542c..7d9038c7bab1b 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index f9120620336eb..bbbf1054a8a11 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 93a7492ebf82b..4c97492a81510 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 1bb86df813a0d..f438ed9885aee 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index d1e9a457a8df8..4da9a659077f8 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index ceb2396cdb676..daf9ffced1629 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 6b01808097b59..452620e052df4 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 5decd9343182b..77459ddc8f1df 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index f8cd33e37fc1a..8748e550bbd15 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 07bbafd05147c..37480c0cb2268 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 98acc5e9f8785..0dc2662e39fe0 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 055a5322587c7..d96033066181b 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 8556d77caa9eb..51712f33102f6 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 271a484e74a20..f1751103eb4b5 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.1", + "version": "1.7.15-nightly-20240820.2", "os": [ "win32" ], From daf8b5f254e7505d478796d6e41901e1e053ea3c Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 02:29:40 +0000 Subject: [PATCH 19/59] chore: Update changelog --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9338a3cfaeb10..8ab86c29e192e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1286,9 +1286,6 @@ - **(es/minifier)** Abort fn inliner if there's a spread arg ([#8809](https://github.com/swc-project/swc/issues/8809)) ([730ded2](https://github.com/swc-project/swc/commit/730ded2a26f63f0069dea0d3bc207bb31f344444)) -- **(es/module)** Fix `jsc.paths` with `resolveFully` ([#8784](https://github.com/swc-project/swc/issues/8784)) ([4961bb0](https://github.com/swc-project/swc/commit/4961bb055df9925da97279819d2fdf740b4b3d92)) - - - **(es/parser)** Tweak msg of `SyntaxError::UsingDeclNotEnabled` ([#8791](https://github.com/swc-project/swc/issues/8791)) ([95c822e](https://github.com/swc-project/swc/commit/95c822e7c43470e4c972bef00d97e7e0de02e0b0)) ### Features From 60ce330be9a78b4a00f4f6df723d72232e6f898a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 11:37:00 +0900 Subject: [PATCH 20/59] chore: Remove `on: pull_request` --- .github/workflows/publish.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4c576c2a7ce52..04bc99477619b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,9 +13,6 @@ env: SKIP_YARN_COREPACK_CHECK: 1 on: - pull_request: - branches: - - main workflow_dispatch: inputs: version: From 64c339df6040d89b2285de446b9d8dd071062463 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 02:50:24 +0000 Subject: [PATCH 21/59] chore: Publish `1.7.15-nightly-20240820.3` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 9fec9001fa76c..31c3ec46582f2 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.15-nightly-20240820.2" +version = "1.7.15-nightly-20240820.3" dependencies = [ "anyhow", "getrandom", @@ -319,7 +319,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.15-nightly-20240820.2" +version = "1.7.15-nightly-20240820.3" dependencies = [ "anyhow", "getrandom", @@ -332,7 +332,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.15-nightly-20240820.2" +version = "1.7.15-nightly-20240820.3" dependencies = [ "anyhow", "getrandom", @@ -3173,7 +3173,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.381" +version = "0.91.382" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index eefb3ebac2a4a..143ecd743d2b5 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.2" +version = "1.7.15-nightly-20240820.3" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 18aaf894b8488..c729ce649a9d5 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.2" +version = "1.7.15-nightly-20240820.3" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 870dbd78617af..a54526ffb4cf4 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.2" +version = "1.7.15-nightly-20240820.3" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index aa9835a669d53..53909795989be 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.381" +version = "0.91.382" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index c5bd9dd1127b0..fb2e9640ad190 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 6bbf297f799c0..086cec6cb3bd2 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index f78c498bf6c21..d2132017fd147 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index b273e4266e968..3f06aa68979a7 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 6d0b7f67e7252..602b6ebe129bb 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index cea4ccdb5ffc9..a19a1ae7e92f8 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 360519e7bb42c..8b9cd9655b837 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index ad24f53ce6beb..b8f5026f6329c 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 7d9038c7bab1b..c5c326f3feffa 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index bbbf1054a8a11..b13684ede6706 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 4c97492a81510..90d999facba84 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index f438ed9885aee..58c1d079853cf 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 4da9a659077f8..b4dd813689f8b 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index daf9ffced1629..e16fdf5759f14 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 452620e052df4..74ac996b8c8e1 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 77459ddc8f1df..ab9fc94075224 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 8748e550bbd15..81a1a0df59ff4 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 37480c0cb2268..008e77e6edf15 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 0dc2662e39fe0..5dce16968dfb9 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index d96033066181b..85d37c4d5bed1 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 51712f33102f6..bf064a71559fe 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index f1751103eb4b5..6409dfdc8fdeb 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.2", + "version": "1.7.15-nightly-20240820.3", "os": [ "win32" ], From 6dc8b6887389dd10d854359a412d206673f30e9a Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 02:50:26 +0000 Subject: [PATCH 22/59] chore: Update changelog --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ab86c29e192e..db99eeaca511b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1280,9 +1280,6 @@ - **(es/bugfixes)** Fix fn transform in nameless fns ([#8796](https://github.com/swc-project/swc/issues/8796)) ([7ad004e](https://github.com/swc-project/swc/commit/7ad004e1899d98ee8da49909163455b3b622686d)) -- **(es/helpers)** Fix metadata of decorators being `undefined` ([#8768](https://github.com/swc-project/swc/issues/8768)) ([263ce6e](https://github.com/swc-project/swc/commit/263ce6e22bd4dbba0323099f256fb062b8e644a2)) - - - **(es/minifier)** Abort fn inliner if there's a spread arg ([#8809](https://github.com/swc-project/swc/issues/8809)) ([730ded2](https://github.com/swc-project/swc/commit/730ded2a26f63f0069dea0d3bc207bb31f344444)) From bdea5cb94cf7cc9d02274f32e104b55f977e625d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 11:58:38 +0900 Subject: [PATCH 23/59] chore(html): Use `binding_html_node` instead of `html_node` --- packages/html/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/html/package.json b/packages/html/package.json index c81619175a6ac..34d30b3679433 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -47,8 +47,8 @@ "pack": "wasm-pack", "build:ts": "tsc -d", "build:wasm": "npm-run-all \"pack -- build ./crates/wasm --scope swc {1} -t {2} \" --", - "build": "tsc -d && napi build --platform --cargo-name html_node --js ./binding.js --dts binding.d.ts -p html_node --release --cargo-cwd ../..", - "build:dev": "tsc -d && napi build --platform --cargo-name html_node --js ./binding.js --dts binding.d.ts -p html_node --cargo-cwd ../..", + "build": "tsc -d && napi build --platform --cargo-name binding_html_node --js ./binding.js --dts binding.d.ts -p binding_html_node --release --cargo-cwd ../..", + "build:dev": "tsc -d && napi build --platform --cargo-name binding_html_node --js ./binding.js --dts binding.d.ts -p binding_html_node --cargo-cwd ../..", "test": "echo 'done!'", "version": "napi version -p scripts/npm" }, From 6ebff4c6e32fe18e079302ebf7958cd0d6ef0813 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 03:07:10 +0000 Subject: [PATCH 24/59] chore: Publish `1.7.15-nightly-20240820.4` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 31c3ec46582f2..80d7b3831ca4a 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.15-nightly-20240820.3" +version = "1.7.15-nightly-20240820.4" dependencies = [ "anyhow", "getrandom", @@ -319,7 +319,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.15-nightly-20240820.3" +version = "1.7.15-nightly-20240820.4" dependencies = [ "anyhow", "getrandom", @@ -332,7 +332,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.15-nightly-20240820.3" +version = "1.7.15-nightly-20240820.4" dependencies = [ "anyhow", "getrandom", @@ -3173,7 +3173,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.382" +version = "0.91.383" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 143ecd743d2b5..3f4041eead528 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.3" +version = "1.7.15-nightly-20240820.4" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index c729ce649a9d5..1a119ac2ae280 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.3" +version = "1.7.15-nightly-20240820.4" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index a54526ffb4cf4..133535c121f58 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.3" +version = "1.7.15-nightly-20240820.4" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 53909795989be..2821ddaa1b99a 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.382" +version = "0.91.383" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index fb2e9640ad190..38c95ef8d941b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 086cec6cb3bd2..d793562c220fd 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index d2132017fd147..94a1f50cb699e 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 3f06aa68979a7..5ef995bef3131 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 602b6ebe129bb..b16bdd1e216da 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index a19a1ae7e92f8..2efedff7b585d 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 8b9cd9655b837..e1998c37622f8 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index b8f5026f6329c..1e5c665ce334f 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index c5c326f3feffa..6581fa1b75293 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index b13684ede6706..8e4c9b5ecd895 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 90d999facba84..81fb13f32fdc8 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 58c1d079853cf..89fe6fa269188 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index b4dd813689f8b..cdc299518b40b 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index e16fdf5759f14..918ca99058abf 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 74ac996b8c8e1..d7fd829232cd7 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index ab9fc94075224..f5baadc313fda 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 81a1a0df59ff4..05af9b57ca938 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 008e77e6edf15..0c1a7223f7420 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 5dce16968dfb9..56dcdff11a45a 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 85d37c4d5bed1..8e472c8920057 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index bf064a71559fe..8d0aad3f944e2 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 6409dfdc8fdeb..1f5ef5c2fd97f 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.3", + "version": "1.7.15-nightly-20240820.4", "os": [ "win32" ], From c843c683181fc9382382c49208a42ec5fe4a2127 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 03:07:11 +0000 Subject: [PATCH 25/59] chore: Update changelog --- CHANGELOG.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db99eeaca511b..053f224494e4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog +## [unreleased] + +### Miscellaneous Tasks + + + +- **(html)** Use `binding_html_node` instead of `html_node` ([bdea5cb](https://github.com/swc-project/swc/commit/bdea5cb94cf7cc9d02274f32e104b55f977e625d)) + ## [1.7.14] - 2024-08-19 ### Bug Fixes @@ -1300,9 +1308,6 @@ - **(deps)** Update dependencies ([#8810](https://github.com/swc-project/swc/issues/8810)) ([207582f](https://github.com/swc-project/swc/commit/207582ff254a66a9dd4613de6d3cb43c19957b68)) - -- **(es/transforms)** Add `repository` field to `swc_ecma_ext_transforms` ([#8793](https://github.com/swc-project/swc/issues/8793)) ([37f0a79](https://github.com/swc-project/swc/commit/37f0a7994bdf7d90c30a00f70c6dde97b4d89c8f)) - ### Performance From eefae1cde794b28b68e5c0af2d2f13a5053b7a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 12:18:51 +0900 Subject: [PATCH 26/59] fix(html): Fix html binding --- bindings/binding_core_node/src/transform.rs | 2 +- bindings/binding_html_node/src/lib.rs | 10 +++++----- bindings/binding_minifier_node/src/minify.rs | 2 +- packages/html/.gitignore | 3 ++- packages/html/package.json | 8 +++----- yarn.lock | 11 +---------- 6 files changed, 13 insertions(+), 23 deletions(-) diff --git a/bindings/binding_core_node/src/transform.rs b/bindings/binding_core_node/src/transform.rs index 19e29f1f3a969..df9c01c6e0e4d 100644 --- a/bindings/binding_core_node/src/transform.rs +++ b/bindings/binding_core_node/src/transform.rs @@ -179,7 +179,7 @@ pub fn transform_file( let path = clean(&src); let task = TransformTask { c, - input: Input::File(path.into()), + input: Input::File(path), options: options.into_ref()?, }; Ok(AsyncTask::with_optional_signal(task, signal)) diff --git a/bindings/binding_html_node/src/lib.rs b/bindings/binding_html_node/src/lib.rs index 9e1e9bdd5d67e..a576bcd24a824 100644 --- a/bindings/binding_html_node/src/lib.rs +++ b/bindings/binding_html_node/src/lib.rs @@ -23,8 +23,8 @@ use swc_html_ast::{Document, DocumentFragment}; use swc_html_minifier::{ minify_document, minify_document_fragment, option::{ - CollapseWhitespaces, MinifierType, MinifyCssOption, MinifyJsOption, MinifyJsonOption, - RemoveRedundantAttributes, + CollapseWhitespaces, CssOptions, MinifierType, MinifyCssOption, MinifyJsOption, + MinifyJsonOption, RemoveRedundantAttributes, }, }; use swc_nodejs_common::{deserialize_json, get_deserialized, MapErr}; @@ -138,7 +138,7 @@ pub struct MinifyOptions { #[serde(default = "minify_js_by_default")] minify_js: MinifyJsOption, #[serde(default = "minify_css_by_default")] - minify_css: MinifyCssOption, + minify_css: MinifyCssOption, #[serde(default)] minify_additional_scripts_content: Option>, #[serde(default)] @@ -171,7 +171,7 @@ const fn minify_js_by_default() -> MinifyJsOption { MinifyJsOption::Bool(true) } -const fn minify_css_by_default() -> MinifyCssOption { +const fn minify_css_by_default() -> MinifyCssOption { MinifyCssOption::Bool(true) } @@ -276,7 +276,7 @@ fn minify_inner( None => FileName::Anon, }; - let fm = cm.new_source_file(filename, code.into()); + let fm = cm.new_source_file(filename.into(), code.into()); let scripting_enabled = opts.scripting_enabled; let mut errors = vec![]; diff --git a/bindings/binding_minifier_node/src/minify.rs b/bindings/binding_minifier_node/src/minify.rs index 4bca4c28958c8..5eac047a61039 100644 --- a/bindings/binding_minifier_node/src/minify.rs +++ b/bindings/binding_minifier_node/src/minify.rs @@ -210,7 +210,7 @@ fn do_work(input: MinifyTarget, options: JsMinifyOptions) -> napi::Result Date: Tue, 20 Aug 2024 03:27:43 +0000 Subject: [PATCH 27/59] chore: Publish `1.7.15-nightly-20240820.5` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 80d7b3831ca4a..1fbb41d4fa5e8 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.15-nightly-20240820.4" +version = "1.7.15-nightly-20240820.5" dependencies = [ "anyhow", "getrandom", @@ -319,7 +319,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.15-nightly-20240820.4" +version = "1.7.15-nightly-20240820.5" dependencies = [ "anyhow", "getrandom", @@ -332,7 +332,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.15-nightly-20240820.4" +version = "1.7.15-nightly-20240820.5" dependencies = [ "anyhow", "getrandom", @@ -3173,7 +3173,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.383" +version = "0.91.384" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 3f4041eead528..5d1c5efbaadb2 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.4" +version = "1.7.15-nightly-20240820.5" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 1a119ac2ae280..f33576797e24e 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.4" +version = "1.7.15-nightly-20240820.5" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 133535c121f58..424cce89ecbcc 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.4" +version = "1.7.15-nightly-20240820.5" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 2821ddaa1b99a..31a3cd8ae3376 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.383" +version = "0.91.384" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 38c95ef8d941b..456c78ce3af67 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index d793562c220fd..800d7b4bc8d45 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 94a1f50cb699e..d24fea0a08fd7 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 5ef995bef3131..1b16872cf7f14 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index b16bdd1e216da..ad5668bacea4c 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 2efedff7b585d..00e39b0286001 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index e1998c37622f8..dd09b994a4d13 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 1e5c665ce334f..67c456bb97a3b 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 6581fa1b75293..284645e3f473e 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 8e4c9b5ecd895..8bc25d7f4baab 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 81fb13f32fdc8..f7b0b4fd5beb7 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 89fe6fa269188..7286cb7621941 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index cdc299518b40b..dee5cebe3ba6c 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 918ca99058abf..78b727ad15a8a 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index d7fd829232cd7..87c98141a826b 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index f5baadc313fda..1b19fb5f6070e 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 05af9b57ca938..ef3fad5ffb339 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 0c1a7223f7420..4ff6783e7aa4d 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 56dcdff11a45a..6636017a2c7c3 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 8e472c8920057..229d184b35123 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 8d0aad3f944e2..21875821963cd 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 1f5ef5c2fd97f..5e80681ae88f6 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.4", + "version": "1.7.15-nightly-20240820.5", "os": [ "win32" ], From ec617d5c57b74b66210e9104de91589c3bbf7bde Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 03:27:44 +0000 Subject: [PATCH 28/59] chore: Update changelog --- CHANGELOG.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 053f224494e4c..60c423f5a2681 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog ## [unreleased] +### Bug Fixes + + + +- **(html)** Fix html binding ([eefae1c](https://github.com/swc-project/swc/commit/eefae1cde794b28b68e5c0af2d2f13a5053b7a49)) + ### Miscellaneous Tasks @@ -1314,7 +1320,4 @@ - **(atoms)** Update `hstr` ([#8799](https://github.com/swc-project/swc/issues/8799)) ([0745624](https://github.com/swc-project/swc/commit/0745624cb71e12b18b06d9ee106066d8b585c4c6)) - -- **(es/parser)** Use faster unicode crate ([#8785](https://github.com/swc-project/swc/issues/8785)) ([6f780ca](https://github.com/swc-project/swc/commit/6f780ca749a611f54aa4deb628e532fd0a12228f)) - From a5d307385dba67f6217f6cd7951582125c04e514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 12:35:25 +0900 Subject: [PATCH 29/59] chore(ci): Fix `concurrency.group` --- .github/workflows/publish-npm-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index 56a06cf868b63..9fe64bc25fd34 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -1,7 +1,7 @@ name: "Build npm package" concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.package}} cancel-in-progress: true env: From 61c22f4236013a03c21123e6f82a1276dd324685 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 03:44:04 +0000 Subject: [PATCH 30/59] chore: Publish `1.7.15-nightly-20240820.6` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 1fbb41d4fa5e8..bd20c22a8da31 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.15-nightly-20240820.5" +version = "1.7.15-nightly-20240820.6" dependencies = [ "anyhow", "getrandom", @@ -319,7 +319,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.15-nightly-20240820.5" +version = "1.7.15-nightly-20240820.6" dependencies = [ "anyhow", "getrandom", @@ -332,7 +332,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.15-nightly-20240820.5" +version = "1.7.15-nightly-20240820.6" dependencies = [ "anyhow", "getrandom", @@ -3173,7 +3173,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.384" +version = "0.91.385" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 5d1c5efbaadb2..99e50d4af9367 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.5" +version = "1.7.15-nightly-20240820.6" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index f33576797e24e..6460e233ab2ed 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.5" +version = "1.7.15-nightly-20240820.6" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 424cce89ecbcc..945765bd2859a 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.5" +version = "1.7.15-nightly-20240820.6" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 31a3cd8ae3376..2e564fbb083f9 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.384" +version = "0.91.385" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 456c78ce3af67..3f31db6b20dcf 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 800d7b4bc8d45..f1d7c836c78cf 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index d24fea0a08fd7..d78b1a8912103 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 1b16872cf7f14..b745cb0535ce8 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index ad5668bacea4c..5fd39ec3ca23e 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 00e39b0286001..5f81777baccec 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index dd09b994a4d13..2129d01fb1821 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 67c456bb97a3b..fa1154c68725c 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 284645e3f473e..a321c418c521c 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 8bc25d7f4baab..793e3ef15ef02 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index f7b0b4fd5beb7..db95ecd716085 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 7286cb7621941..08ff11a6c0b1d 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index dee5cebe3ba6c..be7f2a2797af6 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 78b727ad15a8a..704348450a7f4 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 87c98141a826b..624aea07c33cc 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 1b19fb5f6070e..da6fb36b54234 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index ef3fad5ffb339..2965224e57b2e 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 4ff6783e7aa4d..a52e460b7e022 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 6636017a2c7c3..45e5198f351ba 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 229d184b35123..d90494b677f7c 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 21875821963cd..724d3f33ff7e5 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 5e80681ae88f6..d575f650fade2 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.5", + "version": "1.7.15-nightly-20240820.6", "os": [ "win32" ], From 171d1e83e59d8f56ef549cc7e79c5250821e93cf Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 03:44:06 +0000 Subject: [PATCH 31/59] chore: Update changelog --- CHANGELOG.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60c423f5a2681..6ba8ccb087bd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1296,18 +1296,12 @@ - **(es/minifier)** Abort fn inliner if there's a spread arg ([#8809](https://github.com/swc-project/swc/issues/8809)) ([730ded2](https://github.com/swc-project/swc/commit/730ded2a26f63f0069dea0d3bc207bb31f344444)) - -- **(es/parser)** Tweak msg of `SyntaxError::UsingDeclNotEnabled` ([#8791](https://github.com/swc-project/swc/issues/8791)) ([95c822e](https://github.com/swc-project/swc/commit/95c822e7c43470e4c972bef00d97e7e0de02e0b0)) - ### Features - **(es/minifier)** Evaluate spread of arrays ([#8811](https://github.com/swc-project/swc/issues/8811)) ([47714c5](https://github.com/swc-project/swc/commit/47714c52ce08b0e94617d17c11c8e8994c62dbaa)) - -- **(plugin/runner)** Improve error message for Wasm plugin crashes ([#8794](https://github.com/swc-project/swc/issues/8794)) ([571d297](https://github.com/swc-project/swc/commit/571d29781a90f4def4811ae46fa4a5f966e461e6)) - ### Miscellaneous Tasks From d43f1b1212b0bd94ea0868e6294bd97c10077650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 20 Aug 2024 14:54:07 +0900 Subject: [PATCH 32/59] chore(ci): Fix `publish-npm-package` action (#9461) **Related issue:** - Closes https://github.com/swc-project/swc/issues/9457 --- .github/workflows/publish-npm-package.yml | 96 ++-- packages/html/binding.d.ts | 63 +-- packages/html/binding.js | 539 ++++++++++++---------- packages/html/package.json | 4 +- scripts/publish.sh | 1 + 5 files changed, 387 insertions(+), 316 deletions(-) diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index 9fe64bc25fd34..9a48477c1aa7b 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -1,7 +1,7 @@ name: "Build npm package" concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.package}} + group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.package }} cancel-in-progress: true env: @@ -67,27 +67,34 @@ jobs: - host: macos-latest target: x86_64-apple-darwin build: | - cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target x86_64-apple-darwin - cp ../../bindings/target/x86_64-apple-darwin/release/swc . - chmod +x ./swc + if [[ ${{ inputs.package }} == "core" ]]; then + cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target x86_64-apple-darwin + cp ../../bindings/target/x86_64-apple-darwin/release/swc . + chmod +x ./swc + fi yarn build --target x86_64-apple-darwin strip -x *.node - host: windows-latest build: | export CARGO_PROFILE_RELEASE_LTO=false yarn build --target x86_64-pc-windows-msvc - cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target x86_64-pc-windows-msvc - cp ../../bindings/target/x86_64-pc-windows-msvc/release/swc . + if [[ ${{ inputs.package }} == "core" ]]; then + cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target x86_64-pc-windows-msvc + cp ../../bindings/target/x86_64-pc-windows-msvc/release/swc . + fi target: x86_64-pc-windows-msvc - host: windows-latest # use npm to run test, because of corepack link the yarn with x64 Node.js build: | export DISABLE_PLUGIN_E2E_TESTS=true export CARGO_PROFILE_RELEASE_LTO=false - cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --target i686-pc-windows-msvc - cp ../../bindings/target/i686-pc-windows-msvc/release/swc . - yarn build --target i686-pc-windows-msvc --no-default-features --features swc_v1 - npm run test + if [[ ${{ inputs.package }} == "core" ]]; then + cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --target i686-pc-windows-msvc + cp ../../bindings/target/i686-pc-windows-msvc/release/swc . + yarn build --target i686-pc-windows-msvc --no-default-features --features swc_v1 + else + yarn build --target i686-pc-windows-msvc + fi target: i686-pc-windows-msvc - host: ubuntu-latest target: x86_64-unknown-linux-gnu @@ -97,7 +104,11 @@ jobs: unset CC_x86_64_unknown_linux_gnu && unset CC && RUSTFLAGS='-C target-feature=+sse2' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target x86_64-unknown-linux-gnu && rm -rf ../../bindings/target/target/x86_64-unknown-linux-gnu/release/.cargo-lock && cp ../../bindings/target/x86_64-unknown-linux-gnu/release/swc . && chmod +x ./swc && - yarn build --target x86_64-unknown-linux-gnu + if [[ ${{ inputs.package }} == "core" ]]; then + yarn build --target x86_64-unknown-linux-gnu --no-default-features --features swc_v1 + else + yarn build --target x86_64-unknown-linux-gnu + fi - host: ubuntu-latest target: x86_64-unknown-linux-musl # musl build is slow, let's disable the LTO @@ -105,10 +116,14 @@ jobs: build: >- set -e && export CARGO_PROFILE_RELEASE_LTO=false && - RUSTFLAGS='-C target-feature=+sse2' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target x86_64-unknown-linux-musl && - rm -rf target/release/.cargo-lock && - cp ../../bindings/target/x86_64-unknown-linux-musl/release/swc . && chmod +x ./swc && - RUSTFLAGS='-C target-feature=+sse2 -C target-feature=-crt-static' yarn build --target x86_64-unknown-linux-musl + if [[ ${{ inputs.package }} == "core" ]]; then + RUSTFLAGS='-C target-feature=+sse2' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target x86_64-unknown-linux-musl && + rm -rf target/release/.cargo-lock && + cp ../../bindings/target/x86_64-unknown-linux-musl/release/swc . && chmod +x ./swc && + RUSTFLAGS='-C target-feature=+sse2 -C target-feature=-crt-static' yarn build --target x86_64-unknown-linux-musl + else + RUSTFLAGS='-C target-feature=+sse2 -C target-feature=-crt-static' yarn build --target x86_64-unknown-linux-musl + fi - host: macos-latest target: aarch64-apple-darwin build: | @@ -117,9 +132,11 @@ jobs: export CXX=$(xcrun -f clang++); SYSROOT=$(xcrun --sdk macosx --show-sdk-path); export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT"; - cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target aarch64-apple-darwin - cp ../../bindings/target/aarch64-apple-darwin/release/swc . - chmod +x ./swc + if [[ ${{ inputs.package }} == "core" ]]; then + cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target aarch64-apple-darwin + cp ../../bindings/target/aarch64-apple-darwin/release/swc . + chmod +x ./swc + fi yarn build --target aarch64-apple-darwin - host: ubuntu-latest target: aarch64-unknown-linux-gnu @@ -128,17 +145,26 @@ jobs: set -e && export JEMALLOC_SYS_WITH_LG_PAGE=16 && rustup target add aarch64-unknown-linux-gnu && - RUSTFLAGS='' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target aarch64-unknown-linux-gnu && - cp ../../bindings/target/aarch64-unknown-linux-gnu/release/swc . && chmod +x ./swc && - export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc && - yarn build --target aarch64-unknown-linux-gnu + if [[ ${{ inputs.package }} == "core" ]]; then + RUSTFLAGS='' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target aarch64-unknown-linux-gnu && + cp ../../bindings/target/aarch64-unknown-linux-gnu/release/swc . && chmod +x ./swc && + export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc && + yarn build --target aarch64-unknown-linux-gnu + else + export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc && + yarn build --target aarch64-unknown-linux-gnu + fi - host: ubuntu-latest target: armv7-unknown-linux-gnueabihf build: | export DISABLE_PLUGIN_E2E_TESTS=true - yarn napi build --bin swc --release --target armv7-unknown-linux-gnueabihf --manifest-path ../../bindings/swc_cli/Cargo.toml -x --target-dir ../release -o . - chmod +x ./swc - yarn build --target armv7-unknown-linux-gnueabihf --no-default-features --features swc_v1 --use-napi-cross + if [[ ${{ inputs.package }} == "core" ]]; then + yarn napi build --bin swc --release --target armv7-unknown-linux-gnueabihf --manifest-path ../../bindings/swc_cli/Cargo.toml -x --target-dir ../release -o . + chmod +x ./swc + yarn build --target armv7-unknown-linux-gnueabihf --no-default-features --features swc_v1 --use-napi-cross + else + yarn build --target armv7-unknown-linux-gnueabihf --use-napi-cross + fi - host: ubuntu-latest target: aarch64-unknown-linux-musl downloadTarget: aarch64-unknown-linux-musl @@ -158,9 +184,13 @@ jobs: export DISABLE_PLUGIN_E2E_TESTS=true export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=256 export CARGO_PROFILE_RELEASE_LTO=false - cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --target aarch64-pc-windows-msvc - cp ../../bindings/target/aarch64-pc-windows-msvc/release/swc.exe . - yarn build --target aarch64-pc-windows-msvc --no-default-features --features swc_v1 + if [[ ${{ inputs.package }} == "core" ]]; then + cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --target aarch64-pc-windows-msvc + cp ../../bindings/target/aarch64-pc-windows-msvc/release/swc.exe . + yarn build --target aarch64-pc-windows-msvc --no-default-features --features swc_v1 + else + yarn build --target aarch64-pc-windows-msvc + fi name: "Build ${{ inputs.package }} - ${{ matrix.settings.target }} - node@20" runs-on: ${{ matrix.settings.host }} steps: @@ -248,7 +278,8 @@ jobs: with: name: bindings-${{ matrix.settings.target }} path: | - packages/core/swc* + packages/${{ inputs.package }}/swc* + packages/${{ inputs.package }}/*.node if-no-files-found: error test-macOS-windows-binding: name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} @@ -331,7 +362,7 @@ jobs: - name: Build TypeScript run: yarn build:ts - name: Test bindings - run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-slim sh -c 'npm install -f -g yarn@1.22.19 && env DISABLE_PLUGIN_E2E_TESTS=true yarn test' + run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-slim sh -c 'npm install -f -g yarn@1.22.19 && cd ./packages/${{ inputs.package }} && env DISABLE_PLUGIN_E2E_TESTS=true yarn test' test-linux-x64-musl-binding: name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} needs: @@ -371,7 +402,7 @@ jobs: - name: Build TypeScript run: yarn build:ts - name: Test bindings - run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-alpine sh -c 'npm install -f -g yarn@1.22.19 && env DISABLE_PLUGIN_E2E_TESTS=true yarn test' + run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-alpine sh -c 'npm install -f -g yarn@1.22.19 && cd ./packages/${{ inputs.package }} && env DISABLE_PLUGIN_E2E_TESTS=true yarn test' # test-linux-aarch64-musl-binding: # name: Test bindings on aarch64-unknown-linux-musl - node@lts # needs: @@ -498,6 +529,7 @@ jobs: shell: bash - name: Move binaries + if: inputs.package == 'core' shell: bash working-directory: ./packages/${{ inputs.package }} run: | @@ -521,7 +553,7 @@ jobs: npm config set provenance true echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc echo "npmAlwaysAuth:true\n npmAuthToken: '$NPM_TOKEN'\n" >> ~/.yarnrc - (cd packages/core && yarn workspaces foreach -Rt npm publish --tolerate-republish --tag $NPM_TAG) + (cd packages/${{ inputs.package }} && yarn workspaces foreach -Rt npm publish --tolerate-republish --tag $NPM_TAG) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/packages/html/binding.d.ts b/packages/html/binding.d.ts index 88474cf7a70e5..60d43a4406764 100644 --- a/packages/html/binding.d.ts +++ b/packages/html/binding.d.ts @@ -1,71 +1,46 @@ -/* tslint:disable */ -/* eslint-disable */ - /* auto-generated by NAPI-RS */ +/* eslint-disable */ -export interface Diagnostic { - level: string; - message: string; - span: any; -} -export interface TransformOutput { - code: string; - errors?: Array; -} export interface Attribute { namespace?: string; prefix?: string; name: string; value?: string; } -export interface Element { - tagName: string; - namespace: string; - attributes: Array; - isSelfClosing: boolean; -} -export function minify( - code: Buffer, - opts: Buffer, - signal?: AbortSignal | undefined | null -): Promise; -export function minifyFragment( - code: Buffer, - opts: Buffer, - signal?: AbortSignal | undefined | null -): Promise; -export function minifySync(code: Buffer, opts: Buffer): TransformOutput; -export function minifyFragmentSync(code: Buffer, opts: Buffer): TransformOutput; + export interface Diagnostic { level: string; message: string; span: any; } -export interface TransformOutput { - code: string; - errors?: Array; -} -export interface Attribute { - namespace?: string; - prefix?: string; - name: string; - value?: string; -} + export interface Element { tagName: string; namespace: string; attributes: Array; isSelfClosing: boolean; } -export function minify( + +export declare function minify( code: Buffer, opts: Buffer, signal?: AbortSignal | undefined | null ): Promise; -export function minifyFragment( + +export declare function minifyFragment( code: Buffer, opts: Buffer, signal?: AbortSignal | undefined | null ): Promise; -export function minifySync(code: Buffer, opts: Buffer): TransformOutput; -export function minifyFragmentSync(code: Buffer, opts: Buffer): TransformOutput; + +export declare function minifyFragmentSync( + code: Buffer, + opts: Buffer +): TransformOutput; + +export declare function minifySync(code: Buffer, opts: Buffer): TransformOutput; + +export interface TransformOutput { + code: string; + errors?: Array; +} diff --git a/packages/html/binding.js b/packages/html/binding.js index 26d9325a31932..17fb87a2f70a6 100644 --- a/packages/html/binding.js +++ b/packages/html/binding.js @@ -1,284 +1,347 @@ -/* tslint:disable */ +// prettier-ignore /* eslint-disable */ -/* prettier-ignore */ - /* auto-generated by NAPI-RS */ -const { existsSync, readFileSync } = require('fs') -const { join } = require("path"); - -const { platform, arch } = process; +const { readFileSync } = require('fs') let nativeBinding = null; -let localFileExisted = false; -let loadError = null; +const loadErrors = []; -function isMusl() { - // For Node 10 - if (!process.report || typeof process.report.getReport !== "function") { - try { - const lddPath = require("child_process") - .execSync("which ldd") - .toString() - .trim(); - return readFileSync(lddPath, "utf8").includes("musl"); - } catch (e) { +const isMusl = () => { + let musl = false; + if (process.platform === "linux") { + musl = isMuslFromFilesystem(); + if (musl === null) { + musl = isMuslFromReport(); + } + if (musl === null) { + musl = isMuslFromChildProcess(); + } + } + return musl; +}; + +const isFileMusl = (f) => f.includes("libc.musl-") || f.includes("ld-musl-"); + +const isMuslFromFilesystem = () => { + try { + return readFileSync("/usr/bin/ldd", "utf-8").includes("musl"); + } catch { + return null; + } +}; + +const isMuslFromReport = () => { + const report = + typeof process.report.getReport === "function" + ? process.report.getReport() + : null; + if (!report) { + return null; + } + if (report.header && report.header.glibcVersionRuntime) { + return false; + } + if (Array.isArray(report.sharedObjects)) { + if (report.sharedObjects.some(isFileMusl)) { return true; } - } else { - const { glibcVersionRuntime } = process.report.getReport().header; - return !glibcVersionRuntime; } -} + return false; +}; + +const isMuslFromChildProcess = () => { + try { + return require("child_process") + .execSync("ldd --version", { encoding: "utf8" }) + .includes("musl"); + } catch (e) { + // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false + return false; + } +}; + +function requireNative() { + if (process.platform === "android") { + if (process.arch === "arm64") { + try { + return require("./swc-html.android-arm64.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-android-arm64"); + } catch (e) { + loadErrors.push(e); + } + } else if (process.arch === "arm") { + try { + return require("./swc-html.android-arm-eabi.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-android-arm-eabi"); + } catch (e) { + loadErrors.push(e); + } + } else { + loadErrors.push( + new Error(`Unsupported architecture on Android ${process.arch}`) + ); + } + } else if (process.platform === "win32") { + if (process.arch === "x64") { + try { + return require("./swc-html.win32-x64-msvc.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-win32-x64-msvc"); + } catch (e) { + loadErrors.push(e); + } + } else if (process.arch === "ia32") { + try { + return require("./swc-html.win32-ia32-msvc.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-win32-ia32-msvc"); + } catch (e) { + loadErrors.push(e); + } + } else if (process.arch === "arm64") { + try { + return require("./swc-html.win32-arm64-msvc.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-win32-arm64-msvc"); + } catch (e) { + loadErrors.push(e); + } + } else { + loadErrors.push( + new Error( + `Unsupported architecture on Windows: ${process.arch}` + ) + ); + } + } else if (process.platform === "darwin") { + try { + return require("./swc-html.darwin-universal.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-darwin-universal"); + } catch (e) { + loadErrors.push(e); + } -switch (platform) { - case "android": - switch (arch) { - case "arm64": - localFileExisted = existsSync( - join(__dirname, "html.android-arm64.node") - ); + if (process.arch === "x64") { + try { + return require("./swc-html.darwin-x64.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-darwin-x64"); + } catch (e) { + loadErrors.push(e); + } + } else if (process.arch === "arm64") { + try { + return require("./swc-html.darwin-arm64.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-darwin-arm64"); + } catch (e) { + loadErrors.push(e); + } + } else { + loadErrors.push( + new Error(`Unsupported architecture on macOS: ${process.arch}`) + ); + } + } else if (process.platform === "freebsd") { + if (process.arch === "x64") { + try { + return require("./swc-html.freebsd-x64.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-freebsd-x64"); + } catch (e) { + loadErrors.push(e); + } + } else if (process.arch === "arm64") { + try { + return require("./swc-html.freebsd-arm64.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-freebsd-arm64"); + } catch (e) { + loadErrors.push(e); + } + } else { + loadErrors.push( + new Error( + `Unsupported architecture on FreeBSD: ${process.arch}` + ) + ); + } + } else if (process.platform === "linux") { + if (process.arch === "x64") { + if (isMusl()) { try { - if (localFileExisted) { - nativeBinding = require("./html.android-arm64.node"); - } else { - nativeBinding = require("@swc/html-android-arm64"); - } + return require("./swc-html.linux-x64-musl.node"); } catch (e) { - loadError = e; + loadErrors.push(e); } - break; - case "arm": - localFileExisted = existsSync( - join(__dirname, "html.android-arm-eabi.node") - ); try { - if (localFileExisted) { - nativeBinding = require("./html.android-arm-eabi.node"); - } else { - nativeBinding = require("@swc/html-android-arm-eabi"); - } + return require("@swc/html-linux-x64-musl"); } catch (e) { - loadError = e; + loadErrors.push(e); } - break; - default: - throw new Error(`Unsupported architecture on Android ${arch}`); - } - break; - case "win32": - switch (arch) { - case "x64": - localFileExisted = existsSync( - join(__dirname, "html.win32-x64-msvc.node") - ); + } else { try { - if (localFileExisted) { - nativeBinding = require("./html.win32-x64-msvc.node"); - } else { - nativeBinding = require("@swc/html-win32-x64-msvc"); - } + return require("./swc-html.linux-x64-gnu.node"); } catch (e) { - loadError = e; + loadErrors.push(e); } - break; - case "ia32": - localFileExisted = existsSync( - join(__dirname, "html.win32-ia32-msvc.node") - ); try { - if (localFileExisted) { - nativeBinding = require("./html.win32-ia32-msvc.node"); - } else { - nativeBinding = require("@swc/html-win32-ia32-msvc"); - } + return require("@swc/html-linux-x64-gnu"); } catch (e) { - loadError = e; + loadErrors.push(e); } - break; - case "arm64": - localFileExisted = existsSync( - join(__dirname, "html.win32-arm64-msvc.node") - ); + } + } else if (process.arch === "arm64") { + if (isMusl()) { try { - if (localFileExisted) { - nativeBinding = require("./html.win32-arm64-msvc.node"); - } else { - nativeBinding = require("@swc/html-win32-arm64-msvc"); - } + return require("./swc-html.linux-arm64-musl.node"); } catch (e) { - loadError = e; + loadErrors.push(e); + } + try { + return require("@swc/html-linux-arm64-musl"); + } catch (e) { + loadErrors.push(e); } - break; - default: - throw new Error(`Unsupported architecture on Windows: ${arch}`); - } - break; - case "darwin": - localFileExisted = existsSync( - join(__dirname, "html.darwin-universal.node") - ); - try { - if (localFileExisted) { - nativeBinding = require("./html.darwin-universal.node"); } else { - nativeBinding = require("@swc/html-darwin-universal"); - } - break; - } catch {} - switch (arch) { - case "x64": - localFileExisted = existsSync( - join(__dirname, "html.darwin-x64.node") - ); try { - if (localFileExisted) { - nativeBinding = require("./html.darwin-x64.node"); - } else { - nativeBinding = require("@swc/html-darwin-x64"); - } + return require("./swc-html.linux-arm64-gnu.node"); } catch (e) { - loadError = e; + loadErrors.push(e); } - break; - case "arm64": - localFileExisted = existsSync( - join(__dirname, "html.darwin-arm64.node") - ); try { - if (localFileExisted) { - nativeBinding = require("./html.darwin-arm64.node"); - } else { - nativeBinding = require("@swc/html-darwin-arm64"); - } + return require("@swc/html-linux-arm64-gnu"); } catch (e) { - loadError = e; + loadErrors.push(e); } - break; - default: - throw new Error(`Unsupported architecture on macOS: ${arch}`); - } - break; - case "freebsd": - if (arch !== "x64") { - throw new Error(`Unsupported architecture on FreeBSD: ${arch}`); - } - localFileExisted = existsSync(join(__dirname, "html.freebsd-x64.node")); - try { - if (localFileExisted) { - nativeBinding = require("./html.freebsd-x64.node"); - } else { - nativeBinding = require("@swc/html-freebsd-x64"); } - } catch (e) { - loadError = e; - } - break; - case "linux": - switch (arch) { - case "x64": - if (isMusl()) { - localFileExisted = existsSync( - join(__dirname, "html.linux-x64-musl.node") - ); - try { - if (localFileExisted) { - nativeBinding = require("./html.linux-x64-musl.node"); - } else { - nativeBinding = require("@swc/html-linux-x64-musl"); - } - } catch (e) { - loadError = e; - } - } else { - localFileExisted = existsSync( - join(__dirname, "html.linux-x64-gnu.node") - ); - try { - if (localFileExisted) { - nativeBinding = require("./html.linux-x64-gnu.node"); - } else { - nativeBinding = require("@swc/html-linux-x64-gnu"); - } - } catch (e) { - loadError = e; - } + } else if (process.arch === "arm") { + try { + return require("./swc-html.linux-arm-gnueabihf.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-linux-arm-gnueabihf"); + } catch (e) { + loadErrors.push(e); + } + } else if (process.arch === "riscv64") { + if (isMusl()) { + try { + return require("./swc-html.linux-riscv64-musl.node"); + } catch (e) { + loadErrors.push(e); } - break; - case "arm64": - if (isMusl()) { - localFileExisted = existsSync( - join(__dirname, "html.linux-arm64-musl.node") - ); - try { - if (localFileExisted) { - nativeBinding = require("./html.linux-arm64-musl.node"); - } else { - nativeBinding = require("@swc/html-linux-arm64-musl"); - } - } catch (e) { - loadError = e; - } - } else { - localFileExisted = existsSync( - join(__dirname, "html.linux-arm64-gnu.node") - ); - try { - if (localFileExisted) { - nativeBinding = require("./html.linux-arm64-gnu.node"); - } else { - nativeBinding = require("@swc/html-linux-arm64-gnu"); - } - } catch (e) { - loadError = e; - } + try { + return require("@swc/html-linux-riscv64-musl"); + } catch (e) { + loadErrors.push(e); + } + } else { + try { + return require("./swc-html.linux-riscv64-gnu.node"); + } catch (e) { + loadErrors.push(e); } - break; - case "arm": - localFileExisted = existsSync( - join(__dirname, "html.linux-arm-gnueabihf.node") - ); try { - if (localFileExisted) { - nativeBinding = require("./html.linux-arm-gnueabihf.node"); - } else { - nativeBinding = require("@swc/html-linux-arm-gnueabihf"); - } + return require("@swc/html-linux-riscv64-gnu"); } catch (e) { - loadError = e; + loadErrors.push(e); } - break; - default: - throw new Error(`Unsupported architecture on Linux: ${arch}`); + } + } else if (process.arch === "s390x") { + try { + return require("./swc-html.linux-s390x-gnu.node"); + } catch (e) { + loadErrors.push(e); + } + try { + return require("@swc/html-linux-s390x-gnu"); + } catch (e) { + loadErrors.push(e); + } + } else { + loadErrors.push( + new Error(`Unsupported architecture on Linux: ${process.arch}`) + ); + } + } else { + loadErrors.push( + new Error( + `Unsupported OS: ${process.platform}, architecture: ${process.arch}` + ) + ); + } +} + +nativeBinding = requireNative(); + +if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { + try { + nativeBinding = require("./swc-html.wasi.cjs"); + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + console.error(err); } - break; - default: - throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); + } + if (!nativeBinding) { + try { + nativeBinding = require("@swc/html-wasm32-wasi"); + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + console.error(err); + } + } + } } if (!nativeBinding) { - if (loadError) { - throw loadError; + if (loadErrors.length > 0) { + // TODO Link to documentation with potential fixes + // - The package owner could build/publish bindings for this arch + // - The user may need to bundle the correct files + // - The user may need to re-install node_modules to get new packages + throw new Error("Failed to load native binding", { cause: loadErrors }); } throw new Error(`Failed to load native binding`); } -const { - minify, - minifyFragment, - minifySync, - minifyFragmentSync, - minify, - minifyFragment, - minifySync, - minifyFragmentSync, -} = nativeBinding; - -module.exports.minify = minify; -module.exports.minifyFragment = minifyFragment; -module.exports.minifySync = minifySync; -module.exports.minifyFragmentSync = minifyFragmentSync; -module.exports.minify = minify; -module.exports.minifyFragment = minifyFragment; -module.exports.minifySync = minifySync; -module.exports.minifyFragmentSync = minifyFragmentSync; +module.exports.minify = nativeBinding.minify; +module.exports.minifyFragment = nativeBinding.minifyFragment; +module.exports.minifyFragmentSync = nativeBinding.minifyFragmentSync; +module.exports.minifySync = nativeBinding.minifySync; diff --git a/packages/html/package.json b/packages/html/package.json index ee7d2447e0ef8..c1c8d33e91d7b 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,7 +1,7 @@ { "name": "@swc/html", "version": "0.0.29", - "description": "Super-fast alternative for posthtml", + "description": "Super-fast HTML minifier", "homepage": "https://swc.rs", "main": "./index.js", "author": "강동윤 ", @@ -21,7 +21,7 @@ "url": "https://github.com/swc-project/swc/issues" }, "napi": { - "name": "html", + "name": "swc-html", "triples": { "defaults": true, "additional": [ diff --git a/scripts/publish.sh b/scripts/publish.sh index c86424db704d9..63cebf87f0aab 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -18,6 +18,7 @@ echo "Publishing $version with swc_core $swc_core_version" # Update version (cd ./packages/core && npm version "$version" --no-git-tag-version --allow-same-version || true) +(cd ./packages/html && npm version "$version" --no-git-tag-version --allow-same-version || true) (cd ./packages/minifier && npm version "$version" --no-git-tag-version --allow-same-version || true) (cd ./bindings && cargo set-version $version -p binding_core_wasm -p binding_minifier_wasm -p binding_typescript_wasm) (cd ./bindings && cargo set-version --bump patch -p swc_cli) From b802ebe6d48ddf46854f37abfe093bf24eb998d3 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 06:02:34 +0000 Subject: [PATCH 33/59] chore: Publish `1.7.15-nightly-20240820.7` with `swc_core` `v0.101.3` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/html/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 28 files changed, 31 insertions(+), 31 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index bd20c22a8da31..3d00991fcb6b0 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.15-nightly-20240820.6" +version = "1.7.15-nightly-20240820.7" dependencies = [ "anyhow", "getrandom", @@ -319,7 +319,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.15-nightly-20240820.6" +version = "1.7.15-nightly-20240820.7" dependencies = [ "anyhow", "getrandom", @@ -332,7 +332,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.15-nightly-20240820.6" +version = "1.7.15-nightly-20240820.7" dependencies = [ "anyhow", "getrandom", @@ -3173,7 +3173,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.385" +version = "0.91.386" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 99e50d4af9367..5f335286d8691 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.6" +version = "1.7.15-nightly-20240820.7" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 6460e233ab2ed..df8c66f45e34c 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.6" +version = "1.7.15-nightly-20240820.7" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 945765bd2859a..ae6d7f16fc72a 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.6" +version = "1.7.15-nightly-20240820.7" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 2e564fbb083f9..36cacf1882d86 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.385" +version = "0.91.386" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 3f31db6b20dcf..12cb776f2aac1 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index f1d7c836c78cf..b547c065a280b 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index d78b1a8912103..b109806a36364 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index b745cb0535ce8..47ea3047fa5d1 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 5fd39ec3ca23e..9b7ba0b1af216 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 5f81777baccec..0b7db887f586c 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 2129d01fb1821..ae3c06e8db227 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index fa1154c68725c..39baba2ed74c1 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index a321c418c521c..66000cad1c2c9 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 793e3ef15ef02..7a89d67c56bd0 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index db95ecd716085..0b9400b6d42b1 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "win32" ], diff --git a/packages/html/package.json b/packages/html/package.json index c1c8d33e91d7b..24fbe14a9ffb1 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html", - "version": "0.0.29", + "version": "1.7.15-nightly-20240820.7", "description": "Super-fast HTML minifier", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 08ff11a6c0b1d..a46999a988b8f 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index be7f2a2797af6..912f656833f1f 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 704348450a7f4..681408dcb744a 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 624aea07c33cc..bbe3b920e21ed 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index da6fb36b54234..c544d4934f47f 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 2965224e57b2e..485022869aea8 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index a52e460b7e022..c92e67662665a 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 45e5198f351ba..2a16e2aa15949 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index d90494b677f7c..5ace23b1d71a4 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 724d3f33ff7e5..d4c8750494082 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index d575f650fade2..f31363d55b263 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.6", + "version": "1.7.15-nightly-20240820.7", "os": [ "win32" ], From 6187fcb134924e51e5d0df344a59556eec51a83e Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 06:02:35 +0000 Subject: [PATCH 34/59] chore: Update changelog --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ba8ccb087bd6..5d20872515844 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1291,9 +1291,6 @@ - **(es)** Change default value of `inputSourceMap` to `true` ([#8801](https://github.com/swc-project/swc/issues/8801)) ([9ffcd18](https://github.com/swc-project/swc/commit/9ffcd1823c0abdc741f654b8e1e330cdc06769a1)) -- **(es/bugfixes)** Fix fn transform in nameless fns ([#8796](https://github.com/swc-project/swc/issues/8796)) ([7ad004e](https://github.com/swc-project/swc/commit/7ad004e1899d98ee8da49909163455b3b622686d)) - - - **(es/minifier)** Abort fn inliner if there's a spread arg ([#8809](https://github.com/swc-project/swc/issues/8809)) ([730ded2](https://github.com/swc-project/swc/commit/730ded2a26f63f0069dea0d3bc207bb31f344444)) ### Features From 911d4eaa146ff493636308a3cebd8b21d941bfde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 20 Aug 2024 15:50:11 +0900 Subject: [PATCH 35/59] perf(visit): Add linear AST traversal (#9452) **Description:** Babel decorator pass uses `fastTraverse`, and I think we can have one. **Related issue:** - Closes https://github.com/swc-project/swc/issues/9451 --- .changeset/olive-pianos-lay.md | 9 + crates/swc_css_visit/src/generated.rs | 2623 +++++++++++- crates/swc_ecma_visit/src/generated.rs | 3769 ++++++++++++++++- crates/swc_html_visit/src/generated.rs | 183 +- crates/swc_xml_visit/src/generated.rs | 176 +- tools/generate-code/src/generators/visitor.rs | 184 +- 6 files changed, 6926 insertions(+), 18 deletions(-) create mode 100644 .changeset/olive-pianos-lay.md diff --git a/.changeset/olive-pianos-lay.md b/.changeset/olive-pianos-lay.md new file mode 100644 index 0000000000000..65a692b1e82a9 --- /dev/null +++ b/.changeset/olive-pianos-lay.md @@ -0,0 +1,9 @@ +--- +swc_css_visit: patch +swc_ecma_visit: patch +swc_html_visit: patch +swc_xml_visit: patch +swc_core: patch +--- + +perf(visit): Add linear AST traversal diff --git a/crates/swc_css_visit/src/generated.rs b/crates/swc_css_visit/src/generated.rs index 5edde07afeaf2..7cb3ad7e62853 100644 --- a/crates/swc_css_visit/src/generated.rs +++ b/crates/swc_css_visit/src/generated.rs @@ -110852,7 +110852,6 @@ pub mod fields { #[doc = "Represents [`WqName::value`]"] Value, } - #[cfg(any(docsrs, feature = "path"))] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum AstParentKind { AbsoluteColorBase(AbsoluteColorBaseField), @@ -111209,7 +111208,6 @@ pub mod fields { } } } - #[cfg(any(docsrs, feature = "path"))] #[derive(Debug, Clone, Copy)] pub enum AstParentNodeRef<'ast> { AbsoluteColorBase(&'ast AbsoluteColorBase, AbsoluteColorBaseField), @@ -111628,6 +111626,7 @@ pub mod fields { } } } + #[cfg(any(docsrs, feature = "path"))] impl<'ast> AstParentNodeRef<'ast> { #[inline] pub fn kind(&self) -> AstParentKind { @@ -111995,5 +111994,2625 @@ pub mod fields { } } } +impl<'ast> From<&'ast AbsoluteColorBase> for NodeRef<'ast> { + fn from(node: &'ast AbsoluteColorBase) -> Self { + NodeRef::AbsoluteColorBase(node) + } +} +impl<'ast> From<&'ast AlphaValue> for NodeRef<'ast> { + fn from(node: &'ast AlphaValue) -> Self { + NodeRef::AlphaValue(node) + } +} +impl<'ast> From<&'ast AnPlusB> for NodeRef<'ast> { + fn from(node: &'ast AnPlusB) -> Self { + NodeRef::AnPlusB(node) + } +} +impl<'ast> From<&'ast AnPlusBNotation> for NodeRef<'ast> { + fn from(node: &'ast AnPlusBNotation) -> Self { + NodeRef::AnPlusBNotation(node) + } +} +impl<'ast> From<&'ast Angle> for NodeRef<'ast> { + fn from(node: &'ast Angle) -> Self { + NodeRef::Angle(node) + } +} +impl<'ast> From<&'ast AnglePercentage> for NodeRef<'ast> { + fn from(node: &'ast AnglePercentage) -> Self { + NodeRef::AnglePercentage(node) + } +} +impl<'ast> From<&'ast AnyNamespace> for NodeRef<'ast> { + fn from(node: &'ast AnyNamespace) -> Self { + NodeRef::AnyNamespace(node) + } +} +impl<'ast> From<&'ast AtRule> for NodeRef<'ast> { + fn from(node: &'ast AtRule) -> Self { + NodeRef::AtRule(node) + } +} +impl<'ast> From<&'ast AtRuleName> for NodeRef<'ast> { + fn from(node: &'ast AtRuleName) -> Self { + NodeRef::AtRuleName(node) + } +} +impl<'ast> From<&'ast AtRulePrelude> for NodeRef<'ast> { + fn from(node: &'ast AtRulePrelude) -> Self { + NodeRef::AtRulePrelude(node) + } +} +impl<'ast> From<&'ast AttributeSelector> for NodeRef<'ast> { + fn from(node: &'ast AttributeSelector) -> Self { + NodeRef::AttributeSelector(node) + } +} +impl<'ast> From<&'ast AttributeSelectorMatcher> for NodeRef<'ast> { + fn from(node: &'ast AttributeSelectorMatcher) -> Self { + NodeRef::AttributeSelectorMatcher(node) + } +} +impl<'ast> From<&'ast AttributeSelectorMatcherValue> for NodeRef<'ast> { + fn from(node: &'ast AttributeSelectorMatcherValue) -> Self { + NodeRef::AttributeSelectorMatcherValue(node) + } +} +impl<'ast> From<&'ast AttributeSelectorModifier> for NodeRef<'ast> { + fn from(node: &'ast AttributeSelectorModifier) -> Self { + NodeRef::AttributeSelectorModifier(node) + } +} +impl<'ast> From<&'ast AttributeSelectorValue> for NodeRef<'ast> { + fn from(node: &'ast AttributeSelectorValue) -> Self { + NodeRef::AttributeSelectorValue(node) + } +} +impl<'ast> From<&'ast BinOp> for NodeRef<'ast> { + fn from(node: &'ast BinOp) -> Self { + NodeRef::BinOp(node) + } +} +impl<'ast> From<&'ast CalcOperator> for NodeRef<'ast> { + fn from(node: &'ast CalcOperator) -> Self { + NodeRef::CalcOperator(node) + } +} +impl<'ast> From<&'ast CalcOperatorType> for NodeRef<'ast> { + fn from(node: &'ast CalcOperatorType) -> Self { + NodeRef::CalcOperatorType(node) + } +} +impl<'ast> From<&'ast CalcProduct> for NodeRef<'ast> { + fn from(node: &'ast CalcProduct) -> Self { + NodeRef::CalcProduct(node) + } +} +impl<'ast> From<&'ast CalcProductOrOperator> for NodeRef<'ast> { + fn from(node: &'ast CalcProductOrOperator) -> Self { + NodeRef::CalcProductOrOperator(node) + } +} +impl<'ast> From<&'ast CalcSum> for NodeRef<'ast> { + fn from(node: &'ast CalcSum) -> Self { + NodeRef::CalcSum(node) + } +} +impl<'ast> From<&'ast CalcValue> for NodeRef<'ast> { + fn from(node: &'ast CalcValue) -> Self { + NodeRef::CalcValue(node) + } +} +impl<'ast> From<&'ast CalcValueOrOperator> for NodeRef<'ast> { + fn from(node: &'ast CalcValueOrOperator) -> Self { + NodeRef::CalcValueOrOperator(node) + } +} +impl<'ast> From<&'ast ClassSelector> for NodeRef<'ast> { + fn from(node: &'ast ClassSelector) -> Self { + NodeRef::ClassSelector(node) + } +} +impl<'ast> From<&'ast CmykComponent> for NodeRef<'ast> { + fn from(node: &'ast CmykComponent) -> Self { + NodeRef::CmykComponent(node) + } +} +impl<'ast> From<&'ast Color> for NodeRef<'ast> { + fn from(node: &'ast Color) -> Self { + NodeRef::Color(node) + } +} +impl<'ast> From<&'ast ColorProfileName> for NodeRef<'ast> { + fn from(node: &'ast ColorProfileName) -> Self { + NodeRef::ColorProfileName(node) + } +} +impl<'ast> From<&'ast Combinator> for NodeRef<'ast> { + fn from(node: &'ast Combinator) -> Self { + NodeRef::Combinator(node) + } +} +impl<'ast> From<&'ast CombinatorValue> for NodeRef<'ast> { + fn from(node: &'ast CombinatorValue) -> Self { + NodeRef::CombinatorValue(node) + } +} +impl<'ast> From<&'ast ComplexSelector> for NodeRef<'ast> { + fn from(node: &'ast ComplexSelector) -> Self { + NodeRef::ComplexSelector(node) + } +} +impl<'ast> From<&'ast ComplexSelectorChildren> for NodeRef<'ast> { + fn from(node: &'ast ComplexSelectorChildren) -> Self { + NodeRef::ComplexSelectorChildren(node) + } +} +impl<'ast> From<&'ast ComponentValue> for NodeRef<'ast> { + fn from(node: &'ast ComponentValue) -> Self { + NodeRef::ComponentValue(node) + } +} +impl<'ast> From<&'ast CompoundSelector> for NodeRef<'ast> { + fn from(node: &'ast CompoundSelector) -> Self { + NodeRef::CompoundSelector(node) + } +} +impl<'ast> From<&'ast CompoundSelectorList> for NodeRef<'ast> { + fn from(node: &'ast CompoundSelectorList) -> Self { + NodeRef::CompoundSelectorList(node) + } +} +impl<'ast> From<&'ast ContainerCondition> for NodeRef<'ast> { + fn from(node: &'ast ContainerCondition) -> Self { + NodeRef::ContainerCondition(node) + } +} +impl<'ast> From<&'ast ContainerName> for NodeRef<'ast> { + fn from(node: &'ast ContainerName) -> Self { + NodeRef::ContainerName(node) + } +} +impl<'ast> From<&'ast ContainerQuery> for NodeRef<'ast> { + fn from(node: &'ast ContainerQuery) -> Self { + NodeRef::ContainerQuery(node) + } +} +impl<'ast> From<&'ast ContainerQueryAnd> for NodeRef<'ast> { + fn from(node: &'ast ContainerQueryAnd) -> Self { + NodeRef::ContainerQueryAnd(node) + } +} +impl<'ast> From<&'ast ContainerQueryNot> for NodeRef<'ast> { + fn from(node: &'ast ContainerQueryNot) -> Self { + NodeRef::ContainerQueryNot(node) + } +} +impl<'ast> From<&'ast ContainerQueryOr> for NodeRef<'ast> { + fn from(node: &'ast ContainerQueryOr) -> Self { + NodeRef::ContainerQueryOr(node) + } +} +impl<'ast> From<&'ast ContainerQueryType> for NodeRef<'ast> { + fn from(node: &'ast ContainerQueryType) -> Self { + NodeRef::ContainerQueryType(node) + } +} +impl<'ast> From<&'ast CustomHighlightName> for NodeRef<'ast> { + fn from(node: &'ast CustomHighlightName) -> Self { + NodeRef::CustomHighlightName(node) + } +} +impl<'ast> From<&'ast CustomIdent> for NodeRef<'ast> { + fn from(node: &'ast CustomIdent) -> Self { + NodeRef::CustomIdent(node) + } +} +impl<'ast> From<&'ast CustomMediaQuery> for NodeRef<'ast> { + fn from(node: &'ast CustomMediaQuery) -> Self { + NodeRef::CustomMediaQuery(node) + } +} +impl<'ast> From<&'ast CustomMediaQueryMediaType> for NodeRef<'ast> { + fn from(node: &'ast CustomMediaQueryMediaType) -> Self { + NodeRef::CustomMediaQueryMediaType(node) + } +} +impl<'ast> From<&'ast CustomPropertyName> for NodeRef<'ast> { + fn from(node: &'ast CustomPropertyName) -> Self { + NodeRef::CustomPropertyName(node) + } +} +impl<'ast> From<&'ast DashedIdent> for NodeRef<'ast> { + fn from(node: &'ast DashedIdent) -> Self { + NodeRef::DashedIdent(node) + } +} +impl<'ast> From<&'ast Declaration> for NodeRef<'ast> { + fn from(node: &'ast Declaration) -> Self { + NodeRef::Declaration(node) + } +} +impl<'ast> From<&'ast DeclarationName> for NodeRef<'ast> { + fn from(node: &'ast DeclarationName) -> Self { + NodeRef::DeclarationName(node) + } +} +impl<'ast> From<&'ast DeclarationOrAtRule> for NodeRef<'ast> { + fn from(node: &'ast DeclarationOrAtRule) -> Self { + NodeRef::DeclarationOrAtRule(node) + } +} +impl<'ast> From<&'ast Delimiter> for NodeRef<'ast> { + fn from(node: &'ast Delimiter) -> Self { + NodeRef::Delimiter(node) + } +} +impl<'ast> From<&'ast DelimiterValue> for NodeRef<'ast> { + fn from(node: &'ast DelimiterValue) -> Self { + NodeRef::DelimiterValue(node) + } +} +impl<'ast> From<&'ast Dimension> for NodeRef<'ast> { + fn from(node: &'ast Dimension) -> Self { + NodeRef::Dimension(node) + } +} +impl<'ast> From<&'ast DimensionToken> for NodeRef<'ast> { + fn from(node: &'ast DimensionToken) -> Self { + NodeRef::DimensionToken(node) + } +} +impl<'ast> From<&'ast DocumentPrelude> for NodeRef<'ast> { + fn from(node: &'ast DocumentPrelude) -> Self { + NodeRef::DocumentPrelude(node) + } +} +impl<'ast> From<&'ast DocumentPreludeMatchingFunction> for NodeRef<'ast> { + fn from(node: &'ast DocumentPreludeMatchingFunction) -> Self { + NodeRef::DocumentPreludeMatchingFunction(node) + } +} +impl<'ast> From<&'ast ExtensionName> for NodeRef<'ast> { + fn from(node: &'ast ExtensionName) -> Self { + NodeRef::ExtensionName(node) + } +} +impl<'ast> From<&'ast FamilyName> for NodeRef<'ast> { + fn from(node: &'ast FamilyName) -> Self { + NodeRef::FamilyName(node) + } +} +impl<'ast> From<&'ast Flex> for NodeRef<'ast> { + fn from(node: &'ast Flex) -> Self { + NodeRef::Flex(node) + } +} +impl<'ast> From<&'ast FontFeatureValuesPrelude> for NodeRef<'ast> { + fn from(node: &'ast FontFeatureValuesPrelude) -> Self { + NodeRef::FontFeatureValuesPrelude(node) + } +} +impl<'ast> From<&'ast ForgivingComplexSelector> for NodeRef<'ast> { + fn from(node: &'ast ForgivingComplexSelector) -> Self { + NodeRef::ForgivingComplexSelector(node) + } +} +impl<'ast> From<&'ast ForgivingRelativeSelector> for NodeRef<'ast> { + fn from(node: &'ast ForgivingRelativeSelector) -> Self { + NodeRef::ForgivingRelativeSelector(node) + } +} +impl<'ast> From<&'ast ForgivingRelativeSelectorList> for NodeRef<'ast> { + fn from(node: &'ast ForgivingRelativeSelectorList) -> Self { + NodeRef::ForgivingRelativeSelectorList(node) + } +} +impl<'ast> From<&'ast ForgivingSelectorList> for NodeRef<'ast> { + fn from(node: &'ast ForgivingSelectorList) -> Self { + NodeRef::ForgivingSelectorList(node) + } +} +impl<'ast> From<&'ast Frequency> for NodeRef<'ast> { + fn from(node: &'ast Frequency) -> Self { + NodeRef::Frequency(node) + } +} +impl<'ast> From<&'ast FrequencyPercentage> for NodeRef<'ast> { + fn from(node: &'ast FrequencyPercentage) -> Self { + NodeRef::FrequencyPercentage(node) + } +} +impl<'ast> From<&'ast Function> for NodeRef<'ast> { + fn from(node: &'ast Function) -> Self { + NodeRef::Function(node) + } +} +impl<'ast> From<&'ast FunctionName> for NodeRef<'ast> { + fn from(node: &'ast FunctionName) -> Self { + NodeRef::FunctionName(node) + } +} +impl<'ast> From<&'ast GeneralEnclosed> for NodeRef<'ast> { + fn from(node: &'ast GeneralEnclosed) -> Self { + NodeRef::GeneralEnclosed(node) + } +} +impl<'ast> From<&'ast HexColor> for NodeRef<'ast> { + fn from(node: &'ast HexColor) -> Self { + NodeRef::HexColor(node) + } +} +impl<'ast> From<&'ast Hue> for NodeRef<'ast> { + fn from(node: &'ast Hue) -> Self { + NodeRef::Hue(node) + } +} +impl<'ast> From<&'ast IdSelector> for NodeRef<'ast> { + fn from(node: &'ast IdSelector) -> Self { + NodeRef::IdSelector(node) + } +} +impl<'ast> From<&'ast Ident> for NodeRef<'ast> { + fn from(node: &'ast Ident) -> Self { + NodeRef::Ident(node) + } +} +impl<'ast> From<&'ast ImportConditions> for NodeRef<'ast> { + fn from(node: &'ast ImportConditions) -> Self { + NodeRef::ImportConditions(node) + } +} +impl<'ast> From<&'ast ImportHref> for NodeRef<'ast> { + fn from(node: &'ast ImportHref) -> Self { + NodeRef::ImportHref(node) + } +} +impl<'ast> From<&'ast ImportLayerName> for NodeRef<'ast> { + fn from(node: &'ast ImportLayerName) -> Self { + NodeRef::ImportLayerName(node) + } +} +impl<'ast> From<&'ast ImportPrelude> for NodeRef<'ast> { + fn from(node: &'ast ImportPrelude) -> Self { + NodeRef::ImportPrelude(node) + } +} +impl<'ast> From<&'ast ImportantFlag> for NodeRef<'ast> { + fn from(node: &'ast ImportantFlag) -> Self { + NodeRef::ImportantFlag(node) + } +} +impl<'ast> From<&'ast Integer> for NodeRef<'ast> { + fn from(node: &'ast Integer) -> Self { + NodeRef::Integer(node) + } +} +impl<'ast> From<&'ast KeyframeBlock> for NodeRef<'ast> { + fn from(node: &'ast KeyframeBlock) -> Self { + NodeRef::KeyframeBlock(node) + } +} +impl<'ast> From<&'ast KeyframeSelector> for NodeRef<'ast> { + fn from(node: &'ast KeyframeSelector) -> Self { + NodeRef::KeyframeSelector(node) + } +} +impl<'ast> From<&'ast KeyframesName> for NodeRef<'ast> { + fn from(node: &'ast KeyframesName) -> Self { + NodeRef::KeyframesName(node) + } +} +impl<'ast> From<&'ast KeyframesPseudoFunction> for NodeRef<'ast> { + fn from(node: &'ast KeyframesPseudoFunction) -> Self { + NodeRef::KeyframesPseudoFunction(node) + } +} +impl<'ast> From<&'ast KeyframesPseudoPrefix> for NodeRef<'ast> { + fn from(node: &'ast KeyframesPseudoPrefix) -> Self { + NodeRef::KeyframesPseudoPrefix(node) + } +} +impl<'ast> From<&'ast LayerName> for NodeRef<'ast> { + fn from(node: &'ast LayerName) -> Self { + NodeRef::LayerName(node) + } +} +impl<'ast> From<&'ast LayerNameList> for NodeRef<'ast> { + fn from(node: &'ast LayerNameList) -> Self { + NodeRef::LayerNameList(node) + } +} +impl<'ast> From<&'ast LayerPrelude> for NodeRef<'ast> { + fn from(node: &'ast LayerPrelude) -> Self { + NodeRef::LayerPrelude(node) + } +} +impl<'ast> From<&'ast Length> for NodeRef<'ast> { + fn from(node: &'ast Length) -> Self { + NodeRef::Length(node) + } +} +impl<'ast> From<&'ast LengthPercentage> for NodeRef<'ast> { + fn from(node: &'ast LengthPercentage) -> Self { + NodeRef::LengthPercentage(node) + } +} +impl<'ast> From<&'ast ListOfComponentValues> for NodeRef<'ast> { + fn from(node: &'ast ListOfComponentValues) -> Self { + NodeRef::ListOfComponentValues(node) + } +} +impl<'ast> From<&'ast MediaAnd> for NodeRef<'ast> { + fn from(node: &'ast MediaAnd) -> Self { + NodeRef::MediaAnd(node) + } +} +impl<'ast> From<&'ast MediaCondition> for NodeRef<'ast> { + fn from(node: &'ast MediaCondition) -> Self { + NodeRef::MediaCondition(node) + } +} +impl<'ast> From<&'ast MediaConditionAllType> for NodeRef<'ast> { + fn from(node: &'ast MediaConditionAllType) -> Self { + NodeRef::MediaConditionAllType(node) + } +} +impl<'ast> From<&'ast MediaConditionType> for NodeRef<'ast> { + fn from(node: &'ast MediaConditionType) -> Self { + NodeRef::MediaConditionType(node) + } +} +impl<'ast> From<&'ast MediaConditionWithoutOr> for NodeRef<'ast> { + fn from(node: &'ast MediaConditionWithoutOr) -> Self { + NodeRef::MediaConditionWithoutOr(node) + } +} +impl<'ast> From<&'ast MediaConditionWithoutOrType> for NodeRef<'ast> { + fn from(node: &'ast MediaConditionWithoutOrType) -> Self { + NodeRef::MediaConditionWithoutOrType(node) + } +} +impl<'ast> From<&'ast MediaFeature> for NodeRef<'ast> { + fn from(node: &'ast MediaFeature) -> Self { + NodeRef::MediaFeature(node) + } +} +impl<'ast> From<&'ast MediaFeatureBoolean> for NodeRef<'ast> { + fn from(node: &'ast MediaFeatureBoolean) -> Self { + NodeRef::MediaFeatureBoolean(node) + } +} +impl<'ast> From<&'ast MediaFeatureName> for NodeRef<'ast> { + fn from(node: &'ast MediaFeatureName) -> Self { + NodeRef::MediaFeatureName(node) + } +} +impl<'ast> From<&'ast MediaFeaturePlain> for NodeRef<'ast> { + fn from(node: &'ast MediaFeaturePlain) -> Self { + NodeRef::MediaFeaturePlain(node) + } +} +impl<'ast> From<&'ast MediaFeatureRange> for NodeRef<'ast> { + fn from(node: &'ast MediaFeatureRange) -> Self { + NodeRef::MediaFeatureRange(node) + } +} +impl<'ast> From<&'ast MediaFeatureRangeComparison> for NodeRef<'ast> { + fn from(node: &'ast MediaFeatureRangeComparison) -> Self { + NodeRef::MediaFeatureRangeComparison(node) + } +} +impl<'ast> From<&'ast MediaFeatureRangeInterval> for NodeRef<'ast> { + fn from(node: &'ast MediaFeatureRangeInterval) -> Self { + NodeRef::MediaFeatureRangeInterval(node) + } +} +impl<'ast> From<&'ast MediaFeatureValue> for NodeRef<'ast> { + fn from(node: &'ast MediaFeatureValue) -> Self { + NodeRef::MediaFeatureValue(node) + } +} +impl<'ast> From<&'ast MediaInParens> for NodeRef<'ast> { + fn from(node: &'ast MediaInParens) -> Self { + NodeRef::MediaInParens(node) + } +} +impl<'ast> From<&'ast MediaNot> for NodeRef<'ast> { + fn from(node: &'ast MediaNot) -> Self { + NodeRef::MediaNot(node) + } +} +impl<'ast> From<&'ast MediaOr> for NodeRef<'ast> { + fn from(node: &'ast MediaOr) -> Self { + NodeRef::MediaOr(node) + } +} +impl<'ast> From<&'ast MediaQuery> for NodeRef<'ast> { + fn from(node: &'ast MediaQuery) -> Self { + NodeRef::MediaQuery(node) + } +} +impl<'ast> From<&'ast MediaQueryList> for NodeRef<'ast> { + fn from(node: &'ast MediaQueryList) -> Self { + NodeRef::MediaQueryList(node) + } +} +impl<'ast> From<&'ast MediaType> for NodeRef<'ast> { + fn from(node: &'ast MediaType) -> Self { + NodeRef::MediaType(node) + } +} +impl<'ast> From<&'ast NamedNamespace> for NodeRef<'ast> { + fn from(node: &'ast NamedNamespace) -> Self { + NodeRef::NamedNamespace(node) + } +} +impl<'ast> From<&'ast Namespace> for NodeRef<'ast> { + fn from(node: &'ast Namespace) -> Self { + NodeRef::Namespace(node) + } +} +impl<'ast> From<&'ast NamespacePrefix> for NodeRef<'ast> { + fn from(node: &'ast NamespacePrefix) -> Self { + NodeRef::NamespacePrefix(node) + } +} +impl<'ast> From<&'ast NamespacePrelude> for NodeRef<'ast> { + fn from(node: &'ast NamespacePrelude) -> Self { + NodeRef::NamespacePrelude(node) + } +} +impl<'ast> From<&'ast NamespacePreludeUri> for NodeRef<'ast> { + fn from(node: &'ast NamespacePreludeUri) -> Self { + NodeRef::NamespacePreludeUri(node) + } +} +impl<'ast> From<&'ast NestingSelector> for NodeRef<'ast> { + fn from(node: &'ast NestingSelector) -> Self { + NodeRef::NestingSelector(node) + } +} +impl<'ast> From<&'ast Number> for NodeRef<'ast> { + fn from(node: &'ast Number) -> Self { + NodeRef::Number(node) + } +} +impl<'ast> From<&'ast NumberType> for NodeRef<'ast> { + fn from(node: &'ast NumberType) -> Self { + NodeRef::NumberType(node) + } +} +impl<'ast> From<&'ast PageSelector> for NodeRef<'ast> { + fn from(node: &'ast PageSelector) -> Self { + NodeRef::PageSelector(node) + } +} +impl<'ast> From<&'ast PageSelectorList> for NodeRef<'ast> { + fn from(node: &'ast PageSelectorList) -> Self { + NodeRef::PageSelectorList(node) + } +} +impl<'ast> From<&'ast PageSelectorPseudo> for NodeRef<'ast> { + fn from(node: &'ast PageSelectorPseudo) -> Self { + NodeRef::PageSelectorPseudo(node) + } +} +impl<'ast> From<&'ast PageSelectorType> for NodeRef<'ast> { + fn from(node: &'ast PageSelectorType) -> Self { + NodeRef::PageSelectorType(node) + } +} +impl<'ast> From<&'ast Percentage> for NodeRef<'ast> { + fn from(node: &'ast Percentage) -> Self { + NodeRef::Percentage(node) + } +} +impl<'ast> From<&'ast PseudoClassSelector> for NodeRef<'ast> { + fn from(node: &'ast PseudoClassSelector) -> Self { + NodeRef::PseudoClassSelector(node) + } +} +impl<'ast> From<&'ast PseudoClassSelectorChildren> for NodeRef<'ast> { + fn from(node: &'ast PseudoClassSelectorChildren) -> Self { + NodeRef::PseudoClassSelectorChildren(node) + } +} +impl<'ast> From<&'ast PseudoElementSelector> for NodeRef<'ast> { + fn from(node: &'ast PseudoElementSelector) -> Self { + NodeRef::PseudoElementSelector(node) + } +} +impl<'ast> From<&'ast PseudoElementSelectorChildren> for NodeRef<'ast> { + fn from(node: &'ast PseudoElementSelectorChildren) -> Self { + NodeRef::PseudoElementSelectorChildren(node) + } +} +impl<'ast> From<&'ast QualifiedRule> for NodeRef<'ast> { + fn from(node: &'ast QualifiedRule) -> Self { + NodeRef::QualifiedRule(node) + } +} +impl<'ast> From<&'ast QualifiedRulePrelude> for NodeRef<'ast> { + fn from(node: &'ast QualifiedRulePrelude) -> Self { + NodeRef::QualifiedRulePrelude(node) + } +} +impl<'ast> From<&'ast QueryInParens> for NodeRef<'ast> { + fn from(node: &'ast QueryInParens) -> Self { + NodeRef::QueryInParens(node) + } +} +impl<'ast> From<&'ast Ratio> for NodeRef<'ast> { + fn from(node: &'ast Ratio) -> Self { + NodeRef::Ratio(node) + } +} +impl<'ast> From<&'ast RelativeSelector> for NodeRef<'ast> { + fn from(node: &'ast RelativeSelector) -> Self { + NodeRef::RelativeSelector(node) + } +} +impl<'ast> From<&'ast RelativeSelectorList> for NodeRef<'ast> { + fn from(node: &'ast RelativeSelectorList) -> Self { + NodeRef::RelativeSelectorList(node) + } +} +impl<'ast> From<&'ast Resolution> for NodeRef<'ast> { + fn from(node: &'ast Resolution) -> Self { + NodeRef::Resolution(node) + } +} +impl<'ast> From<&'ast Rule> for NodeRef<'ast> { + fn from(node: &'ast Rule) -> Self { + NodeRef::Rule(node) + } +} +impl<'ast> From<&'ast ScopeRange> for NodeRef<'ast> { + fn from(node: &'ast ScopeRange) -> Self { + NodeRef::ScopeRange(node) + } +} +impl<'ast> From<&'ast SelectorList> for NodeRef<'ast> { + fn from(node: &'ast SelectorList) -> Self { + NodeRef::SelectorList(node) + } +} +impl<'ast> From<&'ast SequenceOfCustomIdents> for NodeRef<'ast> { + fn from(node: &'ast SequenceOfCustomIdents) -> Self { + NodeRef::SequenceOfCustomIdents(node) + } +} +impl<'ast> From<&'ast SimpleBlock> for NodeRef<'ast> { + fn from(node: &'ast SimpleBlock) -> Self { + NodeRef::SimpleBlock(node) + } +} +impl<'ast> From<&'ast SizeFeature> for NodeRef<'ast> { + fn from(node: &'ast SizeFeature) -> Self { + NodeRef::SizeFeature(node) + } +} +impl<'ast> From<&'ast SizeFeatureBoolean> for NodeRef<'ast> { + fn from(node: &'ast SizeFeatureBoolean) -> Self { + NodeRef::SizeFeatureBoolean(node) + } +} +impl<'ast> From<&'ast SizeFeatureName> for NodeRef<'ast> { + fn from(node: &'ast SizeFeatureName) -> Self { + NodeRef::SizeFeatureName(node) + } +} +impl<'ast> From<&'ast SizeFeaturePlain> for NodeRef<'ast> { + fn from(node: &'ast SizeFeaturePlain) -> Self { + NodeRef::SizeFeaturePlain(node) + } +} +impl<'ast> From<&'ast SizeFeatureRange> for NodeRef<'ast> { + fn from(node: &'ast SizeFeatureRange) -> Self { + NodeRef::SizeFeatureRange(node) + } +} +impl<'ast> From<&'ast SizeFeatureRangeComparison> for NodeRef<'ast> { + fn from(node: &'ast SizeFeatureRangeComparison) -> Self { + NodeRef::SizeFeatureRangeComparison(node) + } +} +impl<'ast> From<&'ast SizeFeatureRangeInterval> for NodeRef<'ast> { + fn from(node: &'ast SizeFeatureRangeInterval) -> Self { + NodeRef::SizeFeatureRangeInterval(node) + } +} +impl<'ast> From<&'ast SizeFeatureValue> for NodeRef<'ast> { + fn from(node: &'ast SizeFeatureValue) -> Self { + NodeRef::SizeFeatureValue(node) + } +} +impl<'ast> From<&'ast Str> for NodeRef<'ast> { + fn from(node: &'ast Str) -> Self { + NodeRef::Str(node) + } +} +impl<'ast> From<&'ast StyleBlock> for NodeRef<'ast> { + fn from(node: &'ast StyleBlock) -> Self { + NodeRef::StyleBlock(node) + } +} +impl<'ast> From<&'ast Stylesheet> for NodeRef<'ast> { + fn from(node: &'ast Stylesheet) -> Self { + NodeRef::Stylesheet(node) + } +} +impl<'ast> From<&'ast SubclassSelector> for NodeRef<'ast> { + fn from(node: &'ast SubclassSelector) -> Self { + NodeRef::SubclassSelector(node) + } +} +impl<'ast> From<&'ast SupportsAnd> for NodeRef<'ast> { + fn from(node: &'ast SupportsAnd) -> Self { + NodeRef::SupportsAnd(node) + } +} +impl<'ast> From<&'ast SupportsCondition> for NodeRef<'ast> { + fn from(node: &'ast SupportsCondition) -> Self { + NodeRef::SupportsCondition(node) + } +} +impl<'ast> From<&'ast SupportsConditionType> for NodeRef<'ast> { + fn from(node: &'ast SupportsConditionType) -> Self { + NodeRef::SupportsConditionType(node) + } +} +impl<'ast> From<&'ast SupportsFeature> for NodeRef<'ast> { + fn from(node: &'ast SupportsFeature) -> Self { + NodeRef::SupportsFeature(node) + } +} +impl<'ast> From<&'ast SupportsInParens> for NodeRef<'ast> { + fn from(node: &'ast SupportsInParens) -> Self { + NodeRef::SupportsInParens(node) + } +} +impl<'ast> From<&'ast SupportsNot> for NodeRef<'ast> { + fn from(node: &'ast SupportsNot) -> Self { + NodeRef::SupportsNot(node) + } +} +impl<'ast> From<&'ast SupportsOr> for NodeRef<'ast> { + fn from(node: &'ast SupportsOr) -> Self { + NodeRef::SupportsOr(node) + } +} +impl<'ast> From<&'ast TagNameSelector> for NodeRef<'ast> { + fn from(node: &'ast TagNameSelector) -> Self { + NodeRef::TagNameSelector(node) + } +} +impl<'ast> From<&'ast Time> for NodeRef<'ast> { + fn from(node: &'ast Time) -> Self { + NodeRef::Time(node) + } +} +impl<'ast> From<&'ast TimePercentage> for NodeRef<'ast> { + fn from(node: &'ast TimePercentage) -> Self { + NodeRef::TimePercentage(node) + } +} +impl<'ast> From<&'ast Token> for NodeRef<'ast> { + fn from(node: &'ast Token) -> Self { + NodeRef::Token(node) + } +} +impl<'ast> From<&'ast TokenAndSpan> for NodeRef<'ast> { + fn from(node: &'ast TokenAndSpan) -> Self { + NodeRef::TokenAndSpan(node) + } +} +impl<'ast> From<&'ast TypeSelector> for NodeRef<'ast> { + fn from(node: &'ast TypeSelector) -> Self { + NodeRef::TypeSelector(node) + } +} +impl<'ast> From<&'ast UnicodeRange> for NodeRef<'ast> { + fn from(node: &'ast UnicodeRange) -> Self { + NodeRef::UnicodeRange(node) + } +} +impl<'ast> From<&'ast UniversalSelector> for NodeRef<'ast> { + fn from(node: &'ast UniversalSelector) -> Self { + NodeRef::UniversalSelector(node) + } +} +impl<'ast> From<&'ast UnknownDimension> for NodeRef<'ast> { + fn from(node: &'ast UnknownDimension) -> Self { + NodeRef::UnknownDimension(node) + } +} +impl<'ast> From<&'ast Url> for NodeRef<'ast> { + fn from(node: &'ast Url) -> Self { + NodeRef::Url(node) + } +} +impl<'ast> From<&'ast UrlKeyValue> for NodeRef<'ast> { + fn from(node: &'ast UrlKeyValue) -> Self { + NodeRef::UrlKeyValue(node) + } +} +impl<'ast> From<&'ast UrlModifier> for NodeRef<'ast> { + fn from(node: &'ast UrlModifier) -> Self { + NodeRef::UrlModifier(node) + } +} +impl<'ast> From<&'ast UrlValue> for NodeRef<'ast> { + fn from(node: &'ast UrlValue) -> Self { + NodeRef::UrlValue(node) + } +} +impl<'ast> From<&'ast UrlValueRaw> for NodeRef<'ast> { + fn from(node: &'ast UrlValueRaw) -> Self { + NodeRef::UrlValueRaw(node) + } +} +impl<'ast> From<&'ast WqName> for NodeRef<'ast> { + fn from(node: &'ast WqName) -> Self { + NodeRef::WqName(node) + } +} +#[derive(Debug, Clone, Copy)] +pub enum NodeRef<'ast> { + AbsoluteColorBase(&'ast AbsoluteColorBase), + AlphaValue(&'ast AlphaValue), + AnPlusB(&'ast AnPlusB), + AnPlusBNotation(&'ast AnPlusBNotation), + Angle(&'ast Angle), + AnglePercentage(&'ast AnglePercentage), + AnyNamespace(&'ast AnyNamespace), + AtRule(&'ast AtRule), + AtRuleName(&'ast AtRuleName), + AtRulePrelude(&'ast AtRulePrelude), + AttributeSelector(&'ast AttributeSelector), + AttributeSelectorMatcher(&'ast AttributeSelectorMatcher), + AttributeSelectorMatcherValue(&'ast AttributeSelectorMatcherValue), + AttributeSelectorModifier(&'ast AttributeSelectorModifier), + AttributeSelectorValue(&'ast AttributeSelectorValue), + BinOp(&'ast BinOp), + CalcOperator(&'ast CalcOperator), + CalcOperatorType(&'ast CalcOperatorType), + CalcProduct(&'ast CalcProduct), + CalcProductOrOperator(&'ast CalcProductOrOperator), + CalcSum(&'ast CalcSum), + CalcValue(&'ast CalcValue), + CalcValueOrOperator(&'ast CalcValueOrOperator), + ClassSelector(&'ast ClassSelector), + CmykComponent(&'ast CmykComponent), + Color(&'ast Color), + ColorProfileName(&'ast ColorProfileName), + Combinator(&'ast Combinator), + CombinatorValue(&'ast CombinatorValue), + ComplexSelector(&'ast ComplexSelector), + ComplexSelectorChildren(&'ast ComplexSelectorChildren), + ComponentValue(&'ast ComponentValue), + CompoundSelector(&'ast CompoundSelector), + CompoundSelectorList(&'ast CompoundSelectorList), + ContainerCondition(&'ast ContainerCondition), + ContainerName(&'ast ContainerName), + ContainerQuery(&'ast ContainerQuery), + ContainerQueryAnd(&'ast ContainerQueryAnd), + ContainerQueryNot(&'ast ContainerQueryNot), + ContainerQueryOr(&'ast ContainerQueryOr), + ContainerQueryType(&'ast ContainerQueryType), + CustomHighlightName(&'ast CustomHighlightName), + CustomIdent(&'ast CustomIdent), + CustomMediaQuery(&'ast CustomMediaQuery), + CustomMediaQueryMediaType(&'ast CustomMediaQueryMediaType), + CustomPropertyName(&'ast CustomPropertyName), + DashedIdent(&'ast DashedIdent), + Declaration(&'ast Declaration), + DeclarationName(&'ast DeclarationName), + DeclarationOrAtRule(&'ast DeclarationOrAtRule), + Delimiter(&'ast Delimiter), + DelimiterValue(&'ast DelimiterValue), + Dimension(&'ast Dimension), + DimensionToken(&'ast DimensionToken), + DocumentPrelude(&'ast DocumentPrelude), + DocumentPreludeMatchingFunction(&'ast DocumentPreludeMatchingFunction), + ExtensionName(&'ast ExtensionName), + FamilyName(&'ast FamilyName), + Flex(&'ast Flex), + FontFeatureValuesPrelude(&'ast FontFeatureValuesPrelude), + ForgivingComplexSelector(&'ast ForgivingComplexSelector), + ForgivingRelativeSelector(&'ast ForgivingRelativeSelector), + ForgivingRelativeSelectorList(&'ast ForgivingRelativeSelectorList), + ForgivingSelectorList(&'ast ForgivingSelectorList), + Frequency(&'ast Frequency), + FrequencyPercentage(&'ast FrequencyPercentage), + Function(&'ast Function), + FunctionName(&'ast FunctionName), + GeneralEnclosed(&'ast GeneralEnclosed), + HexColor(&'ast HexColor), + Hue(&'ast Hue), + IdSelector(&'ast IdSelector), + Ident(&'ast Ident), + ImportConditions(&'ast ImportConditions), + ImportHref(&'ast ImportHref), + ImportLayerName(&'ast ImportLayerName), + ImportPrelude(&'ast ImportPrelude), + ImportantFlag(&'ast ImportantFlag), + Integer(&'ast Integer), + KeyframeBlock(&'ast KeyframeBlock), + KeyframeSelector(&'ast KeyframeSelector), + KeyframesName(&'ast KeyframesName), + KeyframesPseudoFunction(&'ast KeyframesPseudoFunction), + KeyframesPseudoPrefix(&'ast KeyframesPseudoPrefix), + LayerName(&'ast LayerName), + LayerNameList(&'ast LayerNameList), + LayerPrelude(&'ast LayerPrelude), + Length(&'ast Length), + LengthPercentage(&'ast LengthPercentage), + ListOfComponentValues(&'ast ListOfComponentValues), + MediaAnd(&'ast MediaAnd), + MediaCondition(&'ast MediaCondition), + MediaConditionAllType(&'ast MediaConditionAllType), + MediaConditionType(&'ast MediaConditionType), + MediaConditionWithoutOr(&'ast MediaConditionWithoutOr), + MediaConditionWithoutOrType(&'ast MediaConditionWithoutOrType), + MediaFeature(&'ast MediaFeature), + MediaFeatureBoolean(&'ast MediaFeatureBoolean), + MediaFeatureName(&'ast MediaFeatureName), + MediaFeaturePlain(&'ast MediaFeaturePlain), + MediaFeatureRange(&'ast MediaFeatureRange), + MediaFeatureRangeComparison(&'ast MediaFeatureRangeComparison), + MediaFeatureRangeInterval(&'ast MediaFeatureRangeInterval), + MediaFeatureValue(&'ast MediaFeatureValue), + MediaInParens(&'ast MediaInParens), + MediaNot(&'ast MediaNot), + MediaOr(&'ast MediaOr), + MediaQuery(&'ast MediaQuery), + MediaQueryList(&'ast MediaQueryList), + MediaType(&'ast MediaType), + NamedNamespace(&'ast NamedNamespace), + Namespace(&'ast Namespace), + NamespacePrefix(&'ast NamespacePrefix), + NamespacePrelude(&'ast NamespacePrelude), + NamespacePreludeUri(&'ast NamespacePreludeUri), + NestingSelector(&'ast NestingSelector), + Number(&'ast Number), + NumberType(&'ast NumberType), + PageSelector(&'ast PageSelector), + PageSelectorList(&'ast PageSelectorList), + PageSelectorPseudo(&'ast PageSelectorPseudo), + PageSelectorType(&'ast PageSelectorType), + Percentage(&'ast Percentage), + PseudoClassSelector(&'ast PseudoClassSelector), + PseudoClassSelectorChildren(&'ast PseudoClassSelectorChildren), + PseudoElementSelector(&'ast PseudoElementSelector), + PseudoElementSelectorChildren(&'ast PseudoElementSelectorChildren), + QualifiedRule(&'ast QualifiedRule), + QualifiedRulePrelude(&'ast QualifiedRulePrelude), + QueryInParens(&'ast QueryInParens), + Ratio(&'ast Ratio), + RelativeSelector(&'ast RelativeSelector), + RelativeSelectorList(&'ast RelativeSelectorList), + Resolution(&'ast Resolution), + Rule(&'ast Rule), + ScopeRange(&'ast ScopeRange), + SelectorList(&'ast SelectorList), + SequenceOfCustomIdents(&'ast SequenceOfCustomIdents), + SimpleBlock(&'ast SimpleBlock), + SizeFeature(&'ast SizeFeature), + SizeFeatureBoolean(&'ast SizeFeatureBoolean), + SizeFeatureName(&'ast SizeFeatureName), + SizeFeaturePlain(&'ast SizeFeaturePlain), + SizeFeatureRange(&'ast SizeFeatureRange), + SizeFeatureRangeComparison(&'ast SizeFeatureRangeComparison), + SizeFeatureRangeInterval(&'ast SizeFeatureRangeInterval), + SizeFeatureValue(&'ast SizeFeatureValue), + Str(&'ast Str), + StyleBlock(&'ast StyleBlock), + Stylesheet(&'ast Stylesheet), + SubclassSelector(&'ast SubclassSelector), + SupportsAnd(&'ast SupportsAnd), + SupportsCondition(&'ast SupportsCondition), + SupportsConditionType(&'ast SupportsConditionType), + SupportsFeature(&'ast SupportsFeature), + SupportsInParens(&'ast SupportsInParens), + SupportsNot(&'ast SupportsNot), + SupportsOr(&'ast SupportsOr), + TagNameSelector(&'ast TagNameSelector), + Time(&'ast Time), + TimePercentage(&'ast TimePercentage), + Token(&'ast Token), + TokenAndSpan(&'ast TokenAndSpan), + TypeSelector(&'ast TypeSelector), + UnicodeRange(&'ast UnicodeRange), + UniversalSelector(&'ast UniversalSelector), + UnknownDimension(&'ast UnknownDimension), + Url(&'ast Url), + UrlKeyValue(&'ast UrlKeyValue), + UrlModifier(&'ast UrlModifier), + UrlValue(&'ast UrlValue), + UrlValueRaw(&'ast UrlValueRaw), + WqName(&'ast WqName), +} +impl<'ast> NodeRef<'ast> { + #[allow(unreachable_patterns)] + pub fn raw_children(&'ast self) -> Box>> { + match self { + NodeRef::AbsoluteColorBase(node) => match node { + AbsoluteColorBase::HexColor(v0) => { + Box::new(::std::iter::once(NodeRef::HexColor(v0))) + } + AbsoluteColorBase::NamedColorOrTransparent(v0) => { + Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + AbsoluteColorBase::Function(v0) => { + Box::new(::std::iter::once(NodeRef::Function(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::AlphaValue(node) => match node { + AlphaValue::Number(v0) => Box::new(::std::iter::once(NodeRef::Number(v0))), + AlphaValue::Percentage(v0) => Box::new(::std::iter::once(NodeRef::Percentage(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::AnPlusB(node) => match node { + AnPlusB::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + AnPlusB::AnPlusBNotation(v0) => { + Box::new(::std::iter::once(NodeRef::AnPlusBNotation(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::AnPlusBNotation(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Angle(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Number(&node.value))) + .chain(::std::iter::once(NodeRef::Ident(&node.unit))); + Box::new(iterator) + } + NodeRef::AnglePercentage(node) => match node { + AnglePercentage::Angle(v0) => Box::new(::std::iter::once(NodeRef::Angle(v0))), + AnglePercentage::Percentage(v0) => { + Box::new(::std::iter::once(NodeRef::Percentage(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::AnyNamespace(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::AtRule(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::AtRuleName(&node.name))) + .chain(node.prelude.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::AtRulePrelude(&item)) + })) + .chain( + node.block + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::SimpleBlock(&item))), + ); + Box::new(iterator) + } + NodeRef::AtRuleName(node) => match node { + AtRuleName::DashedIdent(v0) => { + Box::new(::std::iter::once(NodeRef::DashedIdent(v0))) + } + AtRuleName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::AtRulePrelude(node) => match node { + AtRulePrelude::ListOfComponentValues(v0) => { + Box::new(::std::iter::once(NodeRef::ListOfComponentValues(v0))) + } + AtRulePrelude::CharsetPrelude(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + AtRulePrelude::PropertyPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::CustomPropertyName(v0))) + } + AtRulePrelude::CounterStylePrelude(v0) => { + Box::new(::std::iter::once(NodeRef::CustomIdent(v0))) + } + AtRulePrelude::ColorProfilePrelude(v0) => { + Box::new(::std::iter::once(NodeRef::ColorProfileName(v0))) + } + AtRulePrelude::DocumentPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::DocumentPrelude(v0))) + } + AtRulePrelude::FontPaletteValuesPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::DashedIdent(v0))) + } + AtRulePrelude::FontFeatureValuesPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::FontFeatureValuesPrelude(v0))) + } + AtRulePrelude::NestPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::SelectorList(v0))) + } + AtRulePrelude::KeyframesPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::KeyframesName(v0))) + } + AtRulePrelude::ImportPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::ImportPrelude(v0))) + } + AtRulePrelude::NamespacePrelude(v0) => { + Box::new(::std::iter::once(NodeRef::NamespacePrelude(v0))) + } + AtRulePrelude::MediaPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::MediaQueryList(v0))) + } + AtRulePrelude::SupportsPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::SupportsCondition(v0))) + } + AtRulePrelude::PagePrelude(v0) => { + Box::new(::std::iter::once(NodeRef::PageSelectorList(v0))) + } + AtRulePrelude::LayerPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::LayerPrelude(v0))) + } + AtRulePrelude::ContainerPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::ContainerCondition(v0))) + } + AtRulePrelude::CustomMediaPrelude(v0) => { + Box::new(::std::iter::once(NodeRef::CustomMediaQuery(v0))) + } + AtRulePrelude::ScopePrelude(v0) => { + Box::new(::std::iter::once(NodeRef::ScopeRange(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::AttributeSelector(node) => { + let iterator = + ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::WqName(&node.name))) + .chain(node.matcher.iter().flat_map(|item| { + ::std::iter::once(NodeRef::AttributeSelectorMatcher(&item)) + })) + .chain(node.value.iter().flat_map(|item| { + ::std::iter::once(NodeRef::AttributeSelectorValue(&item)) + })) + .chain(node.modifier.iter().flat_map(|item| { + ::std::iter::once(NodeRef::AttributeSelectorModifier(&item)) + })); + Box::new(iterator) + } + NodeRef::AttributeSelectorMatcher(node) => { + let iterator = ::std::iter::empty::>().chain(::std::iter::once( + NodeRef::AttributeSelectorMatcherValue(&node.value), + )); + Box::new(iterator) + } + NodeRef::AttributeSelectorMatcherValue(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::AttributeSelectorModifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.value))); + Box::new(iterator) + } + NodeRef::AttributeSelectorValue(node) => match node { + AttributeSelectorValue::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + AttributeSelectorValue::Ident(v0) => { + Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::BinOp(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::CalcOperator(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::CalcOperatorType(&node.value))); + Box::new(iterator) + } + NodeRef::CalcOperatorType(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::CalcProduct(node) => { + let iterator = ::std::iter::empty::>().chain( + node.expressions + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::CalcValueOrOperator(&item))), + ); + Box::new(iterator) + } + NodeRef::CalcProductOrOperator(node) => match node { + CalcProductOrOperator::Product(v0) => { + Box::new(::std::iter::once(NodeRef::CalcProduct(v0))) + } + CalcProductOrOperator::Operator(v0) => { + Box::new(::std::iter::once(NodeRef::CalcOperator(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::CalcSum(node) => { + let iterator = ::std::iter::empty::>().chain( + node.expressions + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::CalcProductOrOperator(&item))), + ); + Box::new(iterator) + } + NodeRef::CalcValue(node) => match node { + CalcValue::Number(v0) => Box::new(::std::iter::once(NodeRef::Number(v0))), + CalcValue::Dimension(v0) => Box::new(::std::iter::once(NodeRef::Dimension(v0))), + CalcValue::Percentage(v0) => Box::new(::std::iter::once(NodeRef::Percentage(v0))), + CalcValue::Constant(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + CalcValue::Sum(v0) => Box::new(::std::iter::once(NodeRef::CalcSum(v0))), + CalcValue::Function(v0) => Box::new(::std::iter::once(NodeRef::Function(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::CalcValueOrOperator(node) => match node { + CalcValueOrOperator::Value(v0) => { + Box::new(::std::iter::once(NodeRef::CalcValue(v0))) + } + CalcValueOrOperator::Operator(v0) => { + Box::new(::std::iter::once(NodeRef::CalcOperator(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ClassSelector(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.text))); + Box::new(iterator) + } + NodeRef::CmykComponent(node) => match node { + CmykComponent::Number(v0) => Box::new(::std::iter::once(NodeRef::Number(v0))), + CmykComponent::Percentage(v0) => { + Box::new(::std::iter::once(NodeRef::Percentage(v0))) + } + CmykComponent::Function(v0) => Box::new(::std::iter::once(NodeRef::Function(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Color(node) => match node { + Color::AbsoluteColorBase(v0) => { + Box::new(::std::iter::once(NodeRef::AbsoluteColorBase(v0))) + } + Color::CurrentColorOrSystemColor(v0) => { + Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + Color::Function(v0) => Box::new(::std::iter::once(NodeRef::Function(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ColorProfileName(node) => match node { + ColorProfileName::DashedIdent(v0) => { + Box::new(::std::iter::once(NodeRef::DashedIdent(v0))) + } + ColorProfileName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Combinator(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::CombinatorValue(&node.value))); + Box::new(iterator) + } + NodeRef::CombinatorValue(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ComplexSelector(node) => { + let iterator = + ::std::iter::empty::>().chain(node.children.iter().flat_map( + |item| ::std::iter::once(NodeRef::ComplexSelectorChildren(&item)), + )); + Box::new(iterator) + } + NodeRef::ComplexSelectorChildren(node) => match node { + ComplexSelectorChildren::CompoundSelector(v0) => { + Box::new(::std::iter::once(NodeRef::CompoundSelector(v0))) + } + ComplexSelectorChildren::Combinator(v0) => { + Box::new(::std::iter::once(NodeRef::Combinator(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ComponentValue(node) => match node { + ComponentValue::PreservedToken(v0) => { + Box::new(::std::iter::once(NodeRef::TokenAndSpan(v0))) + } + ComponentValue::Function(v0) => Box::new(::std::iter::once(NodeRef::Function(v0))), + ComponentValue::SimpleBlock(v0) => { + Box::new(::std::iter::once(NodeRef::SimpleBlock(v0))) + } + ComponentValue::AtRule(v0) => Box::new(::std::iter::once(NodeRef::AtRule(v0))), + ComponentValue::QualifiedRule(v0) => { + Box::new(::std::iter::once(NodeRef::QualifiedRule(v0))) + } + ComponentValue::ListOfComponentValues(v0) => { + Box::new(::std::iter::once(NodeRef::ListOfComponentValues(v0))) + } + ComponentValue::KeyframeBlock(v0) => { + Box::new(::std::iter::once(NodeRef::KeyframeBlock(v0))) + } + ComponentValue::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + ComponentValue::DashedIdent(v0) => { + Box::new(::std::iter::once(NodeRef::DashedIdent(v0))) + } + ComponentValue::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + ComponentValue::Url(v0) => Box::new(::std::iter::once(NodeRef::Url(v0))), + ComponentValue::Integer(v0) => Box::new(::std::iter::once(NodeRef::Integer(v0))), + ComponentValue::Number(v0) => Box::new(::std::iter::once(NodeRef::Number(v0))), + ComponentValue::Percentage(v0) => { + Box::new(::std::iter::once(NodeRef::Percentage(v0))) + } + ComponentValue::Dimension(v0) => { + Box::new(::std::iter::once(NodeRef::Dimension(v0))) + } + ComponentValue::LengthPercentage(v0) => { + Box::new(::std::iter::once(NodeRef::LengthPercentage(v0))) + } + ComponentValue::FrequencyPercentage(v0) => { + Box::new(::std::iter::once(NodeRef::FrequencyPercentage(v0))) + } + ComponentValue::AnglePercentage(v0) => { + Box::new(::std::iter::once(NodeRef::AnglePercentage(v0))) + } + ComponentValue::TimePercentage(v0) => { + Box::new(::std::iter::once(NodeRef::TimePercentage(v0))) + } + ComponentValue::Ratio(v0) => Box::new(::std::iter::once(NodeRef::Ratio(v0))), + ComponentValue::UnicodeRange(v0) => { + Box::new(::std::iter::once(NodeRef::UnicodeRange(v0))) + } + ComponentValue::Color(v0) => Box::new(::std::iter::once(NodeRef::Color(v0))), + ComponentValue::AlphaValue(v0) => { + Box::new(::std::iter::once(NodeRef::AlphaValue(v0))) + } + ComponentValue::Hue(v0) => Box::new(::std::iter::once(NodeRef::Hue(v0))), + ComponentValue::CmykComponent(v0) => { + Box::new(::std::iter::once(NodeRef::CmykComponent(v0))) + } + ComponentValue::Delimiter(v0) => { + Box::new(::std::iter::once(NodeRef::Delimiter(v0))) + } + ComponentValue::CalcSum(v0) => Box::new(::std::iter::once(NodeRef::CalcSum(v0))), + ComponentValue::ComplexSelector(v0) => { + Box::new(::std::iter::once(NodeRef::ComplexSelector(v0))) + } + ComponentValue::LayerName(v0) => { + Box::new(::std::iter::once(NodeRef::LayerName(v0))) + } + ComponentValue::SupportsCondition(v0) => { + Box::new(::std::iter::once(NodeRef::SupportsCondition(v0))) + } + ComponentValue::Declaration(v0) => { + Box::new(::std::iter::once(NodeRef::Declaration(v0))) + } + ComponentValue::IdSelector(v0) => { + Box::new(::std::iter::once(NodeRef::IdSelector(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::CompoundSelector(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.nesting_selector + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::NestingSelector(&item))), + ) + .chain(node.type_selector.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TypeSelector(&item)) + })) + .chain( + node.subclass_selectors + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::SubclassSelector(&item))), + ); + Box::new(iterator) + } + NodeRef::CompoundSelectorList(node) => { + let iterator = ::std::iter::empty::>().chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::CompoundSelector(&item))), + ); + Box::new(iterator) + } + NodeRef::ContainerCondition(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.name + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ContainerName(&item))), + ) + .chain(::std::iter::once(NodeRef::ContainerQuery(&node.query))); + Box::new(iterator) + } + NodeRef::ContainerName(node) => match node { + ContainerName::CustomIdent(v0) => { + Box::new(::std::iter::once(NodeRef::CustomIdent(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ContainerQuery(node) => { + let iterator = ::std::iter::empty::>().chain( + node.queries + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ContainerQueryType(&item))), + ); + Box::new(iterator) + } + NodeRef::ContainerQueryAnd(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.keyword + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain(::std::iter::once(NodeRef::QueryInParens(&node.query))); + Box::new(iterator) + } + NodeRef::ContainerQueryNot(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.keyword + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain(::std::iter::once(NodeRef::QueryInParens(&node.query))); + Box::new(iterator) + } + NodeRef::ContainerQueryOr(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.keyword + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain(::std::iter::once(NodeRef::QueryInParens(&node.query))); + Box::new(iterator) + } + NodeRef::ContainerQueryType(node) => match node { + ContainerQueryType::Not(v0) => { + Box::new(::std::iter::once(NodeRef::ContainerQueryNot(v0))) + } + ContainerQueryType::And(v0) => { + Box::new(::std::iter::once(NodeRef::ContainerQueryAnd(v0))) + } + ContainerQueryType::Or(v0) => { + Box::new(::std::iter::once(NodeRef::ContainerQueryOr(v0))) + } + ContainerQueryType::QueryInParens(v0) => { + Box::new(::std::iter::once(NodeRef::QueryInParens(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::CustomHighlightName(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::CustomIdent(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::CustomMediaQuery(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ExtensionName(&node.name))) + .chain(::std::iter::once(NodeRef::CustomMediaQueryMediaType( + &node.media, + ))); + Box::new(iterator) + } + NodeRef::CustomMediaQueryMediaType(node) => match node { + CustomMediaQueryMediaType::Ident(v0) => { + Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + CustomMediaQueryMediaType::MediaQueryList(v0) => { + Box::new(::std::iter::once(NodeRef::MediaQueryList(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::CustomPropertyName(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::DashedIdent(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Declaration(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::DeclarationName(&node.name))) + .chain( + node.value + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ComponentValue(&item))), + ) + .chain( + node.important + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ImportantFlag(&item))), + ); + Box::new(iterator) + } + NodeRef::DeclarationName(node) => match node { + DeclarationName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + DeclarationName::DashedIdent(v0) => { + Box::new(::std::iter::once(NodeRef::DashedIdent(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::DeclarationOrAtRule(node) => match node { + DeclarationOrAtRule::Declaration(v0) => { + Box::new(::std::iter::once(NodeRef::Declaration(v0))) + } + DeclarationOrAtRule::AtRule(v0) => Box::new(::std::iter::once(NodeRef::AtRule(v0))), + DeclarationOrAtRule::ListOfComponentValues(v0) => { + Box::new(::std::iter::once(NodeRef::ListOfComponentValues(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Delimiter(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::DelimiterValue(&node.value))); + Box::new(iterator) + } + NodeRef::DelimiterValue(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Dimension(node) => match node { + Dimension::Length(v0) => Box::new(::std::iter::once(NodeRef::Length(v0))), + Dimension::Angle(v0) => Box::new(::std::iter::once(NodeRef::Angle(v0))), + Dimension::Time(v0) => Box::new(::std::iter::once(NodeRef::Time(v0))), + Dimension::Frequency(v0) => Box::new(::std::iter::once(NodeRef::Frequency(v0))), + Dimension::Resolution(v0) => Box::new(::std::iter::once(NodeRef::Resolution(v0))), + Dimension::Flex(v0) => Box::new(::std::iter::once(NodeRef::Flex(v0))), + Dimension::UnknownDimension(v0) => { + Box::new(::std::iter::once(NodeRef::UnknownDimension(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::DimensionToken(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::NumberType(&node.type_flag))); + Box::new(iterator) + } + NodeRef::DocumentPrelude(node) => { + let iterator = ::std::iter::empty::>().chain( + node.matching_functions.iter().flat_map(|item| { + ::std::iter::once(NodeRef::DocumentPreludeMatchingFunction(&item)) + }), + ); + Box::new(iterator) + } + NodeRef::DocumentPreludeMatchingFunction(node) => match node { + DocumentPreludeMatchingFunction::Url(v0) => { + Box::new(::std::iter::once(NodeRef::Url(v0))) + } + DocumentPreludeMatchingFunction::Function(v0) => { + Box::new(::std::iter::once(NodeRef::Function(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ExtensionName(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::FamilyName(node) => match node { + FamilyName::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + FamilyName::SequenceOfCustomIdents(v0) => { + Box::new(::std::iter::once(NodeRef::SequenceOfCustomIdents(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Flex(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Number(&node.value))) + .chain(::std::iter::once(NodeRef::Ident(&node.unit))); + Box::new(iterator) + } + NodeRef::FontFeatureValuesPrelude(node) => { + let iterator = ::std::iter::empty::>().chain( + node.font_family + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::FamilyName(&item))), + ); + Box::new(iterator) + } + NodeRef::ForgivingComplexSelector(node) => match node { + ForgivingComplexSelector::ComplexSelector(v0) => { + Box::new(::std::iter::once(NodeRef::ComplexSelector(v0))) + } + ForgivingComplexSelector::ListOfComponentValues(v0) => { + Box::new(::std::iter::once(NodeRef::ListOfComponentValues(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ForgivingRelativeSelector(node) => match node { + ForgivingRelativeSelector::RelativeSelector(v0) => { + Box::new(::std::iter::once(NodeRef::RelativeSelector(v0))) + } + ForgivingRelativeSelector::ListOfComponentValues(v0) => { + Box::new(::std::iter::once(NodeRef::ListOfComponentValues(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ForgivingRelativeSelectorList(node) => { + let iterator = + ::std::iter::empty::>().chain(node.children.iter().flat_map( + |item| ::std::iter::once(NodeRef::ForgivingRelativeSelector(&item)), + )); + Box::new(iterator) + } + NodeRef::ForgivingSelectorList(node) => { + let iterator = + ::std::iter::empty::>().chain(node.children.iter().flat_map( + |item| ::std::iter::once(NodeRef::ForgivingComplexSelector(&item)), + )); + Box::new(iterator) + } + NodeRef::Frequency(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Number(&node.value))) + .chain(::std::iter::once(NodeRef::Ident(&node.unit))); + Box::new(iterator) + } + NodeRef::FrequencyPercentage(node) => match node { + FrequencyPercentage::Frequency(v0) => { + Box::new(::std::iter::once(NodeRef::Frequency(v0))) + } + FrequencyPercentage::Percentage(v0) => { + Box::new(::std::iter::once(NodeRef::Percentage(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Function(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::FunctionName(&node.name))) + .chain( + node.value + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ComponentValue(&item))), + ); + Box::new(iterator) + } + NodeRef::FunctionName(node) => match node { + FunctionName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + FunctionName::DashedIdent(v0) => { + Box::new(::std::iter::once(NodeRef::DashedIdent(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::GeneralEnclosed(node) => match node { + GeneralEnclosed::Function(v0) => Box::new(::std::iter::once(NodeRef::Function(v0))), + GeneralEnclosed::SimpleBlock(v0) => { + Box::new(::std::iter::once(NodeRef::SimpleBlock(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::HexColor(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Hue(node) => match node { + Hue::Number(v0) => Box::new(::std::iter::once(NodeRef::Number(v0))), + Hue::Angle(v0) => Box::new(::std::iter::once(NodeRef::Angle(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::IdSelector(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.text))); + Box::new(iterator) + } + NodeRef::Ident(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::ImportConditions(node) => { + let iterator = ::std::iter::empty::>() + .chain(node.supports.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Function(&item)) + })) + .chain(node.media.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::MediaQueryList(&item)) + })); + Box::new(iterator) + } + NodeRef::ImportHref(node) => match node { + ImportHref::Url(v0) => Box::new(::std::iter::once(NodeRef::Url(v0))), + ImportHref::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ImportLayerName(node) => match node { + ImportLayerName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + ImportLayerName::Function(v0) => Box::new(::std::iter::once(NodeRef::Function(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ImportPrelude(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.href; + ::std::iter::once(NodeRef::ImportHref(&item)) + }) + .chain(node.layer_name.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::ImportLayerName(&item)) + })) + .chain(node.import_conditions.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::ImportConditions(&item)) + })); + Box::new(iterator) + } + NodeRef::ImportantFlag(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.value))); + Box::new(iterator) + } + NodeRef::Integer(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::KeyframeBlock(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.prelude + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::KeyframeSelector(&item))), + ) + .chain(::std::iter::once(NodeRef::SimpleBlock(&node.block))); + Box::new(iterator) + } + NodeRef::KeyframeSelector(node) => match node { + KeyframeSelector::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + KeyframeSelector::Percentage(v0) => { + Box::new(::std::iter::once(NodeRef::Percentage(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::KeyframesName(node) => match node { + KeyframesName::CustomIdent(v0) => { + Box::new(::std::iter::once(NodeRef::CustomIdent(v0))) + } + KeyframesName::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + KeyframesName::PseudoPrefix(v0) => { + Box::new(::std::iter::once(NodeRef::KeyframesPseudoPrefix(v0))) + } + KeyframesName::PseudoFunction(v0) => { + Box::new(::std::iter::once(NodeRef::KeyframesPseudoFunction(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::KeyframesPseudoFunction(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.pseudo))) + .chain(::std::iter::once(NodeRef::KeyframesName(&node.name))); + Box::new(iterator) + } + NodeRef::KeyframesPseudoPrefix(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.pseudo))) + .chain(::std::iter::once(NodeRef::KeyframesName(&node.name))); + Box::new(iterator) + } + NodeRef::LayerName(node) => { + let iterator = ::std::iter::empty::>().chain( + node.name + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ); + Box::new(iterator) + } + NodeRef::LayerNameList(node) => { + let iterator = ::std::iter::empty::>().chain( + node.name_list + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::LayerName(&item))), + ); + Box::new(iterator) + } + NodeRef::LayerPrelude(node) => match node { + LayerPrelude::Name(v0) => Box::new(::std::iter::once(NodeRef::LayerName(v0))), + LayerPrelude::NameList(v0) => { + Box::new(::std::iter::once(NodeRef::LayerNameList(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Length(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Number(&node.value))) + .chain(::std::iter::once(NodeRef::Ident(&node.unit))); + Box::new(iterator) + } + NodeRef::LengthPercentage(node) => match node { + LengthPercentage::Length(v0) => Box::new(::std::iter::once(NodeRef::Length(v0))), + LengthPercentage::Percentage(v0) => { + Box::new(::std::iter::once(NodeRef::Percentage(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ListOfComponentValues(node) => { + let iterator = ::std::iter::empty::>().chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ComponentValue(&item))), + ); + Box::new(iterator) + } + NodeRef::MediaAnd(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.keyword + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain(::std::iter::once(NodeRef::MediaInParens(&node.condition))); + Box::new(iterator) + } + NodeRef::MediaCondition(node) => { + let iterator = ::std::iter::empty::>().chain( + node.conditions + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::MediaConditionAllType(&item))), + ); + Box::new(iterator) + } + NodeRef::MediaConditionAllType(node) => match node { + MediaConditionAllType::Not(v0) => { + Box::new(::std::iter::once(NodeRef::MediaNot(v0))) + } + MediaConditionAllType::And(v0) => { + Box::new(::std::iter::once(NodeRef::MediaAnd(v0))) + } + MediaConditionAllType::Or(v0) => Box::new(::std::iter::once(NodeRef::MediaOr(v0))), + MediaConditionAllType::MediaInParens(v0) => { + Box::new(::std::iter::once(NodeRef::MediaInParens(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MediaConditionType(node) => match node { + MediaConditionType::All(v0) => { + Box::new(::std::iter::once(NodeRef::MediaCondition(v0))) + } + MediaConditionType::WithoutOr(v0) => { + Box::new(::std::iter::once(NodeRef::MediaConditionWithoutOr(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MediaConditionWithoutOr(node) => { + let iterator = + ::std::iter::empty::>().chain(node.conditions.iter().flat_map( + |item| ::std::iter::once(NodeRef::MediaConditionWithoutOrType(&item)), + )); + Box::new(iterator) + } + NodeRef::MediaConditionWithoutOrType(node) => match node { + MediaConditionWithoutOrType::Not(v0) => { + Box::new(::std::iter::once(NodeRef::MediaNot(v0))) + } + MediaConditionWithoutOrType::And(v0) => { + Box::new(::std::iter::once(NodeRef::MediaAnd(v0))) + } + MediaConditionWithoutOrType::MediaInParens(v0) => { + Box::new(::std::iter::once(NodeRef::MediaInParens(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MediaFeature(node) => match node { + MediaFeature::Plain(v0) => { + Box::new(::std::iter::once(NodeRef::MediaFeaturePlain(v0))) + } + MediaFeature::Boolean(v0) => { + Box::new(::std::iter::once(NodeRef::MediaFeatureBoolean(v0))) + } + MediaFeature::Range(v0) => { + Box::new(::std::iter::once(NodeRef::MediaFeatureRange(v0))) + } + MediaFeature::RangeInterval(v0) => { + Box::new(::std::iter::once(NodeRef::MediaFeatureRangeInterval(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MediaFeatureBoolean(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::MediaFeatureName(&node.name))); + Box::new(iterator) + } + NodeRef::MediaFeatureName(node) => match node { + MediaFeatureName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + MediaFeatureName::ExtensionName(v0) => { + Box::new(::std::iter::once(NodeRef::ExtensionName(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MediaFeaturePlain(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::MediaFeatureName(&node.name))) + .chain({ + let item = &*node.value; + ::std::iter::once(NodeRef::MediaFeatureValue(&item)) + }); + Box::new(iterator) + } + NodeRef::MediaFeatureRange(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.left; + ::std::iter::once(NodeRef::MediaFeatureValue(&item)) + }) + .chain(::std::iter::once(NodeRef::MediaFeatureRangeComparison( + &node.comparison, + ))) + .chain({ + let item = &*node.right; + ::std::iter::once(NodeRef::MediaFeatureValue(&item)) + }); + Box::new(iterator) + } + NodeRef::MediaFeatureRangeComparison(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MediaFeatureRangeInterval(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.left; + ::std::iter::once(NodeRef::MediaFeatureValue(&item)) + }) + .chain(::std::iter::once(NodeRef::MediaFeatureRangeComparison( + &node.left_comparison, + ))) + .chain(::std::iter::once(NodeRef::MediaFeatureName(&node.name))) + .chain(::std::iter::once(NodeRef::MediaFeatureRangeComparison( + &node.right_comparison, + ))) + .chain({ + let item = &*node.right; + ::std::iter::once(NodeRef::MediaFeatureValue(&item)) + }); + Box::new(iterator) + } + NodeRef::MediaFeatureValue(node) => match node { + MediaFeatureValue::Number(v0) => Box::new(::std::iter::once(NodeRef::Number(v0))), + MediaFeatureValue::Dimension(v0) => { + Box::new(::std::iter::once(NodeRef::Dimension(v0))) + } + MediaFeatureValue::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + MediaFeatureValue::Ratio(v0) => Box::new(::std::iter::once(NodeRef::Ratio(v0))), + MediaFeatureValue::Function(v0) => { + Box::new(::std::iter::once(NodeRef::Function(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MediaInParens(node) => match node { + MediaInParens::MediaCondition(v0) => { + Box::new(::std::iter::once(NodeRef::MediaCondition(v0))) + } + MediaInParens::Feature(v0) => { + Box::new(::std::iter::once(NodeRef::MediaFeature(v0))) + } + MediaInParens::GeneralEnclosed(v0) => { + Box::new(::std::iter::once(NodeRef::GeneralEnclosed(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MediaNot(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.keyword + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain(::std::iter::once(NodeRef::MediaInParens(&node.condition))); + Box::new(iterator) + } + NodeRef::MediaOr(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.keyword + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain(::std::iter::once(NodeRef::MediaInParens(&node.condition))); + Box::new(iterator) + } + NodeRef::MediaQuery(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.modifier + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain( + node.media_type + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::MediaType(&item))), + ) + .chain( + node.keyword + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain(node.condition.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::MediaConditionType(&item)) + })); + Box::new(iterator) + } + NodeRef::MediaQueryList(node) => { + let iterator = ::std::iter::empty::>().chain( + node.queries + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::MediaQuery(&item))), + ); + Box::new(iterator) + } + NodeRef::MediaType(node) => match node { + MediaType::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::NamedNamespace(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.name))); + Box::new(iterator) + } + NodeRef::Namespace(node) => match node { + Namespace::Named(v0) => Box::new(::std::iter::once(NodeRef::NamedNamespace(v0))), + Namespace::Any(v0) => Box::new(::std::iter::once(NodeRef::AnyNamespace(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::NamespacePrefix(node) => { + let iterator = ::std::iter::empty::>().chain( + node.namespace + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Namespace(&item))), + ); + Box::new(iterator) + } + NodeRef::NamespacePrelude(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.prefix + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain({ + let item = &*node.uri; + ::std::iter::once(NodeRef::NamespacePreludeUri(&item)) + }); + Box::new(iterator) + } + NodeRef::NamespacePreludeUri(node) => match node { + NamespacePreludeUri::Url(v0) => Box::new(::std::iter::once(NodeRef::Url(v0))), + NamespacePreludeUri::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::NestingSelector(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Number(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::NumberType(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::PageSelector(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.page_type + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::PageSelectorType(&item))), + ) + .chain(node.pseudos.iter().flat_map(|item| { + item.iter() + .flat_map(|item| ::std::iter::once(NodeRef::PageSelectorPseudo(&item))) + })); + Box::new(iterator) + } + NodeRef::PageSelectorList(node) => { + let iterator = ::std::iter::empty::>().chain( + node.selectors + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::PageSelector(&item))), + ); + Box::new(iterator) + } + NodeRef::PageSelectorPseudo(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.value))); + Box::new(iterator) + } + NodeRef::PageSelectorType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.value))); + Box::new(iterator) + } + NodeRef::Percentage(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Number(&node.value))); + Box::new(iterator) + } + NodeRef::PseudoClassSelector(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.name))) + .chain(node.children.iter().flat_map(|item| { + item.iter().flat_map(|item| { + ::std::iter::once(NodeRef::PseudoClassSelectorChildren(&item)) + }) + })); + Box::new(iterator) + } + NodeRef::PseudoClassSelectorChildren(node) => match node { + PseudoClassSelectorChildren::PreservedToken(v0) => { + Box::new(::std::iter::once(NodeRef::TokenAndSpan(v0))) + } + PseudoClassSelectorChildren::AnPlusB(v0) => { + Box::new(::std::iter::once(NodeRef::AnPlusB(v0))) + } + PseudoClassSelectorChildren::Ident(v0) => { + Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + PseudoClassSelectorChildren::Str(v0) => { + Box::new(::std::iter::once(NodeRef::Str(v0))) + } + PseudoClassSelectorChildren::Delimiter(v0) => { + Box::new(::std::iter::once(NodeRef::Delimiter(v0))) + } + PseudoClassSelectorChildren::ComplexSelector(v0) => { + Box::new(::std::iter::once(NodeRef::ComplexSelector(v0))) + } + PseudoClassSelectorChildren::SelectorList(v0) => { + Box::new(::std::iter::once(NodeRef::SelectorList(v0))) + } + PseudoClassSelectorChildren::ForgivingSelectorList(v0) => { + Box::new(::std::iter::once(NodeRef::ForgivingSelectorList(v0))) + } + PseudoClassSelectorChildren::CompoundSelectorList(v0) => { + Box::new(::std::iter::once(NodeRef::CompoundSelectorList(v0))) + } + PseudoClassSelectorChildren::RelativeSelectorList(v0) => { + Box::new(::std::iter::once(NodeRef::RelativeSelectorList(v0))) + } + PseudoClassSelectorChildren::ForgivingRelativeSelectorList(v0) => Box::new( + ::std::iter::once(NodeRef::ForgivingRelativeSelectorList(v0)), + ), + PseudoClassSelectorChildren::CompoundSelector(v0) => { + Box::new(::std::iter::once(NodeRef::CompoundSelector(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::PseudoElementSelector(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.name))) + .chain(node.children.iter().flat_map(|item| { + item.iter().flat_map(|item| { + ::std::iter::once(NodeRef::PseudoElementSelectorChildren(&item)) + }) + })); + Box::new(iterator) + } + NodeRef::PseudoElementSelectorChildren(node) => match node { + PseudoElementSelectorChildren::PreservedToken(v0) => { + Box::new(::std::iter::once(NodeRef::TokenAndSpan(v0))) + } + PseudoElementSelectorChildren::Ident(v0) => { + Box::new(::std::iter::once(NodeRef::Ident(v0))) + } + PseudoElementSelectorChildren::CompoundSelector(v0) => { + Box::new(::std::iter::once(NodeRef::CompoundSelector(v0))) + } + PseudoElementSelectorChildren::CustomHighlightName(v0) => { + Box::new(::std::iter::once(NodeRef::CustomHighlightName(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::QualifiedRule(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::QualifiedRulePrelude( + &node.prelude, + ))) + .chain(::std::iter::once(NodeRef::SimpleBlock(&node.block))); + Box::new(iterator) + } + NodeRef::QualifiedRulePrelude(node) => match node { + QualifiedRulePrelude::SelectorList(v0) => { + Box::new(::std::iter::once(NodeRef::SelectorList(v0))) + } + QualifiedRulePrelude::RelativeSelectorList(v0) => { + Box::new(::std::iter::once(NodeRef::RelativeSelectorList(v0))) + } + QualifiedRulePrelude::ListOfComponentValues(v0) => { + Box::new(::std::iter::once(NodeRef::ListOfComponentValues(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::QueryInParens(node) => match node { + QueryInParens::ContainerQuery(v0) => { + Box::new(::std::iter::once(NodeRef::ContainerQuery(v0))) + } + QueryInParens::SizeFeature(v0) => { + Box::new(::std::iter::once(NodeRef::SizeFeature(v0))) + } + QueryInParens::GeneralEnclosed(v0) => { + Box::new(::std::iter::once(NodeRef::GeneralEnclosed(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Ratio(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Number(&node.left))) + .chain( + node.right + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Number(&item))), + ); + Box::new(iterator) + } + NodeRef::RelativeSelector(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.combinator + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Combinator(&item))), + ) + .chain(::std::iter::once(NodeRef::ComplexSelector(&node.selector))); + Box::new(iterator) + } + NodeRef::RelativeSelectorList(node) => { + let iterator = ::std::iter::empty::>().chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::RelativeSelector(&item))), + ); + Box::new(iterator) + } + NodeRef::Resolution(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Number(&node.value))) + .chain(::std::iter::once(NodeRef::Ident(&node.unit))); + Box::new(iterator) + } + NodeRef::Rule(node) => match node { + Rule::QualifiedRule(v0) => Box::new(::std::iter::once(NodeRef::QualifiedRule(v0))), + Rule::AtRule(v0) => Box::new(::std::iter::once(NodeRef::AtRule(v0))), + Rule::ListOfComponentValues(v0) => { + Box::new(::std::iter::once(NodeRef::ListOfComponentValues(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ScopeRange(node) => { + let iterator = + ::std::iter::empty::>() + .chain(node.scope_start.iter().flat_map(|item| { + ::std::iter::once(NodeRef::ForgivingSelectorList(&item)) + })) + .chain(node.scope_end.iter().flat_map(|item| { + ::std::iter::once(NodeRef::ForgivingSelectorList(&item)) + })); + Box::new(iterator) + } + NodeRef::SelectorList(node) => { + let iterator = ::std::iter::empty::>().chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ComplexSelector(&item))), + ); + Box::new(iterator) + } + NodeRef::SequenceOfCustomIdents(node) => { + let iterator = ::std::iter::empty::>().chain( + node.value + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::CustomIdent(&item))), + ); + Box::new(iterator) + } + NodeRef::SimpleBlock(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TokenAndSpan(&node.name))) + .chain( + node.value + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ComponentValue(&item))), + ); + Box::new(iterator) + } + NodeRef::SizeFeature(node) => match node { + SizeFeature::Plain(v0) => { + Box::new(::std::iter::once(NodeRef::SizeFeaturePlain(v0))) + } + SizeFeature::Boolean(v0) => { + Box::new(::std::iter::once(NodeRef::SizeFeatureBoolean(v0))) + } + SizeFeature::Range(v0) => { + Box::new(::std::iter::once(NodeRef::SizeFeatureRange(v0))) + } + SizeFeature::RangeInterval(v0) => { + Box::new(::std::iter::once(NodeRef::SizeFeatureRangeInterval(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::SizeFeatureBoolean(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::SizeFeatureName(&node.name))); + Box::new(iterator) + } + NodeRef::SizeFeatureName(node) => match node { + SizeFeatureName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::SizeFeaturePlain(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::SizeFeatureName(&node.name))) + .chain({ + let item = &*node.value; + ::std::iter::once(NodeRef::SizeFeatureValue(&item)) + }); + Box::new(iterator) + } + NodeRef::SizeFeatureRange(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.left; + ::std::iter::once(NodeRef::SizeFeatureValue(&item)) + }) + .chain(::std::iter::once(NodeRef::SizeFeatureRangeComparison( + &node.comparison, + ))) + .chain({ + let item = &*node.right; + ::std::iter::once(NodeRef::SizeFeatureValue(&item)) + }); + Box::new(iterator) + } + NodeRef::SizeFeatureRangeComparison(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::SizeFeatureRangeInterval(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.left; + ::std::iter::once(NodeRef::SizeFeatureValue(&item)) + }) + .chain(::std::iter::once(NodeRef::SizeFeatureRangeComparison( + &node.left_comparison, + ))) + .chain(::std::iter::once(NodeRef::SizeFeatureName(&node.name))) + .chain(::std::iter::once(NodeRef::SizeFeatureRangeComparison( + &node.right_comparison, + ))) + .chain({ + let item = &*node.right; + ::std::iter::once(NodeRef::SizeFeatureValue(&item)) + }); + Box::new(iterator) + } + NodeRef::SizeFeatureValue(node) => match node { + SizeFeatureValue::Number(v0) => Box::new(::std::iter::once(NodeRef::Number(v0))), + SizeFeatureValue::Dimension(v0) => { + Box::new(::std::iter::once(NodeRef::Dimension(v0))) + } + SizeFeatureValue::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + SizeFeatureValue::Ratio(v0) => Box::new(::std::iter::once(NodeRef::Ratio(v0))), + SizeFeatureValue::Function(v0) => { + Box::new(::std::iter::once(NodeRef::Function(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Str(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::StyleBlock(node) => match node { + StyleBlock::AtRule(v0) => Box::new(::std::iter::once(NodeRef::AtRule(v0))), + StyleBlock::Declaration(v0) => { + Box::new(::std::iter::once(NodeRef::Declaration(v0))) + } + StyleBlock::QualifiedRule(v0) => { + Box::new(::std::iter::once(NodeRef::QualifiedRule(v0))) + } + StyleBlock::ListOfComponentValues(v0) => { + Box::new(::std::iter::once(NodeRef::ListOfComponentValues(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Stylesheet(node) => { + let iterator = ::std::iter::empty::>().chain( + node.rules + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Rule(&item))), + ); + Box::new(iterator) + } + NodeRef::SubclassSelector(node) => match node { + SubclassSelector::Id(v0) => Box::new(::std::iter::once(NodeRef::IdSelector(v0))), + SubclassSelector::Class(v0) => { + Box::new(::std::iter::once(NodeRef::ClassSelector(v0))) + } + SubclassSelector::Attribute(v0) => { + Box::new(::std::iter::once(NodeRef::AttributeSelector(v0))) + } + SubclassSelector::PseudoClass(v0) => { + Box::new(::std::iter::once(NodeRef::PseudoClassSelector(v0))) + } + SubclassSelector::PseudoElement(v0) => { + Box::new(::std::iter::once(NodeRef::PseudoElementSelector(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::SupportsAnd(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.keyword + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain({ + let item = &*node.condition; + ::std::iter::once(NodeRef::SupportsInParens(&item)) + }); + Box::new(iterator) + } + NodeRef::SupportsCondition(node) => { + let iterator = ::std::iter::empty::>().chain( + node.conditions + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::SupportsConditionType(&item))), + ); + Box::new(iterator) + } + NodeRef::SupportsConditionType(node) => match node { + SupportsConditionType::Not(v0) => { + Box::new(::std::iter::once(NodeRef::SupportsNot(v0))) + } + SupportsConditionType::And(v0) => { + Box::new(::std::iter::once(NodeRef::SupportsAnd(v0))) + } + SupportsConditionType::Or(v0) => { + Box::new(::std::iter::once(NodeRef::SupportsOr(v0))) + } + SupportsConditionType::SupportsInParens(v0) => { + Box::new(::std::iter::once(NodeRef::SupportsInParens(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::SupportsFeature(node) => match node { + SupportsFeature::Declaration(v0) => { + Box::new(::std::iter::once(NodeRef::Declaration(v0))) + } + SupportsFeature::Function(v0) => Box::new(::std::iter::once(NodeRef::Function(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::SupportsInParens(node) => match node { + SupportsInParens::SupportsCondition(v0) => { + Box::new(::std::iter::once(NodeRef::SupportsCondition(v0))) + } + SupportsInParens::Feature(v0) => { + Box::new(::std::iter::once(NodeRef::SupportsFeature(v0))) + } + SupportsInParens::GeneralEnclosed(v0) => { + Box::new(::std::iter::once(NodeRef::GeneralEnclosed(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::SupportsNot(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.keyword + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain({ + let item = &*node.condition; + ::std::iter::once(NodeRef::SupportsInParens(&item)) + }); + Box::new(iterator) + } + NodeRef::SupportsOr(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.keyword + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain({ + let item = &*node.condition; + ::std::iter::once(NodeRef::SupportsInParens(&item)) + }); + Box::new(iterator) + } + NodeRef::TagNameSelector(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::WqName(&node.name))); + Box::new(iterator) + } + NodeRef::Time(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Number(&node.value))) + .chain(::std::iter::once(NodeRef::Ident(&node.unit))); + Box::new(iterator) + } + NodeRef::TimePercentage(node) => match node { + TimePercentage::Time(v0) => Box::new(::std::iter::once(NodeRef::Time(v0))), + TimePercentage::Percentage(v0) => { + Box::new(::std::iter::once(NodeRef::Percentage(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Token(node) => match node { + Token::Dimension(v0) => Box::new(::std::iter::once(NodeRef::DimensionToken(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TokenAndSpan(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Token(&node.token))); + Box::new(iterator) + } + NodeRef::TypeSelector(node) => match node { + TypeSelector::TagName(v0) => { + Box::new(::std::iter::once(NodeRef::TagNameSelector(v0))) + } + TypeSelector::Universal(v0) => { + Box::new(::std::iter::once(NodeRef::UniversalSelector(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::UnicodeRange(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::UniversalSelector(node) => { + let iterator = ::std::iter::empty::>().chain( + node.prefix + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::NamespacePrefix(&item))), + ); + Box::new(iterator) + } + NodeRef::UnknownDimension(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Number(&node.value))) + .chain(::std::iter::once(NodeRef::Ident(&node.unit))); + Box::new(iterator) + } + NodeRef::Url(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.name))) + .chain(node.value.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::UrlValue(&item)) + })) + .chain(node.modifiers.iter().flat_map(|item| { + item.iter() + .flat_map(|item| ::std::iter::once(NodeRef::UrlModifier(&item))) + })); + Box::new(iterator) + } + NodeRef::UrlKeyValue(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::UrlModifier(node) => match node { + UrlModifier::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + UrlModifier::Function(v0) => Box::new(::std::iter::once(NodeRef::Function(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::UrlValue(node) => match node { + UrlValue::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + UrlValue::Raw(v0) => Box::new(::std::iter::once(NodeRef::UrlValueRaw(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::UrlValueRaw(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::WqName(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.prefix + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::NamespacePrefix(&item))), + ) + .chain(::std::iter::once(NodeRef::Ident(&node.value))); + Box::new(iterator) + } + } + } +} #[cfg(any(docsrs, feature = "path"))] pub use self::fields::{AstParentKind, AstParentNodeRef}; diff --git a/crates/swc_ecma_visit/src/generated.rs b/crates/swc_ecma_visit/src/generated.rs index b8d1f79a4cafb..249cde5aa7852 100644 --- a/crates/swc_ecma_visit/src/generated.rs +++ b/crates/swc_ecma_visit/src/generated.rs @@ -140378,7 +140378,6 @@ pub mod fields { #[doc = "Represents [`YieldExpr::delegate`]"] Delegate, } - #[cfg(any(docsrs, feature = "path"))] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum AstParentKind { Accessibility(AccessibilityField), @@ -140861,7 +140860,6 @@ pub mod fields { } } } - #[cfg(any(docsrs, feature = "path"))] #[derive(Debug, Clone, Copy)] pub enum AstParentNodeRef<'ast> { Accessibility(&'ast Accessibility, AccessibilityField), @@ -141362,6 +141360,7 @@ pub mod fields { } } } + #[cfg(any(docsrs, feature = "path"))] impl<'ast> AstParentNodeRef<'ast> { #[inline] pub fn kind(&self) -> AstParentKind { @@ -141744,5 +141743,3771 @@ pub mod fields { } } } +impl<'ast> From<&'ast Accessibility> for NodeRef<'ast> { + fn from(node: &'ast Accessibility) -> Self { + NodeRef::Accessibility(node) + } +} +impl<'ast> From<&'ast ArrayLit> for NodeRef<'ast> { + fn from(node: &'ast ArrayLit) -> Self { + NodeRef::ArrayLit(node) + } +} +impl<'ast> From<&'ast ArrayPat> for NodeRef<'ast> { + fn from(node: &'ast ArrayPat) -> Self { + NodeRef::ArrayPat(node) + } +} +impl<'ast> From<&'ast ArrowExpr> for NodeRef<'ast> { + fn from(node: &'ast ArrowExpr) -> Self { + NodeRef::ArrowExpr(node) + } +} +impl<'ast> From<&'ast AssignExpr> for NodeRef<'ast> { + fn from(node: &'ast AssignExpr) -> Self { + NodeRef::AssignExpr(node) + } +} +impl<'ast> From<&'ast AssignOp> for NodeRef<'ast> { + fn from(node: &'ast AssignOp) -> Self { + NodeRef::AssignOp(node) + } +} +impl<'ast> From<&'ast AssignPat> for NodeRef<'ast> { + fn from(node: &'ast AssignPat) -> Self { + NodeRef::AssignPat(node) + } +} +impl<'ast> From<&'ast AssignPatProp> for NodeRef<'ast> { + fn from(node: &'ast AssignPatProp) -> Self { + NodeRef::AssignPatProp(node) + } +} +impl<'ast> From<&'ast AssignProp> for NodeRef<'ast> { + fn from(node: &'ast AssignProp) -> Self { + NodeRef::AssignProp(node) + } +} +impl<'ast> From<&'ast AssignTarget> for NodeRef<'ast> { + fn from(node: &'ast AssignTarget) -> Self { + NodeRef::AssignTarget(node) + } +} +impl<'ast> From<&'ast AssignTargetPat> for NodeRef<'ast> { + fn from(node: &'ast AssignTargetPat) -> Self { + NodeRef::AssignTargetPat(node) + } +} +impl<'ast> From<&'ast AutoAccessor> for NodeRef<'ast> { + fn from(node: &'ast AutoAccessor) -> Self { + NodeRef::AutoAccessor(node) + } +} +impl<'ast> From<&'ast AwaitExpr> for NodeRef<'ast> { + fn from(node: &'ast AwaitExpr) -> Self { + NodeRef::AwaitExpr(node) + } +} +impl<'ast> From<&'ast BigInt> for NodeRef<'ast> { + fn from(node: &'ast BigInt) -> Self { + NodeRef::BigInt(node) + } +} +impl<'ast> From<&'ast BinExpr> for NodeRef<'ast> { + fn from(node: &'ast BinExpr) -> Self { + NodeRef::BinExpr(node) + } +} +impl<'ast> From<&'ast BinaryOp> for NodeRef<'ast> { + fn from(node: &'ast BinaryOp) -> Self { + NodeRef::BinaryOp(node) + } +} +impl<'ast> From<&'ast BindingIdent> for NodeRef<'ast> { + fn from(node: &'ast BindingIdent) -> Self { + NodeRef::BindingIdent(node) + } +} +impl<'ast> From<&'ast BlockStmt> for NodeRef<'ast> { + fn from(node: &'ast BlockStmt) -> Self { + NodeRef::BlockStmt(node) + } +} +impl<'ast> From<&'ast BlockStmtOrExpr> for NodeRef<'ast> { + fn from(node: &'ast BlockStmtOrExpr) -> Self { + NodeRef::BlockStmtOrExpr(node) + } +} +impl<'ast> From<&'ast Bool> for NodeRef<'ast> { + fn from(node: &'ast Bool) -> Self { + NodeRef::Bool(node) + } +} +impl<'ast> From<&'ast BreakStmt> for NodeRef<'ast> { + fn from(node: &'ast BreakStmt) -> Self { + NodeRef::BreakStmt(node) + } +} +impl<'ast> From<&'ast CallExpr> for NodeRef<'ast> { + fn from(node: &'ast CallExpr) -> Self { + NodeRef::CallExpr(node) + } +} +impl<'ast> From<&'ast Callee> for NodeRef<'ast> { + fn from(node: &'ast Callee) -> Self { + NodeRef::Callee(node) + } +} +impl<'ast> From<&'ast CatchClause> for NodeRef<'ast> { + fn from(node: &'ast CatchClause) -> Self { + NodeRef::CatchClause(node) + } +} +impl<'ast> From<&'ast Class> for NodeRef<'ast> { + fn from(node: &'ast Class) -> Self { + NodeRef::Class(node) + } +} +impl<'ast> From<&'ast ClassDecl> for NodeRef<'ast> { + fn from(node: &'ast ClassDecl) -> Self { + NodeRef::ClassDecl(node) + } +} +impl<'ast> From<&'ast ClassExpr> for NodeRef<'ast> { + fn from(node: &'ast ClassExpr) -> Self { + NodeRef::ClassExpr(node) + } +} +impl<'ast> From<&'ast ClassMember> for NodeRef<'ast> { + fn from(node: &'ast ClassMember) -> Self { + NodeRef::ClassMember(node) + } +} +impl<'ast> From<&'ast ClassMethod> for NodeRef<'ast> { + fn from(node: &'ast ClassMethod) -> Self { + NodeRef::ClassMethod(node) + } +} +impl<'ast> From<&'ast ClassProp> for NodeRef<'ast> { + fn from(node: &'ast ClassProp) -> Self { + NodeRef::ClassProp(node) + } +} +impl<'ast> From<&'ast ComputedPropName> for NodeRef<'ast> { + fn from(node: &'ast ComputedPropName) -> Self { + NodeRef::ComputedPropName(node) + } +} +impl<'ast> From<&'ast CondExpr> for NodeRef<'ast> { + fn from(node: &'ast CondExpr) -> Self { + NodeRef::CondExpr(node) + } +} +impl<'ast> From<&'ast Constructor> for NodeRef<'ast> { + fn from(node: &'ast Constructor) -> Self { + NodeRef::Constructor(node) + } +} +impl<'ast> From<&'ast ContinueStmt> for NodeRef<'ast> { + fn from(node: &'ast ContinueStmt) -> Self { + NodeRef::ContinueStmt(node) + } +} +impl<'ast> From<&'ast DebuggerStmt> for NodeRef<'ast> { + fn from(node: &'ast DebuggerStmt) -> Self { + NodeRef::DebuggerStmt(node) + } +} +impl<'ast> From<&'ast Decl> for NodeRef<'ast> { + fn from(node: &'ast Decl) -> Self { + NodeRef::Decl(node) + } +} +impl<'ast> From<&'ast Decorator> for NodeRef<'ast> { + fn from(node: &'ast Decorator) -> Self { + NodeRef::Decorator(node) + } +} +impl<'ast> From<&'ast DefaultDecl> for NodeRef<'ast> { + fn from(node: &'ast DefaultDecl) -> Self { + NodeRef::DefaultDecl(node) + } +} +impl<'ast> From<&'ast DoWhileStmt> for NodeRef<'ast> { + fn from(node: &'ast DoWhileStmt) -> Self { + NodeRef::DoWhileStmt(node) + } +} +impl<'ast> From<&'ast EmptyStmt> for NodeRef<'ast> { + fn from(node: &'ast EmptyStmt) -> Self { + NodeRef::EmptyStmt(node) + } +} +impl<'ast> From<&'ast EsVersion> for NodeRef<'ast> { + fn from(node: &'ast EsVersion) -> Self { + NodeRef::EsVersion(node) + } +} +impl<'ast> From<&'ast ExportAll> for NodeRef<'ast> { + fn from(node: &'ast ExportAll) -> Self { + NodeRef::ExportAll(node) + } +} +impl<'ast> From<&'ast ExportDecl> for NodeRef<'ast> { + fn from(node: &'ast ExportDecl) -> Self { + NodeRef::ExportDecl(node) + } +} +impl<'ast> From<&'ast ExportDefaultDecl> for NodeRef<'ast> { + fn from(node: &'ast ExportDefaultDecl) -> Self { + NodeRef::ExportDefaultDecl(node) + } +} +impl<'ast> From<&'ast ExportDefaultExpr> for NodeRef<'ast> { + fn from(node: &'ast ExportDefaultExpr) -> Self { + NodeRef::ExportDefaultExpr(node) + } +} +impl<'ast> From<&'ast ExportDefaultSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ExportDefaultSpecifier) -> Self { + NodeRef::ExportDefaultSpecifier(node) + } +} +impl<'ast> From<&'ast ExportNamedSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ExportNamedSpecifier) -> Self { + NodeRef::ExportNamedSpecifier(node) + } +} +impl<'ast> From<&'ast ExportNamespaceSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ExportNamespaceSpecifier) -> Self { + NodeRef::ExportNamespaceSpecifier(node) + } +} +impl<'ast> From<&'ast ExportSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ExportSpecifier) -> Self { + NodeRef::ExportSpecifier(node) + } +} +impl<'ast> From<&'ast Expr> for NodeRef<'ast> { + fn from(node: &'ast Expr) -> Self { + NodeRef::Expr(node) + } +} +impl<'ast> From<&'ast ExprOrSpread> for NodeRef<'ast> { + fn from(node: &'ast ExprOrSpread) -> Self { + NodeRef::ExprOrSpread(node) + } +} +impl<'ast> From<&'ast ExprStmt> for NodeRef<'ast> { + fn from(node: &'ast ExprStmt) -> Self { + NodeRef::ExprStmt(node) + } +} +impl<'ast> From<&'ast FnDecl> for NodeRef<'ast> { + fn from(node: &'ast FnDecl) -> Self { + NodeRef::FnDecl(node) + } +} +impl<'ast> From<&'ast FnExpr> for NodeRef<'ast> { + fn from(node: &'ast FnExpr) -> Self { + NodeRef::FnExpr(node) + } +} +impl<'ast> From<&'ast ForHead> for NodeRef<'ast> { + fn from(node: &'ast ForHead) -> Self { + NodeRef::ForHead(node) + } +} +impl<'ast> From<&'ast ForInStmt> for NodeRef<'ast> { + fn from(node: &'ast ForInStmt) -> Self { + NodeRef::ForInStmt(node) + } +} +impl<'ast> From<&'ast ForOfStmt> for NodeRef<'ast> { + fn from(node: &'ast ForOfStmt) -> Self { + NodeRef::ForOfStmt(node) + } +} +impl<'ast> From<&'ast ForStmt> for NodeRef<'ast> { + fn from(node: &'ast ForStmt) -> Self { + NodeRef::ForStmt(node) + } +} +impl<'ast> From<&'ast Function> for NodeRef<'ast> { + fn from(node: &'ast Function) -> Self { + NodeRef::Function(node) + } +} +impl<'ast> From<&'ast GetterProp> for NodeRef<'ast> { + fn from(node: &'ast GetterProp) -> Self { + NodeRef::GetterProp(node) + } +} +impl<'ast> From<&'ast Ident> for NodeRef<'ast> { + fn from(node: &'ast Ident) -> Self { + NodeRef::Ident(node) + } +} +impl<'ast> From<&'ast IdentName> for NodeRef<'ast> { + fn from(node: &'ast IdentName) -> Self { + NodeRef::IdentName(node) + } +} +impl<'ast> From<&'ast IfStmt> for NodeRef<'ast> { + fn from(node: &'ast IfStmt) -> Self { + NodeRef::IfStmt(node) + } +} +impl<'ast> From<&'ast Import> for NodeRef<'ast> { + fn from(node: &'ast Import) -> Self { + NodeRef::Import(node) + } +} +impl<'ast> From<&'ast ImportDecl> for NodeRef<'ast> { + fn from(node: &'ast ImportDecl) -> Self { + NodeRef::ImportDecl(node) + } +} +impl<'ast> From<&'ast ImportDefaultSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ImportDefaultSpecifier) -> Self { + NodeRef::ImportDefaultSpecifier(node) + } +} +impl<'ast> From<&'ast ImportNamedSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ImportNamedSpecifier) -> Self { + NodeRef::ImportNamedSpecifier(node) + } +} +impl<'ast> From<&'ast ImportPhase> for NodeRef<'ast> { + fn from(node: &'ast ImportPhase) -> Self { + NodeRef::ImportPhase(node) + } +} +impl<'ast> From<&'ast ImportSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ImportSpecifier) -> Self { + NodeRef::ImportSpecifier(node) + } +} +impl<'ast> From<&'ast ImportStarAsSpecifier> for NodeRef<'ast> { + fn from(node: &'ast ImportStarAsSpecifier) -> Self { + NodeRef::ImportStarAsSpecifier(node) + } +} +impl<'ast> From<&'ast ImportWith> for NodeRef<'ast> { + fn from(node: &'ast ImportWith) -> Self { + NodeRef::ImportWith(node) + } +} +impl<'ast> From<&'ast ImportWithItem> for NodeRef<'ast> { + fn from(node: &'ast ImportWithItem) -> Self { + NodeRef::ImportWithItem(node) + } +} +impl<'ast> From<&'ast Invalid> for NodeRef<'ast> { + fn from(node: &'ast Invalid) -> Self { + NodeRef::Invalid(node) + } +} +impl<'ast> From<&'ast JSXAttr> for NodeRef<'ast> { + fn from(node: &'ast JSXAttr) -> Self { + NodeRef::JSXAttr(node) + } +} +impl<'ast> From<&'ast JSXAttrName> for NodeRef<'ast> { + fn from(node: &'ast JSXAttrName) -> Self { + NodeRef::JSXAttrName(node) + } +} +impl<'ast> From<&'ast JSXAttrOrSpread> for NodeRef<'ast> { + fn from(node: &'ast JSXAttrOrSpread) -> Self { + NodeRef::JSXAttrOrSpread(node) + } +} +impl<'ast> From<&'ast JSXAttrValue> for NodeRef<'ast> { + fn from(node: &'ast JSXAttrValue) -> Self { + NodeRef::JSXAttrValue(node) + } +} +impl<'ast> From<&'ast JSXClosingElement> for NodeRef<'ast> { + fn from(node: &'ast JSXClosingElement) -> Self { + NodeRef::JSXClosingElement(node) + } +} +impl<'ast> From<&'ast JSXClosingFragment> for NodeRef<'ast> { + fn from(node: &'ast JSXClosingFragment) -> Self { + NodeRef::JSXClosingFragment(node) + } +} +impl<'ast> From<&'ast JSXElement> for NodeRef<'ast> { + fn from(node: &'ast JSXElement) -> Self { + NodeRef::JSXElement(node) + } +} +impl<'ast> From<&'ast JSXElementChild> for NodeRef<'ast> { + fn from(node: &'ast JSXElementChild) -> Self { + NodeRef::JSXElementChild(node) + } +} +impl<'ast> From<&'ast JSXElementName> for NodeRef<'ast> { + fn from(node: &'ast JSXElementName) -> Self { + NodeRef::JSXElementName(node) + } +} +impl<'ast> From<&'ast JSXEmptyExpr> for NodeRef<'ast> { + fn from(node: &'ast JSXEmptyExpr) -> Self { + NodeRef::JSXEmptyExpr(node) + } +} +impl<'ast> From<&'ast JSXExpr> for NodeRef<'ast> { + fn from(node: &'ast JSXExpr) -> Self { + NodeRef::JSXExpr(node) + } +} +impl<'ast> From<&'ast JSXExprContainer> for NodeRef<'ast> { + fn from(node: &'ast JSXExprContainer) -> Self { + NodeRef::JSXExprContainer(node) + } +} +impl<'ast> From<&'ast JSXFragment> for NodeRef<'ast> { + fn from(node: &'ast JSXFragment) -> Self { + NodeRef::JSXFragment(node) + } +} +impl<'ast> From<&'ast JSXMemberExpr> for NodeRef<'ast> { + fn from(node: &'ast JSXMemberExpr) -> Self { + NodeRef::JSXMemberExpr(node) + } +} +impl<'ast> From<&'ast JSXNamespacedName> for NodeRef<'ast> { + fn from(node: &'ast JSXNamespacedName) -> Self { + NodeRef::JSXNamespacedName(node) + } +} +impl<'ast> From<&'ast JSXObject> for NodeRef<'ast> { + fn from(node: &'ast JSXObject) -> Self { + NodeRef::JSXObject(node) + } +} +impl<'ast> From<&'ast JSXOpeningElement> for NodeRef<'ast> { + fn from(node: &'ast JSXOpeningElement) -> Self { + NodeRef::JSXOpeningElement(node) + } +} +impl<'ast> From<&'ast JSXOpeningFragment> for NodeRef<'ast> { + fn from(node: &'ast JSXOpeningFragment) -> Self { + NodeRef::JSXOpeningFragment(node) + } +} +impl<'ast> From<&'ast JSXSpreadChild> for NodeRef<'ast> { + fn from(node: &'ast JSXSpreadChild) -> Self { + NodeRef::JSXSpreadChild(node) + } +} +impl<'ast> From<&'ast JSXText> for NodeRef<'ast> { + fn from(node: &'ast JSXText) -> Self { + NodeRef::JSXText(node) + } +} +impl<'ast> From<&'ast Key> for NodeRef<'ast> { + fn from(node: &'ast Key) -> Self { + NodeRef::Key(node) + } +} +impl<'ast> From<&'ast KeyValuePatProp> for NodeRef<'ast> { + fn from(node: &'ast KeyValuePatProp) -> Self { + NodeRef::KeyValuePatProp(node) + } +} +impl<'ast> From<&'ast KeyValueProp> for NodeRef<'ast> { + fn from(node: &'ast KeyValueProp) -> Self { + NodeRef::KeyValueProp(node) + } +} +impl<'ast> From<&'ast LabeledStmt> for NodeRef<'ast> { + fn from(node: &'ast LabeledStmt) -> Self { + NodeRef::LabeledStmt(node) + } +} +impl<'ast> From<&'ast Lit> for NodeRef<'ast> { + fn from(node: &'ast Lit) -> Self { + NodeRef::Lit(node) + } +} +impl<'ast> From<&'ast MemberExpr> for NodeRef<'ast> { + fn from(node: &'ast MemberExpr) -> Self { + NodeRef::MemberExpr(node) + } +} +impl<'ast> From<&'ast MemberProp> for NodeRef<'ast> { + fn from(node: &'ast MemberProp) -> Self { + NodeRef::MemberProp(node) + } +} +impl<'ast> From<&'ast MetaPropExpr> for NodeRef<'ast> { + fn from(node: &'ast MetaPropExpr) -> Self { + NodeRef::MetaPropExpr(node) + } +} +impl<'ast> From<&'ast MetaPropKind> for NodeRef<'ast> { + fn from(node: &'ast MetaPropKind) -> Self { + NodeRef::MetaPropKind(node) + } +} +impl<'ast> From<&'ast MethodKind> for NodeRef<'ast> { + fn from(node: &'ast MethodKind) -> Self { + NodeRef::MethodKind(node) + } +} +impl<'ast> From<&'ast MethodProp> for NodeRef<'ast> { + fn from(node: &'ast MethodProp) -> Self { + NodeRef::MethodProp(node) + } +} +impl<'ast> From<&'ast Module> for NodeRef<'ast> { + fn from(node: &'ast Module) -> Self { + NodeRef::Module(node) + } +} +impl<'ast> From<&'ast ModuleDecl> for NodeRef<'ast> { + fn from(node: &'ast ModuleDecl) -> Self { + NodeRef::ModuleDecl(node) + } +} +impl<'ast> From<&'ast ModuleExportName> for NodeRef<'ast> { + fn from(node: &'ast ModuleExportName) -> Self { + NodeRef::ModuleExportName(node) + } +} +impl<'ast> From<&'ast ModuleItem> for NodeRef<'ast> { + fn from(node: &'ast ModuleItem) -> Self { + NodeRef::ModuleItem(node) + } +} +impl<'ast> From<&'ast NamedExport> for NodeRef<'ast> { + fn from(node: &'ast NamedExport) -> Self { + NodeRef::NamedExport(node) + } +} +impl<'ast> From<&'ast NewExpr> for NodeRef<'ast> { + fn from(node: &'ast NewExpr) -> Self { + NodeRef::NewExpr(node) + } +} +impl<'ast> From<&'ast Null> for NodeRef<'ast> { + fn from(node: &'ast Null) -> Self { + NodeRef::Null(node) + } +} +impl<'ast> From<&'ast Number> for NodeRef<'ast> { + fn from(node: &'ast Number) -> Self { + NodeRef::Number(node) + } +} +impl<'ast> From<&'ast ObjectLit> for NodeRef<'ast> { + fn from(node: &'ast ObjectLit) -> Self { + NodeRef::ObjectLit(node) + } +} +impl<'ast> From<&'ast ObjectPat> for NodeRef<'ast> { + fn from(node: &'ast ObjectPat) -> Self { + NodeRef::ObjectPat(node) + } +} +impl<'ast> From<&'ast ObjectPatProp> for NodeRef<'ast> { + fn from(node: &'ast ObjectPatProp) -> Self { + NodeRef::ObjectPatProp(node) + } +} +impl<'ast> From<&'ast OptCall> for NodeRef<'ast> { + fn from(node: &'ast OptCall) -> Self { + NodeRef::OptCall(node) + } +} +impl<'ast> From<&'ast OptChainBase> for NodeRef<'ast> { + fn from(node: &'ast OptChainBase) -> Self { + NodeRef::OptChainBase(node) + } +} +impl<'ast> From<&'ast OptChainExpr> for NodeRef<'ast> { + fn from(node: &'ast OptChainExpr) -> Self { + NodeRef::OptChainExpr(node) + } +} +impl<'ast> From<&'ast Param> for NodeRef<'ast> { + fn from(node: &'ast Param) -> Self { + NodeRef::Param(node) + } +} +impl<'ast> From<&'ast ParamOrTsParamProp> for NodeRef<'ast> { + fn from(node: &'ast ParamOrTsParamProp) -> Self { + NodeRef::ParamOrTsParamProp(node) + } +} +impl<'ast> From<&'ast ParenExpr> for NodeRef<'ast> { + fn from(node: &'ast ParenExpr) -> Self { + NodeRef::ParenExpr(node) + } +} +impl<'ast> From<&'ast Pat> for NodeRef<'ast> { + fn from(node: &'ast Pat) -> Self { + NodeRef::Pat(node) + } +} +impl<'ast> From<&'ast PrivateMethod> for NodeRef<'ast> { + fn from(node: &'ast PrivateMethod) -> Self { + NodeRef::PrivateMethod(node) + } +} +impl<'ast> From<&'ast PrivateName> for NodeRef<'ast> { + fn from(node: &'ast PrivateName) -> Self { + NodeRef::PrivateName(node) + } +} +impl<'ast> From<&'ast PrivateProp> for NodeRef<'ast> { + fn from(node: &'ast PrivateProp) -> Self { + NodeRef::PrivateProp(node) + } +} +impl<'ast> From<&'ast Program> for NodeRef<'ast> { + fn from(node: &'ast Program) -> Self { + NodeRef::Program(node) + } +} +impl<'ast> From<&'ast Prop> for NodeRef<'ast> { + fn from(node: &'ast Prop) -> Self { + NodeRef::Prop(node) + } +} +impl<'ast> From<&'ast PropName> for NodeRef<'ast> { + fn from(node: &'ast PropName) -> Self { + NodeRef::PropName(node) + } +} +impl<'ast> From<&'ast PropOrSpread> for NodeRef<'ast> { + fn from(node: &'ast PropOrSpread) -> Self { + NodeRef::PropOrSpread(node) + } +} +impl<'ast> From<&'ast Regex> for NodeRef<'ast> { + fn from(node: &'ast Regex) -> Self { + NodeRef::Regex(node) + } +} +impl<'ast> From<&'ast RestPat> for NodeRef<'ast> { + fn from(node: &'ast RestPat) -> Self { + NodeRef::RestPat(node) + } +} +impl<'ast> From<&'ast ReturnStmt> for NodeRef<'ast> { + fn from(node: &'ast ReturnStmt) -> Self { + NodeRef::ReturnStmt(node) + } +} +impl<'ast> From<&'ast Script> for NodeRef<'ast> { + fn from(node: &'ast Script) -> Self { + NodeRef::Script(node) + } +} +impl<'ast> From<&'ast SeqExpr> for NodeRef<'ast> { + fn from(node: &'ast SeqExpr) -> Self { + NodeRef::SeqExpr(node) + } +} +impl<'ast> From<&'ast SetterProp> for NodeRef<'ast> { + fn from(node: &'ast SetterProp) -> Self { + NodeRef::SetterProp(node) + } +} +impl<'ast> From<&'ast SimpleAssignTarget> for NodeRef<'ast> { + fn from(node: &'ast SimpleAssignTarget) -> Self { + NodeRef::SimpleAssignTarget(node) + } +} +impl<'ast> From<&'ast SpreadElement> for NodeRef<'ast> { + fn from(node: &'ast SpreadElement) -> Self { + NodeRef::SpreadElement(node) + } +} +impl<'ast> From<&'ast StaticBlock> for NodeRef<'ast> { + fn from(node: &'ast StaticBlock) -> Self { + NodeRef::StaticBlock(node) + } +} +impl<'ast> From<&'ast Stmt> for NodeRef<'ast> { + fn from(node: &'ast Stmt) -> Self { + NodeRef::Stmt(node) + } +} +impl<'ast> From<&'ast Str> for NodeRef<'ast> { + fn from(node: &'ast Str) -> Self { + NodeRef::Str(node) + } +} +impl<'ast> From<&'ast Super> for NodeRef<'ast> { + fn from(node: &'ast Super) -> Self { + NodeRef::Super(node) + } +} +impl<'ast> From<&'ast SuperProp> for NodeRef<'ast> { + fn from(node: &'ast SuperProp) -> Self { + NodeRef::SuperProp(node) + } +} +impl<'ast> From<&'ast SuperPropExpr> for NodeRef<'ast> { + fn from(node: &'ast SuperPropExpr) -> Self { + NodeRef::SuperPropExpr(node) + } +} +impl<'ast> From<&'ast SwitchCase> for NodeRef<'ast> { + fn from(node: &'ast SwitchCase) -> Self { + NodeRef::SwitchCase(node) + } +} +impl<'ast> From<&'ast SwitchStmt> for NodeRef<'ast> { + fn from(node: &'ast SwitchStmt) -> Self { + NodeRef::SwitchStmt(node) + } +} +impl<'ast> From<&'ast TaggedTpl> for NodeRef<'ast> { + fn from(node: &'ast TaggedTpl) -> Self { + NodeRef::TaggedTpl(node) + } +} +impl<'ast> From<&'ast ThisExpr> for NodeRef<'ast> { + fn from(node: &'ast ThisExpr) -> Self { + NodeRef::ThisExpr(node) + } +} +impl<'ast> From<&'ast ThrowStmt> for NodeRef<'ast> { + fn from(node: &'ast ThrowStmt) -> Self { + NodeRef::ThrowStmt(node) + } +} +impl<'ast> From<&'ast Tpl> for NodeRef<'ast> { + fn from(node: &'ast Tpl) -> Self { + NodeRef::Tpl(node) + } +} +impl<'ast> From<&'ast TplElement> for NodeRef<'ast> { + fn from(node: &'ast TplElement) -> Self { + NodeRef::TplElement(node) + } +} +impl<'ast> From<&'ast TruePlusMinus> for NodeRef<'ast> { + fn from(node: &'ast TruePlusMinus) -> Self { + NodeRef::TruePlusMinus(node) + } +} +impl<'ast> From<&'ast TryStmt> for NodeRef<'ast> { + fn from(node: &'ast TryStmt) -> Self { + NodeRef::TryStmt(node) + } +} +impl<'ast> From<&'ast TsArrayType> for NodeRef<'ast> { + fn from(node: &'ast TsArrayType) -> Self { + NodeRef::TsArrayType(node) + } +} +impl<'ast> From<&'ast TsAsExpr> for NodeRef<'ast> { + fn from(node: &'ast TsAsExpr) -> Self { + NodeRef::TsAsExpr(node) + } +} +impl<'ast> From<&'ast TsCallSignatureDecl> for NodeRef<'ast> { + fn from(node: &'ast TsCallSignatureDecl) -> Self { + NodeRef::TsCallSignatureDecl(node) + } +} +impl<'ast> From<&'ast TsConditionalType> for NodeRef<'ast> { + fn from(node: &'ast TsConditionalType) -> Self { + NodeRef::TsConditionalType(node) + } +} +impl<'ast> From<&'ast TsConstAssertion> for NodeRef<'ast> { + fn from(node: &'ast TsConstAssertion) -> Self { + NodeRef::TsConstAssertion(node) + } +} +impl<'ast> From<&'ast TsConstructSignatureDecl> for NodeRef<'ast> { + fn from(node: &'ast TsConstructSignatureDecl) -> Self { + NodeRef::TsConstructSignatureDecl(node) + } +} +impl<'ast> From<&'ast TsConstructorType> for NodeRef<'ast> { + fn from(node: &'ast TsConstructorType) -> Self { + NodeRef::TsConstructorType(node) + } +} +impl<'ast> From<&'ast TsEntityName> for NodeRef<'ast> { + fn from(node: &'ast TsEntityName) -> Self { + NodeRef::TsEntityName(node) + } +} +impl<'ast> From<&'ast TsEnumDecl> for NodeRef<'ast> { + fn from(node: &'ast TsEnumDecl) -> Self { + NodeRef::TsEnumDecl(node) + } +} +impl<'ast> From<&'ast TsEnumMember> for NodeRef<'ast> { + fn from(node: &'ast TsEnumMember) -> Self { + NodeRef::TsEnumMember(node) + } +} +impl<'ast> From<&'ast TsEnumMemberId> for NodeRef<'ast> { + fn from(node: &'ast TsEnumMemberId) -> Self { + NodeRef::TsEnumMemberId(node) + } +} +impl<'ast> From<&'ast TsExportAssignment> for NodeRef<'ast> { + fn from(node: &'ast TsExportAssignment) -> Self { + NodeRef::TsExportAssignment(node) + } +} +impl<'ast> From<&'ast TsExprWithTypeArgs> for NodeRef<'ast> { + fn from(node: &'ast TsExprWithTypeArgs) -> Self { + NodeRef::TsExprWithTypeArgs(node) + } +} +impl<'ast> From<&'ast TsExternalModuleRef> for NodeRef<'ast> { + fn from(node: &'ast TsExternalModuleRef) -> Self { + NodeRef::TsExternalModuleRef(node) + } +} +impl<'ast> From<&'ast TsFnOrConstructorType> for NodeRef<'ast> { + fn from(node: &'ast TsFnOrConstructorType) -> Self { + NodeRef::TsFnOrConstructorType(node) + } +} +impl<'ast> From<&'ast TsFnParam> for NodeRef<'ast> { + fn from(node: &'ast TsFnParam) -> Self { + NodeRef::TsFnParam(node) + } +} +impl<'ast> From<&'ast TsFnType> for NodeRef<'ast> { + fn from(node: &'ast TsFnType) -> Self { + NodeRef::TsFnType(node) + } +} +impl<'ast> From<&'ast TsGetterSignature> for NodeRef<'ast> { + fn from(node: &'ast TsGetterSignature) -> Self { + NodeRef::TsGetterSignature(node) + } +} +impl<'ast> From<&'ast TsImportEqualsDecl> for NodeRef<'ast> { + fn from(node: &'ast TsImportEqualsDecl) -> Self { + NodeRef::TsImportEqualsDecl(node) + } +} +impl<'ast> From<&'ast TsImportType> for NodeRef<'ast> { + fn from(node: &'ast TsImportType) -> Self { + NodeRef::TsImportType(node) + } +} +impl<'ast> From<&'ast TsIndexSignature> for NodeRef<'ast> { + fn from(node: &'ast TsIndexSignature) -> Self { + NodeRef::TsIndexSignature(node) + } +} +impl<'ast> From<&'ast TsIndexedAccessType> for NodeRef<'ast> { + fn from(node: &'ast TsIndexedAccessType) -> Self { + NodeRef::TsIndexedAccessType(node) + } +} +impl<'ast> From<&'ast TsInferType> for NodeRef<'ast> { + fn from(node: &'ast TsInferType) -> Self { + NodeRef::TsInferType(node) + } +} +impl<'ast> From<&'ast TsInstantiation> for NodeRef<'ast> { + fn from(node: &'ast TsInstantiation) -> Self { + NodeRef::TsInstantiation(node) + } +} +impl<'ast> From<&'ast TsInterfaceBody> for NodeRef<'ast> { + fn from(node: &'ast TsInterfaceBody) -> Self { + NodeRef::TsInterfaceBody(node) + } +} +impl<'ast> From<&'ast TsInterfaceDecl> for NodeRef<'ast> { + fn from(node: &'ast TsInterfaceDecl) -> Self { + NodeRef::TsInterfaceDecl(node) + } +} +impl<'ast> From<&'ast TsIntersectionType> for NodeRef<'ast> { + fn from(node: &'ast TsIntersectionType) -> Self { + NodeRef::TsIntersectionType(node) + } +} +impl<'ast> From<&'ast TsKeywordType> for NodeRef<'ast> { + fn from(node: &'ast TsKeywordType) -> Self { + NodeRef::TsKeywordType(node) + } +} +impl<'ast> From<&'ast TsKeywordTypeKind> for NodeRef<'ast> { + fn from(node: &'ast TsKeywordTypeKind) -> Self { + NodeRef::TsKeywordTypeKind(node) + } +} +impl<'ast> From<&'ast TsLit> for NodeRef<'ast> { + fn from(node: &'ast TsLit) -> Self { + NodeRef::TsLit(node) + } +} +impl<'ast> From<&'ast TsLitType> for NodeRef<'ast> { + fn from(node: &'ast TsLitType) -> Self { + NodeRef::TsLitType(node) + } +} +impl<'ast> From<&'ast TsMappedType> for NodeRef<'ast> { + fn from(node: &'ast TsMappedType) -> Self { + NodeRef::TsMappedType(node) + } +} +impl<'ast> From<&'ast TsMethodSignature> for NodeRef<'ast> { + fn from(node: &'ast TsMethodSignature) -> Self { + NodeRef::TsMethodSignature(node) + } +} +impl<'ast> From<&'ast TsModuleBlock> for NodeRef<'ast> { + fn from(node: &'ast TsModuleBlock) -> Self { + NodeRef::TsModuleBlock(node) + } +} +impl<'ast> From<&'ast TsModuleDecl> for NodeRef<'ast> { + fn from(node: &'ast TsModuleDecl) -> Self { + NodeRef::TsModuleDecl(node) + } +} +impl<'ast> From<&'ast TsModuleName> for NodeRef<'ast> { + fn from(node: &'ast TsModuleName) -> Self { + NodeRef::TsModuleName(node) + } +} +impl<'ast> From<&'ast TsModuleRef> for NodeRef<'ast> { + fn from(node: &'ast TsModuleRef) -> Self { + NodeRef::TsModuleRef(node) + } +} +impl<'ast> From<&'ast TsNamespaceBody> for NodeRef<'ast> { + fn from(node: &'ast TsNamespaceBody) -> Self { + NodeRef::TsNamespaceBody(node) + } +} +impl<'ast> From<&'ast TsNamespaceDecl> for NodeRef<'ast> { + fn from(node: &'ast TsNamespaceDecl) -> Self { + NodeRef::TsNamespaceDecl(node) + } +} +impl<'ast> From<&'ast TsNamespaceExportDecl> for NodeRef<'ast> { + fn from(node: &'ast TsNamespaceExportDecl) -> Self { + NodeRef::TsNamespaceExportDecl(node) + } +} +impl<'ast> From<&'ast TsNonNullExpr> for NodeRef<'ast> { + fn from(node: &'ast TsNonNullExpr) -> Self { + NodeRef::TsNonNullExpr(node) + } +} +impl<'ast> From<&'ast TsOptionalType> for NodeRef<'ast> { + fn from(node: &'ast TsOptionalType) -> Self { + NodeRef::TsOptionalType(node) + } +} +impl<'ast> From<&'ast TsParamProp> for NodeRef<'ast> { + fn from(node: &'ast TsParamProp) -> Self { + NodeRef::TsParamProp(node) + } +} +impl<'ast> From<&'ast TsParamPropParam> for NodeRef<'ast> { + fn from(node: &'ast TsParamPropParam) -> Self { + NodeRef::TsParamPropParam(node) + } +} +impl<'ast> From<&'ast TsParenthesizedType> for NodeRef<'ast> { + fn from(node: &'ast TsParenthesizedType) -> Self { + NodeRef::TsParenthesizedType(node) + } +} +impl<'ast> From<&'ast TsPropertySignature> for NodeRef<'ast> { + fn from(node: &'ast TsPropertySignature) -> Self { + NodeRef::TsPropertySignature(node) + } +} +impl<'ast> From<&'ast TsQualifiedName> for NodeRef<'ast> { + fn from(node: &'ast TsQualifiedName) -> Self { + NodeRef::TsQualifiedName(node) + } +} +impl<'ast> From<&'ast TsRestType> for NodeRef<'ast> { + fn from(node: &'ast TsRestType) -> Self { + NodeRef::TsRestType(node) + } +} +impl<'ast> From<&'ast TsSatisfiesExpr> for NodeRef<'ast> { + fn from(node: &'ast TsSatisfiesExpr) -> Self { + NodeRef::TsSatisfiesExpr(node) + } +} +impl<'ast> From<&'ast TsSetterSignature> for NodeRef<'ast> { + fn from(node: &'ast TsSetterSignature) -> Self { + NodeRef::TsSetterSignature(node) + } +} +impl<'ast> From<&'ast TsThisType> for NodeRef<'ast> { + fn from(node: &'ast TsThisType) -> Self { + NodeRef::TsThisType(node) + } +} +impl<'ast> From<&'ast TsThisTypeOrIdent> for NodeRef<'ast> { + fn from(node: &'ast TsThisTypeOrIdent) -> Self { + NodeRef::TsThisTypeOrIdent(node) + } +} +impl<'ast> From<&'ast TsTplLitType> for NodeRef<'ast> { + fn from(node: &'ast TsTplLitType) -> Self { + NodeRef::TsTplLitType(node) + } +} +impl<'ast> From<&'ast TsTupleElement> for NodeRef<'ast> { + fn from(node: &'ast TsTupleElement) -> Self { + NodeRef::TsTupleElement(node) + } +} +impl<'ast> From<&'ast TsTupleType> for NodeRef<'ast> { + fn from(node: &'ast TsTupleType) -> Self { + NodeRef::TsTupleType(node) + } +} +impl<'ast> From<&'ast TsType> for NodeRef<'ast> { + fn from(node: &'ast TsType) -> Self { + NodeRef::TsType(node) + } +} +impl<'ast> From<&'ast TsTypeAliasDecl> for NodeRef<'ast> { + fn from(node: &'ast TsTypeAliasDecl) -> Self { + NodeRef::TsTypeAliasDecl(node) + } +} +impl<'ast> From<&'ast TsTypeAnn> for NodeRef<'ast> { + fn from(node: &'ast TsTypeAnn) -> Self { + NodeRef::TsTypeAnn(node) + } +} +impl<'ast> From<&'ast TsTypeAssertion> for NodeRef<'ast> { + fn from(node: &'ast TsTypeAssertion) -> Self { + NodeRef::TsTypeAssertion(node) + } +} +impl<'ast> From<&'ast TsTypeElement> for NodeRef<'ast> { + fn from(node: &'ast TsTypeElement) -> Self { + NodeRef::TsTypeElement(node) + } +} +impl<'ast> From<&'ast TsTypeLit> for NodeRef<'ast> { + fn from(node: &'ast TsTypeLit) -> Self { + NodeRef::TsTypeLit(node) + } +} +impl<'ast> From<&'ast TsTypeOperator> for NodeRef<'ast> { + fn from(node: &'ast TsTypeOperator) -> Self { + NodeRef::TsTypeOperator(node) + } +} +impl<'ast> From<&'ast TsTypeOperatorOp> for NodeRef<'ast> { + fn from(node: &'ast TsTypeOperatorOp) -> Self { + NodeRef::TsTypeOperatorOp(node) + } +} +impl<'ast> From<&'ast TsTypeParam> for NodeRef<'ast> { + fn from(node: &'ast TsTypeParam) -> Self { + NodeRef::TsTypeParam(node) + } +} +impl<'ast> From<&'ast TsTypeParamDecl> for NodeRef<'ast> { + fn from(node: &'ast TsTypeParamDecl) -> Self { + NodeRef::TsTypeParamDecl(node) + } +} +impl<'ast> From<&'ast TsTypeParamInstantiation> for NodeRef<'ast> { + fn from(node: &'ast TsTypeParamInstantiation) -> Self { + NodeRef::TsTypeParamInstantiation(node) + } +} +impl<'ast> From<&'ast TsTypePredicate> for NodeRef<'ast> { + fn from(node: &'ast TsTypePredicate) -> Self { + NodeRef::TsTypePredicate(node) + } +} +impl<'ast> From<&'ast TsTypeQuery> for NodeRef<'ast> { + fn from(node: &'ast TsTypeQuery) -> Self { + NodeRef::TsTypeQuery(node) + } +} +impl<'ast> From<&'ast TsTypeQueryExpr> for NodeRef<'ast> { + fn from(node: &'ast TsTypeQueryExpr) -> Self { + NodeRef::TsTypeQueryExpr(node) + } +} +impl<'ast> From<&'ast TsTypeRef> for NodeRef<'ast> { + fn from(node: &'ast TsTypeRef) -> Self { + NodeRef::TsTypeRef(node) + } +} +impl<'ast> From<&'ast TsUnionOrIntersectionType> for NodeRef<'ast> { + fn from(node: &'ast TsUnionOrIntersectionType) -> Self { + NodeRef::TsUnionOrIntersectionType(node) + } +} +impl<'ast> From<&'ast TsUnionType> for NodeRef<'ast> { + fn from(node: &'ast TsUnionType) -> Self { + NodeRef::TsUnionType(node) + } +} +impl<'ast> From<&'ast UnaryExpr> for NodeRef<'ast> { + fn from(node: &'ast UnaryExpr) -> Self { + NodeRef::UnaryExpr(node) + } +} +impl<'ast> From<&'ast UnaryOp> for NodeRef<'ast> { + fn from(node: &'ast UnaryOp) -> Self { + NodeRef::UnaryOp(node) + } +} +impl<'ast> From<&'ast UpdateExpr> for NodeRef<'ast> { + fn from(node: &'ast UpdateExpr) -> Self { + NodeRef::UpdateExpr(node) + } +} +impl<'ast> From<&'ast UpdateOp> for NodeRef<'ast> { + fn from(node: &'ast UpdateOp) -> Self { + NodeRef::UpdateOp(node) + } +} +impl<'ast> From<&'ast UsingDecl> for NodeRef<'ast> { + fn from(node: &'ast UsingDecl) -> Self { + NodeRef::UsingDecl(node) + } +} +impl<'ast> From<&'ast VarDecl> for NodeRef<'ast> { + fn from(node: &'ast VarDecl) -> Self { + NodeRef::VarDecl(node) + } +} +impl<'ast> From<&'ast VarDeclKind> for NodeRef<'ast> { + fn from(node: &'ast VarDeclKind) -> Self { + NodeRef::VarDeclKind(node) + } +} +impl<'ast> From<&'ast VarDeclOrExpr> for NodeRef<'ast> { + fn from(node: &'ast VarDeclOrExpr) -> Self { + NodeRef::VarDeclOrExpr(node) + } +} +impl<'ast> From<&'ast VarDeclarator> for NodeRef<'ast> { + fn from(node: &'ast VarDeclarator) -> Self { + NodeRef::VarDeclarator(node) + } +} +impl<'ast> From<&'ast WhileStmt> for NodeRef<'ast> { + fn from(node: &'ast WhileStmt) -> Self { + NodeRef::WhileStmt(node) + } +} +impl<'ast> From<&'ast WithStmt> for NodeRef<'ast> { + fn from(node: &'ast WithStmt) -> Self { + NodeRef::WithStmt(node) + } +} +impl<'ast> From<&'ast YieldExpr> for NodeRef<'ast> { + fn from(node: &'ast YieldExpr) -> Self { + NodeRef::YieldExpr(node) + } +} +#[derive(Debug, Clone, Copy)] +pub enum NodeRef<'ast> { + Accessibility(&'ast Accessibility), + ArrayLit(&'ast ArrayLit), + ArrayPat(&'ast ArrayPat), + ArrowExpr(&'ast ArrowExpr), + AssignExpr(&'ast AssignExpr), + AssignOp(&'ast AssignOp), + AssignPat(&'ast AssignPat), + AssignPatProp(&'ast AssignPatProp), + AssignProp(&'ast AssignProp), + AssignTarget(&'ast AssignTarget), + AssignTargetPat(&'ast AssignTargetPat), + AutoAccessor(&'ast AutoAccessor), + AwaitExpr(&'ast AwaitExpr), + BigInt(&'ast BigInt), + BinExpr(&'ast BinExpr), + BinaryOp(&'ast BinaryOp), + BindingIdent(&'ast BindingIdent), + BlockStmt(&'ast BlockStmt), + BlockStmtOrExpr(&'ast BlockStmtOrExpr), + Bool(&'ast Bool), + BreakStmt(&'ast BreakStmt), + CallExpr(&'ast CallExpr), + Callee(&'ast Callee), + CatchClause(&'ast CatchClause), + Class(&'ast Class), + ClassDecl(&'ast ClassDecl), + ClassExpr(&'ast ClassExpr), + ClassMember(&'ast ClassMember), + ClassMethod(&'ast ClassMethod), + ClassProp(&'ast ClassProp), + ComputedPropName(&'ast ComputedPropName), + CondExpr(&'ast CondExpr), + Constructor(&'ast Constructor), + ContinueStmt(&'ast ContinueStmt), + DebuggerStmt(&'ast DebuggerStmt), + Decl(&'ast Decl), + Decorator(&'ast Decorator), + DefaultDecl(&'ast DefaultDecl), + DoWhileStmt(&'ast DoWhileStmt), + EmptyStmt(&'ast EmptyStmt), + EsVersion(&'ast EsVersion), + ExportAll(&'ast ExportAll), + ExportDecl(&'ast ExportDecl), + ExportDefaultDecl(&'ast ExportDefaultDecl), + ExportDefaultExpr(&'ast ExportDefaultExpr), + ExportDefaultSpecifier(&'ast ExportDefaultSpecifier), + ExportNamedSpecifier(&'ast ExportNamedSpecifier), + ExportNamespaceSpecifier(&'ast ExportNamespaceSpecifier), + ExportSpecifier(&'ast ExportSpecifier), + Expr(&'ast Expr), + ExprOrSpread(&'ast ExprOrSpread), + ExprStmt(&'ast ExprStmt), + FnDecl(&'ast FnDecl), + FnExpr(&'ast FnExpr), + ForHead(&'ast ForHead), + ForInStmt(&'ast ForInStmt), + ForOfStmt(&'ast ForOfStmt), + ForStmt(&'ast ForStmt), + Function(&'ast Function), + GetterProp(&'ast GetterProp), + Ident(&'ast Ident), + IdentName(&'ast IdentName), + IfStmt(&'ast IfStmt), + Import(&'ast Import), + ImportDecl(&'ast ImportDecl), + ImportDefaultSpecifier(&'ast ImportDefaultSpecifier), + ImportNamedSpecifier(&'ast ImportNamedSpecifier), + ImportPhase(&'ast ImportPhase), + ImportSpecifier(&'ast ImportSpecifier), + ImportStarAsSpecifier(&'ast ImportStarAsSpecifier), + ImportWith(&'ast ImportWith), + ImportWithItem(&'ast ImportWithItem), + Invalid(&'ast Invalid), + JSXAttr(&'ast JSXAttr), + JSXAttrName(&'ast JSXAttrName), + JSXAttrOrSpread(&'ast JSXAttrOrSpread), + JSXAttrValue(&'ast JSXAttrValue), + JSXClosingElement(&'ast JSXClosingElement), + JSXClosingFragment(&'ast JSXClosingFragment), + JSXElement(&'ast JSXElement), + JSXElementChild(&'ast JSXElementChild), + JSXElementName(&'ast JSXElementName), + JSXEmptyExpr(&'ast JSXEmptyExpr), + JSXExpr(&'ast JSXExpr), + JSXExprContainer(&'ast JSXExprContainer), + JSXFragment(&'ast JSXFragment), + JSXMemberExpr(&'ast JSXMemberExpr), + JSXNamespacedName(&'ast JSXNamespacedName), + JSXObject(&'ast JSXObject), + JSXOpeningElement(&'ast JSXOpeningElement), + JSXOpeningFragment(&'ast JSXOpeningFragment), + JSXSpreadChild(&'ast JSXSpreadChild), + JSXText(&'ast JSXText), + Key(&'ast Key), + KeyValuePatProp(&'ast KeyValuePatProp), + KeyValueProp(&'ast KeyValueProp), + LabeledStmt(&'ast LabeledStmt), + Lit(&'ast Lit), + MemberExpr(&'ast MemberExpr), + MemberProp(&'ast MemberProp), + MetaPropExpr(&'ast MetaPropExpr), + MetaPropKind(&'ast MetaPropKind), + MethodKind(&'ast MethodKind), + MethodProp(&'ast MethodProp), + Module(&'ast Module), + ModuleDecl(&'ast ModuleDecl), + ModuleExportName(&'ast ModuleExportName), + ModuleItem(&'ast ModuleItem), + NamedExport(&'ast NamedExport), + NewExpr(&'ast NewExpr), + Null(&'ast Null), + Number(&'ast Number), + ObjectLit(&'ast ObjectLit), + ObjectPat(&'ast ObjectPat), + ObjectPatProp(&'ast ObjectPatProp), + OptCall(&'ast OptCall), + OptChainBase(&'ast OptChainBase), + OptChainExpr(&'ast OptChainExpr), + Param(&'ast Param), + ParamOrTsParamProp(&'ast ParamOrTsParamProp), + ParenExpr(&'ast ParenExpr), + Pat(&'ast Pat), + PrivateMethod(&'ast PrivateMethod), + PrivateName(&'ast PrivateName), + PrivateProp(&'ast PrivateProp), + Program(&'ast Program), + Prop(&'ast Prop), + PropName(&'ast PropName), + PropOrSpread(&'ast PropOrSpread), + Regex(&'ast Regex), + RestPat(&'ast RestPat), + ReturnStmt(&'ast ReturnStmt), + Script(&'ast Script), + SeqExpr(&'ast SeqExpr), + SetterProp(&'ast SetterProp), + SimpleAssignTarget(&'ast SimpleAssignTarget), + SpreadElement(&'ast SpreadElement), + StaticBlock(&'ast StaticBlock), + Stmt(&'ast Stmt), + Str(&'ast Str), + Super(&'ast Super), + SuperProp(&'ast SuperProp), + SuperPropExpr(&'ast SuperPropExpr), + SwitchCase(&'ast SwitchCase), + SwitchStmt(&'ast SwitchStmt), + TaggedTpl(&'ast TaggedTpl), + ThisExpr(&'ast ThisExpr), + ThrowStmt(&'ast ThrowStmt), + Tpl(&'ast Tpl), + TplElement(&'ast TplElement), + TruePlusMinus(&'ast TruePlusMinus), + TryStmt(&'ast TryStmt), + TsArrayType(&'ast TsArrayType), + TsAsExpr(&'ast TsAsExpr), + TsCallSignatureDecl(&'ast TsCallSignatureDecl), + TsConditionalType(&'ast TsConditionalType), + TsConstAssertion(&'ast TsConstAssertion), + TsConstructSignatureDecl(&'ast TsConstructSignatureDecl), + TsConstructorType(&'ast TsConstructorType), + TsEntityName(&'ast TsEntityName), + TsEnumDecl(&'ast TsEnumDecl), + TsEnumMember(&'ast TsEnumMember), + TsEnumMemberId(&'ast TsEnumMemberId), + TsExportAssignment(&'ast TsExportAssignment), + TsExprWithTypeArgs(&'ast TsExprWithTypeArgs), + TsExternalModuleRef(&'ast TsExternalModuleRef), + TsFnOrConstructorType(&'ast TsFnOrConstructorType), + TsFnParam(&'ast TsFnParam), + TsFnType(&'ast TsFnType), + TsGetterSignature(&'ast TsGetterSignature), + TsImportEqualsDecl(&'ast TsImportEqualsDecl), + TsImportType(&'ast TsImportType), + TsIndexSignature(&'ast TsIndexSignature), + TsIndexedAccessType(&'ast TsIndexedAccessType), + TsInferType(&'ast TsInferType), + TsInstantiation(&'ast TsInstantiation), + TsInterfaceBody(&'ast TsInterfaceBody), + TsInterfaceDecl(&'ast TsInterfaceDecl), + TsIntersectionType(&'ast TsIntersectionType), + TsKeywordType(&'ast TsKeywordType), + TsKeywordTypeKind(&'ast TsKeywordTypeKind), + TsLit(&'ast TsLit), + TsLitType(&'ast TsLitType), + TsMappedType(&'ast TsMappedType), + TsMethodSignature(&'ast TsMethodSignature), + TsModuleBlock(&'ast TsModuleBlock), + TsModuleDecl(&'ast TsModuleDecl), + TsModuleName(&'ast TsModuleName), + TsModuleRef(&'ast TsModuleRef), + TsNamespaceBody(&'ast TsNamespaceBody), + TsNamespaceDecl(&'ast TsNamespaceDecl), + TsNamespaceExportDecl(&'ast TsNamespaceExportDecl), + TsNonNullExpr(&'ast TsNonNullExpr), + TsOptionalType(&'ast TsOptionalType), + TsParamProp(&'ast TsParamProp), + TsParamPropParam(&'ast TsParamPropParam), + TsParenthesizedType(&'ast TsParenthesizedType), + TsPropertySignature(&'ast TsPropertySignature), + TsQualifiedName(&'ast TsQualifiedName), + TsRestType(&'ast TsRestType), + TsSatisfiesExpr(&'ast TsSatisfiesExpr), + TsSetterSignature(&'ast TsSetterSignature), + TsThisType(&'ast TsThisType), + TsThisTypeOrIdent(&'ast TsThisTypeOrIdent), + TsTplLitType(&'ast TsTplLitType), + TsTupleElement(&'ast TsTupleElement), + TsTupleType(&'ast TsTupleType), + TsType(&'ast TsType), + TsTypeAliasDecl(&'ast TsTypeAliasDecl), + TsTypeAnn(&'ast TsTypeAnn), + TsTypeAssertion(&'ast TsTypeAssertion), + TsTypeElement(&'ast TsTypeElement), + TsTypeLit(&'ast TsTypeLit), + TsTypeOperator(&'ast TsTypeOperator), + TsTypeOperatorOp(&'ast TsTypeOperatorOp), + TsTypeParam(&'ast TsTypeParam), + TsTypeParamDecl(&'ast TsTypeParamDecl), + TsTypeParamInstantiation(&'ast TsTypeParamInstantiation), + TsTypePredicate(&'ast TsTypePredicate), + TsTypeQuery(&'ast TsTypeQuery), + TsTypeQueryExpr(&'ast TsTypeQueryExpr), + TsTypeRef(&'ast TsTypeRef), + TsUnionOrIntersectionType(&'ast TsUnionOrIntersectionType), + TsUnionType(&'ast TsUnionType), + UnaryExpr(&'ast UnaryExpr), + UnaryOp(&'ast UnaryOp), + UpdateExpr(&'ast UpdateExpr), + UpdateOp(&'ast UpdateOp), + UsingDecl(&'ast UsingDecl), + VarDecl(&'ast VarDecl), + VarDeclKind(&'ast VarDeclKind), + VarDeclOrExpr(&'ast VarDeclOrExpr), + VarDeclarator(&'ast VarDeclarator), + WhileStmt(&'ast WhileStmt), + WithStmt(&'ast WithStmt), + YieldExpr(&'ast YieldExpr), +} +impl<'ast> NodeRef<'ast> { + #[allow(unreachable_patterns)] + pub fn raw_children(&'ast self) -> Box>> { + match self { + NodeRef::Accessibility(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ArrayLit(node) => { + let iterator = ::std::iter::empty::>().chain( + node.elems.iter().flat_map(|item| { + item.iter() + .flat_map(|item| ::std::iter::once(NodeRef::ExprOrSpread(&item))) + }), + ); + Box::new(iterator) + } + NodeRef::ArrayPat(node) => { + let iterator = ::std::iter::empty::>() + .chain(node.elems.iter().flat_map(|item| { + item.iter() + .flat_map(|item| ::std::iter::once(NodeRef::Pat(&item))) + })) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + Box::new(iterator) + } + NodeRef::ArrowExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Pat(&item))), + ) + .chain({ + let item = &*node.body; + ::std::iter::once(NodeRef::BlockStmtOrExpr(&item)) + }) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain(node.return_type.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + Box::new(iterator) + } + NodeRef::AssignExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::AssignOp(&node.op))) + .chain(::std::iter::once(NodeRef::AssignTarget(&node.left))) + .chain({ + let item = &*node.right; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::AssignOp(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::AssignPat(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.left; + ::std::iter::once(NodeRef::Pat(&item)) + }) + .chain({ + let item = &*node.right; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::AssignPatProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::BindingIdent(&node.key))) + .chain(node.value.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })); + Box::new(iterator) + } + NodeRef::AssignProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.key))) + .chain({ + let item = &*node.value; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::AssignTarget(node) => match node { + AssignTarget::Simple(v0) => { + Box::new(::std::iter::once(NodeRef::SimpleAssignTarget(v0))) + } + AssignTarget::Pat(v0) => Box::new(::std::iter::once(NodeRef::AssignTargetPat(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::AssignTargetPat(node) => match node { + AssignTargetPat::Array(v0) => Box::new(::std::iter::once(NodeRef::ArrayPat(v0))), + AssignTargetPat::Object(v0) => Box::new(::std::iter::once(NodeRef::ObjectPat(v0))), + AssignTargetPat::Invalid(v0) => Box::new(::std::iter::once(NodeRef::Invalid(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::AutoAccessor(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Key(&node.key))) + .chain(node.value.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + Box::new(iterator) + } + NodeRef::AwaitExpr(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.arg; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::BigInt(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::BinExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::BinaryOp(&node.op))) + .chain({ + let item = &*node.left; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.right; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::BinaryOp(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::BindingIdent(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + Box::new(iterator) + } + NodeRef::BlockStmt(node) => { + let iterator = ::std::iter::empty::>().chain( + node.stmts + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Stmt(&item))), + ); + Box::new(iterator) + } + NodeRef::BlockStmtOrExpr(node) => match node { + BlockStmtOrExpr::BlockStmt(v0) => { + Box::new(::std::iter::once(NodeRef::BlockStmt(v0))) + } + BlockStmtOrExpr::Expr(v0) => Box::new(::std::iter::once(NodeRef::Expr(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Bool(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::BreakStmt(node) => { + let iterator = ::std::iter::empty::>().chain( + node.label + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ); + Box::new(iterator) + } + NodeRef::CallExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Callee(&node.callee))) + .chain( + node.args + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ExprOrSpread(&item))), + ) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + Box::new(iterator) + } + NodeRef::Callee(node) => match node { + Callee::Super(v0) => Box::new(::std::iter::once(NodeRef::Super(v0))), + Callee::Import(v0) => Box::new(::std::iter::once(NodeRef::Import(v0))), + Callee::Expr(v0) => Box::new(::std::iter::once(NodeRef::Expr(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::CatchClause(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.param + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Pat(&item))), + ) + .chain(::std::iter::once(NodeRef::BlockStmt(&node.body))); + Box::new(iterator) + } + NodeRef::Class(node) => { + let iterator = + ::std::iter::empty::>() + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ClassMember(&item))), + ) + .chain(node.super_class.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain(node.super_type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })) + .chain(node.implements.iter().flat_map(|item| { + ::std::iter::once(NodeRef::TsExprWithTypeArgs(&item)) + })); + Box::new(iterator) + } + NodeRef::ClassDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.ident))) + .chain({ + let item = &*node.class; + ::std::iter::once(NodeRef::Class(&item)) + }); + Box::new(iterator) + } + NodeRef::ClassExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.ident + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain({ + let item = &*node.class; + ::std::iter::once(NodeRef::Class(&item)) + }); + Box::new(iterator) + } + NodeRef::ClassMember(node) => match node { + ClassMember::Constructor(v0) => { + Box::new(::std::iter::once(NodeRef::Constructor(v0))) + } + ClassMember::Method(v0) => Box::new(::std::iter::once(NodeRef::ClassMethod(v0))), + ClassMember::PrivateMethod(v0) => { + Box::new(::std::iter::once(NodeRef::PrivateMethod(v0))) + } + ClassMember::ClassProp(v0) => Box::new(::std::iter::once(NodeRef::ClassProp(v0))), + ClassMember::PrivateProp(v0) => { + Box::new(::std::iter::once(NodeRef::PrivateProp(v0))) + } + ClassMember::TsIndexSignature(v0) => { + Box::new(::std::iter::once(NodeRef::TsIndexSignature(v0))) + } + ClassMember::Empty(v0) => Box::new(::std::iter::once(NodeRef::EmptyStmt(v0))), + ClassMember::StaticBlock(v0) => { + Box::new(::std::iter::once(NodeRef::StaticBlock(v0))) + } + ClassMember::AutoAccessor(v0) => { + Box::new(::std::iter::once(NodeRef::AutoAccessor(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ClassMethod(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain({ + let item = &*node.function; + ::std::iter::once(NodeRef::Function(&item)) + }) + .chain(::std::iter::once(NodeRef::MethodKind(&node.kind))) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + Box::new(iterator) + } + NodeRef::ClassProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain(node.value.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + Box::new(iterator) + } + NodeRef::ComputedPropName(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::CondExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.test; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.cons; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.alt; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::Constructor(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ParamOrTsParamProp(&item))), + ) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::BlockStmt(&item))), + ) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + Box::new(iterator) + } + NodeRef::ContinueStmt(node) => { + let iterator = ::std::iter::empty::>().chain( + node.label + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ); + Box::new(iterator) + } + NodeRef::DebuggerStmt(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Decl(node) => match node { + Decl::Class(v0) => Box::new(::std::iter::once(NodeRef::ClassDecl(v0))), + Decl::Fn(v0) => Box::new(::std::iter::once(NodeRef::FnDecl(v0))), + Decl::Var(v0) => Box::new(::std::iter::once(NodeRef::VarDecl(v0))), + Decl::Using(v0) => Box::new(::std::iter::once(NodeRef::UsingDecl(v0))), + Decl::TsInterface(v0) => Box::new(::std::iter::once(NodeRef::TsInterfaceDecl(v0))), + Decl::TsTypeAlias(v0) => Box::new(::std::iter::once(NodeRef::TsTypeAliasDecl(v0))), + Decl::TsEnum(v0) => Box::new(::std::iter::once(NodeRef::TsEnumDecl(v0))), + Decl::TsModule(v0) => Box::new(::std::iter::once(NodeRef::TsModuleDecl(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Decorator(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::DefaultDecl(node) => match node { + DefaultDecl::Class(v0) => Box::new(::std::iter::once(NodeRef::ClassExpr(v0))), + DefaultDecl::Fn(v0) => Box::new(::std::iter::once(NodeRef::FnExpr(v0))), + DefaultDecl::TsInterfaceDecl(v0) => { + Box::new(::std::iter::once(NodeRef::TsInterfaceDecl(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::DoWhileStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.test; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.body; + ::std::iter::once(NodeRef::Stmt(&item)) + }); + Box::new(iterator) + } + NodeRef::EmptyStmt(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::EsVersion(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ExportAll(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.src; + ::std::iter::once(NodeRef::Str(&item)) + }) + .chain(node.with.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::ObjectLit(&item)) + })); + Box::new(iterator) + } + NodeRef::ExportDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Decl(&node.decl))); + Box::new(iterator) + } + NodeRef::ExportDefaultDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::DefaultDecl(&node.decl))); + Box::new(iterator) + } + NodeRef::ExportDefaultExpr(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::ExportDefaultSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.exported))); + Box::new(iterator) + } + NodeRef::ExportNamedSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ModuleExportName(&node.orig))) + .chain( + node.exported + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ModuleExportName(&item))), + ); + Box::new(iterator) + } + NodeRef::ExportNamespaceSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ModuleExportName(&node.name))); + Box::new(iterator) + } + NodeRef::ExportSpecifier(node) => match node { + ExportSpecifier::Namespace(v0) => { + Box::new(::std::iter::once(NodeRef::ExportNamespaceSpecifier(v0))) + } + ExportSpecifier::Default(v0) => { + Box::new(::std::iter::once(NodeRef::ExportDefaultSpecifier(v0))) + } + ExportSpecifier::Named(v0) => { + Box::new(::std::iter::once(NodeRef::ExportNamedSpecifier(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Expr(node) => match node { + Expr::This(v0) => Box::new(::std::iter::once(NodeRef::ThisExpr(v0))), + Expr::Array(v0) => Box::new(::std::iter::once(NodeRef::ArrayLit(v0))), + Expr::Object(v0) => Box::new(::std::iter::once(NodeRef::ObjectLit(v0))), + Expr::Fn(v0) => Box::new(::std::iter::once(NodeRef::FnExpr(v0))), + Expr::Unary(v0) => Box::new(::std::iter::once(NodeRef::UnaryExpr(v0))), + Expr::Update(v0) => Box::new(::std::iter::once(NodeRef::UpdateExpr(v0))), + Expr::Bin(v0) => Box::new(::std::iter::once(NodeRef::BinExpr(v0))), + Expr::Assign(v0) => Box::new(::std::iter::once(NodeRef::AssignExpr(v0))), + Expr::Member(v0) => Box::new(::std::iter::once(NodeRef::MemberExpr(v0))), + Expr::SuperProp(v0) => Box::new(::std::iter::once(NodeRef::SuperPropExpr(v0))), + Expr::Cond(v0) => Box::new(::std::iter::once(NodeRef::CondExpr(v0))), + Expr::Call(v0) => Box::new(::std::iter::once(NodeRef::CallExpr(v0))), + Expr::New(v0) => Box::new(::std::iter::once(NodeRef::NewExpr(v0))), + Expr::Seq(v0) => Box::new(::std::iter::once(NodeRef::SeqExpr(v0))), + Expr::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + Expr::Lit(v0) => Box::new(::std::iter::once(NodeRef::Lit(v0))), + Expr::Tpl(v0) => Box::new(::std::iter::once(NodeRef::Tpl(v0))), + Expr::TaggedTpl(v0) => Box::new(::std::iter::once(NodeRef::TaggedTpl(v0))), + Expr::Arrow(v0) => Box::new(::std::iter::once(NodeRef::ArrowExpr(v0))), + Expr::Class(v0) => Box::new(::std::iter::once(NodeRef::ClassExpr(v0))), + Expr::Yield(v0) => Box::new(::std::iter::once(NodeRef::YieldExpr(v0))), + Expr::MetaProp(v0) => Box::new(::std::iter::once(NodeRef::MetaPropExpr(v0))), + Expr::Await(v0) => Box::new(::std::iter::once(NodeRef::AwaitExpr(v0))), + Expr::Paren(v0) => Box::new(::std::iter::once(NodeRef::ParenExpr(v0))), + Expr::JSXMember(v0) => Box::new(::std::iter::once(NodeRef::JSXMemberExpr(v0))), + Expr::JSXNamespacedName(v0) => { + Box::new(::std::iter::once(NodeRef::JSXNamespacedName(v0))) + } + Expr::JSXEmpty(v0) => Box::new(::std::iter::once(NodeRef::JSXEmptyExpr(v0))), + Expr::JSXElement(v0) => Box::new(::std::iter::once(NodeRef::JSXElement(v0))), + Expr::JSXFragment(v0) => Box::new(::std::iter::once(NodeRef::JSXFragment(v0))), + Expr::TsTypeAssertion(v0) => { + Box::new(::std::iter::once(NodeRef::TsTypeAssertion(v0))) + } + Expr::TsConstAssertion(v0) => { + Box::new(::std::iter::once(NodeRef::TsConstAssertion(v0))) + } + Expr::TsNonNull(v0) => Box::new(::std::iter::once(NodeRef::TsNonNullExpr(v0))), + Expr::TsAs(v0) => Box::new(::std::iter::once(NodeRef::TsAsExpr(v0))), + Expr::TsInstantiation(v0) => { + Box::new(::std::iter::once(NodeRef::TsInstantiation(v0))) + } + Expr::TsSatisfies(v0) => Box::new(::std::iter::once(NodeRef::TsSatisfiesExpr(v0))), + Expr::PrivateName(v0) => Box::new(::std::iter::once(NodeRef::PrivateName(v0))), + Expr::OptChain(v0) => Box::new(::std::iter::once(NodeRef::OptChainExpr(v0))), + Expr::Invalid(v0) => Box::new(::std::iter::once(NodeRef::Invalid(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ExprOrSpread(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::ExprStmt(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::FnDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.ident))) + .chain({ + let item = &*node.function; + ::std::iter::once(NodeRef::Function(&item)) + }); + Box::new(iterator) + } + NodeRef::FnExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.ident + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Ident(&item))), + ) + .chain({ + let item = &*node.function; + ::std::iter::once(NodeRef::Function(&item)) + }); + Box::new(iterator) + } + NodeRef::ForHead(node) => match node { + ForHead::VarDecl(v0) => Box::new(::std::iter::once(NodeRef::VarDecl(v0))), + ForHead::UsingDecl(v0) => Box::new(::std::iter::once(NodeRef::UsingDecl(v0))), + ForHead::Pat(v0) => Box::new(::std::iter::once(NodeRef::Pat(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ForInStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ForHead(&node.left))) + .chain({ + let item = &*node.right; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.body; + ::std::iter::once(NodeRef::Stmt(&item)) + }); + Box::new(iterator) + } + NodeRef::ForOfStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ForHead(&node.left))) + .chain({ + let item = &*node.right; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.body; + ::std::iter::once(NodeRef::Stmt(&item)) + }); + Box::new(iterator) + } + NodeRef::ForStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.init + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::VarDeclOrExpr(&item))), + ) + .chain(node.test.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })) + .chain(node.update.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })) + .chain({ + let item = &*node.body; + ::std::iter::once(NodeRef::Stmt(&item)) + }); + Box::new(iterator) + } + NodeRef::Function(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Param(&item))), + ) + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::BlockStmt(&item))), + ) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain(node.return_type.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + Box::new(iterator) + } + NodeRef::GetterProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::BlockStmt(&item))), + ); + Box::new(iterator) + } + NodeRef::Ident(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::IdentName(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::IfStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.test; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.cons; + ::std::iter::once(NodeRef::Stmt(&item)) + }) + .chain(node.alt.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Stmt(&item)) + })); + Box::new(iterator) + } + NodeRef::Import(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::ImportPhase(&node.phase))); + Box::new(iterator) + } + NodeRef::ImportDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.specifiers + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ImportSpecifier(&item))), + ) + .chain({ + let item = &*node.src; + ::std::iter::once(NodeRef::Str(&item)) + }) + .chain(node.with.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::ObjectLit(&item)) + })) + .chain(::std::iter::once(NodeRef::ImportPhase(&node.phase))); + Box::new(iterator) + } + NodeRef::ImportDefaultSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.local))); + Box::new(iterator) + } + NodeRef::ImportNamedSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.local))) + .chain( + node.imported + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ModuleExportName(&item))), + ); + Box::new(iterator) + } + NodeRef::ImportPhase(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ImportSpecifier(node) => match node { + ImportSpecifier::Named(v0) => { + Box::new(::std::iter::once(NodeRef::ImportNamedSpecifier(v0))) + } + ImportSpecifier::Default(v0) => { + Box::new(::std::iter::once(NodeRef::ImportDefaultSpecifier(v0))) + } + ImportSpecifier::Namespace(v0) => { + Box::new(::std::iter::once(NodeRef::ImportStarAsSpecifier(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ImportStarAsSpecifier(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.local))); + Box::new(iterator) + } + NodeRef::ImportWith(node) => { + let iterator = ::std::iter::empty::>().chain( + node.values + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ImportWithItem(&item))), + ); + Box::new(iterator) + } + NodeRef::ImportWithItem(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::IdentName(&node.key))) + .chain(::std::iter::once(NodeRef::Str(&node.value))); + Box::new(iterator) + } + NodeRef::Invalid(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::JSXAttr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXAttrName(&node.name))) + .chain( + node.value + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::JSXAttrValue(&item))), + ); + Box::new(iterator) + } + NodeRef::JSXAttrName(node) => match node { + JSXAttrName::Ident(v0) => Box::new(::std::iter::once(NodeRef::IdentName(v0))), + JSXAttrName::JSXNamespacedName(v0) => { + Box::new(::std::iter::once(NodeRef::JSXNamespacedName(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXAttrOrSpread(node) => match node { + JSXAttrOrSpread::JSXAttr(v0) => Box::new(::std::iter::once(NodeRef::JSXAttr(v0))), + JSXAttrOrSpread::SpreadElement(v0) => { + Box::new(::std::iter::once(NodeRef::SpreadElement(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXAttrValue(node) => match node { + JSXAttrValue::Lit(v0) => Box::new(::std::iter::once(NodeRef::Lit(v0))), + JSXAttrValue::JSXExprContainer(v0) => { + Box::new(::std::iter::once(NodeRef::JSXExprContainer(v0))) + } + JSXAttrValue::JSXElement(v0) => { + Box::new(::std::iter::once(NodeRef::JSXElement(v0))) + } + JSXAttrValue::JSXFragment(v0) => { + Box::new(::std::iter::once(NodeRef::JSXFragment(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXClosingElement(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXElementName(&node.name))); + Box::new(iterator) + } + NodeRef::JSXClosingFragment(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::JSXElement(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXOpeningElement(&node.opening))) + .chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::JSXElementChild(&item))), + ) + .chain( + node.closing + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::JSXClosingElement(&item))), + ); + Box::new(iterator) + } + NodeRef::JSXElementChild(node) => match node { + JSXElementChild::JSXText(v0) => Box::new(::std::iter::once(NodeRef::JSXText(v0))), + JSXElementChild::JSXExprContainer(v0) => { + Box::new(::std::iter::once(NodeRef::JSXExprContainer(v0))) + } + JSXElementChild::JSXSpreadChild(v0) => { + Box::new(::std::iter::once(NodeRef::JSXSpreadChild(v0))) + } + JSXElementChild::JSXElement(v0) => { + Box::new(::std::iter::once(NodeRef::JSXElement(v0))) + } + JSXElementChild::JSXFragment(v0) => { + Box::new(::std::iter::once(NodeRef::JSXFragment(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXElementName(node) => match node { + JSXElementName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + JSXElementName::JSXMemberExpr(v0) => { + Box::new(::std::iter::once(NodeRef::JSXMemberExpr(v0))) + } + JSXElementName::JSXNamespacedName(v0) => { + Box::new(::std::iter::once(NodeRef::JSXNamespacedName(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXEmptyExpr(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::JSXExpr(node) => match node { + JSXExpr::JSXEmptyExpr(v0) => Box::new(::std::iter::once(NodeRef::JSXEmptyExpr(v0))), + JSXExpr::Expr(v0) => Box::new(::std::iter::once(NodeRef::Expr(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXExprContainer(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXExpr(&node.expr))); + Box::new(iterator) + } + NodeRef::JSXFragment(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXOpeningFragment( + &node.opening, + ))) + .chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::JSXElementChild(&item))), + ) + .chain(::std::iter::once(NodeRef::JSXClosingFragment( + &node.closing, + ))); + Box::new(iterator) + } + NodeRef::JSXMemberExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXObject(&node.obj))) + .chain(::std::iter::once(NodeRef::IdentName(&node.prop))); + Box::new(iterator) + } + NodeRef::JSXNamespacedName(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::IdentName(&node.ns))) + .chain(::std::iter::once(NodeRef::IdentName(&node.name))); + Box::new(iterator) + } + NodeRef::JSXObject(node) => match node { + JSXObject::JSXMemberExpr(v0) => { + Box::new(::std::iter::once(NodeRef::JSXMemberExpr(v0))) + } + JSXObject::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::JSXOpeningElement(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::JSXElementName(&node.name))) + .chain( + node.attrs + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::JSXAttrOrSpread(&item))), + ) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + Box::new(iterator) + } + NodeRef::JSXOpeningFragment(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::JSXSpreadChild(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::JSXText(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Key(node) => match node { + Key::Private(v0) => Box::new(::std::iter::once(NodeRef::PrivateName(v0))), + Key::Public(v0) => Box::new(::std::iter::once(NodeRef::PropName(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::KeyValuePatProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain({ + let item = &*node.value; + ::std::iter::once(NodeRef::Pat(&item)) + }); + Box::new(iterator) + } + NodeRef::KeyValueProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain({ + let item = &*node.value; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::LabeledStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.label))) + .chain({ + let item = &*node.body; + ::std::iter::once(NodeRef::Stmt(&item)) + }); + Box::new(iterator) + } + NodeRef::Lit(node) => match node { + Lit::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + Lit::Bool(v0) => Box::new(::std::iter::once(NodeRef::Bool(v0))), + Lit::Null(v0) => Box::new(::std::iter::once(NodeRef::Null(v0))), + Lit::Num(v0) => Box::new(::std::iter::once(NodeRef::Number(v0))), + Lit::BigInt(v0) => Box::new(::std::iter::once(NodeRef::BigInt(v0))), + Lit::Regex(v0) => Box::new(::std::iter::once(NodeRef::Regex(v0))), + Lit::JSXText(v0) => Box::new(::std::iter::once(NodeRef::JSXText(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MemberExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.obj; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain(::std::iter::once(NodeRef::MemberProp(&node.prop))); + Box::new(iterator) + } + NodeRef::MemberProp(node) => match node { + MemberProp::Ident(v0) => Box::new(::std::iter::once(NodeRef::IdentName(v0))), + MemberProp::PrivateName(v0) => { + Box::new(::std::iter::once(NodeRef::PrivateName(v0))) + } + MemberProp::Computed(v0) => { + Box::new(::std::iter::once(NodeRef::ComputedPropName(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MetaPropExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::MetaPropKind(&node.kind))); + Box::new(iterator) + } + NodeRef::MetaPropKind(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MethodKind(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::MethodProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain({ + let item = &*node.function; + ::std::iter::once(NodeRef::Function(&item)) + }); + Box::new(iterator) + } + NodeRef::Module(node) => { + let iterator = ::std::iter::empty::>().chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ModuleItem(&item))), + ); + Box::new(iterator) + } + NodeRef::ModuleDecl(node) => match node { + ModuleDecl::Import(v0) => Box::new(::std::iter::once(NodeRef::ImportDecl(v0))), + ModuleDecl::ExportDecl(v0) => Box::new(::std::iter::once(NodeRef::ExportDecl(v0))), + ModuleDecl::ExportNamed(v0) => { + Box::new(::std::iter::once(NodeRef::NamedExport(v0))) + } + ModuleDecl::ExportDefaultDecl(v0) => { + Box::new(::std::iter::once(NodeRef::ExportDefaultDecl(v0))) + } + ModuleDecl::ExportDefaultExpr(v0) => { + Box::new(::std::iter::once(NodeRef::ExportDefaultExpr(v0))) + } + ModuleDecl::ExportAll(v0) => Box::new(::std::iter::once(NodeRef::ExportAll(v0))), + ModuleDecl::TsImportEquals(v0) => { + Box::new(::std::iter::once(NodeRef::TsImportEqualsDecl(v0))) + } + ModuleDecl::TsExportAssignment(v0) => { + Box::new(::std::iter::once(NodeRef::TsExportAssignment(v0))) + } + ModuleDecl::TsNamespaceExport(v0) => { + Box::new(::std::iter::once(NodeRef::TsNamespaceExportDecl(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ModuleExportName(node) => match node { + ModuleExportName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + ModuleExportName::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ModuleItem(node) => match node { + ModuleItem::ModuleDecl(v0) => Box::new(::std::iter::once(NodeRef::ModuleDecl(v0))), + ModuleItem::Stmt(v0) => Box::new(::std::iter::once(NodeRef::Stmt(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::NamedExport(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.specifiers + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ExportSpecifier(&item))), + ) + .chain(node.src.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Str(&item)) + })) + .chain(node.with.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::ObjectLit(&item)) + })); + Box::new(iterator) + } + NodeRef::NewExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.callee; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain(node.args.iter().flat_map(|item| { + item.iter() + .flat_map(|item| ::std::iter::once(NodeRef::ExprOrSpread(&item))) + })) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + Box::new(iterator) + } + NodeRef::Null(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Number(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::ObjectLit(node) => { + let iterator = ::std::iter::empty::>().chain( + node.props + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::PropOrSpread(&item))), + ); + Box::new(iterator) + } + NodeRef::ObjectPat(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.props + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ObjectPatProp(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + Box::new(iterator) + } + NodeRef::ObjectPatProp(node) => match node { + ObjectPatProp::KeyValue(v0) => { + Box::new(::std::iter::once(NodeRef::KeyValuePatProp(v0))) + } + ObjectPatProp::Assign(v0) => { + Box::new(::std::iter::once(NodeRef::AssignPatProp(v0))) + } + ObjectPatProp::Rest(v0) => Box::new(::std::iter::once(NodeRef::RestPat(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::OptCall(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.callee; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain( + node.args + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ExprOrSpread(&item))), + ) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + Box::new(iterator) + } + NodeRef::OptChainBase(node) => match node { + OptChainBase::Member(v0) => Box::new(::std::iter::once(NodeRef::MemberExpr(v0))), + OptChainBase::Call(v0) => Box::new(::std::iter::once(NodeRef::OptCall(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::OptChainExpr(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.base; + ::std::iter::once(NodeRef::OptChainBase(&item)) + }); + Box::new(iterator) + } + NodeRef::Param(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain(::std::iter::once(NodeRef::Pat(&node.pat))); + Box::new(iterator) + } + NodeRef::ParamOrTsParamProp(node) => match node { + ParamOrTsParamProp::TsParamProp(v0) => { + Box::new(::std::iter::once(NodeRef::TsParamProp(v0))) + } + ParamOrTsParamProp::Param(v0) => Box::new(::std::iter::once(NodeRef::Param(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ParenExpr(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::Pat(node) => match node { + Pat::Ident(v0) => Box::new(::std::iter::once(NodeRef::BindingIdent(v0))), + Pat::Array(v0) => Box::new(::std::iter::once(NodeRef::ArrayPat(v0))), + Pat::Rest(v0) => Box::new(::std::iter::once(NodeRef::RestPat(v0))), + Pat::Object(v0) => Box::new(::std::iter::once(NodeRef::ObjectPat(v0))), + Pat::Assign(v0) => Box::new(::std::iter::once(NodeRef::AssignPat(v0))), + Pat::Invalid(v0) => Box::new(::std::iter::once(NodeRef::Invalid(v0))), + Pat::Expr(v0) => Box::new(::std::iter::once(NodeRef::Expr(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::PrivateMethod(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PrivateName(&node.key))) + .chain({ + let item = &*node.function; + ::std::iter::once(NodeRef::Function(&item)) + }) + .chain(::std::iter::once(NodeRef::MethodKind(&node.kind))) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + Box::new(iterator) + } + NodeRef::PrivateName(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::PrivateProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PrivateName(&node.key))) + .chain(node.value.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ); + Box::new(iterator) + } + NodeRef::Program(node) => match node { + Program::Module(v0) => Box::new(::std::iter::once(NodeRef::Module(v0))), + Program::Script(v0) => Box::new(::std::iter::once(NodeRef::Script(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Prop(node) => match node { + Prop::Shorthand(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + Prop::KeyValue(v0) => Box::new(::std::iter::once(NodeRef::KeyValueProp(v0))), + Prop::Assign(v0) => Box::new(::std::iter::once(NodeRef::AssignProp(v0))), + Prop::Getter(v0) => Box::new(::std::iter::once(NodeRef::GetterProp(v0))), + Prop::Setter(v0) => Box::new(::std::iter::once(NodeRef::SetterProp(v0))), + Prop::Method(v0) => Box::new(::std::iter::once(NodeRef::MethodProp(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::PropName(node) => match node { + PropName::Ident(v0) => Box::new(::std::iter::once(NodeRef::IdentName(v0))), + PropName::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + PropName::Num(v0) => Box::new(::std::iter::once(NodeRef::Number(v0))), + PropName::Computed(v0) => { + Box::new(::std::iter::once(NodeRef::ComputedPropName(v0))) + } + PropName::BigInt(v0) => Box::new(::std::iter::once(NodeRef::BigInt(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::PropOrSpread(node) => match node { + PropOrSpread::Spread(v0) => Box::new(::std::iter::once(NodeRef::SpreadElement(v0))), + PropOrSpread::Prop(v0) => Box::new(::std::iter::once(NodeRef::Prop(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Regex(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::RestPat(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.arg; + ::std::iter::once(NodeRef::Pat(&item)) + }) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + Box::new(iterator) + } + NodeRef::ReturnStmt(node) => { + let iterator = + ::std::iter::empty::>().chain(node.arg.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })); + Box::new(iterator) + } + NodeRef::Script(node) => { + let iterator = ::std::iter::empty::>().chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Stmt(&item))), + ); + Box::new(iterator) + } + NodeRef::SeqExpr(node) => { + let iterator = ::std::iter::empty::>().chain( + node.exprs.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + }), + ); + Box::new(iterator) + } + NodeRef::SetterProp(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::PropName(&node.key))) + .chain( + node.this_param + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Pat(&item))), + ) + .chain({ + let item = &*node.param; + ::std::iter::once(NodeRef::Pat(&item)) + }) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::BlockStmt(&item))), + ); + Box::new(iterator) + } + NodeRef::SimpleAssignTarget(node) => match node { + SimpleAssignTarget::Ident(v0) => { + Box::new(::std::iter::once(NodeRef::BindingIdent(v0))) + } + SimpleAssignTarget::Member(v0) => { + Box::new(::std::iter::once(NodeRef::MemberExpr(v0))) + } + SimpleAssignTarget::SuperProp(v0) => { + Box::new(::std::iter::once(NodeRef::SuperPropExpr(v0))) + } + SimpleAssignTarget::Paren(v0) => { + Box::new(::std::iter::once(NodeRef::ParenExpr(v0))) + } + SimpleAssignTarget::OptChain(v0) => { + Box::new(::std::iter::once(NodeRef::OptChainExpr(v0))) + } + SimpleAssignTarget::TsAs(v0) => Box::new(::std::iter::once(NodeRef::TsAsExpr(v0))), + SimpleAssignTarget::TsSatisfies(v0) => { + Box::new(::std::iter::once(NodeRef::TsSatisfiesExpr(v0))) + } + SimpleAssignTarget::TsNonNull(v0) => { + Box::new(::std::iter::once(NodeRef::TsNonNullExpr(v0))) + } + SimpleAssignTarget::TsTypeAssertion(v0) => { + Box::new(::std::iter::once(NodeRef::TsTypeAssertion(v0))) + } + SimpleAssignTarget::TsInstantiation(v0) => { + Box::new(::std::iter::once(NodeRef::TsInstantiation(v0))) + } + SimpleAssignTarget::Invalid(v0) => { + Box::new(::std::iter::once(NodeRef::Invalid(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::SpreadElement(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::StaticBlock(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::BlockStmt(&node.body))); + Box::new(iterator) + } + NodeRef::Stmt(node) => match node { + Stmt::Block(v0) => Box::new(::std::iter::once(NodeRef::BlockStmt(v0))), + Stmt::Empty(v0) => Box::new(::std::iter::once(NodeRef::EmptyStmt(v0))), + Stmt::Debugger(v0) => Box::new(::std::iter::once(NodeRef::DebuggerStmt(v0))), + Stmt::With(v0) => Box::new(::std::iter::once(NodeRef::WithStmt(v0))), + Stmt::Return(v0) => Box::new(::std::iter::once(NodeRef::ReturnStmt(v0))), + Stmt::Labeled(v0) => Box::new(::std::iter::once(NodeRef::LabeledStmt(v0))), + Stmt::Break(v0) => Box::new(::std::iter::once(NodeRef::BreakStmt(v0))), + Stmt::Continue(v0) => Box::new(::std::iter::once(NodeRef::ContinueStmt(v0))), + Stmt::If(v0) => Box::new(::std::iter::once(NodeRef::IfStmt(v0))), + Stmt::Switch(v0) => Box::new(::std::iter::once(NodeRef::SwitchStmt(v0))), + Stmt::Throw(v0) => Box::new(::std::iter::once(NodeRef::ThrowStmt(v0))), + Stmt::Try(v0) => Box::new(::std::iter::once(NodeRef::TryStmt(v0))), + Stmt::While(v0) => Box::new(::std::iter::once(NodeRef::WhileStmt(v0))), + Stmt::DoWhile(v0) => Box::new(::std::iter::once(NodeRef::DoWhileStmt(v0))), + Stmt::For(v0) => Box::new(::std::iter::once(NodeRef::ForStmt(v0))), + Stmt::ForIn(v0) => Box::new(::std::iter::once(NodeRef::ForInStmt(v0))), + Stmt::ForOf(v0) => Box::new(::std::iter::once(NodeRef::ForOfStmt(v0))), + Stmt::Decl(v0) => Box::new(::std::iter::once(NodeRef::Decl(v0))), + Stmt::Expr(v0) => Box::new(::std::iter::once(NodeRef::ExprStmt(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Str(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Super(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::SuperProp(node) => match node { + SuperProp::Ident(v0) => Box::new(::std::iter::once(NodeRef::IdentName(v0))), + SuperProp::Computed(v0) => { + Box::new(::std::iter::once(NodeRef::ComputedPropName(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::SuperPropExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Super(&node.obj))) + .chain(::std::iter::once(NodeRef::SuperProp(&node.prop))); + Box::new(iterator) + } + NodeRef::SwitchCase(node) => { + let iterator = ::std::iter::empty::>() + .chain(node.test.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })) + .chain( + node.cons + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Stmt(&item))), + ); + Box::new(iterator) + } + NodeRef::SwitchStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.discriminant; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain( + node.cases + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::SwitchCase(&item))), + ); + Box::new(iterator) + } + NodeRef::TaggedTpl(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.tag; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })) + .chain({ + let item = &*node.tpl; + ::std::iter::once(NodeRef::Tpl(&item)) + }); + Box::new(iterator) + } + NodeRef::ThisExpr(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::ThrowStmt(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.arg; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::Tpl(node) => { + let iterator = ::std::iter::empty::>() + .chain(node.exprs.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })) + .chain( + node.quasis + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TplElement(&item))), + ); + Box::new(iterator) + } + NodeRef::TplElement(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::TruePlusMinus(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TryStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::BlockStmt(&node.block))) + .chain( + node.handler + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::CatchClause(&item))), + ) + .chain( + node.finalizer + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::BlockStmt(&item))), + ); + Box::new(iterator) + } + NodeRef::TsArrayType(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.elem_type; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsAsExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsCallSignatureDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })); + Box::new(iterator) + } + NodeRef::TsConditionalType(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.check_type; + ::std::iter::once(NodeRef::TsType(&item)) + }) + .chain({ + let item = &*node.extends_type; + ::std::iter::once(NodeRef::TsType(&item)) + }) + .chain({ + let item = &*node.true_type; + ::std::iter::once(NodeRef::TsType(&item)) + }) + .chain({ + let item = &*node.false_type; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsConstAssertion(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::TsConstructSignatureDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })); + Box::new(iterator) + } + NodeRef::TsConstructorType(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + }); + Box::new(iterator) + } + NodeRef::TsEntityName(node) => match node { + TsEntityName::TsQualifiedName(v0) => { + Box::new(::std::iter::once(NodeRef::TsQualifiedName(v0))) + } + TsEntityName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsEnumDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain( + node.members + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsEnumMember(&item))), + ); + Box::new(iterator) + } + NodeRef::TsEnumMember(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsEnumMemberId(&node.id))) + .chain(node.init.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })); + Box::new(iterator) + } + NodeRef::TsEnumMemberId(node) => match node { + TsEnumMemberId::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + TsEnumMemberId::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsExportAssignment(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::TsExprWithTypeArgs(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + Box::new(iterator) + } + NodeRef::TsExternalModuleRef(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Str(&node.expr))); + Box::new(iterator) + } + NodeRef::TsFnOrConstructorType(node) => match node { + TsFnOrConstructorType::TsFnType(v0) => { + Box::new(::std::iter::once(NodeRef::TsFnType(v0))) + } + TsFnOrConstructorType::TsConstructorType(v0) => { + Box::new(::std::iter::once(NodeRef::TsConstructorType(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsFnParam(node) => match node { + TsFnParam::Ident(v0) => Box::new(::std::iter::once(NodeRef::BindingIdent(v0))), + TsFnParam::Array(v0) => Box::new(::std::iter::once(NodeRef::ArrayPat(v0))), + TsFnParam::Rest(v0) => Box::new(::std::iter::once(NodeRef::RestPat(v0))), + TsFnParam::Object(v0) => Box::new(::std::iter::once(NodeRef::ObjectPat(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsFnType(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + }); + Box::new(iterator) + } + NodeRef::TsGetterSignature(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.key; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + Box::new(iterator) + } + NodeRef::TsImportEqualsDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain(::std::iter::once(NodeRef::TsModuleRef(&node.module_ref))); + Box::new(iterator) + } + NodeRef::TsImportType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Str(&node.arg))) + .chain( + node.qualifier + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsEntityName(&item))), + ) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + Box::new(iterator) + } + NodeRef::TsIndexSignature(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + Box::new(iterator) + } + NodeRef::TsIndexedAccessType(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.obj_type; + ::std::iter::once(NodeRef::TsType(&item)) + }) + .chain({ + let item = &*node.index_type; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsInferType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsTypeParam(&node.type_param))); + Box::new(iterator) + } + NodeRef::TsInstantiation(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.type_args; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + }); + Box::new(iterator) + } + NodeRef::TsInterfaceBody(node) => { + let iterator = ::std::iter::empty::>().chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsTypeElement(&item))), + ); + Box::new(iterator) + } + NodeRef::TsInterfaceDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain( + node.extends + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsExprWithTypeArgs(&item))), + ) + .chain(::std::iter::once(NodeRef::TsInterfaceBody(&node.body))); + Box::new(iterator) + } + NodeRef::TsIntersectionType(node) => { + let iterator = ::std::iter::empty::>().chain( + node.types.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsType(&item)) + }), + ); + Box::new(iterator) + } + NodeRef::TsKeywordType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsKeywordTypeKind(&node.kind))); + Box::new(iterator) + } + NodeRef::TsKeywordTypeKind(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsLit(node) => match node { + TsLit::Number(v0) => Box::new(::std::iter::once(NodeRef::Number(v0))), + TsLit::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + TsLit::Bool(v0) => Box::new(::std::iter::once(NodeRef::Bool(v0))), + TsLit::BigInt(v0) => Box::new(::std::iter::once(NodeRef::BigInt(v0))), + TsLit::Tpl(v0) => Box::new(::std::iter::once(NodeRef::TsTplLitType(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsLitType(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsLit(&node.lit))); + Box::new(iterator) + } + NodeRef::TsMappedType(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.readonly + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TruePlusMinus(&item))), + ) + .chain(::std::iter::once(NodeRef::TsTypeParam(&node.type_param))) + .chain(node.name_type.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsType(&item)) + })) + .chain( + node.optional + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TruePlusMinus(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsType(&item)) + })); + Box::new(iterator) + } + NodeRef::TsMethodSignature(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.key; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsFnParam(&item))), + ) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })); + Box::new(iterator) + } + NodeRef::TsModuleBlock(node) => { + let iterator = ::std::iter::empty::>().chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::ModuleItem(&item))), + ); + Box::new(iterator) + } + NodeRef::TsModuleDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsModuleName(&node.id))) + .chain( + node.body + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsNamespaceBody(&item))), + ); + Box::new(iterator) + } + NodeRef::TsModuleName(node) => match node { + TsModuleName::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + TsModuleName::Str(v0) => Box::new(::std::iter::once(NodeRef::Str(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsModuleRef(node) => match node { + TsModuleRef::TsEntityName(v0) => { + Box::new(::std::iter::once(NodeRef::TsEntityName(v0))) + } + TsModuleRef::TsExternalModuleRef(v0) => { + Box::new(::std::iter::once(NodeRef::TsExternalModuleRef(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsNamespaceBody(node) => match node { + TsNamespaceBody::TsModuleBlock(v0) => { + Box::new(::std::iter::once(NodeRef::TsModuleBlock(v0))) + } + TsNamespaceBody::TsNamespaceDecl(v0) => { + Box::new(::std::iter::once(NodeRef::TsNamespaceDecl(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsNamespaceDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain({ + let item = &*node.body; + ::std::iter::once(NodeRef::TsNamespaceBody(&item)) + }); + Box::new(iterator) + } + NodeRef::TsNamespaceExportDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))); + Box::new(iterator) + } + NodeRef::TsNonNullExpr(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::TsOptionalType(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsParamProp(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.decorators + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Decorator(&item))), + ) + .chain( + node.accessibility + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Accessibility(&item))), + ) + .chain(::std::iter::once(NodeRef::TsParamPropParam(&node.param))); + Box::new(iterator) + } + NodeRef::TsParamPropParam(node) => match node { + TsParamPropParam::Ident(v0) => { + Box::new(::std::iter::once(NodeRef::BindingIdent(v0))) + } + TsParamPropParam::Assign(v0) => Box::new(::std::iter::once(NodeRef::AssignPat(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsParenthesizedType(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsPropertySignature(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.key; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + Box::new(iterator) + } + NodeRef::TsQualifiedName(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsEntityName(&node.left))) + .chain(::std::iter::once(NodeRef::IdentName(&node.right))); + Box::new(iterator) + } + NodeRef::TsRestType(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsSatisfiesExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsSetterSignature(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.key; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain(::std::iter::once(NodeRef::TsFnParam(&node.param))); + Box::new(iterator) + } + NodeRef::TsThisType(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::TsThisTypeOrIdent(node) => match node { + TsThisTypeOrIdent::TsThisType(v0) => { + Box::new(::std::iter::once(NodeRef::TsThisType(v0))) + } + TsThisTypeOrIdent::Ident(v0) => Box::new(::std::iter::once(NodeRef::Ident(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsTplLitType(node) => { + let iterator = ::std::iter::empty::>() + .chain(node.types.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsType(&item)) + })) + .chain( + node.quasis + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TplElement(&item))), + ); + Box::new(iterator) + } + NodeRef::TsTupleElement(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.label + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Pat(&item))), + ) + .chain({ + let item = &*node.ty; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsTupleType(node) => { + let iterator = ::std::iter::empty::>().chain( + node.elem_types + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsTupleElement(&item))), + ); + Box::new(iterator) + } + NodeRef::TsType(node) => match node { + TsType::TsKeywordType(v0) => { + Box::new(::std::iter::once(NodeRef::TsKeywordType(v0))) + } + TsType::TsThisType(v0) => Box::new(::std::iter::once(NodeRef::TsThisType(v0))), + TsType::TsFnOrConstructorType(v0) => { + Box::new(::std::iter::once(NodeRef::TsFnOrConstructorType(v0))) + } + TsType::TsTypeRef(v0) => Box::new(::std::iter::once(NodeRef::TsTypeRef(v0))), + TsType::TsTypeQuery(v0) => Box::new(::std::iter::once(NodeRef::TsTypeQuery(v0))), + TsType::TsTypeLit(v0) => Box::new(::std::iter::once(NodeRef::TsTypeLit(v0))), + TsType::TsArrayType(v0) => Box::new(::std::iter::once(NodeRef::TsArrayType(v0))), + TsType::TsTupleType(v0) => Box::new(::std::iter::once(NodeRef::TsTupleType(v0))), + TsType::TsOptionalType(v0) => { + Box::new(::std::iter::once(NodeRef::TsOptionalType(v0))) + } + TsType::TsRestType(v0) => Box::new(::std::iter::once(NodeRef::TsRestType(v0))), + TsType::TsUnionOrIntersectionType(v0) => { + Box::new(::std::iter::once(NodeRef::TsUnionOrIntersectionType(v0))) + } + TsType::TsConditionalType(v0) => { + Box::new(::std::iter::once(NodeRef::TsConditionalType(v0))) + } + TsType::TsInferType(v0) => Box::new(::std::iter::once(NodeRef::TsInferType(v0))), + TsType::TsParenthesizedType(v0) => { + Box::new(::std::iter::once(NodeRef::TsParenthesizedType(v0))) + } + TsType::TsTypeOperator(v0) => { + Box::new(::std::iter::once(NodeRef::TsTypeOperator(v0))) + } + TsType::TsIndexedAccessType(v0) => { + Box::new(::std::iter::once(NodeRef::TsIndexedAccessType(v0))) + } + TsType::TsMappedType(v0) => Box::new(::std::iter::once(NodeRef::TsMappedType(v0))), + TsType::TsLitType(v0) => Box::new(::std::iter::once(NodeRef::TsLitType(v0))), + TsType::TsTypePredicate(v0) => { + Box::new(::std::iter::once(NodeRef::TsTypePredicate(v0))) + } + TsType::TsImportType(v0) => Box::new(::std::iter::once(NodeRef::TsImportType(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsTypeAliasDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.id))) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamDecl(&item)) + })) + .chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsTypeAnn(node) => { + let iterator = ::std::iter::empty::>().chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsTypeAssertion(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.expr; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsTypeElement(node) => match node { + TsTypeElement::TsCallSignatureDecl(v0) => { + Box::new(::std::iter::once(NodeRef::TsCallSignatureDecl(v0))) + } + TsTypeElement::TsConstructSignatureDecl(v0) => { + Box::new(::std::iter::once(NodeRef::TsConstructSignatureDecl(v0))) + } + TsTypeElement::TsPropertySignature(v0) => { + Box::new(::std::iter::once(NodeRef::TsPropertySignature(v0))) + } + TsTypeElement::TsGetterSignature(v0) => { + Box::new(::std::iter::once(NodeRef::TsGetterSignature(v0))) + } + TsTypeElement::TsSetterSignature(v0) => { + Box::new(::std::iter::once(NodeRef::TsSetterSignature(v0))) + } + TsTypeElement::TsMethodSignature(v0) => { + Box::new(::std::iter::once(NodeRef::TsMethodSignature(v0))) + } + TsTypeElement::TsIndexSignature(v0) => { + Box::new(::std::iter::once(NodeRef::TsIndexSignature(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsTypeLit(node) => { + let iterator = ::std::iter::empty::>().chain( + node.members + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsTypeElement(&item))), + ); + Box::new(iterator) + } + NodeRef::TsTypeOperator(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsTypeOperatorOp(&node.op))) + .chain({ + let item = &*node.type_ann; + ::std::iter::once(NodeRef::TsType(&item)) + }); + Box::new(iterator) + } + NodeRef::TsTypeOperatorOp(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsTypeParam(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Ident(&node.name))) + .chain(node.constraint.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsType(&item)) + })) + .chain(node.default.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsType(&item)) + })); + Box::new(iterator) + } + NodeRef::TsTypeParamDecl(node) => { + let iterator = ::std::iter::empty::>().chain( + node.params + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::TsTypeParam(&item))), + ); + Box::new(iterator) + } + NodeRef::TsTypeParamInstantiation(node) => { + let iterator = ::std::iter::empty::>().chain( + node.params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsType(&item)) + }), + ); + Box::new(iterator) + } + NodeRef::TsTypePredicate(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsThisTypeOrIdent( + &node.param_name, + ))) + .chain(node.type_ann.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeAnn(&item)) + })); + Box::new(iterator) + } + NodeRef::TsTypeQuery(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsTypeQueryExpr(&node.expr_name))) + .chain(node.type_args.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + Box::new(iterator) + } + NodeRef::TsTypeQueryExpr(node) => match node { + TsTypeQueryExpr::TsEntityName(v0) => { + Box::new(::std::iter::once(NodeRef::TsEntityName(v0))) + } + TsTypeQueryExpr::Import(v0) => { + Box::new(::std::iter::once(NodeRef::TsImportType(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsTypeRef(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::TsEntityName(&node.type_name))) + .chain(node.type_params.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsTypeParamInstantiation(&item)) + })); + Box::new(iterator) + } + NodeRef::TsUnionOrIntersectionType(node) => match node { + TsUnionOrIntersectionType::TsUnionType(v0) => { + Box::new(::std::iter::once(NodeRef::TsUnionType(v0))) + } + TsUnionOrIntersectionType::TsIntersectionType(v0) => { + Box::new(::std::iter::once(NodeRef::TsIntersectionType(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TsUnionType(node) => { + let iterator = ::std::iter::empty::>().chain( + node.types.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::TsType(&item)) + }), + ); + Box::new(iterator) + } + NodeRef::UnaryExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::UnaryOp(&node.op))) + .chain({ + let item = &*node.arg; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::UnaryOp(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::UpdateExpr(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::UpdateOp(&node.op))) + .chain({ + let item = &*node.arg; + ::std::iter::once(NodeRef::Expr(&item)) + }); + Box::new(iterator) + } + NodeRef::UpdateOp(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::UsingDecl(node) => { + let iterator = ::std::iter::empty::>().chain( + node.decls + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::VarDeclarator(&item))), + ); + Box::new(iterator) + } + NodeRef::VarDecl(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::VarDeclKind(&node.kind))) + .chain( + node.decls + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::VarDeclarator(&item))), + ); + Box::new(iterator) + } + NodeRef::VarDeclKind(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::VarDeclOrExpr(node) => match node { + VarDeclOrExpr::VarDecl(v0) => Box::new(::std::iter::once(NodeRef::VarDecl(v0))), + VarDeclOrExpr::Expr(v0) => Box::new(::std::iter::once(NodeRef::Expr(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::VarDeclarator(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Pat(&node.name))) + .chain(node.init.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })); + Box::new(iterator) + } + NodeRef::WhileStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.test; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.body; + ::std::iter::once(NodeRef::Stmt(&item)) + }); + Box::new(iterator) + } + NodeRef::WithStmt(node) => { + let iterator = ::std::iter::empty::>() + .chain({ + let item = &*node.obj; + ::std::iter::once(NodeRef::Expr(&item)) + }) + .chain({ + let item = &*node.body; + ::std::iter::once(NodeRef::Stmt(&item)) + }); + Box::new(iterator) + } + NodeRef::YieldExpr(node) => { + let iterator = + ::std::iter::empty::>().chain(node.arg.iter().flat_map(|item| { + let item = &*item; + ::std::iter::once(NodeRef::Expr(&item)) + })); + Box::new(iterator) + } + } + } +} #[cfg(any(docsrs, feature = "path"))] pub use self::fields::{AstParentKind, AstParentNodeRef}; diff --git a/crates/swc_html_visit/src/generated.rs b/crates/swc_html_visit/src/generated.rs index e27acacf5abe3..8054a4075ee60 100644 --- a/crates/swc_html_visit/src/generated.rs +++ b/crates/swc_html_visit/src/generated.rs @@ -11092,7 +11092,6 @@ pub mod fields { #[doc = "Represents [`TokenAndSpan::token`]"] Token, } - #[cfg(any(docsrs, feature = "path"))] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum AstParentKind { Attribute(AttributeField), @@ -11131,7 +11130,6 @@ pub mod fields { } } } - #[cfg(any(docsrs, feature = "path"))] #[derive(Debug, Clone, Copy)] pub enum AstParentNodeRef<'ast> { Attribute(&'ast Attribute, AttributeField), @@ -11176,6 +11174,7 @@ pub mod fields { } } } + #[cfg(any(docsrs, feature = "path"))] impl<'ast> AstParentNodeRef<'ast> { #[inline] pub fn kind(&self) -> AstParentKind { @@ -11202,5 +11201,185 @@ pub mod fields { } } } +impl<'ast> From<&'ast Attribute> for NodeRef<'ast> { + fn from(node: &'ast Attribute) -> Self { + NodeRef::Attribute(node) + } +} +impl<'ast> From<&'ast AttributeToken> for NodeRef<'ast> { + fn from(node: &'ast AttributeToken) -> Self { + NodeRef::AttributeToken(node) + } +} +impl<'ast> From<&'ast Child> for NodeRef<'ast> { + fn from(node: &'ast Child) -> Self { + NodeRef::Child(node) + } +} +impl<'ast> From<&'ast Comment> for NodeRef<'ast> { + fn from(node: &'ast Comment) -> Self { + NodeRef::Comment(node) + } +} +impl<'ast> From<&'ast Document> for NodeRef<'ast> { + fn from(node: &'ast Document) -> Self { + NodeRef::Document(node) + } +} +impl<'ast> From<&'ast DocumentFragment> for NodeRef<'ast> { + fn from(node: &'ast DocumentFragment) -> Self { + NodeRef::DocumentFragment(node) + } +} +impl<'ast> From<&'ast DocumentMode> for NodeRef<'ast> { + fn from(node: &'ast DocumentMode) -> Self { + NodeRef::DocumentMode(node) + } +} +impl<'ast> From<&'ast DocumentType> for NodeRef<'ast> { + fn from(node: &'ast DocumentType) -> Self { + NodeRef::DocumentType(node) + } +} +impl<'ast> From<&'ast Element> for NodeRef<'ast> { + fn from(node: &'ast Element) -> Self { + NodeRef::Element(node) + } +} +impl<'ast> From<&'ast Namespace> for NodeRef<'ast> { + fn from(node: &'ast Namespace) -> Self { + NodeRef::Namespace(node) + } +} +impl<'ast> From<&'ast Raw> for NodeRef<'ast> { + fn from(node: &'ast Raw) -> Self { + NodeRef::Raw(node) + } +} +impl<'ast> From<&'ast Text> for NodeRef<'ast> { + fn from(node: &'ast Text) -> Self { + NodeRef::Text(node) + } +} +impl<'ast> From<&'ast Token> for NodeRef<'ast> { + fn from(node: &'ast Token) -> Self { + NodeRef::Token(node) + } +} +impl<'ast> From<&'ast TokenAndSpan> for NodeRef<'ast> { + fn from(node: &'ast TokenAndSpan) -> Self { + NodeRef::TokenAndSpan(node) + } +} +#[derive(Debug, Clone, Copy)] +pub enum NodeRef<'ast> { + Attribute(&'ast Attribute), + AttributeToken(&'ast AttributeToken), + Child(&'ast Child), + Comment(&'ast Comment), + Document(&'ast Document), + DocumentFragment(&'ast DocumentFragment), + DocumentMode(&'ast DocumentMode), + DocumentType(&'ast DocumentType), + Element(&'ast Element), + Namespace(&'ast Namespace), + Raw(&'ast Raw), + Text(&'ast Text), + Token(&'ast Token), + TokenAndSpan(&'ast TokenAndSpan), +} +impl<'ast> NodeRef<'ast> { + #[allow(unreachable_patterns)] + pub fn raw_children(&'ast self) -> Box>> { + match self { + NodeRef::Attribute(node) => { + let iterator = ::std::iter::empty::>().chain( + node.namespace + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Namespace(&item))), + ); + Box::new(iterator) + } + NodeRef::AttributeToken(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Child(node) => match node { + Child::DocumentType(v0) => Box::new(::std::iter::once(NodeRef::DocumentType(v0))), + Child::Element(v0) => Box::new(::std::iter::once(NodeRef::Element(v0))), + Child::Text(v0) => Box::new(::std::iter::once(NodeRef::Text(v0))), + Child::Comment(v0) => Box::new(::std::iter::once(NodeRef::Comment(v0))), + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Comment(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Document(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::DocumentMode(&node.mode))) + .chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Child(&item))), + ); + Box::new(iterator) + } + NodeRef::DocumentFragment(node) => { + let iterator = ::std::iter::empty::>().chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Child(&item))), + ); + Box::new(iterator) + } + NodeRef::DocumentMode(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::DocumentType(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Element(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Namespace(&node.namespace))) + .chain( + node.attributes + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Attribute(&item))), + ) + .chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Child(&item))), + ) + .chain( + node.content + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::DocumentFragment(&item))), + ); + Box::new(iterator) + } + NodeRef::Namespace(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Raw(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Text(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Token(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TokenAndSpan(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Token(&node.token))); + Box::new(iterator) + } + } + } +} #[cfg(any(docsrs, feature = "path"))] pub use self::fields::{AstParentKind, AstParentNodeRef}; diff --git a/crates/swc_xml_visit/src/generated.rs b/crates/swc_xml_visit/src/generated.rs index 7e90b040ad2bb..237deb6c6537b 100644 --- a/crates/swc_xml_visit/src/generated.rs +++ b/crates/swc_xml_visit/src/generated.rs @@ -10660,7 +10660,6 @@ pub mod fields { #[doc = "Represents [`TokenAndSpan::token`]"] Token, } - #[cfg(any(docsrs, feature = "path"))] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum AstParentKind { Attribute(AttributeField), @@ -10699,7 +10698,6 @@ pub mod fields { } } } - #[cfg(any(docsrs, feature = "path"))] #[derive(Debug, Clone, Copy)] pub enum AstParentNodeRef<'ast> { Attribute(&'ast Attribute, AttributeField), @@ -10744,6 +10742,7 @@ pub mod fields { } } } + #[cfg(any(docsrs, feature = "path"))] impl<'ast> AstParentNodeRef<'ast> { #[inline] pub fn kind(&self) -> AstParentKind { @@ -10770,5 +10769,178 @@ pub mod fields { } } } +impl<'ast> From<&'ast Attribute> for NodeRef<'ast> { + fn from(node: &'ast Attribute) -> Self { + NodeRef::Attribute(node) + } +} +impl<'ast> From<&'ast AttributeToken> for NodeRef<'ast> { + fn from(node: &'ast AttributeToken) -> Self { + NodeRef::AttributeToken(node) + } +} +impl<'ast> From<&'ast CdataSection> for NodeRef<'ast> { + fn from(node: &'ast CdataSection) -> Self { + NodeRef::CdataSection(node) + } +} +impl<'ast> From<&'ast Child> for NodeRef<'ast> { + fn from(node: &'ast Child) -> Self { + NodeRef::Child(node) + } +} +impl<'ast> From<&'ast Comment> for NodeRef<'ast> { + fn from(node: &'ast Comment) -> Self { + NodeRef::Comment(node) + } +} +impl<'ast> From<&'ast Document> for NodeRef<'ast> { + fn from(node: &'ast Document) -> Self { + NodeRef::Document(node) + } +} +impl<'ast> From<&'ast DocumentMode> for NodeRef<'ast> { + fn from(node: &'ast DocumentMode) -> Self { + NodeRef::DocumentMode(node) + } +} +impl<'ast> From<&'ast DocumentType> for NodeRef<'ast> { + fn from(node: &'ast DocumentType) -> Self { + NodeRef::DocumentType(node) + } +} +impl<'ast> From<&'ast Element> for NodeRef<'ast> { + fn from(node: &'ast Element) -> Self { + NodeRef::Element(node) + } +} +impl<'ast> From<&'ast Namespace> for NodeRef<'ast> { + fn from(node: &'ast Namespace) -> Self { + NodeRef::Namespace(node) + } +} +impl<'ast> From<&'ast ProcessingInstruction> for NodeRef<'ast> { + fn from(node: &'ast ProcessingInstruction) -> Self { + NodeRef::ProcessingInstruction(node) + } +} +impl<'ast> From<&'ast Text> for NodeRef<'ast> { + fn from(node: &'ast Text) -> Self { + NodeRef::Text(node) + } +} +impl<'ast> From<&'ast Token> for NodeRef<'ast> { + fn from(node: &'ast Token) -> Self { + NodeRef::Token(node) + } +} +impl<'ast> From<&'ast TokenAndSpan> for NodeRef<'ast> { + fn from(node: &'ast TokenAndSpan) -> Self { + NodeRef::TokenAndSpan(node) + } +} +#[derive(Debug, Clone, Copy)] +pub enum NodeRef<'ast> { + Attribute(&'ast Attribute), + AttributeToken(&'ast AttributeToken), + CdataSection(&'ast CdataSection), + Child(&'ast Child), + Comment(&'ast Comment), + Document(&'ast Document), + DocumentMode(&'ast DocumentMode), + DocumentType(&'ast DocumentType), + Element(&'ast Element), + Namespace(&'ast Namespace), + ProcessingInstruction(&'ast ProcessingInstruction), + Text(&'ast Text), + Token(&'ast Token), + TokenAndSpan(&'ast TokenAndSpan), +} +impl<'ast> NodeRef<'ast> { + #[allow(unreachable_patterns)] + pub fn raw_children(&'ast self) -> Box>> { + match self { + NodeRef::Attribute(node) => { + let iterator = ::std::iter::empty::>().chain( + node.namespace + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Namespace(&item))), + ); + Box::new(iterator) + } + NodeRef::AttributeToken(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::CdataSection(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Child(node) => match node { + Child::DocumentType(v0) => Box::new(::std::iter::once(NodeRef::DocumentType(v0))), + Child::Element(v0) => Box::new(::std::iter::once(NodeRef::Element(v0))), + Child::Text(v0) => Box::new(::std::iter::once(NodeRef::Text(v0))), + Child::CdataSection(v0) => Box::new(::std::iter::once(NodeRef::CdataSection(v0))), + Child::Comment(v0) => Box::new(::std::iter::once(NodeRef::Comment(v0))), + Child::ProcessingInstruction(v0) => { + Box::new(::std::iter::once(NodeRef::ProcessingInstruction(v0))) + } + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::Comment(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Document(node) => { + let iterator = ::std::iter::empty::>().chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Child(&item))), + ); + Box::new(iterator) + } + NodeRef::DocumentMode(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::DocumentType(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Element(node) => { + let iterator = ::std::iter::empty::>() + .chain( + node.attributes + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Attribute(&item))), + ) + .chain( + node.children + .iter() + .flat_map(|item| ::std::iter::once(NodeRef::Child(&item))), + ); + Box::new(iterator) + } + NodeRef::Namespace(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::ProcessingInstruction(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Text(node) => { + let iterator = ::std::iter::empty::>(); + Box::new(iterator) + } + NodeRef::Token(node) => match node { + _ => Box::new(::std::iter::empty::>()), + }, + NodeRef::TokenAndSpan(node) => { + let iterator = ::std::iter::empty::>() + .chain(::std::iter::once(NodeRef::Token(&node.token))); + Box::new(iterator) + } + } + } +} #[cfg(any(docsrs, feature = "path"))] pub use self::fields::{AstParentKind, AstParentNodeRef}; diff --git a/tools/generate-code/src/generators/visitor.rs b/tools/generate-code/src/generators/visitor.rs index d57f41dcc1902..898328376063c 100644 --- a/tools/generate-code/src/generators/visitor.rs +++ b/tools/generate-code/src/generators/visitor.rs @@ -1261,14 +1261,71 @@ fn extract_generic<'a>(name: &str, ty: &'a Type) -> Option<&'a Type> { None } + +fn to_iter(e: TokenStream, ty: &Type, node_names: &[Ident]) -> Option { + if let Some(ty) = extract_vec(ty) { + let inner_expr = to_iter(quote!(item), ty, node_names)?; + return Some(parse_quote!(#e.iter().flat_map(|item| #inner_expr))); + } + + if let Some(ty) = extract_generic("Option", ty) { + let inner_expr = to_iter(quote!(item), ty, node_names)?; + return Some(parse_quote!(#e.iter().flat_map(|item| #inner_expr))); + } + + if let Some(ty) = extract_generic("Box", ty) { + let inner_expr = to_iter(quote!(item), ty, node_names)?; + return Some(parse_quote!({ + let item = &*#e; + #inner_expr + })); + } + + if let Type::Path(p) = ty { + let ty = &p.path.segments.last().unwrap().ident; + + if node_names.contains(ty) { + return Some(parse_quote!(::std::iter::once(NodeRef::#ty(&#e)))); + } + + None + } else { + todo!("to_iter for {:?}", ty); + } +} + fn define_fields(crate_name: &Ident, node_types: &[&Item]) -> Vec { let mut items = Vec::::new(); let mut kind_enum_members = Vec::new(); + let mut parent_enum_members = Vec::new(); let mut node_ref_enum_members = Vec::new(); let mut kind_set_index_arms = Vec::::new(); let mut node_ref_set_index_arms = Vec::::new(); let mut node_ref_kind_arms = Vec::::new(); + let mut node_ref_iter_next_arms = Vec::::new(); + + let node_names = node_types + .iter() + .filter_map(|ty| match ty { + Item::Enum(data) => Some(data.ident.clone()), + Item::Struct(data) => Some(data.ident.clone()), + _ => None, + }) + .collect::>(); + + let is_node_ref_raw = |ty: &Type| match ty { + Type::Path(p) => node_names.contains(&p.path.segments.last().unwrap().ident), + _ => false, + }; + + let is_node_ref = |ty: &Type| { + if let Some(ty) = extract_generic("Box", ty) { + return is_node_ref_raw(ty); + } + + is_node_ref_raw(ty) + }; { let mut defs = Vec::::new(); @@ -1330,10 +1387,58 @@ fn define_fields(crate_name: &Ident, node_types: &[&Item]) -> Vec { #type_name(#fields_enum_name) )); - node_ref_enum_members.push(quote!( + parent_enum_members.push(quote!( #type_name(&'ast #type_name, #fields_enum_name) )); + node_ref_enum_members.push(quote!( + #type_name(&'ast #type_name) + )); + + items.push(parse_quote!( + impl<'ast> From<&'ast #type_name> for NodeRef<'ast> { + fn from(node: &'ast #type_name) -> Self { + NodeRef::#type_name(node) + } + } + )); + + { + let mut arms = Vec::::new(); + + for variant in &data.variants { + let variant_name = &variant.ident; + + // TODO: Support all kinds of fields + if variant.fields.len() != 1 { + continue; + } + + for f in variant.fields.iter().filter(|f| is_node_ref(&f.ty)) { + let mut ty = &f.ty; + if let Some(inner) = extract_generic("Box", ty) { + ty = inner; + } + + arms.push(parse_quote!( + #type_name::#variant_name(v0) => { + Box::new(::std::iter::once(NodeRef::#ty(v0))) + }, + )); + } + } + + node_ref_iter_next_arms.push(parse_quote!( + NodeRef::#type_name(node) => { + match node { + #(#arms)* + + _ => Box::new(::std::iter::empty::>()) + } + } + )); + } + defs.push(parse_quote!( impl #fields_enum_name { #[inline(always)] @@ -1361,10 +1466,51 @@ fn define_fields(crate_name: &Ident, node_types: &[&Item]) -> Vec { #type_name(#fields_enum_name) )); - node_ref_enum_members.push(quote!( + parent_enum_members.push(quote!( #type_name(&'ast #type_name, #fields_enum_name) )); + node_ref_enum_members.push(quote!( + #type_name(&'ast #type_name) + )); + + items.push(parse_quote!( + impl<'ast> From<&'ast #type_name> for NodeRef<'ast> { + fn from(node: &'ast #type_name) -> Self { + NodeRef::#type_name(node) + } + } + )); + + { + let mut iter: Expr = parse_quote!(::std::iter::empty::>()); + + match &data.fields { + Fields::Named(fields) => { + for f in fields.named.iter() { + let ident = &f.ident; + let iter_expr = + to_iter(quote!(node.#ident), &f.ty, &node_names); + if let Some(iter_expr) = iter_expr { + iter = parse_quote!(#iter.chain(#iter_expr)); + } + } + } + + Fields::Unnamed(_fields) => { + // TODO: Support unnamed fields + } + Fields::Unit => {} + } + + node_ref_iter_next_arms.push(parse_quote!( + NodeRef::#type_name(node) => { + let iterator = #iter; + Box::new(iterator) + } + )); + } + defs.push(parse_quote!( impl #fields_enum_name { pub(crate) fn set_index(&mut self, index: usize) { @@ -1392,7 +1538,6 @@ fn define_fields(crate_name: &Ident, node_types: &[&Item]) -> Vec { { defs.push(parse_quote!( - #[cfg(any(docsrs, feature = "path"))] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum AstParentKind { #(#kind_enum_members),* @@ -1413,9 +1558,14 @@ fn define_fields(crate_name: &Ident, node_types: &[&Item]) -> Vec { { defs.push(parse_quote!( - #[cfg(any(docsrs, feature = "path"))] #[derive(Debug, Clone, Copy)] pub enum AstParentNodeRef<'ast> { + #(#parent_enum_members),* + } + )); + items.push(parse_quote!( + #[derive(Debug, Clone, Copy)] + pub enum NodeRef<'ast> { #(#node_ref_enum_members),* } )); @@ -1437,6 +1587,7 @@ fn define_fields(crate_name: &Ident, node_types: &[&Item]) -> Vec { } )); defs.push(parse_quote!( + #[cfg(any(docsrs, feature = "path"))] impl<'ast> AstParentNodeRef<'ast> { #[inline] pub fn kind(&self) -> AstParentKind { @@ -1446,14 +1597,27 @@ fn define_fields(crate_name: &Ident, node_types: &[&Item]) -> Vec { } } )); + items.push(parse_quote!( + impl<'ast> NodeRef<'ast> { + #[allow(unreachable_patterns)] + pub fn raw_children(&'ast self) -> Box>> { + match self { + #(#node_ref_iter_next_arms)* + } + } + } + )); } - items.push(parse_quote!( - #[cfg(any(docsrs, feature = "path"))] - pub mod fields { - #(#defs)* - } - )); + items.insert( + 0, + parse_quote!( + #[cfg(any(docsrs, feature = "path"))] + pub mod fields { + #(#defs)* + } + ), + ); items.push(parse_quote!( #[cfg(any(docsrs, feature = "path"))] From 74d6478be1eb8cdf1df096c360c159db64b64d8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 20 Aug 2024 15:54:20 +0900 Subject: [PATCH 36/59] feat(bindings/html): Allow using `lightningcss` as minfiier (#9462) --- bindings/Cargo.lock | 243 ++++++++++++++++++++++-- bindings/Cargo.toml | 5 + bindings/binding_html_node/Cargo.toml | 35 ++-- bindings/binding_html_node/src/lib.rs | 255 +++++++++++++++++++++++++- packages/html/index.ts | 5 +- 5 files changed, 507 insertions(+), 36 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 3d00991fcb6b0..791179ff23ce7 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -253,6 +253,7 @@ name = "binding_html_node" version = "0.1.0" dependencies = [ "anyhow", + "lightningcss", "napi", "napi-build", "napi-derive", @@ -261,6 +262,10 @@ dependencies = [ "swc_atoms", "swc_cached", "swc_common", + "swc_css_ast", + "swc_css_codegen", + "swc_css_minifier", + "swc_css_parser", "swc_error_reporters", "swc_html", "swc_html_ast", @@ -403,7 +408,7 @@ dependencies = [ "chrono", "either", "indexmap 2.4.0", - "itertools", + "itertools 0.13.0", "nom", "once_cell", "serde", @@ -582,6 +587,26 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "const-str" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21077772762a1002bb421c3af42ac1725fa56066bfc53d9a55bb79905df2aaf3" +dependencies = [ + "const-str-proc-macro", +] + +[[package]] +name = "const-str-proc-macro" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e1e0fdd2e5d3041e530e1b21158aeeef8b5d0e306bc5c1e3d6cf0930d10e25a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "constant_time_eq" version = "0.3.0" @@ -797,6 +822,38 @@ dependencies = [ "typenum", ] +[[package]] +name = "cssparser" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9be934d936a0fbed5bcdc01042b770de1398bf79d0e192f49fa7faea0e99281e" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf 0.11.2", + "smallvec", +] + +[[package]] +name = "cssparser-color" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556c099a61d85989d7af52b692e35a8d68a57e7df8c6d07563dc0778b3960c9f" +dependencies = [ + "cssparser", +] + +[[package]] +name = "cssparser-macros" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" +dependencies = [ + "quote", + "syn 2.0.75", +] + [[package]] name = "ctor" version = "0.2.8" @@ -895,6 +952,15 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +[[package]] +name = "data-url" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30bfce702bcfa94e906ef82421f2c0e61c076ad76030c16ee5d2e9a32fe193" +dependencies = [ + "matches", +] + [[package]] name = "debugid" version = "0.8.0" @@ -975,6 +1041,21 @@ dependencies = [ "litrs", ] +[[package]] +name = "dtoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + [[package]] name = "dunce" version = "1.0.4" @@ -1386,7 +1467,7 @@ dependencies = [ "hashbrown 0.14.5", "new_debug_unreachable", "once_cell", - "phf", + "phf 0.11.2", "rustc-hash", "triomphe", ] @@ -1515,6 +1596,15 @@ dependencies = [ "syn 2.0.75", ] +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -1674,6 +1764,44 @@ dependencies = [ "libc", ] +[[package]] +name = "lightningcss" +version = "1.0.0-alpha.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec380ca49dc7f6a1cafbdd2de5e587958eac0f67ab26b1e56727fcc60a0c3d4d" +dependencies = [ + "ahash 0.8.11", + "bitflags 2.6.0", + "const-str", + "cssparser", + "cssparser-color", + "dashmap", + "data-encoding", + "getrandom", + "itertools 0.10.5", + "lazy_static", + "lightningcss-derive", + "parcel_selectors", + "parcel_sourcemap", + "paste", + "pathdiff", + "rayon", + "serde", + "smallvec", +] + +[[package]] +name = "lightningcss-derive" +version = "1.0.0-alpha.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12744d1279367caed41739ef094c325d53fb0ffcd4f9b84a368796f870252" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -1765,6 +1893,12 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + [[package]] name = "memchr" version = "2.7.4" @@ -2071,6 +2205,36 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" +[[package]] +name = "parcel_selectors" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512215cb1d3814e276ace4ec2dbc2cac16726ea3fcac20c22ae1197e16fdd72d" +dependencies = [ + "bitflags 2.6.0", + "cssparser", + "fxhash", + "log", + "phf 0.10.1", + "phf_codegen", + "precomputed-hash", + "smallvec", +] + +[[package]] +name = "parcel_sourcemap" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "485b74d7218068b2b7c0e3ff12fbc61ae11d57cb5d8224f525bd304c6be05bbb" +dependencies = [ + "base64-simd", + "data-url", + "rkyv", + "serde", + "serde_json", + "vlq", +] + [[package]] name = "parking_lot" version = "0.12.3" @@ -2094,6 +2258,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "path-absolutize" version = "3.1.1" @@ -2146,6 +2316,15 @@ dependencies = [ "indexmap 2.4.0", ] +[[package]] +name = "phf" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +dependencies = [ + "phf_shared 0.10.0", +] + [[package]] name = "phf" version = "0.11.2" @@ -2153,7 +2332,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", - "phf_shared", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_codegen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", +] + +[[package]] +name = "phf_generator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared 0.10.0", + "rand", ] [[package]] @@ -2162,7 +2361,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "phf_shared", + "phf_shared 0.11.2", "rand", ] @@ -2172,13 +2371,22 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.11.2", + "phf_shared 0.11.2", "proc-macro2", "quote", "syn 2.0.75", ] +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + [[package]] name = "phf_shared" version = "0.11.2" @@ -2235,6 +2443,12 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + [[package]] name = "preset_env_base" version = "0.5.1" @@ -3423,7 +3637,7 @@ dependencies = [ "bytecheck", "is-macro", "num-bigint", - "phf", + "phf 0.11.2", "rkyv", "scoped-tls", "serde", @@ -3664,7 +3878,7 @@ version = "0.120.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad03ee53c734eb74757d03c07ec71b1a982261830c9253ef3e2e4a089f9af25d" dependencies = [ - "phf", + "phf 0.11.2", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -3726,7 +3940,7 @@ dependencies = [ "num_cpus", "once_cell", "parking_lot", - "phf", + "phf 0.11.2", "radix_fmt", "rayon", "regex", @@ -3760,7 +3974,7 @@ dependencies = [ "new_debug_unreachable", "num-bigint", "num-traits", - "phf", + "phf 0.11.2", "serde", "smallvec", "smartstring", @@ -3827,7 +4041,7 @@ dependencies = [ "bitflags 2.6.0", "indexmap 2.4.0", "once_cell", - "phf", + "phf 0.11.2", "rayon", "rustc-hash", "serde", @@ -4148,7 +4362,6 @@ checksum = "706509020207c5e4dc17e9c6c3adcec901ec5e0d06314050643c3efce8be7fb7" dependencies = [ "swc_html_ast", "swc_html_codegen", - "swc_html_minifier", "swc_html_parser", "swc_html_visit", ] @@ -5077,6 +5290,12 @@ dependencies = [ "virtual-mio", ] +[[package]] +name = "vlq" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65dd7eed29412da847b0f78bcec0ac98588165988a8cfe41d4ea1d429f8ccfff" + [[package]] name = "wai-bindgen-gen-core" version = "0.2.3" diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 2e325bbde3ae8..327483fb5f3e9 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -14,6 +14,7 @@ resolver = "2" anyhow = "1.0.86" backtrace = "0.3" getrandom = "0.2.15" + lightningcss = "1.0.0-alpha.58" napi = { version = "2", default-features = false } napi-build = "2" napi-derive = { version = "2", default-features = false } @@ -30,6 +31,10 @@ resolver = "2" swc_compiler_base = "0.18.1" swc_config = "0.1.15" swc_core = "0.101.3" + swc_css_ast = "0.144.0" + swc_css_codegen = "0.155.0" + swc_css_minifier = "0.120.0" + swc_css_parser = "0.154.0" swc_error_reporters = "0.21.0" swc_fast_ts_strip = "0.6.1" swc_html = "0.148.0" diff --git a/bindings/binding_html_node/Cargo.toml b/bindings/binding_html_node/Cargo.toml index 8ebc5a72ac255..5be8779c18707 100644 --- a/bindings/binding_html_node/Cargo.toml +++ b/bindings/binding_html_node/Cargo.toml @@ -18,18 +18,25 @@ crate-type = ["cdylib"] napi-build = { workspace = true } [dependencies] -anyhow = { workspace = true } -napi = { workspace = true, features = ["napi3", "serde-json"] } -napi-derive = { workspace = true, features = ["type-def"] } -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -swc_atoms = { workspace = true } -swc_cached = { workspace = true } -swc_common = { workspace = true, features = ["diagnostic-serde"] } +anyhow = { workspace = true } +lightningcss = { workspace = true } +napi = { workspace = true, features = ["napi3", "serde-json"] } +napi-derive = { workspace = true, features = ["type-def"] } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +swc_atoms = { workspace = true } +swc_cached = { workspace = true } +swc_common = { workspace = true, features = ["diagnostic-serde"] } +swc_css_ast = { workspace = true } +swc_css_codegen = { workspace = true } +swc_css_minifier = { workspace = true } +swc_css_parser = { workspace = true } swc_error_reporters = { workspace = true } -swc_html = { workspace = true, features = ["minifier"] } -swc_html_ast = { workspace = true, features = ["serde"] } -swc_html_minifier = { workspace = true } -swc_nodejs_common = { workspace = true } -tracing = { workspace = true, features = ["release_max_level_info"] } -tracing-subscriber = { workspace = true, features = ["env-filter"] } +swc_html = { workspace = true, default-features = false } +swc_html_ast = { workspace = true, features = ["serde"] } +swc_html_minifier = { workspace = true, default-features = false, features = [ + "custom-css-minifier", +] } +swc_nodejs_common = { workspace = true } +tracing = { workspace = true, features = ["release_max_level_info"] } +tracing-subscriber = { workspace = true, features = ["env-filter"] } diff --git a/bindings/binding_html_node/src/lib.rs b/bindings/binding_html_node/src/lib.rs index a576bcd24a824..473f1e6e8eb72 100644 --- a/bindings/binding_html_node/src/lib.rs +++ b/bindings/binding_html_node/src/lib.rs @@ -3,14 +3,19 @@ extern crate napi_derive; mod util; -use std::{backtrace::Backtrace, env, panic::set_hook}; +use std::{backtrace::Backtrace, borrow::Cow, env, panic::set_hook}; use anyhow::{bail, Context}; +use lightningcss::{ + printer::PrinterOptions, + stylesheet::{ParserFlags, StyleSheet}, + targets::Targets, +}; use napi::{bindgen_prelude::*, Task}; use serde::{Deserialize, Serialize}; use swc_atoms::js_word; use swc_cached::regex::CachedRegex; -use swc_common::{FileName, DUMMY_SP}; +use swc_common::{sync::Lrc, FileName, FilePathMapping, SourceMap, DUMMY_SP}; use swc_html::{ ast::{DocumentMode, Namespace}, codegen::{ @@ -21,11 +26,12 @@ use swc_html::{ }; use swc_html_ast::{Document, DocumentFragment}; use swc_html_minifier::{ - minify_document, minify_document_fragment, + minify_document_fragment_with_custom_css_minifier, minify_document_with_custom_css_minifier, option::{ - CollapseWhitespaces, CssOptions, MinifierType, MinifyCssOption, MinifyJsOption, - MinifyJsonOption, RemoveRedundantAttributes, + CollapseWhitespaces, MinifierType, MinifyCssOption, MinifyJsOption, MinifyJsonOption, + RemoveRedundantAttributes, }, + CssMinificationMode, MinifyCss, }; use swc_nodejs_common::{deserialize_json, get_deserialized, MapErr}; @@ -138,7 +144,7 @@ pub struct MinifyOptions { #[serde(default = "minify_js_by_default")] minify_js: MinifyJsOption, #[serde(default = "minify_css_by_default")] - minify_css: MinifyCssOption, + minify_css: MinifyCssOption, #[serde(default)] minify_additional_scripts_content: Option>, #[serde(default)] @@ -171,7 +177,7 @@ const fn minify_js_by_default() -> MinifyJsOption { MinifyJsOption::Bool(true) } -const fn minify_css_by_default() -> MinifyCssOption { +const fn minify_css_by_default() -> MinifyCssOption { MinifyCssOption::Bool(true) } @@ -264,6 +270,236 @@ fn create_element(context_element: Element) -> anyhow::Result, + data: String, + mode: swc_html_minifier::CssMinificationMode, + ) -> Option { + let opts = match options { + MinifyCssOption::Bool(v) => { + if *v { + Cow::Owned(CssMinfierOptions::LightningCss(LightningCssOptions {})) + } else { + return None; + } + } + MinifyCssOption::Options(opts) => Cow::Borrowed(opts), + }; + + match &*opts { + CssMinfierOptions::LightningCss(_) => { + let mut ss = StyleSheet::parse( + &data, + lightningcss::stylesheet::ParserOptions { + flags: lightningcss::stylesheet::ParserFlags::all(), + ..Default::default() + }, + ) + .ok()?; + + let targets = Targets::default(); + + ss.minify(lightningcss::stylesheet::MinifyOptions { + targets, + ..Default::default() + }) + .ok()?; + + let to_css_result = ss + .to_css(PrinterOptions { + minify: true, + targets, + ..Default::default() + }) + .ok()?; + + Some(to_css_result.code) + } + + CssMinfierOptions::Swc(options) => { + let mut options = options.clone(); + let mut errors: Vec<_> = Vec::new(); + + let cm = Lrc::new(SourceMap::new(FilePathMapping::empty())); + let fm = cm.new_source_file(FileName::Anon.into(), data); + + let mut stylesheet = match mode { + CssMinificationMode::Stylesheet => { + match swc_css_parser::parse_file(&fm, None, options.parser, &mut errors) { + Ok(stylesheet) => stylesheet, + _ => return None, + } + } + CssMinificationMode::ListOfDeclarations => { + match swc_css_parser::parse_file::>( + &fm, + None, + options.parser, + &mut errors, + ) { + Ok(list_of_declarations) => { + let declaration_list: Vec = + list_of_declarations + .into_iter() + .map(|node| node.into()) + .collect(); + + swc_css_ast::Stylesheet { + span: Default::default(), + rules: vec![swc_css_ast::Rule::QualifiedRule( + swc_css_ast::QualifiedRule { + span: Default::default(), + prelude: + swc_css_ast::QualifiedRulePrelude::SelectorList( + swc_css_ast::SelectorList { + span: Default::default(), + children: Vec::new(), + }, + ), + block: swc_css_ast::SimpleBlock { + span: Default::default(), + name: swc_css_ast::TokenAndSpan { + span: DUMMY_SP, + token: swc_css_ast::Token::LBrace, + }, + value: declaration_list, + }, + } + .into(), + )], + } + } + _ => return None, + } + } + CssMinificationMode::MediaQueryList => { + match swc_css_parser::parse_file::( + &fm, + None, + options.parser, + &mut errors, + ) { + Ok(media_query_list) => swc_css_ast::Stylesheet { + span: Default::default(), + rules: vec![swc_css_ast::Rule::AtRule( + swc_css_ast::AtRule { + span: Default::default(), + name: swc_css_ast::AtRuleName::Ident(swc_css_ast::Ident { + span: Default::default(), + value: "media".into(), + raw: None, + }), + prelude: Some( + swc_css_ast::AtRulePrelude::MediaPrelude( + media_query_list, + ) + .into(), + ), + block: Some(swc_css_ast::SimpleBlock { + span: Default::default(), + name: swc_css_ast::TokenAndSpan { + span: DUMMY_SP, + token: swc_css_ast::Token::LBrace, + }, + // TODO make the `compress_empty` option for CSS + // minifier and + // remove it + value: vec![swc_css_ast::ComponentValue::Str( + Box::new(swc_css_ast::Str { + span: Default::default(), + value: "placeholder".into(), + raw: None, + }), + )], + }), + } + .into(), + )], + }, + _ => return None, + } + } + }; + + // Avoid compress potential invalid CSS + if !errors.is_empty() { + return None; + } + + swc_css_minifier::minify(&mut stylesheet, options.minifier); + + let mut minified = String::new(); + let wr = swc_css_codegen::writer::basic::BasicCssWriter::new( + &mut minified, + None, + swc_css_codegen::writer::basic::BasicCssWriterConfig::default(), + ); + + options.codegen.minify = true; + + let mut gen = swc_css_codegen::CodeGenerator::new(wr, options.codegen); + + match mode { + CssMinificationMode::Stylesheet => { + swc_css_codegen::Emit::emit(&mut gen, &stylesheet).unwrap(); + } + CssMinificationMode::ListOfDeclarations => { + let swc_css_ast::Stylesheet { rules, .. } = &stylesheet; + + // Because CSS is grammar free, protect for fails + let Some(swc_css_ast::Rule::QualifiedRule(qualified_rule)) = rules.first() + else { + return None; + }; + + let swc_css_ast::QualifiedRule { block, .. } = &**qualified_rule; + + swc_css_codegen::Emit::emit(&mut gen, &block).unwrap(); + + minified = minified[1..minified.len() - 1].to_string(); + } + CssMinificationMode::MediaQueryList => { + let swc_css_ast::Stylesheet { rules, .. } = &stylesheet; + + // Because CSS is grammar free, protect for fails + let Some(swc_css_ast::Rule::AtRule(at_rule)) = rules.first() else { + return None; + }; + + let swc_css_ast::AtRule { prelude, .. } = &**at_rule; + + swc_css_codegen::Emit::emit(&mut gen, &prelude).unwrap(); + + minified = minified.trim().to_string(); + } + } + + Some(minified) + } + } + } +} + fn minify_inner( code: &str, opts: MinifyOptions, @@ -402,13 +638,14 @@ fn minify_inner( match document_or_document_fragment { DocumentOrDocumentFragment::Document(ref mut document) => { - minify_document(document, &options); + minify_document_with_custom_css_minifier(document, &options, &CssMinifier); } DocumentOrDocumentFragment::DocumentFragment(ref mut document_fragment) => { - minify_document_fragment( + minify_document_fragment_with_custom_css_minifier( document_fragment, context_element.as_ref().unwrap(), &options, + &CssMinifier, ); } } diff --git a/packages/html/index.ts b/packages/html/index.ts index 7161fba082a9f..fcf99a46df3f1 100644 --- a/packages/html/index.ts +++ b/packages/html/index.ts @@ -25,7 +25,10 @@ export type Options = { minifyJson?: boolean | { pretty?: boolean }; // TODO improve me after typing `@swc/css` minifyJs?: boolean | { parser?: any; minifier?: any; codegen?: any }; - minifyCss?: boolean | { parser?: any; minifier?: any; codegen?: any }; + minifyCss?: + | boolean + | { lib: "lightningcss" } + | { lib: "swc"; parser?: any; minifier?: any; codegen?: any }; minifyAdditionalScriptsContent?: [string, MinifierType][]; minifyAdditionalAttributes?: [string, MinifierType][]; sortSpaceSeparatedAttributeValues?: boolean; From ffc64f66bf1b709f880cea56192eac15519184d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 20 Aug 2024 17:29:43 +0900 Subject: [PATCH 37/59] chore(ci): Fix publish action (#9463) --- .github/workflows/publish-npm-package.yml | 19 +++++++++++-------- package.json | 4 +++- packages/html/package.json | 8 ++++++-- packages/html/scripts/cli_artifacts.sh | 22 ++++++++++++++++++++++ yarn.lock | 1 + 5 files changed, 43 insertions(+), 11 deletions(-) create mode 100755 packages/html/scripts/cli_artifacts.sh diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index 9a48477c1aa7b..68510c86e793f 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -173,10 +173,14 @@ jobs: export JEMALLOC_SYS_WITH_LG_PAGE=16 && rustup toolchain install $(cat ../../rust-toolchain) && rustup target add aarch64-unknown-linux-musl && - RUSTFLAGS='-C target-feature=+crt-static -C link-arg=-lgcc' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target aarch64-unknown-linux-musl && - rm -rf target/release/.cargo-lock && - cp ../../bindings/target/aarch64-unknown-linux-musl/release/swc . && chmod +x ./swc && - env RUSTFLAGS='-C target-feature=-crt-static' yarn build --target=aarch64-unknown-linux-musl + if [[ ${{ inputs.package }} == "core" ]]; then + RUSTFLAGS='-C target-feature=+crt-static -C link-arg=-lgcc' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target aarch64-unknown-linux-musl && + rm -rf target/release/.cargo-lock && + cp ../../bindings/target/aarch64-unknown-linux-musl/release/swc . && chmod +x ./swc && + env RUSTFLAGS='-C target-feature=-crt-static' yarn build --target=aarch64-unknown-linux-musl + else + env RUSTFLAGS='-C target-feature=-crt-static' yarn build --target=aarch64-unknown-linux-musl + fi - host: windows-latest target: aarch64-pc-windows-msvc # Disable `LTO` and increase `codegen-units` to avoid llvm `OOM` on GitHub Actions. @@ -362,7 +366,7 @@ jobs: - name: Build TypeScript run: yarn build:ts - name: Test bindings - run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-slim sh -c 'npm install -f -g yarn@1.22.19 && cd ./packages/${{ inputs.package }} && env DISABLE_PLUGIN_E2E_TESTS=true yarn test' + run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-slim sh -c 'npm install -f -g yarn@1.22.19 && env DISABLE_PLUGIN_E2E_TESTS=true yarn test:${{ inputs.package }}' test-linux-x64-musl-binding: name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} needs: @@ -402,7 +406,7 @@ jobs: - name: Build TypeScript run: yarn build:ts - name: Test bindings - run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-alpine sh -c 'npm install -f -g yarn@1.22.19 && cd ./packages/${{ inputs.package }} && env DISABLE_PLUGIN_E2E_TESTS=true yarn test' + run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-alpine sh -c 'npm install -f -g yarn@1.22.19 && env DISABLE_PLUGIN_E2E_TESTS=true yarn test:${{ inputs.package }}' # test-linux-aarch64-musl-binding: # name: Test bindings on aarch64-unknown-linux-musl - node@lts # needs: @@ -529,7 +533,6 @@ jobs: shell: bash - name: Move binaries - if: inputs.package == 'core' shell: bash working-directory: ./packages/${{ inputs.package }} run: | @@ -559,7 +562,7 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Upload CLI binaries to gh release - if: ${{ !inputs.skipPublishing }} + if: ${{ !inputs.skipPublishing && inputs.package == 'core' }} shell: bash env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index f25138fafbb74..e07fee5443f65 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,9 @@ "build": "cd ./packages/core && yarn build", "build:dev": "cd ./packages/core && yarn build:dev", "build:ts": "cd ./packages/core && yarn build:ts", - "test": "cd ./packages/core && yarn test" + "test": "cd ./packages/core && yarn test", + "test:core": "cd ./packages/core && yarn test", + "test:html": "cd ./packages/html && yarn test" }, "devDependencies": { "@babel/compat-data": "^7.25.2", diff --git a/packages/html/package.json b/packages/html/package.json index 24fbe14a9ffb1..829b484651b5e 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -42,16 +42,20 @@ "access": "public" }, "scripts": { - "artifacts": "napi artifacts --dist scripts/npm", + "artifacts": "napi artifacts --npm-dir scripts/npm", + "prepack": "tsc -d && napi prepublish -p scripts/npm --tag-style npm", "prepublishOnly": "tsc -d && napi prepublish -p scripts/npm --tagstyle npm", "build:ts": "tsc -d", "build": "tsc -d && napi build --manifest-path ../../bindings/Cargo.toml --platform -p binding_html_node --js ./binding.js --dts ./binding.d.ts --release -o .", "build:dev": "tsc -d && napi build --manifest-path ../../bindings/Cargo.toml --platform -p binding_html_node --js ./binding.js --dts ./binding.d.ts -o .", "test": "echo 'done!'", - "version": "napi version -p scripts/npm" + "version": "napi version --npm-dir scripts/npm" }, "devDependencies": { "@napi-rs/cli": "^3.0.0-alpha.43", "typescript": "^5.1.6" + }, + "dependencies": { + "@swc/counter": "^0.1.3" } } diff --git a/packages/html/scripts/cli_artifacts.sh b/packages/html/scripts/cli_artifacts.sh new file mode 100755 index 0000000000000..19ef8af25749d --- /dev/null +++ b/packages/html/scripts/cli_artifacts.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +mkdir -p ./artifacts_cli +# Naive substitution to napi artifacts for the cli binary. +for filename in artifacts/*/*.node +do + BINDING_NAME=${filename#*.} + BINDING_ABI=${BINDING_NAME%%.*} + CLI_BINARY_PATH=${filename%%.*} + + echo "Preparing build artifacts:" + echo "Binding name $BINDING_NAME" + echo "Filename $filename" + echo "Cli binary path $CLI_BINARY_PATH" + + if [ -f "$CLI_BINARY_PATH" ]; then + chmod +x $CLI_BINARY_PATH + mv -v $CLI_BINARY_PATH ./artifacts_cli/swc-$BINDING_ABI + elif [ -f "$CLI_BINARY_PATH.exe" ]; then + mv -v $CLI_BINARY_PATH.exe ./artifacts_cli/swc-$BINDING_ABI.exe + fi +done \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 3275ebb5cccb0..3ea818274ea36 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4649,6 +4649,7 @@ __metadata: resolution: "@swc/html@workspace:packages/html" dependencies: "@napi-rs/cli": "npm:^3.0.0-alpha.43" + "@swc/counter": "npm:^0.1.3" typescript: "npm:^5.1.6" languageName: unknown linkType: soft From aefbd59f085506f09d85deedd2a61adb1671c933 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 08:31:41 +0000 Subject: [PATCH 38/59] chore: Publish crates with `swc_core` `v0.101.4` --- .changeset/olive-pianos-lay.md | 9 --------- Cargo.lock | 10 +++++----- crates/swc_core/Cargo.toml | 2 +- crates/swc_css_visit/Cargo.toml | 2 +- crates/swc_ecma_visit/Cargo.toml | 2 +- crates/swc_html_visit/Cargo.toml | 2 +- crates/swc_xml_visit/Cargo.toml | 2 +- 7 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 .changeset/olive-pianos-lay.md diff --git a/.changeset/olive-pianos-lay.md b/.changeset/olive-pianos-lay.md deleted file mode 100644 index 65a692b1e82a9..0000000000000 --- a/.changeset/olive-pianos-lay.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -swc_css_visit: patch -swc_ecma_visit: patch -swc_html_visit: patch -swc_xml_visit: patch -swc_core: patch ---- - -perf(visit): Add linear AST traversal diff --git a/Cargo.lock b/Cargo.lock index 199eefbe34bbf..0c8d1d8938dd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4010,7 +4010,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.101.3" +version = "0.101.4" dependencies = [ "anyhow", "binding_macros", @@ -4241,7 +4241,7 @@ dependencies = [ [[package]] name = "swc_css_visit" -version = "0.143.5" +version = "0.143.6" dependencies = [ "serde", "swc_atoms", @@ -4998,7 +4998,7 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.104.6" +version = "0.104.7" dependencies = [ "new_debug_unreachable", "num-bigint", @@ -5235,7 +5235,7 @@ dependencies = [ [[package]] name = "swc_html_visit" -version = "0.37.5" +version = "0.37.6" dependencies = [ "serde", "swc_atoms", @@ -5491,7 +5491,7 @@ dependencies = [ [[package]] name = "swc_xml_visit" -version = "0.16.5" +version = "0.16.6" dependencies = [ "serde", "swc_atoms", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 247206d8c0240..39ce41564b690 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.101.3" +version = "0.101.4" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_css_visit/Cargo.toml b/crates/swc_css_visit/Cargo.toml index 04b29787ddaa5..904cf8b8ea41f 100644 --- a/crates/swc_css_visit/Cargo.toml +++ b/crates/swc_css_visit/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_css_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.143.5" +version = "0.143.6" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_visit/Cargo.toml b/crates/swc_ecma_visit/Cargo.toml index 321de47646ca9..a8e9d350ac62a 100644 --- a/crates/swc_ecma_visit/Cargo.toml +++ b/crates/swc_ecma_visit/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.104.6" +version = "0.104.7" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_html_visit/Cargo.toml b/crates/swc_html_visit/Cargo.toml index 8137b43914886..4d06a04bc4dea 100644 --- a/crates/swc_html_visit/Cargo.toml +++ b/crates/swc_html_visit/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = { workspace = true } name = "swc_html_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.37.5" +version = "0.37.6" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_xml_visit/Cargo.toml b/crates/swc_xml_visit/Cargo.toml index 874b9d8047a9a..f1f469898ad6b 100644 --- a/crates/swc_xml_visit/Cargo.toml +++ b/crates/swc_xml_visit/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" license = { workspace = true } name = "swc_xml_visit" repository = "https://github.com/swc-project/swc.git" -version = "0.16.5" +version = "0.16.6" [package.metadata.docs.rs] all-features = true From 3c5a112b3c57e4e8178786c8937bee1a83272656 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 08:43:40 +0000 Subject: [PATCH 39/59] chore: Publish `1.7.15-nightly-20240820.8` with `swc_core` `v0.101.4` --- bindings/Cargo.lock | 50 ++++++++--- bindings/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../core/scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- packages/html/package.json | 2 +- .../scripts/npm/android-arm-eabi/package.json | 80 ++++++++--------- .../scripts/npm/android-arm64/package.json | 80 ++++++++--------- .../scripts/npm/darwin-arm64/package.json | 80 ++++++++--------- .../html/scripts/npm/darwin-x64/package.json | 80 ++++++++--------- .../npm/linux-arm-gnueabihf/package.json | 80 ++++++++--------- .../scripts/npm/linux-arm64-gnu/package.json | 86 +++++++++---------- .../scripts/npm/linux-arm64-musl/package.json | 86 +++++++++---------- .../scripts/npm/linux-x64-gnu/package.json | 86 +++++++++---------- .../scripts/npm/linux-x64-musl/package.json | 86 +++++++++---------- .../scripts/npm/win32-arm64-msvc/package.json | 80 ++++++++--------- .../scripts/npm/win32-ia32-msvc/package.json | 80 ++++++++--------- .../scripts/npm/win32-x64-msvc/package.json | 80 ++++++++--------- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 41 files changed, 556 insertions(+), 534 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 791179ff23ce7..8683e4ef547f9 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.15-nightly-20240820.7" +version = "1.7.15-nightly-20240820.8" dependencies = [ "anyhow", "getrandom", @@ -324,7 +324,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.15-nightly-20240820.7" +version = "1.7.15-nightly-20240820.8" dependencies = [ "anyhow", "getrandom", @@ -337,7 +337,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.15-nightly-20240820.7" +version = "1.7.15-nightly-20240820.8" dependencies = [ "anyhow", "getrandom", @@ -831,7 +831,7 @@ dependencies = [ "cssparser-macros", "dtoa-short", "itoa", - "phf 0.11.2", + "phf 0.10.1", "smallvec", ] @@ -2322,7 +2322,9 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ + "phf_macros 0.10.0", "phf_shared 0.10.0", + "proc-macro-hack", ] [[package]] @@ -2331,7 +2333,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ - "phf_macros", + "phf_macros 0.11.2", "phf_shared 0.11.2", ] @@ -2365,6 +2367,20 @@ dependencies = [ "rand", ] +[[package]] +name = "phf_macros" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "phf_macros" version = "0.11.2" @@ -2501,6 +2517,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + [[package]] name = "proc-macro2" version = "1.0.86" @@ -3387,7 +3409,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.386" +version = "0.91.387" dependencies = [ "anyhow", "swc_cli_impl", @@ -3505,9 +3527,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.101.3" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de85ba13fd2151074a55ce155d2d0aec96a85453813cafcd1e543831b9131c30" +checksum = "62adeea9d9da142eed5b068eadf67d6ed41bef898465f735c74f5e94f39aed5f" dependencies = [ "binding_macros", "swc", @@ -3616,9 +3638,9 @@ dependencies = [ [[package]] name = "swc_css_visit" -version = "0.143.5" +version = "0.143.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7de0c51931641e580a68dab2c7f04940475d396b23f403062e6064abfac5020" +checksum = "bc9503fc7df6fc3d70d912492733da9463dd8dbc67a5e95eb8b42486a49fb42d" dependencies = [ "serde", "swc_atoms", @@ -4272,9 +4294,9 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.104.6" +version = "0.104.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4752373e273b1d2bc870a7d084a0f765270247fa82b8b9b6d746dd5282647" +checksum = "5f672502caa210a94e46d48e908b35223862e79e63ab9ffd81726e91fdbf2a4f" dependencies = [ "new_debug_unreachable", "num-bigint", @@ -4463,9 +4485,9 @@ dependencies = [ [[package]] name = "swc_html_visit" -version = "0.37.5" +version = "0.37.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c70421acb2813335cba6c6c99b0013a8d60e8e1e6b74b8b67132c795150f5f" +checksum = "358b1d0ae6534a260ee2d05c2d9c8ea17b3214538fe4a255755a6b38ba5a3c54" dependencies = [ "serde", "swc_atoms", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 327483fb5f3e9..a775dc3d6ee82 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -30,7 +30,7 @@ resolver = "2" swc_common = "0.37.4" swc_compiler_base = "0.18.1" swc_config = "0.1.15" - swc_core = "0.101.3" + swc_core = "0.101.4" swc_css_ast = "0.144.0" swc_css_codegen = "0.155.0" swc_css_minifier = "0.120.0" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 5f335286d8691..024d2694dd6d3 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.7" +version = "1.7.15-nightly-20240820.8" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index df8c66f45e34c..ac84bfc3367e0 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.7" +version = "1.7.15-nightly-20240820.8" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index ae6d7f16fc72a..7049c1e09ec64 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.7" +version = "1.7.15-nightly-20240820.8" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 36cacf1882d86..f5509aa02ad54 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.386" +version = "0.91.387" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 12cb776f2aac1..776e1918fa438 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index b547c065a280b..3f0b8044e9310 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index b109806a36364..293d2140cf220 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 47ea3047fa5d1..c862689777815 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 9b7ba0b1af216..363daba67916e 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 0b7db887f586c..06203b6766ac5 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index ae3c06e8db227..166579d0292af 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 39baba2ed74c1..9f435ad06fe06 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 66000cad1c2c9..0a62fdb1a6901 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 7a89d67c56bd0..b27d66fadc996 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 0b9400b6d42b1..61a7daeac6779 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "win32" ], diff --git a/packages/html/package.json b/packages/html/package.json index 829b484651b5e..0f31a3847796b 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "description": "Super-fast HTML minifier", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/html/scripts/npm/android-arm-eabi/package.json b/packages/html/scripts/npm/android-arm-eabi/package.json index fc3d774f4fec4..574f67d8f4fb8 100644 --- a/packages/html/scripts/npm/android-arm-eabi/package.json +++ b/packages/html/scripts/npm/android-arm-eabi/package.json @@ -1,41 +1,41 @@ { - "name": "@swc/html-android-arm-eabi", - "version": "1.2.122", - "os": [ - "android" - ], - "cpu": [ - "arm" - ], - "main": "html.android-arm-eabi.node", - "files": [ - "html.android-arm-eabi.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-android-arm-eabi", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "android" + ], + "cpu": [ + "arm" + ], + "main": "html.android-arm-eabi.node", + "files": [ + "html.android-arm-eabi.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/android-arm64/package.json b/packages/html/scripts/npm/android-arm64/package.json index d3f4afc956716..7f3b7d21f89bb 100644 --- a/packages/html/scripts/npm/android-arm64/package.json +++ b/packages/html/scripts/npm/android-arm64/package.json @@ -1,41 +1,41 @@ { - "name": "@swc/html-android-arm64", - "version": "0.0.1", - "os": [ - "android" - ], - "cpu": [ - "arm64" - ], - "main": "html.android-arm64.node", - "files": [ - "html.android-arm64.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-android-arm64", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "android" + ], + "cpu": [ + "arm64" + ], + "main": "html.android-arm64.node", + "files": [ + "html.android-arm64.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/darwin-arm64/package.json b/packages/html/scripts/npm/darwin-arm64/package.json index d88527a9afc77..701e7a4665398 100644 --- a/packages/html/scripts/npm/darwin-arm64/package.json +++ b/packages/html/scripts/npm/darwin-arm64/package.json @@ -1,41 +1,41 @@ { - "name": "@swc/html-darwin-arm64", - "version": "0.0.1", - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ], - "main": "html.darwin-arm64.node", - "files": [ - "html.darwin-arm64.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-darwin-arm64", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "html.darwin-arm64.node", + "files": [ + "html.darwin-arm64.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/darwin-x64/package.json b/packages/html/scripts/npm/darwin-x64/package.json index dbb4a51207a15..c72211fc36b70 100644 --- a/packages/html/scripts/npm/darwin-x64/package.json +++ b/packages/html/scripts/npm/darwin-x64/package.json @@ -1,41 +1,41 @@ { - "name": "@swc/html-darwin-x64", - "version": "0.0.1", - "os": [ - "darwin" - ], - "cpu": [ - "x64" - ], - "main": "html.darwin-x64.node", - "files": [ - "html.darwin-x64.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-darwin-x64", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "html.darwin-x64.node", + "files": [ + "html.darwin-x64.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/linux-arm-gnueabihf/package.json b/packages/html/scripts/npm/linux-arm-gnueabihf/package.json index 9fde68abddda7..4ab81c24037fb 100644 --- a/packages/html/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/html/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,41 +1,41 @@ { - "name": "@swc/html-linux-arm-gnueabihf", - "version": "0.0.1", - "os": [ - "linux" - ], - "cpu": [ - "arm" - ], - "main": "html.linux-arm-gnueabihf.node", - "files": [ - "html.linux-arm-gnueabihf.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-linux-arm-gnueabihf", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "linux" + ], + "cpu": [ + "arm" + ], + "main": "html.linux-arm-gnueabihf.node", + "files": [ + "html.linux-arm-gnueabihf.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/linux-arm64-gnu/package.json b/packages/html/scripts/npm/linux-arm64-gnu/package.json index 11bc285db3c4d..cd804b61007af 100644 --- a/packages/html/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/html/scripts/npm/linux-arm64-gnu/package.json @@ -1,44 +1,44 @@ { - "name": "@swc/html-linux-arm64-gnu", - "version": "0.0.1", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "html.linux-arm64-gnu.node", - "files": [ - "html.linux-arm64-gnu.node" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-linux-arm64-gnu", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "html.linux-arm64-gnu.node", + "files": [ + "html.linux-arm64-gnu.node" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/linux-arm64-musl/package.json b/packages/html/scripts/npm/linux-arm64-musl/package.json index e67be082e6e71..fca3bd318e245 100644 --- a/packages/html/scripts/npm/linux-arm64-musl/package.json +++ b/packages/html/scripts/npm/linux-arm64-musl/package.json @@ -1,44 +1,44 @@ { - "name": "@swc/html-linux-arm64-musl", - "version": "0.0.1", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "html.linux-arm64-musl.node", - "files": [ - "html.linux-arm64-musl.node" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-linux-arm64-musl", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "html.linux-arm64-musl.node", + "files": [ + "html.linux-arm64-musl.node" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/linux-x64-gnu/package.json b/packages/html/scripts/npm/linux-x64-gnu/package.json index 686a8a1ab53df..6354b8c8826fc 100644 --- a/packages/html/scripts/npm/linux-x64-gnu/package.json +++ b/packages/html/scripts/npm/linux-x64-gnu/package.json @@ -1,44 +1,44 @@ { - "name": "@swc/html-linux-x64-gnu", - "version": "0.0.1", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "html.linux-x64-gnu.node", - "files": [ - "html.linux-x64-gnu.node" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-linux-x64-gnu", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "html.linux-x64-gnu.node", + "files": [ + "html.linux-x64-gnu.node" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/linux-x64-musl/package.json b/packages/html/scripts/npm/linux-x64-musl/package.json index 0f5656b0776fc..6de712cdde914 100644 --- a/packages/html/scripts/npm/linux-x64-musl/package.json +++ b/packages/html/scripts/npm/linux-x64-musl/package.json @@ -1,44 +1,44 @@ { - "name": "@swc/html-linux-x64-musl", - "version": "0.0.1", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "html.linux-x64-musl.node", - "files": [ - "html.linux-x64-musl.node" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-linux-x64-musl", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "html.linux-x64-musl.node", + "files": [ + "html.linux-x64-musl.node" + ], + "libc": [ + "musl" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/win32-arm64-msvc/package.json b/packages/html/scripts/npm/win32-arm64-msvc/package.json index bdb1890b4fa32..9137c48aa9b00 100644 --- a/packages/html/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/html/scripts/npm/win32-arm64-msvc/package.json @@ -1,41 +1,41 @@ { - "name": "@swc/html-win32-arm64-msvc", - "version": "0.0.1", - "os": [ - "win32" - ], - "cpu": [ - "arm64" - ], - "main": "html.win32-arm64-msvc.node", - "files": [ - "html.win32-arm64-msvc.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-win32-arm64-msvc", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "html.win32-arm64-msvc.node", + "files": [ + "html.win32-arm64-msvc.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/win32-ia32-msvc/package.json b/packages/html/scripts/npm/win32-ia32-msvc/package.json index 3fa5c16275268..d1251b3b9dbc9 100644 --- a/packages/html/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/html/scripts/npm/win32-ia32-msvc/package.json @@ -1,41 +1,41 @@ { - "name": "@swc/html-win32-ia32-msvc", - "version": "0.0.1", - "os": [ - "win32" - ], - "cpu": [ - "ia32" - ], - "main": "html.win32-ia32-msvc.node", - "files": [ - "html.win32-ia32-msvc.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-win32-ia32-msvc", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "html.win32-ia32-msvc.node", + "files": [ + "html.win32-ia32-msvc.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/win32-x64-msvc/package.json b/packages/html/scripts/npm/win32-x64-msvc/package.json index d8db520b485bc..cd256a4c9dfe5 100644 --- a/packages/html/scripts/npm/win32-x64-msvc/package.json +++ b/packages/html/scripts/npm/win32-x64-msvc/package.json @@ -1,41 +1,41 @@ { - "name": "@swc/html-win32-x64-msvc", - "version": "0.0.1", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "main": "html.win32-x64-msvc.node", - "files": [ - "html.win32-x64-msvc.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-win32-x64-msvc", + "version": "1.7.15-nightly-20240820.8", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "html.win32-x64-msvc.node", + "files": [ + "html.win32-x64-msvc.node" + ], + "description": "Super-fast alternative for babel", + "keywords": [ + "swc", + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/package.json b/packages/minifier/package.json index a46999a988b8f..523f3abc2428a 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 912f656833f1f..c0f18029fed40 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 681408dcb744a..5f63ee3a023aa 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index bbe3b920e21ed..ab46a60509077 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index c544d4934f47f..a7c04ac165fa5 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 485022869aea8..6b17ac5aa410c 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index c92e67662665a..7568b79ed3bfd 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 2a16e2aa15949..5a52f383b67d5 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 5ace23b1d71a4..59ef36ef9149b 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index d4c8750494082..a25a78a702dfb 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index f31363d55b263..81191f2f65e28 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.7", + "version": "1.7.15-nightly-20240820.8", "os": [ "win32" ], From b6d0bf86d52bb8c319f8b7c747111047a427251b Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 08:43:41 +0000 Subject: [PATCH 40/59] chore: Update changelog --- CHANGELOG.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d20872515844..6f66b64852462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,24 @@ - **(html)** Fix html binding ([eefae1c](https://github.com/swc-project/swc/commit/eefae1cde794b28b68e5c0af2d2f13a5053b7a49)) +### Features + + + +- **(bindings/html)** Allow using `lightningcss` as minfiier ([#9462](https://github.com/swc-project/swc/issues/9462)) ([74d6478](https://github.com/swc-project/swc/commit/74d6478be1eb8cdf1df096c360c159db64b64d8a)) + ### Miscellaneous Tasks - **(html)** Use `binding_html_node` instead of `html_node` ([bdea5cb](https://github.com/swc-project/swc/commit/bdea5cb94cf7cc9d02274f32e104b55f977e625d)) +### Performance + + + +- **(visit)** Add linear AST traversal ([#9452](https://github.com/swc-project/swc/issues/9452)) ([911d4ea](https://github.com/swc-project/swc/commit/911d4eaa146ff493636308a3cebd8b21d941bfde)) + ## [1.7.14] - 2024-08-19 ### Bug Fixes @@ -1285,12 +1297,6 @@ -- **(common)** Fix source index for `inputSourceMap` ([#8800](https://github.com/swc-project/swc/issues/8800)) ([4f9ab81](https://github.com/swc-project/swc/commit/4f9ab8151dad9984c81c72eb10c2afe5313a7591)) - - -- **(es)** Change default value of `inputSourceMap` to `true` ([#8801](https://github.com/swc-project/swc/issues/8801)) ([9ffcd18](https://github.com/swc-project/swc/commit/9ffcd1823c0abdc741f654b8e1e330cdc06769a1)) - - - **(es/minifier)** Abort fn inliner if there's a spread arg ([#8809](https://github.com/swc-project/swc/issues/8809)) ([730ded2](https://github.com/swc-project/swc/commit/730ded2a26f63f0069dea0d3bc207bb31f344444)) ### Features @@ -1305,10 +1311,4 @@ - **(deps)** Update dependencies ([#8810](https://github.com/swc-project/swc/issues/8810)) ([207582f](https://github.com/swc-project/swc/commit/207582ff254a66a9dd4613de6d3cb43c19957b68)) -### Performance - - - -- **(atoms)** Update `hstr` ([#8799](https://github.com/swc-project/swc/issues/8799)) ([0745624](https://github.com/swc-project/swc/commit/0745624cb71e12b18b06d9ee106066d8b585c4c6)) - From 8c3afb84c8c82f4b83a6fa83938917119e7c0130 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 09:14:22 +0000 Subject: [PATCH 41/59] chore: Publish `1.7.16-nightly-20240820.1` with `swc_core` `v0.101.4` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/html/package.json | 2 +- packages/html/scripts/npm/android-arm-eabi/package.json | 2 +- packages/html/scripts/npm/android-arm64/package.json | 2 +- packages/html/scripts/npm/darwin-arm64/package.json | 2 +- packages/html/scripts/npm/darwin-x64/package.json | 2 +- .../html/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/html/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/html/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/html/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/html/scripts/npm/linux-x64-musl/package.json | 2 +- packages/html/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/html/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/html/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 40 files changed, 43 insertions(+), 43 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 8683e4ef547f9..07688d027a23b 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.15-nightly-20240820.8" +version = "1.7.16-nightly-20240820.1" dependencies = [ "anyhow", "getrandom", @@ -324,7 +324,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.15-nightly-20240820.8" +version = "1.7.16-nightly-20240820.1" dependencies = [ "anyhow", "getrandom", @@ -337,7 +337,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.15-nightly-20240820.8" +version = "1.7.16-nightly-20240820.1" dependencies = [ "anyhow", "getrandom", @@ -3409,7 +3409,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.387" +version = "0.91.388" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 024d2694dd6d3..dc30a95946bc0 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.8" +version = "1.7.16-nightly-20240820.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index ac84bfc3367e0..1b93c86c88ff4 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.8" +version = "1.7.16-nightly-20240820.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 7049c1e09ec64..2042ea4d54fdc 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.15-nightly-20240820.8" +version = "1.7.16-nightly-20240820.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index f5509aa02ad54..241b1cc0d65bb 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.387" +version = "0.91.388" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 776e1918fa438..7df094fe052bb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 3f0b8044e9310..f4ea81a079f68 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 293d2140cf220..b04c8b21b6077 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index c862689777815..655c3ba9f1c70 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 363daba67916e..c9104e2e394d6 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 06203b6766ac5..f90fcbd352f0d 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 166579d0292af..7191e6df692f8 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 9f435ad06fe06..225382b6d334a 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 0a62fdb1a6901..1602768908774 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index b27d66fadc996..6f41aa1e1829f 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 61a7daeac6779..073ff05d400ee 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/html/package.json b/packages/html/package.json index 0f31a3847796b..d9d26760e7c10 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "description": "Super-fast HTML minifier", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/html/scripts/npm/android-arm-eabi/package.json b/packages/html/scripts/npm/android-arm-eabi/package.json index 574f67d8f4fb8..9cd713e9271ff 100644 --- a/packages/html/scripts/npm/android-arm-eabi/package.json +++ b/packages/html/scripts/npm/android-arm-eabi/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-android-arm-eabi", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "android" ], diff --git a/packages/html/scripts/npm/android-arm64/package.json b/packages/html/scripts/npm/android-arm64/package.json index 7f3b7d21f89bb..c9b5634f8b41b 100644 --- a/packages/html/scripts/npm/android-arm64/package.json +++ b/packages/html/scripts/npm/android-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-android-arm64", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "android" ], diff --git a/packages/html/scripts/npm/darwin-arm64/package.json b/packages/html/scripts/npm/darwin-arm64/package.json index 701e7a4665398..e283afa58be78 100644 --- a/packages/html/scripts/npm/darwin-arm64/package.json +++ b/packages/html/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-darwin-arm64", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "darwin" ], diff --git a/packages/html/scripts/npm/darwin-x64/package.json b/packages/html/scripts/npm/darwin-x64/package.json index c72211fc36b70..92230d083c61d 100644 --- a/packages/html/scripts/npm/darwin-x64/package.json +++ b/packages/html/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-darwin-x64", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "darwin" ], diff --git a/packages/html/scripts/npm/linux-arm-gnueabihf/package.json b/packages/html/scripts/npm/linux-arm-gnueabihf/package.json index 4ab81c24037fb..0b90c7745c291 100644 --- a/packages/html/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/html/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/html/scripts/npm/linux-arm64-gnu/package.json b/packages/html/scripts/npm/linux-arm64-gnu/package.json index cd804b61007af..f2501fadbf2da 100644 --- a/packages/html/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/html/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/html/scripts/npm/linux-arm64-musl/package.json b/packages/html/scripts/npm/linux-arm64-musl/package.json index fca3bd318e245..ef81d452046df 100644 --- a/packages/html/scripts/npm/linux-arm64-musl/package.json +++ b/packages/html/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/html/scripts/npm/linux-x64-gnu/package.json b/packages/html/scripts/npm/linux-x64-gnu/package.json index 6354b8c8826fc..706b84578c7f4 100644 --- a/packages/html/scripts/npm/linux-x64-gnu/package.json +++ b/packages/html/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/html/scripts/npm/linux-x64-musl/package.json b/packages/html/scripts/npm/linux-x64-musl/package.json index 6de712cdde914..f8ca8a473493d 100644 --- a/packages/html/scripts/npm/linux-x64-musl/package.json +++ b/packages/html/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-linux-x64-musl", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/html/scripts/npm/win32-arm64-msvc/package.json b/packages/html/scripts/npm/win32-arm64-msvc/package.json index 9137c48aa9b00..ef52405a6571e 100644 --- a/packages/html/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/html/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/html/scripts/npm/win32-ia32-msvc/package.json b/packages/html/scripts/npm/win32-ia32-msvc/package.json index d1251b3b9dbc9..9098804acd372 100644 --- a/packages/html/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/html/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/html/scripts/npm/win32-x64-msvc/package.json b/packages/html/scripts/npm/win32-x64-msvc/package.json index cd256a4c9dfe5..bc2f151e3997e 100644 --- a/packages/html/scripts/npm/win32-x64-msvc/package.json +++ b/packages/html/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 523f3abc2428a..876d0d92a8b43 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index c0f18029fed40..02690ccd8acdc 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 5f63ee3a023aa..5839cfa92b279 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index ab46a60509077..bcaebaedfd667 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index a7c04ac165fa5..f6a103da99d7b 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 6b17ac5aa410c..989c23a4b6ad8 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 7568b79ed3bfd..9697e19bb8921 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 5a52f383b67d5..0982cbca48b59 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 59ef36ef9149b..24e8a4251f414 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index a25a78a702dfb..43bf61ef80828 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 81191f2f65e28..af7106e8dc49c 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.15-nightly-20240820.8", + "version": "1.7.16-nightly-20240820.1", "os": [ "win32" ], From c3ed5d77e553a5e1823d554d188d4410b9ff3002 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 09:14:23 +0000 Subject: [PATCH 42/59] chore: Update changelog --- CHANGELOG.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f66b64852462..a47531b422b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1305,10 +1305,4 @@ - **(es/minifier)** Evaluate spread of arrays ([#8811](https://github.com/swc-project/swc/issues/8811)) ([47714c5](https://github.com/swc-project/swc/commit/47714c52ce08b0e94617d17c11c8e8994c62dbaa)) -### Miscellaneous Tasks - - - -- **(deps)** Update dependencies ([#8810](https://github.com/swc-project/swc/issues/8810)) ([207582f](https://github.com/swc-project/swc/commit/207582ff254a66a9dd4613de6d3cb43c19957b68)) - From f30fd4fe42764ee29031ce4c0c038c1c95235482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 18:37:59 +0900 Subject: [PATCH 43/59] chore(html): Fix publish action --- packages/html/package.json | 11 +-- .../scripts/npm/android-arm-eabi/README.md | 3 - .../scripts/npm/android-arm-eabi/package.json | 41 --------- .../html/scripts/npm/android-arm64/README.md | 3 - .../scripts/npm/android-arm64/package.json | 41 --------- .../scripts/npm/darwin-arm64/package.json | 79 +++++++++-------- .../html/scripts/npm/darwin-x64/package.json | 79 +++++++++-------- .../html/scripts/npm/freebsd-x64/README.md | 3 - .../html/scripts/npm/freebsd-x64/package.json | 41 --------- .../npm/linux-arm-gnueabihf/package.json | 79 +++++++++-------- .../scripts/npm/linux-arm64-gnu/package.json | 85 +++++++++---------- .../scripts/npm/linux-arm64-musl/package.json | 85 +++++++++---------- .../scripts/npm/linux-x64-gnu/package.json | 85 +++++++++---------- .../scripts/npm/linux-x64-musl/package.json | 85 +++++++++---------- .../scripts/npm/win32-arm64-msvc/package.json | 79 +++++++++-------- .../scripts/npm/win32-ia32-msvc/package.json | 79 +++++++++-------- .../scripts/npm/win32-x64-msvc/package.json | 79 +++++++++-------- 17 files changed, 408 insertions(+), 549 deletions(-) delete mode 100644 packages/html/scripts/npm/android-arm-eabi/README.md delete mode 100644 packages/html/scripts/npm/android-arm-eabi/package.json delete mode 100644 packages/html/scripts/npm/android-arm64/README.md delete mode 100644 packages/html/scripts/npm/android-arm64/package.json delete mode 100644 packages/html/scripts/npm/freebsd-x64/README.md delete mode 100644 packages/html/scripts/npm/freebsd-x64/package.json diff --git a/packages/html/package.json b/packages/html/package.json index d9d26760e7c10..b134f05539342 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -24,16 +24,17 @@ "name": "swc-html", "triples": { "defaults": true, - "additional": [ + "targets": [ + "x86_64-apple-darwin", + "x86_64-pc-windows-msvc", + "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "i686-pc-windows-msvc", - "aarch64-unknown-linux-gnu", "armv7-unknown-linux-gnueabihf", + "aarch64-unknown-linux-gnu", "aarch64-apple-darwin", - "aarch64-linux-android", "aarch64-unknown-linux-musl", - "aarch64-pc-windows-msvc", - "armv7-linux-androideabi" + "aarch64-pc-windows-msvc" ] } }, diff --git a/packages/html/scripts/npm/android-arm-eabi/README.md b/packages/html/scripts/npm/android-arm-eabi/README.md deleted file mode 100644 index 106a5e7316aa6..0000000000000 --- a/packages/html/scripts/npm/android-arm-eabi/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@swc/html-android-arm-eabi` - -This is the **armv7-linux-androideabi** binary for `@swc/html` diff --git a/packages/html/scripts/npm/android-arm-eabi/package.json b/packages/html/scripts/npm/android-arm-eabi/package.json deleted file mode 100644 index 9cd713e9271ff..0000000000000 --- a/packages/html/scripts/npm/android-arm-eabi/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@swc/html-android-arm-eabi", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "android" - ], - "cpu": [ - "arm" - ], - "main": "html.android-arm-eabi.node", - "files": [ - "html.android-arm-eabi.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file diff --git a/packages/html/scripts/npm/android-arm64/README.md b/packages/html/scripts/npm/android-arm64/README.md deleted file mode 100644 index 723cc22a97b89..0000000000000 --- a/packages/html/scripts/npm/android-arm64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@swc/html-android-arm64` - -This is the **aarch64-linux-android** binary for `@swc/html` diff --git a/packages/html/scripts/npm/android-arm64/package.json b/packages/html/scripts/npm/android-arm64/package.json deleted file mode 100644 index c9b5634f8b41b..0000000000000 --- a/packages/html/scripts/npm/android-arm64/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@swc/html-android-arm64", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "android" - ], - "cpu": [ - "arm64" - ], - "main": "html.android-arm64.node", - "files": [ - "html.android-arm64.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file diff --git a/packages/html/scripts/npm/darwin-arm64/package.json b/packages/html/scripts/npm/darwin-arm64/package.json index e283afa58be78..c539f8368fd04 100644 --- a/packages/html/scripts/npm/darwin-arm64/package.json +++ b/packages/html/scripts/npm/darwin-arm64/package.json @@ -1,41 +1,40 @@ { - "name": "@swc/html-darwin-arm64", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ], - "main": "html.darwin-arm64.node", - "files": [ - "html.darwin-arm64.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/html-darwin-arm64", + "version": "1.7.16-nightly-20240820.1", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "swc-html.darwin-arm64.node", + "files": [ + "swc-html.darwin-arm64.node" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/darwin-x64/package.json b/packages/html/scripts/npm/darwin-x64/package.json index 92230d083c61d..91996b6de5fa4 100644 --- a/packages/html/scripts/npm/darwin-x64/package.json +++ b/packages/html/scripts/npm/darwin-x64/package.json @@ -1,41 +1,40 @@ { - "name": "@swc/html-darwin-x64", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "darwin" - ], - "cpu": [ - "x64" - ], - "main": "html.darwin-x64.node", - "files": [ - "html.darwin-x64.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/html-darwin-x64", + "version": "1.7.16-nightly-20240820.1", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "swc-html.darwin-x64.node", + "files": [ + "swc-html.darwin-x64.node" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/freebsd-x64/README.md b/packages/html/scripts/npm/freebsd-x64/README.md deleted file mode 100644 index 66cba2f5e8803..0000000000000 --- a/packages/html/scripts/npm/freebsd-x64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@swc/html-freebsd-x64` - -This is the **x86_64-unknown-freebsd** binary for `@swc/html` diff --git a/packages/html/scripts/npm/freebsd-x64/package.json b/packages/html/scripts/npm/freebsd-x64/package.json deleted file mode 100644 index 0775efa3129de..0000000000000 --- a/packages/html/scripts/npm/freebsd-x64/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@swc/html-freebsd-x64", - "version": "0.0.1", - "os": [ - "freebsd" - ], - "cpu": [ - "x64" - ], - "main": "html.freebsd-x64.node", - "files": [ - "html.freebsd-x64.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} diff --git a/packages/html/scripts/npm/linux-arm-gnueabihf/package.json b/packages/html/scripts/npm/linux-arm-gnueabihf/package.json index 0b90c7745c291..945ed92b6e299 100644 --- a/packages/html/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/html/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,41 +1,40 @@ { - "name": "@swc/html-linux-arm-gnueabihf", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "linux" - ], - "cpu": [ - "arm" - ], - "main": "html.linux-arm-gnueabihf.node", - "files": [ - "html.linux-arm-gnueabihf.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/html-linux-arm-gnueabihf", + "version": "1.7.16-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "arm" + ], + "main": "swc-html.linux-arm-gnueabihf.node", + "files": [ + "swc-html.linux-arm-gnueabihf.node" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/linux-arm64-gnu/package.json b/packages/html/scripts/npm/linux-arm64-gnu/package.json index f2501fadbf2da..3015fe107826d 100644 --- a/packages/html/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/html/scripts/npm/linux-arm64-gnu/package.json @@ -1,44 +1,43 @@ { - "name": "@swc/html-linux-arm64-gnu", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "html.linux-arm64-gnu.node", - "files": [ - "html.linux-arm64-gnu.node" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/html-linux-arm64-gnu", + "version": "1.7.16-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "swc-html.linux-arm64-gnu.node", + "files": [ + "swc-html.linux-arm64-gnu.node" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/linux-arm64-musl/package.json b/packages/html/scripts/npm/linux-arm64-musl/package.json index ef81d452046df..61bc5541d29e6 100644 --- a/packages/html/scripts/npm/linux-arm64-musl/package.json +++ b/packages/html/scripts/npm/linux-arm64-musl/package.json @@ -1,44 +1,43 @@ { - "name": "@swc/html-linux-arm64-musl", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "linux" - ], - "cpu": [ - "arm64" - ], - "main": "html.linux-arm64-musl.node", - "files": [ - "html.linux-arm64-musl.node" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/html-linux-arm64-musl", + "version": "1.7.16-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "swc-html.linux-arm64-musl.node", + "files": [ + "swc-html.linux-arm64-musl.node" + ], + "libc": [ + "musl" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/linux-x64-gnu/package.json b/packages/html/scripts/npm/linux-x64-gnu/package.json index 706b84578c7f4..403dc74d9002b 100644 --- a/packages/html/scripts/npm/linux-x64-gnu/package.json +++ b/packages/html/scripts/npm/linux-x64-gnu/package.json @@ -1,44 +1,43 @@ { - "name": "@swc/html-linux-x64-gnu", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "html.linux-x64-gnu.node", - "files": [ - "html.linux-x64-gnu.node" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/html-linux-x64-gnu", + "version": "1.7.16-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "swc-html.linux-x64-gnu.node", + "files": [ + "swc-html.linux-x64-gnu.node" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/linux-x64-musl/package.json b/packages/html/scripts/npm/linux-x64-musl/package.json index f8ca8a473493d..fd11887aeb461 100644 --- a/packages/html/scripts/npm/linux-x64-musl/package.json +++ b/packages/html/scripts/npm/linux-x64-musl/package.json @@ -1,44 +1,43 @@ { - "name": "@swc/html-linux-x64-musl", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "html.linux-x64-musl.node", - "files": [ - "html.linux-x64-musl.node" - ], - "libc": [ - "musl" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/html-linux-x64-musl", + "version": "1.7.16-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "swc-html.linux-x64-musl.node", + "files": [ + "swc-html.linux-x64-musl.node" + ], + "libc": [ + "musl" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/win32-arm64-msvc/package.json b/packages/html/scripts/npm/win32-arm64-msvc/package.json index ef52405a6571e..bc3f7deabe26f 100644 --- a/packages/html/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/html/scripts/npm/win32-arm64-msvc/package.json @@ -1,41 +1,40 @@ { - "name": "@swc/html-win32-arm64-msvc", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "win32" - ], - "cpu": [ - "arm64" - ], - "main": "html.win32-arm64-msvc.node", - "files": [ - "html.win32-arm64-msvc.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/html-win32-arm64-msvc", + "version": "1.7.16-nightly-20240820.1", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "swc-html.win32-arm64-msvc.node", + "files": [ + "swc-html.win32-arm64-msvc.node" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/win32-ia32-msvc/package.json b/packages/html/scripts/npm/win32-ia32-msvc/package.json index 9098804acd372..8da2f83a0d792 100644 --- a/packages/html/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/html/scripts/npm/win32-ia32-msvc/package.json @@ -1,41 +1,40 @@ { - "name": "@swc/html-win32-ia32-msvc", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "win32" - ], - "cpu": [ - "ia32" - ], - "main": "html.win32-ia32-msvc.node", - "files": [ - "html.win32-ia32-msvc.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/html-win32-ia32-msvc", + "version": "1.7.16-nightly-20240820.1", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "swc-html.win32-ia32-msvc.node", + "files": [ + "swc-html.win32-ia32-msvc.node" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} diff --git a/packages/html/scripts/npm/win32-x64-msvc/package.json b/packages/html/scripts/npm/win32-x64-msvc/package.json index bc2f151e3997e..95d183fb583cd 100644 --- a/packages/html/scripts/npm/win32-x64-msvc/package.json +++ b/packages/html/scripts/npm/win32-x64-msvc/package.json @@ -1,41 +1,40 @@ { - "name": "@swc/html-win32-x64-msvc", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "main": "html.win32-x64-msvc.node", - "files": [ - "html.win32-x64-msvc.node" - ], - "description": "Super-fast alternative for babel", - "keywords": [ - "swc", - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} \ No newline at end of file + "name": "@swc/html-win32-x64-msvc", + "version": "1.7.16-nightly-20240820.1", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "swc-html.win32-x64-msvc.node", + "files": [ + "swc-html.win32-x64-msvc.node" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} From ff0cc8a765b788ebae70a9b9bbee404f740bb3f0 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 09:47:36 +0000 Subject: [PATCH 44/59] chore: Publish `1.7.17-nightly-20240820.1` with `swc_core` `v0.101.4` --- bindings/Cargo.lock | 8 +- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../core/scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- packages/html/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 78 ++++++++--------- .../html/scripts/npm/darwin-x64/package.json | 78 ++++++++--------- .../scripts/npm/linux-x64-gnu/package.json | 84 +++++++++---------- .../scripts/npm/win32-x64-msvc/package.json | 78 ++++++++--------- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 32 files changed, 190 insertions(+), 190 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 07688d027a23b..426d077ad0121 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.16-nightly-20240820.1" +version = "1.7.17-nightly-20240820.1" dependencies = [ "anyhow", "getrandom", @@ -324,7 +324,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.16-nightly-20240820.1" +version = "1.7.17-nightly-20240820.1" dependencies = [ "anyhow", "getrandom", @@ -337,7 +337,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.16-nightly-20240820.1" +version = "1.7.17-nightly-20240820.1" dependencies = [ "anyhow", "getrandom", @@ -3409,7 +3409,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.388" +version = "0.91.389" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index dc30a95946bc0..07decd5390e34 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.16-nightly-20240820.1" +version = "1.7.17-nightly-20240820.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 1b93c86c88ff4..afc103d878420 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.16-nightly-20240820.1" +version = "1.7.17-nightly-20240820.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 2042ea4d54fdc..0bbaa9d924248 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.16-nightly-20240820.1" +version = "1.7.17-nightly-20240820.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 241b1cc0d65bb..8a7b0cc2dc886 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.388" +version = "0.91.389" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 7df094fe052bb..2b1a6fa2c7360 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index f4ea81a079f68..07747dbae6290 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index b04c8b21b6077..267b34a8874f0 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 655c3ba9f1c70..68243a087bb59 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index c9104e2e394d6..a8b88bcae2d92 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index f90fcbd352f0d..1fb133c6c6739 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 7191e6df692f8..a2398a266b09a 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 225382b6d334a..4f0e21cf51b64 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 1602768908774..d32d0c9c73464 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 6f41aa1e1829f..56a6ebb57c828 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 073ff05d400ee..17e1de438fef8 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/html/package.json b/packages/html/package.json index b134f05539342..fc3b8aae97641 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "description": "Super-fast HTML minifier", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/html/scripts/npm/darwin-arm64/package.json b/packages/html/scripts/npm/darwin-arm64/package.json index c539f8368fd04..b0b66374d97ca 100644 --- a/packages/html/scripts/npm/darwin-arm64/package.json +++ b/packages/html/scripts/npm/darwin-arm64/package.json @@ -1,40 +1,40 @@ { - "name": "@swc/html-darwin-arm64", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "darwin" - ], - "cpu": [ - "arm64" - ], - "main": "swc-html.darwin-arm64.node", - "files": [ - "swc-html.darwin-arm64.node" - ], - "description": "Super-fast HTML minifier", - "keywords": [ - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-darwin-arm64", + "version": "1.7.17-nightly-20240820.1", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "swc-html.darwin-arm64.node", + "files": [ + "swc-html.darwin-arm64.node" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/darwin-x64/package.json b/packages/html/scripts/npm/darwin-x64/package.json index 91996b6de5fa4..dd29a5911d7ed 100644 --- a/packages/html/scripts/npm/darwin-x64/package.json +++ b/packages/html/scripts/npm/darwin-x64/package.json @@ -1,40 +1,40 @@ { - "name": "@swc/html-darwin-x64", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "darwin" - ], - "cpu": [ - "x64" - ], - "main": "swc-html.darwin-x64.node", - "files": [ - "swc-html.darwin-x64.node" - ], - "description": "Super-fast HTML minifier", - "keywords": [ - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-darwin-x64", + "version": "1.7.17-nightly-20240820.1", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "swc-html.darwin-x64.node", + "files": [ + "swc-html.darwin-x64.node" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/linux-x64-gnu/package.json b/packages/html/scripts/npm/linux-x64-gnu/package.json index 403dc74d9002b..9fc101c87481f 100644 --- a/packages/html/scripts/npm/linux-x64-gnu/package.json +++ b/packages/html/scripts/npm/linux-x64-gnu/package.json @@ -1,43 +1,43 @@ { - "name": "@swc/html-linux-x64-gnu", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "linux" - ], - "cpu": [ - "x64" - ], - "main": "swc-html.linux-x64-gnu.node", - "files": [ - "swc-html.linux-x64-gnu.node" - ], - "libc": [ - "glibc" - ], - "description": "Super-fast HTML minifier", - "keywords": [ - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-linux-x64-gnu", + "version": "1.7.17-nightly-20240820.1", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "swc-html.linux-x64-gnu.node", + "files": [ + "swc-html.linux-x64-gnu.node" + ], + "libc": [ + "glibc" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/html/scripts/npm/win32-x64-msvc/package.json b/packages/html/scripts/npm/win32-x64-msvc/package.json index 95d183fb583cd..ec4e22aa3ebfb 100644 --- a/packages/html/scripts/npm/win32-x64-msvc/package.json +++ b/packages/html/scripts/npm/win32-x64-msvc/package.json @@ -1,40 +1,40 @@ { - "name": "@swc/html-win32-x64-msvc", - "version": "1.7.16-nightly-20240820.1", - "os": [ - "win32" - ], - "cpu": [ - "x64" - ], - "main": "swc-html.win32-x64-msvc.node", - "files": [ - "swc-html.win32-x64-msvc.node" - ], - "description": "Super-fast HTML minifier", - "keywords": [ - "swcpack", - "babel", - "typescript", - "rust", - "webpack", - "tsc" - ], - "author": "강동윤 ", - "homepage": "https://swc.rs", - "license": "Apache-2.0 AND MIT", - "engines": { - "node": ">=10" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/swc-project/swc.git" - }, - "bugs": { - "url": "https://github.com/swc-project/swc/issues" - } -} + "name": "@swc/html-win32-x64-msvc", + "version": "1.7.17-nightly-20240820.1", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "swc-html.win32-x64-msvc.node", + "files": [ + "swc-html.win32-x64-msvc.node" + ], + "description": "Super-fast HTML minifier", + "keywords": [ + "swcpack", + "babel", + "typescript", + "rust", + "webpack", + "tsc" + ], + "author": "강동윤 ", + "homepage": "https://swc.rs", + "license": "Apache-2.0 AND MIT", + "engines": { + "node": ">=10" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/swc-project/swc.git" + }, + "bugs": { + "url": "https://github.com/swc-project/swc/issues" + } +} \ No newline at end of file diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 876d0d92a8b43..ba4cb0c5ff4eb 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 02690ccd8acdc..f4acaa34a493f 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 5839cfa92b279..74402846f9da9 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index bcaebaedfd667..5baa3b6504034 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index f6a103da99d7b..5c7111c1ac63a 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 989c23a4b6ad8..13a4481a73450 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 9697e19bb8921..f68bb8ed156bb 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 0982cbca48b59..ea8ee7f194739 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 24e8a4251f414..be88e02cccd54 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 43bf61ef80828..a1212214dae71 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index af7106e8dc49c..6912be1c62fb3 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.16-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.1", "os": [ "win32" ], From 5c27d8b3407b9cb2d0c865070f46e1e59bd0e666 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 09:47:37 +0000 Subject: [PATCH 45/59] chore: Update changelog --- CHANGELOG.md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a47531b422b0a..7419627b2d033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,9 @@ - **(html)** Use `binding_html_node` instead of `html_node` ([bdea5cb](https://github.com/swc-project/swc/commit/bdea5cb94cf7cc9d02274f32e104b55f977e625d)) + +- **(html)** Fix publish action ([f30fd4f](https://github.com/swc-project/swc/commit/f30fd4fe42764ee29031ce4c0c038c1c95235482)) + ### Performance @@ -1291,18 +1294,4 @@ - **(visit)** Improve `Map` implementation for `Box` ([#8819](https://github.com/swc-project/swc/issues/8819)) ([dc04657](https://github.com/swc-project/swc/commit/dc046572def13a3eb625520c5a8bfd651b86f3a3)) -## [1.4.12] - 2024-04-04 - -### Bug Fixes - - - -- **(es/minifier)** Abort fn inliner if there's a spread arg ([#8809](https://github.com/swc-project/swc/issues/8809)) ([730ded2](https://github.com/swc-project/swc/commit/730ded2a26f63f0069dea0d3bc207bb31f344444)) - -### Features - - - -- **(es/minifier)** Evaluate spread of arrays ([#8811](https://github.com/swc-project/swc/issues/8811)) ([47714c5](https://github.com/swc-project/swc/commit/47714c52ce08b0e94617d17c11c8e8994c62dbaa)) - From 5a7b19dcb5fa09ef66af4d96f1d9813a560260e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 19:24:42 +0900 Subject: [PATCH 46/59] chore(ci): Fix artifact names --- .github/workflows/publish-npm-package.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index 68510c86e793f..0adb54924d51b 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -280,7 +280,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: bindings-${{ matrix.settings.target }} + name: bindings-${{ inputs.package }}-${{ matrix.settings.target }} path: | packages/${{ inputs.package }}/swc* packages/${{ inputs.package }}/*.node @@ -319,7 +319,7 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v3 with: - name: bindings-${{ matrix.settings.target }} + name: bindings-${{ inputs.package }}-${{ matrix.settings.target }} path: ./packages/${{ inputs.package }} - name: List packages run: ls -R . @@ -358,7 +358,7 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v3 with: - name: bindings-x86_64-unknown-linux-gnu + name: bindings-${{ inputs.package }}-x86_64-unknown-linux-gnu path: ./packages/${{ inputs.package }} - name: List packages run: ls -R . @@ -398,7 +398,7 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v3 with: - name: bindings-x86_64-unknown-linux-musl + name: bindings-${{ inputs.package }}-x86_64-unknown-linux-musl path: ./packages/${{ inputs.package }} - name: List packages run: ls -R . @@ -421,7 +421,7 @@ jobs: # - name: Download artifacts # uses: actions/download-artifact@v3 # with: - # name: bindings-aarch64-unknown-linux-musl + # name: bindings-${{ inputs.package }}-aarch64-unknown-linux-musl # path: ./packages/${{ inputs.package }} # - name: List packages # run: ls -R . @@ -469,7 +469,7 @@ jobs: # - name: Download artifacts # uses: actions/download-artifact@v3 # with: - # name: bindings-armv7-unknown-linux-gnueabihf + # name: bindings-${{ inputs.package }}-armv7-unknown-linux-gnueabihf # path: ./packages/${{ inputs.package }} # - name: List packages # run: ls -R . @@ -526,6 +526,7 @@ jobs: - name: Download all artifacts uses: actions/download-artifact@v3 with: + pattern: "bindings-${{ inputs.package }}-*" path: ./packages/${{ inputs.package }}/artifacts - name: List binaries From f0a370546f6a0fb4594fce6be00392260e08fdb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 19:25:34 +0900 Subject: [PATCH 47/59] chore(ci): Update `actions/download-artifact` --- .github/workflows/publish-npm-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index 0adb54924d51b..b5c2f8c97fbd6 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -524,7 +524,7 @@ jobs: run: corepack enable && yarn install - name: Download all artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: pattern: "bindings-${{ inputs.package }}-*" path: ./packages/${{ inputs.package }}/artifacts From 43236684c35b29b8f1c7afc4f6ae113b96cf9ec5 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 10:35:55 +0000 Subject: [PATCH 48/59] chore: Publish `1.7.17-nightly-20240820.2` with `swc_core` `v0.101.4` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/html/package.json | 2 +- packages/html/scripts/npm/darwin-arm64/package.json | 2 +- packages/html/scripts/npm/darwin-x64/package.json | 2 +- packages/html/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/html/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 32 files changed, 35 insertions(+), 35 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 426d077ad0121..f1a4dc50f5ecc 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.17-nightly-20240820.1" +version = "1.7.17-nightly-20240820.2" dependencies = [ "anyhow", "getrandom", @@ -324,7 +324,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.17-nightly-20240820.1" +version = "1.7.17-nightly-20240820.2" dependencies = [ "anyhow", "getrandom", @@ -337,7 +337,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.17-nightly-20240820.1" +version = "1.7.17-nightly-20240820.2" dependencies = [ "anyhow", "getrandom", @@ -3409,7 +3409,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.389" +version = "0.91.390" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 07decd5390e34..367d1f402fb50 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.17-nightly-20240820.1" +version = "1.7.17-nightly-20240820.2" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index afc103d878420..0a00ca1fe288e 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.17-nightly-20240820.1" +version = "1.7.17-nightly-20240820.2" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 0bbaa9d924248..290e88b9e4971 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.17-nightly-20240820.1" +version = "1.7.17-nightly-20240820.2" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 8a7b0cc2dc886..6e2a0c50b471f 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.389" +version = "0.91.390" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 2b1a6fa2c7360..3926d1543286f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 07747dbae6290..321071d7b26ea 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 267b34a8874f0..82d864514d494 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 68243a087bb59..3905d7101084c 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index a8b88bcae2d92..739f36a972a77 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 1fb133c6c6739..6921a31bf8afe 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index a2398a266b09a..038695b7ae996 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 4f0e21cf51b64..3171db2f9356e 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index d32d0c9c73464..efb20ef78d6fc 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 56a6ebb57c828..ce976713273dc 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 17e1de438fef8..df405aea3e22c 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/html/package.json b/packages/html/package.json index fc3b8aae97641..da096832b9b39 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "description": "Super-fast HTML minifier", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/html/scripts/npm/darwin-arm64/package.json b/packages/html/scripts/npm/darwin-arm64/package.json index b0b66374d97ca..d120a68afc85a 100644 --- a/packages/html/scripts/npm/darwin-arm64/package.json +++ b/packages/html/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-darwin-arm64", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "darwin" ], diff --git a/packages/html/scripts/npm/darwin-x64/package.json b/packages/html/scripts/npm/darwin-x64/package.json index dd29a5911d7ed..833a99ea37200 100644 --- a/packages/html/scripts/npm/darwin-x64/package.json +++ b/packages/html/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-darwin-x64", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "darwin" ], diff --git a/packages/html/scripts/npm/linux-x64-gnu/package.json b/packages/html/scripts/npm/linux-x64-gnu/package.json index 9fc101c87481f..b3685a9574ae3 100644 --- a/packages/html/scripts/npm/linux-x64-gnu/package.json +++ b/packages/html/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-linux-x64-gnu", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/html/scripts/npm/win32-x64-msvc/package.json b/packages/html/scripts/npm/win32-x64-msvc/package.json index ec4e22aa3ebfb..e3a2a33636020 100644 --- a/packages/html/scripts/npm/win32-x64-msvc/package.json +++ b/packages/html/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-win32-x64-msvc", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index ba4cb0c5ff4eb..474234541483d 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index f4acaa34a493f..40b4fcaa99a66 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 74402846f9da9..a7417c126e8c4 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 5baa3b6504034..4bdf559a942a0 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 5c7111c1ac63a..2625ec72997e3 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 13a4481a73450..96a401a375d95 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index f68bb8ed156bb..8334190f65c81 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index ea8ee7f194739..b9c8ab240f43b 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index be88e02cccd54..f6ca680044b9d 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index a1212214dae71..7e2e618ffee09 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 6912be1c62fb3..17451f353b921 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.17-nightly-20240820.1", + "version": "1.7.17-nightly-20240820.2", "os": [ "win32" ], From ac7bd31e8cd79f9df7f3bf6ac05e84b67b0f4546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 21:31:30 +0900 Subject: [PATCH 49/59] fix(ci): FIx pattern for `actions/download-artifact` --- .github/workflows/publish-npm-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index b5c2f8c97fbd6..448cd4e4761ea 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -526,7 +526,7 @@ jobs: - name: Download all artifacts uses: actions/download-artifact@v4 with: - pattern: "bindings-${{ inputs.package }}-*" + pattern: bindings-${{ inputs.package }}-** path: ./packages/${{ inputs.package }}/artifacts - name: List binaries From a54b077ef4c1d983d435a099646a9231405dca37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 20 Aug 2024 21:39:18 +0900 Subject: [PATCH 50/59] chore(ci): Update artifact actions --- .github/workflows/publish-npm-package.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index 448cd4e4761ea..0f4635b4cb914 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -278,7 +278,7 @@ jobs: run: ${{ matrix.settings.build }} shell: bash - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: bindings-${{ inputs.package }}-${{ matrix.settings.target }} path: | @@ -317,7 +317,7 @@ jobs: - name: Install dependencies run: corepack enable && yarn install --network-timeout 300000 - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: bindings-${{ inputs.package }}-${{ matrix.settings.target }} path: ./packages/${{ inputs.package }} @@ -356,7 +356,7 @@ jobs: - name: Install dependencies run: corepack enable && yarn install - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: bindings-${{ inputs.package }}-x86_64-unknown-linux-gnu path: ./packages/${{ inputs.package }} @@ -396,7 +396,7 @@ jobs: yarn config set supportedArchitectures.libc "musl" yarn install - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: bindings-${{ inputs.package }}-x86_64-unknown-linux-musl path: ./packages/${{ inputs.package }} @@ -419,7 +419,7 @@ jobs: # - name: Corepack # run: corepack enable # - name: Download artifacts - # uses: actions/download-artifact@v3 + # uses: actions/download-artifact@v4 # with: # name: bindings-${{ inputs.package }}-aarch64-unknown-linux-musl # path: ./packages/${{ inputs.package }} @@ -467,7 +467,7 @@ jobs: # - name: Corepack # run: corepack enable # - name: Download artifacts - # uses: actions/download-artifact@v3 + # uses: actions/download-artifact@v4 # with: # name: bindings-${{ inputs.package }}-armv7-unknown-linux-gnueabihf # path: ./packages/${{ inputs.package }} @@ -526,7 +526,7 @@ jobs: - name: Download all artifacts uses: actions/download-artifact@v4 with: - pattern: bindings-${{ inputs.package }}-** + pattern: "bindings-${{ inputs.package }}-*" path: ./packages/${{ inputs.package }}/artifacts - name: List binaries From c17debe330398e652200b2389362e192aeee86bc Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 12:48:01 +0000 Subject: [PATCH 51/59] chore: Publish `1.7.17-nightly-20240820.3` with `swc_core` `v0.101.4` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/html/package.json | 2 +- packages/html/scripts/npm/darwin-arm64/package.json | 2 +- packages/html/scripts/npm/darwin-x64/package.json | 2 +- packages/html/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/html/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 32 files changed, 35 insertions(+), 35 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index f1a4dc50f5ecc..c979e1cea2072 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.17-nightly-20240820.2" +version = "1.7.17-nightly-20240820.3" dependencies = [ "anyhow", "getrandom", @@ -324,7 +324,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.17-nightly-20240820.2" +version = "1.7.17-nightly-20240820.3" dependencies = [ "anyhow", "getrandom", @@ -337,7 +337,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.17-nightly-20240820.2" +version = "1.7.17-nightly-20240820.3" dependencies = [ "anyhow", "getrandom", @@ -3409,7 +3409,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.390" +version = "0.91.391" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 367d1f402fb50..9bbfb6b3dfa52 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.17-nightly-20240820.2" +version = "1.7.17-nightly-20240820.3" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 0a00ca1fe288e..9a45280dd5e73 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.17-nightly-20240820.2" +version = "1.7.17-nightly-20240820.3" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 290e88b9e4971..079f0c196e75b 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.17-nightly-20240820.2" +version = "1.7.17-nightly-20240820.3" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 6e2a0c50b471f..80aace234e7d7 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.390" +version = "0.91.391" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 3926d1543286f..70635419ea1b3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 321071d7b26ea..9988388283bb1 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 82d864514d494..5e1f357ce7362 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 3905d7101084c..1b103e86c9cff 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 739f36a972a77..5b6d1459cdfaf 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 6921a31bf8afe..2fa6f59134f70 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 038695b7ae996..1a3d3d894aa62 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 3171db2f9356e..a039b374b2fff 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index efb20ef78d6fc..91104511ebcc4 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index ce976713273dc..7d63ac1174a24 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index df405aea3e22c..b97e727971629 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/html/package.json b/packages/html/package.json index da096832b9b39..0c673419ea169 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "description": "Super-fast HTML minifier", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/html/scripts/npm/darwin-arm64/package.json b/packages/html/scripts/npm/darwin-arm64/package.json index d120a68afc85a..ef0413a2c6683 100644 --- a/packages/html/scripts/npm/darwin-arm64/package.json +++ b/packages/html/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-darwin-arm64", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "darwin" ], diff --git a/packages/html/scripts/npm/darwin-x64/package.json b/packages/html/scripts/npm/darwin-x64/package.json index 833a99ea37200..5d3f1d175a451 100644 --- a/packages/html/scripts/npm/darwin-x64/package.json +++ b/packages/html/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-darwin-x64", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "darwin" ], diff --git a/packages/html/scripts/npm/linux-x64-gnu/package.json b/packages/html/scripts/npm/linux-x64-gnu/package.json index b3685a9574ae3..63dc4c52f579d 100644 --- a/packages/html/scripts/npm/linux-x64-gnu/package.json +++ b/packages/html/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-linux-x64-gnu", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/html/scripts/npm/win32-x64-msvc/package.json b/packages/html/scripts/npm/win32-x64-msvc/package.json index e3a2a33636020..0f80c5cfe4028 100644 --- a/packages/html/scripts/npm/win32-x64-msvc/package.json +++ b/packages/html/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html-win32-x64-msvc", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 474234541483d..febdc529045c2 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 40b4fcaa99a66..2a0edba46dfd2 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index a7417c126e8c4..2fa1bec9dff62 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 4bdf559a942a0..6218a0b1a3ea3 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 2625ec72997e3..046b0940e26e0 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 96a401a375d95..b4d44b50759fc 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 8334190f65c81..429066b9ee888 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index b9c8ab240f43b..14d54a7c40663 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index f6ca680044b9d..faaa492196720 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 7e2e618ffee09..f9e2a63198b40 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 17451f353b921..9fa27c9d530d1 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.17-nightly-20240820.2", + "version": "1.7.17-nightly-20240820.3", "os": [ "win32" ], From 3ed6abe52e3f4f17c83b3d80f6a1c6ecbe7ce20a Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 20 Aug 2024 12:48:02 +0000 Subject: [PATCH 52/59] chore: Update changelog --- CHANGELOG.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7419627b2d033..a5fef948fc249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(ci)** FIx pattern for `actions/download-artifact` ([ac7bd31](https://github.com/swc-project/swc/commit/ac7bd31e8cd79f9df7f3bf6ac05e84b67b0f4546)) + + - **(html)** Fix html binding ([eefae1c](https://github.com/swc-project/swc/commit/eefae1cde794b28b68e5c0af2d2f13a5053b7a49)) ### Features @@ -1277,18 +1280,12 @@ - **(es/decorators)** Fix capacity overflow with decorators ([#8818](https://github.com/swc-project/swc/issues/8818)) ([9ed93c1](https://github.com/swc-project/swc/commit/9ed93c17cdb645274392ebdb9ad87f8fbeeed971)) -- **(es/minifier)** Respect `top_retain` for top-level functions ([#8814](https://github.com/swc-project/swc/issues/8814)) ([811308c](https://github.com/swc-project/swc/commit/811308c3526003608e61c559f43408f6065ff9ee)) - - - **(es/minifier)** Abort IIFE invoker in function parameters ([#8828](https://github.com/swc-project/swc/issues/8828)) ([ebb68db](https://github.com/swc-project/swc/commit/ebb68db24d7287ca12d85a68a34aabfa660eeae0)) - **(es/module)** Respect `module.resolveFully` in more cases ([#8820](https://github.com/swc-project/swc/issues/8820)) ([e1f7704](https://github.com/swc-project/swc/commit/e1f770463d1f0402468e07fca9c637e3823bb2d1)) -- **(es/transforms)** Fix capacity overflow with decorators ([#8815](https://github.com/swc-project/swc/issues/8815)) ([974f5c7](https://github.com/swc-project/swc/commit/974f5c759c7736ab521d18c8e7bd88210691a2ab)) - - - **(plugin/runner)** Pin version of `virtual-fs` ([#8827](https://github.com/swc-project/swc/issues/8827)) ([089f61b](https://github.com/swc-project/swc/commit/089f61bc37bb9c09dc94a24a5518840883827f57)) From 8c007c402f73c0839e45066eaa8a01b98edf2f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 21 Aug 2024 04:37:30 +0900 Subject: [PATCH 53/59] fix(bindings/wasm): Fix typing (#9469) **Related issue:** - Closes https://github.com/swc-project/swc/issues/9442 --- bindings/binding_minifier_wasm/src/types.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/binding_minifier_wasm/src/types.rs b/bindings/binding_minifier_wasm/src/types.rs index 8949dba7faee8..34adb51871641 100644 --- a/bindings/binding_minifier_wasm/src/types.rs +++ b/bindings/binding_minifier_wasm/src/types.rs @@ -696,7 +696,8 @@ export type JscTarget = | "es2019" | "es2020" | "es2021" - | "es2022"; + | "es2022" + | "esnext"; export type ParserConfig = TsParserConfig | EsParserConfig; export interface TsParserConfig { From a212ab0f2b282e66ac8c02ba3c505e72d6384550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 21 Aug 2024 07:37:55 +0900 Subject: [PATCH 54/59] chore: Enable `bunchee` tests of `swc-ecosystem-ci` (#9472) **Related issue:** - https://github.com/huozhi/bunchee/pull/574 --- .github/swc-ecosystem-ci/{todos => tests}/bunchee.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/swc-ecosystem-ci/{todos => tests}/bunchee.ts (100%) diff --git a/.github/swc-ecosystem-ci/todos/bunchee.ts b/.github/swc-ecosystem-ci/tests/bunchee.ts similarity index 100% rename from .github/swc-ecosystem-ci/todos/bunchee.ts rename to .github/swc-ecosystem-ci/tests/bunchee.ts From 3ee8980dbe82587285e4920420687ab7ac7c5cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 21 Aug 2024 08:29:24 +0900 Subject: [PATCH 55/59] feat(visit): Add experimental traverse APIs (#9464) --- .changeset/shaggy-cats-promise.md | 9 ++++++ crates/swc_css_visit/src/generated.rs | 21 ++++++++++++- crates/swc_ecma_visit/src/generated.rs | 21 ++++++++++++- crates/swc_ecma_visit/tests/main.rs | 31 +++++++++++++++++-- crates/swc_html_visit/src/generated.rs | 21 ++++++++++++- crates/swc_xml_visit/src/generated.rs | 21 ++++++++++++- tools/generate-code/src/generators/visitor.rs | 27 +++++++++++++++- 7 files changed, 144 insertions(+), 7 deletions(-) create mode 100644 .changeset/shaggy-cats-promise.md diff --git a/.changeset/shaggy-cats-promise.md b/.changeset/shaggy-cats-promise.md new file mode 100644 index 0000000000000..e48a5e93ac2c0 --- /dev/null +++ b/.changeset/shaggy-cats-promise.md @@ -0,0 +1,9 @@ +--- +swc_css_visit: patch +swc_html_visit: patch +swc_xml_visit: patch +swc_ecma_visit: patch +swc_core: patch +--- + +feat(visit): Add experimental traverse APIs diff --git a/crates/swc_css_visit/src/generated.rs b/crates/swc_css_visit/src/generated.rs index 7cb3ad7e62853..4e3932221a289 100644 --- a/crates/swc_css_visit/src/generated.rs +++ b/crates/swc_css_visit/src/generated.rs @@ -113036,8 +113036,9 @@ pub enum NodeRef<'ast> { WqName(&'ast WqName), } impl<'ast> NodeRef<'ast> { + #[doc = r" This is not a part of semver-stable API. It is experimental and subject to change."] #[allow(unreachable_patterns)] - pub fn raw_children(&'ast self) -> Box>> { + pub fn experimental_raw_children<'a>(&'a self) -> Box>> { match self { NodeRef::AbsoluteColorBase(node) => match node { AbsoluteColorBase::HexColor(v0) => { @@ -114614,5 +114615,23 @@ impl<'ast> NodeRef<'ast> { } } } +impl<'ast> NodeRef<'ast> { + #[doc = r" Visit all nodes in self in preorder."] + #[doc = r""] + #[doc = r" This is not a part of semver-stable API. It is"] + #[doc = r" experimental and subject to change."] + pub fn experimental_traverse(&'ast self) -> Box>> { + let mut queue = std::collections::VecDeque::>::new(); + queue.push_back(*self); + Box::new(std::iter::from_fn(move || { + let node: NodeRef<'ast> = queue.pop_front()?; + { + let children = node.experimental_raw_children(); + queue.extend(children); + } + Some(node) + })) + } +} #[cfg(any(docsrs, feature = "path"))] pub use self::fields::{AstParentKind, AstParentNodeRef}; diff --git a/crates/swc_ecma_visit/src/generated.rs b/crates/swc_ecma_visit/src/generated.rs index 249cde5aa7852..d65a92315ca35 100644 --- a/crates/swc_ecma_visit/src/generated.rs +++ b/crates/swc_ecma_visit/src/generated.rs @@ -143163,8 +143163,9 @@ pub enum NodeRef<'ast> { YieldExpr(&'ast YieldExpr), } impl<'ast> NodeRef<'ast> { + #[doc = r" This is not a part of semver-stable API. It is experimental and subject to change."] #[allow(unreachable_patterns)] - pub fn raw_children(&'ast self) -> Box>> { + pub fn experimental_raw_children<'a>(&'a self) -> Box>> { match self { NodeRef::Accessibility(node) => match node { _ => Box::new(::std::iter::empty::>()), @@ -145509,5 +145510,23 @@ impl<'ast> NodeRef<'ast> { } } } +impl<'ast> NodeRef<'ast> { + #[doc = r" Visit all nodes in self in preorder."] + #[doc = r""] + #[doc = r" This is not a part of semver-stable API. It is"] + #[doc = r" experimental and subject to change."] + pub fn experimental_traverse(&'ast self) -> Box>> { + let mut queue = std::collections::VecDeque::>::new(); + queue.push_back(*self); + Box::new(std::iter::from_fn(move || { + let node: NodeRef<'ast> = queue.pop_front()?; + { + let children = node.experimental_raw_children(); + queue.extend(children); + } + Some(node) + })) + } +} #[cfg(any(docsrs, feature = "path"))] pub use self::fields::{AstParentKind, AstParentNodeRef}; diff --git a/crates/swc_ecma_visit/tests/main.rs b/crates/swc_ecma_visit/tests/main.rs index cfd78bb62f183..b5cfb56c35304 100644 --- a/crates/swc_ecma_visit/tests/main.rs +++ b/crates/swc_ecma_visit/tests/main.rs @@ -1,6 +1,6 @@ use swc_common::{chain, DUMMY_SP}; -use swc_ecma_ast::{Module, Program}; -use swc_ecma_visit::{Visit, VisitWith}; +use swc_ecma_ast::*; +use swc_ecma_visit::{NodeRef, Visit, VisitWith}; #[test] fn should_visit_program() { @@ -29,3 +29,30 @@ fn should_visit_program() { assert_eq!(counter, 1); } + +#[test] +fn traverse_lookup() { + let node = Expr::Call(CallExpr { + span: DUMMY_SP, + callee: Callee::Expr( + AwaitExpr { + span: DUMMY_SP, + arg: Ident::new_no_ctxt("foo".into(), DUMMY_SP).into(), + } + .into(), + ), + args: Vec::new(), + ..Default::default() + }); + + let node_ref = NodeRef::from(&node); + let iter = node_ref.experimental_traverse(); + + let mut has_await = false; + + for node in iter { + has_await |= matches!(node, NodeRef::AwaitExpr(..)); + } + + assert!(has_await); +} diff --git a/crates/swc_html_visit/src/generated.rs b/crates/swc_html_visit/src/generated.rs index 8054a4075ee60..759070f8e6cd2 100644 --- a/crates/swc_html_visit/src/generated.rs +++ b/crates/swc_html_visit/src/generated.rs @@ -11289,8 +11289,9 @@ pub enum NodeRef<'ast> { TokenAndSpan(&'ast TokenAndSpan), } impl<'ast> NodeRef<'ast> { + #[doc = r" This is not a part of semver-stable API. It is experimental and subject to change."] #[allow(unreachable_patterns)] - pub fn raw_children(&'ast self) -> Box>> { + pub fn experimental_raw_children<'a>(&'a self) -> Box>> { match self { NodeRef::Attribute(node) => { let iterator = ::std::iter::empty::>().chain( @@ -11381,5 +11382,23 @@ impl<'ast> NodeRef<'ast> { } } } +impl<'ast> NodeRef<'ast> { + #[doc = r" Visit all nodes in self in preorder."] + #[doc = r""] + #[doc = r" This is not a part of semver-stable API. It is"] + #[doc = r" experimental and subject to change."] + pub fn experimental_traverse(&'ast self) -> Box>> { + let mut queue = std::collections::VecDeque::>::new(); + queue.push_back(*self); + Box::new(std::iter::from_fn(move || { + let node: NodeRef<'ast> = queue.pop_front()?; + { + let children = node.experimental_raw_children(); + queue.extend(children); + } + Some(node) + })) + } +} #[cfg(any(docsrs, feature = "path"))] pub use self::fields::{AstParentKind, AstParentNodeRef}; diff --git a/crates/swc_xml_visit/src/generated.rs b/crates/swc_xml_visit/src/generated.rs index 237deb6c6537b..58b53f2775f2a 100644 --- a/crates/swc_xml_visit/src/generated.rs +++ b/crates/swc_xml_visit/src/generated.rs @@ -10857,8 +10857,9 @@ pub enum NodeRef<'ast> { TokenAndSpan(&'ast TokenAndSpan), } impl<'ast> NodeRef<'ast> { + #[doc = r" This is not a part of semver-stable API. It is experimental and subject to change."] #[allow(unreachable_patterns)] - pub fn raw_children(&'ast self) -> Box>> { + pub fn experimental_raw_children<'a>(&'a self) -> Box>> { match self { NodeRef::Attribute(node) => { let iterator = ::std::iter::empty::>().chain( @@ -10942,5 +10943,23 @@ impl<'ast> NodeRef<'ast> { } } } +impl<'ast> NodeRef<'ast> { + #[doc = r" Visit all nodes in self in preorder."] + #[doc = r""] + #[doc = r" This is not a part of semver-stable API. It is"] + #[doc = r" experimental and subject to change."] + pub fn experimental_traverse(&'ast self) -> Box>> { + let mut queue = std::collections::VecDeque::>::new(); + queue.push_back(*self); + Box::new(std::iter::from_fn(move || { + let node: NodeRef<'ast> = queue.pop_front()?; + { + let children = node.experimental_raw_children(); + queue.extend(children); + } + Some(node) + })) + } +} #[cfg(any(docsrs, feature = "path"))] pub use self::fields::{AstParentKind, AstParentNodeRef}; diff --git a/tools/generate-code/src/generators/visitor.rs b/tools/generate-code/src/generators/visitor.rs index 898328376063c..6f74be02d19b3 100644 --- a/tools/generate-code/src/generators/visitor.rs +++ b/tools/generate-code/src/generators/visitor.rs @@ -1599,14 +1599,39 @@ fn define_fields(crate_name: &Ident, node_types: &[&Item]) -> Vec { )); items.push(parse_quote!( impl<'ast> NodeRef<'ast> { + /// This is not a part of semver-stable API. It is experimental and subject to change. #[allow(unreachable_patterns)] - pub fn raw_children(&'ast self) -> Box>> { + pub fn experimental_raw_children<'a>(&'a self) -> Box>> { match self { #(#node_ref_iter_next_arms)* } } } )); + + items.push(parse_quote!( + impl<'ast> NodeRef<'ast> { + /// Visit all nodes in self in preorder. + /// + /// This is not a part of semver-stable API. It is + /// experimental and subject to change. + pub fn experimental_traverse( + &'ast self, + ) -> Box>> { + let mut queue = std::collections::VecDeque::>::new(); + queue.push_back(*self); + + Box::new(std::iter::from_fn(move || { + let node: NodeRef<'ast> = queue.pop_front()?; + { + let children = node.experimental_raw_children(); + queue.extend(children); + } + Some(node) + })) + } + } + )); } items.insert( From c72b5f8b327118794c3a9c76f68ac30005c94793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 21 Aug 2024 14:01:16 +0900 Subject: [PATCH 56/59] fix(es/minifier): Force rename synthesized identifiers (#9473) **Related issue:** - Closes https://github.com/swc-project/swc/issues/9468 --- .changeset/many-lobsters-knock.md | 6 +++++ .../src/compress/pure/evaluate.rs | 18 +++++--------- crates/swc_ecma_minifier/src/lib.rs | 2 +- .../src/pass/mangle_names/preserver.rs | 24 +++++++++++++------ .../tests/fixture/issues/9468/input.js | 10 ++++++++ .../tests/fixture/issues/9468/mangle.json | 1 + .../tests/fixture/issues/9468/output.js | 5 ++++ 7 files changed, 46 insertions(+), 20 deletions(-) create mode 100644 .changeset/many-lobsters-knock.md create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/9468/input.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/9468/mangle.json create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/9468/output.js diff --git a/.changeset/many-lobsters-knock.md b/.changeset/many-lobsters-knock.md new file mode 100644 index 0000000000000..2a9704abcd1b1 --- /dev/null +++ b/.changeset/many-lobsters-knock.md @@ -0,0 +1,6 @@ +--- +swc_ecma_minifier: patch +swc_core: patch +--- + +fix(es/minifier): Force rename synthesized identifiers diff --git a/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs b/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs index 856c68a66c28c..8ae04866645f6 100644 --- a/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs +++ b/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs @@ -2,11 +2,11 @@ use radix_fmt::Radix; use swc_common::{util::take::Take, Spanned, SyntaxContext}; use swc_ecma_ast::*; use swc_ecma_utils::{number::ToJsString, ExprExt, IsEmpty, Value}; -#[cfg(feature = "debug")] -use {crate::debug::dump, tracing::debug}; use super::Pure; use crate::compress::util::{eval_as_number, is_pure_undefined_or_null}; +#[cfg(feature = "debug")] +use crate::debug::dump; impl Pure<'_> { pub(super) fn eval_array_method_call(&mut self, e: &mut Expr) { @@ -659,21 +659,15 @@ impl Pure<'_> { _ => return, }; - #[cfg(feature = "debug")] - debug!( - "before: optimize_member_expr: {}", - dump(&*member_expr, false) - ); - if let Some(replacement) = self.optimize_member_expr(&mut member_expr.obj, &member_expr.prop) { *e = replacement; self.changed = true; - report_change!("member_expr: Optimized member expression"); - - #[cfg(feature = "debug")] - debug!("after: optimize_member_expr: {}", dump(&*e, false)); + report_change!( + "member_expr: Optimized member expression as {}", + dump(&*e, false) + ); } } diff --git a/crates/swc_ecma_minifier/src/lib.rs b/crates/swc_ecma_minifier/src/lib.rs index a792dd82fcd28..d4bfdb92d71c7 100644 --- a/crates/swc_ecma_minifier/src/lib.rs +++ b/crates/swc_ecma_minifier/src/lib.rs @@ -232,7 +232,7 @@ pub fn optimize( let _timer = timer!("mangle names"); // TODO: base54.reset(); - let preserved = idents_to_preserve(mangle.clone(), &n); + let preserved = idents_to_preserve(mangle.clone(), marks, &n); let chars = CharFreq::compute( &n, diff --git a/crates/swc_ecma_minifier/src/pass/mangle_names/preserver.rs b/crates/swc_ecma_minifier/src/pass/mangle_names/preserver.rs index ac7984075e24d..d68ab1602ba8b 100644 --- a/crates/swc_ecma_minifier/src/pass/mangle_names/preserver.rs +++ b/crates/swc_ecma_minifier/src/pass/mangle_names/preserver.rs @@ -1,26 +1,36 @@ use rustc_hash::FxHashSet; use swc_ecma_ast::*; +use swc_ecma_usage_analyzer::marks::Marks; use swc_ecma_utils::find_pat_ids; use swc_ecma_visit::{noop_visit_type, Visit, VisitWith}; use crate::option::MangleOptions; /// Returns `(preserved, unresolved)` -pub(crate) fn idents_to_preserve(options: MangleOptions, n: &N) -> FxHashSet +pub(crate) fn idents_to_preserve(options: MangleOptions, marks: Marks, n: &N) -> FxHashSet where - N: VisitWith, + N: for<'a> VisitWith>, { let mut v = Preserver { - options, + options: &options, preserved: Default::default(), should_preserve: false, in_top_level: false, }; n.visit_with(&mut v); + + let top_level_mark = marks.top_level_ctxt.outer(); + + // Force rename synthesized names + // See https://github.com/swc-project/swc/issues/9468 + v.preserved.retain(|id| { + options.reserved.contains(&id.0) || id.1.outer().is_descendant_of(top_level_mark) + }); + v.preserved } -pub(crate) struct Preserver { - options: MangleOptions, +pub(crate) struct Preserver<'a> { + options: &'a MangleOptions, preserved: FxHashSet, @@ -28,13 +38,13 @@ pub(crate) struct Preserver { in_top_level: bool, } -impl Preserver { +impl<'a> Preserver<'a> { fn is_reserved(&self, ident: &Ident) -> bool { self.options.reserved.contains(&ident.sym) } } -impl Visit for Preserver { +impl<'a> Visit for Preserver<'a> { noop_visit_type!(); fn visit_block_stmt(&mut self, n: &BlockStmt) { diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/9468/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/9468/input.js new file mode 100644 index 0000000000000..d11e2ec486006 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/9468/input.js @@ -0,0 +1,10 @@ +function func1(arg1, arg2) { + return getX(arg1) + arg2 +} +function getX(x) { + const v = document.getElementById('eid').getAttribute(x) + return v +} +console.log(func1(7, getX('data-x'))) +console.log(func1(7, getX('data-y'))) + diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/9468/mangle.json b/crates/swc_ecma_minifier/tests/fixture/issues/9468/mangle.json new file mode 100644 index 0000000000000..0967ef424bce6 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/9468/mangle.json @@ -0,0 +1 @@ +{} diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/9468/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/9468/output.js new file mode 100644 index 0000000000000..dc5cf7aa1f0d7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/9468/output.js @@ -0,0 +1,5 @@ +var t, e; +function getX(t) { + return document.getElementById('eid').getAttribute(t); +} +console.log((t = getX('data-x'), getX(7) + t)), console.log((e = getX('data-y'), getX(7) + e)); From ac432c4bff26d5ceb1fa349552dfad829075c673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 21 Aug 2024 14:02:16 +0900 Subject: [PATCH 57/59] fix(es/minifier): Mark LHS of for-in/of as update (#9474) **Related issue:** - Closes https://github.com/swc-project/swc/issues/9466 --- .changeset/shiny-guests-check.md | 6 +++ .../tests/fixture/issues/9466/config.json | 46 +++++++++++++++++++ .../tests/fixture/issues/9466/input.js | 7 +++ .../tests/fixture/issues/9466/output.js | 12 +++++ .../tests/projects/output/yui-3.12.0.js | 16 +++---- .../src/analyzer/mod.rs | 10 ++-- 6 files changed, 84 insertions(+), 13 deletions(-) create mode 100644 .changeset/shiny-guests-check.md create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/9466/config.json create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/9466/input.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/9466/output.js diff --git a/.changeset/shiny-guests-check.md b/.changeset/shiny-guests-check.md new file mode 100644 index 0000000000000..3aadac3e3bdec --- /dev/null +++ b/.changeset/shiny-guests-check.md @@ -0,0 +1,6 @@ +--- +swc_ecma_usage_analyzer: patch +swc_core: patch +--- + +fix(es/minifier): Mark LHS of for-in/of as update diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/9466/config.json b/crates/swc_ecma_minifier/tests/fixture/issues/9466/config.json new file mode 100644 index 0000000000000..e24c2f770eb50 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/9466/config.json @@ -0,0 +1,46 @@ +{ + "arguments": false, + "arrows": true, + "booleans": true, + "booleans_as_integers": false, + "collapse_vars": true, + "comparisons": true, + "computed_props": true, + "conditionals": true, + "dead_code": true, + "directives": true, + "drop_console": false, + "drop_debugger": true, + "evaluate": true, + "expression": false, + "hoist_funs": false, + "hoist_props": true, + "hoist_vars": false, + "if_return": true, + "join_vars": true, + "keep_classnames": false, + "keep_fargs": true, + "keep_fnames": false, + "keep_infinity": false, + "loops": true, + "negate_iife": true, + "properties": true, + "reduce_funcs": false, + "reduce_vars": false, + "side_effects": true, + "switches": true, + "typeofs": true, + "unsafe": false, + "unsafe_arrows": false, + "unsafe_comps": false, + "unsafe_Function": false, + "unsafe_math": false, + "unsafe_symbols": false, + "unsafe_methods": false, + "unsafe_proto": false, + "unsafe_regexp": false, + "unsafe_undefined": false, + "unused": true, + "const_to_let": true, + "pristine_globals": true +} diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/9466/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/9466/input.js new file mode 100644 index 0000000000000..af1c6cf1fdcbe --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/9466/input.js @@ -0,0 +1,7 @@ +"use strict"; +let k = function () { + function x() { } + class y { } + for (x of ['']); + for (y in ['']); +}(); \ No newline at end of file diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/9466/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/9466/output.js new file mode 100644 index 0000000000000..113908328fda7 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/9466/output.js @@ -0,0 +1,12 @@ +"use strict"; +let k = function() { + function x() {} + class y { + } + for (x of [ + '' + ]); + for(y in [ + '' + ]); +}(); diff --git a/crates/swc_ecma_minifier/tests/projects/output/yui-3.12.0.js b/crates/swc_ecma_minifier/tests/projects/output/yui-3.12.0.js index 38efb3d8310c2..43d2b24627d7c 100644 --- a/crates/swc_ecma_minifier/tests/projects/output/yui-3.12.0.js +++ b/crates/swc_ecma_minifier/tests/projects/output/yui-3.12.0.js @@ -4115,7 +4115,7 @@ Contains the core of YUI's feature test architecture. * @private * @param {Object} o The new configuration */ _config: function(o) { - var i, j, val, a, f, group, groupName, mod, self = this, mods = []; + var i, j, val, a, f, group, mod, self = this, mods = []; // apply config values if (o) { for(i in o)if (o.hasOwnProperty(i)) { @@ -4125,7 +4125,7 @@ Contains the core of YUI's feature test architecture. defaultSkin: val }), Y.mix(self.skin, val, !0); else if ("groups" === i) { - for(j in val)if (val.hasOwnProperty(j) && (groupName = j, group = val[j], self.addGroup(group, groupName), group.aliases)) for(a in group.aliases)group.aliases.hasOwnProperty(a) && self.addAlias(group.aliases[a], a); + for(j in val)if (val.hasOwnProperty(j) && (group = val[j], self.addGroup(group, j), group.aliases)) for(a in group.aliases)group.aliases.hasOwnProperty(a) && self.addAlias(group.aliases[a], a); } else if ("modules" === i) // add a hash of module definitions for(j in val)val.hasOwnProperty(j) && self.addModule(val[j], j); else if ("aliases" === i) for(j in val)val.hasOwnProperty(j) && self.addAlias(val[j], j); @@ -4787,7 +4787,7 @@ Contains the core of YUI's feature test architecture. * var out = loader.resolve(true); * */ resolve: function(calc, s) { - var len, i, m, url, group, groupName, j, frag, comboSource, comboSources, mods, comboBase, base, urls, tmpBase, baseLen, comboSep, maxURLLength, addSingle, u = [], resCombos = {}, self = this, inserted = self.ignoreRegistered ? {} : self.inserted, resolved = { + var len, i, m, url, group, groupName, j, frag, comboSource, comboSources, mods, comboBase, urls, tmpBase, baseLen, comboSep, maxURLLength, addSingle, u = [], resCombos = {}, self = this, inserted = self.ignoreRegistered ? {} : self.inserted, resolved = { js: [], jsMods: [], css: [], @@ -4821,12 +4821,12 @@ Contains the core of YUI's feature test architecture. cssMods: [] }, url = j, len = (mods = comboSources[j]).length)) for(i = 0; i < len; i++)!inserted[mods[i]] && ((m = mods[i]) && (m.combine || !m.ext) ? (resCombos[j].comboSep = m.comboSep, resCombos[j].group = m.group, resCombos[j].maxURLLength = m.maxURLLength, frag = (L.isValue(m.root) ? m.root : self.root) + (m.path || m.fullpath), frag = self._filter(frag, m.name), resCombos[j][m.type].push(frag), resCombos[j][m.type + "Mods"].push(m)) : mods[i] && addSingle(mods[i])); for(j in resCombos)if (resCombos.hasOwnProperty(j)) { - for(type in comboSep = resCombos[base = j].comboSep || self.comboSep, maxURLLength = resCombos[base].maxURLLength || self.maxURLLength, resCombos[base])if ("js" === type || "css" === type) { - if (urls = resCombos[base][type], mods = resCombos[base][type + "Mods"], len = urls.length, baseLen = (tmpBase = base + urls.join(comboSep)).length, maxURLLength <= base.length && (maxURLLength = 1024), len) { + for(type in comboSep = resCombos[j].comboSep || self.comboSep, maxURLLength = resCombos[j].maxURLLength || self.maxURLLength, resCombos[j])if ("js" === type || "css" === type) { + if (urls = resCombos[j][type], mods = resCombos[j][type + "Mods"], len = urls.length, baseLen = (tmpBase = j + urls.join(comboSep)).length, maxURLLength <= j.length && (maxURLLength = 1024), len) { if (baseLen > maxURLLength) { - for(s = 0, u = []; s < len; s++)u.push(urls[s]), (tmpBase = base + u.join(comboSep)).length > maxURLLength && (m = u.pop(), tmpBase = base + u.join(comboSep), resolved[type].push(self._filter(tmpBase, null, resCombos[base].group)), u = [], m && u.push(m)); - u.length && (tmpBase = base + u.join(comboSep), resolved[type].push(self._filter(tmpBase, null, resCombos[base].group))); - } else resolved[type].push(self._filter(tmpBase, null, resCombos[base].group)); + for(s = 0, u = []; s < len; s++)u.push(urls[s]), (tmpBase = j + u.join(comboSep)).length > maxURLLength && (m = u.pop(), tmpBase = j + u.join(comboSep), resolved[type].push(self._filter(tmpBase, null, resCombos[j].group)), u = [], m && u.push(m)); + u.length && (tmpBase = j + u.join(comboSep), resolved[type].push(self._filter(tmpBase, null, resCombos[j].group))); + } else resolved[type].push(self._filter(tmpBase, null, resCombos[j].group)); } resolved[type + "Mods"] = resolved[type + "Mods"].concat(mods); } diff --git a/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs b/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs index f09da333f9192..c901df71a48b3 100644 --- a/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs +++ b/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs @@ -153,14 +153,14 @@ where self.data.report_usage(self.ctx, i) } - fn report_assign_pat(&mut self, p: &Pat, is_op: bool) { + fn report_assign_pat(&mut self, p: &Pat, is_read_modify: bool) { for id in find_pat_ids(p) { - self.data.report_assign(self.ctx, id, is_op) + self.data.report_assign(self.ctx, id, is_read_modify) } if let Pat::Expr(e) = p { match &**e { - Expr::Ident(i) => self.data.report_assign(self.ctx, i.to_id(), is_op), + Expr::Ident(i) => self.data.report_assign(self.ctx, i.to_id(), is_read_modify), _ => self.mark_mutation_if_member(e.as_member()), } } @@ -793,7 +793,7 @@ where n.right.visit_with(child); if let ForHead::Pat(pat) = &n.left { - child.with_ctx(head_ctx).report_assign_pat(pat, false) + child.with_ctx(head_ctx).report_assign_pat(pat, true) } let ctx = Ctx { @@ -821,7 +821,7 @@ where n.left.visit_with(&mut *child.with_ctx(head_ctx)); if let ForHead::Pat(pat) = &n.left { - child.with_ctx(head_ctx).report_assign_pat(pat, false) + child.with_ctx(head_ctx).report_assign_pat(pat, true) } let ctx = Ctx { From 4bee30ab40de19c844956e156a7fb3bed1506daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 21 Aug 2024 14:31:05 +0900 Subject: [PATCH 58/59] refactor(common): Simplify `SyntaxContext` and `Mark` (#9476) **Description:** This PR removes the `transparent` of `SyntaxContext` and `is_builtin` of `Mark`. **Related issue:** - Closes https://github.com/swc-project/swc/issues/9346 --- .changeset/clean-jobs-build.md | 7 +++ crates/swc_common/src/syntax_pos.rs | 3 - crates/swc_common/src/syntax_pos/hygiene.rs | 57 +------------------ .../src/imported_fn/hygiene.rs | 8 --- .../swc_plugin_runner/src/imported_fn/mod.rs | 4 -- 5 files changed, 9 insertions(+), 70 deletions(-) create mode 100644 .changeset/clean-jobs-build.md diff --git a/.changeset/clean-jobs-build.md b/.changeset/clean-jobs-build.md new file mode 100644 index 0000000000000..a9422b3605461 --- /dev/null +++ b/.changeset/clean-jobs-build.md @@ -0,0 +1,7 @@ +--- +swc_core: patch +swc_common: patch +swc_plugin_runner: patch +--- + +refactor(common): Simplify `SyntaxContext` and `Mark` diff --git a/crates/swc_common/src/syntax_pos.rs b/crates/swc_common/src/syntax_pos.rs index 2da052b2ab397..bc407a45f50f1 100644 --- a/crates/swc_common/src/syntax_pos.rs +++ b/crates/swc_common/src/syntax_pos.rs @@ -105,9 +105,6 @@ impl Globals { hygiene_data: Mutex::new(hygiene::HygieneData::new()), marks: Mutex::new(vec![MarkData { parent: Mark::root(), - // If the root is opaque, then loops searching for an opaque mark - // will automatically stop after reaching it. - is_builtin: true, }]), dummy_cnt: AtomicU32::new(DUMMY_RESERVE), } diff --git a/crates/swc_common/src/syntax_pos/hygiene.rs b/crates/swc_common/src/syntax_pos/hygiene.rs index 0b3d856eae2d3..59f6218b84e81 100644 --- a/crates/swc_common/src/syntax_pos/hygiene.rs +++ b/crates/swc_common/src/syntax_pos/hygiene.rs @@ -69,10 +69,7 @@ impl SyntaxContext { struct SyntaxContextData { outer_mark: Mark, prev_ctxt: SyntaxContext, - // This context, but with all transparent and semi-transparent marks filtered away. opaque: SyntaxContext, - // This context, but with all transparent marks filtered away. - opaque_and_semitransparent: SyntaxContext, } /// A mark is a unique id associated with a macro expansion. @@ -83,7 +80,6 @@ pub struct Mark(u32); #[derive(Clone, Debug)] pub(crate) struct MarkData { pub(crate) parent: Mark, - pub(crate) is_builtin: bool, } #[cfg_attr( @@ -103,8 +99,6 @@ extern "C" { // on their side. fn __mark_fresh_proxy(mark: u32) -> u32; fn __mark_parent_proxy(self_mark: u32) -> u32; - fn __mark_is_builtin_proxy(self_mark: u32) -> u32; - fn __mark_set_builtin_proxy(self_mark: u32, is_builtin: u32); fn __syntax_context_apply_mark_proxy(self_syntax_context: u32, mark: u32) -> u32; fn __syntax_context_outer_proxy(self_mark: u32) -> u32; @@ -135,10 +129,7 @@ impl Mark { // targeting wasm32-*. #[cfg(not(all(feature = "__plugin_mode", target_arch = "wasm32")))] return with_marks(|marks| { - marks.push(MarkData { - parent, - is_builtin: false, - }); + marks.push(MarkData { parent }); Mark(marks.len() as u32 - 1) }); } @@ -169,33 +160,6 @@ impl Mark { return with_marks(|marks| marks[self.0 as usize].parent); } - #[inline] - pub fn is_builtin(self) -> bool { - #[cfg(all(feature = "__plugin_mode", target_arch = "wasm32"))] - return unsafe { __mark_is_builtin_proxy(self.0) != 0 }; - - #[cfg(not(all(feature = "__plugin_mode", target_arch = "wasm32")))] - { - assert_ne!(self, Mark::root()); - - with_marks(|marks| marks[self.0 as usize].is_builtin) - } - } - - #[inline] - pub fn set_is_builtin(self, is_builtin: bool) { - #[cfg(all(feature = "__plugin_mode", target_arch = "wasm32"))] - unsafe { - __mark_set_builtin_proxy(self.0, is_builtin as u32) - } - #[cfg(not(all(feature = "__plugin_mode", target_arch = "wasm32")))] - { - assert_ne!(self, Mark::root()); - - with_marks(|marks| marks[self.0 as usize].is_builtin = is_builtin) - } - } - #[allow(unused_assignments)] #[cfg(all(feature = "__plugin_mode", target_arch = "wasm32"))] pub fn is_descendant_of(mut self, ancestor: Mark) -> bool { @@ -321,7 +285,6 @@ impl HygieneData { outer_mark: Mark::root(), prev_ctxt: SyntaxContext(0), opaque: SyntaxContext(0), - opaque_and_semitransparent: SyntaxContext(0), }], markings: HashMap::default(), } @@ -414,32 +377,16 @@ impl SyntaxContext { HygieneData::with(|data| { let syntax_contexts = &mut data.syntax_contexts; let mut opaque = syntax_contexts[self.0 as usize].opaque; - let opaque_and_semitransparent = - syntax_contexts[self.0 as usize].opaque_and_semitransparent; let prev_ctxt = opaque; - opaque = *data.markings.entry((prev_ctxt, mark)).or_insert_with(|| { + *data.markings.entry((prev_ctxt, mark)).or_insert_with(|| { let new_opaque = SyntaxContext(syntax_contexts.len() as u32); syntax_contexts.push(SyntaxContextData { outer_mark: mark, prev_ctxt, opaque: new_opaque, - opaque_and_semitransparent: new_opaque, }); new_opaque - }); - - let prev_ctxt = self; - *data.markings.entry((prev_ctxt, mark)).or_insert_with(|| { - let new_opaque_and_semitransparent_and_transparent = - SyntaxContext(syntax_contexts.len() as u32); - syntax_contexts.push(SyntaxContextData { - outer_mark: mark, - prev_ctxt, - opaque, - opaque_and_semitransparent, - }); - new_opaque_and_semitransparent_and_transparent }) }) } diff --git a/crates/swc_plugin_runner/src/imported_fn/hygiene.rs b/crates/swc_plugin_runner/src/imported_fn/hygiene.rs index 2b17616d58c2a..d0552c65f824a 100644 --- a/crates/swc_plugin_runner/src/imported_fn/hygiene.rs +++ b/crates/swc_plugin_runner/src/imported_fn/hygiene.rs @@ -18,14 +18,6 @@ pub fn mark_parent_proxy(self_mark: u32) -> u32 { Mark::from_u32(self_mark).parent().as_u32() } -pub fn mark_is_builtin_proxy(self_mark: u32) -> u32 { - Mark::from_u32(self_mark).is_builtin() as u32 -} - -pub fn mark_set_builtin_proxy(self_mark: u32, is_builtin: u32) { - Mark::from_u32(self_mark).set_is_builtin(is_builtin != 0); -} - /// A proxy to Mark::is_descendant_of_() that can be used in plugin. /// Original call site have mutable param, which we'll pass over as return value /// via serialized MutableMarkContext. diff --git a/crates/swc_plugin_runner/src/imported_fn/mod.rs b/crates/swc_plugin_runner/src/imported_fn/mod.rs index 7f6714dd35f28..39fd79055d9bd 100644 --- a/crates/swc_plugin_runner/src/imported_fn/mod.rs +++ b/crates/swc_plugin_runner/src/imported_fn/mod.rs @@ -133,8 +133,6 @@ pub(crate) fn build_import_object( // hygiene let mark_fresh_fn_decl = Function::new_typed(wasmer_store, mark_fresh_proxy); let mark_parent_fn_decl = Function::new_typed(wasmer_store, mark_parent_proxy); - let mark_is_builtin_fn_decl = Function::new_typed(wasmer_store, mark_is_builtin_proxy); - let mark_set_builtin_fn_decl = Function::new_typed(wasmer_store, mark_set_builtin_proxy); let mark_is_descendant_of_fn_decl = Function::new_typed_with_env(wasmer_store, base_env, mark_is_descendant_of_proxy); @@ -254,8 +252,6 @@ pub(crate) fn build_import_object( // hygiene "__mark_fresh_proxy" => mark_fresh_fn_decl, "__mark_parent_proxy" => mark_parent_fn_decl, - "__mark_is_builtin_proxy" => mark_is_builtin_fn_decl, - "__mark_set_builtin_proxy" => mark_set_builtin_fn_decl, "__mark_is_descendant_of_proxy" => mark_is_descendant_of_fn_decl, "__mark_least_ancestor" => mark_least_ancestor_fn_decl, "__syntax_context_apply_mark_proxy" => syntax_context_apply_mark_fn_decl, From b0b5e36675835ce5f98ad55528dddc6514064553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Wed, 21 Aug 2024 14:43:07 +0900 Subject: [PATCH 59/59] chore(plugin/runner): Fix benchmark (#9477) --- .../swc_plugin_runner/benches/assets/input.js | 5 -- .../swc_plugin_runner/benches/ecma_invoke.rs | 85 ++++++++++--------- 2 files changed, 44 insertions(+), 46 deletions(-) delete mode 100644 crates/swc_plugin_runner/benches/assets/input.js diff --git a/crates/swc_plugin_runner/benches/assets/input.js b/crates/swc_plugin_runner/benches/assets/input.js deleted file mode 100644 index 768e7894ad848..0000000000000 --- a/crates/swc_plugin_runner/benches/assets/input.js +++ /dev/null @@ -1,5 +0,0 @@ - - -class Foo { - -} \ No newline at end of file diff --git a/crates/swc_plugin_runner/benches/ecma_invoke.rs b/crates/swc_plugin_runner/benches/ecma_invoke.rs index c56930cf2bd71..7e968672326bc 100644 --- a/crates/swc_plugin_runner/benches/ecma_invoke.rs +++ b/crates/swc_plugin_runner/benches/ecma_invoke.rs @@ -19,7 +19,7 @@ use swc_common::{ use swc_ecma_ast::EsVersion; use swc_ecma_parser::parse_file_as_program; -static SOURCE: &str = include_str!("./assets/input.js"); +static SOURCE: &str = include_str!("../../swc_ecma_minifier/benches/full/typescript.js"); fn plugin_group(c: &mut Criterion) { let plugin_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()) @@ -65,49 +65,52 @@ fn bench_transform(b: &mut Bencher, plugin_dir: &Path) { #[cfg(feature = "__rkyv")] b.iter(|| { GLOBALS.set(&Globals::new(), || { - let cm = Arc::new(SourceMap::new(FilePathMapping::empty())); - - let fm = cm.new_source_file( - FileName::Real("src/test.ts".into()).into(), - SOURCE.to_string(), - ); - - let program = parse_file_as_program( - &fm, - Default::default(), - EsVersion::latest(), - None, - &mut Vec::new(), - ) - .unwrap(); - - let program = VersionedSerializable::new(program); - let program_ser = PluginSerializedBytes::try_serialize(&program).unwrap(); - - let mut transform_plugin_executor = swc_plugin_runner::create_plugin_transform_executor( - &cm, - &Mark::new(), - &Arc::new(TransformPluginMetadataContext::new( + tokio::runtime::Runtime::new().unwrap().block_on(async { + let cm = Arc::new(SourceMap::new(FilePathMapping::empty())); + + let fm = cm.new_source_file( + FileName::Real("src/test.ts".into()).into(), + SOURCE.to_string(), + ); + + let program = parse_file_as_program( + &fm, + Default::default(), + EsVersion::latest(), None, - "development".to_string(), - None, - )), - Box::new(plugin_module.clone()), - None, - None, - ); - - let experimental_metadata: VersionedSerializable> = - VersionedSerializable::new(AHashMap::default()); - let _experimental_metadata = - PluginSerializedBytes::try_serialize(&experimental_metadata) - .expect("Should be a hashmap"); - - let res = transform_plugin_executor - .transform(&program_ser, Some(true)) + &mut Vec::new(), + ) .unwrap(); - let _ = black_box(res); + let program = VersionedSerializable::new(program); + let program_ser = PluginSerializedBytes::try_serialize(&program).unwrap(); + + let mut transform_plugin_executor = + swc_plugin_runner::create_plugin_transform_executor( + &cm, + &Mark::new(), + &Arc::new(TransformPluginMetadataContext::new( + None, + "development".to_string(), + None, + )), + Box::new(plugin_module.clone()), + None, + None, + ); + + let experimental_metadata: VersionedSerializable> = + VersionedSerializable::new(AHashMap::default()); + let _experimental_metadata = + PluginSerializedBytes::try_serialize(&experimental_metadata) + .expect("Should be a hashmap"); + + let res = transform_plugin_executor + .transform(&program_ser, Some(true)) + .unwrap(); + + let _ = black_box(res); + }); }); }) }