From 0c0dddb8dd7b8909faa1c5b5b47d99245d729d44 Mon Sep 17 00:00:00 2001 From: Jeff Charles Date: Tue, 13 Aug 2024 11:00:07 -0400 Subject: [PATCH] Update swc --- Cargo.lock | 98 ++++++++++++++++++++++++---------------- crates/cli/Cargo.toml | 2 +- crates/cli/src/js.rs | 2 +- supply-chain/config.toml | 36 +++++++++------ 4 files changed, 84 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ebfb31a4..45d17a5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,10 +7,6 @@ name = "Inflector" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] [[package]] name = "addr2line" @@ -329,6 +325,9 @@ name = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +dependencies = [ + "allocator-api2", +] [[package]] name = "byteorder" @@ -2037,6 +2036,26 @@ dependencies = [ "cc", ] +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "quickcheck" version = "1.0.3" @@ -2508,9 +2527,9 @@ dependencies = [ [[package]] name = "sourcemap" -version = "8.0.1" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "208d40b9e8cad9f93613778ea295ed8f3c2b1824217c6cfc7219d3f6f45b96d4" +checksum = "dab08a862c70980b8e23698b507e272317ae52a608a164a844111f5372374f1f" dependencies = [ "base64-simd", "bitvec", @@ -2593,6 +2612,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "swc_allocator" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc8bd3075d1c6964010333fae9ddcd91ad422a4f8eb8b3206a9b2b6afb4209e" +dependencies = [ + "bumpalo", + "hashbrown 0.14.5", + "ptr_meta", + "rustc-hash", + "triomphe", +] + [[package]] name = "swc_atoms" version = "0.6.7" @@ -2607,9 +2639,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.34.4" +version = "0.37.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9087befec6b63911f9d2f239e4f91c9b21589c169b86ed2d616944d23cf4a243" +checksum = "46741b5a4ff3e821f6bb8d6c1289549272e71a5e0d163dbbae9e16e771d8da76" dependencies = [ "ast_node", "better_scoped_tls", @@ -2623,6 +2655,7 @@ dependencies = [ "serde", "siphasher", "sourcemap", + "swc_allocator", "swc_atoms", "swc_eq_ignore_macros", "swc_visit", @@ -2633,10 +2666,11 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.96.9" +version = "0.100.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de60918c09a10e55b659b4e70029d283da815e3107b22f79ec9fac280d4d8843" +checksum = "ea7cddc4ca9b04e7433d5710751f0266325db2382642f2c7c3e8c97676f23948" dependencies = [ + "swc_allocator", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -2647,9 +2681,9 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.115.1" +version = "0.118.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be1306930c235435a892104c00c2b5e16231043c085d5a10bd3e7537b15659b" +checksum = "ed6c1b94abbaf080a4e4ae47101a83d4eedef90d733dd98e32b361356d3f5e4b" dependencies = [ "bitflags", "is-macro", @@ -2664,9 +2698,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.146.12" +version = "0.149.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e0c2e85f12c63b85c805e923079b04d1fb3e25edd069d638eed5f2098de74" +checksum = "7c7a81df222f44212c72fec4879c0d182c6eac66fb0e180afd05e8be6d920663" dependencies = [ "either", "new_debug_unreachable", @@ -2686,9 +2720,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.140.3" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37dc505c92af56d0f77cf6f31a6ccd37ac40cad1e01ff77277e0b1c70e8f8ff" +checksum = "7c0a71579d030e12fd3cfbfc8712c4ce21afc526f2a759903c77d8df61950f5e" dependencies = [ "better_scoped_tls", "bitflags", @@ -2709,9 +2743,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.130.3" +version = "0.134.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e62b199454a576c5fdbd7e1bef8ab88a395427456d8a713d994b7d469833aa" +checksum = "cde8f1ef3f7bd53340c7bd679f1ec563a45225ac8fb63f22d6de1ff4b345475d" dependencies = [ "indexmap 2.2.6", "num_cpus", @@ -2728,10 +2762,11 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.101.0" +version = "0.104.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0d997f0c9b4e181225f603d161f6757c2a97022258170982cfe005ec69ec92" +checksum = "c71f5f97db49b96208805104b381c5e117f55fad5f3d178e626c92934a4d0e36" dependencies = [ + "new_debug_unreachable", "num-bigint", "swc_atoms", "swc_common", @@ -2764,25 +2799,12 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.14" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043d11fe683dcb934583ead49405c0896a5af5face522e4682c16971ef7871b9" +checksum = "1ceb044142ba2719ef9eb3b6b454fce61ab849eb696c34d190f04651955c613d" dependencies = [ "either", - "swc_visit_macros", -] - -[[package]] -name = "swc_visit_macros" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae9ef18ff8daffa999f729db056d2821cd2f790f3a11e46422d19f46bb193e7" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.70", + "new_debug_unreachable", ] [[package]] @@ -3030,9 +3052,9 @@ checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" [[package]] name = "unicode-id-start" -version = "1.0.4" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02aebfa694eccbbbffdd92922c7de136b9fe764396d2f10e21bce1681477cfc1" +checksum = "bc3882f69607a2ac8cc4de3ee7993d8f68bb06f2974271195065b3bd07f2edea" [[package]] name = "unicode-ident" diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 01d91768..90b521a9 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -23,7 +23,7 @@ wasmtime = { workspace = true } wasmtime-wasi = { workspace = true } wasi-common = { workspace = true } walrus = "0.20.3" -swc_core = { version = "0.96.0", features = [ +swc_core = { version = "0.100.6", features = [ "common_sourcemap", "ecma_ast", "ecma_parser", diff --git a/crates/cli/src/js.rs b/crates/cli/src/js.rs index 1e6465fe..9d08732c 100644 --- a/crates/cli/src/js.rs +++ b/crates/cli/src/js.rs @@ -148,7 +148,7 @@ impl JS { fn parse_module(&self) -> Result { let source_map: SourceMap = Default::default(); - let file = source_map.new_source_file_from(FileName::Anon, self.source_code.clone()); + let file = source_map.new_source_file_from(FileName::Anon.into(), self.source_code.clone()); let mut errors = vec![]; parser::parse_file_as_module( &file, diff --git a/supply-chain/config.toml b/supply-chain/config.toml index 04d3861d..d8216310 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -464,6 +464,14 @@ criteria = "safe-to-deploy" version = "0.1.21" criteria = "safe-to-deploy" +[[exemptions.ptr_meta]] +version = "0.1.4" +criteria = "safe-to-deploy" + +[[exemptions.ptr_meta_derive]] +version = "0.1.4" +criteria = "safe-to-deploy" + [[exemptions.radium]] version = "0.7.0" criteria = "safe-to-deploy" @@ -581,7 +589,7 @@ version = "0.4.4" criteria = "safe-to-deploy" [[exemptions.sourcemap]] -version = "8.0.1" +version = "9.0.0" criteria = "safe-to-deploy" [[exemptions.stable_deref_trait]] @@ -600,36 +608,40 @@ criteria = "safe-to-deploy" version = "0.11.1" criteria = "safe-to-deploy" +[[exemptions.swc_allocator]] +version = "0.1.8" +criteria = "safe-to-deploy" + [[exemptions.swc_atoms]] version = "0.6.7" criteria = "safe-to-deploy" [[exemptions.swc_common]] -version = "0.34.4" +version = "0.37.2" criteria = "safe-to-deploy" [[exemptions.swc_core]] -version = "0.96.9" +version = "0.100.6" criteria = "safe-to-deploy" [[exemptions.swc_ecma_ast]] -version = "0.115.1" +version = "0.118.1" criteria = "safe-to-deploy" [[exemptions.swc_ecma_parser]] -version = "0.146.12" +version = "0.149.0" criteria = "safe-to-deploy" [[exemptions.swc_ecma_transforms_base]] -version = "0.140.3" +version = "0.144.0" criteria = "safe-to-deploy" [[exemptions.swc_ecma_utils]] -version = "0.130.3" +version = "0.134.1" criteria = "safe-to-deploy" [[exemptions.swc_ecma_visit]] -version = "0.101.0" +version = "0.104.5" criteria = "safe-to-deploy" [[exemptions.swc_eq_ignore_macros]] @@ -641,11 +653,7 @@ version = "0.3.11" criteria = "safe-to-deploy" [[exemptions.swc_visit]] -version = "0.5.14" -criteria = "safe-to-deploy" - -[[exemptions.swc_visit_macros]] -version = "0.5.12" +version = "0.6.2" criteria = "safe-to-deploy" [[exemptions.tempfile]] @@ -685,7 +693,7 @@ version = "0.3.4" criteria = "safe-to-deploy" [[exemptions.unicode-id-start]] -version = "1.0.4" +version = "1.2.0" criteria = "safe-to-deploy" [[exemptions.unicode-width]]