From a3e3ed0eb8f533b817a554ad21bc68f8a8d8dc39 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2026 16:12:47 +0000 Subject: [PATCH 1/3] chore(deps): update oxc to ^0.144.0 --- Cargo.lock | 141 +++--- Cargo.toml | 24 +- .../angular-compiler/e2e/compare/package.json | 4 +- pnpm-lock.yaml | 423 +++++++++--------- 4 files changed, 302 insertions(+), 290 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 626d7b8d1..11febf3cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -61,9 +61,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "base64" -version = "0.22.1" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" [[package]] name = "base64-simd" @@ -143,6 +143,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + [[package]] name = "bytes" version = "1.11.1" @@ -203,8 +209,21 @@ dependencies = [ "itoa", "rustversion", "ryu", + "static_assertions", +] + +[[package]] +name = "compact_str" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79fcda08c33bb58b97008b2cdada6622500e949e060f5913361763121abd2416" +dependencies = [ + "castaway", + "cfg-if", + "itoa", "serde", "static_assertions", + "zmij", ] [[package]] @@ -987,6 +1006,20 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "oxc-miette" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330e07b3807046e0afa8fcc94f1fe976e93831b370d148bfe1168cb53da1b913" +dependencies = [ + "bytecount", + "memchr", + "owo-colors", + "textwrap", + "unicode-segmentation", + "unicode-width", +] + [[package]] name = "oxc-miette-derive" version = "3.0.1" @@ -1000,9 +1033,9 @@ dependencies = [ [[package]] name = "oxc_allocator" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f8245ba555b465d3577732d5f9d9306babb0aaa7b80e97a2ce21f74fae442a3" +checksum = "9262c7bbd58c8c32c2c60d1a7b6c274cd2aeaff1b726a2fb86081b75084698cb" dependencies = [ "allocator-api2", "hashbrown 0.17.1", @@ -1019,7 +1052,7 @@ dependencies = [ "indexmap", "insta", "lightningcss", - "oxc-miette", + "oxc-miette 3.0.1", "oxc_allocator", "oxc_ast", "oxc_ast_visit", @@ -1076,9 +1109,9 @@ dependencies = [ [[package]] name = "oxc_ast" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3305400b90fff2a30b272b58fe6080d25369407b2ac37c4ac652996a9677efe0" +checksum = "e8134809b665d524d9a0ddeee87a5d3602776aa2410a10a0439fd25eeb594a5d" dependencies = [ "bitflags", "oxc_allocator", @@ -1094,21 +1127,21 @@ dependencies = [ [[package]] name = "oxc_ast_macros" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef089097e96b74388a8025a9247bdb12774b99f5971926d9dafbe84a78f9efb7" +checksum = "ac120c6863a9d036c78a42a5e4d2f58bb27c5df795d61d904f6e19e48c681a37" dependencies = [ "phf 0.14.0", "proc-macro2", "quote", - "syn 2.0.117", + "syn 3.0.0", ] [[package]] name = "oxc_ast_visit" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4640e6d0de2e0f6c820d1444a468d070c710111df76ce90a1694ac386641e133" +checksum = "4a57626cd6ef87f5173110a301868e3c438fd8e0576f489d9a61540ef133f686" dependencies = [ "oxc_allocator", "oxc_ast", @@ -1118,17 +1151,16 @@ dependencies = [ [[package]] name = "oxc_codegen" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "316d3f320fab2647d2657f1016de952baa196b566e0eaa704d224e3fc25ccd9a" +checksum = "5f8a30cbe510caef092aa75fe29e8d37576ca8eb2ab3e9ab34a453a92863e7f0" dependencies = [ "bitflags", "cow-utils", - "dragonbox_ecma", - "itoa", "oxc_allocator", "oxc_ast", "oxc_data_structures", + "oxc_ecmascript", "oxc_index", "oxc_semantic", "oxc_sourcemap", @@ -1140,9 +1172,9 @@ dependencies = [ [[package]] name = "oxc_compat" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f8ecc06571912f29113f7e5669f7bd2915d3932270b0d877a3679686f5f4c7d" +checksum = "2ca8b4e5fc1b038d063aef726deeb0639460b0a3f4dfa9cc3f1b52b4b231bbf7" dependencies = [ "cow-utils", "oxc-browserslist", @@ -1153,46 +1185,47 @@ dependencies = [ [[package]] name = "oxc_data_structures" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acfb6e704f95e115c0e9ea8bef791c3d915cd2fcd1643661cf0bf5172c818097" +checksum = "2a71efea56db93d3ce9e88e1d9f74f6d50fc2b06092444cdd08579f5827fd8db" dependencies = [ "ropey", ] [[package]] name = "oxc_diagnostics" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b33d8c59c55e2c581ff692468a6a7ff1f12477f0e687b52e27fc6f6346a5d77" +checksum = "e5ff8638533094ecdcd38a63930c003c261d81650e4531c3bc805c797aec2a52" dependencies = [ "cow-utils", - "oxc-miette", + "memchr", + "oxc-miette 4.0.0", "percent-encoding", + "smallvec", ] [[package]] name = "oxc_ecmascript" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b3321b606c9217e8e5527cd01906b98e17f232acbb6fab7eac05236e7731d9a" +checksum = "77c7a326f49f06da37affdcad2fb3ebab46ac4ada8953a428f7cbd04e5cc9e6e" dependencies = [ - "cow-utils", + "dragonbox_ecma", + "itoa", "num-bigint", "num-traits", - "oxc_allocator", "oxc_ast", - "oxc_regular_expression", + "oxc_data_structures", "oxc_span", "oxc_syntax", - "smallvec", ] [[package]] name = "oxc_estree" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad383009532dc6504973f02f68892b98f64be1c17e86115166b0a1223c7511e7" +checksum = "8275fcb9674a1c320f0bdbc2f534ba9bb09fcb8b1c9fe306c9595d262a06bfcb" dependencies = [ "dragonbox_ecma", "itoa", @@ -1211,9 +1244,9 @@ dependencies = [ [[package]] name = "oxc_napi" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80053625d9c68ba022672cf2a326014453f6db682a6766ff1580ac1d152892a3" +checksum = "c37292d00477aef3aa4abd697b0856c677ae992e50e41ba0435575ca69bc64d6" dependencies = [ "napi", "napi-build", @@ -1227,9 +1260,9 @@ dependencies = [ [[package]] name = "oxc_parser" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8abd68f81349d37ea79f1d99d2370e15f282cc9fbe66e8544d072595744ab38e" +checksum = "d13016de81370106ea4065cfabe4a278dc09e82523cfe22bb6a8ab8e993b4c3a" dependencies = [ "bitflags", "cow-utils", @@ -1251,9 +1284,9 @@ dependencies = [ [[package]] name = "oxc_regular_expression" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eba6a56b1c633963c09c383062e47fb8a99ff4a4ded6bd883fcf554f8e1a48f" +checksum = "c375b89d88ec03301b0e62528715699551871861197aa39148e95a1422e1ae9b" dependencies = [ "bitflags", "oxc_allocator", @@ -1272,7 +1305,7 @@ version = "11.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fa374d03b255c070a32ae65b8a05231b8e658104d6ef22034c09da8fa0c2fd9" dependencies = [ - "compact_str", + "compact_str 0.9.1", "dashmap 6.2.1", "fast-glob", "indexmap", @@ -1295,9 +1328,9 @@ dependencies = [ [[package]] name = "oxc_semantic" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5967f96881e1694d10b453311fa681b4df0f38760628e1de613b046566cd8c8e" +checksum = "0d8d80604c4220c8f5b1c19682216921397fb45a616db47d3a044474662f0c2e" dependencies = [ "itertools 0.15.0", "memchr", @@ -1331,12 +1364,12 @@ dependencies = [ [[package]] name = "oxc_span" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83fa0a0fe6e5e2f5abb173a64afe8db711bb612acbc002c663fd13b08a8cbf3" +checksum = "abd732008dbfb09984106925f7ff7268687c8020b89bd7ee0f0b695c5bb07950" dependencies = [ - "compact_str", - "oxc-miette", + "compact_str 0.10.0", + "oxc-miette 4.0.0", "oxc_allocator", "oxc_ast_macros", "oxc_estree", @@ -1346,11 +1379,11 @@ dependencies = [ [[package]] name = "oxc_str" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e9531af3bc70e5eb75d196c01011d5bc0de1f6de73f0fc8bf343384353794f" +checksum = "e1d2ccb0f5aa4da9fc98ef70f59553c2779e28e064a8b271fcb1e88c11a63607" dependencies = [ - "compact_str", + "compact_str 0.10.0", "hashbrown 0.17.1", "oxc_allocator", "oxc_estree", @@ -1359,9 +1392,9 @@ dependencies = [ [[package]] name = "oxc_syntax" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f81863cdf973b6bcdcdbbae225619c08966be41efb64dc0ee0fd4b574f4ec18" +checksum = "15ff0e987ab15a71dae36fd544b9859513e76639e2cc6c5e25895081162755b1" dependencies = [ "bitflags", "cow-utils", @@ -1380,12 +1413,12 @@ dependencies = [ [[package]] name = "oxc_transformer" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8bb6f328641800296233b28448f32e5ebb5e72854b3e329f20447d5331c9216" +checksum = "1f78841ae7b3fdeb86cbc6ee625e2ea844e663fd7b0b320cd361a8514eae34f7" dependencies = [ "base64", - "compact_str", + "compact_str 0.10.0", "hmac-sha1-compact", "indexmap", "itoa", @@ -1410,9 +1443,9 @@ dependencies = [ [[package]] name = "oxc_traverse" -version = "0.140.0" +version = "0.144.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab67032768715dda6647be4043e6a8f9762a3a9090ca7a5d3795339ce87e18f" +checksum = "8cb740c9102d898615f894864044ca0b7926374981cef1b6c667e59e2b397ff9" dependencies = [ "itoa", "oxc_allocator", diff --git a/Cargo.toml b/Cargo.toml index 364cfc029..6ac1db729 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,19 +87,19 @@ multiple_crate_versions = "allow" [workspace.dependencies] # External oxc crates from crates.io -oxc_allocator = "0.140" -oxc_ast = "0.140" -oxc_ast_visit = "0.140" -oxc_diagnostics = "0.140" -oxc_napi = "0.140" -oxc_parser = "0.140" -oxc_semantic = "0.140" -oxc_span = "0.140" -oxc_syntax = "0.140" +oxc_allocator = "0.144" +oxc_ast = "0.144" +oxc_ast_visit = "0.144" +oxc_diagnostics = "0.144" +oxc_napi = "0.144" +oxc_parser = "0.144" +oxc_semantic = "0.144" +oxc_span = "0.144" +oxc_syntax = "0.144" oxc_sourcemap = "8.0.0" -oxc_str = "0.140" -oxc_transformer = "0.140" -oxc_codegen = "0.140" +oxc_str = "0.144" +oxc_transformer = "0.144" +oxc_codegen = "0.144" # Internal oxc_angular_compiler = { path = "crates/oxc_angular_compiler" } diff --git a/napi/angular-compiler/e2e/compare/package.json b/napi/angular-compiler/e2e/compare/package.json index a9aec3555..c64ae88b9 100644 --- a/napi/angular-compiler/e2e/compare/package.json +++ b/napi/angular-compiler/e2e/compare/package.json @@ -33,8 +33,8 @@ "@oxc-node/cli": "catalog:", "@oxc-node/core": "catalog:", "@types/node": "catalog:", - "oxc-parser": "^0.140.0", - "oxc-transform": "^0.140.0", + "oxc-parser": "^0.144.0", + "oxc-transform": "^0.144.0", "oxfmt": "catalog:", "typescript": "catalog:", "vitest": "catalog:" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15b9fa0b8..879bbeb95 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -398,11 +398,11 @@ importers: specifier: 'catalog:' version: 24.1.0 oxc-parser: - specifier: ^0.140.0 - version: 0.140.0 + specifier: ^0.144.0 + version: 0.144.0 oxc-transform: - specifier: ^0.140.0 - version: 0.140.0 + specifier: ^0.144.0 + version: 0.144.0 oxfmt: specifier: 'catalog:' version: 0.63.0 @@ -1750,22 +1750,16 @@ packages: '@oxc-node/core@0.1.0': resolution: {integrity: sha512-Spk/ey3zg1CpBU1eUHBPbAbfFddntutZPPsweh+kNh9M9Ksc8j9OCujralW9HrVyi6nNWek1PnMfSZ7NPLLCKA==} - '@oxc-parser/binding-android-arm-eabi@0.140.0': - resolution: {integrity: sha512-ZfjDZ422mo7eo3b3VltqNsV9kmv1qt/sPEAMSl64iOSwhVfd0eIZ9LB79Mbs1xYXJnk7WSROwzBCKDIiVxPTvQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm] - os: [android] - '@oxc-parser/binding-android-arm-eabi@0.142.0': resolution: {integrity: sha512-ZiRGDutGsv1G6bL/ozy/koC0Sv39T1DqyoC4KD1DOy9ZoACm1O5UWhEK2c02Qdk+4lfLVkvFa/mQ0fm/4h1BtQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxc-parser/binding-android-arm64@0.140.0': - resolution: {integrity: sha512-Ia8jSvikUX6Sf+Ht+KOCUF/k1HpR0VlmqIYymubmWDebOEGtsyliHDR6JxsZ4IX3/c/GbrB1uh09aVGQv/LQmQ==} + '@oxc-parser/binding-android-arm-eabi@0.144.0': + resolution: {integrity: sha512-IaoGBEp/huvja99PxI/b72TbKFzA/UzxxAka7f233dc/Tg/rRTX9Qn8IquFLWwWf4IddN/5TaJ8S4Subbjq7wQ==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] + cpu: [arm] os: [android] '@oxc-parser/binding-android-arm64@0.142.0': @@ -1774,11 +1768,11 @@ packages: cpu: [arm64] os: [android] - '@oxc-parser/binding-darwin-arm64@0.140.0': - resolution: {integrity: sha512-G6VK0nK61pH0d0mBjUqSZbVxGqqO5uzeginLDQj+gOO6ObfJjXRwgkD/ol0w1INcnFeAb6YGGO7qc3ueGHaycQ==} + '@oxc-parser/binding-android-arm64@0.144.0': + resolution: {integrity: sha512-u6fJu8XQXP99+9pYO3jq7F1D7V9fyFuDBShYFlr+gY+GcJzhveeN/zoMfuXxX6XBquJO0kjqKd7BjhJ7pClWXQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] - os: [darwin] + os: [android] '@oxc-parser/binding-darwin-arm64@0.142.0': resolution: {integrity: sha512-l4khS8LQOOVYsGRVARo1gSaCT/aBSceUVXgtovWc2+drnxVuDr082WA3OCHVdVzIz5JIrP/y9CWsSKxBDNmYGg==} @@ -1786,10 +1780,10 @@ packages: cpu: [arm64] os: [darwin] - '@oxc-parser/binding-darwin-x64@0.140.0': - resolution: {integrity: sha512-HazBOuZzd2pO1C2uMmp8Gv7mhzMHqKSKDS1OZfcLEvpIcgA+48J92HEtNanVHDIzRD9PRPCV6aS6fkZIWOVl8Q==} + '@oxc-parser/binding-darwin-arm64@0.144.0': + resolution: {integrity: sha512-o9xGSmMQcboJLjwI+acFf6xa7nYdp0/nRFE8ry4Xrt8OviQ9ITFDBUkAXVJMOLchSV9Pu981GxJuW0mt4i6vQQ==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] + cpu: [arm64] os: [darwin] '@oxc-parser/binding-darwin-x64@0.142.0': @@ -1798,11 +1792,11 @@ packages: cpu: [x64] os: [darwin] - '@oxc-parser/binding-freebsd-x64@0.140.0': - resolution: {integrity: sha512-9hSUU+HmTUyOe4JzMHxNGgLWNY7rrO+6ShicZwImNJacEAACDMIkuEQQkvXSL+WJN50jaNtLYJv8s4OcBdpyUQ==} + '@oxc-parser/binding-darwin-x64@0.144.0': + resolution: {integrity: sha512-2yNm4tX++W3KLbyziVhs5alSb74a3C1uNDu/1P/AQj1ux8yZYuvbCAeJCCrGkr8J18ZmnBAzDthdTZBEAEb71w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] - os: [freebsd] + os: [darwin] '@oxc-parser/binding-freebsd-x64@0.142.0': resolution: {integrity: sha512-b7Q7m4Cqc6XqNhri3R+QhU+GVy646Pn+bkdhrDdWym/Fdi0ZUa+d73H9dm5H91JtbtAQ/z1d8XKMW3oOV8a4tQ==} @@ -1810,11 +1804,11 @@ packages: cpu: [x64] os: [freebsd] - '@oxc-parser/binding-linux-arm-gnueabihf@0.140.0': - resolution: {integrity: sha512-RAEuQsYtS0KcDFqN0ABTjyyNlokS91JeuDuoW9tEbG0JTbRNXnpQUdbYc/16JoA6Z/2ALbNrE3KmxtqDiuIjCQ==} + '@oxc-parser/binding-freebsd-x64@0.144.0': + resolution: {integrity: sha512-TG4CjY1OjynplkF9nAQ9m9zboPJksnbAF+U/9xQGSXyIt+5sQRitwfQrUgjrG17/up9G8k/boNjLD2zp4xq1Kw==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm] - os: [linux] + cpu: [x64] + os: [freebsd] '@oxc-parser/binding-linux-arm-gnueabihf@0.142.0': resolution: {integrity: sha512-3riVS5IhdH3uCZj1Y9ftDQlR0dvLsIlw/edrRqk8JhgNd5K0XSs+UBtgh50N13CAlW9/TXj6sVGXaKNBocd0Yg==} @@ -1822,8 +1816,8 @@ packages: cpu: [arm] os: [linux] - '@oxc-parser/binding-linux-arm-musleabihf@0.140.0': - resolution: {integrity: sha512-c4CkHvPvqfojouredJ0w3e6+jiBq0SbFyhH61kr/zPb/7XsaYTNKQ54vmlSsopfdQbNDX40ZeK9Abs2Qet6wcw==} + '@oxc-parser/binding-linux-arm-gnueabihf@0.144.0': + resolution: {integrity: sha512-i0T9NagVmqc+rbSyBr5mDKj7TCMIBRrSteQlQJt1WhWIH/sZeOP9GB09H9w98YdinuZkDIPmO7Fz0jDC7bMvSA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] @@ -1834,12 +1828,11 @@ packages: cpu: [arm] os: [linux] - '@oxc-parser/binding-linux-arm64-gnu@0.140.0': - resolution: {integrity: sha512-yrjmLj8ixPB25yqvPGr28meGjb+keed7m1GqqY/0uqkhZIoT4t9zmfwUgFEtC33C7dtE+UQ7TU0IaVxf97SWJg==} + '@oxc-parser/binding-linux-arm-musleabihf@0.144.0': + resolution: {integrity: sha512-YUsEqM3WMS3mOON+TFf7RzS0QthzEifx7tpUQu0GSF2MsT+D6t154ZBs6WhWaCZNl0GuVDEvndCyEAUBHzSHGw==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] + cpu: [arm] os: [linux] - libc: [glibc] '@oxc-parser/binding-linux-arm64-gnu@0.142.0': resolution: {integrity: sha512-gc0EXsKtXgerujmU2Bql3u1L1HsSQ2774R83idq/FoNMPVV/RY/1ErFsvnit7KoiP/sLvzQixeUo4Ut0ic0wmw==} @@ -1848,12 +1841,12 @@ packages: os: [linux] libc: [glibc] - '@oxc-parser/binding-linux-arm64-musl@0.140.0': - resolution: {integrity: sha512-ggGMQTN8Agwxp2WiLMpdY671dt0qTDJWiWlJeig3HnUwTnerRl0J2JdGVghWBeDcss2D9S2V2Js6dZHEiVabVA==} + '@oxc-parser/binding-linux-arm64-gnu@0.144.0': + resolution: {integrity: sha512-LlWH4kt+IET3qIAe0e0IFLNlQ3CVUAfN//UFsA6N0/FghMh/FBk1e+wzvgG+t8WSnXkvf8B1TovquS2EJras9g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [musl] + libc: [glibc] '@oxc-parser/binding-linux-arm64-musl@0.142.0': resolution: {integrity: sha512-F2XvmWSE0uWpie+jHKKIFgdVOe9ypGhkEZxKx5DuW215K6cbAC274yYaPkcM7EqY4Df3Weyhpcz3lsURyH2LVg==} @@ -1862,12 +1855,12 @@ packages: os: [linux] libc: [musl] - '@oxc-parser/binding-linux-ppc64-gnu@0.140.0': - resolution: {integrity: sha512-IgTs8xYAFgAUGNmR65tIqjlJ8vKgrfXzC515e9goSdfMyKQV4aJpd2pUUudU4u51G64H0/DSEJEXKOraxm9ZCA==} + '@oxc-parser/binding-linux-arm64-musl@0.144.0': + resolution: {integrity: sha512-ajXbXIWBWUD4U3IQxr2p6DiXwD7GPHEBLa+JteKhIfvLmBEBdTjO28lP+5r3AF2qal8cxLERfTnGs64Z22ZuXw==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [ppc64] + cpu: [arm64] os: [linux] - libc: [glibc] + libc: [musl] '@oxc-parser/binding-linux-ppc64-gnu@0.142.0': resolution: {integrity: sha512-wLMbT21U/QxknQsk+VvNF0b9D2/aGWhcaQQQ+VYlE8FwD5+GoWZIPPXNzyHmkYyhm0KB3itL+TBavjMatqNnYA==} @@ -1876,10 +1869,10 @@ packages: os: [linux] libc: [glibc] - '@oxc-parser/binding-linux-riscv64-gnu@0.140.0': - resolution: {integrity: sha512-A1x+PMWZmSGaFVOx2YeNTFau8uD+QO14/vLP4GrcuvUPs3+nBkUOjy9Lus86ftHsDojjYMbvBelmKc3F7Rv08g==} + '@oxc-parser/binding-linux-ppc64-gnu@0.144.0': + resolution: {integrity: sha512-/+sDzL/4cWEwdqenKo/DX3gkkxu7H7ytFAtealDey/Gd59yPWn64obVk6wXKVjVfXMciUUUTySxZG9AIMX3RNQ==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [riscv64] + cpu: [ppc64] os: [linux] libc: [glibc] @@ -1890,12 +1883,12 @@ packages: os: [linux] libc: [glibc] - '@oxc-parser/binding-linux-riscv64-musl@0.140.0': - resolution: {integrity: sha512-zBqpfRo2myWPrPo5xUjeZqlnPXPXsX8BcWtWff66/eGRQdbPjhzPgXa/F+AtxT2afUViPxbuDlwscMKzQ5tg+g==} + '@oxc-parser/binding-linux-riscv64-gnu@0.144.0': + resolution: {integrity: sha512-dMVhPBbrd8y6aeLd7Ihn9OZhKO8QgCQVtLBTRgbmf4lKrcR61SpaQRJPJuocTc/Cn5SJMm+alHYPnzkbOGM7Dg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] - libc: [musl] + libc: [glibc] '@oxc-parser/binding-linux-riscv64-musl@0.142.0': resolution: {integrity: sha512-hTsHtTLxMAfCo+rpF5K3qZJKW2NpPN/CHd4mYB3y7XlSdspHkd2gehDIofP64AacA9nWQw2tY3O7wR6UY8IVOA==} @@ -1904,12 +1897,12 @@ packages: os: [linux] libc: [musl] - '@oxc-parser/binding-linux-s390x-gnu@0.140.0': - resolution: {integrity: sha512-2M1DPm/8w9I//YzFlFC9qXw+r2tJFh5CYwRlYTq2vUJQS7qoQftEDeCZ8EnN7KHtvSiXvYj8mZI5pR7DpXmcEw==} + '@oxc-parser/binding-linux-riscv64-musl@0.144.0': + resolution: {integrity: sha512-jQ8O0+b6J2IhJgm0DnqEJq8hG9OocmF1b4TBWCk08CRWqTmLZj/+lYs7w3OA60nb2SiqOmthQyJPacrCi7y+oQ==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [s390x] + cpu: [riscv64] os: [linux] - libc: [glibc] + libc: [musl] '@oxc-parser/binding-linux-s390x-gnu@0.142.0': resolution: {integrity: sha512-6y7qYY3TCUDYjqswImdTGl92y+KA/80twALegQPN27kfY+bG7Ib1+L3jbmrCZQx6wrVnai9IPsEZp07I0hx7JQ==} @@ -1918,10 +1911,10 @@ packages: os: [linux] libc: [glibc] - '@oxc-parser/binding-linux-x64-gnu@0.140.0': - resolution: {integrity: sha512-8aRDbZ/U/jO8N7go1MO72jtbpb4uswV8d7vOkMvt/BPgZiyEYvl1VIWK4ESxZZhnJ4tqwVldgX7dNiP/eB1Jdg==} + '@oxc-parser/binding-linux-s390x-gnu@0.144.0': + resolution: {integrity: sha512-/mZxZtcGrzuvqPLPV7gjavbROYs/dHy6+yQ2Sl/2to/+qoC/v6CcruGFnfQPzQbXXTYReXJzLb5QY9KmgCbJOg==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] + cpu: [s390x] os: [linux] libc: [glibc] @@ -1932,12 +1925,12 @@ packages: os: [linux] libc: [glibc] - '@oxc-parser/binding-linux-x64-musl@0.140.0': - resolution: {integrity: sha512-xRqpeI8U2sQQS1W5BMWRyMTxtagkuLG2dEWruet5lFsWHTvBth11/TpSaJatHdqVVwHN0q3uuoS9zRsGinq8hg==} + '@oxc-parser/binding-linux-x64-gnu@0.144.0': + resolution: {integrity: sha512-/caRGFHcarHZlBrucBwQwBbzqhD+UfZZ/r7soocS0/mp6/5KTq+1Zl/OQx5lFLcN+GpUPYszbrvQU9MCFLEzJg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [musl] + libc: [glibc] '@oxc-parser/binding-linux-x64-musl@0.142.0': resolution: {integrity: sha512-4SQs678MmjYVrmhAgCWD4o0vpaFszXw9xLX5p2Z9MMFcltxiLkA88wQjh80YHjPrXtpyZ2CWI5m+1yNKM0m2Pw==} @@ -1946,11 +1939,12 @@ packages: os: [linux] libc: [musl] - '@oxc-parser/binding-openharmony-arm64@0.140.0': - resolution: {integrity: sha512-GbGRe26MqAKciFRvXeHNQJ6VAHYs9R4miP89sEAncysM3n+f4lnyLWgsa9kklJNpfnxdq2yRoNYHFqwBckVimw==} + '@oxc-parser/binding-linux-x64-musl@0.144.0': + resolution: {integrity: sha512-qFtwAo6BWuWDjh57QDdZdYi746GW0mIeoZSGK2jJqlxIjo389Y/7lrriTOI+ou7tTvusOrSYGQZ+e+nDswt2vQ==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [openharmony] + cpu: [x64] + os: [linux] + libc: [musl] '@oxc-parser/binding-openharmony-arm64@0.142.0': resolution: {integrity: sha512-YHpx9N7Ln3a++Tc8rv+H7mrK1zyJQOAwCFg8LZ3lTs1T5afGWeZrLPhPT9HLnIwSjCyJqPWVMIrMxbjcmBr2oQ==} @@ -1958,32 +1952,27 @@ packages: cpu: [arm64] os: [openharmony] - '@oxc-parser/binding-wasm32-wasi@0.140.0': - resolution: {integrity: sha512-vFiC1hqys+hkX1GnQkIoiTQJNiUm43Z0lO35ETKXTw0YtpW7+cN58YRRXFAQQ+TgpkIi3lrhcxdlnqz+Oi3ptQ==} + '@oxc-parser/binding-openharmony-arm64@0.144.0': + resolution: {integrity: sha512-n+NgMGWWEYpH+rlkMhDvLR2k8vJDHQp3j8SoS86IS6J0hc4kuDaiYAAvu9dF86xjeGYy+h9WLj12sylmBJV9sg==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [wasm32] + cpu: [arm64] + os: [openharmony] '@oxc-parser/binding-wasm32-wasi@0.142.0': resolution: {integrity: sha512-3pLDyY3+oogW73RM5uehNgAiR/Xfb7fvO2Q1Z1gIqZ2+50XDVQmBVlRkHXZTU4gKnQHpwETNsYQVsJ3joVB2iA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [wasm32] - '@oxc-parser/binding-win32-arm64-msvc@0.140.0': - resolution: {integrity: sha512-fGSQldwEYKhM+H8uLt76Op8hh5+FYaR6lvvQ1Txw3Mhn86DyQXLcI0fi1EkFlTK7F+46OCk/j0AJMzZQm6g5Xg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [win32] - '@oxc-parser/binding-win32-arm64-msvc@0.142.0': resolution: {integrity: sha512-Had/VeVY28Oyb0K+Q4FV8KCzoBycIh93oDK6pCbya9lkzdq+ikMHMgBubsdqqlybjJmQRawCQRrnBRHyQwYvcQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxc-parser/binding-win32-ia32-msvc@0.140.0': - resolution: {integrity: sha512-sDS2Bai+g3ZWYwfZqmosiSuFDBcVnZ3Ta6pszzsiJoLMqsJEWKcxXXbGa7b7yXr++W2lQNPb3ZRJ8czseqL7RA==} + '@oxc-parser/binding-win32-arm64-msvc@0.144.0': + resolution: {integrity: sha512-fShxpJiCBOdG4+jBAvahTTFUDI5djXc/+IPC1ldeC8LbyCW0h9m/7oP8DRZWI7WT2Ahv8sHtZz4ugECylCFpTA==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [ia32] + cpu: [arm64] os: [win32] '@oxc-parser/binding-win32-ia32-msvc@0.142.0': @@ -1992,10 +1981,10 @@ packages: cpu: [ia32] os: [win32] - '@oxc-parser/binding-win32-x64-msvc@0.140.0': - resolution: {integrity: sha512-kHbE1zWyb5OQgJA6/5P4WjiuB01sYdQwtZnSSyE58FQEXDAMnyeeq4vj7KgN75i5SlBzOs8A5MrtlD3gOlDKqQ==} + '@oxc-parser/binding-win32-ia32-msvc@0.144.0': + resolution: {integrity: sha512-vFrYV+C3lJhIiSdNhdkZHnZ0YIClgTSluXaPMYjlGslVPD+uJg6K1s2xNL/X/gdBcy9IIbjbp0vNBwQhdMMdkw==} engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] + cpu: [ia32] os: [win32] '@oxc-parser/binding-win32-x64-msvc@0.142.0': @@ -2004,6 +1993,12 @@ packages: cpu: [x64] os: [win32] + '@oxc-parser/binding-win32-x64-msvc@0.144.0': + resolution: {integrity: sha512-0ASbKSwdeihMekyy7y4jC0CwW3XBDZk5Sw64m/W7IReVQHaduqLYssF9KCJA2oHG9oldnl/1CMxqCoImXfqQkA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@oxc-project/types@0.139.0': resolution: {integrity: sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==} @@ -2016,129 +2011,127 @@ packages: '@oxc-project/types@0.143.0': resolution: {integrity: sha512-u6JZdLBTLotrNC9Vd6vPssINdzcCzleKAH6EJKImQb7GtYvX5keN2dxkoK44stCc4tffE6QQRtZTXVSzsLUlWA==} - '@oxc-transform/binding-android-arm-eabi@0.140.0': - resolution: {integrity: sha512-mYtsuGD5wCPzUVQHCywcWwIAgGkRJ+nCLCqR9TXh+WoZf6LlgluAncWkDxihufylcyjI2gjEtxjkMd7PHAVcMg==} + '@oxc-project/types@0.144.0': + resolution: {integrity: sha512-nuhZIOLuI6TFQ32I/WnUx+SCPY7SdSKwgnFHydAuoS1+Z4BRcaP+RRJmGzl9lw+0OFF7UmaESf7KQRXaNLHypg==} + + '@oxc-transform/binding-android-arm-eabi@0.144.0': + resolution: {integrity: sha512-Sskiy+uGMIjOFI9D1OZdYgT2NzVuvkOU5HDWAdp36BNuBbOoBFpNTVAT2D9PGfRQJEKJ/K/Wb2L0gA2VC23UUA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxc-transform/binding-android-arm64@0.140.0': - resolution: {integrity: sha512-dgH1dyIQNTIEvxf58EIAMf8RljgZnECf0OxMgDo6JVpwV9PYGEyQduONPUQIuF/zx986HAXHbyHRL4C44HHYOA==} + '@oxc-transform/binding-android-arm64@0.144.0': + resolution: {integrity: sha512-osVA5RRHE63G9effQf2ME3HOscX0zDTTG1O9Xz6tIdxY11y+Pj51l6XD2lk4m3scUa8biI6qUhDInH7IKGUopw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxc-transform/binding-darwin-arm64@0.140.0': - resolution: {integrity: sha512-emqYWDHQAV2wBlMUWZGmBL8aD1KtIr3OcckrJrwQ/Dmq6W8Tj/JNuCgHyXgx3OOBJZrBKVX6IB3cDHlN2+VgBg==} + '@oxc-transform/binding-darwin-arm64@0.144.0': + resolution: {integrity: sha512-gRpF9QorjIHzvPQ+ix7Tu0gDViikaU8iGZN/FkZSW8AJCqJrlInJpnugZisgmBDmWlPD9XuEuWPR0kXDI70nww==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxc-transform/binding-darwin-x64@0.140.0': - resolution: {integrity: sha512-GxhzL/bl9o/kb1Qs8EZW1SBTuzsFfQ5syKgg3VuGTNpeP4LHyTS2h/BfW1N5P9Obcgw7zfGcMIRZXLXvbgNF4w==} + '@oxc-transform/binding-darwin-x64@0.144.0': + resolution: {integrity: sha512-EyxYXw5qm/Z1wi2DJQr2IXTOvYNHKFzI6sITYvwRBdWt6mRNrskUNXq5Jqr47183kSb8w1f5ygVQLS2x2k2yVg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxc-transform/binding-freebsd-x64@0.140.0': - resolution: {integrity: sha512-aHKNp2i3f5dewyDNS+3CzlqJ2EBB0L1bGI4VfjGMxhBGYmPyD5bRYmO4IN3cxxu1BFtHxC5RqF/lALpLmEXD0Q==} + '@oxc-transform/binding-freebsd-x64@0.144.0': + resolution: {integrity: sha512-aKhXnBEvbUJBxTgh5ai9RGGjZOCL8Y9IZM0IfG7WQOdQc2aha4IukyBQ3/V1c5DQFZl8hblGzf95D3Es2uNV2A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxc-transform/binding-linux-arm-gnueabihf@0.140.0': - resolution: {integrity: sha512-aDxttllXtdTczve8J5zmVckTjca96XVGbn1Bq7FBSgjjvPjzZeDh1N3f1SdYCg/6O2GG5uYoLgx2nNla2Q9qBg==} + '@oxc-transform/binding-linux-arm-gnueabihf@0.144.0': + resolution: {integrity: sha512-wWGIK7+bG1gQRR0VEhaQrUOSQqwc6Mo3NuHlBIXt20YLxHSzeghFHU/KuIs2S7xcOZOaWqM4aRKB86fxV1QKeA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxc-transform/binding-linux-arm-musleabihf@0.140.0': - resolution: {integrity: sha512-Kh6ebkfN25+8tJ37eg8/GP4KKHdFb8sV0nQxvtpal1HZ4h1sSXsuIYXP/0U07lKYsWpmkhkI+TLfuIOR8G2Cfw==} + '@oxc-transform/binding-linux-arm-musleabihf@0.144.0': + resolution: {integrity: sha512-R8XAHI6gxenWpzpNe7hll2KXAtfIaDL/6w/oFuuVZ3/bpKwEYH/U1fdSmq3ImbtJbIZXAhGGOTOeaWoKLLhF2w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxc-transform/binding-linux-arm64-gnu@0.140.0': - resolution: {integrity: sha512-7wiDxRJfqeNaFtS4d/k4JvYbxH6F6N0mmeI+kA87iVzid3zqvS9eYwBCC5WWusLsgoLl+AElA/7jvohSpzEMMg==} + '@oxc-transform/binding-linux-arm64-gnu@0.144.0': + resolution: {integrity: sha512-PBGyvBcPeSHujvTNDNj5lVEZGI2CEszyBIKBnQsuhXE6PbkXsXN+ar1tAv9MDFByIppTa6eHCkBCx2wLRGRd5A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxc-transform/binding-linux-arm64-musl@0.140.0': - resolution: {integrity: sha512-UxLuPaZcdhUnWhvJgBA5Uk2wyWS7VEXeYHzA6R+9Zh3Sv7mdY5iCzDFW6VWW/UIl0PQ+ifQVnFZ0TrEvfgyJmQ==} + '@oxc-transform/binding-linux-arm64-musl@0.144.0': + resolution: {integrity: sha512-vbXqLri/fGsRzvFm9sUDjEadBq3OlGfmb5c33pyfKVM+AjP685LXb7smUNzjfbmKpGkXB18tHvqpt/QXNadZTg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxc-transform/binding-linux-ppc64-gnu@0.140.0': - resolution: {integrity: sha512-WnRLduIoNb74DZGbJ9h/fnV0vwRkWRado2dqSzCgN7S5smAhKJJi4t8IgvW0KKza/qU0Ik4I1zYREnzbTQE5Wg==} + '@oxc-transform/binding-linux-ppc64-gnu@0.144.0': + resolution: {integrity: sha512-0SYHjw+KLnjFI1rdZAf0TfgoIqDIDvjsedNZ0U0rxZiHVNJyDltaB8m75rvNToTMfcmV76k61HXOmW6Neylo/A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxc-transform/binding-linux-riscv64-gnu@0.140.0': - resolution: {integrity: sha512-fJt6DwQk7BjDsBWu+wqf4SVZN7AGgC7UPbKLZud250o8GXvcQmk4BxmDHDDvGi2b12qx4aFwUqucmWryfpGKTQ==} + '@oxc-transform/binding-linux-riscv64-gnu@0.144.0': + resolution: {integrity: sha512-n7uZFeZimHxuasIpwnwybw9UXQ0AxLHkGeOmHGMtcqey2mYmdVdW/5M+tliPVgPwVGu4HlBqv/riWsqWmrVQEQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxc-transform/binding-linux-riscv64-musl@0.140.0': - resolution: {integrity: sha512-5YMLMnXhEnL4ANpbAnjJ6ZoJtq5gqFREFrsGzePnaGQeHinA2Dgm9SmtC7rhpRYobw+nwOLcR4uGK0HNwydvbg==} + '@oxc-transform/binding-linux-riscv64-musl@0.144.0': + resolution: {integrity: sha512-Dc/pGt10QuqCO4tG51hZ+zp/+BNnUVTcDFS7FHCR67X8IaoEE8J7Pr0DkAcn8uPTvvSFzzNkhPwSx/L4XCUb/w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxc-transform/binding-linux-s390x-gnu@0.140.0': - resolution: {integrity: sha512-3aDuklBqnQzJfPISfhYbNq4INIRFhGUxm/4GoggMlaaqzLFoqbsyDkeckPMB+cIG2ygokshjA0+2REMZ1lzFqQ==} + '@oxc-transform/binding-linux-s390x-gnu@0.144.0': + resolution: {integrity: sha512-BeZ9tDcUVwfHlUl76GBwuDxrqmRLqdugPrq+LXuFRJ2mCzn3oFe4vOGCDMLW9ObIRAISR7+NIPH3CUyxM8VgOQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxc-transform/binding-linux-x64-gnu@0.140.0': - resolution: {integrity: sha512-E0qSFOMRArliAiASRwz55sU1XQxx2neimvhtfhvwUiVZf3OZqoIJfOz+W5nE/nGC3JGZgr8j6/rpWTgkwy1dFw==} + '@oxc-transform/binding-linux-x64-gnu@0.144.0': + resolution: {integrity: sha512-6U5R564AZ/ormt8iXXFETByq9dtADi9j2zEs4IEu0/5nvx27I+M7WTwGYBmWvYr1CfHTkM3a5KgNU0Vn3VoQPQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxc-transform/binding-linux-x64-musl@0.140.0': - resolution: {integrity: sha512-LisGfSfrAgl06ve9w4r/yzG4rZaCRr5vmZbnPv7WJ5NzqejmaWbAhc5iMcCnkvo8t3NxBFwyNZcVBJfRbTmRXQ==} + '@oxc-transform/binding-linux-x64-musl@0.144.0': + resolution: {integrity: sha512-gpEHX25aa33npfw/GcjHT+Hrk3n7kNrKdsDcNB43u5XIyvCgyVR/S/YncSbYI1Woko30YfiE77jKsDx1WrkauQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxc-transform/binding-openharmony-arm64@0.140.0': - resolution: {integrity: sha512-JKqdNAUvAj1RNhNgUPAuM9JqbsFh0dfdefVm6rfmNU+fprZHSqbIJZKgyGFtmssaWuNU+cd1PtM6Od8cV7zEMA==} + '@oxc-transform/binding-openharmony-arm64@0.144.0': + resolution: {integrity: sha512-1kEUpTvm8ADkrUCX5xMop3/8szkTANZ1rLSbuiLGQ6KtbWWQm7hJUDvj78Sig8rZ8TqZS+BwUI4dcw4lK+Yysw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxc-transform/binding-wasm32-wasi@0.140.0': - resolution: {integrity: sha512-dxXH7MULb3M8WyW3IG/MAwEspnHaa7Jbu7zW/bZL28FrHe7UcExWCFPB3BruOenyXc3NfKlY7W1r7MgXKzTmaA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [wasm32] - - '@oxc-transform/binding-win32-arm64-msvc@0.140.0': - resolution: {integrity: sha512-ZaZeRNTMunUzhrGnDdySwAm+itB9Itoa+JixWVX3cg9+PW+HUY1yjqsA3EfoX5bqb6ZEfGYdAdBVUYJrwsy6/A==} + '@oxc-transform/binding-win32-arm64-msvc@0.144.0': + resolution: {integrity: sha512-/02/Bsw7WPxPQhhEfU80oRtOakHWPzE3MuPVkU4aTACPhismESGl2iIWVsTBddTiViyj30VxyqiEN/022LQnNg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxc-transform/binding-win32-ia32-msvc@0.140.0': - resolution: {integrity: sha512-Wa6LI6pZGVHkUv+xFnZom9GB0EaOu8C2TJ2gUHAJQ30irNM6YWt4aekvbGDjVlhD+LvtzmB5Gut1Xb6yXvyWHw==} + '@oxc-transform/binding-win32-ia32-msvc@0.144.0': + resolution: {integrity: sha512-nNxuvrVG9xR06XyZqPqGxt2kNkcYyseki1CFpzHSw+8iZs22EyaGVocjirIsp5t5SBj8Zd+xOLHmT9ldn6ZOTA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxc-transform/binding-win32-x64-msvc@0.140.0': - resolution: {integrity: sha512-2jiUKUeQplXxx7nTwRObFbZy3xd8f92UN2Xmq0iIbDhuQIzX32xChfBhQanKZWFXyeFIVI1H7+jD9Y2BnE9RDQ==} + '@oxc-transform/binding-win32-x64-msvc@0.144.0': + resolution: {integrity: sha512-2mqtOa1KR/v8F85Cf8l1jX411AM7dYDO1HUDzucPXvO9LX63AaHxwafv+Uds1NzxSqnZtlpd1/OKUXrb0KvUFQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] @@ -4258,16 +4251,16 @@ packages: ordered-binary@1.6.1: resolution: {integrity: sha512-QkCdPooczexPLiXIrbVOPYkR3VO3T6v2OyKRkR1Xbhpy7/LAVXwahnRCgRp78Oe/Ehf0C/HATAxfSr6eA1oX+w==} - oxc-parser@0.140.0: - resolution: {integrity: sha512-h6QFWd6lBMfjESqgQ27GjzrSDb0qbznp7VDQqp2zvgsrWut4vcchyMIzOVXvGQ2GMZgKw9RWrFNWv9WqGL0p7Q==} - engines: {node: ^20.19.0 || >=22.12.0} - oxc-parser@0.142.0: resolution: {integrity: sha512-kKR+jPiRJYJDexVoziIg/FVGvr1fT1FZSSJOk6tVoMKKSlsf1Cso+cgGCJkOEDWOP174vRntCPFKg+AS7InWvw==} engines: {node: ^20.19.0 || >=22.12.0} - oxc-transform@0.140.0: - resolution: {integrity: sha512-gE9ZjYloCbFZ96N5Gnn0JytzlysHQ6L8pWDc0xU7+FEpsYWBLLAFnCMojbOZhHEA+wpUOSyKQZ4jnYB65XY+yg==} + oxc-parser@0.144.0: + resolution: {integrity: sha512-eacM4wMgGWXctHubY262yo+50E76qtQBqe+uK73YEV1IT3qP12Acbnf9Nc8t+agIAdnko9iVT4KF83/d0EjY5w==} + engines: {node: ^20.19.0 || >=22.12.0} + + oxc-transform@0.144.0: + resolution: {integrity: sha512-a6mYoz3PPIlwbU4xtHAmWJHD0SvXh9ayAHI1D0+LJEKvln+koaD2M9AAAm5bAN5kkT2AWxN37IVhL1EAzXUyfw==} engines: {node: ^20.19.0 || >=22.12.0} oxfmt@0.63.0: @@ -5948,107 +5941,100 @@ snapshots: '@oxc-node/core-win32-ia32-msvc': 0.1.0 '@oxc-node/core-win32-x64-msvc': 0.1.0 - '@oxc-parser/binding-android-arm-eabi@0.140.0': - optional: true - '@oxc-parser/binding-android-arm-eabi@0.142.0': optional: true - '@oxc-parser/binding-android-arm64@0.140.0': + '@oxc-parser/binding-android-arm-eabi@0.144.0': optional: true '@oxc-parser/binding-android-arm64@0.142.0': optional: true - '@oxc-parser/binding-darwin-arm64@0.140.0': + '@oxc-parser/binding-android-arm64@0.144.0': optional: true '@oxc-parser/binding-darwin-arm64@0.142.0': optional: true - '@oxc-parser/binding-darwin-x64@0.140.0': + '@oxc-parser/binding-darwin-arm64@0.144.0': optional: true '@oxc-parser/binding-darwin-x64@0.142.0': optional: true - '@oxc-parser/binding-freebsd-x64@0.140.0': + '@oxc-parser/binding-darwin-x64@0.144.0': optional: true '@oxc-parser/binding-freebsd-x64@0.142.0': optional: true - '@oxc-parser/binding-linux-arm-gnueabihf@0.140.0': + '@oxc-parser/binding-freebsd-x64@0.144.0': optional: true '@oxc-parser/binding-linux-arm-gnueabihf@0.142.0': optional: true - '@oxc-parser/binding-linux-arm-musleabihf@0.140.0': + '@oxc-parser/binding-linux-arm-gnueabihf@0.144.0': optional: true '@oxc-parser/binding-linux-arm-musleabihf@0.142.0': optional: true - '@oxc-parser/binding-linux-arm64-gnu@0.140.0': + '@oxc-parser/binding-linux-arm-musleabihf@0.144.0': optional: true '@oxc-parser/binding-linux-arm64-gnu@0.142.0': optional: true - '@oxc-parser/binding-linux-arm64-musl@0.140.0': + '@oxc-parser/binding-linux-arm64-gnu@0.144.0': optional: true '@oxc-parser/binding-linux-arm64-musl@0.142.0': optional: true - '@oxc-parser/binding-linux-ppc64-gnu@0.140.0': + '@oxc-parser/binding-linux-arm64-musl@0.144.0': optional: true '@oxc-parser/binding-linux-ppc64-gnu@0.142.0': optional: true - '@oxc-parser/binding-linux-riscv64-gnu@0.140.0': + '@oxc-parser/binding-linux-ppc64-gnu@0.144.0': optional: true '@oxc-parser/binding-linux-riscv64-gnu@0.142.0': optional: true - '@oxc-parser/binding-linux-riscv64-musl@0.140.0': + '@oxc-parser/binding-linux-riscv64-gnu@0.144.0': optional: true '@oxc-parser/binding-linux-riscv64-musl@0.142.0': optional: true - '@oxc-parser/binding-linux-s390x-gnu@0.140.0': + '@oxc-parser/binding-linux-riscv64-musl@0.144.0': optional: true '@oxc-parser/binding-linux-s390x-gnu@0.142.0': optional: true - '@oxc-parser/binding-linux-x64-gnu@0.140.0': + '@oxc-parser/binding-linux-s390x-gnu@0.144.0': optional: true '@oxc-parser/binding-linux-x64-gnu@0.142.0': optional: true - '@oxc-parser/binding-linux-x64-musl@0.140.0': + '@oxc-parser/binding-linux-x64-gnu@0.144.0': optional: true '@oxc-parser/binding-linux-x64-musl@0.142.0': optional: true - '@oxc-parser/binding-openharmony-arm64@0.140.0': + '@oxc-parser/binding-linux-x64-musl@0.144.0': optional: true '@oxc-parser/binding-openharmony-arm64@0.142.0': optional: true - '@oxc-parser/binding-wasm32-wasi@0.140.0': - dependencies: - '@emnapi/core': 1.11.2 - '@emnapi/runtime': 1.11.2 - '@napi-rs/wasm-runtime': 1.2.2(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + '@oxc-parser/binding-openharmony-arm64@0.144.0': optional: true '@oxc-parser/binding-wasm32-wasi@0.142.0': @@ -6058,24 +6044,24 @@ snapshots: '@napi-rs/wasm-runtime': 1.2.2(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) optional: true - '@oxc-parser/binding-win32-arm64-msvc@0.140.0': - optional: true - '@oxc-parser/binding-win32-arm64-msvc@0.142.0': optional: true - '@oxc-parser/binding-win32-ia32-msvc@0.140.0': + '@oxc-parser/binding-win32-arm64-msvc@0.144.0': optional: true '@oxc-parser/binding-win32-ia32-msvc@0.142.0': optional: true - '@oxc-parser/binding-win32-x64-msvc@0.140.0': + '@oxc-parser/binding-win32-ia32-msvc@0.144.0': optional: true '@oxc-parser/binding-win32-x64-msvc@0.142.0': optional: true + '@oxc-parser/binding-win32-x64-msvc@0.144.0': + optional: true + '@oxc-project/types@0.139.0': {} '@oxc-project/types@0.140.0': {} @@ -6084,68 +6070,63 @@ snapshots: '@oxc-project/types@0.143.0': {} - '@oxc-transform/binding-android-arm-eabi@0.140.0': - optional: true + '@oxc-project/types@0.144.0': {} - '@oxc-transform/binding-android-arm64@0.140.0': + '@oxc-transform/binding-android-arm-eabi@0.144.0': optional: true - '@oxc-transform/binding-darwin-arm64@0.140.0': + '@oxc-transform/binding-android-arm64@0.144.0': optional: true - '@oxc-transform/binding-darwin-x64@0.140.0': + '@oxc-transform/binding-darwin-arm64@0.144.0': optional: true - '@oxc-transform/binding-freebsd-x64@0.140.0': + '@oxc-transform/binding-darwin-x64@0.144.0': optional: true - '@oxc-transform/binding-linux-arm-gnueabihf@0.140.0': + '@oxc-transform/binding-freebsd-x64@0.144.0': optional: true - '@oxc-transform/binding-linux-arm-musleabihf@0.140.0': + '@oxc-transform/binding-linux-arm-gnueabihf@0.144.0': optional: true - '@oxc-transform/binding-linux-arm64-gnu@0.140.0': + '@oxc-transform/binding-linux-arm-musleabihf@0.144.0': optional: true - '@oxc-transform/binding-linux-arm64-musl@0.140.0': + '@oxc-transform/binding-linux-arm64-gnu@0.144.0': optional: true - '@oxc-transform/binding-linux-ppc64-gnu@0.140.0': + '@oxc-transform/binding-linux-arm64-musl@0.144.0': optional: true - '@oxc-transform/binding-linux-riscv64-gnu@0.140.0': + '@oxc-transform/binding-linux-ppc64-gnu@0.144.0': optional: true - '@oxc-transform/binding-linux-riscv64-musl@0.140.0': + '@oxc-transform/binding-linux-riscv64-gnu@0.144.0': optional: true - '@oxc-transform/binding-linux-s390x-gnu@0.140.0': + '@oxc-transform/binding-linux-riscv64-musl@0.144.0': optional: true - '@oxc-transform/binding-linux-x64-gnu@0.140.0': + '@oxc-transform/binding-linux-s390x-gnu@0.144.0': optional: true - '@oxc-transform/binding-linux-x64-musl@0.140.0': + '@oxc-transform/binding-linux-x64-gnu@0.144.0': optional: true - '@oxc-transform/binding-openharmony-arm64@0.140.0': + '@oxc-transform/binding-linux-x64-musl@0.144.0': optional: true - '@oxc-transform/binding-wasm32-wasi@0.140.0': - dependencies: - '@emnapi/core': 1.11.2 - '@emnapi/runtime': 1.11.2 - '@napi-rs/wasm-runtime': 1.2.2(@emnapi/core@1.11.2)(@emnapi/runtime@1.11.2) + '@oxc-transform/binding-openharmony-arm64@0.144.0': optional: true - '@oxc-transform/binding-win32-arm64-msvc@0.140.0': + '@oxc-transform/binding-win32-arm64-msvc@0.144.0': optional: true - '@oxc-transform/binding-win32-ia32-msvc@0.140.0': + '@oxc-transform/binding-win32-ia32-msvc@0.144.0': optional: true - '@oxc-transform/binding-win32-x64-msvc@0.140.0': + '@oxc-transform/binding-win32-x64-msvc@0.144.0': optional: true '@oxfmt/binding-android-arm-eabi@0.63.0': @@ -7754,31 +7735,6 @@ snapshots: ordered-binary@1.6.1: optional: true - oxc-parser@0.140.0: - dependencies: - '@oxc-project/types': 0.140.0 - optionalDependencies: - '@oxc-parser/binding-android-arm-eabi': 0.140.0 - '@oxc-parser/binding-android-arm64': 0.140.0 - '@oxc-parser/binding-darwin-arm64': 0.140.0 - '@oxc-parser/binding-darwin-x64': 0.140.0 - '@oxc-parser/binding-freebsd-x64': 0.140.0 - '@oxc-parser/binding-linux-arm-gnueabihf': 0.140.0 - '@oxc-parser/binding-linux-arm-musleabihf': 0.140.0 - '@oxc-parser/binding-linux-arm64-gnu': 0.140.0 - '@oxc-parser/binding-linux-arm64-musl': 0.140.0 - '@oxc-parser/binding-linux-ppc64-gnu': 0.140.0 - '@oxc-parser/binding-linux-riscv64-gnu': 0.140.0 - '@oxc-parser/binding-linux-riscv64-musl': 0.140.0 - '@oxc-parser/binding-linux-s390x-gnu': 0.140.0 - '@oxc-parser/binding-linux-x64-gnu': 0.140.0 - '@oxc-parser/binding-linux-x64-musl': 0.140.0 - '@oxc-parser/binding-openharmony-arm64': 0.140.0 - '@oxc-parser/binding-wasm32-wasi': 0.140.0 - '@oxc-parser/binding-win32-arm64-msvc': 0.140.0 - '@oxc-parser/binding-win32-ia32-msvc': 0.140.0 - '@oxc-parser/binding-win32-x64-msvc': 0.140.0 - oxc-parser@0.142.0: dependencies: '@oxc-project/types': 0.142.0 @@ -7804,28 +7760,51 @@ snapshots: '@oxc-parser/binding-win32-ia32-msvc': 0.142.0 '@oxc-parser/binding-win32-x64-msvc': 0.142.0 - oxc-transform@0.140.0: + oxc-parser@0.144.0: + dependencies: + '@oxc-project/types': 0.144.0 + optionalDependencies: + '@oxc-parser/binding-android-arm-eabi': 0.144.0 + '@oxc-parser/binding-android-arm64': 0.144.0 + '@oxc-parser/binding-darwin-arm64': 0.144.0 + '@oxc-parser/binding-darwin-x64': 0.144.0 + '@oxc-parser/binding-freebsd-x64': 0.144.0 + '@oxc-parser/binding-linux-arm-gnueabihf': 0.144.0 + '@oxc-parser/binding-linux-arm-musleabihf': 0.144.0 + '@oxc-parser/binding-linux-arm64-gnu': 0.144.0 + '@oxc-parser/binding-linux-arm64-musl': 0.144.0 + '@oxc-parser/binding-linux-ppc64-gnu': 0.144.0 + '@oxc-parser/binding-linux-riscv64-gnu': 0.144.0 + '@oxc-parser/binding-linux-riscv64-musl': 0.144.0 + '@oxc-parser/binding-linux-s390x-gnu': 0.144.0 + '@oxc-parser/binding-linux-x64-gnu': 0.144.0 + '@oxc-parser/binding-linux-x64-musl': 0.144.0 + '@oxc-parser/binding-openharmony-arm64': 0.144.0 + '@oxc-parser/binding-win32-arm64-msvc': 0.144.0 + '@oxc-parser/binding-win32-ia32-msvc': 0.144.0 + '@oxc-parser/binding-win32-x64-msvc': 0.144.0 + + oxc-transform@0.144.0: optionalDependencies: - '@oxc-transform/binding-android-arm-eabi': 0.140.0 - '@oxc-transform/binding-android-arm64': 0.140.0 - '@oxc-transform/binding-darwin-arm64': 0.140.0 - '@oxc-transform/binding-darwin-x64': 0.140.0 - '@oxc-transform/binding-freebsd-x64': 0.140.0 - '@oxc-transform/binding-linux-arm-gnueabihf': 0.140.0 - '@oxc-transform/binding-linux-arm-musleabihf': 0.140.0 - '@oxc-transform/binding-linux-arm64-gnu': 0.140.0 - '@oxc-transform/binding-linux-arm64-musl': 0.140.0 - '@oxc-transform/binding-linux-ppc64-gnu': 0.140.0 - '@oxc-transform/binding-linux-riscv64-gnu': 0.140.0 - '@oxc-transform/binding-linux-riscv64-musl': 0.140.0 - '@oxc-transform/binding-linux-s390x-gnu': 0.140.0 - '@oxc-transform/binding-linux-x64-gnu': 0.140.0 - '@oxc-transform/binding-linux-x64-musl': 0.140.0 - '@oxc-transform/binding-openharmony-arm64': 0.140.0 - '@oxc-transform/binding-wasm32-wasi': 0.140.0 - '@oxc-transform/binding-win32-arm64-msvc': 0.140.0 - '@oxc-transform/binding-win32-ia32-msvc': 0.140.0 - '@oxc-transform/binding-win32-x64-msvc': 0.140.0 + '@oxc-transform/binding-android-arm-eabi': 0.144.0 + '@oxc-transform/binding-android-arm64': 0.144.0 + '@oxc-transform/binding-darwin-arm64': 0.144.0 + '@oxc-transform/binding-darwin-x64': 0.144.0 + '@oxc-transform/binding-freebsd-x64': 0.144.0 + '@oxc-transform/binding-linux-arm-gnueabihf': 0.144.0 + '@oxc-transform/binding-linux-arm-musleabihf': 0.144.0 + '@oxc-transform/binding-linux-arm64-gnu': 0.144.0 + '@oxc-transform/binding-linux-arm64-musl': 0.144.0 + '@oxc-transform/binding-linux-ppc64-gnu': 0.144.0 + '@oxc-transform/binding-linux-riscv64-gnu': 0.144.0 + '@oxc-transform/binding-linux-riscv64-musl': 0.144.0 + '@oxc-transform/binding-linux-s390x-gnu': 0.144.0 + '@oxc-transform/binding-linux-x64-gnu': 0.144.0 + '@oxc-transform/binding-linux-x64-musl': 0.144.0 + '@oxc-transform/binding-openharmony-arm64': 0.144.0 + '@oxc-transform/binding-win32-arm64-msvc': 0.144.0 + '@oxc-transform/binding-win32-ia32-msvc': 0.144.0 + '@oxc-transform/binding-win32-x64-msvc': 0.144.0 oxfmt@0.63.0: dependencies: From 63799363907b9fb0df6b831e42532fb3f6a9ac1f Mon Sep 17 00:00:00 2001 From: LongYinan Date: Wed, 12 Aug 2026 00:50:07 +0800 Subject: [PATCH 2/3] fix: adapt to oxc 0.144 AST breaking changes Migrate call sites for ExportDeclaration split, ArrowFunctionBody enum, ClassHeritage, and TS module/namespace split so the oxc ^0.144 bump compiles. Update one snapshot for oxc_codegen whitespace in method bodies. --- .../src/component/cross_file_elision.rs | 124 +++++++++++------- .../src/component/decorator.rs | 37 +++--- .../src/component/hoist.rs | 34 +++-- .../src/component/import_elision.rs | 109 ++++++++------- .../src/component/transform.rs | 20 +-- .../src/directive/decorator.rs | 33 ++--- .../src/directive/metadata.rs | 4 +- .../src/directive/property_decorators.rs | 26 ++-- .../src/injectable/decorator.rs | 17 +-- crates/oxc_angular_compiler/src/linker/mod.rs | 53 ++++---- .../src/ng_module/decorator.rs | 4 +- .../src/ng_module/definition.rs | 4 +- .../src/optimizer/adjust_typescript_enums.rs | 48 ++++--- .../src/optimizer/elide_metadata.rs | 5 +- .../src/optimizer/mark_top_level_pure.rs | 6 +- .../src/output/oxc_converter.rs | 29 ++-- .../src/pipe/decorator.rs | 4 +- ...tegration_test__jit_full_ngxs_example.snap | 4 +- napi/angular-compiler/src/lib.rs | 70 +++++----- 19 files changed, 329 insertions(+), 302 deletions(-) diff --git a/crates/oxc_angular_compiler/src/component/cross_file_elision.rs b/crates/oxc_angular_compiler/src/component/cross_file_elision.rs index 8d1ad9ca6..45333c84b 100644 --- a/crates/oxc_angular_compiler/src/component/cross_file_elision.rs +++ b/crates/oxc_angular_compiler/src/component/cross_file_elision.rs @@ -20,7 +20,8 @@ use std::path::{Path, PathBuf}; use oxc_allocator::Allocator; use oxc_ast::ast::{ - BindingPattern, Declaration, ExportDefaultDeclarationKind, Statement, TSModuleDeclarationBody, + BindingPattern, Declaration, ExportDefaultDeclarationKind, Statement, + TSNamespaceDeclarationBody, }; use oxc_parser::Parser; use oxc_resolver::{ @@ -387,16 +388,12 @@ impl CrossFileAnalyzer { exports: &mut FxHashMap, ) { match stmt { + // export class/function/const/interface/type Foo { ... } + Statement::ExportDeclaration(decl) => { + self.analyze_declaration(&decl.declaration, exports); + } + // Local named export: export { X, Y } / export type { X } Statement::ExportNamedDeclaration(decl) => { - // Handle declarations first (export interface/type/class/function/etc.) - // This includes `export interface User {}` which has export_kind.is_type() = true - // but has a declaration rather than specifiers - if let Some(declaration) = &decl.declaration { - self.analyze_declaration(declaration, exports); - return; - } - - // export type { X } - type-only specifiers (no declaration) if decl.export_kind.is_type() { for spec in &decl.specifiers { let name = spec.exported.name().to_string(); @@ -408,42 +405,46 @@ impl CrossFileAnalyzer { return; } - // Re-export: export { X } from './other' - if let Some(source) = &decl.source { - for spec in &decl.specifiers { - let exported_name = spec.exported.name().to_string(); - let local_name = spec.local.name().to_string(); - exports.insert( - exported_name, - ExportInfo { - is_type_only: spec.export_kind.is_type(), - re_export_source: Some((source.value.to_string(), local_name)), - }, - ); - } - return; - } - // Export specifiers without source: export { X, Y } // These re-export local bindings - we need to check if the local // binding is type-only. For now, mark as not type-only (conservative). - if !decl.specifiers.is_empty() && decl.declaration.is_none() { + for spec in &decl.specifiers { + let name = spec.exported.name().to_string(); + exports.insert( + name, + ExportInfo { + is_type_only: spec.export_kind.is_type(), + re_export_source: None, + }, + ); + } + } + // Re-export: export { X } from './other' / export type { X } from './other' + Statement::ExportFromDeclaration(decl) => { + // Whole-statement `export type { ... } from` — type-only, no re-export chase + // (matches pre-split behavior where export_kind.is_type() short-circuited + // before looking at source). + if decl.export_kind.is_type() { for spec in &decl.specifiers { let name = spec.exported.name().to_string(); exports.insert( name, - ExportInfo { - is_type_only: spec.export_kind.is_type(), - re_export_source: None, - }, + ExportInfo { is_type_only: true, re_export_source: None }, ); } return; } - // Inline declaration: export class/function/const/interface/type - if let Some(declaration) = &decl.declaration { - self.analyze_declaration(declaration, exports); + for spec in &decl.specifiers { + let exported_name = spec.exported.name().to_string(); + let local_name = spec.local.name().to_string(); + exports.insert( + exported_name, + ExportInfo { + is_type_only: spec.export_kind.is_type(), + re_export_source: Some((decl.source.value.to_string(), local_name)), + }, + ); } } Statement::ExportDefaultDeclaration(decl) => { @@ -480,18 +481,46 @@ impl CrossFileAnalyzer { ); } } - // Handle ambient module declarations: declare module "foo" { export ... } - Statement::TSModuleDeclaration(module_decl) => { - if let Some(TSModuleDeclarationBody::TSModuleBlock(block)) = &module_decl.body { + // Ambient external module: declare module "foo" { export ... } + Statement::TSExternalModuleDeclaration(module_decl) => { + if let Some(block) = &module_decl.body { for inner_stmt in &block.body { self.analyze_statement(inner_stmt, exports); } } } + // namespace Foo { ... } / module Foo { ... } (and nested Foo.Bar) + Statement::TSNamespaceDeclaration(ns_decl) => { + self.analyze_namespace_body(&ns_decl.body, exports); + } + // declare global { ... } + Statement::TSGlobalDeclaration(global_decl) => { + for inner_stmt in &global_decl.body.body { + self.analyze_statement(inner_stmt, exports); + } + } _ => {} } } + /// Walk a namespace body, recursing through nested `namespace A.B` forms. + fn analyze_namespace_body<'a>( + &self, + body: &TSNamespaceDeclarationBody<'a>, + exports: &mut FxHashMap, + ) { + match body { + TSNamespaceDeclarationBody::TSModuleBlock(block) => { + for inner_stmt in &block.body { + self.analyze_statement(inner_stmt, exports); + } + } + TSNamespaceDeclarationBody::TSNamespaceDeclaration(nested) => { + self.analyze_namespace_body(&nested.body, exports); + } + } + } + /// Analyze a declaration and add export information. fn analyze_declaration<'a>( &self, @@ -545,18 +574,17 @@ impl CrossFileAnalyzer { ExportInfo { is_type_only: false, re_export_source: None }, ); } - Declaration::TSModuleDeclaration(d) => { - // Module declarations (namespaces) can have runtime value - use oxc_ast::ast::TSModuleDeclarationName; - if let TSModuleDeclarationName::Identifier(id) = &d.id { - exports.insert( - id.name.to_string(), - ExportInfo { is_type_only: false, re_export_source: None }, - ); - } + Declaration::TSNamespaceDeclaration(d) => { + // Namespaces can have runtime value; `id` is a BindingIdentifier + exports.insert( + d.id.name.to_string(), + ExportInfo { is_type_only: false, re_export_source: None }, + ); } - Declaration::TSImportEqualsDeclaration(_) | Declaration::TSGlobalDeclaration(_) => { - // Import equals and global declarations - skip + Declaration::TSExternalModuleDeclaration(_) + | Declaration::TSImportEqualsDeclaration(_) + | Declaration::TSGlobalDeclaration(_) => { + // External modules (string id), import equals, and global — skip } } } diff --git a/crates/oxc_angular_compiler/src/component/decorator.rs b/crates/oxc_angular_compiler/src/component/decorator.rs index 8936250a3..3b1f93a9a 100644 --- a/crates/oxc_angular_compiler/src/component/decorator.rs +++ b/crates/oxc_angular_compiler/src/component/decorator.rs @@ -253,7 +253,7 @@ pub fn extract_component_metadata<'a>( // See: packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts:393 // NOTE: This must be set BEFORE extract_constructor_deps because that function // uses this information to determine whether to use inherited factory pattern. - let has_superclass = class.super_class.is_some(); + let has_superclass = class.heritage.is_some(); metadata.uses_inheritance = has_superclass; // Extract constructor dependencies for factory generation @@ -709,23 +709,18 @@ fn extract_forward_ref_directive_name<'a>(arg: Option<&Argument<'a>>) -> Option< match arg { // forwardRef(() => MyDirective) Argument::ArrowFunctionExpression(arrow) => { - // The body should be an identifier (the directive class) - let body = &arrow.body; - - // Check if it's an expression body (single return expression) - // Arrow functions with expression body have their expression - // wrapped in the body. For `() => Directive`, the expression - // is the directive identifier. - if body.statements.is_empty() { - return None; + // Expression body: () => MyDirective + if let Some(Expression::Identifier(id)) = arrow.get_expression() { + return Some(id.name.clone().into()); } - // For expression arrow functions, the parser puts it in - // an ExpressionStatement - if let Some(oxc_ast::ast::Statement::ExpressionStatement(stmt)) = - body.statements.first() - { - if let Expression::Identifier(id) = &stmt.expression { - return Some(id.name.clone().into()); + // Block body with single ExpressionStatement (parity with pre-0.144) + if let Some(body) = arrow.get_function_body() { + if let Some(oxc_ast::ast::Statement::ExpressionStatement(stmt)) = + body.statements.first() + { + if let Expression::Identifier(id) = &stmt.expression { + return Some(id.name.clone().into()); + } } } None @@ -1199,8 +1194,8 @@ mod tests { ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, @@ -3208,8 +3203,8 @@ mod tests { ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, diff --git a/crates/oxc_angular_compiler/src/component/hoist.rs b/crates/oxc_angular_compiler/src/component/hoist.rs index 3de1682d8..8100c64c0 100644 --- a/crates/oxc_angular_compiler/src/component/hoist.rs +++ b/crates/oxc_angular_compiler/src/component/hoist.rs @@ -879,8 +879,8 @@ fn class_of<'a, 'src>(stmt: &'src Statement<'a>) -> Option<(&'src Class<'a>, u32 } _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some((class.as_ref(), export.span.start)), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some((class.as_ref(), export.span.start)), _ => None, }, _ => None, @@ -1019,8 +1019,8 @@ fn collect_top_level_bindings<'a>( for stmt in &program.body { let var_decl = match stmt { Statement::VariableDeclaration(decl) => Some(decl.as_ref()), - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::VariableDeclaration(decl)) => Some(decl.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::VariableDeclaration(decl) => Some(decl.as_ref()), _ => None, }, _ => None, @@ -1109,8 +1109,8 @@ fn collect_top_level_bindings<'a>( // identifiers across function-call boundaries. let func = match stmt { Statement::FunctionDeclaration(f) => Some(f.as_ref()), - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::FunctionDeclaration(f)) => Some(f.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::FunctionDeclaration(f) => Some(f.as_ref()), _ => None, }, Statement::ExportDefaultDeclaration(export) => match &export.declaration { @@ -1296,9 +1296,9 @@ fn walk_class_eager_parts<'a>( out: &mut HashSet, called: &mut HashSet, ) { - // `super_class` evaluates at class-definition time, before the body + // Heritage (`extends`) evaluates at class-definition time, before the body // executes. Always walk it. - if let Some(super_expr) = &class.super_class { + if let Some(super_expr) = class.heritage_expression() { collect_expr_symbols(super_expr, semantic, out, called); } for element in &class.body.body { @@ -2411,7 +2411,11 @@ fn index_fn_valued_binding<'a>( let mut refs: HashSet = HashSet::new(); let mut called: HashSet = HashSet::new(); let mut visitor = FunctionBodyIdentVisitor::new(semantic, &mut refs, &mut called); - visitor.visit_function_body(&arrow.body); + if let Some(body) = arrow.get_function_body() { + visitor.visit_function_body(body); + } else if let Some(expr) = arrow.get_expression() { + visitor.visit_expression(expr); + } walk_param_defaults(&arrow.params, semantic, &mut refs, &mut called); fn_body_symbol_refs.insert(fn_symbol, refs); fn_body_called_symbols.insert(fn_symbol, called); @@ -2465,7 +2469,11 @@ fn index_local_fn_valued_binding<'a>( match cur { E::ArrowFunctionExpression(arrow) => { let mut visitor = FunctionBodyIdentVisitor::new(semantic, refs, called); - visitor.visit_function_body(&arrow.body); + if let Some(body) = arrow.get_function_body() { + visitor.visit_function_body(body); + } else if let Some(expr) = arrow.get_expression() { + visitor.visit_expression(expr); + } walk_param_defaults(&arrow.params, semantic, refs, called); return true; } @@ -2510,7 +2518,11 @@ fn walk_iife_callee_body<'a>( match cur { E::ArrowFunctionExpression(arrow) => { let mut visitor = FunctionBodyIdentVisitor::new(semantic, out, called); - visitor.visit_function_body(&arrow.body); + if let Some(body) = arrow.get_function_body() { + visitor.visit_function_body(body); + } else if let Some(expr) = arrow.get_expression() { + visitor.visit_expression(expr); + } // Parameter defaults evaluate at IIFE invocation time, before // the body runs — symmetric with top-level function decls // in `collect_top_level_bindings`. diff --git a/crates/oxc_angular_compiler/src/component/import_elision.rs b/crates/oxc_angular_compiler/src/component/import_elision.rs index bd44484f5..3613e089a 100644 --- a/crates/oxc_angular_compiler/src/component/import_elision.rs +++ b/crates/oxc_angular_compiler/src/component/import_elision.rs @@ -171,10 +171,8 @@ impl<'a> ImportElisionAnalyzer<'a> { Self::collect_computed_keys_from_class(class, result); } } - Statement::ExportNamedDeclaration(export) => { - if let Some(oxc_ast::ast::Declaration::ClassDeclaration(class)) = - &export.declaration - { + Statement::ExportDeclaration(export) => { + if let oxc_ast::ast::Declaration::ClassDeclaration(class) = &export.declaration { Self::collect_computed_keys_from_class(class, result); } } @@ -403,10 +401,8 @@ impl<'a> ImportElisionAnalyzer<'a> { ); } } - Statement::ExportNamedDeclaration(export) => { - if let Some(oxc_ast::ast::Declaration::ClassDeclaration(class)) = - &export.declaration - { + Statement::ExportDeclaration(export) => { + if let oxc_ast::ast::Declaration::ClassDeclaration(class) = &export.declaration { Self::collect_uses_from_class( class, ctor_param_decorator_uses, @@ -629,20 +625,24 @@ impl<'a> ImportElisionAnalyzer<'a> { Expression::ArrowFunctionExpression(arrow) => { // Arrow function bodies may contain value references, e.g., // `forwardRef(() => TagPickerComponent)` in Component imports. - for stmt in &arrow.body.statements { - match stmt { - Statement::ExpressionStatement(expr_stmt) => { - Self::collect_value_uses_from_expr( - &expr_stmt.expression, - other_value_uses, - ); - } - Statement::ReturnStatement(ret) => { - if let Some(arg) = &ret.argument { - Self::collect_value_uses_from_expr(arg, other_value_uses); + if let Some(expr) = arrow.get_expression() { + Self::collect_value_uses_from_expr(expr, other_value_uses); + } else if let Some(body) = arrow.get_function_body() { + for stmt in &body.statements { + match stmt { + Statement::ExpressionStatement(expr_stmt) => { + Self::collect_value_uses_from_expr( + &expr_stmt.expression, + other_value_uses, + ); + } + Statement::ReturnStatement(ret) => { + if let Some(arg) = &ret.argument { + Self::collect_value_uses_from_expr(arg, other_value_uses); + } } + _ => {} } - _ => {} } } } @@ -774,18 +774,20 @@ pub fn import_elision_edits<'a>( false }); - // Check if there are type-only exports that need removal - let has_type_only_exports = program.body.iter().any(|stmt| { - if let Statement::ExportNamedDeclaration(export_decl) = stmt { - if export_decl.source.is_some() || export_decl.declaration.is_some() { - return export_decl.export_kind.is_type(); - } - if export_decl.export_kind.is_type() { - return true; - } - return export_decl.specifiers.iter().any(|spec| spec.export_kind.is_type()); + // Check if there are type-only exports that need removal. + // ExportDeclaration always has a declaration (export class/const/type Foo) — those are + // not elided here. Only ExportNamedDeclaration (local `{ }`) and ExportFromDeclaration + // (re-exports) carry type-only / per-specifier type elision. + let has_type_only_exports = program.body.iter().any(|stmt| match stmt { + Statement::ExportNamedDeclaration(export_decl) => { + export_decl.export_kind.is_type() + || export_decl.specifiers.iter().any(|spec| spec.export_kind.is_type()) } - false + Statement::ExportFromDeclaration(export_decl) => { + export_decl.export_kind.is_type() + || export_decl.specifiers.iter().any(|spec| spec.export_kind.is_type()) + } + _ => false, }); if !analyzer.has_type_only_imports() && !has_empty_imports && !has_type_only_exports { @@ -903,21 +905,32 @@ pub fn import_elision_edits<'a>( } } - // Process type-only export declarations + // Process type-only export declarations. + // Local `export { ... }` → ExportNamedDeclaration; re-exports → ExportFromDeclaration. + // `export class/const/...` is ExportDeclaration and is skipped (no type elision here). for stmt in &program.body { - let Statement::ExportNamedDeclaration(export_decl) = stmt else { - continue; + let (span_start, span_end, export_kind_is_type, specifiers, source_module) = match stmt { + Statement::ExportNamedDeclaration(export_decl) => ( + export_decl.span.start, + export_decl.span.end, + export_decl.export_kind.is_type(), + &export_decl.specifiers, + None::<&str>, + ), + Statement::ExportFromDeclaration(export_decl) => ( + export_decl.span.start, + export_decl.span.end, + export_decl.export_kind.is_type(), + &export_decl.specifiers, + Some(export_decl.source.value.as_str()), + ), + _ => continue, }; - // Skip exports with declarations (e.g. `export class X {}`) - if export_decl.declaration.is_some() { - continue; - } - - if export_decl.export_kind.is_type() { + if export_kind_is_type { // `export type { X }` or `export type { X } from './foo'` — remove entirely - let start = export_decl.span.start as usize; - let mut end = export_decl.span.end as usize; + let start = span_start as usize; + let mut end = span_end as usize; let bytes = source.as_bytes(); while end < bytes.len() && (bytes[end] == b'\n' || bytes[end] == b'\r') { end += 1; @@ -928,14 +941,14 @@ pub fn import_elision_edits<'a>( // Check for individual type-only specifiers (`export { type X, Y }`) let (type_specs, value_specs): (Vec<_>, Vec<_>) = - export_decl.specifiers.iter().partition(|spec| spec.export_kind.is_type()); + specifiers.iter().partition(|spec| spec.export_kind.is_type()); if type_specs.is_empty() { continue; } - let start = export_decl.span.start as usize; - let mut end = export_decl.span.end as usize; + let start = span_start as usize; + let mut end = span_end as usize; let bytes = source.as_bytes(); while end < bytes.len() && (bytes[end] == b'\n' || bytes[end] == b'\r') { end += 1; @@ -961,14 +974,14 @@ pub fn import_elision_edits<'a>( new_export.push_str(&named_specifiers.join(", ")); new_export.push_str(" }"); - if let Some(source_lit) = &export_decl.source { + if let Some(source_mod) = source_module { new_export.push_str(" from \""); - new_export.push_str(source_lit.value.as_str()); + new_export.push_str(source_mod); new_export.push('"'); } new_export.push(';'); - if end > export_decl.span.end as usize { + if end > span_end as usize { new_export.push('\n'); } diff --git a/crates/oxc_angular_compiler/src/component/transform.rs b/crates/oxc_angular_compiler/src/component/transform.rs index 772fed993..b6ff0d685 100644 --- a/crates/oxc_angular_compiler/src/component/transform.rs +++ b/crates/oxc_angular_compiler/src/component/transform.rs @@ -1871,8 +1871,8 @@ fn collect_parameter_property_names( Statement::ClassDeclaration(class_decl) => { visit_class(class_decl, &mut names); } - Statement::ExportNamedDeclaration(export) => { - if let Some(oxc_ast::ast::Declaration::ClassDeclaration(class_decl)) = + Statement::ExportDeclaration(export) => { + if let oxc_ast::ast::Declaration::ClassDeclaration(class_decl) = &export.declaration { visit_class(class_decl, &mut names); @@ -1934,8 +1934,8 @@ fn remove_parameter_property_fields( Statement::ClassDeclaration(class_decl) => { visit_class(class_decl, param_names); } - Statement::ExportNamedDeclaration(export) => { - if let Some(oxc_ast::ast::Declaration::ClassDeclaration(class_decl)) = + Statement::ExportDeclaration(export) => { + if let oxc_ast::ast::Declaration::ClassDeclaration(class_decl) = &mut export.declaration { visit_class(class_decl, param_names); @@ -2060,8 +2060,8 @@ fn transform_angular_file_jit( } _ => (None, 0, false, false), }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => { + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => { (Some(class.as_ref()), export.span.start, true, false) } _ => (None, 0, false, false), @@ -2213,8 +2213,8 @@ fn transform_angular_file_jit( ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, @@ -2523,8 +2523,8 @@ pub fn transform_angular_file( } _ => (None, 0), }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => { + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => { (Some(class.as_ref()), export.span.start) } _ => (None, 0), diff --git a/crates/oxc_angular_compiler/src/directive/decorator.rs b/crates/oxc_angular_compiler/src/directive/decorator.rs index c6413f44e..b45fda650 100644 --- a/crates/oxc_angular_compiler/src/directive/decorator.rs +++ b/crates/oxc_angular_compiler/src/directive/decorator.rs @@ -188,7 +188,7 @@ pub fn extract_directive_metadata<'a>( // Detect if the directive extends another class // Similar to Angular's: const usesInheritance = reflector.hasBaseClass(clazz); // See: packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts:393 - let has_superclass = class.super_class.is_some(); + let has_superclass = class.heritage.is_some(); builder = builder.uses_inheritance(has_superclass); // Extract constructor dependencies for factory generation @@ -489,8 +489,8 @@ pub fn collect_string_consts<'a>( for stmt in &program.body { let decl = match stmt { Statement::VariableDeclaration(d) => d.as_ref(), - Statement::ExportNamedDeclaration(e) => match &e.declaration { - Some(Declaration::VariableDeclaration(d)) => d.as_ref(), + Statement::ExportDeclaration(e) => match &e.declaration { + Declaration::VariableDeclaration(d) => d.as_ref(), _ => continue, }, _ => continue, @@ -806,15 +806,18 @@ fn extract_forward_ref_directive_name<'a>(arg: Option<&Argument<'a>>) -> Option< let arg = arg?; match arg { Argument::ArrowFunctionExpression(arrow) => { - let body = &arrow.body; - if body.statements.is_empty() { - return None; + // Expression body: () => MyDirective + if let Some(Expression::Identifier(id)) = arrow.get_expression() { + return Some(id.name.clone().into()); } - if let Some(oxc_ast::ast::Statement::ExpressionStatement(stmt)) = - body.statements.first() - { - if let Expression::Identifier(id) = &stmt.expression { - return Some(id.name.clone().into()); + // Block body with single ExpressionStatement (parity with pre-0.144) + if let Some(body) = arrow.get_function_body() { + if let Some(oxc_ast::ast::Statement::ExpressionStatement(stmt)) = + body.statements.first() + { + if let Expression::Identifier(id) = &stmt.expression { + return Some(id.name.clone().into()); + } } } None @@ -927,8 +930,8 @@ mod tests { ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, @@ -1028,8 +1031,8 @@ mod tests { ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, diff --git a/crates/oxc_angular_compiler/src/directive/metadata.rs b/crates/oxc_angular_compiler/src/directive/metadata.rs index 12f8305c9..9c791d85a 100644 --- a/crates/oxc_angular_compiler/src/directive/metadata.rs +++ b/crates/oxc_angular_compiler/src/directive/metadata.rs @@ -528,8 +528,8 @@ mod tests { ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, diff --git a/crates/oxc_angular_compiler/src/directive/property_decorators.rs b/crates/oxc_angular_compiler/src/directive/property_decorators.rs index 61cdc3ae4..77b094287 100644 --- a/crates/oxc_angular_compiler/src/directive/property_decorators.rs +++ b/crates/oxc_angular_compiler/src/directive/property_decorators.rs @@ -103,18 +103,16 @@ fn try_unwrap_forward_ref<'a>(expr: &'a Expression<'a>) -> Option<&'a Expression _ => return None, }; - // Handle expression body: () => MyClass - if arrow.expression { - // For expression body, the statement is the expression wrapped in ExpressionStatement - let stmt = arrow.body.statements.first()?; - if let oxc_ast::ast::Statement::ExpressionStatement(expr_stmt) = stmt { - return Some(&expr_stmt.expression); - } - } else if arrow.body.statements.len() == 1 { - // Handle explicit return: () => { return MyClass; } - let stmt = arrow.body.statements.first()?; - if let oxc_ast::ast::Statement::ReturnStatement(ret) = stmt { - return ret.argument.as_ref(); + // Expression body: () => MyClass + if let Some(expr) = arrow.get_expression() { + return Some(expr); + } + // Block body: () => { return MyClass; } + if let Some(body) = arrow.get_function_body() { + if body.statements.len() == 1 { + if let oxc_ast::ast::Statement::ReturnStatement(ret) = &body.statements[0] { + return ret.argument.as_ref(); + } } } @@ -1511,8 +1509,8 @@ mod tests { ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, diff --git a/crates/oxc_angular_compiler/src/injectable/decorator.rs b/crates/oxc_angular_compiler/src/injectable/decorator.rs index 14f86a6c8..0ab8f4528 100644 --- a/crates/oxc_angular_compiler/src/injectable/decorator.rs +++ b/crates/oxc_angular_compiler/src/injectable/decorator.rs @@ -436,19 +436,12 @@ fn extract_forward_ref_or_expression<'a>( if let Expression::Identifier(id) = &call.callee { if id.name == "forwardRef" { if let Some(Argument::ArrowFunctionExpression(arrow)) = call.arguments.first() { - // Get the body expression - arrow functions with expression bodies - // store the expression as a single ExpressionStatement in body.statements - if arrow.expression { - if let Some(oxc_ast::ast::Statement::ExpressionStatement(expr_stmt)) = - arrow.body.statements.first() + // Expression body: forwardRef(() => X) + if let Some(body_expr) = arrow.get_expression() { + if let Some(expression) = + convert_oxc_expression(&allocator, body_expr, source_text) { - if let Some(expression) = convert_oxc_expression( - &allocator, - &expr_stmt.expression, - source_text, - ) { - return Some((expression, true)); - } + return Some((expression, true)); } } } diff --git a/crates/oxc_angular_compiler/src/linker/mod.rs b/crates/oxc_angular_compiler/src/linker/mod.rs index d23dba9d4..cf990a6f7 100644 --- a/crates/oxc_angular_compiler/src/linker/mod.rs +++ b/crates/oxc_angular_compiler/src/linker/mod.rs @@ -202,10 +202,8 @@ fn walk_statement(stmt: &Statement<'_>, source: &str, filename: &str, edits: &mu } } } - Statement::ExportNamedDeclaration(export_decl) => { - if let Some(ref decl) = export_decl.declaration { - walk_declaration(decl, source, filename, edits); - } + Statement::ExportDeclaration(export_decl) => { + walk_declaration(&export_decl.declaration, source, filename, edits); } Statement::ExportDefaultDeclaration(export_default) => match &export_default.declaration { oxc_ast::ast::ExportDefaultDeclarationKind::ClassDeclaration(class_decl) => { @@ -323,8 +321,12 @@ fn walk_expression(expr: &Expression<'_>, source: &str, filename: &str, edits: & walk_expression(&paren.expression, source, filename, edits); } Expression::ArrowFunctionExpression(arrow) => { - for stmt in &arrow.body.statements { - walk_statement(stmt, source, filename, edits); + if let Some(body) = arrow.get_function_body() { + for stmt in &body.statements { + walk_statement(stmt, source, filename, edits); + } + } else if let Some(expr) = arrow.get_expression() { + walk_expression(expr, source, filename, edits); } } Expression::FunctionExpression(func) => { @@ -491,17 +493,14 @@ fn extract_function_return_source<'a>(expr: &Expression<'a>, source: &'a str) -> None } Expression::ArrowFunctionExpression(arrow) => { - if arrow.expression { - // Expression body: () => expr - if let Some(stmt) = arrow.body.statements.first() { - if let Statement::ExpressionStatement(expr_stmt) = stmt { - let span = expr_stmt.expression.span(); - return Some(&source[span.start as usize..span.end as usize]); - } - } - } else { - // Block body: () => { return expr; } - for stmt in &arrow.body.statements { + // Expression body: () => expr + if let Some(expr) = arrow.get_expression() { + let span = expr.span(); + return Some(&source[span.start as usize..span.end as usize]); + } + // Block body: () => { return expr; } + if let Some(body) = arrow.get_function_body() { + for stmt in &body.statements { if let Statement::ReturnStatement(ret) = stmt { if let Some(arg) = &ret.argument { let span = arg.span(); @@ -1283,19 +1282,15 @@ fn link_class_metadata_async( // Extract the inner object expression from the arrow body. // The arrow has an expression body: (params) => ({...}) - // In the AST, body.statements has a single ExpressionStatement, - // and the expression may be wrapped in a ParenthesizedExpression. + // The expression may be wrapped in a ParenthesizedExpression. let inner_obj: Option<&ObjectExpression<'_>> = resolve_metadata_arrow.and_then(|arrow| { - let stmt = arrow.body.statements.first()?; - if let Statement::ExpressionStatement(expr_stmt) = stmt { - let mut expr = &expr_stmt.expression; - // Unwrap parenthesized expression if present: ({...}) - while let Expression::ParenthesizedExpression(paren) = expr { - expr = &paren.expression; - } - if let Expression::ObjectExpression(obj) = expr { - return Some(obj.as_ref()); - } + let mut expr = arrow.get_expression()?; + // Unwrap parenthesized expression if present: ({...}) + while let Expression::ParenthesizedExpression(paren) = expr { + expr = &paren.expression; + } + if let Expression::ObjectExpression(obj) = expr { + return Some(obj.as_ref()); } None }); diff --git a/crates/oxc_angular_compiler/src/ng_module/decorator.rs b/crates/oxc_angular_compiler/src/ng_module/decorator.rs index 6f924bbe6..0586413ff 100644 --- a/crates/oxc_angular_compiler/src/ng_module/decorator.rs +++ b/crates/oxc_angular_compiler/src/ng_module/decorator.rs @@ -579,8 +579,8 @@ mod tests { ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, diff --git a/crates/oxc_angular_compiler/src/ng_module/definition.rs b/crates/oxc_angular_compiler/src/ng_module/definition.rs index bb5fb3f42..0e8033bed 100644 --- a/crates/oxc_angular_compiler/src/ng_module/definition.rs +++ b/crates/oxc_angular_compiler/src/ng_module/definition.rs @@ -561,8 +561,8 @@ mod tests { // Find the class let class = parser_ret.program.body.iter().find_map(|stmt| match stmt { - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, diff --git a/crates/oxc_angular_compiler/src/optimizer/adjust_typescript_enums.rs b/crates/oxc_angular_compiler/src/optimizer/adjust_typescript_enums.rs index a53cf88b1..95cd90feb 100644 --- a/crates/oxc_angular_compiler/src/optimizer/adjust_typescript_enums.rs +++ b/crates/oxc_angular_compiler/src/optimizer/adjust_typescript_enums.rs @@ -89,34 +89,32 @@ impl AdjustTypeScriptEnumsTransformer { &self, stmt: &'a Statement<'a>, ) -> Option<(&'a str, u32, u32, bool)> { - // Check for exported var declaration - if let Statement::ExportNamedDeclaration(export) = stmt { - if let Some(decl) = &export.declaration { - if let oxc_ast::ast::Declaration::VariableDeclaration(var_decl) = decl { - // Must be `var` (TypeScript uses var for enums) - if !matches!(var_decl.kind, oxc_ast::ast::VariableDeclarationKind::Var) { - return None; - } + // Check for exported var declaration (`export var X;`) + if let Statement::ExportDeclaration(export) = stmt { + if let oxc_ast::ast::Declaration::VariableDeclaration(var_decl) = &export.declaration { + // Must be `var` (TypeScript uses var for enums) + if !matches!(var_decl.kind, oxc_ast::ast::VariableDeclarationKind::Var) { + return None; + } - // Must have exactly one declaration with no initializer - if var_decl.declarations.len() != 1 { - return None; - } + // Must have exactly one declaration with no initializer + if var_decl.declarations.len() != 1 { + return None; + } - let decl = &var_decl.declarations[0]; - if decl.init.is_some() { - return None; - } + let decl = &var_decl.declarations[0]; + if decl.init.is_some() { + return None; + } - // Get the variable name - if let BindingPattern::BindingIdentifier(ident) = &decl.id { - return Some(( - ident.name.as_str(), - export.span.start, - export.span.end, - true, - )); - } + // Get the variable name + if let BindingPattern::BindingIdentifier(ident) = &decl.id { + return Some(( + ident.name.as_str(), + export.span.start, + export.span.end, + true, + )); } } return None; diff --git a/crates/oxc_angular_compiler/src/optimizer/elide_metadata.rs b/crates/oxc_angular_compiler/src/optimizer/elide_metadata.rs index 82c7d6afa..b29778aff 100644 --- a/crates/oxc_angular_compiler/src/optimizer/elide_metadata.rs +++ b/crates/oxc_angular_compiler/src/optimizer/elide_metadata.rs @@ -128,7 +128,10 @@ impl ElideMetadataTransformer { } } Expression::ArrowFunctionExpression(arrow) => { - self.check_function_body_for_metadata(&arrow.body.statements, edits); + if let Some(body) = arrow.get_function_body() { + self.check_function_body_for_metadata(&body.statements, edits); + } + // Expression-body arrows have no statements to scan for metadata. } _ => {} } diff --git a/crates/oxc_angular_compiler/src/optimizer/mark_top_level_pure.rs b/crates/oxc_angular_compiler/src/optimizer/mark_top_level_pure.rs index 182a73d3c..eceae7fb4 100644 --- a/crates/oxc_angular_compiler/src/optimizer/mark_top_level_pure.rs +++ b/crates/oxc_angular_compiler/src/optimizer/mark_top_level_pure.rs @@ -119,9 +119,9 @@ impl MarkTopLevelPureTransformer { } } - // Export named: export const x = foo(); - Statement::ExportNamedDeclaration(export) => { - if let Some(Declaration::VariableDeclaration(var_decl)) = &export.declaration { + // Export declaration: export const x = foo(); + Statement::ExportDeclaration(export) => { + if let Declaration::VariableDeclaration(var_decl) = &export.declaration { self.visit_variable_declaration(var_decl, source, edits); } } diff --git a/crates/oxc_angular_compiler/src/output/oxc_converter.rs b/crates/oxc_angular_compiler/src/output/oxc_converter.rs index af872d410..cbc182fed 100644 --- a/crates/oxc_angular_compiler/src/output/oxc_converter.rs +++ b/crates/oxc_angular_compiler/src/output/oxc_converter.rs @@ -441,29 +441,22 @@ fn convert_arrow_function_expression<'a>( } // Convert body - let body = if arrow.expression { + let body = if let Some(expr) = arrow.get_expression() { // Expression body: () => expr - let expr_body = arrow.body.statements.first()?; - if let oxc_ast::ast::Statement::ExpressionStatement(expr_stmt) = expr_body { - match convert_oxc_expression(allocator, &expr_stmt.expression, source_text) { - Some(converted) => { - ArrowFunctionBody::Expression(Box::new_in(converted, &allocator)) - } - None => { - // Unsupported expression (e.g., await, yield, class) — - // fall back to raw source for the entire arrow - return make_raw_source(allocator, source_text, arrow.span); - } + match convert_oxc_expression(allocator, expr, source_text) { + Some(converted) => ArrowFunctionBody::Expression(Box::new_in(converted, &allocator)), + None => { + // Unsupported expression (e.g., await, yield, class) — + // fall back to raw source for the entire arrow + return make_raw_source(allocator, source_text, arrow.span); } - } else { - return None; } - } else { + } else if let Some(fn_body) = arrow.get_function_body() { // Block body: () => { ... } // If any statement cannot be converted, fall back to raw source to avoid // silently dropping statements (which corrupts the function body). - let mut statements = OxcVec::with_capacity_in(arrow.body.statements.len(), &allocator); - for stmt in &arrow.body.statements { + let mut statements = OxcVec::with_capacity_in(fn_body.statements.len(), &allocator); + for stmt in &fn_body.statements { match convert_statement(allocator, stmt, source_text) { Some(output_stmt) => statements.push(output_stmt), None => { @@ -473,6 +466,8 @@ fn convert_arrow_function_expression<'a>( } } ArrowFunctionBody::Statements(statements) + } else { + return None; }; Some(OutputExpression::ArrowFunction(Box::new_in( diff --git a/crates/oxc_angular_compiler/src/pipe/decorator.rs b/crates/oxc_angular_compiler/src/pipe/decorator.rs index 3f37ae7f0..9bbebba97 100644 --- a/crates/oxc_angular_compiler/src/pipe/decorator.rs +++ b/crates/oxc_angular_compiler/src/pipe/decorator.rs @@ -412,8 +412,8 @@ mod tests { ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, diff --git a/crates/oxc_angular_compiler/tests/snapshots/integration_test__jit_full_ngxs_example.snap b/crates/oxc_angular_compiler/tests/snapshots/integration_test__jit_full_ngxs_example.snap index 358c501b3..7931a7047 100644 --- a/crates/oxc_angular_compiler/tests/snapshots/integration_test__jit_full_ngxs_example.snap +++ b/crates/oxc_angular_compiler/tests/snapshots/integration_test__jit_full_ngxs_example.snap @@ -24,8 +24,8 @@ let TodoState = class TodoState { static filter(state) { return state.filter; } - add(ctx, action) { /* ... */} - toggle(ctx, action) { /* ... */} + add(ctx, action) {/* ... */} + toggle(ctx, action) {/* ... */} }; __decorate([Action(AddTodo)], TodoState.prototype, "add", null); __decorate([Action(ToggleTodo)], TodoState.prototype, "toggle", null); diff --git a/napi/angular-compiler/src/lib.rs b/napi/angular-compiler/src/lib.rs index 50e3eea25..8404f96e4 100644 --- a/napi/angular-compiler/src/lib.rs +++ b/napi/angular-compiler/src/lib.rs @@ -803,8 +803,8 @@ pub fn extract_component_urls_sync(source: String, filename: String) -> Componen ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, @@ -974,32 +974,28 @@ pub fn extract_top_level_declarations_sync( _ => {} }, - // Export named: export class Foo { ... }, export const foo = ... - Statement::ExportNamedDeclaration(export) => { - if let Some(decl) = &export.declaration { - match decl { - Declaration::ClassDeclaration(class) => { - if let Some(id) = &class.id { - names.push(id.name.to_string()); - } - } - Declaration::FunctionDeclaration(func) => { - if let Some(id) = &func.id { - names.push(id.name.to_string()); - } - } - Declaration::TSEnumDeclaration(enum_decl) => { - names.push(enum_decl.id.name.to_string()); - } - Declaration::VariableDeclaration(var_decl) => { - for d in &var_decl.declarations { - track_binding_pattern_names(&d.id, &mut names); - } - } - _ => {} + // Export declaration: export class Foo { ... }, export const foo = ... + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => { + if let Some(id) = &class.id { + names.push(id.name.to_string()); } } - } + Declaration::FunctionDeclaration(func) => { + if let Some(id) = &func.id { + names.push(id.name.to_string()); + } + } + Declaration::TSEnumDeclaration(enum_decl) => { + names.push(enum_decl.id.name.to_string()); + } + Declaration::VariableDeclaration(var_decl) => { + for d in &var_decl.declarations { + track_binding_pattern_names(&d.id, &mut names); + } + } + _ => {} + }, // Module declarations (imports) Statement::ImportDeclaration(import) => { @@ -1258,8 +1254,8 @@ pub fn extract_pipe_metadata_sync( ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, @@ -1336,8 +1332,8 @@ pub fn compile_pipe_sync( ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, @@ -1569,8 +1565,8 @@ pub fn extract_component_metadata_sync( ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, @@ -1989,8 +1985,8 @@ pub fn compile_class_metadata_sync( ExportDefaultDeclarationKind::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, - Statement::ExportNamedDeclaration(export) => match &export.declaration { - Some(Declaration::ClassDeclaration(class)) => Some(class.as_ref()), + Statement::ExportDeclaration(export) => match &export.declaration { + Declaration::ClassDeclaration(class) => Some(class.as_ref()), _ => None, }, _ => None, @@ -2542,10 +2538,8 @@ pub fn extract_angular_component_by_ast( } // Handle export declarations that might contain classes - Statement::ExportNamedDeclaration(export) => { - if let Some(oxc_ast::ast::Declaration::ClassDeclaration(class)) = - &export.declaration - { + Statement::ExportDeclaration(export) => { + if let oxc_ast::ast::Declaration::ClassDeclaration(class) = &export.declaration { let is_target_class = class.id.as_ref().is_some_and(|id| id.name.as_str() == class_name); From fa4d6dd73c539dd38a2e07e57b522aee6bada5dc Mon Sep 17 00:00:00 2001 From: LongYinan Date: Wed, 12 Aug 2026 00:56:57 +0800 Subject: [PATCH 3/3] style: rustfmt after oxc 0.144 AST migration --- crates/oxc_angular_compiler/src/component/transform.rs | 7 ++----- .../src/optimizer/adjust_typescript_enums.rs | 7 +------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/crates/oxc_angular_compiler/src/component/transform.rs b/crates/oxc_angular_compiler/src/component/transform.rs index b6ff0d685..eab2c97ca 100644 --- a/crates/oxc_angular_compiler/src/component/transform.rs +++ b/crates/oxc_angular_compiler/src/component/transform.rs @@ -1872,8 +1872,7 @@ fn collect_parameter_property_names( visit_class(class_decl, &mut names); } Statement::ExportDeclaration(export) => { - if let oxc_ast::ast::Declaration::ClassDeclaration(class_decl) = - &export.declaration + if let oxc_ast::ast::Declaration::ClassDeclaration(class_decl) = &export.declaration { visit_class(class_decl, &mut names); } @@ -2524,9 +2523,7 @@ pub fn transform_angular_file( _ => (None, 0), }, Statement::ExportDeclaration(export) => match &export.declaration { - Declaration::ClassDeclaration(class) => { - (Some(class.as_ref()), export.span.start) - } + Declaration::ClassDeclaration(class) => (Some(class.as_ref()), export.span.start), _ => (None, 0), }, _ => (None, 0), diff --git a/crates/oxc_angular_compiler/src/optimizer/adjust_typescript_enums.rs b/crates/oxc_angular_compiler/src/optimizer/adjust_typescript_enums.rs index 95cd90feb..b5b8dee9a 100644 --- a/crates/oxc_angular_compiler/src/optimizer/adjust_typescript_enums.rs +++ b/crates/oxc_angular_compiler/src/optimizer/adjust_typescript_enums.rs @@ -109,12 +109,7 @@ impl AdjustTypeScriptEnumsTransformer { // Get the variable name if let BindingPattern::BindingIdentifier(ident) = &decl.id { - return Some(( - ident.name.as_str(), - export.span.start, - export.span.end, - true, - )); + return Some((ident.name.as_str(), export.span.start, export.span.end, true)); } } return None;