From 9a11d34ee569f64e8db02fc90beacbba0f2de0cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 8 Oct 2024 13:44:59 +0900 Subject: [PATCH 1/9] feat(es/preset-env): Update preset-env data (#9573) **Related issue:** - Closes /~https://github.com/swc-project/swc/issues/9544 --- .changeset/sharp-apricots-tease.md | 6 + .../fixture/issues-9xxx/9544/input/.swcrc | 15 + .../tests/fixture/issues-9xxx/9544/input/1.js | 3 + .../fixture/issues-9xxx/9544/output/1.js | 4 + .../data/@babel/compat-data/data/plugins.json | 3 +- .../data/core-js-compat/data.json | 85 ++- .../src/corejs3/builtin.rs | 608 +++++++++--------- .../usage-typed-array-edge-13/output.mjs | 1 + .../usage-typed-array-static/output.mjs | 2 + .../corejs3/usage-typed-array/output.mjs | 2 + package.json | 4 +- yarn.lock | 20 +- 12 files changed, 419 insertions(+), 334 deletions(-) create mode 100644 .changeset/sharp-apricots-tease.md create mode 100644 crates/swc/tests/fixture/issues-9xxx/9544/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-9xxx/9544/input/1.js create mode 100644 crates/swc/tests/fixture/issues-9xxx/9544/output/1.js diff --git a/.changeset/sharp-apricots-tease.md b/.changeset/sharp-apricots-tease.md new file mode 100644 index 0000000000000..ff21ac2c8e512 --- /dev/null +++ b/.changeset/sharp-apricots-tease.md @@ -0,0 +1,6 @@ +--- +swc_ecma_preset_env: patch +swc_core: patch +--- + +feat(es/preset-env): Update preset-env data diff --git a/crates/swc/tests/fixture/issues-9xxx/9544/input/.swcrc b/crates/swc/tests/fixture/issues-9xxx/9544/input/.swcrc new file mode 100644 index 0000000000000..5287e4163c174 --- /dev/null +++ b/crates/swc/tests/fixture/issues-9xxx/9544/input/.swcrc @@ -0,0 +1,15 @@ +{ + "$schema": "https://swc.rs/schema.json", + "jsc": { + "parser": { + "syntax": "ecmascript", + }, + }, + "env": { + "targets": { + "chrome": "40" + }, + "mode": "usage", + "coreJs": "3.22" + } +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-9xxx/9544/input/1.js b/crates/swc/tests/fixture/issues-9xxx/9544/input/1.js new file mode 100644 index 0000000000000..672d60a1c05d6 --- /dev/null +++ b/crates/swc/tests/fixture/issues-9xxx/9544/input/1.js @@ -0,0 +1,3 @@ +document.querySelectorAll('div').forEach(el => { + console.log(el); +}) \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-9xxx/9544/output/1.js b/crates/swc/tests/fixture/issues-9xxx/9544/output/1.js new file mode 100644 index 0000000000000..adfe3d9c8afb2 --- /dev/null +++ b/crates/swc/tests/fixture/issues-9xxx/9544/output/1.js @@ -0,0 +1,4 @@ +require("core-js/modules/es.object.to-string.js"); +document.querySelectorAll('div').forEach(function(el) { + console.log(el); +}); diff --git a/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugins.json b/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugins.json index 0b269f84600e9..50fe80e582516 100644 --- a/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugins.json +++ b/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugins.json @@ -1,6 +1,7 @@ { "transform-duplicate-named-capturing-groups-regex": { "chrome": "126", + "opera": "112", "edge": "126", "firefox": "129", "safari": "17.4", @@ -22,7 +23,7 @@ "chrome": "98", "opera": "84", "edge": "98", - "firefox": "95", + "firefox": "75", "safari": "15", "node": "12", "deno": "1.18", diff --git a/crates/swc_ecma_preset_env/data/core-js-compat/data.json b/crates/swc_ecma_preset_env/data/core-js-compat/data.json index c53e85e7988ee..da2818ae5db11 100755 --- a/crates/swc_ecma_preset_env/data/core-js-compat/data.json +++ b/crates/swc_ecma_preset_env/data/core-js-compat/data.json @@ -389,6 +389,7 @@ "electron": "10.0", "firefox": "79", "firefox-android": "79", + "hermes": "0.13", "ios": "14.0", "node": "15.0", "oculus": "12.0", @@ -410,6 +411,7 @@ "electron": "15.0", "firefox": "91", "firefox-android": "91", + "hermes": "0.13", "ios": "15.0", "node": "16.11", "oculus": "18.0", @@ -431,6 +433,7 @@ "electron": "14.0", "firefox": "90", "firefox-android": "90", + "hermes": "0.13", "ios": "15.4", "node": "16.6", "oculus": "17.0", @@ -711,6 +714,7 @@ "electron": "1.2", "firefox": "53", "firefox-android": "53", + "hermes": "0.13", "ios": "9.0", "node": "6.5", "oculus": "3.0", @@ -1113,6 +1117,7 @@ "electron": "23.0", "firefox": "115", "firefox-android": "115", + "hermes": "0.13", "ios": "16.0", "node": "20.0", "oculus": "26.0", @@ -1154,6 +1159,7 @@ "electron": "23.0", "firefox": "115", "firefox-android": "115", + "hermes": "0.13", "ios": "16.0", "node": "20.0", "oculus": "26.0", @@ -1238,6 +1244,7 @@ "electron": "23.0", "firefox": "115", "firefox-android": "115", + "hermes": "0.13", "ios": "16.0", "node": "20.0", "oculus": "26.0", @@ -1726,6 +1733,7 @@ "electron": "5.0", "firefox": "64", "firefox-android": "64", + "hermes": "0.13", "ios": "12.2", "node": "12.0", "oculus": "6.0", @@ -1770,6 +1778,7 @@ "electron": "1.2", "firefox": "53", "firefox-android": "53", + "hermes": "0.13", "ios": "10.0", "node": "6.5", "oculus": "3.0", @@ -3673,6 +3682,7 @@ "electron": "3.0", "firefox": "78", "firefox-android": "78", + "hermes": "0.13", "ios": "11.3", "node": "10.0", "oculus": "5.0", @@ -3782,6 +3792,7 @@ "electron": "1.2", "firefox": "53", "firefox-android": "53", + "hermes": "0.13", "ios": "10.0", "node": "6.5", "oculus": "3.0", @@ -3944,6 +3955,7 @@ "electron": "14.0", "firefox": "90", "firefox-android": "90", + "hermes": "0.13", "ios": "15.4", "node": "16.6", "oculus": "17.0", @@ -4237,6 +4249,7 @@ "electron": "3.0", "firefox": "78", "firefox-android": "78", + "hermes": "0.13", "ios": "14.0", "node": "10.0", "oculus": "5.0", @@ -4923,6 +4936,7 @@ "electron": "14.0", "firefox": "90", "firefox-android": "90", + "hermes": "0.13", "ios": "15.4", "node": "16.6", "oculus": "17.0", @@ -5620,6 +5634,7 @@ "electron": "1.2", "firefox": "53", "firefox-android": "53", + "hermes": "0.13", "ios": "10.0", "node": "6.5", "oculus": "3.0", @@ -5642,6 +5657,7 @@ "electron": "1.2", "firefox": "53", "firefox-android": "53", + "hermes": "0.13", "ios": "10.0", "node": "6.5", "oculus": "3.0", @@ -5664,6 +5680,7 @@ "electron": "10.0", "firefox": "79", "firefox-android": "79", + "hermes": "0.13", "ios": "14.0", "node": "15.0", "oculus": "12.0", @@ -5706,6 +5723,7 @@ "electron": "14.0", "firefox": "90", "firefox-android": "90", + "hermes": "0.13", "ios": "15.4", "node": "16.6", "oculus": "17.0", @@ -5781,6 +5799,7 @@ "electron": "23.0", "firefox": "115", "firefox-android": "115", + "hermes": "0.13", "ios": "16.0", "node": "20.0", "oculus": "26.0", @@ -5822,6 +5841,7 @@ "electron": "23.0", "firefox": "115", "firefox-android": "115", + "hermes": "0.13", "ios": "16.0", "node": "20.0", "oculus": "26.0", @@ -5844,6 +5864,7 @@ "electron": "23.0", "firefox": "115", "firefox-android": "115", + "hermes": "0.13", "ios": "16.0", "node": "20.0", "oculus": "26.0", @@ -5936,12 +5957,14 @@ "esnext.composite-key": {}, "esnext.composite-symbol": {}, "esnext.data-view.get-float16": { + "bun": "1.1.23", "deno": "1.43", "firefox": "129", "firefox-android": "129" }, "esnext.data-view.get-uint8-clamped": {}, "esnext.data-view.set-float16": { + "bun": "1.1.23", "deno": "1.43", "firefox": "129", "firefox-android": "129" @@ -5983,6 +6006,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6000,6 +6025,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6015,6 +6042,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6030,6 +6059,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6045,6 +6076,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6060,6 +6093,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6075,6 +6110,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6090,6 +6127,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6106,6 +6145,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6122,6 +6163,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6137,6 +6180,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6152,6 +6197,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6167,6 +6214,8 @@ "deno": "1.37", "edge": "122", "electron": "29.0", + "firefox": "131", + "firefox-android": "131", "node": "22.0", "oculus": "32.0", "opera": "108", @@ -6265,6 +6314,7 @@ "esnext.math.degrees": {}, "esnext.math.fscale": {}, "esnext.math.f16round": { + "bun": "1.1.23", "deno": "1.43", "firefox": "129", "firefox-android": "129" @@ -6371,6 +6421,7 @@ }, "esnext.promise.try": { "android": "128", + "bun": "1.1.22", "chrome": "128", "chrome-android": "128", "edge": "128", @@ -6406,7 +6457,9 @@ "esnext.reflect.has-metadata": {}, "esnext.reflect.has-own-metadata": {}, "esnext.reflect.metadata": {}, - "esnext.regexp.escape": {}, + "esnext.regexp.escape": { + "bun": "1.1.22" + }, "esnext.set.add-all": {}, "esnext.set.delete-all": {}, "esnext.set.difference.v2": { @@ -6663,7 +6716,9 @@ "edge": "127", "electron": "32.0", "node": "20.5.0", - "opera": "113" + "opera": "113", + "opera-android": "84", + "opera_mobile": "84" }, "esnext.symbol.custom-matcher": {}, "esnext.symbol.dispose": { @@ -6705,6 +6760,7 @@ "electron": "14.0", "firefox": "90", "firefox-android": "90", + "hermes": "0.13", "ios": "15.4", "node": "16.6", "oculus": "17.0", @@ -6826,12 +6882,24 @@ "safari": "16.4", "samsung": "21.0" }, - "esnext.uint8-array.from-base64": {}, - "esnext.uint8-array.from-hex": {}, - "esnext.uint8-array.set-from-base64": {}, - "esnext.uint8-array.set-from-hex": {}, - "esnext.uint8-array.to-base64": {}, - "esnext.uint8-array.to-hex": {}, + "esnext.uint8-array.from-base64": { + "bun": "1.1.22" + }, + "esnext.uint8-array.from-hex": { + "bun": "1.1.22" + }, + "esnext.uint8-array.set-from-base64": { + "bun": "1.1.22" + }, + "esnext.uint8-array.set-from-hex": { + "bun": "1.1.22" + }, + "esnext.uint8-array.to-base64": { + "bun": "1.1.22" + }, + "esnext.uint8-array.to-hex": { + "bun": "1.1.22" + }, "esnext.weak-map.delete-all": {}, "esnext.weak-map.from": {}, "esnext.weak-map.of": {}, @@ -6851,6 +6919,7 @@ "electron": "0.20", "firefox": "27", "firefox-android": "27", + "hermes": "0.13", "ios": "10.3", "node": "18.0", "oculus": "3.0", diff --git a/crates/swc_ecma_preset_env/src/corejs3/builtin.rs b/crates/swc_ecma_preset_env/src/corejs3/builtin.rs index dedc38978cd7e..c02e8f539dc64 100644 --- a/crates/swc_ecma_preset_env/src/corejs3/builtin.rs +++ b/crates/swc_ecma_preset_env/src/corejs3/builtin.rs @@ -30,12 +30,12 @@ const fn concat2(a: &[&'static str], b: &[&'static str]) -> [&'s res } -fn typed(name: &'static str) -> CoreJSPolyfillDescriptor { - let mut global = Vec::with_capacity(1 + TYPED_ARRAY_DEPENDENCIES.len()); - global.push(name); +fn typed(names: &'static [&'static str]) -> CoreJSPolyfillDescriptor { + let mut global = Vec::with_capacity(names.len() + TYPED_ARRAY_DEPENDENCIES.len()); + global.extend_from_slice(names); global.extend_from_slice(TYPED_ARRAY_DEPENDENCIES); - descriptor(None, global.leak(), Some(name), &[]) + descriptor(None, global.leak(), Some(names[0]), &[]) } static ARRAY_NATURE_ITERATORS: &[&str] = &["es.array.iterator", "web.dom-collections.iterator"]; @@ -54,48 +54,57 @@ static ERROR_DEPENDENCIES: &[&str] = &["es.error.cause", "es.error.to-string"]; static SUPPRESSED_ERROR_DEPENDENCIES: &[&str] = &concat2::<3>(&["esnext.suppressed-error.constructor"], ERROR_DEPENDENCIES); -static TYPED_ARRAY_DEPENDENCIES: &[&str] = &[ - "es.typed-array.at", - "es.typed-array.copy-within", - "es.typed-array.every", - "es.typed-array.fill", - "es.typed-array.filter", - "es.typed-array.find", - "es.typed-array.find-index", - "es.typed-array.find-last", - "es.typed-array.find-last-index", - "es.typed-array.for-each", - "es.typed-array.includes", - "es.typed-array.index-of", - "es.typed-array.iterator", - "es.typed-array.join", - "es.typed-array.last-index-of", - "es.typed-array.map", - "es.typed-array.reduce", - "es.typed-array.reduce-right", - "es.typed-array.reverse", - "es.typed-array.set", - "es.typed-array.slice", - "es.typed-array.some", - "es.typed-array.sort", - "es.typed-array.subarray", - "es.typed-array.to-locale-string", - "es.typed-array.to-reversed", - "es.typed-array.to-sorted", - "es.typed-array.to-string", - "es.typed-array.with", - "es.object.to-string", - "es.array.iterator", +static ARRAY_BUFFER_DEPENDENCIES: &[&str] = &[ + "es.array-buffer.constructor", "es.array-buffer.slice", - "esnext.array-buffer.detached", - "esnext.array-buffer.transfer", - "esnext.array-buffer.transfer-to-fixed-length", - "esnext.typed-array.filter-reject", - "esnext.typed-array.group-by", - "esnext.typed-array.to-spliced", - "esnext.typed-array.unique-by", + "es.data-view", + "es.array-buffer.detached", + "es.array-buffer.transfer", + "es.array-buffer.transfer-to-fixed-length", + "es.object.to-string", ]; +static TYPED_ARRAY_DEPENDENCIES: &[&str] = &concat2::<42>( + &[ + "es.typed-array.at", + "es.typed-array.copy-within", + "es.typed-array.every", + "es.typed-array.fill", + "es.typed-array.filter", + "es.typed-array.find", + "es.typed-array.find-index", + "es.typed-array.find-last", + "es.typed-array.find-last-index", + "es.typed-array.for-each", + "es.typed-array.includes", + "es.typed-array.index-of", + "es.typed-array.iterator", + "es.typed-array.join", + "es.typed-array.last-index-of", + "es.typed-array.map", + "es.typed-array.reduce", + "es.typed-array.reduce-right", + "es.typed-array.reverse", + "es.typed-array.set", + "es.typed-array.slice", + "es.typed-array.some", + "es.typed-array.sort", + "es.typed-array.subarray", + "es.typed-array.to-locale-string", + "es.typed-array.to-reversed", + "es.typed-array.to-sorted", + "es.typed-array.to-string", + "es.typed-array.with", + "es.object.to-string", + "es.array.iterator", + "esnext.typed-array.filter-reject", + "esnext.typed-array.group-by", + "esnext.typed-array.to-spliced", + "esnext.typed-array.unique-by", + ], + ARRAY_BUFFER_DEPENDENCIES, +); + pub static PROMISE_DEPENDENCIES: &[&str] = &["es.promise", "es.object.to-string"]; static PROMISE_DEPENDENCIES_WITH_ITERATORS: &[&str] = @@ -128,29 +137,29 @@ static MAP_DEPENDENCIES: &[&str] = &concat2::<19>( static SET_DEPENDENCIES: &[&str] = &concat2::<28>( &[ "es.set", + "es.set.difference.v2", + "es.set.intersection.v2", + "es.set.is-disjoint-from.v2", + "es.set.is-subset-of.v2", + "es.set.is-superset-of.v2", + "es.set.symmetric-difference.v2", + "es.set.union.v2", "esnext.set.add-all", "esnext.set.delete-all", "esnext.set.difference", - "esnext.set.difference.v2", "esnext.set.every", "esnext.set.filter", "esnext.set.find", "esnext.set.intersection", - "esnext.set.intersection.v2", "esnext.set.is-disjoint-from", - "esnext.set.is-disjoint-from.v2", "esnext.set.is-subset-of", - "esnext.set.is-subset-of.v2", "esnext.set.is-superset-of", - "esnext.set.is-superset-of.v2", "esnext.set.join", "esnext.set.map", "esnext.set.reduce", "esnext.set.some", "esnext.set.symmetric-difference", - "esnext.set.symmetric-difference.v2", "esnext.set.union", - "esnext.set.union.v2", ], COMMON_ITERATORS_WITH_TAG, ); @@ -206,54 +215,70 @@ static ASYNC_ITERATOR_PROBLEM_METHODS: &[&str] = &[ static ITERATOR_DEPENDENCIES: &[&str] = &["esnext.iterator.constructor", "es.object.to-string"]; -static TYPED_ARRAY_STATIC_METHODS: Lazy> = lazy_map!(Map { - from: define(null, ["es.typed-array.from"]), - fromAsync: define( - null, - [ - "esnext.typed-array.from-async", - PROMISE_DEPENDENCIES_WITH_ITERATORS, - ] - ), - of: define(null, ["es.typed-array.of"]), -}); +static DECORATOR_METADATA_DEPENDENCIES: &[&str] = + &["esnext.symbol.metadata", "esnext.function.metadata"]; + +fn typed_array_static_methods( + base: &'static [&'static str], +) -> ObjectMap { + map!(Map { + from: define( + null, + ["es.typed-array.from", base, TYPED_ARRAY_DEPENDENCIES] + ), + fromAsync: define( + null, + [ + "esnext.typed-array.from-async", + base, + PROMISE_DEPENDENCIES_WITH_ITERATORS, + TYPED_ARRAY_DEPENDENCIES, + ] + ), + of: define(null, ["es.typed-array.of", base, TYPED_ARRAY_DEPENDENCIES]), + }) +} -static DATA_VIEW_DEPENDENCIES: &[&str] = &[ - "es.data-view", - "es.array-buffer.slice", - "es.object.to-string", -]; +fn uint8_typed_array_static_methods() -> ObjectMap { + let mut map = typed_array_static_methods(&["es.typed-array.uint8-array"]); + + map.extend(map!(Map { + fromBase64: define( + null, + ["esnext.uint8-array.from-base64", TYPED_ARRAY_DEPENDENCIES,] + ), + fromHex: define( + null, + ["esnext.uint8-array.from-hex", TYPED_ARRAY_DEPENDENCIES,] + ), + })); + map +} + +static DATA_VIEW_DEPENDENCIES: &[&str] = + &concat2::<8>(&["es.data-view"], ARRAY_BUFFER_DEPENDENCIES); pub(crate) static BUILT_INS: Lazy> = lazy_map!(Map{ - AsyncDisposableStack: define("async-disposable-stack", [ + AsyncDisposableStack: define("async-disposable-stack/index", [ "esnext.async-disposable-stack.constructor", "es.object.to-string", "esnext.async-iterator.async-dispose", "esnext.iterator.dispose", PROMISE_DEPENDENCIES, - SuppressedERROR_DEPENDENCIES, + SUPPRESSED_ERROR_DEPENDENCIES, ]), AsyncIterator: define("async-iterator/index", ASYNC_ITERATOR_DEPENDENCIES), AggregateError: define("aggregate-error", [ "es.aggregate-error", ERROR_DEPENDENCIES, - CommonIteratorsWithTag, + COMMON_ITERATORS_WITH_TAG, "es.aggregate-error.cause", ]), - ArrayBuffer: define(null, [ - "es.array-buffer.constructor", - "es.array-buffer.slice", - "es.object.to-string", - ]), - DataView: define(null, [ - "es.data-view", - "es.array-buffer.slice", - "es.object.to-string", - ]), + ArrayBuffer: define(null, ARRAY_BUFFER_DEPENDENCIES), DataView: define(null, DATA_VIEW_DEPENDENCIES), Date: define(null, ["es.date.to-string"]), - DOMException: define("dom-exception", DOM_EXCEPTION_DEPENDENCIES), - DisposableStack: define("disposable-stack", [ + DOMException: define("dom-exception/index", DOM_EXCEPTION_DEPENDENCIES), + DisposableStack: define("disposable-stack/index", [ "esnext.disposable-stack.constructor", "es.object.to-string", "esnext.iterator.dispose", @@ -261,16 +286,22 @@ pub(crate) static BUILT_INS: Lazy> = lazy_ma ]), Error: define(null, ERROR_DEPENDENCIES), EvalError: define(null, ERROR_DEPENDENCIES), - Float32Array: typed("es.typed-array.float32-array"), - Float64Array: typed("es.typed-array.float64-array"), - Int8Array: typed("es.typed-array.int8-array"), - Int16Array: typed("es.typed-array.int16-array"), - Int32Array: typed("es.typed-array.int32-array"), + Float32Array: typed(&["es.typed-array.float32-array"]), + Float64Array: typed(&["es.typed-array.float64-array"]), + Int8Array: typed(&["es.typed-array.int8-array"]), + Int16Array: typed(&["es.typed-array.int16-array"]), + Int32Array: typed(&["es.typed-array.int32-array"]), Iterator: define("iterator/index", ITERATOR_DEPENDENCIES), - Uint8Array: typed("es.typed-array.uint8-array"), - Uint8ClampedArray: typed("es.typed-array.uint8-clamped-array"), - Uint16Array: typed("es.typed-array.uint16-array"), - Uint32Array: typed("es.typed-array.uint32-array"), + Uint8Array: typed(&[ + "es.typed-array.uint8-array", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", + "esnext.uint8-array.to-base64", + "esnext.uint8-array.to-hex", + ]), + Uint8ClampedArray: typed(&["es.typed-array.uint8-clamped-array"]), + Uint16Array: typed(&["es.typed-array.uint16-array"]), + Uint32Array: typed(&["es.typed-array.uint32-array"]), Map: define("map/index", MAP_DEPENDENCIES), Number: define(null, ["es.number.constructor"]), Observable: define("observable/index", [ @@ -296,7 +327,11 @@ pub(crate) static BUILT_INS: Lazy> = lazy_ma SyntaxError: define(null, ERROR_DEPENDENCIES), TypeError: define(null, ERROR_DEPENDENCIES), URIError: define(null, ERROR_DEPENDENCIES), - URL: define("url/index", ["web.url", URL_SEARCH_PARAMS_DEPENDENCIES]), + URL: define("url/index", [ + "web.url", + "web.url.to-json", + URL_SEARCH_PARAMS_DEPENDENCIES, + ]), URLSearchParams: define( "url-search-params/index", URL_SEARCH_PARAMS_DEPENDENCIES @@ -331,7 +366,7 @@ pub(crate) static BUILT_INS: Lazy> = lazy_ma unescape: define("unescape", ["es.unescape"]), }); -pub(crate) static STATIC_PROPERTIES: Lazy> = lazy_map!(Map{ +pub(crate) static STATIC_PROPERTIES: Lazy> = lazy_map!(Map { AsyncIterator: Map { from: define("async-iterator/from", [ "esnext.async-iterator.from", @@ -684,6 +719,7 @@ pub(crate) static STATIC_PROPERTIES: Lazy> URL: Map { canParse: define("url/can-parse", ["web.url.can-parse", "web.url"]), + parse: define("url/parse", ["web.url.parse", "web.url"]), }, WeakMap: Map { @@ -696,15 +732,15 @@ pub(crate) static STATIC_PROPERTIES: Lazy> of: define(null, ["esnext.weak-set.of", WEAK_SET_DEPENDENCIES]), }, - Int8Array: *TYPED_ARRAY_STATIC_METHODS, - Uint8Array: *TYPED_ARRAY_STATIC_METHODS, - Uint8ClampedArray: *TYPED_ARRAY_STATIC_METHODS, - Int16Array: *TYPED_ARRAY_STATIC_METHODS, - Uint16Array: *TYPED_ARRAY_STATIC_METHODS, - Int32Array: *TYPED_ARRAY_STATIC_METHODS, - Uint32Array: *TYPED_ARRAY_STATIC_METHODS, - Float32Array: *TYPED_ARRAY_STATIC_METHODS, - Float64Array: *TYPED_ARRAY_STATIC_METHODS, + Int8Array: typed_array_static_methods(&["es.typed-array.int8-array"]), + Uint8Array: uint8_typed_array_static_methods(), + Uint8ClampedArray: typed_array_static_methods(&["es.typed-array.uint8-clamped-array"]), + Int16Array: typed_array_static_methods(&["es.typed-array.int16-array"]), + Uint16Array: typed_array_static_methods(&["es.typed-array.uint16-array"]), + Int32Array: typed_array_static_methods(&["es.typed-array.int32-array"]), + Uint32Array: typed_array_static_methods(&["es.typed-array.uint32-array"]), + Float32Array: typed_array_static_methods(&["es.typed-array.float32-array"]), + Float64Array: typed_array_static_methods(&["es.typed-array.float64-array"]), WebAssembly: Map { CompileError: define(null, ERROR_DEPENDENCIES), @@ -714,29 +750,23 @@ pub(crate) static STATIC_PROPERTIES: Lazy> }); pub(crate) static INSTANCE_PROPERTIES: Lazy> = lazy_map!(Map { - asIndexedPairs: define( - "instance/asIndexedPairs", - [ - "esnext.async-iterator.as-indexed-pairs", - ASYNC_ITERATOR_DEPENDENCIES, - "esnext.iterator.as-indexed-pairs", - ITERATOR_DEPENDENCIES, - ] - ), - at: define( - "instance/at", - [ - // TODO: We should introduce overloaded instance methods definition - // Before that is implemented, the `esnext.string.at` must be the first - // In pure mode, the provider resolves the descriptor as a "pure" `esnext.string.at` - // and treats the compat-data of `esnext.string.at` as the compat-data of - // pure import `instance/at`. The first polyfill here should have the lowest corejs - // supported versions. - "esnext.string.at", - "es.string.at-alternative", - "es.array.at", - ] - ), + asIndexedPairs: define(null, [ + "esnext.async-iterator.as-indexed-pairs", + ASYNC_ITERATOR_DEPENDENCIES, + "esnext.iterator.as-indexed-pairs", + ITERATOR_DEPENDENCIES, + ]), + at: define("instance/at", [ + // TODO: We should introduce overloaded instance methods definition + // Before that is implemented, the `esnext.string.at` must be the first + // In pure mode, the provider resolves the descriptor as a "pure" `esnext.string.at` + // and treats the compat-data of `esnext.string.at` as the compat-data of + // pure import `instance/at`. The first polyfill here should have the lowest corejs + // supported versions. + "esnext.string.at", + "es.string.at-alternative", + "es.array.at", + ]), anchor: define(null, ["es.string.anchor"]), big: define(null, ["es.string.big"]), bind: define("instance/bind", ["es.function.bind"]), @@ -749,124 +779,100 @@ pub(crate) static INSTANCE_PROPERTIES: Lazy> demethodize: define("instance/demethodize", ["esnext.function.demethodize"]), description: define(null, ["es.symbol", "es.symbol.description"]), dotAll: define(null, ["es.regexp.dot-all"]), - drop: define( - "instance/drop", - [ - "esnext.async-iterator.drop", - ASYNC_ITERATOR_DEPENDENCIES, - "esnext.iterator.drop", - ITERATOR_DEPENDENCIES, - ] - ), - emplace: define( - "instance/emplace", - ["esnext.map.emplace", "esnext.weak-map.emplace",] - ), + drop: define(null, [ + "esnext.async-iterator.drop", + ASYNC_ITERATOR_DEPENDENCIES, + "esnext.iterator.drop", + ITERATOR_DEPENDENCIES, + ]), + emplace: define("instance/emplace", [ + "esnext.map.emplace", + "esnext.weak-map.emplace", + ]), endsWith: define("instance/ends-with", ["es.string.ends-with"]), entries: define("instance/entries", ARRAY_NATURE_ITERATORS_WITH_TAG), - every: define( - "instance/every", - [ - "es.array.every", - "esnext.async-iterator.every", - // TODO: add async iterator dependencies when we support sub-dependencies - // esnext.async-iterator.every depends on es.promise - // but we don't want to pull es.promise when esnext.async-iterator is disabled - // - // ASYNC_ITERATOR_DEPENDENCIES - "esnext.iterator.every", - ITERATOR_DEPENDENCIES, - ] - ), + every: define("instance/every", [ + "es.array.every", + "esnext.async-iterator.every", + // TODO: add async iterator dependencies when we support sub-dependencies + // esnext.async-iterator.every depends on es.promise + // but we don't want to pull es.promise when esnext.async-iterator is disabled + // + // ASYNC_ITERATOR_DEPENDENCIES + "esnext.iterator.every", + ITERATOR_DEPENDENCIES, + ]), exec: define(null, ["es.regexp.exec"]), fill: define("instance/fill", ["es.array.fill"]), - filter: define( - "instance/filter", - [ - "es.array.filter", - "esnext.async-iterator.filter", - "esnext.iterator.filter", - ITERATOR_DEPENDENCIES, - ] - ), + filter: define("instance/filter", [ + "es.array.filter", + "esnext.async-iterator.filter", + "esnext.iterator.filter", + ITERATOR_DEPENDENCIES, + ]), filterReject: define("instance/filterReject", ["esnext.array.filter-reject"]), finally: define(null, ["es.promise.finally", PROMISE_DEPENDENCIES]), - find: define( - "instance/find", - [ - "es.array.find", - "esnext.async-iterator.find", - "esnext.iterator.find", - ITERATOR_DEPENDENCIES, - ] - ), + find: define("instance/find", [ + "es.array.find", + "esnext.async-iterator.find", + "esnext.iterator.find", + ITERATOR_DEPENDENCIES, + ]), findIndex: define("instance/find-index", ["es.array.find-index"]), findLast: define("instance/find-last", ["es.array.find-last"]), - findLastIndex: define("instance/find-last-index", ["es.array.find-last-index",]), + findLastIndex: define("instance/find-last-index", [ + "es.array.find-last-index", + ]), fixed: define(null, ["es.string.fixed"]), flags: define("instance/flags", ["es.regexp.flags"]), - flatMap: define( - "instance/flat-map", - [ - "es.array.flat-map", - "es.array.unscopables.flat-map", - "esnext.async-iterator.flat-map", - "esnext.iterator.flat-map", - ITERATOR_DEPENDENCIES, - ] - ), - flat: define( - "instance/flat", - ["es.array.flat", "es.array.unscopables.flat"] - ), - getFloat16: define( - null, - ["esnext.data-view.get-float16", DATA_VIEW_DEPENDENCIES] - ), - getUint8Clamped: define( - null, - ["esnext.data-view.get-uint8-clamped", DATA_VIEW_DEPENDENCIES] - ), + flatMap: define("instance/flat-map", [ + "es.array.flat-map", + "es.array.unscopables.flat-map", + "esnext.async-iterator.flat-map", + "esnext.iterator.flat-map", + ITERATOR_DEPENDENCIES, + ]), + flat: define("instance/flat", ["es.array.flat", "es.array.unscopables.flat"]), + getFloat16: define(null, [ + "esnext.data-view.get-float16", + DATA_VIEW_DEPENDENCIES, + ]), + getUint8Clamped: define(null, [ + "esnext.data-view.get-uint8-clamped", + DATA_VIEW_DEPENDENCIES, + ]), getYear: define(null, ["es.date.get-year"]), group: define("instance/group", ["esnext.array.group"]), groupBy: define("instance/group-by", ["esnext.array.group-by"]), - groupByToMap: define( - "instance/group-by-to-map", - [ - "esnext.array.group-by-to-map", - "es.map", - "es.object.to-string", - ] - ), - groupToMap: define( - "instance/group-to-map", - ["esnext.array.group-to-map", "es.map", "es.object.to-string",] - ), + groupByToMap: define("instance/group-by-to-map", [ + "esnext.array.group-by-to-map", + "es.map", + "es.object.to-string", + ]), + groupToMap: define("instance/group-to-map", [ + "esnext.array.group-to-map", + "es.map", + "es.object.to-string", + ]), fontcolor: define(null, ["es.string.fontcolor"]), fontsize: define(null, ["es.string.fontsize"]), - forEach: define( - "instance/for-each", - [ - "es.array.for-each", - "esnext.async-iterator.for-each", - "esnext.iterator.for-each", - ITERATOR_DEPENDENCIES, - "web.dom-collections.for-each", - ] - ), - includes: define( - "instance/includes", - ["es.array.includes", "es.string.includes",] - ), - indexed: define( - "instance/indexed", - [ - "esnext.async-iterator.indexed", - ASYNC_ITERATOR_DEPENDENCIES, - "esnext.iterator.indexed", - ITERATOR_DEPENDENCIES, - ] - ), + forEach: define("instance/for-each", [ + "es.array.for-each", + "esnext.async-iterator.for-each", + "esnext.iterator.for-each", + ITERATOR_DEPENDENCIES, + "web.dom-collections.for-each", + ]), + includes: define("instance/includes", [ + "es.array.includes", + "es.string.includes", + ]), + indexed: define(null, [ + "esnext.async-iterator.indexed", + ASYNC_ITERATOR_DEPENDENCIES, + "esnext.iterator.indexed", + ITERATOR_DEPENDENCIES, + ]), indexOf: define("instance/index-of", ["es.array.index-of"]), isWellFormed: define("instance/is-well-formed", ["es.string.is-well-formed"]), italic: define(null, ["es.string.italics"]), @@ -876,65 +882,53 @@ pub(crate) static INSTANCE_PROPERTIES: Lazy> lastIndexOf: define("instance/last-index-of", ["es.array.last-index-of"]), lastItem: define(null, ["esnext.array.last-item"]), link: define(null, ["es.string.link"]), - map: define( - "instance/map", - [ - "es.array.map", - "esnext.async-iterator.map", - "esnext.iterator.map", - ] - ), + map: define("instance/map", [ + "es.array.map", + "esnext.async-iterator.map", + "esnext.iterator.map", + ]), match: define(null, ["es.string.match", "es.regexp.exec"]), - matchAll: define( - "instance/match-all", - ["es.string.match-all", "es.regexp.exec",] - ), + matchAll: define("instance/match-all", [ + "es.string.match-all", + "es.regexp.exec", + ]), name: define(null, ["es.function.name"]), padEnd: define("instance/pad-end", ["es.string.pad-end"]), padStart: define("instance/pad-start", ["es.string.pad-start"]), push: define("instance/push", ["es.array.push"]), - reduce: define( - "instance/reduce", - [ - "es.array.reduce", - "esnext.async-iterator.reduce", - "esnext.iterator.reduce", - ITERATOR_DEPENDENCIES, - ] - ), + reduce: define("instance/reduce", [ + "es.array.reduce", + "esnext.async-iterator.reduce", + "esnext.iterator.reduce", + ITERATOR_DEPENDENCIES, + ]), reduceRight: define("instance/reduce-right", ["es.array.reduce-right"]), repeat: define("instance/repeat", ["es.string.repeat"]), replace: define(null, ["es.string.replace", "es.regexp.exec"]), - replaceAll: define( - "instance/replace-all", - [ - "es.string.replace-all", - "es.string.replace", - "es.regexp.exec", - ] - ), + replaceAll: define("instance/replace-all", [ + "es.string.replace-all", + "es.string.replace", + "es.regexp.exec", + ]), reverse: define("instance/reverse", ["es.array.reverse"]), search: define(null, ["es.string.search", "es.regexp.exec"]), - setFloat16: define( - null, - ["esnext.data-view.set-float16", DATA_VIEW_DEPENDENCIES] - ), - setUint8Clamped: define( - null, - ["esnext.data-view.set-uint8-clamped", DATA_VIEW_DEPENDENCIES] - ), + setFloat16: define(null, [ + "esnext.data-view.set-float16", + DATA_VIEW_DEPENDENCIES, + ]), + setUint8Clamped: define(null, [ + "esnext.data-view.set-uint8-clamped", + DATA_VIEW_DEPENDENCIES, + ]), setYear: define(null, ["es.date.set-year"]), slice: define("instance/slice", ["es.array.slice"]), small: define(null, ["es.string.small"]), - some: define( - "instance/some", - [ - "es.array.some", - "esnext.async-iterator.some", - "esnext.iterator.some", - ITERATOR_DEPENDENCIES, - ] - ), + some: define("instance/some", [ + "es.array.some", + "esnext.async-iterator.some", + "esnext.iterator.some", + ITERATOR_DEPENDENCIES, + ]), sort: define("instance/sort", ["es.array.sort"]), splice: define("instance/splice", ["es.array.splice"]), split: define(null, ["es.string.split", "es.regexp.exec"]), @@ -944,34 +938,25 @@ pub(crate) static INSTANCE_PROPERTIES: Lazy> sub: define(null, ["es.string.sub"]), substr: define(null, ["es.string.substr"]), sup: define(null, ["es.string.sup"]), - take: define( - "instance/take", - [ - "esnext.async-iterator.take", - ASYNC_ITERATOR_DEPENDENCIES, - "esnext.iterator.take", - ITERATOR_DEPENDENCIES, - ] - ), + take: define(null, [ + "esnext.async-iterator.take", + ASYNC_ITERATOR_DEPENDENCIES, + "esnext.iterator.take", + ITERATOR_DEPENDENCIES, + ]), test: define(null, ["es.regexp.test", "es.regexp.exec"]), - toArray: define( - "instance/to-array", - [ - "esnext.async-iterator.to-array", - ASYNC_ITERATOR_DEPENDENCIES, - "esnext.iterator.to-array", - ITERATOR_DEPENDENCIES, - ] - ), - toAsync: define( - null, - [ - "esnext.iterator.to-async", - ITERATOR_DEPENDENCIES, - ASYNC_ITERATOR_DEPENDENCIES, - AsyncIteratorProblemMethods, - ] - ), + toArray: define(null, [ + "esnext.async-iterator.to-array", + ASYNC_ITERATOR_DEPENDENCIES, + "esnext.iterator.to-array", + ITERATOR_DEPENDENCIES, + ]), + toAsync: define(null, [ + "esnext.iterator.to-async", + ITERATOR_DEPENDENCIES, + ASYNC_ITERATOR_DEPENDENCIES, + ASYNC_ITERATOR_PROBLEM_METHODS, + ]), toExponential: define(null, ["es.number.to-exponential"]), toFixed: define(null, ["es.number.to-fixed"]), toGMTString: define(null, ["es.date.to-gmt-string"]), @@ -979,20 +964,17 @@ pub(crate) static INSTANCE_PROPERTIES: Lazy> toJSON: define(null, ["es.date.to-json", "web.url.to-json"]), toPrecision: define(null, ["es.number.to-precision"]), toReversed: define("instance/to-reversed", ["es.array.to-reversed"]), - toSorted: define( - "instance/to-sorted", - ["es.array.to-sorted", "es.array.sort",] - ), + toSorted: define("instance/to-sorted", [ + "es.array.to-sorted", + "es.array.sort", + ]), toSpliced: define("instance/to-spliced", ["es.array.to-spliced"]), - toString: define( - null, - [ - "es.object.to-string", - "es.error.to-string", - "es.date.to-string", - "es.regexp.to-string", - ] - ), + toString: define(null, [ + "es.object.to-string", + "es.error.to-string", + "es.date.to-string", + "es.regexp.to-string", + ]), toWellFormed: define("instance/to-well-formed", ["es.string.to-well-formed"]), trim: define("instance/trim", ["es.string.trim"]), trimEnd: define("instance/trim-end", ["es.string.trim-end"]), diff --git a/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array-edge-13/output.mjs b/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array-edge-13/output.mjs index c1933a7b1559b..8cb3e00b0a94e 100644 --- a/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array-edge-13/output.mjs +++ b/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array-edge-13/output.mjs @@ -1,3 +1,4 @@ +import "core-js/modules/es.array-buffer.constructor.js"; import "core-js/modules/es.array.iterator.js"; import "core-js/modules/es.object.to-string.js"; import "core-js/modules/es.typed-array.fill.js"; diff --git a/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array-static/output.mjs b/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array-static/output.mjs index 473e3ecb800f4..a6be535451391 100644 --- a/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array-static/output.mjs +++ b/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array-static/output.mjs @@ -1,5 +1,7 @@ +import "core-js/modules/es.array-buffer.constructor.js"; import "core-js/modules/es.array-buffer.slice.js"; import "core-js/modules/es.array.iterator.js"; +import "core-js/modules/es.data-view.js"; import "core-js/modules/es.object.to-string.js"; import "core-js/modules/es.typed-array.copy-within.js"; import "core-js/modules/es.typed-array.every.js"; diff --git a/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array/output.mjs b/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array/output.mjs index 67805b2b89891..97b53bfdb383b 100644 --- a/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array/output.mjs +++ b/crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-typed-array/output.mjs @@ -1,5 +1,7 @@ +import "core-js/modules/es.array-buffer.constructor.js"; import "core-js/modules/es.array-buffer.slice.js"; import "core-js/modules/es.array.iterator.js"; +import "core-js/modules/es.data-view.js"; import "core-js/modules/es.object.to-string.js"; import "core-js/modules/es.typed-array.copy-within.js"; import "core-js/modules/es.typed-array.every.js"; diff --git a/package.json b/package.json index e07fee5443f65..5457d2f73bd9d 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "test:html": "cd ./packages/html && yarn test" }, "devDependencies": { - "@babel/compat-data": "^7.25.2", + "@babel/compat-data": "^7.25.4", "@babel/core": "^7.13.16", "@babel/generator": "^7.18.13", "@babel/plugin-proposal-class-properties": "^7.13.0", @@ -46,7 +46,7 @@ "bootstrap": "^5.2.1", "class-validator": "^0.13.1", "core-js": "^2.6.11", - "core-js-compat": "^3.38.0", + "core-js-compat": "^3.38.1", "cross-env": "^7.0.3", "cspell": "^5.12.3", "expect": "^27.4.2", diff --git a/yarn.lock b/yarn.lock index dacc1b37e32b1..cacdebeed9b8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -152,10 +152,10 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.25.2": - version: 7.25.2 - resolution: "@babel/compat-data@npm:7.25.2" - checksum: fd61de9303db3177fc98173571f81f3f551eac5c9f839c05ad02818b11fe77a74daa632abebf7f423fbb4a29976ae9141e0d2bd7517746a0ff3d74cb659ad33a +"@babel/compat-data@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/compat-data@npm:7.25.4" + checksum: d37a8936cc355a9ca3050102e03d179bdae26bd2e5c99a977637376c192b23637a039795f153c849437a086727628c9860e2c6af92d7151396e2362c09176337 languageName: node linkType: hard @@ -4749,7 +4749,7 @@ __metadata: version: 0.0.0-use.local resolution: "@swc/workspace@workspace:." dependencies: - "@babel/compat-data": "npm:^7.25.2" + "@babel/compat-data": "npm:^7.25.4" "@babel/core": "npm:^7.13.16" "@babel/generator": "npm:^7.18.13" "@babel/plugin-proposal-class-properties": "npm:^7.13.0" @@ -4773,7 +4773,7 @@ __metadata: bootstrap: "npm:^5.2.1" class-validator: "npm:^0.13.1" core-js: "npm:^2.6.11" - core-js-compat: "npm:^3.38.0" + core-js-compat: "npm:^3.38.1" cross-env: "npm:^7.0.3" cspell: "npm:^5.12.3" expect: "npm:^27.4.2" @@ -7538,12 +7538,12 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.38.0": - version: 3.38.0 - resolution: "core-js-compat@npm:3.38.0" +"core-js-compat@npm:^3.38.1": + version: 3.38.1 + resolution: "core-js-compat@npm:3.38.1" dependencies: browserslist: "npm:^4.23.3" - checksum: 7ebdca6b305c9c470980e1f7e7a3d759add7cb754bff62926242907ee4d1d4e8bb13f70eb9a7d7769e0f63aec3f4cca83abf60f502286853b45d4b63a01c25ed + checksum: 4e2f219354fd268895f79486461a12df96f24ed307321482fe2a43529c5a64e7c16bcba654980ba217d603444f5141d43a79058aeac77511085f065c5da72207 languageName: node linkType: hard From f625035f8a21eb6d2bc487669a534257f3ef7c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 8 Oct 2024 13:45:11 +0900 Subject: [PATCH 2/9] fix(ci): Fix target triples (#9622) **Related issue:** - Closes /~https://github.com/swc-project/swc/issues/9609 --- packages/core/package.json | 25 +++++++++++++------------ packages/html/package.json | 25 +++++++++++++------------ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index e914b1d441501..d4018f506ba85 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -27,18 +27,19 @@ }, "napi": { "binaryName": "swc", - "targets": [ - "x86_64-apple-darwin", - "x86_64-pc-windows-msvc", - "x86_64-unknown-linux-gnu", - "x86_64-unknown-linux-musl", - "i686-pc-windows-msvc", - "armv7-unknown-linux-gnueabihf", - "aarch64-unknown-linux-gnu", - "aarch64-apple-darwin", - "aarch64-unknown-linux-musl", - "aarch64-pc-windows-msvc" - ] + "triples": { + "additional": [ + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "aarch64-pc-windows-msvc", + "armv7-unknown-linux-gnueabihf", + "armv7-unknown-linux-musleabihf", + "x86_64-unknown-linux-musl", + "i686-pc-windows-msvc", + "riscv64gc-unknown-linux-gnu" + ] + } }, "publishConfig": { "registry": "https://registry.npmjs.org/", diff --git a/packages/html/package.json b/packages/html/package.json index 4ac888594fddd..c814f125e4d0b 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -22,18 +22,19 @@ }, "napi": { "binaryName": "swc-html", - "targets": [ - "x86_64-apple-darwin", - "x86_64-pc-windows-msvc", - "x86_64-unknown-linux-gnu", - "x86_64-unknown-linux-musl", - "i686-pc-windows-msvc", - "armv7-unknown-linux-gnueabihf", - "aarch64-unknown-linux-gnu", - "aarch64-apple-darwin", - "aarch64-unknown-linux-musl", - "aarch64-pc-windows-msvc" - ] + "triples": { + "additional": [ + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "aarch64-pc-windows-msvc", + "armv7-unknown-linux-gnueabihf", + "armv7-unknown-linux-musleabihf", + "x86_64-unknown-linux-musl", + "i686-pc-windows-msvc", + "riscv64gc-unknown-linux-gnu" + ] + } }, "publishConfig": { "registry": "https://registry.npmjs.org/", From bfea3223515e378c3ebe669f4a9012919f4f9547 Mon Sep 17 00:00:00 2001 From: Levi Date: Tue, 8 Oct 2024 17:58:58 +1300 Subject: [PATCH 3/9] feat(es/testing): Parse test code as a `Program` instead of a `Module` (#9623) **Description:** This PR addresses the issue described in /~https://github.com/swc-project/swc/issues/8713 **BREAKING CHANGE:** Will break unit tests that use `fold_module`/`visit_module`/`visit_mut_module` if the visitor is intended to work for both modules and scripts instead of using `fold_program`/`visit_program`/`visit_mut_program`. When creating visitors, you should use `fold_program`/`visit_program`/`visit_mut_program` if you simply want to visit the top-level node. When creating tests, the input source code will be parsed using `parse_program` by default. If you need to parse it as a `Module`, you can use `module: Some(true)` in `FixtureTestConfig` (or with `test!(module, ..)`), which will parse it as a `Program::Module`, or `Some(false)` for `Program::Script`. `None` will use `parse_program` (`parse_program` will auto-detect the underlying type). --- .changeset/nine-trees-beam.md | 6 + .../swc_ecma_transforms/tests/decorators.rs | 15 ++ .../swc_ecma_transforms_module/tests/amd.rs | 8 +- .../tests/common_js.rs | 2 + .../tests/path_node.rs | 12 +- .../tests/system_js.rs | 13 +- .../swc_ecma_transforms_module/tests/umd.rs | 7 +- .../src/inline_globals.rs | 16 +- .../src/simplify/branch/tests.rs | 2 +- .../src/simplify/expr/tests.rs | 2 +- .../src/simplify/inlining/mod.rs | 6 +- .../tests/simplify.rs | 2 +- .../tests/simplify_inlining.rs | 2 +- .../tests/decorator-tests | 2 +- .../tests/decorators.rs | 1 + .../src/jsx/tests.rs | 56 ++++++ .../src/jsx_self/tests.rs | 1 + .../src/jsx_src/tests.rs | 1 + .../src/refresh/tests.rs | 35 ++++ crates/swc_ecma_transforms_testing/src/lib.rs | 161 +++++++++++------- .../tests/visited.rs | 2 +- 21 files changed, 267 insertions(+), 85 deletions(-) create mode 100644 .changeset/nine-trees-beam.md diff --git a/.changeset/nine-trees-beam.md b/.changeset/nine-trees-beam.md new file mode 100644 index 0000000000000..0edf6ec8d6137 --- /dev/null +++ b/.changeset/nine-trees-beam.md @@ -0,0 +1,6 @@ +--- +swc_ecma_transforms_testing: breaking +swc_ecma_transforms_optimization: patch +--- + +feat(es/testing): Parse test code as a `Program` instead of a `Module` diff --git a/crates/swc_ecma_transforms/tests/decorators.rs b/crates/swc_ecma_transforms/tests/decorators.rs index de0063687985f..03d0082d40cc0 100644 --- a/crates/swc_ecma_transforms/tests/decorators.rs +++ b/crates/swc_ecma_transforms/tests/decorators.rs @@ -91,6 +91,7 @@ fn transformation(t: &Tester) -> impl Fold { // transformation_declaration test!( + module, syntax(false), |t| transformation(t), transformation_declaration, @@ -101,6 +102,7 @@ class A {} ); // transformation_initialize_after_super_multiple test!( + module, syntax(false), |t| transformation(t), transformation_initialize_after_super_multiple, @@ -134,6 +136,7 @@ export default @dec() class {} ); // transformation_initialize_after_super_statement test!( + module, syntax(false), |t| transformation(t), transformation_initialize_after_super_statement, @@ -211,6 +214,7 @@ expect(A).toBe(C); ); // misc_method_name_not_shadow test!( + module, syntax(false), |t| tr(t), misc_method_name_not_shadow, @@ -320,6 +324,7 @@ expect(() => { ); // duplicated_keys_computed_keys_same_value test!( + module, syntax(false), |t| tr(t), duplicated_keys_computed_keys_same_value, @@ -395,6 +400,7 @@ expect(log).toEqual(numsFrom0to9); ); // transformation_initializer_after_super_bug_8808 test!( + module, syntax(false), |t| transformation(t), transformation_initiailzer_after_super_bug_8808, @@ -434,6 +440,7 @@ expect(A.prototype.method()).toBe(2); ); // transformation_arguments test!( + module, syntax(false), |t| transformation(t), transformation_arguments, @@ -532,6 +539,7 @@ expect(calls).toBe(1); // ordering // transformation_initialize_after_super_expression test!( + module, syntax(false), |t| transformation(t), transformation_initialize_after_super_expression, @@ -903,6 +911,7 @@ expect(Object.getOwnPropertyDescriptor(A.prototype, "foo")).toEqual({ ); // transformation_extends test!( + module, syntax(false), |t| transformation(t), transformation_extends, @@ -914,6 +923,7 @@ test!( // finishers // transformation_extends_await test!( + module, syntax(false), |t| transformation(t), transformation_extends_await, @@ -926,6 +936,7 @@ async function g() { ); // transformation_extends_yield test!( + module, syntax(false), |t| transformation(t), transformation_extends_yield, @@ -1092,6 +1103,7 @@ expect(i).toBe(2); ); // transformation_initialize_after_super_bug_8931 test!( + module, syntax(false), |t| transformation(t), transformation_initialize_after_super_bug_8931, @@ -1318,6 +1330,7 @@ expect(Foo.prototype.bar).toBe(value2); ); // transformation_expression test!( + module, syntax(false), |t| transformation(t), transformation_expression, @@ -1354,6 +1367,7 @@ expect(A.method()).toBe(2); // element_descriptors // duplicated_keys_computed_keys_same_ast test!( + module, syntax(false), |t| tr(t), duplicated_keys_computed_keys_same_ast, @@ -3882,6 +3896,7 @@ eval: function () { ); test!( + module, ts(), |_| decorators(Default::default()), issue_846_1, diff --git a/crates/swc_ecma_transforms_module/tests/amd.rs b/crates/swc_ecma_transforms_module/tests/amd.rs index 674a16c1307e8..1fd4b111813fa 100644 --- a/crates/swc_ecma_transforms_module/tests/amd.rs +++ b/crates/swc_ecma_transforms_module/tests/amd.rs @@ -5,7 +5,7 @@ use swc_ecma_parser::{Syntax, TsSyntax}; use swc_ecma_transforms_base::{feature::FeatureFlag, resolver}; use swc_ecma_transforms_compat::es2015::for_of; use swc_ecma_transforms_module::amd::{self, amd}; -use swc_ecma_transforms_testing::{test, test_fixture}; +use swc_ecma_transforms_testing::{test, test_fixture, FixtureTestConfig}; use swc_ecma_transforms_typescript::typescript; use swc_ecma_visit::Fold; @@ -65,11 +65,15 @@ fn esm_to_amd(input: PathBuf) { &|t| tr(config.clone(), is_ts, t.comments.clone()), &input, &output, - Default::default(), + FixtureTestConfig { + module: Some(true), + ..Default::default() + }, ); } test!( + module, syntax(), |t| chain!( for_of(for_of::Config { diff --git a/crates/swc_ecma_transforms_module/tests/common_js.rs b/crates/swc_ecma_transforms_module/tests/common_js.rs index 6857f9fe44dc4..65e7abe90439e 100644 --- a/crates/swc_ecma_transforms_module/tests/common_js.rs +++ b/crates/swc_ecma_transforms_module/tests/common_js.rs @@ -59,12 +59,14 @@ fn esm_to_cjs(input: PathBuf) { &output, FixtureTestConfig { sourcemap: false, + module: Some(true), ..Default::default() }, ); } test!( + module, syntax(), |_| chain!( for_of(for_of::Config { diff --git a/crates/swc_ecma_transforms_module/tests/path_node.rs b/crates/swc_ecma_transforms_module/tests/path_node.rs index 435e648e4ce32..a80a1d43a1495 100644 --- a/crates/swc_ecma_transforms_module/tests/path_node.rs +++ b/crates/swc_ecma_transforms_module/tests/path_node.rs @@ -12,7 +12,7 @@ use swc_ecma_transforms_module::{ path::{ImportResolver, NodeImportResolver}, rewriter::import_rewriter, }; -use swc_ecma_transforms_testing::test_fixture; +use swc_ecma_transforms_testing::{test_fixture, FixtureTestConfig}; use testing::run_test2; type TestProvider = NodeImportResolver; @@ -81,7 +81,10 @@ fn issue_4730() { }, &input_dir.join("src").join("index.js"), &output_dir.join("index.js"), - Default::default(), + FixtureTestConfig { + module: Some(true), + ..Default::default() + }, ); } @@ -147,6 +150,9 @@ fn fixture(input_dir: PathBuf) { }, &index_path, &output_dir.join("index.ts"), - Default::default(), + FixtureTestConfig { + module: Some(true), + ..Default::default() + }, ); } diff --git a/crates/swc_ecma_transforms_module/tests/system_js.rs b/crates/swc_ecma_transforms_module/tests/system_js.rs index d07e2c4425dcc..98706027c11f9 100644 --- a/crates/swc_ecma_transforms_module/tests/system_js.rs +++ b/crates/swc_ecma_transforms_module/tests/system_js.rs @@ -6,7 +6,7 @@ use swc_common::{chain, Mark}; use swc_ecma_parser::Syntax; use swc_ecma_transforms_base::resolver; use swc_ecma_transforms_module::system_js::{system_js, Config}; -use swc_ecma_transforms_testing::{test, test_fixture, Tester}; +use swc_ecma_transforms_testing::{test, test_fixture, FixtureTestConfig, Tester}; use swc_ecma_visit::Fold; fn syntax() -> Syntax { @@ -23,6 +23,7 @@ fn tr(_tester: &mut Tester<'_>, config: Config) -> impl Fold { } test!( + module, syntax(), |tester| tr(tester, Default::default()), allow_continuous_assignment, @@ -30,6 +31,7 @@ test!( ); test!( + module, syntax(), |tester| tr( tester, @@ -43,6 +45,7 @@ test!( ); test!( + module, syntax(), |tester| tr( tester, @@ -60,6 +63,7 @@ test!( ); test!( + module, syntax(), |tester| tr( tester, @@ -82,6 +86,7 @@ test!( ); test!( + module, syntax(), |tester| tr( tester, @@ -99,6 +104,7 @@ test!( ); test!( + module, syntax(), |tester| tr(tester, Default::default()), imports, @@ -122,6 +128,9 @@ fn fixture(input: PathBuf) { &|tester| tr(tester, Default::default()), &input, &output, - Default::default(), + FixtureTestConfig { + module: Some(true), + ..Default::default() + }, ); } diff --git a/crates/swc_ecma_transforms_module/tests/umd.rs b/crates/swc_ecma_transforms_module/tests/umd.rs index 0512aa30635f1..6d1cbaec32276 100644 --- a/crates/swc_ecma_transforms_module/tests/umd.rs +++ b/crates/swc_ecma_transforms_module/tests/umd.rs @@ -4,7 +4,7 @@ use swc_common::{chain, Mark}; use swc_ecma_parser::{Syntax, TsSyntax}; use swc_ecma_transforms_base::{feature::FeatureFlag, resolver}; use swc_ecma_transforms_module::umd::{umd, Config}; -use swc_ecma_transforms_testing::{test_fixture, Tester}; +use swc_ecma_transforms_testing::{test_fixture, FixtureTestConfig, Tester}; use swc_ecma_transforms_typescript::typescript; use swc_ecma_visit::Fold; @@ -63,6 +63,9 @@ fn esm_to_umd(input: PathBuf) { &|tester| tr(tester, config.clone(), is_ts), &input, &output, - Default::default(), + FixtureTestConfig { + module: Some(true), + ..Default::default() + }, ); } diff --git a/crates/swc_ecma_transforms_optimization/src/inline_globals.rs b/crates/swc_ecma_transforms_optimization/src/inline_globals.rs index 8ddd29273162a..6d5e0a407caec 100644 --- a/crates/swc_ecma_transforms_optimization/src/inline_globals.rs +++ b/crates/swc_ecma_transforms_optimization/src/inline_globals.rs @@ -202,7 +202,7 @@ impl VisitMut for InlineGlobals { #[cfg(test)] mod tests { use swc_ecma_transforms_testing::{test, Tester}; - use swc_ecma_utils::DropSpan; + use swc_ecma_utils::{DropSpan, StmtOrModuleItem}; use super::*; @@ -220,17 +220,23 @@ mod tests { (*v).into() }; - let mut v = tester + let v = tester .apply_transform( as_folder(DropSpan), "global.js", ::swc_ecma_parser::Syntax::default(), + None, &v, ) .unwrap(); - assert_eq!(v.body.len(), 1); - let v = match v.body.pop().unwrap() { - ModuleItem::Stmt(Stmt::Expr(ExprStmt { expr, .. })) => *expr, + + let v = match v { + Program::Module(mut m) => m.body.pop().and_then(|x| x.into_stmt().ok()), + Program::Script(mut s) => s.body.pop(), + }; + assert!(v.is_some()); + let v = match v.unwrap() { + Stmt::Expr(ExprStmt { expr, .. }) => *expr, _ => unreachable!(), }; diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/branch/tests.rs b/crates/swc_ecma_transforms_optimization/src/simplify/branch/tests.rs index c05585ed7c007..3844b6cbf4099 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/branch/tests.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/branch/tests.rs @@ -9,6 +9,7 @@ macro_rules! test_stmt { ($l:expr, $r:expr) => { swc_ecma_transforms_testing::test_transform( ::swc_ecma_parser::Syntax::default(), + None, |_| { let unresolved_mark = Mark::new(); let top_level_mark = Mark::new(); @@ -30,7 +31,6 @@ macro_rules! test_stmt { }, $l, $r, - true, ) }; } diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs b/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs index dc2bae6803241..89ace2edacedc 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/expr/tests.rs @@ -9,6 +9,7 @@ use super::SimplifyExpr; fn fold(src: &str, expected: &str) { test_transform( ::swc_ecma_parser::Syntax::default(), + None, |_| { let unresolved_mark = Mark::new(); let top_level_mark = Mark::new(); @@ -32,7 +33,6 @@ fn fold(src: &str, expected: &str) { }, src, expected, - true, ) } diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/inlining/mod.rs b/crates/swc_ecma_transforms_optimization/src/simplify/inlining/mod.rs index 90341b5f7e433..2157c7ae14d60 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/inlining/mod.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/inlining/mod.rs @@ -468,19 +468,19 @@ impl VisitMut for Inlining<'_> { self.visit_with_child(ScopeKind::Cond, &mut stmt.alt); } - fn visit_mut_module_items(&mut self, items: &mut Vec) { + fn visit_mut_program(&mut self, program: &mut Program) { let _tracing = span!(Level::ERROR, "inlining", pass = self.pass).entered(); let old_phase = self.phase; self.phase = Phase::Analysis; - items.visit_mut_children_with(self); + program.visit_mut_children_with(self); tracing::trace!("Switching to Inlining phase"); // Inline self.phase = Phase::Inlining; - items.visit_mut_children_with(self); + program.visit_mut_children_with(self); self.phase = old_phase; } diff --git a/crates/swc_ecma_transforms_optimization/tests/simplify.rs b/crates/swc_ecma_transforms_optimization/tests/simplify.rs index 2c694b01f109e..3a8ee1291d3c2 100644 --- a/crates/swc_ecma_transforms_optimization/tests/simplify.rs +++ b/crates/swc_ecma_transforms_optimization/tests/simplify.rs @@ -19,6 +19,7 @@ use swc_ecma_transforms_typescript::strip; fn test(src: &str, expected: &str) { test_transform( ::swc_ecma_parser::Syntax::default(), + None, |_| { let unresolved_mark = Mark::new(); let top_level_mark = Mark::new(); @@ -35,7 +36,6 @@ fn test(src: &str, expected: &str) { }, src, expected, - true, ) } diff --git a/crates/swc_ecma_transforms_optimization/tests/simplify_inlining.rs b/crates/swc_ecma_transforms_optimization/tests/simplify_inlining.rs index ad1f9e59ec532..14359428850cf 100644 --- a/crates/swc_ecma_transforms_optimization/tests/simplify_inlining.rs +++ b/crates/swc_ecma_transforms_optimization/tests/simplify_inlining.rs @@ -57,6 +57,7 @@ macro_rules! identical { fn test(src: &str, expected: &str) { swc_ecma_transforms_testing::test_transform( ::swc_ecma_parser::Syntax::default(), + None, |_| { let unresolved_mark = Mark::new(); let top_level_mark = Mark::new(); @@ -68,7 +69,6 @@ fn test(src: &str, expected: &str) { }, src, expected, - true, ) } diff --git a/crates/swc_ecma_transforms_proposal/tests/decorator-tests b/crates/swc_ecma_transforms_proposal/tests/decorator-tests index 8e9c0b0fb3d54..a03c69227413d 160000 --- a/crates/swc_ecma_transforms_proposal/tests/decorator-tests +++ b/crates/swc_ecma_transforms_proposal/tests/decorator-tests @@ -1 +1 @@ -Subproject commit 8e9c0b0fb3d548f378420aabbd351087efb5d5e5 +Subproject commit a03c69227413dfcac8a1e9f89d93554fa3b8b7fe diff --git a/crates/swc_ecma_transforms_proposal/tests/decorators.rs b/crates/swc_ecma_transforms_proposal/tests/decorators.rs index fe10f8bbf0b6b..82fd7340f8de3 100644 --- a/crates/swc_ecma_transforms_proposal/tests/decorators.rs +++ b/crates/swc_ecma_transforms_proposal/tests/decorators.rs @@ -76,6 +76,7 @@ fn fixture_inner(input: PathBuf) { &output, FixtureTestConfig { allow_error: true, + module: Some(true), ..Default::default() }, ); diff --git a/crates/swc_ecma_transforms_react/src/jsx/tests.rs b/crates/swc_ecma_transforms_react/src/jsx/tests.rs index c7461a3eba454..66541a384d348 100644 --- a/crates/swc_ecma_transforms_react/src/jsx/tests.rs +++ b/crates/swc_ecma_transforms_react/src/jsx/tests.rs @@ -108,6 +108,7 @@ fn integration_tr(t: &mut Tester, mut options: FixtureOptions) -> impl Fold { ) } test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -122,6 +123,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -140,6 +142,7 @@ var bar = function () { ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -164,6 +167,7 @@ var x = ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -179,6 +183,7 @@ Component = React.createClass({ ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -195,6 +200,7 @@ export default React.createClass({ ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -219,6 +225,7 @@ var Bar = React.createClass({ ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -236,6 +243,7 @@ exports = { ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -252,6 +260,7 @@ exports.Component = React.createClass({ ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -268,6 +277,7 @@ var Component = React.createClass({ ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -283,6 +293,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -300,6 +311,7 @@ var profile =
); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -319,6 +331,7 @@ var profile =
); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -343,6 +356,7 @@ var profile =
); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -353,6 +367,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -393,6 +408,7 @@ class App extends React.Component { ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -406,6 +422,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -416,6 +433,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -426,6 +444,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -436,6 +455,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -446,6 +466,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -469,6 +490,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -483,6 +505,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -498,6 +521,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -524,6 +548,7 @@ var x = ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -534,6 +559,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -544,6 +570,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -558,6 +585,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -579,6 +607,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -591,6 +620,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -615,6 +645,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -637,6 +668,7 @@ React.render( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -690,6 +724,7 @@ var x = ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -700,6 +735,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -710,6 +746,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -720,6 +757,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -730,6 +768,7 @@ test!( ); test!( + module, // Comments are currently stripped out ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, @@ -752,6 +791,7 @@ var x = ( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -762,6 +802,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -780,6 +821,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -790,6 +832,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -803,6 +846,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -813,6 +857,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -823,6 +868,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -833,6 +879,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -843,6 +890,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -853,6 +901,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -864,6 +913,7 @@ const b =
test
" ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -879,6 +929,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -890,6 +941,7 @@ test!( // /~https://github.com/swc-project/swc/issues/517 test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -912,6 +964,7 @@ fn jsx_text() { // /~https://github.com/swc-project/swc/issues/542 test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -966,6 +1019,7 @@ return ( ); test!( + module, Syntax::Es(EsSyntax { jsx: true, ..Default::default() @@ -1011,6 +1065,7 @@ fn fixture(input: PathBuf) { &output, FixtureTestConfig { allow_error: true, + module: Some(true), ..Default::default() }, ); @@ -1036,6 +1091,7 @@ fn integration(input: PathBuf) { &output, FixtureTestConfig { allow_error: true, + module: Some(true), ..Default::default() }, ); diff --git a/crates/swc_ecma_transforms_react/src/jsx_self/tests.rs b/crates/swc_ecma_transforms_react/src/jsx_self/tests.rs index ad6b332311af6..1315aecf2a64a 100644 --- a/crates/swc_ecma_transforms_react/src/jsx_self/tests.rs +++ b/crates/swc_ecma_transforms_react/src/jsx_self/tests.rs @@ -7,6 +7,7 @@ fn tr() -> impl Fold { } test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() diff --git a/crates/swc_ecma_transforms_react/src/jsx_src/tests.rs b/crates/swc_ecma_transforms_react/src/jsx_src/tests.rs index f20fa8cb082e5..9523617842f05 100644 --- a/crates/swc_ecma_transforms_react/src/jsx_src/tests.rs +++ b/crates/swc_ecma_transforms_react/src/jsx_src/tests.rs @@ -35,6 +35,7 @@ expect(actual).toBe(expected); ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() diff --git a/crates/swc_ecma_transforms_react/src/refresh/tests.rs b/crates/swc_ecma_transforms_react/src/refresh/tests.rs index f8012a87d33e4..8d5c63c1d332a 100644 --- a/crates/swc_ecma_transforms_react/src/refresh/tests.rs +++ b/crates/swc_ecma_transforms_react/src/refresh/tests.rs @@ -25,6 +25,7 @@ fn tr(t: &mut Tester) -> impl Fold { } test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -43,6 +44,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -68,6 +70,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -89,6 +92,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -105,6 +109,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -119,6 +124,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -140,6 +146,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -160,6 +167,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -186,6 +194,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -209,6 +218,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -219,6 +229,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -239,6 +250,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -253,6 +265,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -267,6 +280,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -283,6 +297,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -301,6 +316,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -336,6 +352,7 @@ test!( // A doesn't get registered because it's not declared locally. // Alias doesn't get registered because its definition is just an identifier. test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -393,6 +410,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -410,6 +428,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -426,6 +445,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -451,6 +471,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -480,6 +501,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -496,6 +518,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -513,6 +536,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -536,6 +560,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Typescript(::swc_ecma_parser::TsSyntax { tsx: true, ..Default::default() @@ -578,6 +603,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -602,6 +628,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Typescript(::swc_ecma_parser::TsSyntax { tsx: true, ..Default::default() @@ -629,6 +656,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -652,6 +680,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -668,6 +697,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -701,6 +731,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Typescript(::swc_ecma_parser::TsSyntax { tsx: true, ..Default::default() @@ -717,6 +748,7 @@ test!( ); test!( + module, Default::default(), tr, next_001, @@ -728,6 +760,7 @@ test!( ); test!( + module, Default::default(), tr, issue_2261, @@ -741,6 +774,7 @@ test!( ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() @@ -759,6 +793,7 @@ const a = (a) => { ); test!( + module, ::swc_ecma_parser::Syntax::Es(::swc_ecma_parser::EsSyntax { jsx: true, ..Default::default() diff --git a/crates/swc_ecma_transforms_testing/src/lib.rs b/crates/swc_ecma_transforms_testing/src/lib.rs index 9bda5e768e12f..251d4943af271 100644 --- a/crates/swc_ecma_transforms_testing/src/lib.rs +++ b/crates/swc_ecma_transforms_testing/src/lib.rs @@ -167,37 +167,26 @@ impl<'a> Tester<'a> { mut tr: T, name: &str, syntax: Syntax, + is_module: Option, src: &str, - ) -> Result { - let fm = self - .cm - .new_source_file(FileName::Real(name.into()).into(), src.into()); - - let module = { - let mut p = Parser::new_from(Lexer::new( + ) -> Result { + let program = + self.with_parser( + name, syntax, - EsVersion::latest(), - StringInput::from(&*fm), - Some(&self.comments), - )); - let res = p - .parse_module() - .map_err(|e| e.into_diagnostic(self.handler).emit()); - - for e in p.take_errors() { - e.into_diagnostic(self.handler).emit() - } - - res? - }; - - let module = Program::Module(module).fold_with(&mut tr); - - Ok(module.expect_module()) + src, + |parser: &mut Parser| match is_module { + Some(true) => parser.parse_module().map(Program::Module), + Some(false) => parser.parse_script().map(Program::Script), + None => parser.parse_program(), + }, + )?; + + Ok(program.fold_with(&mut tr)) } - pub fn print(&mut self, module: &Module, comments: &Rc) -> String { - to_code_default(self.cm.clone(), Some(comments), module) + pub fn print(&mut self, program: &Program, comments: &Rc) -> String { + to_code_default(self.cm.clone(), Some(comments), program) } } @@ -259,10 +248,10 @@ where #[track_caller] pub fn test_transform( syntax: Syntax, + is_module: Option, tr: F, input: &str, expected: &str, - _always_ok_if_code_eq: bool, ) where F: FnOnce(&mut Tester) -> P, P: Fold, @@ -272,6 +261,7 @@ pub fn test_transform( as_folder(::swc_ecma_utils::DropSpan), "output.js", syntax, + is_module, expected, )?; @@ -280,7 +270,7 @@ pub fn test_transform( println!("----- Actual -----"); let tr = make_tr(tr, tester); - let actual = tester.apply_transform(tr, "input.js", syntax, input)?; + let actual = tester.apply_transform(tr, "input.js", syntax, is_module, input)?; match ::std::env::var("PRINT_HYGIENE") { Ok(ref s) if s == "1" => { @@ -340,8 +330,13 @@ pub fn test_transform( /// NOT A PUBLIC API. DO NOT USE. #[doc(hidden)] #[track_caller] -pub fn test_inline_input_output(syntax: Syntax, tr: F, input: &str, output: &str) -where +pub fn test_inline_input_output( + syntax: Syntax, + is_module: Option, + tr: F, + input: &str, + output: &str, +) where F: FnOnce(&mut Tester) -> P, P: Fold, { @@ -350,9 +345,10 @@ where let expected = output; let expected_src = Tester::run(|tester| { - let expected_module = tester.apply_transform(noop(), "expected.js", syntax, expected)?; + let expected_program = + tester.apply_transform(noop(), "expected.js", syntax, is_module, expected)?; - let expected_src = tester.print(&expected_module, &Default::default()); + let expected_src = tester.print(&expected_program, &Default::default()); println!( "----- {} -----\n{}", @@ -370,7 +366,7 @@ where println!("----- {} -----", Color::Green.paint("Actual")); - let actual = tester.apply_transform(tr, "input.js", syntax, input)?; + let actual = tester.apply_transform(tr, "input.js", syntax, is_module, input)?; match ::std::env::var("PRINT_HYGIENE") { Ok(ref s) if s == "1" => { @@ -407,8 +403,13 @@ where /// NOT A PUBLIC API. DO NOT USE. #[doc(hidden)] #[track_caller] -pub fn test_inlined_transform(test_name: &str, syntax: Syntax, tr: F, input: &str) -where +pub fn test_inlined_transform( + test_name: &str, + syntax: Syntax, + module: Option, + tr: F, + input: &str, +) where F: FnOnce(&mut Tester) -> P, P: Fold, { @@ -429,7 +430,10 @@ where Box::new(move |tester| Box::new(tr(tester))), input, &snapshot_dir.join(format!("{test_name}.js")), - Default::default(), + FixtureTestConfig { + module, + ..Default::default() + }, ) } @@ -448,14 +452,14 @@ macro_rules! test_inline { #[test] #[ignore] fn $test_name() { - $crate::test_inline_input_output($syntax, $tr, $input, $output) + $crate::test_inline_input_output($syntax, None, $tr, $input, $output) } }; ($syntax:expr, $tr:expr, $test_name:ident, $input:expr, $output:expr) => { #[test] fn $test_name() { - $crate::test_inline_input_output($syntax, $tr, $input, $output) + $crate::test_inline_input_output($syntax, None, $tr, $input, $output) } }; } @@ -480,7 +484,7 @@ test_inline!( #[test] #[should_panic] fn test_inline_should_fail() { - test_inline_input_output(Default::default(), |_| noop(), "class Foo {}", ""); + test_inline_input_output(Default::default(), None, |_| noop(), "class Foo {}", ""); } #[macro_export] @@ -489,21 +493,41 @@ macro_rules! test { #[test] #[ignore] fn $test_name() { - $crate::test_inlined_transform(stringify!($test_name), $syntax, $tr, $input) + $crate::test_inlined_transform(stringify!($test_name), $syntax, None, $tr, $input) } }; ($syntax:expr, $tr:expr, $test_name:ident, $input:expr) => { #[test] fn $test_name() { - $crate::test_inlined_transform(stringify!($test_name), $syntax, $tr, $input) + $crate::test_inlined_transform(stringify!($test_name), $syntax, None, $tr, $input) + } + }; + + (module, $syntax:expr, $tr:expr, $test_name:ident, $input:expr) => { + #[test] + fn $test_name() { + $crate::test_inlined_transform(stringify!($test_name), $syntax, Some(true), $tr, $input) + } + }; + + (script, $syntax:expr, $tr:expr, $test_name:ident, $input:expr) => { + #[test] + fn $test_name() { + $crate::test_inlined_script_transform( + stringify!($test_name), + $syntax, + Some(false), + $tr, + $input, + ) } }; ($syntax:expr, $tr:expr, $test_name:ident, $input:expr, ok_if_code_eq) => { #[test] fn $test_name() { - $crate::test_inlined_transform(stringify!($test_name), $syntax, $tr, $input) + $crate::test_inlined_transform(stringify!($test_name), $syntax, None, $tr, $input) } }; } @@ -518,12 +542,12 @@ where Tester::run(|tester| { let tr = make_tr(tr, tester); - let module = tester.apply_transform(tr, "input.js", syntax, input)?; + let program = tester.apply_transform(tr, "input.js", syntax, Some(true), input)?; match ::std::env::var("PRINT_HYGIENE") { Ok(ref s) if s == "1" => { let hygiene_src = tester.print( - &module.clone().fold_with(&mut HygieneVisualizer), + &program.clone().fold_with(&mut HygieneVisualizer), &tester.comments.clone(), ); println!("----- Hygiene -----\n{}", hygiene_src); @@ -531,14 +555,14 @@ where _ => {} } - let mut module = module + let mut program = program .fold_with(&mut hygiene::hygiene()) .fold_with(&mut fixer::fixer(Some(&tester.comments))); - let src_without_helpers = tester.print(&module, &tester.comments.clone()); - module = module.fold_with(&mut inject_helpers(Mark::fresh(Mark::root()))); + let src_without_helpers = tester.print(&program, &tester.comments.clone()); + program = program.fold_with(&mut inject_helpers(Mark::fresh(Mark::root()))); - let transformed_src = tester.print(&module, &tester.comments.clone()); + let transformed_src = tester.print(&program, &tester.comments.clone()); println!( "\t>>>>> Orig <<<<<\n{}\n\t>>>>> Code <<<<<\n{}", @@ -566,10 +590,11 @@ where Tester::run(|tester| { let tr = make_tr(tr, tester); - let module = tester.apply_transform( + let program = tester.apply_transform( tr, "input.js", syntax, + Some(true), &format!( "it('should work', async function () {{ {} @@ -580,7 +605,7 @@ where match ::std::env::var("PRINT_HYGIENE") { Ok(ref s) if s == "1" => { let hygiene_src = tester.print( - &module.clone().fold_with(&mut HygieneVisualizer), + &program.clone().fold_with(&mut HygieneVisualizer), &tester.comments.clone(), ); println!("----- Hygiene -----\n{}", hygiene_src); @@ -588,14 +613,14 @@ where _ => {} } - let mut module = module + let mut program = program .fold_with(&mut hygiene::hygiene()) .fold_with(&mut fixer::fixer(Some(&tester.comments))); - let src_without_helpers = tester.print(&module, &tester.comments.clone()); - module = module.fold_with(&mut inject_helpers(Mark::fresh(Mark::root()))); + let src_without_helpers = tester.print(&program, &tester.comments.clone()); + program = program.fold_with(&mut inject_helpers(Mark::fresh(Mark::root()))); - let src = tester.print(&module, &tester.comments.clone()); + let src = tester.print(&program, &tester.comments.clone()); println!( "\t>>>>> {} <<<<<\n{}\n\t>>>>> {} <<<<<\n{}", @@ -693,6 +718,12 @@ fn stdout_of(code: &str) -> Result { /// Test transformation. #[macro_export] macro_rules! test_exec { + (@check) => { + if ::std::env::var("EXEC").unwrap_or(String::from("")) == "0" { + return; + } + }; + (ignore, $syntax:expr, $tr:expr, $test_name:ident, $input:expr) => { #[test] #[ignore] @@ -704,10 +735,7 @@ macro_rules! test_exec { ($syntax:expr, $tr:expr, $test_name:ident, $input:expr) => { #[test] fn $test_name() { - if ::std::env::var("EXEC").unwrap_or(String::from("")) == "0" { - return; - } - + test_exec!(@check); $crate::exec_tr(stringify!($test_name), $syntax, $tr, $input) } }; @@ -817,7 +845,15 @@ pub struct FixtureTestConfig { /// /// Defaults to false. pub allow_error: bool, + + /// Determines what type of [Program] the source code is parsed as. + /// + /// - `Some(true)`: parsed as a [Program::Module] + /// - `Some(false)`: parsed as a [Program::Script] + /// - `None`: parsed as a [Program] (underlying type is auto-detected) + pub module: Option, } + /// You can do `UPDATE=1 cargo test` to update fixtures. pub fn test_fixture

( syntax: Syntax, @@ -853,9 +889,10 @@ fn test_fixture_inner<'a>( let expected = expected.unwrap_or_default(); let expected_src = Tester::run(|tester| { - let expected_module = tester.apply_transform(noop(), "expected.js", syntax, &expected)?; + let expected_program = + tester.apply_transform(noop(), "expected.js", syntax, config.module, &expected)?; - let expected_src = tester.print(&expected_module, &tester.comments.clone()); + let expected_src = tester.print(&expected_program, &tester.comments.clone()); println!( "----- {} -----\n{}", @@ -881,7 +918,7 @@ fn test_fixture_inner<'a>( eprintln!("----- {} -----", Color::Green.paint("Actual")); - let actual = tester.apply_transform(tr, "input.js", syntax, input)?; + let actual = tester.apply_transform(tr, "input.js", syntax, config.module, input)?; eprintln!("----- {} -----", Color::Green.paint("Comments")); eprintln!("{:?}", tester.comments); diff --git a/crates/swc_ecma_transforms_testing/tests/visited.rs b/crates/swc_ecma_transforms_testing/tests/visited.rs index d11c82f9377a4..6621303e0aeb0 100644 --- a/crates/swc_ecma_transforms_testing/tests/visited.rs +++ b/crates/swc_ecma_transforms_testing/tests/visited.rs @@ -26,6 +26,7 @@ fn ensure_visited() { jsx: true, ..Default::default() }), + None, |_| Panicking, " import React from 'react'; @@ -35,6 +36,5 @@ fn ensure_visited() { import React from 'react'; const comp = () => ; ", - false, ); } From 4b0d043c9b0976f2fba64aa3f4abecec4415236e 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, 8 Oct 2024 14:02:03 +0900 Subject: [PATCH 4/9] chore: Publish crates with `swc_core` `v0.109.0` --- .changeset/nine-trees-beam.md | 6 ------ .changeset/sharp-apricots-tease.md | 6 ------ CHANGELOG.md | 12 +++++++++--- Cargo.lock | 10 +++++----- crates/swc/Cargo.toml | 4 ++-- crates/swc_bundler/Cargo.toml | 2 +- crates/swc_cli_impl/Cargo.toml | 4 ++-- crates/swc_core/Cargo.toml | 8 ++++---- crates/swc_ecma_compat_bugfixes/Cargo.toml | 2 +- crates/swc_ecma_compat_es2015/Cargo.toml | 2 +- crates/swc_ecma_compat_es2016/Cargo.toml | 2 +- crates/swc_ecma_compat_es2017/Cargo.toml | 2 +- crates/swc_ecma_compat_es2018/Cargo.toml | 2 +- crates/swc_ecma_compat_es2019/Cargo.toml | 2 +- crates/swc_ecma_compat_es2020/Cargo.toml | 2 +- crates/swc_ecma_compat_es3/Cargo.toml | 2 +- crates/swc_ecma_minifier/Cargo.toml | 2 +- crates/swc_ecma_preset_env/Cargo.toml | 2 +- crates/swc_ecma_transforms/Cargo.toml | 4 ++-- crates/swc_ecma_transforms_compat/Cargo.toml | 2 +- crates/swc_ecma_transforms_module/Cargo.toml | 2 +- crates/swc_ecma_transforms_optimization/Cargo.toml | 4 ++-- crates/swc_ecma_transforms_proposal/Cargo.toml | 2 +- crates/swc_ecma_transforms_react/Cargo.toml | 2 +- crates/swc_ecma_transforms_testing/Cargo.toml | 2 +- crates/swc_ecma_transforms_typescript/Cargo.toml | 2 +- crates/swc_ecmascript/Cargo.toml | 2 +- 27 files changed, 44 insertions(+), 50 deletions(-) delete mode 100644 .changeset/nine-trees-beam.md delete mode 100644 .changeset/sharp-apricots-tease.md diff --git a/.changeset/nine-trees-beam.md b/.changeset/nine-trees-beam.md deleted file mode 100644 index 0edf6ec8d6137..0000000000000 --- a/.changeset/nine-trees-beam.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -swc_ecma_transforms_testing: breaking -swc_ecma_transforms_optimization: patch ---- - -feat(es/testing): Parse test code as a `Program` instead of a `Module` diff --git a/.changeset/sharp-apricots-tease.md b/.changeset/sharp-apricots-tease.md deleted file mode 100644 index ff21ac2c8e512..0000000000000 --- a/.changeset/sharp-apricots-tease.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -swc_ecma_preset_env: patch -swc_core: patch ---- - -feat(es/preset-env): Update preset-env data diff --git a/CHANGELOG.md b/CHANGELOG.md index 85a2052ba7156..e8ee818e4f66b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ +- **(ci)** Fix target triples ([#9622](/~https://github.com/swc-project/swc/issues/9622)) ([f625035](/~https://github.com/swc-project/swc/commit/f625035f8a21eb6d2bc487669a534257f3ef7c7c)) + + - **(es/minifier)** Compress consecutive return statements properly ([#9620](/~https://github.com/swc-project/swc/issues/9620)) ([8263da1](/~https://github.com/swc-project/swc/commit/8263da17664cc7cb5d49e1a8e9fbca8037fe991f)) @@ -20,8 +23,14 @@ +- **(es/preset-env)** Update preset-env data ([#9573](/~https://github.com/swc-project/swc/issues/9573)) ([9a11d34](/~https://github.com/swc-project/swc/commit/9a11d34ee569f64e8db02fc90beacbba0f2de0cf)) + + - **(es/testing)** Parse test code as a `Program` instead of a `Module` ([#9264](/~https://github.com/swc-project/swc/issues/9264)) ([166b858](/~https://github.com/swc-project/swc/commit/166b8581c226b127f5d503cd21c22c0a3a8c675c)) + +- **(es/testing)** Parse test code as a `Program` instead of a `Module` ([#9623](/~https://github.com/swc-project/swc/issues/9623)) ([bfea322](/~https://github.com/swc-project/swc/commit/bfea3223515e378c3ebe669f4a9012919f4f9547)) + ### Miscellaneous Tasks @@ -1328,9 +1337,6 @@ - **(es/compat)** Avoid reserved name for private method ([#8949](/~https://github.com/swc-project/swc/issues/8949)) ([7053bb1](/~https://github.com/swc-project/swc/commit/7053bb16ce19ba476760b7fe0b1627d1210d6e18)) -- **(es/minifier)** Abort inliner on mutation via property ([#8938](/~https://github.com/swc-project/swc/issues/8938)) ([257afc9](/~https://github.com/swc-project/swc/commit/257afc92c9b2a751935f8fdee1b84bc9222359b6)) - - - **(es/minifier)** Don't invoke IIFE containing reserved words ([#8939](/~https://github.com/swc-project/swc/issues/8939)) ([5a3456c](/~https://github.com/swc-project/swc/commit/5a3456c254a686ceef343ce5f9ec67b3e4644138)) diff --git a/Cargo.lock b/Cargo.lock index 14fe3d69b9014..2ed216e047dbd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4007,7 +4007,7 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.26.0" +version = "0.27.0" dependencies = [ "anyhow", "assert_cmd", @@ -4115,7 +4115,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.108.0" +version = "0.109.0" dependencies = [ "anyhow", "binding_macros", @@ -4729,7 +4729,7 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.222.0" +version = "0.222.1" dependencies = [ "anyhow", "codspeed-criterion-compat", @@ -4939,7 +4939,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.213.0" +version = "0.213.1" dependencies = [ "dashmap 5.5.3", "indexmap 2.5.0", @@ -5022,7 +5022,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.154.0" +version = "0.155.0" dependencies = [ "ansi_term", "anyhow", diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index feee183e4c7eb..e7d85403e3951 100644 --- a/crates/swc/Cargo.toml +++ b/crates/swc/Cargo.toml @@ -87,7 +87,7 @@ swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader", features = ] } swc_ecma_minifier = { version = "0.209.0", path = "../swc_ecma_minifier" } swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_preset_env = { version = "0.222.0", path = "../swc_ecma_preset_env" } +swc_ecma_preset_env = { version = "0.222.1", path = "../swc_ecma_preset_env" } swc_ecma_transforms = { version = "0.244.0", path = "../swc_ecma_transforms", features = [ "compat", "module", @@ -98,7 +98,7 @@ swc_ecma_transforms = { version = "0.244.0", path = "../swc_ecma_transforms", fe ] } swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_optimization = { version = "0.213.0", path = "../swc_ecma_transforms_optimization" } +swc_ecma_transforms_optimization = { version = "0.213.1", path = "../swc_ecma_transforms_optimization" } swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } swc_error_reporters = { version = "1.0.0", path = "../swc_error_reporters" } diff --git a/crates/swc_bundler/Cargo.toml b/crates/swc_bundler/Cargo.toml index 31d91e2fd74ef..fed2baa5dbfa4 100644 --- a/crates/swc_bundler/Cargo.toml +++ b/crates/swc_bundler/Cargo.toml @@ -44,7 +44,7 @@ swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_co swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader" } swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_optimization = { version = "0.213.0", path = "../swc_ecma_transforms_optimization" } +swc_ecma_transforms_optimization = { version = "0.213.1", path = "../swc_ecma_transforms_optimization" } swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } swc_fast_graph = { version = "1.0.0", path = "../swc_fast_graph/" } diff --git a/crates/swc_cli_impl/Cargo.toml b/crates/swc_cli_impl/Cargo.toml index 727f541a2d4dd..18f4724b755e8 100644 --- a/crates/swc_cli_impl/Cargo.toml +++ b/crates/swc_cli_impl/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli_impl" repository = "/~https://github.com/swc-project/swc.git" -version = "0.26.0" +version = "0.27.0" [[bin]] name = "swc" @@ -39,7 +39,7 @@ tracing-futures = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } walkdir = { workspace = true } -swc_core = { version = "0.108.0", features = [ +swc_core = { version = "0.109.0", features = [ "trace_macro", "common_concurrent", "base_concurrent", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 6e3ad65f49d8d..ec250c6a0eed1 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.108.0" +version = "0.109.0" [package.metadata.docs.rs] features = [ "allocator_node", @@ -359,15 +359,15 @@ swc_ecma_lints = { optional = true, version = "0.105.0", path swc_ecma_loader = { optional = true, version = "0.52.1", path = "../swc_ecma_loader" } swc_ecma_minifier = { optional = true, version = "0.209.0", path = "../swc_ecma_minifier" } swc_ecma_parser = { optional = true, version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_preset_env = { optional = true, version = "0.222.0", path = "../swc_ecma_preset_env" } +swc_ecma_preset_env = { optional = true, version = "0.222.1", path = "../swc_ecma_preset_env" } swc_ecma_quote_macros = { optional = true, version = "0.63.0", path = "../swc_ecma_quote_macros" } swc_ecma_transforms_base = { optional = true, version = "0.150.0", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_compat = { optional = true, version = "0.176.0", path = "../swc_ecma_transforms_compat" } swc_ecma_transforms_module = { optional = true, version = "0.195.0", path = "../swc_ecma_transforms_module" } -swc_ecma_transforms_optimization = { optional = true, version = "0.213.0", path = "../swc_ecma_transforms_optimization" } +swc_ecma_transforms_optimization = { optional = true, version = "0.213.1", path = "../swc_ecma_transforms_optimization" } swc_ecma_transforms_proposal = { optional = true, version = "0.184.0", path = "../swc_ecma_transforms_proposal" } swc_ecma_transforms_react = { optional = true, version = "0.196.0", path = "../swc_ecma_transforms_react" } -swc_ecma_transforms_testing = { optional = true, version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { optional = true, version = "0.155.0", path = "../swc_ecma_transforms_testing" } swc_ecma_transforms_typescript = { optional = true, version = "0.203.0", path = "../swc_ecma_transforms_typescript" } swc_ecma_usage_analyzer = { optional = true, version = "0.34.0", path = "../swc_ecma_usage_analyzer" } swc_ecma_utils = { optional = true, version = "0.138.0", path = "../swc_ecma_utils" } diff --git a/crates/swc_ecma_compat_bugfixes/Cargo.toml b/crates/swc_ecma_compat_bugfixes/Cargo.toml index d6431ffabceca..c9a2e03dedc75 100644 --- a/crates/swc_ecma_compat_bugfixes/Cargo.toml +++ b/crates/swc_ecma_compat_bugfixes/Cargo.toml @@ -23,4 +23,4 @@ tracing = { workspace = true } [dev-dependencies] swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2015/Cargo.toml b/crates/swc_ecma_compat_es2015/Cargo.toml index f72a193ae5da4..616fb6724eb1d 100644 --- a/crates/swc_ecma_compat_es2015/Cargo.toml +++ b/crates/swc_ecma_compat_es2015/Cargo.toml @@ -37,4 +37,4 @@ tracing = { workspace = true } [dev-dependencies] swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2016/Cargo.toml b/crates/swc_ecma_compat_es2016/Cargo.toml index d738996b48166..6be47b0d56209 100644 --- a/crates/swc_ecma_compat_es2016/Cargo.toml +++ b/crates/swc_ecma_compat_es2016/Cargo.toml @@ -25,4 +25,4 @@ tracing = { workspace = true } [dev-dependencies] swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2017/Cargo.toml b/crates/swc_ecma_compat_es2017/Cargo.toml index 70afe8b67cb77..b5b9d7395ffb8 100644 --- a/crates/swc_ecma_compat_es2017/Cargo.toml +++ b/crates/swc_ecma_compat_es2017/Cargo.toml @@ -27,4 +27,4 @@ swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } [dev-dependencies] swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2018/Cargo.toml b/crates/swc_ecma_compat_es2018/Cargo.toml index 33a4aef03726b..4fb48ddbd64d9 100644 --- a/crates/swc_ecma_compat_es2018/Cargo.toml +++ b/crates/swc_ecma_compat_es2018/Cargo.toml @@ -28,4 +28,4 @@ swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } [dev-dependencies] swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2019/Cargo.toml b/crates/swc_ecma_compat_es2019/Cargo.toml index 0c31361d95233..cba77e1a1ba6d 100644 --- a/crates/swc_ecma_compat_es2019/Cargo.toml +++ b/crates/swc_ecma_compat_es2019/Cargo.toml @@ -26,4 +26,4 @@ swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } [dev-dependencies] swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2020/Cargo.toml b/crates/swc_ecma_compat_es2020/Cargo.toml index a523ce6117955..c5f58586161d4 100644 --- a/crates/swc_ecma_compat_es2020/Cargo.toml +++ b/crates/swc_ecma_compat_es2020/Cargo.toml @@ -26,4 +26,4 @@ tracing = { workspace = true } [dev-dependencies] swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es3/Cargo.toml b/crates/swc_ecma_compat_es3/Cargo.toml index 98d8199898ac7..3e510b26b38ae 100644 --- a/crates/swc_ecma_compat_es3/Cargo.toml +++ b/crates/swc_ecma_compat_es3/Cargo.toml @@ -24,4 +24,4 @@ swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } [dev-dependencies] swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index a0ab268860020..29be5ff22839f 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -64,7 +64,7 @@ swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast", features = [ swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_optimization = { version = "0.213.0", path = "../swc_ecma_transforms_optimization" } +swc_ecma_transforms_optimization = { version = "0.213.1", path = "../swc_ecma_transforms_optimization" } swc_ecma_usage_analyzer = { version = "0.34.0", path = "../swc_ecma_usage_analyzer" } swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } diff --git a/crates/swc_ecma_preset_env/Cargo.toml b/crates/swc_ecma_preset_env/Cargo.toml index 5f9a83013704b..f8b043a07bd30 100644 --- a/crates/swc_ecma_preset_env/Cargo.toml +++ b/crates/swc_ecma_preset_env/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_ecma_preset_env" repository = { workspace = true } -version = "0.222.0" +version = "0.222.1" [lib] bench = false diff --git a/crates/swc_ecma_transforms/Cargo.toml b/crates/swc_ecma_transforms/Cargo.toml index fc0fbaa4acfd5..4b062dbb7db02 100644 --- a/crates/swc_ecma_transforms/Cargo.toml +++ b/crates/swc_ecma_transforms/Cargo.toml @@ -38,7 +38,7 @@ swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_as swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat", optional = true } swc_ecma_transforms_module = { version = "0.195.0", path = "../swc_ecma_transforms_module", optional = true } -swc_ecma_transforms_optimization = { version = "0.213.0", path = "../swc_ecma_transforms_optimization", optional = true } +swc_ecma_transforms_optimization = { version = "0.213.1", path = "../swc_ecma_transforms_optimization", optional = true } swc_ecma_transforms_proposal = { version = "0.184.0", path = "../swc_ecma_transforms_proposal", optional = true } swc_ecma_transforms_react = { version = "0.196.0", path = "../swc_ecma_transforms_react", optional = true } swc_ecma_transforms_typescript = { version = "0.203.0", path = "../swc_ecma_transforms_typescript", optional = true } @@ -52,5 +52,5 @@ tempfile = { workspace = true } swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } testing = { version = "0.42.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms_compat/Cargo.toml b/crates/swc_ecma_transforms_compat/Cargo.toml index 48c4e87381f7a..f5e509729b5b1 100644 --- a/crates/swc_ecma_transforms_compat/Cargo.toml +++ b/crates/swc_ecma_transforms_compat/Cargo.toml @@ -55,5 +55,5 @@ swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } serde_json = { workspace = true } swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } testing = { version = "0.42.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms_module/Cargo.toml b/crates/swc_ecma_transforms_module/Cargo.toml index 0b3e301e951bb..81b443e6a10c6 100644 --- a/crates/swc_ecma_transforms_module/Cargo.toml +++ b/crates/swc_ecma_transforms_module/Cargo.toml @@ -45,6 +45,6 @@ swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader", features = "tsc", ] } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } swc_ecma_transforms_typescript = { version = "0.203.0", path = "../swc_ecma_transforms_typescript" } testing = { version = "0.42.0", path = "../testing/" } diff --git a/crates/swc_ecma_transforms_optimization/Cargo.toml b/crates/swc_ecma_transforms_optimization/Cargo.toml index 55fea16c5d5a4..dea197555c0f2 100644 --- a/crates/swc_ecma_transforms_optimization/Cargo.toml +++ b/crates/swc_ecma_transforms_optimization/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_optimization" repository = "/~https://github.com/swc-project/swc.git" -version = "0.213.0" +version = "0.213.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -46,6 +46,6 @@ swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_tran swc_ecma_transforms_module = { version = "0.195.0", path = "../swc_ecma_transforms_module" } swc_ecma_transforms_proposal = { version = "0.184.0", path = "../swc_ecma_transforms_proposal" } swc_ecma_transforms_react = { version = "0.196.0", path = "../swc_ecma_transforms_react" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } swc_ecma_transforms_typescript = { version = "0.203.0", path = "../swc_ecma_transforms_typescript" } testing = { version = "0.42.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index 4109296e3021a..f4c9b044b967c 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -38,5 +38,5 @@ serde_json = { workspace = true } swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } testing = { version = "0.42.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms_react/Cargo.toml b/crates/swc_ecma_transforms_react/Cargo.toml index f08540ac655c7..19411075af9ce 100644 --- a/crates/swc_ecma_transforms_react/Cargo.toml +++ b/crates/swc_ecma_transforms_react/Cargo.toml @@ -41,5 +41,5 @@ swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } [dev-dependencies] swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen/" } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat/" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } testing = { version = "0.42.0", path = "../testing" } diff --git a/crates/swc_ecma_transforms_testing/Cargo.toml b/crates/swc_ecma_transforms_testing/Cargo.toml index 321d813dea0e9..7a8d5de977a25 100644 --- a/crates/swc_ecma_transforms_testing/Cargo.toml +++ b/crates/swc_ecma_transforms_testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_transforms_testing" repository = "/~https://github.com/swc-project/swc.git" -version = "0.154.0" +version = "0.155.0" [lib] bench = false diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index e63840f185467..17f78216cf20f 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -32,7 +32,7 @@ swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codege swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat" } swc_ecma_transforms_proposal = { version = "0.184.0", path = "../swc_ecma_transforms_proposal" } -swc_ecma_transforms_testing = { version = "0.154.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } testing = { version = "0.42.0", path = "../testing" } [[bench]] diff --git a/crates/swc_ecmascript/Cargo.toml b/crates/swc_ecmascript/Cargo.toml index 1b68979407138..457fbd98269a6 100644 --- a/crates/swc_ecmascript/Cargo.toml +++ b/crates/swc_ecmascript/Cargo.toml @@ -42,7 +42,7 @@ swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen", optional = true } swc_ecma_minifier = { version = "0.209.0", path = "../swc_ecma_minifier", optional = true } swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser", optional = true, default-features = false } -swc_ecma_preset_env = { version = "0.222.0", path = "../swc_ecma_preset_env", optional = true } +swc_ecma_preset_env = { version = "0.222.1", path = "../swc_ecma_preset_env", optional = true } swc_ecma_quote = { version = "0.68.0", path = "../swc_ecma_quote", optional = true } swc_ecma_transforms = { version = "0.244.0", path = "../swc_ecma_transforms", optional = true } swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils", optional = true } From 6a3b0fc1660cba4310880881f21e3bf81aceac0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 8 Oct 2024 15:01:14 +0900 Subject: [PATCH 5/9] build: Update `rustc` to `nightly-2024-10-07` (#9624) --- .changeset/three-ravens-joke.md | 40 +++++++++ crates/better_scoped_tls/src/lib.rs | 1 - crates/jsdoc/src/input.rs | 2 +- crates/swc/benches/typescript.rs | 1 - crates/swc/src/dropped_comments_preserver.rs | 1 - crates/swc/src/plugin.rs | 1 + crates/swc_allocator/src/vec/mod.rs | 1 - crates/swc_bundler/src/bundler/chunk/merge.rs | 21 ++--- crates/swc_bundler/src/bundler/mod.rs | 2 +- crates/swc_bundler/src/bundler/tests.rs | 2 +- crates/swc_bundler/src/id.rs | 2 +- crates/swc_bundler/src/load.rs | 2 +- crates/swc_bundler/tests/common/mod.rs | 2 +- crates/swc_common/src/eq.rs | 4 +- .../src/errors/diagnostic_builder.rs | 8 +- crates/swc_common/src/errors/emitter.rs | 6 +- crates/swc_common/src/input.rs | 2 +- crates/swc_common/src/plugin/metadata.rs | 5 +- crates/swc_common/src/plugin/serialized.rs | 3 + crates/swc_common/src/pos.rs | 4 +- crates/swc_common/src/source_map.rs | 19 ++-- crates/swc_common/src/syntax_pos.rs | 9 +- crates/swc_config/src/module.rs | 2 +- crates/swc_css_codegen/src/ctx.rs | 6 +- crates/swc_css_parser/src/parser/input.rs | 4 +- crates/swc_css_parser/src/parser/util.rs | 6 +- crates/swc_ecma_ast/src/expr.rs | 3 - crates/swc_ecma_ast/src/typescript.rs | 2 +- crates/swc_ecma_codegen/src/comments.rs | 2 +- crates/swc_ecma_codegen/src/decl.rs | 2 +- crates/swc_ecma_codegen/src/jsx.rs | 2 +- crates/swc_ecma_codegen/src/lib.rs | 10 +-- .../src/text_writer/basic_impl.rs | 18 +--- crates/swc_ecma_codegen/src/typescript.rs | 2 +- .../src/async_arrows_in_class.rs | 2 + .../src/edge_default_param.rs | 2 + .../src/block_scoping/mod.rs | 2 +- .../src/classes/constructor.rs | 5 +- .../src/duplicate_keys.rs | 2 +- .../swc_ecma_compat_es2015/src/generator.rs | 1 - .../src/regenerator/mod.rs | 1 - .../src/class_properties/class_name_tdz.rs | 2 +- .../src/class_properties/private_field.rs | 4 +- .../src/class_properties/used_name.rs | 2 +- crates/swc_ecma_lints/src/rules/radix.rs | 2 +- crates/swc_ecma_minifier/src/compress/mod.rs | 2 +- .../src/compress/optimize/inline.rs | 90 +++++++++---------- .../src/compress/optimize/loops.rs | 7 +- .../src/compress/optimize/sequences.rs | 22 ++--- .../src/compress/optimize/unused.rs | 17 ++-- .../src/compress/optimize/util.rs | 2 +- .../src/compress/pure/dead_code.rs | 18 ++-- .../src/compress/pure/evaluate.rs | 5 +- .../src/pass/mangle_names/preserver.rs | 4 +- crates/swc_ecma_parser/src/lexer/jsx.rs | 2 +- crates/swc_ecma_parser/src/lexer/mod.rs | 2 +- crates/swc_ecma_parser/src/lexer/number.rs | 2 +- crates/swc_ecma_parser/src/lexer/state.rs | 2 +- crates/swc_ecma_parser/src/lexer/tests.rs | 2 +- crates/swc_ecma_parser/src/lexer/util.rs | 2 +- crates/swc_ecma_parser/src/parser/expr.rs | 1 - crates/swc_ecma_parser/src/parser/stmt.rs | 2 +- .../src/parser/stmt/module_item.rs | 2 +- .../swc_ecma_parser/src/parser/typescript.rs | 1 - crates/swc_ecma_parser/src/parser/util.rs | 12 +-- crates/swc_ecma_preset_env/src/corejs2/mod.rs | 1 - .../swc_ecma_transforms_base/benches/deps.rs | 2 - crates/swc_ecma_transforms_base/src/fixer.rs | 1 - .../src/rename/ops.rs | 11 +-- .../src/resolver/mod.rs | 39 ++++---- crates/swc_ecma_transforms_base/src/tests.rs | 2 +- .../src/super_field.rs | 4 +- .../src/simplify/const_propagation.rs | 7 +- .../src/decorators/legacy/metadata.rs | 4 +- .../src/pure_annotations/mod.rs | 2 + .../src/refresh/hook.rs | 8 +- .../src/babel_like.rs | 1 - crates/swc_ecma_transforms_testing/src/lib.rs | 2 +- .../src/transform.rs | 2 +- .../src/ts_enum.rs | 4 +- .../swc_ecma_usage_analyzer/src/alias/ctx.rs | 4 +- .../src/analyzer/mod.rs | 11 +-- .../src/function/fn_env_hoister.rs | 2 +- crates/swc_ecma_utils/src/lib.rs | 4 +- crates/swc_ecma_utils/src/node_ignore_span.rs | 8 +- crates/swc_ecma_utils/src/var.rs | 2 +- crates/swc_ecma_visit/src/lib.rs | 2 + crates/swc_ecma_visit/tests/main.rs | 2 +- crates/swc_fast_graph/src/digraph.rs | 16 ++-- crates/swc_html_codegen/src/ctx.rs | 2 +- crates/swc_html_codegen/src/lib.rs | 4 +- crates/swc_html_parser/src/parser/mod.rs | 2 +- crates/swc_macros_common/src/binder.rs | 4 +- .../swc_macros_common/src/derive/generics.rs | 2 +- crates/swc_plugin/src/pseudo_scoped_key.rs | 1 + crates/swc_typescript/src/fast_dts/mod.rs | 1 - crates/swc_xml_codegen/src/ctx.rs | 2 +- crates/testing/src/lib.rs | 2 +- rust-toolchain | 2 +- tools/swc-releaser/src/main.rs | 2 +- 100 files changed, 287 insertions(+), 297 deletions(-) create mode 100644 .changeset/three-ravens-joke.md diff --git a/.changeset/three-ravens-joke.md b/.changeset/three-ravens-joke.md new file mode 100644 index 0000000000000..ad8c40414a278 --- /dev/null +++ b/.changeset/three-ravens-joke.md @@ -0,0 +1,40 @@ +--- +better_scoped_tls: patch +jsdoc: patch +swc: patch +swc_allocator: patch +swc_bundler: patch +swc_common: patch +swc_config: patch +swc_css_codegen: patch +swc_css_parser: patch +swc_ecma_ast: patch +swc_ecma_codegen: patch +swc_ecma_compat_bugfixes: patch +swc_ecma_compat_es2015: patch +swc_ecma_compat_es2022: patch +swc_ecma_lints: patch +swc_ecma_minifier: patch +swc_ecma_parser: patch +swc_ecma_preset_env: patch +swc_ecma_transforms_base: patch +swc_ecma_transforms_classes: patch +swc_ecma_transforms_optimization: patch +swc_ecma_transforms_proposal: patch +swc_ecma_transforms_react: patch +swc_ecma_transforms_testing: patch +swc_ecma_transforms_typescript: patch +swc_ecma_usage_analyzer: patch +swc_ecma_utils: patch +swc_ecma_visit: patch +swc_fast_graph: patch +swc_html_codegen: patch +swc_html_parser: patch +swc_macros_common: patch +swc_plugin: patch +swc_typescript: patch +swc_xml_codegen: patch +testing: patch +--- + +build: Update `rustc` to `nightly-2024-10-07` diff --git a/crates/better_scoped_tls/src/lib.rs b/crates/better_scoped_tls/src/lib.rs index 860d7becb7083..0ea8524ca6e8c 100644 --- a/crates/better_scoped_tls/src/lib.rs +++ b/crates/better_scoped_tls/src/lib.rs @@ -92,7 +92,6 @@ mod tests { #[test] #[should_panic = "You should perform this operation in the closure passed to `set` of \ better_scoped_tls::tests::TESTTLS"] - fn panic_on_with() { TESTTLS.with(|s| { println!("S: {}", s); diff --git a/crates/jsdoc/src/input.rs b/crates/jsdoc/src/input.rs index 1d51023c57e1a..2504c6e14551e 100644 --- a/crates/jsdoc/src/input.rs +++ b/crates/jsdoc/src/input.rs @@ -54,7 +54,7 @@ impl_slice!(Range); impl_slice!(RangeFrom); impl_slice!(RangeTo); -impl<'i> From> for Text { +impl From> for Text { fn from(i: Input) -> Self { Self { span: Span::new(i.start, i.end), diff --git a/crates/swc/benches/typescript.rs b/crates/swc/benches/typescript.rs index 8e0aff313f6b7..a9e9ab3a15bc4 100644 --- a/crates/swc/benches/typescript.rs +++ b/crates/swc/benches/typescript.rs @@ -101,7 +101,6 @@ fn base_tr_fixer(b: &mut Bencher) { // } /// This benchmark exists to know exact execution time of each pass. - fn bench_codegen(b: &mut Bencher, _target: EsVersion) { let c = mk(); diff --git a/crates/swc/src/dropped_comments_preserver.rs b/crates/swc/src/dropped_comments_preserver.rs index d87a680e1f331..0f3478b641a7c 100644 --- a/crates/swc/src/dropped_comments_preserver.rs +++ b/crates/swc/src/dropped_comments_preserver.rs @@ -16,7 +16,6 @@ use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWit /// This transformer shifts orphaned comments to the next closest known span /// while making a best-effort to preserve the "general orientation" of /// comments. - pub fn dropped_comments_preserver( comments: Option, ) -> impl Fold + VisitMut { diff --git a/crates/swc/src/plugin.rs b/crates/swc/src/plugin.rs index 35be19cd62e9d..2f6e13977e258 100644 --- a/crates/swc/src/plugin.rs +++ b/crates/swc/src/plugin.rs @@ -14,6 +14,7 @@ use swc_ecma_transforms::pass::noop; use swc_ecma_visit::{noop_fold_type, Fold}; /// A tuple represents a plugin. +/// /// First element is a resolvable name to the plugin, second is a JSON object /// that represents configuration option for those plugin. /// Type of plugin's configuration is up to each plugin - swc/core does not have diff --git a/crates/swc_allocator/src/vec/mod.rs b/crates/swc_allocator/src/vec/mod.rs index cd00ec212e0c7..2f743375ed833 100644 --- a/crates/swc_allocator/src/vec/mod.rs +++ b/crates/swc_allocator/src/vec/mod.rs @@ -15,7 +15,6 @@ use crate::{boxed::Box, FastAlloc}; /// Faster version of [`std::vec::Vec`]. #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[repr(transparent)] - pub struct Vec(std::vec::Vec); impl Vec { diff --git a/crates/swc_bundler/src/bundler/chunk/merge.rs b/crates/swc_bundler/src/bundler/chunk/merge.rs index 6c0ef0a2a81be..28d1ae1b78557 100644 --- a/crates/swc_bundler/src/bundler/chunk/merge.rs +++ b/crates/swc_bundler/src/bundler/chunk/merge.rs @@ -259,8 +259,8 @@ where match s { ExportSpecifier::Namespace(_) => {} ExportSpecifier::Default(_) => {} - ExportSpecifier::Named(named) => match &named.exported { - Some(exported) => { + ExportSpecifier::Named(named) => { + if let Some(exported) = &named.exported { let exported = match exported { ModuleExportName::Ident(ident) => ident, ModuleExportName::Str(..) => { @@ -290,8 +290,7 @@ where } } } - None => {} - }, + } } } } @@ -609,8 +608,8 @@ where // Imports are easy to handle. for s in &import.specifiers { match s { - ImportSpecifier::Named(s) => match &s.imported { - Some(imported) => { + ImportSpecifier::Named(s) => { + if let Some(imported) = &s.imported { let imported = match imported { ModuleExportName::Ident(ident) => ident, ModuleExportName::Str(..) => { @@ -627,8 +626,7 @@ where ), ); } - None => {} - }, + } ImportSpecifier::Default(s) => { new.push( Ident::new( @@ -1259,8 +1257,8 @@ where for specifier in &import.specifiers { match specifier { - ImportSpecifier::Named(named) => match &named.imported { - Some(imported) => { + ImportSpecifier::Named(named) => { + if let Some(imported) = &named.imported { let imporeted_ident = match imported { ModuleExportName::Ident(ident) => ident, ModuleExportName::Str(..) => { @@ -1279,8 +1277,7 @@ where )); continue; } - None => {} - }, + } ImportSpecifier::Default(default) => { if let Some((src, _)) = info .imports diff --git a/crates/swc_bundler/src/bundler/mod.rs b/crates/swc_bundler/src/bundler/mod.rs index c1432870fbf4f..3829400058fb2 100644 --- a/crates/swc_bundler/src/bundler/mod.rs +++ b/crates/swc_bundler/src/bundler/mod.rs @@ -141,7 +141,7 @@ where } pub(crate) fn is_external(&self, src: &JsWord) -> bool { - return self.config.external_modules.iter().any(|v| v == src); + self.config.external_modules.iter().any(|v| v == src) } /// diff --git a/crates/swc_bundler/src/bundler/tests.rs b/crates/swc_bundler/src/bundler/tests.rs index 5bc6dbdf097c4..d9c4969a832c0 100644 --- a/crates/swc_bundler/src/bundler/tests.rs +++ b/crates/swc_bundler/src/bundler/tests.rs @@ -69,7 +69,7 @@ impl Resolve for Resolver { } } -impl<'a> Tester<'a> { +impl Tester<'_> { pub fn module(&self, name: &str) -> TransformedModule { self.bundler .scope diff --git a/crates/swc_bundler/src/id.rs b/crates/swc_bundler/src/id.rs index 5b4e7664c668b..393837adb037d 100644 --- a/crates/swc_bundler/src/id.rs +++ b/crates/swc_bundler/src/id.rs @@ -99,7 +99,7 @@ impl From for Id { } } -impl<'a> From<&'a Ident> for Id { +impl From<&Ident> for Id { fn from(i: &Ident) -> Self { Id(i.sym.clone(), i.ctxt) } diff --git a/crates/swc_bundler/src/load.rs b/crates/swc_bundler/src/load.rs index 9544cd0086e18..d42a8cbc2c716 100644 --- a/crates/swc_bundler/src/load.rs +++ b/crates/swc_bundler/src/load.rs @@ -49,7 +49,7 @@ impl Load for Box { } } -impl<'a, T: ?Sized + Load> Load for &'a T { +impl Load for &T { fn load(&self, file: &FileName) -> Result { (**self).load(file) } diff --git a/crates/swc_bundler/tests/common/mod.rs b/crates/swc_bundler/tests/common/mod.rs index 6850690a70fb0..8a453a5d7981f 100644 --- a/crates/swc_bundler/tests/common/mod.rs +++ b/crates/swc_bundler/tests/common/mod.rs @@ -84,7 +84,7 @@ fn load_url(url: Url) -> Result { write(&cache_path, &content)?; - return Ok(String::from_utf8_lossy(&bytes).to_string()); + Ok(String::from_utf8_lossy(&bytes).to_string()) } impl Load for Loader { diff --git a/crates/swc_common/src/eq.rs b/crates/swc_common/src/eq.rs index a8d1c6ea93db6..694753f2c19e0 100644 --- a/crates/swc_common/src/eq.rs +++ b/crates/swc_common/src/eq.rs @@ -210,7 +210,7 @@ swc_allocator::nightly_only!( } ); -impl<'a, N> EqIgnoreSpan for &'a N +impl EqIgnoreSpan for &N where N: EqIgnoreSpan, { @@ -220,7 +220,7 @@ where } } -impl<'a, N> TypeEq for &'a N +impl TypeEq for &N where N: TypeEq, { diff --git a/crates/swc_common/src/errors/diagnostic_builder.rs b/crates/swc_common/src/errors/diagnostic_builder.rs index 19df8782d67fe..1a0e2bfb108bb 100644 --- a/crates/swc_common/src/errors/diagnostic_builder.rs +++ b/crates/swc_common/src/errors/diagnostic_builder.rs @@ -78,7 +78,7 @@ macro_rules! forward { }; } -impl<'a> Deref for DiagnosticBuilder<'a> { +impl Deref for DiagnosticBuilder<'_> { type Target = Diagnostic; fn deref(&self) -> &Diagnostic { @@ -86,7 +86,7 @@ impl<'a> Deref for DiagnosticBuilder<'a> { } } -impl<'a> DerefMut for DiagnosticBuilder<'a> { +impl DerefMut for DiagnosticBuilder<'_> { fn deref_mut(&mut self) -> &mut Diagnostic { &mut self.diagnostic } @@ -325,7 +325,7 @@ impl<'a> DiagnosticBuilder<'a> { } } -impl<'a> Debug for DiagnosticBuilder<'a> { +impl Debug for DiagnosticBuilder<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.diagnostic.fmt(f) } @@ -333,7 +333,7 @@ impl<'a> Debug for DiagnosticBuilder<'a> { /// Destructor bomb - a `DiagnosticBuilder` must be either emitted or canceled /// or we emit a bug. -impl<'a> Drop for DiagnosticBuilder<'a> { +impl Drop for DiagnosticBuilder<'_> { fn drop(&mut self) { if !panicking() && !self.cancelled() { let mut db = DiagnosticBuilder::new( diff --git a/crates/swc_common/src/errors/emitter.rs b/crates/swc_common/src/errors/emitter.rs index 7133983ce0651..47885d3e76bf1 100644 --- a/crates/swc_common/src/errors/emitter.rs +++ b/crates/swc_common/src/errors/emitter.rs @@ -1548,7 +1548,7 @@ impl Destination { } } -impl<'a> WritableDst<'a> { +impl WritableDst<'_> { #[cfg(feature = "tty-emitter")] fn apply_style(&mut self, lvl: Level, style: Style) -> io::Result<()> { let mut spec = ColorSpec::new(); @@ -1616,7 +1616,7 @@ impl<'a> WritableDst<'a> { } } -impl<'a> Write for WritableDst<'a> { +impl Write for WritableDst<'_> { fn write(&mut self, bytes: &[u8]) -> io::Result { match *self { #[cfg(feature = "tty-emitter")] @@ -1638,7 +1638,7 @@ impl<'a> Write for WritableDst<'a> { } } -impl<'a> Drop for WritableDst<'a> { +impl Drop for WritableDst<'_> { fn drop(&mut self) { #[cfg(feature = "tty-emitter")] if let WritableDst::Buffered(ref mut dst, ref mut buf) = self { diff --git a/crates/swc_common/src/input.rs b/crates/swc_common/src/input.rs index 546eeec0ef9ca..52c325c6b705f 100644 --- a/crates/swc_common/src/input.rs +++ b/crates/swc_common/src/input.rs @@ -72,7 +72,7 @@ impl<'a> From<&'a SourceFile> for StringInput<'a> { } } -impl<'a> Input for StringInput<'a> { +impl Input for StringInput<'_> { #[inline] fn cur(&mut self) -> Option { self.iter.clone().next() diff --git a/crates/swc_common/src/plugin/metadata.rs b/crates/swc_common/src/plugin/metadata.rs index 6fbbed6aef8cc..2f608e714e82d 100644 --- a/crates/swc_common/src/plugin/metadata.rs +++ b/crates/swc_common/src/plugin/metadata.rs @@ -2,8 +2,9 @@ use std::env; use crate::collections::AHashMap; -/// Indexable key to the metadata context for a transform plugin, avoiding -/// serialization & allocation to the host by using incremental number. +/// Indexable key to the metadata context for a transform plugin. +/// +/// Avoiding serialization & allocation to the host by using incremental number. /// TransformPluginMetadataContext does not implement Index trait, instead /// host does manual matching to corresponding value. #[derive(Copy, Clone)] diff --git a/crates/swc_common/src/plugin/serialized.rs b/crates/swc_common/src/plugin/serialized.rs index 60552a8b4e9a3..6f2b677edf27a 100644 --- a/crates/swc_common/src/plugin/serialized.rs +++ b/crates/swc_common/src/plugin/serialized.rs @@ -13,6 +13,7 @@ use rkyv::Deserialize; #[cfg_attr(feature = "__plugin", archive(check_bytes))] #[cfg_attr(feature = "__plugin", archive_attr(repr(u32)))] /// Enum for possible errors while running transform via plugin. +/// /// This error indicates internal operation failure either in plugin_runner /// or plugin_macro. Plugin's transform fn itself does not allow to return /// error - instead it should use provided `handler` to emit corresponding error @@ -31,6 +32,8 @@ pub enum PluginError { Serialize(String), } +/// A wrapper type for the internal representation of serialized data. +/// /// Wraps internal representation of serialized data for exchanging data between /// plugin to the host. Consumers should not rely on specific details of byte /// format struct contains: it is strict implementation detail which can diff --git a/crates/swc_common/src/pos.rs b/crates/swc_common/src/pos.rs index fbe997d4445f0..bbdd242fabff9 100644 --- a/crates/swc_common/src/pos.rs +++ b/crates/swc_common/src/pos.rs @@ -24,7 +24,7 @@ pub trait Spanned { } } -impl<'a, T> Spanned for Cow<'a, T> +impl Spanned for Cow<'_, T> where T: Spanned + Clone, { @@ -145,7 +145,7 @@ where } } -impl<'a, S> Spanned for &'a S +impl Spanned for &S where S: ?Sized + Spanned, { diff --git a/crates/swc_common/src/source_map.rs b/crates/swc_common/src/source_map.rs index fea4d6900c255..12b38bf261cb4 100644 --- a/crates/swc_common/src/source_map.rs +++ b/crates/swc_common/src/source_map.rs @@ -8,14 +8,17 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! The SourceMap tracks all the source code used within a single crate, mapping -//! from integer byte positions to the original source code location. Each bit -//! of source parsed during crate parsing (typically files, in-memory strings, -//! or various bits of macro expansion) cover a continuous range of bytes in the -//! SourceMap and are represented by SourceFiles. Byte positions are stored in -//! `spans` and used pervasively in the compiler. They are absolute positions -//! within the SourceMap, which upon request can be converted to line and column -//! information, source code snippets, etc. +//! The SourceMap tracks all the source code used within a single crate. +//! +//! The mapping from integer byte positions to the original source code location +//! is stored in `spans`. +//! +//! Each bit of source parsed during crate parsing (typically files, in-memory +//! strings, or various bits of macro expansion) cover a continuous range of +//! bytes in the SourceMap and are represented by SourceFiles. Byte positions +//! are stored in `spans` and used pervasively in the compiler. They are +//! absolute positions within the SourceMap, which upon request can be converted +//! to line and column information, source code snippets, etc. use std::{ cmp, env, fs, hash::Hash, diff --git a/crates/swc_common/src/syntax_pos.rs b/crates/swc_common/src/syntax_pos.rs index 3e9092403f0c3..4ab1870cb6d2a 100644 --- a/crates/swc_common/src/syntax_pos.rs +++ b/crates/swc_common/src/syntax_pos.rs @@ -21,7 +21,9 @@ use crate::{rustc_data_structures::stable_hasher::StableHasher, sync::Lrc}; mod analyze_source_file; pub mod hygiene; -/// Spans represent a region of code, used for error reporting. Positions in +/// Spans represent a region of code, used for error reporting. +/// +/// Positions in /// spans are *absolute* positions from the beginning of the `source_map`, not /// positions relative to `SourceFile`s. Methods on the `SourceMap` can be used /// to relate spans back to the original source. @@ -1154,7 +1156,8 @@ impl Sub for CharPos { // Loc, LocWithOpt, SourceFileAndLine, SourceFileAndBytePos // -/// A source code location used for error reporting +/// A source code location used for error reporting. +/// /// Note: This struct intentionally does not implement rkyv's archieve /// to avoid redundant data copy (/~https://github.com/swc-project/swc/issues/5471) /// source_map_proxy constructs plugin-side Loc instead with shared SourceFile @@ -1244,6 +1247,8 @@ pub struct LineCol { pub col: u32, } +/// A struct to represent lines of a source file. +/// /// Note: This struct intentionally does not implement rkyv's archieve /// to avoid redundant data copy (/~https://github.com/swc-project/swc/issues/5471) /// source_map_proxy constructs plugin-side Loc instead with shared SourceFile diff --git a/crates/swc_config/src/module.rs b/crates/swc_config/src/module.rs index 61c730df649b1..1fcf29021ce07 100644 --- a/crates/swc_config/src/module.rs +++ b/crates/swc_config/src/module.rs @@ -41,7 +41,7 @@ impl Serialize for IsModule { struct IsModuleVisitor; -impl<'de> Visitor<'de> for IsModuleVisitor { +impl Visitor<'_> for IsModuleVisitor { type Value = IsModule; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/crates/swc_css_codegen/src/ctx.rs b/crates/swc_css_codegen/src/ctx.rs index fdadc06934df8..e5bdace64e495 100644 --- a/crates/swc_css_codegen/src/ctx.rs +++ b/crates/swc_css_codegen/src/ctx.rs @@ -31,20 +31,20 @@ pub(super) struct WithCtx<'w, I: 'w + CssWriter> { orig_ctx: Ctx, } -impl<'w, I: CssWriter> Deref for WithCtx<'w, I> { +impl Deref for WithCtx<'_, I> { type Target = CodeGenerator; fn deref(&self) -> &CodeGenerator { self.inner } } -impl<'w, I: CssWriter> DerefMut for WithCtx<'w, I> { +impl DerefMut for WithCtx<'_, I> { fn deref_mut(&mut self) -> &mut CodeGenerator { self.inner } } -impl<'w, I: CssWriter> Drop for WithCtx<'w, I> { +impl Drop for WithCtx<'_, I> { fn drop(&mut self) { self.inner.ctx = self.orig_ctx; } diff --git a/crates/swc_css_parser/src/parser/input.rs b/crates/swc_css_parser/src/parser/input.rs index 0ab56b18c9097..4401df39fab7d 100644 --- a/crates/swc_css_parser/src/parser/input.rs +++ b/crates/swc_css_parser/src/parser/input.rs @@ -440,7 +440,7 @@ impl<'a> Input<'a> { } } -impl<'a> ParserInput for Input<'a> { +impl ParserInput for Input<'_> { type State = State; fn start_pos(&mut self) -> BytePos { @@ -489,7 +489,7 @@ impl<'a> ParserInput for Input<'a> { } } -impl<'a> Iterator for Input<'a> { +impl Iterator for Input<'_> { type Item = TokenAndSpan; fn next(&mut self) -> Option { diff --git a/crates/swc_css_parser/src/parser/util.rs b/crates/swc_css_parser/src/parser/util.rs index eebb3e4480d5d..ae208005e3c84 100644 --- a/crates/swc_css_parser/src/parser/util.rs +++ b/crates/swc_css_parser/src/parser/util.rs @@ -396,20 +396,20 @@ pub(super) struct WithCtx<'w, I: 'w + ParserInput> { orig_ctx: Ctx, } -impl<'w, I: ParserInput> Deref for WithCtx<'w, I> { +impl Deref for WithCtx<'_, I> { type Target = Parser; fn deref(&self) -> &Parser { self.inner } } -impl<'w, I: ParserInput> DerefMut for WithCtx<'w, I> { +impl DerefMut for WithCtx<'_, I> { fn deref_mut(&mut self) -> &mut Parser { self.inner } } -impl<'w, I: ParserInput> Drop for WithCtx<'w, I> { +impl Drop for WithCtx<'_, I> { fn drop(&mut self) { self.inner.ctx = self.orig_ctx; } diff --git a/crates/swc_ecma_ast/src/expr.rs b/crates/swc_ecma_ast/src/expr.rs index c57e414a1c5f9..9e1f06a871754 100644 --- a/crates/swc_ecma_ast/src/expr.rs +++ b/crates/swc_ecma_ast/src/expr.rs @@ -315,14 +315,11 @@ impl Expr { self.is_ident_ref_to("eval") || matches!(self, Expr::Member(..)) } - /// #Note pub fn with_span(mut self, span: Span) -> Expr { self.set_span(span); self } - /// # Note - pub fn set_span(&mut self, span: Span) { match self { Expr::Ident(i) => { diff --git a/crates/swc_ecma_ast/src/typescript.rs b/crates/swc_ecma_ast/src/typescript.rs index 7380b417547ae..59ec642a7c810 100644 --- a/crates/swc_ecma_ast/src/typescript.rs +++ b/crates/swc_ecma_ast/src/typescript.rs @@ -729,7 +729,7 @@ impl<'de> Deserialize<'de> for TruePlusMinus { { struct TruePlusMinusVisitor; - impl<'de> Visitor<'de> for TruePlusMinusVisitor { + impl Visitor<'_> for TruePlusMinusVisitor { type Value = TruePlusMinus; fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/crates/swc_ecma_codegen/src/comments.rs b/crates/swc_ecma_codegen/src/comments.rs index 8f1768d212034..f8d40843c6df3 100644 --- a/crates/swc_ecma_codegen/src/comments.rs +++ b/crates/swc_ecma_codegen/src/comments.rs @@ -54,7 +54,7 @@ macro_rules! write_comments { }}; } -impl<'a, W, S: SourceMapper> Emitter<'a, W, S> +impl Emitter<'_, W, S> where W: WriteJs, S: SourceMapperExt, diff --git a/crates/swc_ecma_codegen/src/decl.rs b/crates/swc_ecma_codegen/src/decl.rs index b4010c7440e30..a957c4df60525 100644 --- a/crates/swc_ecma_codegen/src/decl.rs +++ b/crates/swc_ecma_codegen/src/decl.rs @@ -5,7 +5,7 @@ use swc_ecma_codegen_macros::emitter; use super::{Emitter, Result}; use crate::text_writer::WriteJs; -impl<'a, W, S: SourceMapper> Emitter<'a, W, S> +impl Emitter<'_, W, S> where W: WriteJs, S: SourceMapperExt, diff --git a/crates/swc_ecma_codegen/src/jsx.rs b/crates/swc_ecma_codegen/src/jsx.rs index f56371cf8fd90..9f1483b651019 100644 --- a/crates/swc_ecma_codegen/src/jsx.rs +++ b/crates/swc_ecma_codegen/src/jsx.rs @@ -5,7 +5,7 @@ use swc_ecma_codegen_macros::emitter; use super::{Emitter, Result}; use crate::text_writer::WriteJs; -impl<'a, W, S: SourceMapper> Emitter<'a, W, S> +impl Emitter<'_, W, S> where W: WriteJs, S: SourceMapperExt, diff --git a/crates/swc_ecma_codegen/src/lib.rs b/crates/swc_ecma_codegen/src/lib.rs index 33cb745ce5689..a522f52b7b35c 100644 --- a/crates/swc_ecma_codegen/src/lib.rs +++ b/crates/swc_ecma_codegen/src/lib.rs @@ -85,7 +85,7 @@ impl Node for Box { (**self).emit_with(e) } } -impl<'a, N: Node> Node for &'a N { +impl Node for &N { #[inline] fn emit_with(&self, e: &mut Emitter<'_, W, S>) -> Result where @@ -141,7 +141,7 @@ fn replace_close_inline_script(raw: &str) -> Cow { static NEW_LINE_TPL_REGEX: Lazy = Lazy::new(|| regex::Regex::new(r"\\n|\n").unwrap()); -impl<'a, W, S: SourceMapper> Emitter<'a, W, S> +impl Emitter<'_, W, S> where W: WriteJs, S: SourceMapperExt, @@ -2772,7 +2772,7 @@ where } /// Patterns -impl<'a, W, S: SourceMapper> Emitter<'a, W, S> +impl Emitter<'_, W, S> where W: WriteJs, S: SourceMapperExt, @@ -2997,7 +2997,7 @@ where } /// Statements -impl<'a, W, S: SourceMapper> Emitter<'a, W, S> +impl Emitter<'_, W, S> where W: WriteJs, S: SourceMapperExt, @@ -3655,7 +3655,7 @@ where } } -impl<'a, W, S: SourceMapper> Emitter<'a, W, S> +impl Emitter<'_, W, S> where W: WriteJs, S: SourceMapperExt, diff --git a/crates/swc_ecma_codegen/src/text_writer/basic_impl.rs b/crates/swc_ecma_codegen/src/text_writer/basic_impl.rs index c75148191329a..69ab4981fd3b4 100644 --- a/crates/swc_ecma_codegen/src/text_writer/basic_impl.rs +++ b/crates/swc_ecma_codegen/src/text_writer/basic_impl.rs @@ -78,7 +78,6 @@ impl<'a, W: Write> JsWriter<'a, W> { } #[inline] - fn write(&mut self, span: Option, data: &str) -> Result { if !data.is_empty() { if self.line_start { @@ -142,7 +141,7 @@ impl<'a, W: Write> JsWriter<'a, W> { } } -impl<'a, W: Write> WriteJs for JsWriter<'a, W> { +impl WriteJs for JsWriter<'_, W> { #[inline] fn increase_indent(&mut self) -> Result { self.indent += 1; @@ -162,42 +161,36 @@ impl<'a, W: Write> WriteJs for JsWriter<'a, W> { } #[inline] - fn write_space(&mut self) -> Result { self.write(None, " ")?; Ok(()) } #[inline] - fn write_keyword(&mut self, span: Option, s: &'static str) -> Result { self.write(span, s)?; Ok(()) } #[inline] - fn write_operator(&mut self, span: Option, s: &str) -> Result { self.write(span, s)?; Ok(()) } #[inline] - fn write_param(&mut self, s: &str) -> Result { self.write(None, s)?; Ok(()) } #[inline] - fn write_property(&mut self, s: &str) -> Result { self.write(None, s)?; Ok(()) } #[inline] - fn write_line(&mut self) -> Result { let pending = self.pending_srcmap.take(); if !self.line_start { @@ -217,7 +210,6 @@ impl<'a, W: Write> WriteJs for JsWriter<'a, W> { } #[inline] - fn write_lit(&mut self, span: Span, s: &str) -> Result { if !s.is_empty() { self.srcmap(span.lo()); @@ -229,14 +221,12 @@ impl<'a, W: Write> WriteJs for JsWriter<'a, W> { } #[inline] - fn write_comment(&mut self, s: &str) -> Result { self.write(None, s)?; Ok(()) } #[inline] - fn write_str_lit(&mut self, span: Span, s: &str) -> Result { if !s.is_empty() { self.srcmap(span.lo()); @@ -248,34 +238,29 @@ impl<'a, W: Write> WriteJs for JsWriter<'a, W> { } #[inline] - fn write_str(&mut self, s: &str) -> Result { self.write(None, s)?; Ok(()) } #[inline] - fn write_symbol(&mut self, span: Span, s: &str) -> Result { self.write(Some(span), s)?; Ok(()) } #[inline] - fn write_punct(&mut self, span: Option, s: &'static str) -> Result { self.write(span, s)?; Ok(()) } #[inline] - fn care_about_srcmap(&self) -> bool { self.srcmap.is_some() } #[inline] - fn add_srcmap(&mut self, pos: BytePos) -> Result { if self.srcmap.is_some() { if self.line_start { @@ -288,7 +273,6 @@ impl<'a, W: Write> WriteJs for JsWriter<'a, W> { } #[inline] - fn commit_pending_semi(&mut self) -> Result { Ok(()) } diff --git a/crates/swc_ecma_codegen/src/typescript.rs b/crates/swc_ecma_codegen/src/typescript.rs index 4ea304842ffb3..73f9900d3bf61 100644 --- a/crates/swc_ecma_codegen/src/typescript.rs +++ b/crates/swc_ecma_codegen/src/typescript.rs @@ -5,7 +5,7 @@ use swc_ecma_codegen_macros::emitter; use super::{Emitter, Result}; use crate::text_writer::WriteJs; -impl<'a, W, S: SourceMapper + SourceMapperExt> Emitter<'a, W, S> +impl Emitter<'_, W, S> where W: WriteJs, { diff --git a/crates/swc_ecma_compat_bugfixes/src/async_arrows_in_class.rs b/crates/swc_ecma_compat_bugfixes/src/async_arrows_in_class.rs index dbe5e3fc57c5a..6d2bbc251af20 100644 --- a/crates/swc_ecma_compat_bugfixes/src/async_arrows_in_class.rs +++ b/crates/swc_ecma_compat_bugfixes/src/async_arrows_in_class.rs @@ -5,6 +5,8 @@ use swc_ecma_utils::prepend_stmt; use swc_ecma_visit::{standard_only_fold, Fold, FoldWith, InjectVars}; use swc_trace_macro::swc_trace; +/// A bugfix pass for Safari 10.3. +/// /// Safari 10.3 had an issue where async arrow function expressions within any /// class method would throw. After an initial fix, any references to the /// instance via `this` within those methods would also throw. This is fixed by diff --git a/crates/swc_ecma_compat_bugfixes/src/edge_default_param.rs b/crates/swc_ecma_compat_bugfixes/src/edge_default_param.rs index e3cf349ebd989..4c04127b090b5 100644 --- a/crates/swc_ecma_compat_bugfixes/src/edge_default_param.rs +++ b/crates/swc_ecma_compat_bugfixes/src/edge_default_param.rs @@ -2,6 +2,8 @@ use swc_ecma_ast::*; use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; use swc_trace_macro::swc_trace; +/// A bugfix pass for Edge. +/// /// Converts destructured parameters with default values to non-shorthand /// syntax. This fixes the only arguments-related bug in ES Modules-supporting /// browsers (Edge 16 & 17). Use this plugin instead of diff --git a/crates/swc_ecma_compat_es2015/src/block_scoping/mod.rs b/crates/swc_ecma_compat_es2015/src/block_scoping/mod.rs index e31f0ce0549a1..4391039f88ca6 100644 --- a/crates/swc_ecma_compat_es2015/src/block_scoping/mod.rs +++ b/crates/swc_ecma_compat_es2015/src/block_scoping/mod.rs @@ -665,7 +665,7 @@ enum Label { Continue(Ident), } -impl<'a> FlowHelper<'a> { +impl FlowHelper<'_> { fn check(&mut self, i: Id) { if self.all.contains(&i) { self.mutated.insert( diff --git a/crates/swc_ecma_compat_es2015/src/classes/constructor.rs b/crates/swc_ecma_compat_es2015/src/classes/constructor.rs index bcb24920c5360..386de3f2160cb 100644 --- a/crates/swc_ecma_compat_es2015/src/classes/constructor.rs +++ b/crates/swc_ecma_compat_es2015/src/classes/constructor.rs @@ -522,11 +522,10 @@ fn is_spread_arguements(args: &[ExprOrSpread]) -> bool { return false; } - return arg - .expr + arg.expr .as_ident() .filter(|ident| ident.sym == *"arguments") - .is_some(); + .is_some() } trait SuperLastCall { diff --git a/crates/swc_ecma_compat_es2015/src/duplicate_keys.rs b/crates/swc_ecma_compat_es2015/src/duplicate_keys.rs index 370298228829d..0fe2d99392c97 100644 --- a/crates/swc_ecma_compat_es2015/src/duplicate_keys.rs +++ b/crates/swc_ecma_compat_es2015/src/duplicate_keys.rs @@ -89,7 +89,7 @@ struct PropNameFolder<'a> { } #[swc_trace] -impl<'a> VisitMut for PropNameFolder<'a> { +impl VisitMut for PropNameFolder<'_> { noop_visit_mut_type!(fail); fn visit_mut_expr(&mut self, _: &mut Expr) {} diff --git a/crates/swc_ecma_compat_es2015/src/generator.rs b/crates/swc_ecma_compat_es2015/src/generator.rs index 422224b5fb8ed..346e0c660f918 100644 --- a/crates/swc_ecma_compat_es2015/src/generator.rs +++ b/crates/swc_ecma_compat_es2015/src/generator.rs @@ -290,7 +290,6 @@ struct LoopBlock { } /// a generated block associated with a 'with' statement - #[allow(unused)] #[derive(Debug)] struct WithBlock { diff --git a/crates/swc_ecma_compat_es2015/src/regenerator/mod.rs b/crates/swc_ecma_compat_es2015/src/regenerator/mod.rs index adc0cf76cd4e9..8b8568e965f56 100644 --- a/crates/swc_ecma_compat_es2015/src/regenerator/mod.rs +++ b/crates/swc_ecma_compat_es2015/src/regenerator/mod.rs @@ -4,7 +4,6 @@ use swc_config::merge::Merge; #[derive(Debug, Default, Clone, Serialize, Deserialize, Merge)] #[serde(rename_all = "camelCase")] - pub struct Config { /// Import path used instead of `regenerator-runtime` #[serde(default)] diff --git a/crates/swc_ecma_compat_es2022/src/class_properties/class_name_tdz.rs b/crates/swc_ecma_compat_es2022/src/class_properties/class_name_tdz.rs index c16daa95f60bf..3302d644fc8a9 100644 --- a/crates/swc_ecma_compat_es2022/src/class_properties/class_name_tdz.rs +++ b/crates/swc_ecma_compat_es2022/src/class_properties/class_name_tdz.rs @@ -10,7 +10,7 @@ pub(super) struct ClassNameTdzFolder<'a> { } #[swc_trace] -impl<'a> VisitMut for ClassNameTdzFolder<'a> { +impl VisitMut for ClassNameTdzFolder<'_> { noop_visit_mut_type!(fail); fn visit_mut_expr(&mut self, expr: &mut Expr) { diff --git a/crates/swc_ecma_compat_es2022/src/class_properties/private_field.rs b/crates/swc_ecma_compat_es2022/src/class_properties/private_field.rs index 28ec3860ce8f6..c729894c923d9 100644 --- a/crates/swc_ecma_compat_es2022/src/class_properties/private_field.rs +++ b/crates/swc_ecma_compat_es2022/src/class_properties/private_field.rs @@ -204,7 +204,7 @@ macro_rules! take_vars { // super.#sdsa is invalid #[swc_trace] -impl<'a> VisitMut for PrivateAccessVisitor<'a> { +impl VisitMut for PrivateAccessVisitor<'_> { noop_visit_mut_type!(fail); take_vars!(visit_mut_function, Function); @@ -587,7 +587,7 @@ pub(super) fn visit_private_in_expr( } #[swc_trace] -impl<'a> PrivateAccessVisitor<'a> { +impl PrivateAccessVisitor<'_> { /// Returns `(expr, thisObject)` /// /// - `obj_alias`: If alias is already declared, this method will use diff --git a/crates/swc_ecma_compat_es2022/src/class_properties/used_name.rs b/crates/swc_ecma_compat_es2022/src/class_properties/used_name.rs index bcaef8a733a7f..1bbdd3329f01d 100644 --- a/crates/swc_ecma_compat_es2022/src/class_properties/used_name.rs +++ b/crates/swc_ecma_compat_es2022/src/class_properties/used_name.rs @@ -15,7 +15,7 @@ macro_rules! noop { } #[swc_trace] -impl<'a> Visit for UsedNameCollector<'a> { +impl Visit for UsedNameCollector<'_> { noop_visit_type!(fail); noop!(visit_arrow_expr, ArrowExpr); diff --git a/crates/swc_ecma_lints/src/rules/radix.rs b/crates/swc_ecma_lints/src/rules/radix.rs index 107dd4fa086de..ded6ee27308de 100644 --- a/crates/swc_ecma_lints/src/rules/radix.rs +++ b/crates/swc_ecma_lints/src/rules/radix.rs @@ -131,7 +131,7 @@ impl Radix { return; } - if call_expr.args.first().is_none() { + if call_expr.args.is_empty() { self.emit_report(call_expr.span, MISSING_PARAMS_MESSAGE, None); return; diff --git a/crates/swc_ecma_minifier/src/compress/mod.rs b/crates/swc_ecma_minifier/src/compress/mod.rs index 66424e526a97c..af294241e8ba5 100644 --- a/crates/swc_ecma_minifier/src/compress/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/mod.rs @@ -364,7 +364,7 @@ impl VisitMut for Compressor<'_> { struct DebugUsingDisplay<'a>(pub &'a str); #[cfg(feature = "debug")] -impl<'a> Debug for DebugUsingDisplay<'a> { +impl Debug for DebugUsingDisplay<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { Display::fmt(self.0, f) } diff --git a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs index b5ec47e560a96..e097f17082a44 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/inline.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/inline.rs @@ -646,57 +646,55 @@ impl Optimizer<'_> { Decl::Fn(f) if self.options.inline >= 2 && f.ident.sym != *"arguments" => { self.vars.inline_with_multi_replacer(&mut f.function.body); - match &f.function.body { - Some(body) => { - if !usage.used_recursively - // only callees can be inlined multiple times - && usage.callee_count > 0 - // prefer single inline - && usage.ref_count > 1 - && self.is_fn_body_simple_enough_to_inline( - body, - f.function.params.len(), - usage, - ) + if let Some(body) = &f.function.body { + if !usage.used_recursively + // only callees can be inlined multiple times + && usage.callee_count > 0 + // prefer single inline + && usage.ref_count > 1 + && self.is_fn_body_simple_enough_to_inline( + body, + f.function.params.len(), + usage, + ) + { + if f.function + .params + .iter() + .any(|param| matches!(param.pat, Pat::Rest(..) | Pat::Assign(..))) { - if f.function.params.iter().any(|param| { - matches!(param.pat, Pat::Rest(..) | Pat::Assign(..)) - }) { - return; - } - trace_op!( - "inline: Decided to inline function '{}{:?}' as it's very \ - simple", - f.ident.sym, - f.ident.ctxt - ); - - for i in collect_infects_from( - &f.function, - AliasConfig { - marks: Some(self.marks), - ignore_nested: false, - need_all: true, - }, - ) { - if let Some(usage) = self.data.vars.get_mut(&i.0) { - usage.ref_count += 1; - } + return; + } + trace_op!( + "inline: Decided to inline function '{}{:?}' as it's very simple", + f.ident.sym, + f.ident.ctxt + ); + + for i in collect_infects_from( + &f.function, + AliasConfig { + marks: Some(self.marks), + ignore_nested: false, + need_all: true, + }, + ) { + if let Some(usage) = self.data.vars.get_mut(&i.0) { + usage.ref_count += 1; } + } - self.vars.simple_functions.insert( - i.to_id(), - FnExpr { - ident: None, - function: f.function.clone(), - } - .into(), - ); + self.vars.simple_functions.insert( + i.to_id(), + FnExpr { + ident: None, + function: f.function.clone(), + } + .into(), + ); - return; - } + return; } - None => {} } } _ => {} diff --git a/crates/swc_ecma_minifier/src/compress/optimize/loops.rs b/crates/swc_ecma_minifier/src/compress/optimize/loops.rs index e9e48e31c0af0..7902d14d2369a 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/loops.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/loops.rs @@ -136,8 +136,8 @@ impl Optimizer<'_> { return; } - match &mut s.init { - Some(init) => match init { + if let Some(init) = &mut s.init { + match init { VarDeclOrExpr::VarDecl(_) => {} VarDeclOrExpr::Expr(init) => { let new = self.ignore_return_value(init); @@ -151,8 +151,7 @@ impl Optimizer<'_> { ); } } - }, - None => {} + } } } } diff --git a/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs b/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs index 153f4d1ec5fb0..893f2267319bd 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/sequences.rs @@ -1840,20 +1840,15 @@ impl Optimizer<'_> { } Expr::Array(b) => { - for elem in &mut b.elems { - match elem { - Some(elem) => { - trace_op!("seq: Try element of array"); - if self.merge_sequential_expr(a, &mut elem.expr)? { - return Ok(true); - } + for elem in b.elems.iter_mut().flatten() { + trace_op!("seq: Try element of array"); + if self.merge_sequential_expr(a, &mut elem.expr)? { + return Ok(true); + } - if !self.is_skippable_for_seq(Some(a), &elem.expr) { - // To preserve side-effects, we need to abort. - break; - } - } - None => {} + if !self.is_skippable_for_seq(Some(a), &elem.expr) { + // To preserve side-effects, we need to abort. + break; } } @@ -2088,7 +2083,6 @@ impl Optimizer<'_> { /// is same as /// /// console.log(++c) - fn replace_seq_update(&mut self, a: &mut Mergable, b: &mut Expr) -> Result { if !self.options.sequences() { return Ok(false); diff --git a/crates/swc_ecma_minifier/src/compress/optimize/unused.rs b/crates/swc_ecma_minifier/src/compress/optimize/unused.rs index f4694882fd0ed..e3d312a70b38e 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/unused.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/unused.rs @@ -356,19 +356,16 @@ impl Optimizer<'_> { Pat::Array(arr) => { for (idx, arr_elem) in arr.elems.iter_mut().enumerate() { - match arr_elem { - Some(p) => { - let elem = init - .as_mut() - .and_then(|expr| self.access_numeric_property(expr, idx)); + if let Some(p) = arr_elem { + let elem = init + .as_mut() + .and_then(|expr| self.access_numeric_property(expr, idx)); - self.take_pat_if_unused(p, elem, is_var_decl); + self.take_pat_if_unused(p, elem, is_var_decl); - if p.is_invalid() { - *arr_elem = None; - } + if p.is_invalid() { + *arr_elem = None; } - None => {} } } diff --git a/crates/swc_ecma_minifier/src/compress/optimize/util.rs b/crates/swc_ecma_minifier/src/compress/optimize/util.rs index a045a5864bd1d..1e046dd834c6f 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/util.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/util.rs @@ -241,7 +241,7 @@ impl Parallel for Finalizer<'_> { } } -impl<'a> Finalizer<'a> { +impl Finalizer<'_> { fn var(&mut self, i: &Id, mode: FinalizerMode) -> Option> { let mut e = match mode { FinalizerMode::Callee => { diff --git a/crates/swc_ecma_minifier/src/compress/pure/dead_code.rs b/crates/swc_ecma_minifier/src/compress/pure/dead_code.rs index 1779fef18a3cb..1e58824e79e39 100644 --- a/crates/swc_ecma_minifier/src/compress/pure/dead_code.rs +++ b/crates/swc_ecma_minifier/src/compress/pure/dead_code.rs @@ -613,24 +613,18 @@ impl Visit for LabelFinder<'_> { noop_visit_type!(); fn visit_break_stmt(&mut self, s: &BreakStmt) { - match &s.label { - Some(label) => { - if label.sym == self.label.sym { - self.found = true; - } + if let Some(label) = &s.label { + if label.sym == self.label.sym { + self.found = true; } - None => {} } } fn visit_continue_stmt(&mut self, s: &ContinueStmt) { - match &s.label { - Some(label) => { - if label.sym == self.label.sym { - self.found = true; - } + if let Some(label) = &s.label { + if label.sym == self.label.sym { + self.found = true; } - None => {} } } } diff --git a/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs b/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs index 8ae04866645f6..495757bd6ae36 100644 --- a/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs +++ b/crates/swc_ecma_minifier/src/compress/pure/evaluate.rs @@ -297,7 +297,6 @@ impl Pure<'_> { } /// Evaluates method calls of a numeric constant. - pub(super) fn eval_number_method_call(&mut self, e: &mut Expr) { if !self.options.evaluate { return; @@ -385,7 +384,7 @@ impl Pure<'_> { if &*method.sym == "toPrecision" { // TODO: handle num.toPrecision(undefined) - if args.first().is_none() { + if args.is_empty() { // https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number.prototype.toprecision // 2. If precision is undefined, return ! ToString(x). let value = num.value.to_js_string().into(); @@ -435,7 +434,7 @@ impl Pure<'_> { if &*method.sym == "toExponential" { // TODO: handle num.toExponential(undefined) - if args.first().is_none() { + if args.is_empty() { let value = f64_to_exponential(num.value).into(); self.changed = true; 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 d68ab1602ba8b..7c932d5514b05 100644 --- a/crates/swc_ecma_minifier/src/pass/mangle_names/preserver.rs +++ b/crates/swc_ecma_minifier/src/pass/mangle_names/preserver.rs @@ -38,13 +38,13 @@ pub(crate) struct Preserver<'a> { in_top_level: bool, } -impl<'a> Preserver<'a> { +impl Preserver<'_> { fn is_reserved(&self, ident: &Ident) -> bool { self.options.reserved.contains(&ident.sym) } } -impl<'a> Visit for Preserver<'a> { +impl Visit for Preserver<'_> { noop_visit_type!(); fn visit_block_stmt(&mut self, n: &BlockStmt) { diff --git a/crates/swc_ecma_parser/src/lexer/jsx.rs b/crates/swc_ecma_parser/src/lexer/jsx.rs index 117297fa09bb6..b3c8852773c1a 100644 --- a/crates/swc_ecma_parser/src/lexer/jsx.rs +++ b/crates/swc_ecma_parser/src/lexer/jsx.rs @@ -3,7 +3,7 @@ use smartstring::{LazyCompact, SmartString}; use super::*; -impl<'a> Lexer<'a> { +impl Lexer<'_> { pub(super) fn read_jsx_token(&mut self) -> LexResult> { debug_assert!(self.syntax.jsx()); diff --git a/crates/swc_ecma_parser/src/lexer/mod.rs b/crates/swc_ecma_parser/src/lexer/mod.rs index 7a37b549ddee4..31bb91f29d3a6 100644 --- a/crates/swc_ecma_parser/src/lexer/mod.rs +++ b/crates/swc_ecma_parser/src/lexer/mod.rs @@ -640,7 +640,7 @@ impl<'a> Lexer<'a> { } } -impl<'a> Lexer<'a> { +impl Lexer<'_> { #[inline(never)] fn read_slash(&mut self) -> LexResult> { debug_assert_eq!(self.cur(), Some('/')); diff --git a/crates/swc_ecma_parser/src/lexer/number.rs b/crates/swc_ecma_parser/src/lexer/number.rs index c35a837ebfbb8..0a13ff969d46c 100644 --- a/crates/swc_ecma_parser/src/lexer/number.rs +++ b/crates/swc_ecma_parser/src/lexer/number.rs @@ -27,7 +27,7 @@ impl LazyBigInt { } } -impl<'a> Lexer<'a> { +impl Lexer<'_> { /// Reads an integer, octal integer, or floating-point number pub(super) fn read_number( &mut self, diff --git a/crates/swc_ecma_parser/src/lexer/state.rs b/crates/swc_ecma_parser/src/lexer/state.rs index 4d06737f89383..26e307285ebae 100644 --- a/crates/swc_ecma_parser/src/lexer/state.rs +++ b/crates/swc_ecma_parser/src/lexer/state.rs @@ -342,7 +342,7 @@ impl Lexer<'_> { } } -impl<'a> Iterator for Lexer<'a> { +impl Iterator for Lexer<'_> { type Item = TokenAndSpan; fn next(&mut self) -> Option { diff --git a/crates/swc_ecma_parser/src/lexer/tests.rs b/crates/swc_ecma_parser/src/lexer/tests.rs index 613cfccf3b600..4dda678f7ec54 100644 --- a/crates/swc_ecma_parser/src/lexer/tests.rs +++ b/crates/swc_ecma_parser/src/lexer/tests.rs @@ -104,7 +104,7 @@ impl WithSpan for f64 { } } } -impl<'a> WithSpan for &'a str { +impl WithSpan for &str { fn into_token(self) -> Token { Word(Word::Ident(self.into())) } diff --git a/crates/swc_ecma_parser/src/lexer/util.rs b/crates/swc_ecma_parser/src/lexer/util.rs index 9c75644be3c03..0dd8c52a834dd 100644 --- a/crates/swc_ecma_parser/src/lexer/util.rs +++ b/crates/swc_ecma_parser/src/lexer/util.rs @@ -21,7 +21,7 @@ use crate::{ Tokens, }; -impl<'a> Lexer<'a> { +impl Lexer<'_> { pub(super) fn span(&self, start: BytePos) -> Span { let end = self.last_pos(); if cfg!(debug_assertions) && start > end { diff --git a/crates/swc_ecma_parser/src/parser/expr.rs b/crates/swc_ecma_parser/src/parser/expr.rs index bea774b12e558..d727473527a9c 100644 --- a/crates/swc_ecma_parser/src/parser/expr.rs +++ b/crates/swc_ecma_parser/src/parser/expr.rs @@ -1988,7 +1988,6 @@ pub(in crate::parser) enum AssignTargetOrSpread { } /// simple leaf methods. - impl Parser { fn parse_yield_expr(&mut self) -> PResult> { let start = cur_pos!(self); diff --git a/crates/swc_ecma_parser/src/parser/stmt.rs b/crates/swc_ecma_parser/src/parser/stmt.rs index 9762cf12bc5fd..9e6807a0e7ea1 100644 --- a/crates/swc_ecma_parser/src/parser/stmt.rs +++ b/crates/swc_ecma_parser/src/parser/stmt.rs @@ -1472,7 +1472,7 @@ where } } -impl<'a, I: Tokens> StmtLikeParser<'a, Stmt> for Parser { +impl StmtLikeParser<'_, Stmt> for Parser { fn handle_import_export(&mut self, _: bool, _: Vec) -> PResult { let start = cur_pos!(self); if is!(self, "import") && peeked_is!(self, '(') { diff --git a/crates/swc_ecma_parser/src/parser/stmt/module_item.rs b/crates/swc_ecma_parser/src/parser/stmt/module_item.rs index 9022a41dbd173..ebdef4d11d3e1 100644 --- a/crates/swc_ecma_parser/src/parser/stmt/module_item.rs +++ b/crates/swc_ecma_parser/src/parser/stmt/module_item.rs @@ -879,7 +879,7 @@ impl IsDirective for ModuleItem { } } -impl<'a, I: Tokens> StmtLikeParser<'a, ModuleItem> for Parser { +impl StmtLikeParser<'_, ModuleItem> for Parser { fn handle_import_export( &mut self, top_level: bool, diff --git a/crates/swc_ecma_parser/src/parser/typescript.rs b/crates/swc_ecma_parser/src/parser/typescript.rs index 43ebfada133a9..ff6a74b4d81c9 100644 --- a/crates/swc_ecma_parser/src/parser/typescript.rs +++ b/crates/swc_ecma_parser/src/parser/typescript.rs @@ -59,7 +59,6 @@ impl Parser { } /// `tsIsListTerminator` - fn is_ts_list_terminator(&mut self, kind: ParsingContext) -> PResult { debug_assert!(self.input.syntax().typescript()); diff --git a/crates/swc_ecma_parser/src/parser/util.rs b/crates/swc_ecma_parser/src/parser/util.rs index ed018f578440a..6edaaf553d99a 100644 --- a/crates/swc_ecma_parser/src/parser/util.rs +++ b/crates/swc_ecma_parser/src/parser/util.rs @@ -176,19 +176,19 @@ pub struct WithState<'w, I: 'w + Tokens> { inner: &'w mut Parser, orig_state: State, } -impl<'w, I: Tokens> Deref for WithState<'w, I> { +impl Deref for WithState<'_, I> { type Target = Parser; fn deref(&self) -> &Parser { self.inner } } -impl<'w, I: Tokens> DerefMut for WithState<'w, I> { +impl DerefMut for WithState<'_, I> { fn deref_mut(&mut self) -> &mut Parser { self.inner } } -impl<'w, I: Tokens> Drop for WithState<'w, I> { +impl Drop for WithState<'_, I> { fn drop(&mut self) { std::mem::swap(&mut self.inner.state, &mut self.orig_state); } @@ -198,20 +198,20 @@ pub struct WithCtx<'w, I: 'w + Tokens> { inner: &'w mut Parser, orig_ctx: Context, } -impl<'w, I: Tokens> Deref for WithCtx<'w, I> { +impl Deref for WithCtx<'_, I> { type Target = Parser; fn deref(&self) -> &Parser { self.inner } } -impl<'w, I: Tokens> DerefMut for WithCtx<'w, I> { +impl DerefMut for WithCtx<'_, I> { fn deref_mut(&mut self) -> &mut Parser { self.inner } } -impl<'w, I: Tokens> Drop for WithCtx<'w, I> { +impl Drop for WithCtx<'_, I> { fn drop(&mut self) { self.inner.set_ctx(self.orig_ctx); } diff --git a/crates/swc_ecma_preset_env/src/corejs2/mod.rs b/crates/swc_ecma_preset_env/src/corejs2/mod.rs index 0b1d9a677bd8b..5348eef575609 100644 --- a/crates/swc_ecma_preset_env/src/corejs2/mod.rs +++ b/crates/swc_ecma_preset_env/src/corejs2/mod.rs @@ -301,7 +301,6 @@ impl Visit for UsageVisitor { /// /// - `Symbol.iterator in arr` - fn visit_bin_expr(&mut self, e: &BinExpr) { e.visit_children_with(self); diff --git a/crates/swc_ecma_transforms_base/benches/deps.rs b/crates/swc_ecma_transforms_base/benches/deps.rs index e2f1e49d93307..f912b1b2110f0 100644 --- a/crates/swc_ecma_transforms_base/benches/deps.rs +++ b/crates/swc_ecma_transforms_base/benches/deps.rs @@ -63,7 +63,6 @@ fn fold_empty(b: &mut Bencher) { } /// Optimized out - fn fold_noop_impl_all(b: &mut Bencher) { let _ = ::testing::run_test(false, |cm, handler| { let fm = cm.new_source_file(FileName::Anon.into(), SOURCE.into()); @@ -91,7 +90,6 @@ fn fold_noop_impl_all(b: &mut Bencher) { } /// Optimized out - fn fold_noop_impl_vec(b: &mut Bencher) { let _ = ::testing::run_test(false, |cm, handler| { let fm = cm.new_source_file(FileName::Anon.into(), SOURCE.into()); diff --git a/crates/swc_ecma_transforms_base/src/fixer.rs b/crates/swc_ecma_transforms_base/src/fixer.rs index 3b75ffa1f3f92..9c21d8f0ae912 100644 --- a/crates/swc_ecma_transforms_base/src/fixer.rs +++ b/crates/swc_ecma_transforms_base/src/fixer.rs @@ -12,7 +12,6 @@ use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWit /// You don't have to bother to create appropriate parenthesis. /// The pass will insert parenthesis as needed. In other words, it's /// okay to store `a * (b + c)` as `Bin { a * Bin { b + c } }`. - pub fn fixer(comments: Option<&dyn Comments>) -> impl '_ + Fold + VisitMut { as_folder(Fixer { comments, diff --git a/crates/swc_ecma_transforms_base/src/rename/ops.rs b/crates/swc_ecma_transforms_base/src/rename/ops.rs index 54a9ae2ff412e..bd335e694bc50 100644 --- a/crates/swc_ecma_transforms_base/src/rename/ops.rs +++ b/crates/swc_ecma_transforms_base/src/rename/ops.rs @@ -94,7 +94,7 @@ where } } -impl<'a, I> VisitMut for Operator<'a, I> +impl VisitMut for Operator<'_, I> where I: IdentLike, { @@ -102,11 +102,8 @@ where /// Preserve key of properties. fn visit_mut_assign_pat_prop(&mut self, p: &mut AssignPatProp) { - match &mut p.value { - Some(value) => { - value.visit_mut_children_with(self); - } - None => {} + if let Some(value) = &mut p.value { + value.visit_mut_children_with(self); } } @@ -640,7 +637,7 @@ where } } -impl<'a, I> Operator<'a, I> +impl Operator<'_, I> where I: IdentLike, { diff --git a/crates/swc_ecma_transforms_base/src/resolver/mod.rs b/crates/swc_ecma_transforms_base/src/resolver/mod.rs index a4c8c20bee997..599e600409b26 100644 --- a/crates/swc_ecma_transforms_base/src/resolver/mod.rs +++ b/crates/swc_ecma_transforms_base/src/resolver/mod.rs @@ -220,6 +220,7 @@ struct InnerConfig { top_level_mark: Mark, } +#[allow(clippy::needless_lifetimes)] impl<'a> Resolver<'a> { #[cfg(test)] fn new(current: Scope<'a>, config: InnerConfig) -> Self { @@ -443,7 +444,7 @@ macro_rules! noop { }; } -impl<'a> VisitMut for Resolver<'a> { +impl VisitMut for Resolver<'_> { noop!(visit_mut_accessibility, Accessibility); noop!(visit_mut_true_plus_minus, TruePlusMinus); @@ -734,12 +735,9 @@ impl<'a> VisitMut for Resolver<'a> { c.params.visit_mut_with(child); child.ident_type = old; - match &mut c.body { - Some(body) => { - child.mark_block(&mut body.ctxt); - body.visit_mut_children_with(child); - } - None => {} + if let Some(body) = &mut c.body { + child.mark_block(&mut body.ctxt); + body.visit_mut_children_with(child); } }); } @@ -895,22 +893,19 @@ impl<'a> VisitMut for Resolver<'a> { f.return_type.visit_mut_with(self); self.ident_type = IdentType::Ref; - match &mut f.body { - Some(body) => { - self.mark_block(&mut body.ctxt); - let old_strict_mode = self.strict_mode; - if !self.strict_mode { - self.strict_mode = body - .stmts - .first() - .map(|stmt| stmt.is_use_strict()) - .unwrap_or(false); - } - // Prevent creating new scope. - body.visit_mut_children_with(self); - self.strict_mode = old_strict_mode; + if let Some(body) = &mut f.body { + self.mark_block(&mut body.ctxt); + let old_strict_mode = self.strict_mode; + if !self.strict_mode { + self.strict_mode = body + .stmts + .first() + .map(|stmt| stmt.is_use_strict()) + .unwrap_or(false); } - None => {} + // Prevent creating new scope. + body.visit_mut_children_with(self); + self.strict_mode = old_strict_mode; } } diff --git a/crates/swc_ecma_transforms_base/src/tests.rs b/crates/swc_ecma_transforms_base/src/tests.rs index 7f6812b2fe12b..4cff1aefc9449 100644 --- a/crates/swc_ecma_transforms_base/src/tests.rs +++ b/crates/swc_ecma_transforms_base/src/tests.rs @@ -18,7 +18,7 @@ pub struct Tester<'a> { pub comments: Lrc, } -impl<'a> Tester<'a> { +impl Tester<'_> { pub fn run(op: F) where F: FnOnce(&mut Tester<'_>) -> Result<(), ()>, diff --git a/crates/swc_ecma_transforms_classes/src/super_field.rs b/crates/swc_ecma_transforms_classes/src/super_field.rs index abbe7ad5f2882..3bc4b9a26c125 100644 --- a/crates/swc_ecma_transforms_classes/src/super_field.rs +++ b/crates/swc_ecma_transforms_classes/src/super_field.rs @@ -63,7 +63,7 @@ macro_rules! mark_nested { }; } -impl<'a> VisitMut for SuperFieldAccessFolder<'a> { +impl VisitMut for SuperFieldAccessFolder<'_> { noop_visit_mut_type!(fail); // mark_nested!(fold_function, Function); @@ -162,7 +162,7 @@ impl<'a> VisitMut for SuperFieldAccessFolder<'a> { } } -impl<'a> SuperFieldAccessFolder<'a> { +impl SuperFieldAccessFolder<'_> { /// # In /// ```js /// super.foo(a) diff --git a/crates/swc_ecma_transforms_optimization/src/simplify/const_propagation.rs b/crates/swc_ecma_transforms_optimization/src/simplify/const_propagation.rs index 0e60cc295aab0..70edd3c67e363 100644 --- a/crates/swc_ecma_transforms_optimization/src/simplify/const_propagation.rs +++ b/crates/swc_ecma_transforms_optimization/src/simplify/const_propagation.rs @@ -115,8 +115,8 @@ impl VisitMut for ConstPropagation<'_> { if let VarDeclKind::Const = var.kind { for decl in &var.decls { if let Pat::Ident(name) = &decl.name { - match &decl.init { - Some(init) => match &**init { + if let Some(init) = &decl.init { + match &**init { Expr::Lit(Lit::Bool(..)) | Expr::Lit(Lit::Num(..)) | Expr::Lit(Lit::Null(..)) => { @@ -136,8 +136,7 @@ impl VisitMut for ConstPropagation<'_> { } } _ => {} - }, - None => {} + } } } } diff --git a/crates/swc_ecma_transforms_proposal/src/decorators/legacy/metadata.rs b/crates/swc_ecma_transforms_proposal/src/decorators/legacy/metadata.rs index cff47ac53c7ba..cd75e04d5c4ec 100644 --- a/crates/swc_ecma_transforms_proposal/src/decorators/legacy/metadata.rs +++ b/crates/swc_ecma_transforms_proposal/src/decorators/legacy/metadata.rs @@ -584,9 +584,7 @@ fn get_type_ann_of_pat(p: &Pat) -> Option<&TsTypeAnn> { Pat::Array(p) => p.type_ann.as_deref(), Pat::Rest(p) => p.type_ann.as_deref(), Pat::Object(p) => p.type_ann.as_deref(), - Pat::Assign(p) => { - return get_type_ann_of_pat(&p.left); - } + Pat::Assign(p) => get_type_ann_of_pat(&p.left), Pat::Invalid(_) => None, Pat::Expr(_) => None, } diff --git a/crates/swc_ecma_transforms_react/src/pure_annotations/mod.rs b/crates/swc_ecma_transforms_react/src/pure_annotations/mod.rs index 4866d00188138..f16b8ab83817b 100644 --- a/crates/swc_ecma_transforms_react/src/pure_annotations/mod.rs +++ b/crates/swc_ecma_transforms_react/src/pure_annotations/mod.rs @@ -6,6 +6,8 @@ use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWit #[cfg(test)] mod tests; +/// A pass to add a /*#__PURE__#/ annotation to calls to known pure calls. +/// /// This pass adds a /*#__PURE__#/ annotation to calls to known pure top-level /// React methods, so that terser and other minifiers can safely remove them /// during dead code elimination. diff --git a/crates/swc_ecma_transforms_react/src/refresh/hook.rs b/crates/swc_ecma_transforms_react/src/refresh/hook.rs index 19e528cb6e275..b88c89a18b531 100644 --- a/crates/swc_ecma_transforms_react/src/refresh/hook.rs +++ b/crates/swc_ecma_transforms_react/src/refresh/hook.rs @@ -48,7 +48,7 @@ pub struct HookRegister<'a> { pub should_reset: bool, } -impl<'a> HookRegister<'a> { +impl HookRegister<'_> { pub fn gen_hook_handle(&mut self) -> Stmt { VarDecl { span: DUMMY_SP, @@ -206,7 +206,7 @@ impl<'a> HookRegister<'a> { } } -impl<'a> VisitMut for HookRegister<'a> { +impl VisitMut for HookRegister<'_> { noop_visit_mut_type!(); fn visit_mut_block_stmt(&mut self, b: &mut BlockStmt) { @@ -384,7 +384,7 @@ fn is_hook_like(s: &str) -> bool { } } -impl<'a> HookCollector<'a> { +impl HookCollector<'_> { fn get_hook_from_call_expr(&self, expr: &CallExpr, lhs: Option<&Pat>) -> Option { let callee = if let Callee::Expr(callee) = &expr.callee { Some(callee.as_ref()) @@ -452,7 +452,7 @@ impl<'a> HookCollector<'a> { } } -impl<'a> Visit for HookCollector<'a> { +impl Visit for HookCollector<'_> { noop_visit_type!(); fn visit_block_stmt_or_expr(&mut self, _: &BlockStmtOrExpr) {} diff --git a/crates/swc_ecma_transforms_testing/src/babel_like.rs b/crates/swc_ecma_transforms_testing/src/babel_like.rs index d44ae2e303efb..1cd8974c5aa8d 100644 --- a/crates/swc_ecma_transforms_testing/src/babel_like.rs +++ b/crates/swc_ecma_transforms_testing/src/babel_like.rs @@ -26,7 +26,6 @@ pub type PassFactory<'a> = /// /// /// Note: You should **not** use [resolver] by yourself. - pub struct BabelLikeFixtureTest<'a> { input: &'a Path, diff --git a/crates/swc_ecma_transforms_testing/src/lib.rs b/crates/swc_ecma_transforms_testing/src/lib.rs index 251d4943af271..3a5ec07e288f7 100644 --- a/crates/swc_ecma_transforms_testing/src/lib.rs +++ b/crates/swc_ecma_transforms_testing/src/lib.rs @@ -58,7 +58,7 @@ pub struct Tester<'a> { pub comments: Rc, } -impl<'a> Tester<'a> { +impl Tester<'_> { pub fn run(op: F) -> Ret where F: FnOnce(&mut Tester<'_>) -> Result, diff --git a/crates/swc_ecma_transforms_typescript/src/transform.rs b/crates/swc_ecma_transforms_typescript/src/transform.rs index 0a3c6202908b4..7a8de1f0a7bc1 100644 --- a/crates/swc_ecma_transforms_typescript/src/transform.rs +++ b/crates/swc_ecma_transforms_typescript/src/transform.rs @@ -591,7 +591,7 @@ struct InitArg<'a> { namespace_id: Option<&'a Id>, } -impl<'a> InitArg<'a> { +impl InitArg<'_> { // {} fn empty() -> ExprOrSpread { ExprOrSpread { diff --git a/crates/swc_ecma_transforms_typescript/src/ts_enum.rs b/crates/swc_ecma_transforms_typescript/src/ts_enum.rs index 62274c1565320..729e4729605f2 100644 --- a/crates/swc_ecma_transforms_typescript/src/ts_enum.rs +++ b/crates/swc_ecma_transforms_typescript/src/ts_enum.rs @@ -101,7 +101,7 @@ pub(crate) struct EnumValueComputer<'a> { } /// /~https://github.com/microsoft/TypeScript/pull/50528 -impl<'a> EnumValueComputer<'a> { +impl EnumValueComputer<'_> { pub fn compute(&mut self, expr: Box) -> TsEnumRecordValue { let mut expr = self.compute_rec(expr); if let TsEnumRecordValue::Opaque(expr) = &mut expr { @@ -309,7 +309,7 @@ impl<'a> EnumValueComputer<'a> { } } -impl<'a> VisitMut for EnumValueComputer<'a> { +impl VisitMut for EnumValueComputer<'_> { noop_visit_mut_type!(); fn visit_mut_expr(&mut self, expr: &mut Expr) { diff --git a/crates/swc_ecma_usage_analyzer/src/alias/ctx.rs b/crates/swc_ecma_usage_analyzer/src/alias/ctx.rs index ec3d4234c79c8..4ddae23048e09 100644 --- a/crates/swc_ecma_usage_analyzer/src/alias/ctx.rs +++ b/crates/swc_ecma_usage_analyzer/src/alias/ctx.rs @@ -25,7 +25,7 @@ pub(super) struct WithCtx<'a, 'b> { orig_ctx: Ctx, } -impl<'a, 'b> Deref for WithCtx<'a, 'b> { +impl<'b> Deref for WithCtx<'_, 'b> { type Target = InfectionCollector<'b>; fn deref(&self) -> &Self::Target { @@ -33,7 +33,7 @@ impl<'a, 'b> Deref for WithCtx<'a, 'b> { } } -impl<'a, 'b> DerefMut for WithCtx<'a, 'b> { +impl DerefMut for WithCtx<'_, '_> { fn deref_mut(&mut self) -> &mut Self::Target { self.analyzer } diff --git a/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs b/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs index 785226e3b81c5..37d3eb8a66998 100644 --- a/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs +++ b/crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs @@ -859,13 +859,10 @@ where .with_child(n.ctxt, ScopeKind::Fn, |child| { n.params.visit_with(child); - match &n.body { - Some(body) => { - // We use visit_children_with instead of visit_with to bypass block scope - // handler. - body.visit_children_with(child); - } - None => {} + if let Some(body) = &n.body { + // We use visit_children_with instead of visit_with to bypass block scope + // handler. + body.visit_children_with(child); } }) } diff --git a/crates/swc_ecma_utils/src/function/fn_env_hoister.rs b/crates/swc_ecma_utils/src/function/fn_env_hoister.rs index 32add81df5ae3..c5b140cb6b336 100644 --- a/crates/swc_ecma_utils/src/function/fn_env_hoister.rs +++ b/crates/swc_ecma_utils/src/function/fn_env_hoister.rs @@ -602,7 +602,7 @@ struct InitThis<'a> { } // babel is skip function and class property -impl<'a> VisitMut for InitThis<'a> { +impl VisitMut for InitThis<'_> { noop_visit_mut_type!(fail); fn visit_mut_class(&mut self, _: &mut Class) {} diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs index 0a5ad11788820..9de7b817aef26 100644 --- a/crates/swc_ecma_utils/src/lib.rs +++ b/crates/swc_ecma_utils/src/lib.rs @@ -2418,7 +2418,7 @@ pub struct IdentUsageFinder<'a> { found: bool, } -impl<'a> Visit for IdentUsageFinder<'a> { +impl Visit for IdentUsageFinder<'_> { noop_visit_type!(); visit_obj_and_computed!(); @@ -2666,7 +2666,6 @@ pub fn prop_name_eq(p: &PropName, key: &str) -> bool { /// Replace all `from` in `expr` with `to`. /// /// # Usage - /// /// ```ignore /// replace_ident(&mut dec.expr, cls_name.to_id(), alias); @@ -2952,7 +2951,6 @@ pub fn contains_top_level_await>(t: &V) -> bool { /// /// This visitor modifies [SyntaxContext] while preserving the symbol of /// [Ident]s. - pub struct Remapper<'a> { vars: &'a FxHashMap, } diff --git a/crates/swc_ecma_utils/src/node_ignore_span.rs b/crates/swc_ecma_utils/src/node_ignore_span.rs index 2e04f34156f09..72e526b4a6d4f 100644 --- a/crates/swc_ecma_utils/src/node_ignore_span.rs +++ b/crates/swc_ecma_utils/src/node_ignore_span.rs @@ -6,7 +6,7 @@ use swc_ecma_ast::{Expr, MemberProp}; /// A newtype that will ignore Span while doing `eq` or `hash`. pub struct NodeIgnoringSpan<'a, Node: ToOwned + Debug>(Cow<'a, Node>); -impl<'a, Node: ToOwned + Debug> Debug for NodeIgnoringSpan<'a, Node> { +impl Debug for NodeIgnoringSpan<'_, Node> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_tuple("NodeIgnoringSpan").field(&*self.0).finish() } @@ -24,17 +24,17 @@ impl<'a, Node: ToOwned + Debug> NodeIgnoringSpan<'a, Node> { } } -impl<'a, Node: EqIgnoreSpan + ToOwned + Debug> PartialEq for NodeIgnoringSpan<'a, Node> { +impl PartialEq for NodeIgnoringSpan<'_, Node> { fn eq(&self, other: &Self) -> bool { self.0.eq_ignore_span(&other.0) } } -impl<'a, Node: EqIgnoreSpan + ToOwned + Debug> Eq for NodeIgnoringSpan<'a, Node> {} +impl Eq for NodeIgnoringSpan<'_, Node> {} // TODO: This is only a workaround for Expr. we need something like // `hash_ignore_span` for each node in the end. -impl<'a> Hash for NodeIgnoringSpan<'a, Expr> { +impl Hash for NodeIgnoringSpan<'_, Expr> { fn hash(&self, state: &mut H) { // In pratice, most of cases/input we are dealing with are Expr::Member or // Expr::Ident. diff --git a/crates/swc_ecma_utils/src/var.rs b/crates/swc_ecma_utils/src/var.rs index ea000b1d06581..f84130a0c772b 100644 --- a/crates/swc_ecma_utils/src/var.rs +++ b/crates/swc_ecma_utils/src/var.rs @@ -9,7 +9,7 @@ pub struct VarCollector<'a, I: IdentLike> { pub to: &'a mut Vec, } -impl<'a, I: IdentLike> Visit for VarCollector<'a, I> { +impl Visit for VarCollector<'_, I> { noop_visit_type!(fail); fn visit_arrow_expr(&mut self, _: &ArrowExpr) {} diff --git a/crates/swc_ecma_visit/src/lib.rs b/crates/swc_ecma_visit/src/lib.rs index c57f156c6747e..3f3c7a406a2db 100644 --- a/crates/swc_ecma_visit/src/lib.rs +++ b/crates/swc_ecma_visit/src/lib.rs @@ -215,6 +215,8 @@ where } } +/// Wrap a [VisitMut] as a [Fold]. +/// /// The returned folder only handles `fold_script` and `fold_module`, and /// typescript nodes are ignored. So if your visitor needs to handle typescript /// or low-level nodes, you should use [as_folder] instead. diff --git a/crates/swc_ecma_visit/tests/main.rs b/crates/swc_ecma_visit/tests/main.rs index b5cfb56c35304..0fa7bf3e8e66e 100644 --- a/crates/swc_ecma_visit/tests/main.rs +++ b/crates/swc_ecma_visit/tests/main.rs @@ -7,7 +7,7 @@ fn should_visit_program() { struct Pass1<'a>(&'a mut usize); struct Pass2; - impl<'a> Visit for Pass1<'a> { + impl Visit for Pass1<'_> { fn visit_program(&mut self, _program: &Program) { *self.0 += 1; } diff --git a/crates/swc_fast_graph/src/digraph.rs b/crates/swc_fast_graph/src/digraph.rs index e09139c5175ce..420f76d6b9b12 100644 --- a/crates/swc_fast_graph/src/digraph.rs +++ b/crates/swc_fast_graph/src/digraph.rs @@ -526,7 +526,7 @@ where ty: PhantomData, } -impl<'a, N, Ty> Iterator for Neighbors<'a, N, Ty> +impl Iterator for Neighbors<'_, N, Ty> where N: NodeTrait, Ty: EdgeType, @@ -555,7 +555,7 @@ where ty: PhantomData, } -impl<'a, N, Ty> Iterator for NeighborsDirected<'a, N, Ty> +impl Iterator for NeighborsDirected<'_, N, Ty> where N: NodeTrait, Ty: EdgeType, @@ -742,8 +742,8 @@ where /// with the `Cell` being `TypedArena` allocated. pub struct Ptr<'b, T: 'b>(pub &'b T); -impl<'b, T> Copy for Ptr<'b, T> {} -impl<'b, T> Clone for Ptr<'b, T> { +impl Copy for Ptr<'_, T> {} +impl Clone for Ptr<'_, T> { fn clone(&self) -> Self { *self } @@ -776,7 +776,7 @@ impl<'b, T> Ord for Ptr<'b, T> { } } -impl<'b, T> Deref for Ptr<'b, T> { +impl Deref for Ptr<'_, T> { type Target = T; fn deref(&self) -> &T { @@ -784,16 +784,16 @@ impl<'b, T> Deref for Ptr<'b, T> { } } -impl<'b, T> Eq for Ptr<'b, T> {} +impl Eq for Ptr<'_, T> {} -impl<'b, T> Hash for Ptr<'b, T> { +impl Hash for Ptr<'_, T> { fn hash(&self, st: &mut H) { let ptr = (self.0) as *const T; ptr.hash(st) } } -impl<'b, T: fmt::Debug> fmt::Debug for Ptr<'b, T> { +impl fmt::Debug for Ptr<'_, T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.0.fmt(f) } diff --git a/crates/swc_html_codegen/src/ctx.rs b/crates/swc_html_codegen/src/ctx.rs index d7f3ced9b1bfb..2ca8414a1dfdd 100644 --- a/crates/swc_html_codegen/src/ctx.rs +++ b/crates/swc_html_codegen/src/ctx.rs @@ -43,7 +43,7 @@ impl<'w, I: HtmlWriter> DerefMut for WithCtx<'_, 'w, I> { } } -impl<'w, I: HtmlWriter> Drop for WithCtx<'_, 'w, I> { +impl Drop for WithCtx<'_, '_, I> { fn drop(&mut self) { self.inner.ctx = self.orig_ctx; } diff --git a/crates/swc_html_codegen/src/lib.rs b/crates/swc_html_codegen/src/lib.rs index 115a1242150d8..b335d0bd2c68d 100644 --- a/crates/swc_html_codegen/src/lib.rs +++ b/crates/swc_html_codegen/src/lib.rs @@ -977,9 +977,9 @@ fn minify_attribute_value(value: &str, quotes: bool) -> (Cow<'_, str>, Option sq { - return (Cow::Owned(minified.replace('\'', "'")), Some('\'')); + (Cow::Owned(minified.replace('\'', "'")), Some('\'')) } else { - return (Cow::Owned(minified.replace('"', """)), Some('"')); + (Cow::Owned(minified.replace('"', """)), Some('"')) } } diff --git a/crates/swc_html_parser/src/parser/mod.rs b/crates/swc_html_parser/src/parser/mod.rs index d9e9374d6e3cf..f731a15b073cc 100644 --- a/crates/swc_html_parser/src/parser/mod.rs +++ b/crates/swc_html_parser/src/parser/mod.rs @@ -8220,7 +8220,7 @@ where } // 2.4 // Fragment case - else if last_table.is_none() && self.open_elements_stack.items.first().is_some() { + else if last_table.is_none() && !self.open_elements_stack.items.is_empty() { let first = if let Some(first) = self.open_elements_stack.items.first() { first.clone() } else { diff --git a/crates/swc_macros_common/src/binder.rs b/crates/swc_macros_common/src/binder.rs index b4ebee7259792..a7a338fb55d5b 100644 --- a/crates/swc_macros_common/src/binder.rs +++ b/crates/swc_macros_common/src/binder.rs @@ -280,7 +280,7 @@ pub struct BindedField<'a> { field: &'a Field, } -impl<'a> BindedField<'a> { +impl BindedField<'_> { pub const fn idx(&self) -> usize { self.idx } @@ -295,7 +295,7 @@ impl<'a> BindedField<'a> { } } -impl<'a> ToTokens for BindedField<'a> { +impl ToTokens for BindedField<'_> { fn to_tokens(&self, t: &mut TokenStream) { self.binded_ident.to_tokens(t) } diff --git a/crates/swc_macros_common/src/derive/generics.rs b/crates/swc_macros_common/src/derive/generics.rs index d6bd4f42f23b8..1990256669666 100644 --- a/crates/swc_macros_common/src/derive/generics.rs +++ b/crates/swc_macros_common/src/derive/generics.rs @@ -12,7 +12,7 @@ impl<'a> Derive<'a> { is_generic: bool, } - impl<'a, 'b> Visit<'a> for TypeVisitor<'b> { + impl Visit<'_> for TypeVisitor<'_> { fn visit_path(&mut self, path: &Path) { if let Some(seg) = path.segments.last() { if seg.ident == "PhantomData" { diff --git a/crates/swc_plugin/src/pseudo_scoped_key.rs b/crates/swc_plugin/src/pseudo_scoped_key.rs index 844b769f659ce..373802592322c 100644 --- a/crates/swc_plugin/src/pseudo_scoped_key.rs +++ b/crates/swc_plugin/src/pseudo_scoped_key.rs @@ -1,6 +1,7 @@ use once_cell::sync::OnceCell; /// Simple substitution for scoped_thread_local with limited interface parity. +/// /// The only available fn in this struct is `with`, which is being used for the /// consumers when they need to access global scope handler (HANDLER.with()). /// Any other interfaces to support thread local is not available. diff --git a/crates/swc_typescript/src/fast_dts/mod.rs b/crates/swc_typescript/src/fast_dts/mod.rs index 0514ef67365d0..3403619bd3d26 100644 --- a/crates/swc_typescript/src/fast_dts/mod.rs +++ b/crates/swc_typescript/src/fast_dts/mod.rs @@ -22,7 +22,6 @@ use crate::diagnostic::{DtsIssue, SourceRange}; /// Mostly copied from /// /// The original code is MIT licensed. - pub struct FastDts { filename: Arc, is_top_level: bool, diff --git a/crates/swc_xml_codegen/src/ctx.rs b/crates/swc_xml_codegen/src/ctx.rs index 2eff2442fbc26..b5ab04ff6e0e9 100644 --- a/crates/swc_xml_codegen/src/ctx.rs +++ b/crates/swc_xml_codegen/src/ctx.rs @@ -43,7 +43,7 @@ impl<'w, I: XmlWriter> DerefMut for WithCtx<'_, 'w, I> { } } -impl<'w, I: XmlWriter> Drop for WithCtx<'_, 'w, I> { +impl Drop for WithCtx<'_, '_, I> { fn drop(&mut self) { self.inner.ctx = self.orig_ctx; } diff --git a/crates/testing/src/lib.rs b/crates/testing/src/lib.rs index 219416edf5521..62870370adbe6 100644 --- a/crates/testing/src/lib.rs +++ b/crates/testing/src/lib.rs @@ -300,7 +300,7 @@ pub fn diff(l: &str, r: &str) -> String { #[derive(PartialEq, Eq)] pub struct DebugUsingDisplay<'a>(pub &'a str); -impl<'a> Debug for DebugUsingDisplay<'a> { +impl Debug for DebugUsingDisplay<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { Display::fmt(self.0, f) } diff --git a/rust-toolchain b/rust-toolchain index 5eeb3a4d02746..41a7a696d7353 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-07-21 \ No newline at end of file +nightly-2024-10-07 \ No newline at end of file diff --git a/tools/swc-releaser/src/main.rs b/tools/swc-releaser/src/main.rs index 34c9b59bc6fd9..07d916dde8df2 100644 --- a/tools/swc-releaser/src/main.rs +++ b/tools/swc-releaser/src/main.rs @@ -173,7 +173,7 @@ struct Bump<'a> { new_versions: &'a mut VersionMap, } -impl<'a> Bump<'a> { +impl Bump<'_> { fn is_breaking(&self, pkg_name: &str, change_type: Option<&ChangeType>) -> Result { let original_version = self .versions From 62edb3628b26036cdc767b31d59e109c3970497c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 8 Oct 2024 15:35:55 +0900 Subject: [PATCH 6/9] feat(bindings/html): Accept `Buffer|string` instead of `Buffer` (#9625) --- bindings/binding_html_node/src/lib.rs | 30 ++++++++++++++++++++------- packages/html/binding.d.ts | 11 ++++++---- packages/html/index.ts | 13 +++++------- packages/html/package.json | 4 ++-- 4 files changed, 36 insertions(+), 22 deletions(-) diff --git a/bindings/binding_html_node/src/lib.rs b/bindings/binding_html_node/src/lib.rs index 473f1e6e8eb72..c3418a7d38913 100644 --- a/bindings/binding_html_node/src/lib.rs +++ b/bindings/binding_html_node/src/lib.rs @@ -694,10 +694,21 @@ fn minify_inner( }) } +fn to_string(code: Either) -> String { + match code { + Either::A(code) => String::from_utf8_lossy(code.as_ref()).to_string(), + Either::B(code) => code, + } +} + #[allow(unused)] #[napi] -fn minify(code: Buffer, opts: Buffer, signal: Option) -> AsyncTask { - let code = String::from_utf8_lossy(code.as_ref()).to_string(); +fn minify( + code: Either, + opts: Buffer, + signal: Option, +) -> AsyncTask { + let code = to_string(code); let options = String::from_utf8_lossy(opts.as_ref()).to_string(); let task = MinifyTask { @@ -712,11 +723,11 @@ fn minify(code: Buffer, opts: Buffer, signal: Option) -> AsyncTask< #[allow(unused)] #[napi] fn minify_fragment( - code: Buffer, + code: Either, opts: Buffer, signal: Option, ) -> AsyncTask { - let code = String::from_utf8_lossy(code.as_ref()).to_string(); + let code = to_string(code); let options = String::from_utf8_lossy(opts.as_ref()).to_string(); let task = MinifyTask { @@ -730,8 +741,8 @@ fn minify_fragment( #[allow(unused)] #[napi] -pub fn minify_sync(code: Buffer, opts: Buffer) -> napi::Result { - let code = String::from_utf8_lossy(code.as_ref()); +pub fn minify_sync(code: Either, opts: Buffer) -> napi::Result { + let code = to_string(code); let options = get_deserialized(opts)?; minify_inner(&code, options, false).convert_err() @@ -739,8 +750,11 @@ pub fn minify_sync(code: Buffer, opts: Buffer) -> napi::Result #[allow(unused)] #[napi] -pub fn minify_fragment_sync(code: Buffer, opts: Buffer) -> napi::Result { - let code = String::from_utf8_lossy(code.as_ref()); +pub fn minify_fragment_sync( + code: Either, + opts: Buffer, +) -> napi::Result { + let code = to_string(code); let options = get_deserialized(opts)?; minify_inner(&code, options, true).convert_err() diff --git a/packages/html/binding.d.ts b/packages/html/binding.d.ts index 60d43a4406764..74967e32462f9 100644 --- a/packages/html/binding.d.ts +++ b/packages/html/binding.d.ts @@ -22,23 +22,26 @@ export interface Element { } export declare function minify( - code: Buffer, + code: Buffer | string, opts: Buffer, signal?: AbortSignal | undefined | null ): Promise; export declare function minifyFragment( - code: Buffer, + code: Buffer | string, opts: Buffer, signal?: AbortSignal | undefined | null ): Promise; export declare function minifyFragmentSync( - code: Buffer, + code: Buffer | string, opts: Buffer ): TransformOutput; -export declare function minifySync(code: Buffer, opts: Buffer): TransformOutput; +export declare function minifySync( + code: Buffer | string, + opts: Buffer +): TransformOutput; export interface TransformOutput { code: string; diff --git a/packages/html/index.ts b/packages/html/index.ts index 9c71f4eec8db3..9662b962fb1f5 100644 --- a/packages/html/index.ts +++ b/packages/html/index.ts @@ -19,10 +19,7 @@ export type Options = { preserveComments?: string[]; minifyConditionalComments?: boolean; removeEmptyAttributes?: boolean; - removeRedundantAttributes?: - | "none" - | "all" - | "smart"; + removeRedundantAttributes?: "none" | "all" | "smart"; collapseBooleanAttributes?: boolean; normalizeAttributes?: boolean; minifyJson?: boolean | { pretty?: boolean }; @@ -48,28 +45,28 @@ export type FragmentOptions = Options & { }; export async function minify( - content: Buffer, + content: string | Buffer, options?: Options ): Promise { return binding.minify(content, toBuffer(options ?? {})); } export async function minifyFragment( - content: Buffer, + content: string | Buffer, options?: FragmentOptions ): Promise { return binding.minifyFragment(content, toBuffer(options ?? {})); } export function minifySync( - content: Buffer, + content: string | Buffer, options?: Options ): binding.TransformOutput { return binding.minifySync(content, toBuffer(options ?? {})); } export async function minifyFragmentSync( - content: Buffer, + content: string | Buffer, options?: FragmentOptions ): Promise { return binding.minifyFragmentSync(content, toBuffer(options ?? {})); diff --git a/packages/html/package.json b/packages/html/package.json index c814f125e4d0b..a0d48bf266eb5 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -45,8 +45,8 @@ "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 .", + "build": "(tsc -d || true) && 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 || true) && 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 --npm-dir scripts/npm" }, From ecf5f84685cc75604860968e359eb07b52e47bc3 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 8 Oct 2024 08:54:41 +0000 Subject: [PATCH 7/9] chore: Publish crates with `swc_core` `v0.109.0` --- .changeset/three-ravens-joke.md | 40 ---------- Cargo.lock | 74 +++++++++---------- crates/ast_node/Cargo.toml | 2 +- crates/better_scoped_tls/Cargo.toml | 2 +- crates/binding_macros/Cargo.toml | 8 +- crates/dbg-swc/Cargo.toml | 14 ++-- crates/from_variant/Cargo.toml | 2 +- crates/jsdoc/Cargo.toml | 10 +-- crates/string_enum/Cargo.toml | 2 +- crates/swc/Cargo.toml | 34 ++++----- crates/swc_allocator/Cargo.toml | 2 +- crates/swc_bundler/Cargo.toml | 30 ++++---- crates/swc_common/Cargo.toml | 6 +- crates/swc_compiler_base/Cargo.toml | 16 ++-- crates/swc_config/Cargo.toml | 2 +- crates/swc_config_macro/Cargo.toml | 2 +- crates/swc_core/Cargo.toml | 50 ++++++------- crates/swc_css/Cargo.toml | 4 +- crates/swc_css_ast/Cargo.toml | 2 +- crates/swc_css_codegen/Cargo.toml | 10 +-- crates/swc_css_codegen_macros/Cargo.toml | 2 +- crates/swc_css_compat/Cargo.toml | 8 +- crates/swc_css_lints/Cargo.toml | 6 +- crates/swc_css_minifier/Cargo.toml | 8 +- crates/swc_css_modules/Cargo.toml | 8 +- crates/swc_css_parser/Cargo.toml | 6 +- crates/swc_css_prefixer/Cargo.toml | 8 +- crates/swc_css_utils/Cargo.toml | 2 +- crates/swc_css_visit/Cargo.toml | 2 +- crates/swc_ecma_ast/Cargo.toml | 4 +- crates/swc_ecma_codegen/Cargo.toml | 16 ++-- crates/swc_ecma_codegen_macros/Cargo.toml | 2 +- crates/swc_ecma_compat_bugfixes/Cargo.toml | 18 ++--- crates/swc_ecma_compat_common/Cargo.toml | 8 +- crates/swc_ecma_compat_es2015/Cargo.toml | 20 ++--- crates/swc_ecma_compat_es2016/Cargo.toml | 14 ++-- crates/swc_ecma_compat_es2017/Cargo.toml | 14 ++-- crates/swc_ecma_compat_es2018/Cargo.toml | 14 ++-- crates/swc_ecma_compat_es2019/Cargo.toml | 14 ++-- crates/swc_ecma_compat_es2020/Cargo.toml | 16 ++-- crates/swc_ecma_compat_es2021/Cargo.toml | 10 +-- crates/swc_ecma_compat_es2022/Cargo.toml | 14 ++-- crates/swc_ecma_compat_es3/Cargo.toml | 14 ++-- crates/swc_ecma_ext_transforms/Cargo.toml | 8 +- crates/swc_ecma_lints/Cargo.toml | 20 ++--- crates/swc_ecma_loader/Cargo.toml | 2 +- crates/swc_ecma_minifier/Cargo.toml | 28 +++---- crates/swc_ecma_parser/Cargo.toml | 14 ++-- crates/swc_ecma_preset_env/Cargo.toml | 16 ++-- crates/swc_ecma_quote/Cargo.toml | 6 +- crates/swc_ecma_quote_macros/Cargo.toml | 8 +- crates/swc_ecma_testing/Cargo.toml | 2 +- crates/swc_ecma_transforms/Cargo.toml | 26 +++---- crates/swc_ecma_transforms_base/Cargo.toml | 18 ++--- crates/swc_ecma_transforms_classes/Cargo.toml | 12 +-- crates/swc_ecma_transforms_compat/Cargo.toml | 26 +++---- crates/swc_ecma_transforms_macros/Cargo.toml | 2 +- crates/swc_ecma_transforms_module/Cargo.toml | 18 ++--- .../Cargo.toml | 26 +++---- .../swc_ecma_transforms_proposal/Cargo.toml | 22 +++--- crates/swc_ecma_transforms_react/Cargo.toml | 24 +++--- crates/swc_ecma_transforms_testing/Cargo.toml | 18 ++--- .../swc_ecma_transforms_typescript/Cargo.toml | 24 +++--- crates/swc_ecma_usage_analyzer/Cargo.toml | 10 +-- crates/swc_ecma_utils/Cargo.toml | 12 +-- crates/swc_ecma_visit/Cargo.toml | 6 +- crates/swc_ecmascript/Cargo.toml | 14 ++-- crates/swc_error_reporters/Cargo.toml | 2 +- crates/swc_estree_ast/Cargo.toml | 4 +- crates/swc_estree_compat/Cargo.toml | 18 ++--- crates/swc_fast_graph/Cargo.toml | 4 +- crates/swc_fast_ts_strip/Cargo.toml | 18 ++--- crates/swc_graph_analyzer/Cargo.toml | 6 +- crates/swc_html/Cargo.toml | 4 +- crates/swc_html_ast/Cargo.toml | 2 +- crates/swc_html_codegen/Cargo.toml | 10 +-- crates/swc_html_codegen_macros/Cargo.toml | 2 +- crates/swc_html_minifier/Cargo.toml | 24 +++--- crates/swc_html_parser/Cargo.toml | 6 +- crates/swc_html_utils/Cargo.toml | 2 +- crates/swc_html_visit/Cargo.toml | 2 +- crates/swc_macros_common/Cargo.toml | 2 +- crates/swc_node_bundler/Cargo.toml | 18 ++--- crates/swc_node_comments/Cargo.toml | 2 +- crates/swc_plugin/Cargo.toml | 2 +- crates/swc_plugin_proxy/Cargo.toml | 6 +- crates/swc_plugin_runner/Cargo.toml | 14 ++-- crates/swc_timer/Cargo.toml | 2 +- crates/swc_transform_common/Cargo.toml | 2 +- crates/swc_typescript/Cargo.toml | 12 +-- crates/swc_xml/Cargo.toml | 2 +- crates/swc_xml_ast/Cargo.toml | 2 +- crates/swc_xml_codegen/Cargo.toml | 8 +- crates/swc_xml_codegen_macros/Cargo.toml | 2 +- crates/swc_xml_parser/Cargo.toml | 4 +- crates/swc_xml_visit/Cargo.toml | 2 +- crates/testing/Cargo.toml | 4 +- 97 files changed, 525 insertions(+), 565 deletions(-) delete mode 100644 .changeset/three-ravens-joke.md diff --git a/.changeset/three-ravens-joke.md b/.changeset/three-ravens-joke.md deleted file mode 100644 index ad8c40414a278..0000000000000 --- a/.changeset/three-ravens-joke.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -better_scoped_tls: patch -jsdoc: patch -swc: patch -swc_allocator: patch -swc_bundler: patch -swc_common: patch -swc_config: patch -swc_css_codegen: patch -swc_css_parser: patch -swc_ecma_ast: patch -swc_ecma_codegen: patch -swc_ecma_compat_bugfixes: patch -swc_ecma_compat_es2015: patch -swc_ecma_compat_es2022: patch -swc_ecma_lints: patch -swc_ecma_minifier: patch -swc_ecma_parser: patch -swc_ecma_preset_env: patch -swc_ecma_transforms_base: patch -swc_ecma_transforms_classes: patch -swc_ecma_transforms_optimization: patch -swc_ecma_transforms_proposal: patch -swc_ecma_transforms_react: patch -swc_ecma_transforms_testing: patch -swc_ecma_transforms_typescript: patch -swc_ecma_usage_analyzer: patch -swc_ecma_utils: patch -swc_ecma_visit: patch -swc_fast_graph: patch -swc_html_codegen: patch -swc_html_parser: patch -swc_macros_common: patch -swc_plugin: patch -swc_typescript: patch -swc_xml_codegen: patch -testing: patch ---- - -build: Update `rustc` to `nightly-2024-10-07` diff --git a/Cargo.lock b/Cargo.lock index 2ed216e047dbd..d2a8f84ecd89a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "Inflector" @@ -305,7 +305,7 @@ dependencies = [ [[package]] name = "better_scoped_tls" -version = "0.1.1" +version = "0.1.2" dependencies = [ "scoped-tls", ] @@ -2057,7 +2057,7 @@ dependencies = [ [[package]] name = "jsdoc" -version = "0.121.0" +version = "0.121.1" dependencies = [ "anyhow", "dashmap 5.5.3", @@ -3850,7 +3850,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "swc" -version = "0.290.0" +version = "0.290.1" dependencies = [ "ansi_term", "anyhow", @@ -3923,7 +3923,7 @@ dependencies = [ [[package]] name = "swc_allocator" -version = "0.1.9" +version = "0.1.10" dependencies = [ "bumpalo", "codspeed-criterion-compat", @@ -3952,7 +3952,7 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.242.0" +version = "0.242.1" dependencies = [ "anyhow", "crc", @@ -4030,7 +4030,7 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.40.1" +version = "0.40.2" dependencies = [ "ahash 0.8.11", "anyhow", @@ -4092,7 +4092,7 @@ dependencies = [ [[package]] name = "swc_config" -version = "0.1.14" +version = "0.1.15" dependencies = [ "anyhow", "indexmap 2.5.0", @@ -4197,7 +4197,7 @@ dependencies = [ [[package]] name = "swc_css_codegen" -version = "0.158.0" +version = "0.158.1" dependencies = [ "auto_impl", "bitflags 2.6.0", @@ -4298,7 +4298,7 @@ dependencies = [ [[package]] name = "swc_css_parser" -version = "0.157.0" +version = "0.157.1" dependencies = [ "codspeed-criterion-compat", "criterion", @@ -4357,7 +4357,7 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.121.1" +version = "0.121.2" dependencies = [ "arbitrary", "bitflags 2.6.0", @@ -4377,7 +4377,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.158.1" +version = "0.158.2" dependencies = [ "base64 0.21.7", "codspeed-criterion-compat", @@ -4413,7 +4413,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_bugfixes" -version = "0.17.0" +version = "0.17.1" dependencies = [ "swc_atoms", "swc_common", @@ -4441,7 +4441,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.17.0" +version = "0.17.1" dependencies = [ "arrayvec", "indexmap 2.5.0", @@ -4570,7 +4570,7 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2022" -version = "0.17.0" +version = "0.17.1" dependencies = [ "swc_atoms", "swc_common", @@ -4614,7 +4614,7 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.105.0" +version = "0.105.1" dependencies = [ "auto_impl", "dashmap 5.5.3", @@ -4657,7 +4657,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.209.0" +version = "0.209.1" dependencies = [ "ansi_term", "anyhow", @@ -4701,7 +4701,7 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.152.1" +version = "0.152.2" dependencies = [ "codspeed-criterion-compat", "criterion", @@ -4729,7 +4729,7 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.222.1" +version = "0.222.2" dependencies = [ "anyhow", "codspeed-criterion-compat", @@ -4820,7 +4820,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.150.0" +version = "0.150.1" dependencies = [ "better_scoped_tls", "bitflags 2.6.0", @@ -4848,7 +4848,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_classes" -version = "0.139.0" +version = "0.139.1" dependencies = [ "swc_atoms", "swc_common", @@ -4939,7 +4939,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.213.1" +version = "0.213.2" dependencies = [ "dashmap 5.5.3", "indexmap 2.5.0", @@ -4969,7 +4969,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.184.0" +version = "0.184.1" dependencies = [ "either", "rustc-hash", @@ -4994,7 +4994,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.196.0" +version = "0.196.1" dependencies = [ "base64 0.21.7", "dashmap 5.5.3", @@ -5022,7 +5022,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.155.0" +version = "0.155.1" dependencies = [ "ansi_term", "anyhow", @@ -5046,7 +5046,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.203.0" +version = "0.203.1" dependencies = [ "codspeed-criterion-compat", "criterion", @@ -5069,7 +5069,7 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.34.0" +version = "0.34.1" dependencies = [ "indexmap 2.5.0", "rustc-hash", @@ -5084,7 +5084,7 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.138.0" +version = "0.138.1" dependencies = [ "indexmap 2.5.0", "num_cpus", @@ -5105,7 +5105,7 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.107.0" +version = "0.107.1" dependencies = [ "new_debug_unreachable", "num-bigint", @@ -5191,7 +5191,7 @@ dependencies = [ [[package]] name = "swc_fast_graph" -version = "1.0.0" +version = "1.0.1" dependencies = [ "indexmap 2.5.0", "petgraph", @@ -5256,7 +5256,7 @@ dependencies = [ [[package]] name = "swc_html_codegen" -version = "0.49.0" +version = "0.49.1" dependencies = [ "auto_impl", "bitflags 2.6.0", @@ -5314,7 +5314,7 @@ dependencies = [ [[package]] name = "swc_html_parser" -version = "0.46.0" +version = "0.46.1" dependencies = [ "codspeed-criterion-compat", "criterion", @@ -5353,7 +5353,7 @@ dependencies = [ [[package]] name = "swc_macros_common" -version = "0.3.13" +version = "0.3.14" dependencies = [ "proc-macro2", "quote", @@ -5420,7 +5420,7 @@ dependencies = [ [[package]] name = "swc_plugin" -version = "0.90.2" +version = "0.90.3" dependencies = [ "once_cell", ] @@ -5514,7 +5514,7 @@ dependencies = [ [[package]] name = "swc_typescript" -version = "0.8.0" +version = "0.8.1" dependencies = [ "swc_atoms", "swc_common", @@ -5560,7 +5560,7 @@ dependencies = [ [[package]] name = "swc_xml_codegen" -version = "0.20.0" +version = "0.20.1" dependencies = [ "auto_impl", "bitflags 2.6.0", @@ -5739,7 +5739,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "testing" -version = "0.42.0" +version = "0.42.1" dependencies = [ "ansi_term", "cargo_metadata", diff --git a/crates/ast_node/Cargo.toml b/crates/ast_node/Cargo.toml index d99eba7d28bee..8500e2906de01 100644 --- a/crates/ast_node/Cargo.toml +++ b/crates/ast_node/Cargo.toml @@ -16,7 +16,7 @@ proc-macro = true proc-macro2 = { workspace = true } quote = { workspace = true } -swc_macros_common = { version = "0.3.11", path = "../swc_macros_common" } +swc_macros_common = { version = "0.3.14", path = "../swc_macros_common" } [dependencies.syn] features = ["derive", "fold", "parsing", "printing", "visit-mut"] workspace = true diff --git a/crates/better_scoped_tls/Cargo.toml b/crates/better_scoped_tls/Cargo.toml index 7dc31b53a397e..a7f88a2f4cc36 100644 --- a/crates/better_scoped_tls/Cargo.toml +++ b/crates/better_scoped_tls/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "better_scoped_tls" repository = "/~https://github.com/swc-project/swc.git" -version = "0.1.1" +version = "0.1.2" [lib] bench = false diff --git a/crates/binding_macros/Cargo.toml b/crates/binding_macros/Cargo.toml index 4d794943ed591..3712e53553e20 100644 --- a/crates/binding_macros/Cargo.toml +++ b/crates/binding_macros/Cargo.toml @@ -33,11 +33,11 @@ binding_wasm = [ [dependencies] # Common deps for the SWC imports -swc = { optional = true, version = "0.290.0", path = "../swc" } -swc_common = { optional = true, version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { optional = true, version = "0.121.1", path = "../swc_ecma_ast" } +swc = { optional = true, version = "0.290.1", path = "../swc" } +swc_common = { optional = true, version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { optional = true, version = "0.121.2", path = "../swc_ecma_ast" } swc_ecma_transforms = { optional = true, version = "0.244.0", path = "../swc_ecma_transforms" } -swc_ecma_visit = { optional = true, version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_visit = { optional = true, version = "0.107.1", path = "../swc_ecma_visit" } # Optional deps for the wasm binding macro anyhow = { workspace = true, optional = true } diff --git a/crates/dbg-swc/Cargo.toml b/crates/dbg-swc/Cargo.toml index cfa9cbe979bb4..3dd008d32c0d4 100644 --- a/crates/dbg-swc/Cargo.toml +++ b/crates/dbg-swc/Cargo.toml @@ -27,17 +27,17 @@ clap = { version = "3", features = ["derive"] } tracing-subscriber = { workspace = true, features = ["fmt", "env-filter"] } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", features = [ +swc_common = { version = "0.40.2", features = [ "concurrent", "tty-emitter", ], path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_minifier = { version = "0.209.0", path = "../swc_ecma_minifier", features = [ +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_minifier = { version = "0.209.1", path = "../swc_ecma_minifier", features = [ "concurrent", ] } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_error_reporters = { version = "1.0.0", path = "../swc_error_reporters" } swc_timer = { version = "0.27.0", path = "../swc_timer" } diff --git a/crates/from_variant/Cargo.toml b/crates/from_variant/Cargo.toml index c3144d2646055..9dd24090ffcb5 100644 --- a/crates/from_variant/Cargo.toml +++ b/crates/from_variant/Cargo.toml @@ -15,7 +15,7 @@ proc-macro = true [dependencies] proc-macro2 = { workspace = true } -swc_macros_common = { version = "0.3.11", path = "../swc_macros_common" } +swc_macros_common = { version = "0.3.14", path = "../swc_macros_common" } [dependencies.syn] features = ["derive", "fold", "parsing", "printing"] workspace = true diff --git a/crates/jsdoc/Cargo.toml b/crates/jsdoc/Cargo.toml index ba1e2c9d3321e..872ab34d54213 100644 --- a/crates/jsdoc/Cargo.toml +++ b/crates/jsdoc/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "jsdoc" repository = { workspace = true } -version = "0.121.0" +version = "0.121.1" [lib] bench = false @@ -20,12 +20,12 @@ nom = { workspace = true } serde = { workspace = true, features = ["derive"], optional = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } [dev-dependencies] anyhow = { workspace = true } dashmap = { workspace = true } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/string_enum/Cargo.toml b/crates/string_enum/Cargo.toml index 0be46b6f544f7..41235dc67762b 100644 --- a/crates/string_enum/Cargo.toml +++ b/crates/string_enum/Cargo.toml @@ -15,7 +15,7 @@ proc-macro = true [dependencies] proc-macro2 = { workspace = true } quote = { workspace = true } -swc_macros_common = { version = "0.3.11", path = "../swc_macros_common" } +swc_macros_common = { version = "0.3.14", path = "../swc_macros_common" } [dependencies.syn] features = ["full", "parsing", "printing", "extra-traits"] workspace = true diff --git a/crates/swc/Cargo.toml b/crates/swc/Cargo.toml index e7d85403e3951..fa1b3846bf407 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.290.0" +version = "0.290.1" [lib] bench = false @@ -69,25 +69,25 @@ url = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } swc_cached = { version = "0.3.19", path = "../swc_cached" } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "ahash", "sourcemap", "parking_lot", ] } swc_compiler_base = { version = "0.24.0", path = "../swc_compiler_base" } -swc_config = { version = "0.1.13", path = "../swc_config" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } +swc_config = { version = "0.1.15", path = "../swc_config" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } swc_ecma_ext_transforms = { version = "0.124.0", path = "../swc_ecma_ext_transforms" } -swc_ecma_lints = { version = "0.105.0", path = "../swc_ecma_lints" } +swc_ecma_lints = { version = "0.105.1", path = "../swc_ecma_lints" } swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader", features = [ "cache", "node", "tsc", ] } -swc_ecma_minifier = { version = "0.209.0", path = "../swc_ecma_minifier" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_preset_env = { version = "0.222.1", path = "../swc_ecma_preset_env" } +swc_ecma_minifier = { version = "0.209.1", path = "../swc_ecma_minifier" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_preset_env = { version = "0.222.2", path = "../swc_ecma_preset_env" } swc_ecma_transforms = { version = "0.244.0", path = "../swc_ecma_transforms", features = [ "compat", "module", @@ -96,18 +96,18 @@ swc_ecma_transforms = { version = "0.244.0", path = "../swc_ecma_transforms", fe "react", "typescript", ] } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_optimization = { version = "0.213.1", path = "../swc_ecma_transforms_optimization" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_transforms_optimization = { version = "0.213.2", path = "../swc_ecma_transforms_optimization" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_error_reporters = { version = "1.0.0", path = "../swc_error_reporters" } swc_node_comments = { version = "0.27.0", path = "../swc_node_comments" } swc_plugin_proxy = { version = "0.50.1", path = "../swc_plugin_proxy", optional = true } swc_plugin_runner = { version = "0.115.1", path = "../swc_plugin_runner", optional = true, default-features = false } swc_timer = { version = "0.27.0", path = "../swc_timer" } swc_transform_common = { version = "0.1.1", path = "../swc_transform_common" } -swc_typescript = { version = "0.8.0", path = "../swc_typescript" } +swc_typescript = { version = "0.8.1", path = "../swc_typescript" } swc_visit = { version = "0.6.0", path = "../swc_visit" } [dependencies.tokio] @@ -133,15 +133,15 @@ rayon = { workspace = true } walkdir = { workspace = true } codspeed-criterion-compat = { workspace = true } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast", features = [ +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast", features = [ "serde-impl", ] } -swc_ecma_lints = { version = "0.105.0", path = "../swc_ecma_lints", features = [ +swc_ecma_lints = { version = "0.105.1", path = "../swc_ecma_lints", features = [ "non_critical_lints", ] } swc_ecma_testing = { version = "0.29.0", path = "../swc_ecma_testing" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } [[example]] name = "transform" diff --git a/crates/swc_allocator/Cargo.toml b/crates/swc_allocator/Cargo.toml index 54b79a1c78400..d095ecea17d76 100644 --- a/crates/swc_allocator/Cargo.toml +++ b/crates/swc_allocator/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_allocator" repository = { workspace = true } -version = "0.1.9" +version = "0.1.10" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_bundler/Cargo.toml b/crates/swc_bundler/Cargo.toml index fed2baa5dbfa4..a2d1600a596a3 100644 --- a/crates/swc_bundler/Cargo.toml +++ b/crates/swc_bundler/Cargo.toml @@ -9,7 +9,7 @@ include = ["Cargo.toml", "build.rs", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_bundler" repository = "/~https://github.com/swc-project/swc.git" -version = "0.242.0" +version = "0.242.1" [package.metadata.docs.rs] all-features = true @@ -38,16 +38,16 @@ relative-path = { workspace = true } tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_optimization = { version = "0.213.1", path = "../swc_ecma_transforms_optimization" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } -swc_fast_graph = { version = "1.0.0", path = "../swc_fast_graph/" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_optimization = { version = "0.213.2", path = "../swc_ecma_transforms_optimization" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } +swc_fast_graph = { version = "1.0.1", path = "../swc_fast_graph/" } swc_graph_analyzer = { version = "0.29.0", path = "../swc_graph_analyzer/" } [dev-dependencies] @@ -63,11 +63,11 @@ swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader", features = "node", "cache", ] } -swc_ecma_minifier = { version = "0.209.0", path = "../swc_ecma_minifier", features = [ +swc_ecma_minifier = { version = "0.209.1", path = "../swc_ecma_minifier", features = [ "concurrent", ] } -swc_ecma_transforms_proposal = { version = "0.184.0", path = "../swc_ecma_transforms_proposal" } -swc_ecma_transforms_react = { version = "0.196.0", path = "../swc_ecma_transforms_react" } -swc_ecma_transforms_typescript = { version = "0.203.0", path = "../swc_ecma_transforms_typescript" } +swc_ecma_transforms_proposal = { version = "0.184.1", path = "../swc_ecma_transforms_proposal" } +swc_ecma_transforms_react = { version = "0.196.1", path = "../swc_ecma_transforms_react" } +swc_ecma_transforms_typescript = { version = "0.203.1", path = "../swc_ecma_transforms_typescript" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index 5ee8aea6cf59c..4cdd7bd862318 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_common" repository = "/~https://github.com/swc-project/swc.git" -version = "0.40.1" +version = "0.40.2" [package.metadata.docs.rs] all-features = true @@ -59,9 +59,9 @@ unicode-width = { workspace = true } url = { workspace = true } ast_node = { version = "1.0.0", path = "../ast_node" } -better_scoped_tls = { version = "0.1.1", path = "../better_scoped_tls" } +better_scoped_tls = { version = "0.1.2", path = "../better_scoped_tls" } from_variant = { version = "1.0.0", path = "../from_variant" } -swc_allocator = { version = "0.1.9", path = "../swc_allocator", default-features = false } +swc_allocator = { version = "0.1.10", path = "../swc_allocator", default-features = false } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } swc_eq_ignore_macros = { version = "0.1.3", path = "../swc_eq_ignore_macros" } swc_visit = { version = "0.6.0", path = "../swc_visit" } diff --git a/crates/swc_compiler_base/Cargo.toml b/crates/swc_compiler_base/Cargo.toml index 668a53a27ecea..2de6fa427ec6a 100644 --- a/crates/swc_compiler_base/Cargo.toml +++ b/crates/swc_compiler_base/Cargo.toml @@ -21,18 +21,18 @@ rustc-hash = { workspace = true } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } sourcemap = { workspace = true } -swc_allocator = { version = "0.1.9", path = "../swc_allocator", default-features = false } +swc_allocator = { version = "0.1.10", path = "../swc_allocator", default-features = false } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "sourcemap", ] } -swc_config = { version = "0.1.13", path = "../swc_config" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_minifier = { version = "0.209.0", path = "../swc_ecma_minifier" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_config = { version = "0.1.15", path = "../swc_config" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_minifier = { version = "0.209.1", path = "../swc_ecma_minifier" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_timer = { version = "0.27.0", path = "../swc_timer" } [dependencies.napi-derive] diff --git a/crates/swc_config/Cargo.toml b/crates/swc_config/Cargo.toml index 345ca4434e533..9e058c3b53772 100644 --- a/crates/swc_config/Cargo.toml +++ b/crates/swc_config/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_config" repository = "/~https://github.com/swc-project/swc.git" -version = "0.1.14" +version = "0.1.15" [dependencies] anyhow = { workspace = true } diff --git a/crates/swc_config_macro/Cargo.toml b/crates/swc_config_macro/Cargo.toml index 6fdf707650b96..219675a2a10eb 100644 --- a/crates/swc_config_macro/Cargo.toml +++ b/crates/swc_config_macro/Cargo.toml @@ -17,4 +17,4 @@ proc-macro2 = { workspace = true } quote = { workspace = true } syn = { workspace = true } -swc_macros_common = { version = "0.3.11", path = "../swc_macros_common" } +swc_macros_common = { version = "0.3.14", path = "../swc_macros_common" } diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index ec250c6a0eed1..7b3da6fc81563 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -339,51 +339,51 @@ once_cell = { workspace = true, optional = true } # swc_* dependencies binding_macros = { optional = true, version = "0.82.0", path = "../binding_macros" } -swc = { optional = true, version = "0.290.0", path = "../swc" } +swc = { optional = true, version = "0.290.1", path = "../swc" } swc_atoms = { optional = true, version = "1.0.2", path = "../swc_atoms" } -swc_bundler = { optional = true, version = "0.242.0", path = "../swc_bundler" } +swc_bundler = { optional = true, version = "0.242.1", path = "../swc_bundler" } swc_cached = { optional = true, version = "0.3.19", path = "../swc_cached" } -swc_common = { optional = true, version = "0.40.1", path = "../swc_common" } +swc_common = { optional = true, version = "0.40.2", path = "../swc_common" } swc_css_ast = { optional = true, version = "0.147.0", path = "../swc_css_ast" } -swc_css_codegen = { optional = true, version = "0.158.0", path = "../swc_css_codegen" } +swc_css_codegen = { optional = true, version = "0.158.1", path = "../swc_css_codegen" } swc_css_compat = { optional = true, version = "0.34.0", path = "../swc_css_compat" } swc_css_minifier = { optional = true, version = "0.123.0", path = "../swc_css_minifier" } swc_css_modules = { optional = true, version = "0.36.0", path = "../swc_css_modules" } -swc_css_parser = { optional = true, version = "0.157.0", path = "../swc_css_parser" } +swc_css_parser = { optional = true, version = "0.157.1", path = "../swc_css_parser" } swc_css_prefixer = { optional = true, version = "0.161.0", path = "../swc_css_prefixer" } swc_css_utils = { optional = true, version = "0.144.0", path = "../swc_css_utils/" } swc_css_visit = { optional = true, version = "0.146.0", path = "../swc_css_visit" } -swc_ecma_ast = { optional = true, version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_codegen = { optional = true, version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_lints = { optional = true, version = "0.105.0", path = "../swc_ecma_lints" } +swc_ecma_ast = { optional = true, version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_codegen = { optional = true, version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_lints = { optional = true, version = "0.105.1", path = "../swc_ecma_lints" } swc_ecma_loader = { optional = true, version = "0.52.1", path = "../swc_ecma_loader" } -swc_ecma_minifier = { optional = true, version = "0.209.0", path = "../swc_ecma_minifier" } -swc_ecma_parser = { optional = true, version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_preset_env = { optional = true, version = "0.222.1", path = "../swc_ecma_preset_env" } +swc_ecma_minifier = { optional = true, version = "0.209.1", path = "../swc_ecma_minifier" } +swc_ecma_parser = { optional = true, version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_preset_env = { optional = true, version = "0.222.2", path = "../swc_ecma_preset_env" } swc_ecma_quote_macros = { optional = true, version = "0.63.0", path = "../swc_ecma_quote_macros" } -swc_ecma_transforms_base = { optional = true, version = "0.150.0", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_base = { optional = true, version = "0.150.1", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_compat = { optional = true, version = "0.176.0", path = "../swc_ecma_transforms_compat" } swc_ecma_transforms_module = { optional = true, version = "0.195.0", path = "../swc_ecma_transforms_module" } -swc_ecma_transforms_optimization = { optional = true, version = "0.213.1", path = "../swc_ecma_transforms_optimization" } -swc_ecma_transforms_proposal = { optional = true, version = "0.184.0", path = "../swc_ecma_transforms_proposal" } -swc_ecma_transforms_react = { optional = true, version = "0.196.0", path = "../swc_ecma_transforms_react" } -swc_ecma_transforms_testing = { optional = true, version = "0.155.0", path = "../swc_ecma_transforms_testing" } -swc_ecma_transforms_typescript = { optional = true, version = "0.203.0", path = "../swc_ecma_transforms_typescript" } -swc_ecma_usage_analyzer = { optional = true, version = "0.34.0", path = "../swc_ecma_usage_analyzer" } -swc_ecma_utils = { optional = true, version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { optional = true, version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_transforms_optimization = { optional = true, version = "0.213.2", path = "../swc_ecma_transforms_optimization" } +swc_ecma_transforms_proposal = { optional = true, version = "0.184.1", path = "../swc_ecma_transforms_proposal" } +swc_ecma_transforms_react = { optional = true, version = "0.196.1", path = "../swc_ecma_transforms_react" } +swc_ecma_transforms_testing = { optional = true, version = "0.155.1", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_typescript = { optional = true, version = "0.203.1", path = "../swc_ecma_transforms_typescript" } +swc_ecma_usage_analyzer = { optional = true, version = "0.34.1", path = "../swc_ecma_usage_analyzer" } +swc_ecma_utils = { optional = true, version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { optional = true, version = "0.107.1", path = "../swc_ecma_visit" } swc_malloc = { optional = true, version = "0.5.10", path = "../swc_malloc" } swc_node_bundler = { optional = true, version = "0.80.0", path = "../swc_node_bundler" } swc_nodejs_common = { optional = true, version = "0.0.8", path = "../swc_nodejs_common" } -swc_plugin = { optional = true, version = "0.90.0", path = "../swc_plugin" } +swc_plugin = { optional = true, version = "0.90.3", path = "../swc_plugin" } swc_plugin_macro = { optional = true, version = "0.9.16", path = "../swc_plugin_macro" } swc_plugin_proxy = { optional = true, version = "0.50.1", path = "../swc_plugin_proxy" } swc_trace_macro = { optional = true, version = "1.0.0", path = "../swc_trace_macro" } swc_transform_common = { optional = true, version = "0.1.0", path = "../swc_transform_common" } -swc_typescript = { optional = true, version = "0.8.0", path = "../swc_typescript" } -testing = { optional = true, version = "0.42.0", path = "../testing" } +swc_typescript = { optional = true, version = "0.8.1", path = "../swc_typescript" } +testing = { optional = true, version = "0.42.1", path = "../testing" } # TODO: eventually swc_plugin_runner needs to remove default features -swc_allocator = { version = "0.1.9", path = "../swc_allocator", default-features = false } +swc_allocator = { version = "0.1.10", path = "../swc_allocator", default-features = false } swc_plugin_runner = { optional = true, version = "0.115.1", path = "../swc_plugin_runner", default-features = false } [build-dependencies] @@ -391,4 +391,4 @@ vergen = { workspace = true, features = ["cargo"] } [dev-dependencies] anyhow = { workspace = true } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_css/Cargo.toml b/crates/swc_css/Cargo.toml index fcb0c6e34f711..f12e727e4f38d 100644 --- a/crates/swc_css/Cargo.toml +++ b/crates/swc_css/Cargo.toml @@ -23,11 +23,11 @@ prefixer = ["swc_css_prefixer"] [dependencies] swc_css_ast = { version = "0.147.0", path = "../swc_css_ast" } -swc_css_codegen = { version = "0.158.0", path = "../swc_css_codegen" } +swc_css_codegen = { version = "0.158.1", path = "../swc_css_codegen" } swc_css_compat = { version = "0.34.0", path = "../swc_css_compat", optional = true } swc_css_minifier = { version = "0.123.0", path = "../swc_css_minifier", optional = true } swc_css_modules = { version = "0.36.0", path = "../swc_css_modules", optional = true } -swc_css_parser = { version = "0.157.0", path = "../swc_css_parser" } +swc_css_parser = { version = "0.157.1", path = "../swc_css_parser" } swc_css_prefixer = { version = "0.161.0", path = "../swc_css_prefixer", optional = true } swc_css_utils = { version = "0.144.0", path = "../swc_css_utils/" } swc_css_visit = { version = "0.146.0", path = "../swc_css_visit" } diff --git a/crates/swc_css_ast/Cargo.toml b/crates/swc_css_ast/Cargo.toml index 2943e65058e59..fd2551c69e610 100644 --- a/crates/swc_css_ast/Cargo.toml +++ b/crates/swc_css_ast/Cargo.toml @@ -23,6 +23,6 @@ serde = { workspace = true, features = ["derive"], optional = true } string_enum = { version = "0.4.4", path = "../string_enum/" } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } rkyv = { workspace = true, features = ["validation"], optional = true } diff --git a/crates/swc_css_codegen/Cargo.toml b/crates/swc_css_codegen/Cargo.toml index 7466cf7e16b4a..2bd1ba02c072e 100644 --- a/crates/swc_css_codegen/Cargo.toml +++ b/crates/swc_css_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_codegen" repository = "/~https://github.com/swc-project/swc.git" -version = "0.158.0" +version = "0.158.1" [lib] bench = false @@ -19,15 +19,15 @@ rustc-hash = { workspace = true } serde = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast" } swc_css_codegen_macros = { version = "0.2.4", path = "../swc_css_codegen_macros" } swc_css_utils = { version = "0.144.0", path = "../swc_css_utils" } [dev-dependencies] -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "sourcemap", ] } -swc_css_parser = { version = "0.157.0", path = "../swc_css_parser" } +swc_css_parser = { version = "0.157.1", path = "../swc_css_parser" } swc_css_visit = { version = "0.146.0", path = "../swc_css_visit" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_css_codegen_macros/Cargo.toml b/crates/swc_css_codegen_macros/Cargo.toml index 48785a97a3a07..512dc11c39c6d 100644 --- a/crates/swc_css_codegen_macros/Cargo.toml +++ b/crates/swc_css_codegen_macros/Cargo.toml @@ -17,4 +17,4 @@ proc-macro2 = { workspace = true } quote = { workspace = true } syn = { workspace = true, features = ["fold"] } -swc_macros_common = { version = "0.3.11", path = "../swc_macros_common" } +swc_macros_common = { version = "0.3.14", path = "../swc_macros_common" } diff --git a/crates/swc_css_compat/Cargo.toml b/crates/swc_css_compat/Cargo.toml index 4524437703f43..5eadf16744582 100644 --- a/crates/swc_css_compat/Cargo.toml +++ b/crates/swc_css_compat/Cargo.toml @@ -19,12 +19,12 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast" } swc_css_utils = { version = "0.144.0", path = "../swc_css_utils/" } swc_css_visit = { version = "0.146.0", path = "../swc_css_visit" } [dev-dependencies] -swc_css_codegen = { version = "0.158.0", path = "../swc_css_codegen" } -swc_css_parser = { version = "0.157.0", path = "../swc_css_parser" } -testing = { version = "0.42.0", path = "../testing" } +swc_css_codegen = { version = "0.158.1", path = "../swc_css_codegen" } +swc_css_parser = { version = "0.157.1", path = "../swc_css_parser" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_css_lints/Cargo.toml b/crates/swc_css_lints/Cargo.toml index 45962b24b2c18..ddfecb6d62aaa 100644 --- a/crates/swc_css_lints/Cargo.toml +++ b/crates/swc_css_lints/Cargo.toml @@ -21,12 +21,12 @@ thiserror = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } swc_cached = { version = "0.3.19", path = "../swc_cached" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast" } swc_css_visit = { version = "0.146.0", path = "../swc_css_visit" } [dev-dependencies] serde_json = { workspace = true } -swc_css_parser = { version = "0.157.0", path = "../swc_css_parser" } -testing = { version = "0.42.0", path = "../testing" } +swc_css_parser = { version = "0.157.1", path = "../swc_css_parser" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_css_minifier/Cargo.toml b/crates/swc_css_minifier/Cargo.toml index ff2b570e42d4c..9374474962c23 100644 --- a/crates/swc_css_minifier/Cargo.toml +++ b/crates/swc_css_minifier/Cargo.toml @@ -16,7 +16,7 @@ bench = false serde = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast" } swc_css_utils = { version = "0.144.0", path = "../swc_css_utils/" } swc_css_visit = { version = "0.146.0", path = "../swc_css_visit" } @@ -25,10 +25,10 @@ swc_css_visit = { version = "0.146.0", path = "../swc_css_visit" } codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } -swc_css_codegen = { version = "0.158.0", path = "../swc_css_codegen" } -swc_css_parser = { version = "0.157.0", path = "../swc_css_parser" } +swc_css_codegen = { version = "0.158.1", path = "../swc_css_codegen" } +swc_css_parser = { version = "0.157.1", path = "../swc_css_parser" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_css_modules/Cargo.toml b/crates/swc_css_modules/Cargo.toml index 3e623622d7097..a169bd01b17ed 100644 --- a/crates/swc_css_modules/Cargo.toml +++ b/crates/swc_css_modules/Cargo.toml @@ -19,10 +19,10 @@ rustc-hash = { workspace = true } serde = { workspace = true, features = ["derive"] } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast" } -swc_css_codegen = { version = "0.158.0", path = "../swc_css_codegen" } -swc_css_parser = { version = "0.157.0", path = "../swc_css_parser" } +swc_css_codegen = { version = "0.158.1", path = "../swc_css_codegen" } +swc_css_parser = { version = "0.157.1", path = "../swc_css_parser" } swc_css_visit = { version = "0.146.0", path = "../swc_css_visit" } [dev-dependencies] @@ -30,4 +30,4 @@ indexmap = { workspace = true, features = ["serde"] } serde_json = { workspace = true } swc_css_compat = { version = "0.34.0", path = "../swc_css_compat" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_css_parser/Cargo.toml b/crates/swc_css_parser/Cargo.toml index 38f0588d8fb51..f30469ff226b8 100644 --- a/crates/swc_css_parser/Cargo.toml +++ b/crates/swc_css_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_css_parser" repository = "/~https://github.com/swc-project/swc.git" -version = "0.157.0" +version = "0.157.1" [lib] bench = false @@ -20,7 +20,7 @@ lexical = { workspace = true } serde = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast" } [dev-dependencies] @@ -33,7 +33,7 @@ swc_css_ast = { version = "0.147.0", path = "../swc_css_ast", features = [ ] } swc_css_visit = { version = "0.146.0", path = "../swc_css_visit" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_css_prefixer/Cargo.toml b/crates/swc_css_prefixer/Cargo.toml index c9566e55c6c2c..368dbce0acdae 100644 --- a/crates/swc_css_prefixer/Cargo.toml +++ b/crates/swc_css_prefixer/Cargo.toml @@ -19,12 +19,12 @@ serde_json = { workspace = true } preset_env_base = { version = "0.6.0", path = "../preset_env_base" } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast" } swc_css_utils = { version = "0.144.0", path = "../swc_css_utils/" } swc_css_visit = { version = "0.146.0", path = "../swc_css_visit" } [dev-dependencies] -swc_css_codegen = { version = "0.158.0", path = "../swc_css_codegen" } -swc_css_parser = { version = "0.157.0", path = "../swc_css_parser" } -testing = { version = "0.42.0", path = "../testing" } +swc_css_codegen = { version = "0.158.1", path = "../swc_css_codegen" } +swc_css_parser = { version = "0.157.1", path = "../swc_css_parser" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_css_utils/Cargo.toml b/crates/swc_css_utils/Cargo.toml index 76072d32bc324..b8458ae3c9609 100644 --- a/crates/swc_css_utils/Cargo.toml +++ b/crates/swc_css_utils/Cargo.toml @@ -18,6 +18,6 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast" } swc_css_visit = { version = "0.146.0", path = "../swc_css_visit" } diff --git a/crates/swc_css_visit/Cargo.toml b/crates/swc_css_visit/Cargo.toml index 5bcfbedca53ca..83c2c4b709c7a 100644 --- a/crates/swc_css_visit/Cargo.toml +++ b/crates/swc_css_visit/Cargo.toml @@ -23,6 +23,6 @@ path = [] serde = { workspace = true, optional = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast" } swc_visit = { version = "0.6.0", path = "../swc_visit" } diff --git a/crates/swc_ecma_ast/Cargo.toml b/crates/swc_ecma_ast/Cargo.toml index 681ed8b1bc97e..2bc99c92f4f51 100644 --- a/crates/swc_ecma_ast/Cargo.toml +++ b/crates/swc_ecma_ast/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_ast" repository = "/~https://github.com/swc-project/swc.git" -version = "0.121.1" +version = "0.121.2" [package.metadata.docs.rs] all-features = true @@ -41,7 +41,7 @@ scoped-tls = { workspace = true } serde = { workspace = true, features = ["derive"], optional = true } string_enum = { version = "0.4.4", path = "../string_enum" } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } unicode-id-start = { workspace = true } [dev-dependencies] diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index 54908431278c6..0748b8d1f9601 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_codegen" repository = "/~https://github.com/swc-project/swc.git" -version = "0.158.1" +version = "0.158.2" [features] # This does not enable serde for ast nodes. @@ -25,10 +25,10 @@ serde = { workspace = true } sourcemap = { workspace = true } tracing = { workspace = true } -swc_allocator = { version = "0.1.9", path = "../swc_allocator", default-features = false } +swc_allocator = { version = "0.1.10", path = "../swc_allocator", default-features = false } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } swc_ecma_codegen_macros = { version = "0.7.6", path = "../swc_ecma_codegen_macros" } [dev-dependencies] @@ -37,14 +37,14 @@ codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } serde_json = { workspace = true } -swc_allocator = { version = "0.1.9", path = "../swc_allocator" } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_allocator = { version = "0.1.10", path = "../swc_allocator" } +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "sourcemap", ] } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } swc_ecma_testing = { version = "0.29.0", path = "../swc_ecma_testing" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_ecma_codegen_macros/Cargo.toml b/crates/swc_ecma_codegen_macros/Cargo.toml index 460288308a394..884fc3eda6f48 100644 --- a/crates/swc_ecma_codegen_macros/Cargo.toml +++ b/crates/swc_ecma_codegen_macros/Cargo.toml @@ -15,7 +15,7 @@ proc-macro = true [dependencies] proc-macro2 = { workspace = true } -swc_macros_common = { version = "0.3.11", path = "../swc_macros_common" } +swc_macros_common = { version = "0.3.14", path = "../swc_macros_common" } [dependencies.syn] features = ["fold"] diff --git a/crates/swc_ecma_compat_bugfixes/Cargo.toml b/crates/swc_ecma_compat_bugfixes/Cargo.toml index c9a2e03dedc75..b059d1f36fdc5 100644 --- a/crates/swc_ecma_compat_bugfixes/Cargo.toml +++ b/crates/swc_ecma_compat_bugfixes/Cargo.toml @@ -7,20 +7,20 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_bugfixes" repository = "/~https://github.com/swc-project/swc.git" -version = "0.17.0" +version = "0.17.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_compat_es2015 = { version = "0.17.0", path = "../swc_ecma_compat_es2015" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_compat_es2015 = { version = "0.17.1", path = "../swc_ecma_compat_es2015" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } tracing = { workspace = true } [dev-dependencies] -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_common/Cargo.toml b/crates/swc_ecma_compat_common/Cargo.toml index 5d29562c5dc4e..64d9a8a9e0d00 100644 --- a/crates/swc_ecma_compat_common/Cargo.toml +++ b/crates/swc_ecma_compat_common/Cargo.toml @@ -12,8 +12,8 @@ version = "0.15.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } diff --git a/crates/swc_ecma_compat_es2015/Cargo.toml b/crates/swc_ecma_compat_es2015/Cargo.toml index 616fb6724eb1d..6d87dd8dc3ab9 100644 --- a/crates/swc_ecma_compat_es2015/Cargo.toml +++ b/crates/swc_ecma_compat_es2015/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2015" repository = "/~https://github.com/swc-project/swc.git" -version = "0.17.0" +version = "0.17.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -23,18 +23,18 @@ smallvec = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_config = { version = "0.1.13", path = "../swc_config" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_config = { version = "0.1.15", path = "../swc_config" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } swc_ecma_compat_common = { version = "0.15.0", path = "../swc_ecma_compat_common" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_classes = { version = "0.139.0", path = "../swc_ecma_transforms_classes" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_classes = { version = "0.139.1", path = "../swc_ecma_transforms_classes" } swc_ecma_transforms_macros = { version = "0.5.5", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } tracing = { workspace = true } [dev-dependencies] -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2016/Cargo.toml b/crates/swc_ecma_compat_es2016/Cargo.toml index 6be47b0d56209..13c80dc099fd9 100644 --- a/crates/swc_ecma_compat_es2016/Cargo.toml +++ b/crates/swc_ecma_compat_es2016/Cargo.toml @@ -14,15 +14,15 @@ version = "0.17.0" [dependencies] swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_macros = { version = "0.5.5", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } tracing = { workspace = true } [dev-dependencies] -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2017/Cargo.toml b/crates/swc_ecma_compat_es2017/Cargo.toml index b5b9d7395ffb8..b1a344b66fd0a 100644 --- a/crates/swc_ecma_compat_es2017/Cargo.toml +++ b/crates/swc_ecma_compat_es2017/Cargo.toml @@ -17,14 +17,14 @@ serde = { workspace = true, features = ["derive"] } tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_macros = { version = "0.5.5", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } [dev-dependencies] -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2018/Cargo.toml b/crates/swc_ecma_compat_es2018/Cargo.toml index 4fb48ddbd64d9..d35ddf308876d 100644 --- a/crates/swc_ecma_compat_es2018/Cargo.toml +++ b/crates/swc_ecma_compat_es2018/Cargo.toml @@ -17,15 +17,15 @@ serde = { workspace = true, features = ["derive"] } tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } swc_ecma_compat_common = { version = "0.15.0", path = "../swc_ecma_compat_common" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_macros = { version = "0.5.5", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } [dev-dependencies] -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2019/Cargo.toml b/crates/swc_ecma_compat_es2019/Cargo.toml index cba77e1a1ba6d..d67c65a0a41b1 100644 --- a/crates/swc_ecma_compat_es2019/Cargo.toml +++ b/crates/swc_ecma_compat_es2019/Cargo.toml @@ -17,13 +17,13 @@ tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } [dev-dependencies] -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2020/Cargo.toml b/crates/swc_ecma_compat_es2020/Cargo.toml index c5f58586161d4..b86c1fe96d93d 100644 --- a/crates/swc_ecma_compat_es2020/Cargo.toml +++ b/crates/swc_ecma_compat_es2020/Cargo.toml @@ -15,15 +15,15 @@ version = "0.17.0" [dependencies] serde = { workspace = true, features = ["derive"] } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_compat_es2022 = { version = "0.17.0", path = "../swc_ecma_compat_es2022" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_compat_es2022 = { version = "0.17.1", path = "../swc_ecma_compat_es2022" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } tracing = { workspace = true } [dev-dependencies] -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_compat_es2021/Cargo.toml b/crates/swc_ecma_compat_es2021/Cargo.toml index 17f83f7f98acf..d468f320e05b1 100644 --- a/crates/swc_ecma_compat_es2021/Cargo.toml +++ b/crates/swc_ecma_compat_es2021/Cargo.toml @@ -16,9 +16,9 @@ version = "0.17.0" tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } diff --git a/crates/swc_ecma_compat_es2022/Cargo.toml b/crates/swc_ecma_compat_es2022/Cargo.toml index 98a16aedfe927..efd5bb5a5d145 100644 --- a/crates/swc_ecma_compat_es2022/Cargo.toml +++ b/crates/swc_ecma_compat_es2022/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_compat_es2022" repository = "/~https://github.com/swc-project/swc.git" -version = "0.17.0" +version = "0.17.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,12 +17,12 @@ tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } swc_ecma_compat_common = { version = "0.15.0", path = "../swc_ecma_compat_common" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_classes = { version = "0.139.0", path = "../swc_ecma_transforms_classes" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_classes = { version = "0.139.1", path = "../swc_ecma_transforms_classes" } swc_ecma_transforms_macros = { version = "0.5.5", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } diff --git a/crates/swc_ecma_compat_es3/Cargo.toml b/crates/swc_ecma_compat_es3/Cargo.toml index 3e510b26b38ae..ba6b271be0815 100644 --- a/crates/swc_ecma_compat_es3/Cargo.toml +++ b/crates/swc_ecma_compat_es3/Cargo.toml @@ -15,13 +15,13 @@ version = "0.17.0" [dependencies] tracing = { workspace = true } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } [dev-dependencies] -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } diff --git a/crates/swc_ecma_ext_transforms/Cargo.toml b/crates/swc_ecma_ext_transforms/Cargo.toml index 53a9e804f2c5d..94148ffe8d346 100644 --- a/crates/swc_ecma_ext_transforms/Cargo.toml +++ b/crates/swc_ecma_ext_transforms/Cargo.toml @@ -15,7 +15,7 @@ bench = false phf = { workspace = true, features = ["macros"] } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } diff --git a/crates/swc_ecma_lints/Cargo.toml b/crates/swc_ecma_lints/Cargo.toml index 27775c1bd104c..81c3f6258dbd4 100644 --- a/crates/swc_ecma_lints/Cargo.toml +++ b/crates/swc_ecma_lints/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_lints" repository = "/~https://github.com/swc-project/swc.git" -version = "0.105.0" +version = "0.105.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -21,21 +21,21 @@ regex = { workspace = true } serde = { workspace = true, features = ["derive"] } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "concurrent", ] } -swc_config = { version = "0.1.13", path = "../swc_config" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast", features = [ +swc_config = { version = "0.1.15", path = "../swc_config" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast", features = [ "serde", ] } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } [dev-dependencies] -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +testing = { version = "0.42.1", path = "../testing" } [features] non_critical_lints = [] diff --git a/crates/swc_ecma_loader/Cargo.toml b/crates/swc_ecma_loader/Cargo.toml index 6785f479d2db0..8eca3ccbfb9c2 100644 --- a/crates/swc_ecma_loader/Cargo.toml +++ b/crates/swc_ecma_loader/Cargo.toml @@ -38,7 +38,7 @@ tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } swc_cached = { version = "0.3.19", optional = true, path = "../swc_cached" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } [dev-dependencies] lazy_static = { workspace = true } diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index 29be5ff22839f..380064b61cc36 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"] license = "Apache-2.0" name = "swc_ecma_minifier" repository = "/~https://github.com/swc-project/swc.git" -version = "0.209.0" +version = "0.209.1" [package.metadata.docs.rs] all-features = true @@ -52,22 +52,22 @@ serde_json = { workspace = true } tracing = { workspace = true } -swc_allocator = { version = "0.1.9", path = "../swc_allocator", default-features = false } +swc_allocator = { version = "0.1.10", path = "../swc_allocator", default-features = false } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_config = { version = "0.1.13", path = "../swc_config", features = [ +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_config = { version = "0.1.15", path = "../swc_config", features = [ "sourcemap", ] } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast", features = [ +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast", features = [ "serde", ] } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_optimization = { version = "0.213.1", path = "../swc_ecma_transforms_optimization" } -swc_ecma_usage_analyzer = { version = "0.34.0", path = "../swc_ecma_usage_analyzer" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_optimization = { version = "0.213.2", path = "../swc_ecma_transforms_optimization" } +swc_ecma_usage_analyzer = { version = "0.34.1", path = "../swc_ecma_usage_analyzer" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_timer = { version = "0.27.0", path = "../swc_timer" } [dev-dependencies] @@ -78,10 +78,10 @@ pretty_assertions = { workspace = true } walkdir = { workspace = true } codspeed-criterion-compat = { workspace = true } -swc_allocator = { version = "0.1.9", path = "../swc_allocator" } +swc_allocator = { version = "0.1.10", path = "../swc_allocator" } swc_ecma_testing = { version = "0.29.0", path = "../swc_ecma_testing" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index badef722146e5..a2303dbdaa787 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_parser" repository = "/~https://github.com/swc-project/swc.git" -version = "0.152.1" +version = "0.152.2" [package.metadata.docs.rs] all-features = true @@ -37,9 +37,9 @@ typed-arena = { workspace = true } new_debug_unreachable = { workspace = true } phf = { workspace = true, features = ["macros"] } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit", optional = true } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit", optional = true } [target.'cfg(not(any(target_arch = "wasm32", target_arch = "arm")))'.dependencies] stacker = { version = "0.1.15", optional = true } @@ -51,12 +51,12 @@ serde_json = { workspace = true } walkdir = { workspace = true } codspeed-criterion-compat = { workspace = true } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast", features = [ +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast", features = [ "serde-impl", ] } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } [[example]] name = "lexer" diff --git a/crates/swc_ecma_preset_env/Cargo.toml b/crates/swc_ecma_preset_env/Cargo.toml index f8b043a07bd30..038dd80778de8 100644 --- a/crates/swc_ecma_preset_env/Cargo.toml +++ b/crates/swc_ecma_preset_env/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json", "data/**/*.json"] license = "Apache-2.0" name = "swc_ecma_preset_env" repository = { workspace = true } -version = "0.222.1" +version = "0.222.2" [lib] bench = false @@ -30,23 +30,23 @@ preset_env_base = { version = "0.6.0", path = "../preset_env_base" } rustc-hash = { workspace = true } string_enum = { version = "0.4.4", path = "../string_enum" } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } swc_ecma_transforms = { version = "0.244.0", path = "../swc_ecma_transforms", features = [ "compat", "proposal", ] } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } [dev-dependencies] codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } pretty_assertions = { workspace = true } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +testing = { version = "0.42.1", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_ecma_quote/Cargo.toml b/crates/swc_ecma_quote/Cargo.toml index af958cde9e24d..21f53c50afdf6 100644 --- a/crates/swc_ecma_quote/Cargo.toml +++ b/crates/swc_ecma_quote/Cargo.toml @@ -13,9 +13,9 @@ bench = false [dependencies] swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } swc_ecma_quote_macros = { version = "0.63.0", path = "../swc_ecma_quote_macros" } [dev-dependencies] -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_ecma_quote_macros/Cargo.toml b/crates/swc_ecma_quote_macros/Cargo.toml index 9b9944214f134..a566d378b294d 100644 --- a/crates/swc_ecma_quote_macros/Cargo.toml +++ b/crates/swc_ecma_quote_macros/Cargo.toml @@ -19,7 +19,7 @@ quote = { workspace = true } syn = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_macros_common = { version = "0.3.11", path = "../swc_macros_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_macros_common = { version = "0.3.14", path = "../swc_macros_common" } diff --git a/crates/swc_ecma_testing/Cargo.toml b/crates/swc_ecma_testing/Cargo.toml index d4e49eea610f3..e096725d6681c 100644 --- a/crates/swc_ecma_testing/Cargo.toml +++ b/crates/swc_ecma_testing/Cargo.toml @@ -17,4 +17,4 @@ hex = { workspace = true } sha2 = { workspace = true } tracing = { workspace = true } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_ecma_transforms/Cargo.toml b/crates/swc_ecma_transforms/Cargo.toml index 4b062dbb7db02..baa699c35cf75 100644 --- a/crates/swc_ecma_transforms/Cargo.toml +++ b/crates/swc_ecma_transforms/Cargo.toml @@ -33,24 +33,24 @@ typescript = ["swc_ecma_transforms_typescript"] [dependencies] swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat", optional = true } swc_ecma_transforms_module = { version = "0.195.0", path = "../swc_ecma_transforms_module", optional = true } -swc_ecma_transforms_optimization = { version = "0.213.1", path = "../swc_ecma_transforms_optimization", optional = true } -swc_ecma_transforms_proposal = { version = "0.184.0", path = "../swc_ecma_transforms_proposal", optional = true } -swc_ecma_transforms_react = { version = "0.196.0", path = "../swc_ecma_transforms_react", optional = true } -swc_ecma_transforms_typescript = { version = "0.203.0", path = "../swc_ecma_transforms_typescript", optional = true } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_transforms_optimization = { version = "0.213.2", path = "../swc_ecma_transforms_optimization", optional = true } +swc_ecma_transforms_proposal = { version = "0.184.1", path = "../swc_ecma_transforms_proposal", optional = true } +swc_ecma_transforms_react = { version = "0.196.1", path = "../swc_ecma_transforms_react", optional = true } +swc_ecma_transforms_typescript = { version = "0.203.1", path = "../swc_ecma_transforms_typescript", optional = true } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } [dev-dependencies] pretty_assertions = { workspace = true } sourcemap = { workspace = true } tempfile = { workspace = true } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_ecma_transforms_base/Cargo.toml b/crates/swc_ecma_transforms_base/Cargo.toml index 7925a517c81ea..ad95b207b86b4 100644 --- a/crates/swc_ecma_transforms_base/Cargo.toml +++ b/crates/swc_ecma_transforms_base/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.js"] license = "Apache-2.0" name = "swc_ecma_transforms_base" repository = "/~https://github.com/swc-project/swc.git" -version = "0.150.0" +version = "0.150.1" [lib] bench = false @@ -17,7 +17,7 @@ concurrent = ["concurrent-renamer", "rayon", "swc_ecma_utils/concurrent" concurrent-renamer = ["rayon"] [dependencies] -better_scoped_tls = { version = "0.1.1", path = "../better_scoped_tls" } +better_scoped_tls = { version = "0.1.2", path = "../better_scoped_tls" } bitflags = { workspace = true } indexmap = { workspace = true } once_cell = { workspace = true } @@ -29,21 +29,21 @@ smallvec = { workspace = true } tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } [dev-dependencies] codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } rayon = { workspace = true } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } swc_ecma_transforms_macros = { version = "0.5.5", path = "../swc_ecma_transforms_macros" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_ecma_transforms_classes/Cargo.toml b/crates/swc_ecma_transforms_classes/Cargo.toml index 4e89d8c4bec00..bc29e6985404f 100644 --- a/crates/swc_ecma_transforms_classes/Cargo.toml +++ b/crates/swc_ecma_transforms_classes/Cargo.toml @@ -6,15 +6,15 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_transforms_classes" repository = "/~https://github.com/swc-project/swc.git" -version = "0.139.0" +version = "0.139.1" [lib] bench = false [dependencies] swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } diff --git a/crates/swc_ecma_transforms_compat/Cargo.toml b/crates/swc_ecma_transforms_compat/Cargo.toml index f5e509729b5b1..43c1e5303e9ce 100644 --- a/crates/swc_ecma_transforms_compat/Cargo.toml +++ b/crates/swc_ecma_transforms_compat/Cargo.toml @@ -30,30 +30,30 @@ smallvec = { workspace = true } tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_config = { version = "0.1.13", path = "../swc_config" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_compat_bugfixes = { version = "0.17.0", path = "../swc_ecma_compat_bugfixes" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_config = { version = "0.1.15", path = "../swc_config" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_compat_bugfixes = { version = "0.17.1", path = "../swc_ecma_compat_bugfixes" } swc_ecma_compat_common = { version = "0.15.0", path = "../swc_ecma_compat_common" } -swc_ecma_compat_es2015 = { version = "0.17.0", path = "../swc_ecma_compat_es2015" } +swc_ecma_compat_es2015 = { version = "0.17.1", path = "../swc_ecma_compat_es2015" } swc_ecma_compat_es2016 = { version = "0.17.0", path = "../swc_ecma_compat_es2016" } swc_ecma_compat_es2017 = { version = "0.17.0", path = "../swc_ecma_compat_es2017" } swc_ecma_compat_es2018 = { version = "0.17.0", path = "../swc_ecma_compat_es2018" } swc_ecma_compat_es2019 = { version = "0.17.0", path = "../swc_ecma_compat_es2019" } swc_ecma_compat_es2020 = { version = "0.17.0", path = "../swc_ecma_compat_es2020" } swc_ecma_compat_es2021 = { version = "0.17.0", path = "../swc_ecma_compat_es2021" } -swc_ecma_compat_es2022 = { version = "0.17.0", path = "../swc_ecma_compat_es2022" } +swc_ecma_compat_es2022 = { version = "0.17.1", path = "../swc_ecma_compat_es2022" } swc_ecma_compat_es3 = { version = "0.17.0", path = "../swc_ecma_compat_es3" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_classes = { version = "0.139.0", path = "../swc_ecma_transforms_classes" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_classes = { version = "0.139.1", path = "../swc_ecma_transforms_classes" } swc_ecma_transforms_macros = { version = "0.5.5", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } [dev-dependencies] serde_json = { workspace = true } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_ecma_transforms_macros/Cargo.toml b/crates/swc_ecma_transforms_macros/Cargo.toml index 4d33adec96af2..38eb0497bad4f 100644 --- a/crates/swc_ecma_transforms_macros/Cargo.toml +++ b/crates/swc_ecma_transforms_macros/Cargo.toml @@ -17,4 +17,4 @@ proc-macro2 = { workspace = true } quote = { workspace = true } syn = { workspace = true, features = ["fold", "parsing", "full"] } -swc_macros_common = { version = "0.3.11", path = "../swc_macros_common" } +swc_macros_common = { version = "0.3.14", path = "../swc_macros_common" } diff --git a/crates/swc_ecma_transforms_module/Cargo.toml b/crates/swc_ecma_transforms_module/Cargo.toml index 81b443e6a10c6..3a88f9a350cc9 100644 --- a/crates/swc_ecma_transforms_module/Cargo.toml +++ b/crates/swc_ecma_transforms_module/Cargo.toml @@ -26,15 +26,15 @@ tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } swc_cached = { version = "0.3.19", path = "../swc_cached" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader", features = [ "node", ] } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } [dev-dependencies] indexmap = { workspace = true, features = ["serde"] } @@ -45,6 +45,6 @@ swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader", features = "tsc", ] } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } -swc_ecma_transforms_typescript = { version = "0.203.0", path = "../swc_ecma_transforms_typescript" } -testing = { version = "0.42.0", path = "../testing/" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_typescript = { version = "0.203.1", path = "../swc_ecma_transforms_typescript" } +testing = { version = "0.42.1", path = "../testing/" } diff --git a/crates/swc_ecma_transforms_optimization/Cargo.toml b/crates/swc_ecma_transforms_optimization/Cargo.toml index dea197555c0f2..33b5ea61aaaca 100644 --- a/crates/swc_ecma_transforms_optimization/Cargo.toml +++ b/crates/swc_ecma_transforms_optimization/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_optimization" repository = "/~https://github.com/swc-project/swc.git" -version = "0.213.1" +version = "0.213.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -32,20 +32,20 @@ serde_json = { workspace = true } tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_macros = { version = "0.5.5", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } -swc_fast_graph = { version = "1.0.0", path = "../swc_fast_graph" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } +swc_fast_graph = { version = "1.0.1", path = "../swc_fast_graph" } [dev-dependencies] swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat" } swc_ecma_transforms_module = { version = "0.195.0", path = "../swc_ecma_transforms_module" } -swc_ecma_transforms_proposal = { version = "0.184.0", path = "../swc_ecma_transforms_proposal" } -swc_ecma_transforms_react = { version = "0.196.0", path = "../swc_ecma_transforms_react" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } -swc_ecma_transforms_typescript = { version = "0.203.0", path = "../swc_ecma_transforms_typescript" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_transforms_proposal = { version = "0.184.1", path = "../swc_ecma_transforms_proposal" } +swc_ecma_transforms_react = { version = "0.196.1", path = "../swc_ecma_transforms_react" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } +swc_ecma_transforms_typescript = { version = "0.203.1", path = "../swc_ecma_transforms_typescript" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index f4c9b044b967c..30a132fb10973 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_proposal" repository = "/~https://github.com/swc-project/swc.git" -version = "0.184.0" +version = "0.184.1" [lib] bench = false @@ -23,20 +23,20 @@ serde = { workspace = true, features = ["derive"] } smallvec = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader", optional = true } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_classes = { version = "0.139.0", path = "../swc_ecma_transforms_classes" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_classes = { version = "0.139.1", path = "../swc_ecma_transforms_classes" } swc_ecma_transforms_macros = { version = "0.5.5", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } [dev-dependencies] serde_json = { workspace = true } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_ecma_transforms_react/Cargo.toml b/crates/swc_ecma_transforms_react/Cargo.toml index 19411075af9ce..97d7fc3fb1fdc 100644 --- a/crates/swc_ecma_transforms_react/Cargo.toml +++ b/crates/swc_ecma_transforms_react/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_react" repository = "/~https://github.com/swc-project/swc.git" -version = "0.196.0" +version = "0.196.1" [lib] bench = false @@ -27,19 +27,19 @@ serde = { workspace = true, features = ["derive"], optional = true } sha1 = { workspace = true } string_enum = { version = "0.4.4", path = "../string_enum" } -swc_allocator = { version = "0.1.9", path = "../swc_allocator", default-features = false } +swc_allocator = { version = "0.1.10", path = "../swc_allocator", default-features = false } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_config = { version = "0.1.13", path = "../swc_config" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_config = { version = "0.1.15", path = "../swc_config" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } swc_ecma_transforms_macros = { version = "0.5.5", path = "../swc_ecma_transforms_macros" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } [dev-dependencies] -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen/" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen/" } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat/" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_ecma_transforms_testing/Cargo.toml b/crates/swc_ecma_transforms_testing/Cargo.toml index 7a8d5de977a25..52a12a81823fe 100644 --- a/crates/swc_ecma_transforms_testing/Cargo.toml +++ b/crates/swc_ecma_transforms_testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_transforms_testing" repository = "/~https://github.com/swc-project/swc.git" -version = "0.155.0" +version = "0.155.1" [lib] bench = false @@ -22,14 +22,14 @@ sha2 = { workspace = true } sourcemap = { workspace = true } tempfile = { workspace = true } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "sourcemap", ] } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } swc_ecma_testing = { version = "0.29.0", path = "../swc_ecma_testing" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index 17f78216cf20f..36564e0299617 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.203.0" +version = "0.203.1" [lib] bench = false @@ -17,23 +17,23 @@ serde = { workspace = true, features = ["derive"] } ryu-js = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_react = { version = "0.196.0", path = "../swc_ecma_transforms_react" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_react = { version = "0.196.1", path = "../swc_ecma_transforms_react" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } [dev-dependencies] codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } swc_ecma_transforms_compat = { version = "0.176.0", path = "../swc_ecma_transforms_compat" } -swc_ecma_transforms_proposal = { version = "0.184.0", path = "../swc_ecma_transforms_proposal" } -swc_ecma_transforms_testing = { version = "0.155.0", path = "../swc_ecma_transforms_testing" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_transforms_proposal = { version = "0.184.1", path = "../swc_ecma_transforms_proposal" } +swc_ecma_transforms_testing = { version = "0.155.1", path = "../swc_ecma_transforms_testing" } +testing = { version = "0.42.1", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_ecma_usage_analyzer/Cargo.toml b/crates/swc_ecma_usage_analyzer/Cargo.toml index 32de39a4a05fe..6f33336f34bee 100644 --- a/crates/swc_ecma_usage_analyzer/Cargo.toml +++ b/crates/swc_ecma_usage_analyzer/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_usage_analyzer" repository = "/~https://github.com/swc-project/swc.git" -version = "0.34.0" +version = "0.34.1" [package.metadata.docs.rs] all-features = true @@ -28,8 +28,8 @@ rustc-hash = { workspace = true } tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_timer = { version = "0.27.0", path = "../swc_timer" } diff --git a/crates/swc_ecma_utils/Cargo.toml b/crates/swc_ecma_utils/Cargo.toml index 615a250f1ffaf..46fcbed4fa924 100644 --- a/crates/swc_ecma_utils/Cargo.toml +++ b/crates/swc_ecma_utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_ecma_utils" repository = "/~https://github.com/swc-project/swc.git" -version = "0.138.0" +version = "0.138.1" [package.metadata.docs.rs] all-features = true @@ -30,13 +30,13 @@ tracing = { workspace = true } unicode-id = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } [target.'cfg(not(any(target_arch = "wasm32", target_arch = "arm")))'.dependencies] stacker = { version = "0.1.15", optional = true } [dev-dependencies] -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_ecma_visit/Cargo.toml b/crates/swc_ecma_visit/Cargo.toml index 3e70113e5159a..0f8b57d07110d 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.107.0" +version = "0.107.1" [package.metadata.docs.rs] all-features = true @@ -27,6 +27,6 @@ serde = { workspace = true, optional = true } tracing = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } swc_visit = { version = "0.6.0", path = "../swc_visit" } diff --git a/crates/swc_ecmascript/Cargo.toml b/crates/swc_ecmascript/Cargo.toml index 457fbd98269a6..ae285857b5bbf 100644 --- a/crates/swc_ecmascript/Cargo.toml +++ b/crates/swc_ecmascript/Cargo.toml @@ -38,14 +38,14 @@ react = ["swc_ecma_transforms/react"] typescript = ["typescript-parser", "swc_ecma_transforms/typescript"] [dependencies] -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen", optional = true } -swc_ecma_minifier = { version = "0.209.0", path = "../swc_ecma_minifier", optional = true } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser", optional = true, default-features = false } -swc_ecma_preset_env = { version = "0.222.1", path = "../swc_ecma_preset_env", optional = true } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen", optional = true } +swc_ecma_minifier = { version = "0.209.1", path = "../swc_ecma_minifier", optional = true } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser", optional = true, default-features = false } +swc_ecma_preset_env = { version = "0.222.2", path = "../swc_ecma_preset_env", optional = true } swc_ecma_quote = { version = "0.68.0", path = "../swc_ecma_quote", optional = true } swc_ecma_transforms = { version = "0.244.0", path = "../swc_ecma_transforms", optional = true } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils", optional = true } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit", optional = true } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils", optional = true } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit", optional = true } [dev-dependencies] diff --git a/crates/swc_error_reporters/Cargo.toml b/crates/swc_error_reporters/Cargo.toml index fc0a3579a6d6f..615b65a700f00 100644 --- a/crates/swc_error_reporters/Cargo.toml +++ b/crates/swc_error_reporters/Cargo.toml @@ -17,6 +17,6 @@ miette = { workspace = true, features = ["fancy-no-syscall"] } once_cell = { workspace = true } parking_lot = { workspace = true } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "concurrent", ] } diff --git a/crates/swc_estree_ast/Cargo.toml b/crates/swc_estree_ast/Cargo.toml index 756d4b705c30b..6533088fae136 100644 --- a/crates/swc_estree_ast/Cargo.toml +++ b/crates/swc_estree_ast/Cargo.toml @@ -25,6 +25,6 @@ serde-impl = ["serde"] serde = { workspace = true, features = ["derive"], optional = true } serde_json = { workspace = true } -better_scoped_tls = { version = "0.1.1", path = "../better_scoped_tls" } +better_scoped_tls = { version = "0.1.2", path = "../better_scoped_tls" } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } diff --git a/crates/swc_estree_compat/Cargo.toml b/crates/swc_estree_compat/Cargo.toml index 96434157227e2..beba5879c25d1 100644 --- a/crates/swc_estree_compat/Cargo.toml +++ b/crates/swc_estree_compat/Cargo.toml @@ -25,14 +25,14 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "sourcemap", "tty-emitter", ] } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_estree_ast = { version = "0.30.0", path = "../swc_estree_ast" } swc_node_comments = { version = "0.27.0", path = "../swc_node_comments/" } @@ -41,11 +41,11 @@ codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } pretty_assertions = { workspace = true } -swc = { version = "0.290.0", path = "../swc" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } +swc = { version = "0.290.1", path = "../swc" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } swc_ecma_transforms = { version = "0.244.0", path = "../swc_ecma_transforms/" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } walkdir = { workspace = true } [[bench]] diff --git a/crates/swc_fast_graph/Cargo.toml b/crates/swc_fast_graph/Cargo.toml index 77e4e3f19fa34..74427e9343102 100644 --- a/crates/swc_fast_graph/Cargo.toml +++ b/crates/swc_fast_graph/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_fast_graph" repository = "/~https://github.com/swc-project/swc.git" -version = "1.0.0" +version = "1.0.1" [lib] bench = false @@ -16,4 +16,4 @@ indexmap = { workspace = true } petgraph = { workspace = true } rustc-hash = { workspace = true } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } diff --git a/crates/swc_fast_ts_strip/Cargo.toml b/crates/swc_fast_ts_strip/Cargo.toml index 5e4e008651c47..0e958c0e311dc 100644 --- a/crates/swc_fast_ts_strip/Cargo.toml +++ b/crates/swc_fast_ts_strip/Cargo.toml @@ -15,22 +15,22 @@ anyhow = { workspace = true } serde = { workspace = true, features = ["derive"] } wasm-bindgen = { workspace = true, optional = true } -swc_allocator = { version = "0.1.9", path = "../swc_allocator", default-features = false } +swc_allocator = { version = "0.1.10", path = "../swc_allocator", default-features = false } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "sourcemap", ] } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_transforms_typescript = { version = "0.203.0", path = "../swc_ecma_transforms_typescript" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_transforms_typescript = { version = "0.203.1", path = "../swc_ecma_transforms_typescript" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } [dev-dependencies] codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_graph_analyzer/Cargo.toml b/crates/swc_graph_analyzer/Cargo.toml index dc602cbf0fa69..b35e587a5bfb9 100644 --- a/crates/swc_graph_analyzer/Cargo.toml +++ b/crates/swc_graph_analyzer/Cargo.toml @@ -14,9 +14,9 @@ bench = false [dependencies] auto_impl = { workspace = true } petgraph = { workspace = true } -swc_common = { version = "0.40.1", path = "../swc_common/" } -swc_fast_graph = { version = "1.0.0", path = "../swc_fast_graph/" } +swc_common = { version = "0.40.2", path = "../swc_common/" } +swc_fast_graph = { version = "1.0.1", path = "../swc_fast_graph/" } tracing = { workspace = true } [dev-dependencies] -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_html/Cargo.toml b/crates/swc_html/Cargo.toml index 363c54d7395d3..57e8f5974a018 100644 --- a/crates/swc_html/Cargo.toml +++ b/crates/swc_html/Cargo.toml @@ -23,7 +23,7 @@ minifier = ["swc_html_minifier"] [dependencies] swc_html_ast = { version = "0.40.1", path = "../swc_html_ast" } -swc_html_codegen = { version = "0.49.0", path = "../swc_html_codegen" } +swc_html_codegen = { version = "0.49.1", path = "../swc_html_codegen" } swc_html_minifier = { version = "0.151.0", path = "../swc_html_minifier", optional = true, default-features = false } -swc_html_parser = { version = "0.46.0", path = "../swc_html_parser" } +swc_html_parser = { version = "0.46.1", path = "../swc_html_parser" } swc_html_visit = { version = "0.40.0", path = "../swc_html_visit" } diff --git a/crates/swc_html_ast/Cargo.toml b/crates/swc_html_ast/Cargo.toml index 16325fc88733f..49eb86c00b679 100644 --- a/crates/swc_html_ast/Cargo.toml +++ b/crates/swc_html_ast/Cargo.toml @@ -26,4 +26,4 @@ serde = { workspace = true, features = ["derive"], optional = true } string_enum = { version = "0.4.4", path = "../string_enum/" } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } diff --git a/crates/swc_html_codegen/Cargo.toml b/crates/swc_html_codegen/Cargo.toml index c3b8212e13eaa..06d010c02eaea 100644 --- a/crates/swc_html_codegen/Cargo.toml +++ b/crates/swc_html_codegen/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = { workspace = true } name = "swc_html_codegen" repository = "/~https://github.com/swc-project/swc.git" -version = "0.49.0" +version = "0.49.1" [lib] bench = false @@ -21,15 +21,15 @@ bitflags = { workspace = true } rustc-hash = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_html_ast = { version = "0.40.1", path = "../swc_html_ast" } swc_html_codegen_macros = { version = "0.2.4", path = "../swc_html_codegen_macros" } swc_html_utils = { version = "0.25.0", path = "../swc_html_utils" } [dev-dependencies] -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "sourcemap", ] } -swc_html_parser = { version = "0.46.0", path = "../swc_html_parser" } +swc_html_parser = { version = "0.46.1", path = "../swc_html_parser" } swc_html_visit = { version = "0.40.0", path = "../swc_html_visit" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_html_codegen_macros/Cargo.toml b/crates/swc_html_codegen_macros/Cargo.toml index f0fe5dd9cc3a1..d69b4c5f06112 100644 --- a/crates/swc_html_codegen_macros/Cargo.toml +++ b/crates/swc_html_codegen_macros/Cargo.toml @@ -20,4 +20,4 @@ proc-macro2 = { workspace = true } quote = { workspace = true } syn = { workspace = true, features = ["fold"] } -swc_macros_common = { version = "0.3.11", path = "../swc_macros_common" } +swc_macros_common = { version = "0.3.14", path = "../swc_macros_common" } diff --git a/crates/swc_html_minifier/Cargo.toml b/crates/swc_html_minifier/Cargo.toml index dfd6fe04f4d82..86354c4edbad2 100644 --- a/crates/swc_html_minifier/Cargo.toml +++ b/crates/swc_html_minifier/Cargo.toml @@ -27,24 +27,24 @@ serde_json = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } swc_cached = { version = "0.3.19", path = "../swc_cached" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast", optional = true } -swc_css_codegen = { version = "0.158.0", path = "../swc_css_codegen", optional = true } +swc_css_codegen = { version = "0.158.1", path = "../swc_css_codegen", optional = true } swc_css_minifier = { version = "0.123.0", path = "../swc_css_minifier", optional = true } -swc_css_parser = { version = "0.157.0", path = "../swc_css_parser", optional = true } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen", features = [ +swc_css_parser = { version = "0.157.1", path = "../swc_css_parser", optional = true } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen", features = [ "serde-impl", ] } -swc_ecma_minifier = { version = "0.209.0", path = "../swc_ecma_minifier", features = [ +swc_ecma_minifier = { version = "0.209.1", path = "../swc_ecma_minifier", features = [ "extra-serde", ] } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_transforms_base = { version = "0.150.0", path = "../swc_ecma_transforms_base" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_transforms_base = { version = "0.150.1", path = "../swc_ecma_transforms_base" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_html_ast = { version = "0.40.1", path = "../swc_html_ast" } -swc_html_codegen = { version = "0.49.0", path = "../swc_html_codegen" } -swc_html_parser = { version = "0.46.0", path = "../swc_html_parser" } +swc_html_codegen = { version = "0.49.1", path = "../swc_html_codegen" } +swc_html_parser = { version = "0.46.1", path = "../swc_html_parser" } swc_html_utils = { version = "0.25.0", path = "../swc_html_utils" } swc_html_visit = { version = "0.40.0", path = "../swc_html_visit" } @@ -53,7 +53,7 @@ codspeed-criterion-compat = { workspace = true } criterion = { workspace = true } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_html_parser/Cargo.toml b/crates/swc_html_parser/Cargo.toml index 0ac24e3c1b75a..dec16b7d66cf6 100644 --- a/crates/swc_html_parser/Cargo.toml +++ b/crates/swc_html_parser/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/**/*.json"] license = { workspace = true } name = "swc_html_parser" repository = "/~https://github.com/swc-project/swc.git" -version = "0.46.0" +version = "0.46.1" [lib] bench = false @@ -20,7 +20,7 @@ debug = [] [dependencies] swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_html_ast = { version = "0.40.1", path = "../swc_html_ast" } swc_html_utils = { version = "0.25.0", path = "../swc_html_utils" } @@ -35,7 +35,7 @@ swc_html_ast = { version = "0.40.1", path = "../swc_html_ast", features = [ ] } swc_html_visit = { version = "0.40.0", path = "../swc_html_visit" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } [[bench]] harness = false diff --git a/crates/swc_html_utils/Cargo.toml b/crates/swc_html_utils/Cargo.toml index b84f5d4ee2938..575c156e22923 100644 --- a/crates/swc_html_utils/Cargo.toml +++ b/crates/swc_html_utils/Cargo.toml @@ -21,4 +21,4 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } diff --git a/crates/swc_html_visit/Cargo.toml b/crates/swc_html_visit/Cargo.toml index 828d689e2a199..2b1c94dcbfb38 100644 --- a/crates/swc_html_visit/Cargo.toml +++ b/crates/swc_html_visit/Cargo.toml @@ -26,6 +26,6 @@ path = [] serde = { workspace = true, optional = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_html_ast = { version = "0.40.1", path = "../swc_html_ast" } swc_visit = { version = "0.6.0", path = "../swc_visit" } diff --git a/crates/swc_macros_common/Cargo.toml b/crates/swc_macros_common/Cargo.toml index 587dccefd9974..2665d3be245c4 100644 --- a/crates/swc_macros_common/Cargo.toml +++ b/crates/swc_macros_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_macros_common" repository = "/~https://github.com/swc-project/swc.git" -version = "0.3.13" +version = "0.3.14" [lib] bench = false diff --git a/crates/swc_node_bundler/Cargo.toml b/crates/swc_node_bundler/Cargo.toml index ca41643a190b2..a4fd332e77f88 100644 --- a/crates/swc_node_bundler/Cargo.toml +++ b/crates/swc_node_bundler/Cargo.toml @@ -29,24 +29,24 @@ serde_json = { workspace = true } tracing = { workspace = true } string_enum = { version = "0.4.4", path = "../string_enum" } -swc = { version = "0.290.0", path = "../swc" } +swc = { version = "0.290.1", path = "../swc" } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_bundler = { version = "0.242.0", path = "../swc_bundler", features = [ +swc_bundler = { version = "0.242.1", path = "../swc_bundler", features = [ "concurrent", ] } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "concurrent", ] } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } swc_ecma_transforms = { version = "0.244.0", path = "../swc_ecma_transforms" } -swc_ecma_utils = { version = "0.138.0", path = "../swc_ecma_utils" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_utils = { version = "0.138.1", path = "../swc_ecma_utils" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } [dev-dependencies] pretty_assertions = { workspace = true } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_node_comments/Cargo.toml b/crates/swc_node_comments/Cargo.toml index 60496be6e97f2..64d530e90f987 100644 --- a/crates/swc_node_comments/Cargo.toml +++ b/crates/swc_node_comments/Cargo.toml @@ -18,4 +18,4 @@ bench = false dashmap = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } diff --git a/crates/swc_plugin/Cargo.toml b/crates/swc_plugin/Cargo.toml index 2a5ba479c55e8..2a8156f2858f3 100644 --- a/crates/swc_plugin/Cargo.toml +++ b/crates/swc_plugin/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0" name = "swc_plugin" repository = "/~https://github.com/swc-project/swc.git" -version = "0.90.2" +version = "0.90.3" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_plugin_proxy/Cargo.toml b/crates/swc_plugin_proxy/Cargo.toml index db04f4b911c72..f92c78c01bc2e 100644 --- a/crates/swc_plugin_proxy/Cargo.toml +++ b/crates/swc_plugin_proxy/Cargo.toml @@ -25,7 +25,7 @@ plugin-rt = ["__plugin_rt", "swc_common/plugin-base", "rkyv-impl"] rkyv = { workspace = true, features = ["validation"], optional = true } tracing = { workspace = true } -better_scoped_tls = { version = "0.1.1", path = "../better_scoped_tls" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +better_scoped_tls = { version = "0.1.2", path = "../better_scoped_tls" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } swc_trace_macro = { version = "1.0.0", path = "../swc_trace_macro" } diff --git a/crates/swc_plugin_runner/Cargo.toml b/crates/swc_plugin_runner/Cargo.toml index cb3c2f2b5e1db..5d41a51638e35 100644 --- a/crates/swc_plugin_runner/Cargo.toml +++ b/crates/swc_plugin_runner/Cargo.toml @@ -63,11 +63,11 @@ virtual-fs = { workspace = true } wasmer = { workspace = true } wasmer-wasix = { workspace = true } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "concurrent", ] } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast", optional = true } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast", optional = true } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast", optional = true } swc_plugin_proxy = { version = "0.50.1", path = "../swc_plugin_proxy" } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] @@ -82,15 +82,15 @@ swc_atoms = { version = "1.0.2", path = '../swc_atoms' } swc_css_ast = { version = "0.147.0", path = "../swc_css_ast", features = [ "rkyv-impl", ] } -swc_css_parser = { version = "0.157.0", path = "../swc_css_parser" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast", features = [ +swc_css_parser = { version = "0.157.1", path = "../swc_css_parser" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast", features = [ "rkyv-impl", ] } swc_ecma_loader = { version = "0.52.1", path = "../swc_ecma_loader" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -swc_ecma_visit = { version = "0.107.0", path = "../swc_ecma_visit" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +swc_ecma_visit = { version = "0.107.1", path = "../swc_ecma_visit" } swc_malloc = { version = "0.5.10", path = "../swc_malloc" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } tokio = { workspace = true, features = ["rt"] } [[bench]] diff --git a/crates/swc_timer/Cargo.toml b/crates/swc_timer/Cargo.toml index 12685567e8647..8c1ad6967eed0 100644 --- a/crates/swc_timer/Cargo.toml +++ b/crates/swc_timer/Cargo.toml @@ -15,4 +15,4 @@ bench = false tracing = { workspace = true } [dev-dependencies] -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_transform_common/Cargo.toml b/crates/swc_transform_common/Cargo.toml index eef6ab10d4843..b3987f6e40ab5 100644 --- a/crates/swc_transform_common/Cargo.toml +++ b/crates/swc_transform_common/Cargo.toml @@ -18,4 +18,4 @@ rustc-hash = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } -better_scoped_tls = { version = "0.1.1", path = "../better_scoped_tls" } +better_scoped_tls = { version = "0.1.2", path = "../better_scoped_tls" } diff --git a/crates/swc_typescript/Cargo.toml b/crates/swc_typescript/Cargo.toml index dadef6cb1a3ac..787eae6a19221 100644 --- a/crates/swc_typescript/Cargo.toml +++ b/crates/swc_typescript/Cargo.toml @@ -6,17 +6,17 @@ edition = "2021" license = "Apache-2.0" name = "swc_typescript" repository = { workspace = true } -version = "0.8.0" +version = "0.8.1" [dependencies] thiserror = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } -swc_ecma_ast = { version = "0.121.1", path = "../swc_ecma_ast" } +swc_common = { version = "0.40.2", path = "../swc_common" } +swc_ecma_ast = { version = "0.121.2", path = "../swc_ecma_ast" } [dev-dependencies] -swc_ecma_codegen = { version = "0.158.1", path = "../swc_ecma_codegen" } -swc_ecma_parser = { version = "0.152.1", path = "../swc_ecma_parser" } -testing = { version = "0.42.0", path = "../testing" } +swc_ecma_codegen = { version = "0.158.2", path = "../swc_ecma_codegen" } +swc_ecma_parser = { version = "0.152.2", path = "../swc_ecma_parser" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_xml/Cargo.toml b/crates/swc_xml/Cargo.toml index d6d1bdf73c047..14969b66c6447 100644 --- a/crates/swc_xml/Cargo.toml +++ b/crates/swc_xml/Cargo.toml @@ -20,6 +20,6 @@ bench = false [dependencies] swc_xml_ast = { version = "0.19.0", path = "../swc_xml_ast" } -swc_xml_codegen = { version = "0.20.0", path = "../swc_xml_codegen" } +swc_xml_codegen = { version = "0.20.1", path = "../swc_xml_codegen" } swc_xml_parser = { version = "0.20.0", path = "../swc_xml_parser" } swc_xml_visit = { version = "0.19.0", path = "../swc_xml_visit" } diff --git a/crates/swc_xml_ast/Cargo.toml b/crates/swc_xml_ast/Cargo.toml index 3718ac12e5ef5..b7e61a0569eb7 100644 --- a/crates/swc_xml_ast/Cargo.toml +++ b/crates/swc_xml_ast/Cargo.toml @@ -23,4 +23,4 @@ serde = { workspace = true, features = ["derive"], optional = true } string_enum = { version = "0.4.4", path = "../string_enum/" } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } diff --git a/crates/swc_xml_codegen/Cargo.toml b/crates/swc_xml_codegen/Cargo.toml index 9eb9ed845a9e1..686bc2baaa46f 100644 --- a/crates/swc_xml_codegen/Cargo.toml +++ b/crates/swc_xml_codegen/Cargo.toml @@ -10,7 +10,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = { workspace = true } name = "swc_xml_codegen" repository = "/~https://github.com/swc-project/swc.git" -version = "0.20.0" +version = "0.20.1" [lib] bench = false @@ -21,14 +21,14 @@ bitflags = { workspace = true } rustc-hash = { workspace = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_xml_ast = { version = "0.19.0", path = "../swc_xml_ast" } swc_xml_codegen_macros = { version = "0.1.4", path = "../swc_xml_codegen_macros" } [dev-dependencies] -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "sourcemap", ] } swc_xml_parser = { version = "0.20.0", path = "../swc_xml_parser" } swc_xml_visit = { version = "0.19.0", path = "../swc_xml_visit" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_xml_codegen_macros/Cargo.toml b/crates/swc_xml_codegen_macros/Cargo.toml index 20a2eaf92339e..8e6cb321ed9e8 100644 --- a/crates/swc_xml_codegen_macros/Cargo.toml +++ b/crates/swc_xml_codegen_macros/Cargo.toml @@ -20,4 +20,4 @@ proc-macro2 = { workspace = true } quote = { workspace = true } syn = { workspace = true, features = ["fold"] } -swc_macros_common = { version = "0.3.11", path = "../swc_macros_common" } +swc_macros_common = { version = "0.3.14", path = "../swc_macros_common" } diff --git a/crates/swc_xml_parser/Cargo.toml b/crates/swc_xml_parser/Cargo.toml index 4484d4b2c71a4..c3f0874b3d94a 100644 --- a/crates/swc_xml_parser/Cargo.toml +++ b/crates/swc_xml_parser/Cargo.toml @@ -20,7 +20,7 @@ debug = [] [dependencies] swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_xml_ast = { version = "0.19.0", path = "../swc_xml_ast" } [dev-dependencies] @@ -31,4 +31,4 @@ swc_xml_ast = { version = "0.19.0", path = "../swc_xml_ast", features = [ "serde-impl", ] } swc_xml_visit = { version = "0.19.0", path = "../swc_xml_visit" } -testing = { version = "0.42.0", path = "../testing" } +testing = { version = "0.42.1", path = "../testing" } diff --git a/crates/swc_xml_visit/Cargo.toml b/crates/swc_xml_visit/Cargo.toml index f69277abc06ae..0ad57f23f9b2f 100644 --- a/crates/swc_xml_visit/Cargo.toml +++ b/crates/swc_xml_visit/Cargo.toml @@ -26,6 +26,6 @@ path = [] serde = { workspace = true, optional = true } swc_atoms = { version = "1.0.2", path = "../swc_atoms" } -swc_common = { version = "0.40.1", path = "../swc_common" } +swc_common = { version = "0.40.2", path = "../swc_common" } swc_visit = { version = "0.6.0", path = "../swc_visit" } swc_xml_ast = { version = "0.19.0", path = "../swc_xml_ast" } diff --git a/crates/testing/Cargo.toml b/crates/testing/Cargo.toml index 9a6500e3966f0..ab4d76ffec312 100644 --- a/crates/testing/Cargo.toml +++ b/crates/testing/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "testing" repository = "/~https://github.com/swc-project/swc.git" -version = "0.42.0" +version = "0.42.1" [lib] bench = false @@ -23,7 +23,7 @@ serde_json = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } -swc_common = { version = "0.40.1", path = "../swc_common", features = [ +swc_common = { version = "0.40.2", path = "../swc_common", features = [ "tty-emitter", ] } swc_error_reporters = { version = "1.0.0", path = "../swc_error_reporters" } From e2fe50bf6cdc4b27ca72ed2e3e871f7540df63fa Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 8 Oct 2024 09:00:24 +0000 Subject: [PATCH 8/9] chore: Publish `1.7.31-nightly-20241008.2` with `swc_core` `v0.109.0` --- bindings/Cargo.lock | 52 ++++++------------- 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/html/package.json | 2 +- .../scripts/npm/darwin-arm64/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-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-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 +- 36 files changed, 51 insertions(+), 73 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 82c0a61f46a33..5e67c2e181817 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "Inflector" @@ -249,7 +249,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.31-nightly-20241008.1" +version = "1.7.31-nightly-20241008.2" dependencies = [ "anyhow", "getrandom", @@ -336,7 +336,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.31-nightly-20241008.1" +version = "1.7.31-nightly-20241008.2" dependencies = [ "anyhow", "getrandom", @@ -349,7 +349,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.31-nightly-20241008.1" +version = "1.7.31-nightly-20241008.2" dependencies = [ "anyhow", "getrandom", @@ -876,7 +876,7 @@ dependencies = [ "cssparser-macros", "dtoa-short", "itoa", - "phf 0.10.1", + "phf 0.11.2", "smallvec", ] @@ -2447,9 +2447,7 @@ 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]] @@ -2458,7 +2456,7 @@ version = "0.11.2" source = "registry+/~https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ - "phf_macros 0.11.2", + "phf_macros", "phf_shared 0.11.2", ] @@ -2492,20 +2490,6 @@ 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" @@ -2642,12 +2626,6 @@ 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" @@ -3530,7 +3508,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.419" +version = "0.91.420" dependencies = [ "anyhow", "swc_cli_impl", @@ -3538,9 +3516,9 @@ dependencies = [ [[package]] name = "swc_cli_impl" -version = "0.26.0" +version = "0.27.0" source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "dedb562525ba42bb96d59000ce340223b53baa0d3170377a8933359049fa1f08" +checksum = "9d5415f1ca7ceb4a1c4ebcc20db87503dda3abb761c2a5f1335b55322ace84df" dependencies = [ "anyhow", "clap", @@ -3648,9 +3626,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.108.0" +version = "0.109.0" source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "c99db0314696c5a7f25d923a8aee68f08f518fd0db341493d8d9d71fb12223e5" +checksum = "a8a8c63d64de240494d746abc5ea60bcb6b8d457bf8153ef22dd53aff3d446e2" dependencies = [ "binding_macros", "swc", @@ -4133,9 +4111,9 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.222.0" +version = "0.222.1" source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "e92e60321f46f5895fbe7527570098ef83145621843c9e1ccc50d659d2431ed8" +checksum = "00bfb48b68fcf9761934550f1a91c65fe32527caaf08f679de050f24cce176e3" dependencies = [ "anyhow", "dashmap 5.5.3", @@ -4292,9 +4270,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.213.0" +version = "0.213.1" source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "56903d2bb3d0e9cea40e47555e55fd8354d7f951a9dc5039475e43e072b0be84" +checksum = "8990fcde8fb32427e7c7941b1db470b95261b6668e265ba864b35b6727d06ac1" dependencies = [ "dashmap 5.5.3", "indexmap 2.4.0", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 237d2d4aa25a1..76b643357606f 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -26,11 +26,11 @@ resolver = "2" sourcemap = "8.0.1" swc_atoms = "1.0.2" swc_cached = "0.3.20" - swc_cli_impl = "0.26.0" + swc_cli_impl = "0.27.0" swc_common = "0.40.1" swc_compiler_base = "0.24.0" swc_config = "0.1.15" - swc_core = "0.108.0" + swc_core = "0.109.0" swc_css_ast = "0.147.0" swc_css_codegen = "0.158.0" swc_css_minifier = "0.123.0" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 91552a028cdac..74bdb53d7133a 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.31-nightly-20241008.1" +version = "1.7.31-nightly-20241008.2" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 690ae194c01e6..c42f0f28cebfd 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.31-nightly-20241008.1" +version = "1.7.31-nightly-20241008.2" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 0158003d944cf..81b1873184d22 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.31-nightly-20241008.1" +version = "1.7.31-nightly-20241008.2" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 661857cf19af2..48b4db0458a21 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.419" +version = "0.91.420" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index d4018f506ba85..21567a310f829 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 f6b8d2f1a8999..b8090b5887fb5 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.2", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 75253850ed6b4..782cfac29c7b0 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -39,4 +39,4 @@ "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 c6a835cb098f1..d695ffba67ea5 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 dec13a5266aa1..f132e26b932e1 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 34700939be7a6..cea6e23186823 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 aeb89134b64c6..f8c2611c2c9ce 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -42,4 +42,4 @@ "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 5b94e308b26d0..fc9b0470f71d6 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 18ca2cab72a44..fc07ed46cfe23 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 1656038f6b431..bef76e6325a20 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 7145178903d61..9ae5d30ce0848 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -39,4 +39,4 @@ "bugs": { "url": "/~https://github.com/swc-project/swc/issues" } -} \ No newline at end of file +} diff --git a/packages/html/package.json b/packages/html/package.json index a0d48bf266eb5..22e5db6ca15a1 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,6 +1,6 @@ { "name": "@swc/html", - "version": "1.7.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 21caf788a1467..57d2a8163781c 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.2", "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 a1b492e9b9066..d2f9800647dd9 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.2", "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 7e8231f36ac95..a93dfa18f9c13 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.2", "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 b21bebf333074..a847fe9f79c38 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.2", "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 7eb6a97c555e4..1713bcdcf6df7 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.2", "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 02e22edad5110..8678bdd4e86f2 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.2", "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 5207badec75be..ca7c4f9e6d7e3 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.2", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index f8c662502b4fa..44646a15e9f37 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 7de4c72526da6..585f4809208a3 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.2", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 8ab9e6c8fe664..9f632e190fd75 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 c45c1ffac0f4c..0c135af44ad6c 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 760c3e761b102..38e7c431a46b6 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 3de1ee1aa0884..2174b43be4825 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 4480f82ad4d56..d143970ef1a32 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 1306169cba818..8b75425dda73d 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 a6fa209d08952..30403fc4e4999 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 fd178ab97ae1b..fd753bafea5d1 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.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 85f473678430c..bd068abb9735f 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.31-nightly-20241008.1", + "version": "1.7.31-nightly-20241008.2", "os": [ "win32" ], From 6e7a009af576c8948b96fe4428f1e8aa9cc63f50 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 8 Oct 2024 09:00:26 +0000 Subject: [PATCH 9/9] chore: Update changelog --- CHANGELOG.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8ee818e4f66b..714237c3e7915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,9 @@ +- **(bindings/html)** Accept `Buffer|string` instead of `Buffer` ([#9625](/~https://github.com/swc-project/swc/issues/9625)) ([62edb36](/~https://github.com/swc-project/swc/commit/62edb3628b26036cdc767b31d59e109c3970497c)) + + - **(es/preset-env)** Update preset-env data ([#9573](/~https://github.com/swc-project/swc/issues/9573)) ([9a11d34](/~https://github.com/swc-project/swc/commit/9a11d34ee569f64e8db02fc90beacbba0f2de0cf)) @@ -58,6 +61,12 @@ - **(es/typescript)** Simplifying enum and namespace transforms ([#9558](/~https://github.com/swc-project/swc/issues/9558)) ([2480bb0](/~https://github.com/swc-project/swc/commit/2480bb00fc71d588af506eb18f33afa56622361f)) +### Build + + + +- Update `rustc` to `nightly-2024-10-07` ([#9624](/~https://github.com/swc-project/swc/issues/9624)) ([6a3b0fc](/~https://github.com/swc-project/swc/commit/6a3b0fc1660cba4310880881f21e3bf81aceac0d)) + ## [1.7.29] - 2024-10-01 ### Bug Fixes @@ -1331,15 +1340,9 @@ - **(es)** Allow input source map file to be omitted ([#8951](/~https://github.com/swc-project/swc/issues/8951)) ([606cb67](/~https://github.com/swc-project/swc/commit/606cb677c42dd43c24ba49ad0912998e33159560)) -- **(es/ast)** Pin version of unicodes ([#8941](/~https://github.com/swc-project/swc/issues/8941)) ([6362ff4](/~https://github.com/swc-project/swc/commit/6362ff4ba80afc9c887a8817582ae976a05c1d90)) - - - **(es/compat)** Avoid reserved name for private method ([#8949](/~https://github.com/swc-project/swc/issues/8949)) ([7053bb1](/~https://github.com/swc-project/swc/commit/7053bb16ce19ba476760b7fe0b1627d1210d6e18)) -- **(es/minifier)** Don't invoke IIFE containing reserved words ([#8939](/~https://github.com/swc-project/swc/issues/8939)) ([5a3456c](/~https://github.com/swc-project/swc/commit/5a3456c254a686ceef343ce5f9ec67b3e4644138)) - - - **(es/minifier)** Fix evaluation of `String.charCodeAt` ([#8946](/~https://github.com/swc-project/swc/issues/8946)) ([772c50f](/~https://github.com/swc-project/swc/commit/772c50fd7610768c43cf795b03dcae1d00f715d2))