From 6179097c13b0b5c9eafdebb05e4c987ce62ef091 Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Sun, 8 Feb 2026 16:11:47 +0100 Subject: [PATCH 01/34] extractor initial --- Cargo.lock | 65 ++- Cargo.toml | 2 +- babel-plugin-extract-messages/CHANGELOG.md | 383 +++++++++++++ babel-plugin-extract-messages/README.md | 54 ++ babel-plugin-extract-messages/build.config.ts | 5 + .../dist/index.d.mts | 22 + babel-plugin-extract-messages/dist/index.mjs | 242 ++++++++ babel-plugin-extract-messages/package.json | 57 ++ babel-plugin-extract-messages/src/index.ts | 393 +++++++++++++ .../extract-messages.test.ts.snap | 527 ++++++++++++++++++ .../test/extract-messages.test.ts | 401 +++++++++++++ .../test/fixtures/js-call-expression.js | 26 + .../test/fixtures/js-message-descriptor.js | 25 + .../test/fixtures/js-with-macros.js | 63 +++ .../test/fixtures/jsx-with-macros.js | 13 + .../test/fixtures/jsx-without-macros.js | 12 + .../test/fixtures/jsx-without-trans.js | 3 + .../test/fixtures/lingui.config.js | 3 + .../test/fixtures/without-lingui.js | 7 + babel-plugin-extract-messages/tsconfig.json | 12 + .../vitest.config.ts | 10 + rust-toolchain.toml | 2 +- src/lib.rs | 5 + src/message_extractor.rs | 89 +++ src/message_extractor_visitor.rs | 513 +++++++++++++++++ tests/message_extractor.rs | 364 ++++++++++++ 26 files changed, 3263 insertions(+), 35 deletions(-) create mode 100644 babel-plugin-extract-messages/CHANGELOG.md create mode 100644 babel-plugin-extract-messages/README.md create mode 100644 babel-plugin-extract-messages/build.config.ts create mode 100644 babel-plugin-extract-messages/dist/index.d.mts create mode 100644 babel-plugin-extract-messages/dist/index.mjs create mode 100644 babel-plugin-extract-messages/package.json create mode 100644 babel-plugin-extract-messages/src/index.ts create mode 100644 babel-plugin-extract-messages/test/__snapshots__/extract-messages.test.ts.snap create mode 100644 babel-plugin-extract-messages/test/extract-messages.test.ts create mode 100644 babel-plugin-extract-messages/test/fixtures/js-call-expression.js create mode 100644 babel-plugin-extract-messages/test/fixtures/js-message-descriptor.js create mode 100644 babel-plugin-extract-messages/test/fixtures/js-with-macros.js create mode 100644 babel-plugin-extract-messages/test/fixtures/jsx-with-macros.js create mode 100644 babel-plugin-extract-messages/test/fixtures/jsx-without-macros.js create mode 100644 babel-plugin-extract-messages/test/fixtures/jsx-without-trans.js create mode 100644 babel-plugin-extract-messages/test/fixtures/lingui.config.js create mode 100644 babel-plugin-extract-messages/test/fixtures/without-lingui.js create mode 100644 babel-plugin-extract-messages/tsconfig.json create mode 100644 babel-plugin-extract-messages/vitest.config.ts create mode 100644 src/message_extractor.rs create mode 100644 src/message_extractor_visitor.rs create mode 100644 tests/message_extractor.rs diff --git a/Cargo.lock b/Cargo.lock index d39c256..f20ac5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,9 +10,9 @@ checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", "once_cell", @@ -383,6 +383,12 @@ dependencies = [ "syn", ] +[[package]] +name = "dragonbox_ecma" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a5577f010d4e1bb3f3c4d6081e05718eb6992cf20119cab4d3abadff198b5ae" + [[package]] name = "either" version = "1.13.0" @@ -1150,12 +1156,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "ryu-js" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" - [[package]] name = "scoped-tls" version = "1.0.1" @@ -1384,9 +1384,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "50.2.3" +version = "56.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a4addc76896d859a57855961fd351486a900021aade516f7623969ed28958f" +checksum = "a98e364864dc10de940b04a8e2b60ea2d2d512b1aa1e940651e128446fe35d71" dependencies = [ "swc_allocator", "swc_atoms", @@ -1406,9 +1406,9 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "19.0.0" +version = "20.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "724195600825cbdd2a899d5473d2ce1f24ae418bff1231f160ecf38a3bc81f46" +checksum = "252124d0d786aa2338860701a067c93488747dfadbfedb16ac78f386e16a0ac4" dependencies = [ "bitflags", "cbor4ii", @@ -1426,25 +1426,24 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c77d9d21345ca986ae3b5ff1a4fa3607b15b07ed397506e6dba32e867cf40fd" +checksum = "56116de786118dce35e90b612a1f4d952116dd2728ecb197c8064cfccf527baf" dependencies = [ "ascii", "compact_str", + "dragonbox_ecma", "memchr", "num-bigint", "once_cell", "regex", "rustc-hash", - "ryu-js", "serde", "swc_allocator", "swc_atoms", "swc_common", "swc_ecma_ast", "swc_ecma_codegen_macros", - "swc_sourcemap", "tracing", ] @@ -1461,9 +1460,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "29.0.2" +version = "33.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e63984b544fe1d8f66e9ce616e57429bb878572fcf1504851ef9d9f4f5260e2b" +checksum = "7d237cf212d1f3ff5c0cf6ab5070f0ed4d624a0ab032ac4f0451675d31890e71" dependencies = [ "bitflags", "either", @@ -1495,9 +1494,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "32.0.0" +version = "36.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "499486ed875ba49af2f36d0d809f61ce6e42943a3aa1d97f592d96f10fe734cc" +checksum = "bdf93abf3dc6d2b21a2a29c62b0197cd270b6105a483236ecba91993f895204e" dependencies = [ "better_scoped_tls", "indexmap", @@ -1517,9 +1516,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "35.0.0" +version = "40.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ec7851260522b2864983caa3fc7004ebb080842f49ee49a5461b779277378d" +checksum = "994b87d7c96e973c324efdc1e68ee58ceca319d1416b6a7fd63157f45e72a493" dependencies = [ "ansi_term", "anyhow", @@ -1543,16 +1542,16 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "25.0.0" +version = "26.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dd5ee449d21110a271e73d0a9f7640a8854a62cb0e2cb0c9db3445383598e21" +checksum = "3669c1d92ba315caff5a80df76141367acf61b2d846231a1960e25be65a20fbd" dependencies = [ + "dragonbox_ecma", "indexmap", "num_cpus", "once_cell", "par-core", "rustc-hash", - "ryu-js", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -1562,9 +1561,9 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "19.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69d63f7f704a2ec937edef90a3eba1f64602eceb60c8deb260c01131f680e8b" +checksum = "e971a258717db3dc8939c38410d8b8cb8126f1b05b9758672daa7cae3e0248c2" dependencies = [ "new_debug_unreachable", "num-bigint", @@ -1632,9 +1631,9 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "19.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f976dc63cd8b1916f265ee7d2647c28a85b433640099a5bf07153346dedffda" +checksum = "e78e1a9d26be495289cb07b9d73222f92f60b74d47904169d3ce4977600ec11e" dependencies = [ "better_scoped_tls", "cbor4ii", @@ -2193,18 +2192,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index b21cce2..a8dd2e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ serde = "1.0.207" serde_json = "1.0.125" regex = "1.10.6" once_cell = "1.19.0" -swc_core = { version = "50.2.3", features = [ +swc_core = { version = "56.0.0", features = [ "ecma_plugin_transform", "ecma_utils", "ecma_visit", diff --git a/babel-plugin-extract-messages/CHANGELOG.md b/babel-plugin-extract-messages/CHANGELOG.md new file mode 100644 index 0000000..7f7b327 --- /dev/null +++ b/babel-plugin-extract-messages/CHANGELOG.md @@ -0,0 +1,383 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [5.9.0](https://github.com/lingui/js-lingui/compare/v5.8.0...v5.9.0) (2026-01-23) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [5.8.0](https://github.com/lingui/js-lingui/compare/v5.7.0...v5.8.0) (2026-01-16) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [5.7.0](https://github.com/lingui/js-lingui/compare/v5.6.1...v5.7.0) (2025-12-12) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [5.6.1](https://github.com/lingui/js-lingui/compare/v5.6.0...v5.6.1) (2025-11-28) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [5.6.0](https://github.com/lingui/js-lingui/compare/v5.5.2...v5.6.0) (2025-11-12) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [5.5.2](https://github.com/lingui/js-lingui/compare/v5.5.1...v5.5.2) (2025-10-30) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [5.5.1](https://github.com/lingui/js-lingui/compare/v5.5.0...v5.5.1) (2025-10-10) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [5.5.0](https://github.com/lingui/js-lingui/compare/v5.4.1...v5.5.0) (2025-09-12) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [5.4.1](https://github.com/lingui/js-lingui/compare/v5.4.0...v5.4.1) (2025-08-11) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [5.4.0](https://github.com/lingui/js-lingui/compare/v5.3.3...v5.4.0) (2025-08-01) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [5.3.3](https://github.com/lingui/js-lingui/compare/v5.3.2...v5.3.3) (2025-07-11) + +### Bug Fixes + +* standardize repository field format across all packages ([#2269](https://github.com/lingui/js-lingui/issues/2269)) ([a03a984](https://github.com/lingui/js-lingui/commit/a03a984cdc027ece9902277243f671ca15912adc)) + +## [5.3.2](https://github.com/lingui/js-lingui/compare/v5.3.1...v5.3.2) (2025-05-27) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [5.3.1](https://github.com/lingui/js-lingui/compare/v5.3.0...v5.3.1) (2025-04-14) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [5.3.0](https://github.com/lingui/js-lingui/compare/v5.2.0...v5.3.0) (2025-03-21) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [5.2.0](https://github.com/lingui/js-lingui/compare/v5.1.2...v5.2.0) (2025-01-31) + +### Bug Fixes + +* don't use anything from "@babel/types" in runtime ([#2132](https://github.com/lingui/js-lingui/issues/2132)) ([7ebb88d](https://github.com/lingui/js-lingui/commit/7ebb88dc79846839e0826d073cc0d830c09dda27)) + +## [5.1.2](https://github.com/lingui/js-lingui/compare/v5.1.1...v5.1.2) (2024-12-16) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [5.1.1](https://github.com/lingui/js-lingui/compare/v5.1.0...v5.1.1) (2024-12-16) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [5.1.0](https://github.com/lingui/js-lingui/compare/v5.0.0...v5.1.0) (2024-12-06) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.14.1](https://github.com/lingui/js-lingui/compare/v4.14.0...v4.14.1) (2024-11-28) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.14.0](https://github.com/lingui/js-lingui/compare/v4.13.0...v4.14.0) (2024-11-07) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.13.0](https://github.com/lingui/js-lingui/compare/v4.12.0...v4.13.0) (2024-10-15) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.12.0](https://github.com/lingui/js-lingui/compare/v4.11.4...v4.12.0) (2024-10-11) + +### Features + +- enable importAttributes and explicitResourceManagement for extractor ([#2009](https://github.com/lingui/js-lingui/issues/2009)) ([c20ce12](https://github.com/lingui/js-lingui/commit/c20ce12dbc3edaf476fd745df7e8f8b1390afe95)) + +## [4.11.4](https://github.com/lingui/js-lingui/compare/v4.11.3...v4.11.4) (2024-09-02) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.11.3](https://github.com/lingui/js-lingui/compare/v4.11.2...v4.11.3) (2024-08-09) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.11.2](https://github.com/lingui/js-lingui/compare/v4.11.1...v4.11.2) (2024-07-03) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.11.1](https://github.com/lingui/js-lingui/compare/v4.11.0...v4.11.1) (2024-05-30) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.11.0](https://github.com/lingui/js-lingui/compare/v4.10.1...v4.11.0) (2024-05-17) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.10.1](https://github.com/lingui/js-lingui/compare/v4.10.0...v4.10.1) (2024-05-03) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.10.0](https://github.com/lingui/js-lingui/compare/v4.8.0...v4.10.0) (2024-04-12) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.9.0](https://github.com/lingui/js-lingui/compare/v4.8.0...v4.9.0) (2024-04-12) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.8.0](https://github.com/lingui/js-lingui/compare/v4.7.2...v4.8.0) (2024-04-03) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.7.2](https://github.com/lingui/js-lingui/compare/v4.7.1...v4.7.2) (2024-03-26) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.7.1](https://github.com/lingui/js-lingui/compare/v4.7.0...v4.7.1) (2024-02-20) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.7.0](https://github.com/lingui/js-lingui/compare/v4.6.0...v4.7.0) (2024-01-05) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.6.0](https://github.com/lingui/js-lingui/compare/v4.5.0...v4.6.0) (2023-12-01) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.5.0](https://github.com/lingui/js-lingui/compare/v4.4.2...v4.5.0) (2023-09-14) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.4.2](https://github.com/lingui/js-lingui/compare/v4.4.1...v4.4.2) (2023-08-31) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.4.1](https://github.com/lingui/js-lingui/compare/v4.4.0...v4.4.1) (2023-08-30) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.4.0](https://github.com/lingui/js-lingui/compare/v4.3.0...v4.4.0) (2023-08-08) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.3.0](https://github.com/lingui/js-lingui/compare/v4.2.1...v4.3.0) (2023-06-29) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.2.1](https://github.com/lingui/js-lingui/compare/v4.2.0...v4.2.1) (2023-06-07) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.2.0](https://github.com/lingui/js-lingui/compare/v4.1.2...v4.2.0) (2023-05-26) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.1.2](https://github.com/lingui/js-lingui/compare/v4.1.1...v4.1.2) (2023-05-17) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [4.1.1](https://github.com/lingui/js-lingui/compare/v4.1.0...v4.1.1) (2023-05-17) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [4.1.0](https://github.com/lingui/js-lingui/compare/v4.0.0...v4.1.0) (2023-05-15) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.17.2](https://github.com/lingui/js-lingui/compare/v3.17.1...v3.17.2) (2023-02-24) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.17.1](https://github.com/lingui/js-lingui/compare/v3.17.0...v3.17.1) (2023-02-07) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.17.0](https://github.com/lingui/js-lingui/compare/v3.16.1...v3.17.0) (2023-02-01) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.16.1](https://github.com/lingui/js-lingui/compare/v3.16.0...v3.16.1) (2023-01-24) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.16.0](https://github.com/lingui/js-lingui/compare/v3.15.0...v3.16.0) (2023-01-18) + +### Features + +- allow extract to work with i18n.\_ calls not created from macro ([#1309](https://github.com/lingui/js-lingui/issues/1309)) ([90be171](https://github.com/lingui/js-lingui/commit/90be1719becc4710c910ea16928b7ce41ef9ab19)) + +# [3.15.0](https://github.com/lingui/js-lingui/compare/v3.14.0...v3.15.0) (2022-11-07) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.14.0](https://github.com/lingui/js-lingui/compare/v3.13.3...v3.14.0) (2022-06-22) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.13.3](https://github.com/lingui/js-lingui/compare/v3.13.2...v3.13.3) (2022-04-24) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.13.2](https://github.com/lingui/js-lingui/compare/v3.13.1...v3.13.2) (2022-01-24) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.13.1](https://github.com/lingui/js-lingui/compare/v3.13.0...v3.13.1) (2022-01-21) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.13.0](https://github.com/lingui/js-lingui/compare/v3.12.1...v3.13.0) (2021-11-26) + +### Features + +- add the ability to extract concatenated comments ([#1152](https://github.com/lingui/js-lingui/issues/1152)) ([0e553cf](https://github.com/lingui/js-lingui/commit/0e553cf14f5f6dce87839abed76fd21f351a2eae)) +- msgctxt support ([#1094](https://github.com/lingui/js-lingui/issues/1094)) ([8ee42cb](https://github.com/lingui/js-lingui/commit/8ee42cbfe26bc6d055748dcf2713ab8ade7ec827)) + +## [3.12.1](https://github.com/lingui/js-lingui/compare/v3.12.0...v3.12.1) (2021-09-28) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.12.0](https://github.com/lingui/js-lingui/compare/v3.11.1...v3.12.0) (2021-09-28) + +### Bug Fixes + +- **#1137:** configPath is passed through babel-plugin-extract-messages ([#1140](https://github.com/lingui/js-lingui/issues/1140)) ([8921156](https://github.com/lingui/js-lingui/commit/89211567632733cf9955cafc9c92bd87c6154852)), closes [#1137](https://github.com/lingui/js-lingui/issues/1137) + +## [3.11.1](https://github.com/lingui/js-lingui/compare/v3.11.0...v3.11.1) (2021-09-07) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.11.0](https://github.com/lingui/js-lingui/compare/v3.10.4...v3.11.0) (2021-09-07) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.10.4](https://github.com/lingui/js-lingui/compare/v3.10.3...v3.10.4) (2021-06-16) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.10.3](https://github.com/lingui/js-lingui/compare/v3.10.2...v3.10.3) (2021-06-14) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.10.2](https://github.com/lingui/js-lingui/compare/v3.10.1...v3.10.2) (2021-06-08) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.10.1](https://github.com/lingui/js-lingui/compare/v3.10.0...v3.10.1) (2021-06-08) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.10.0](https://github.com/lingui/js-lingui/compare/v3.9.0...v3.10.0) (2021-06-08) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.9.0](https://github.com/lingui/js-lingui/compare/v3.8.10...v3.9.0) (2021-05-18) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.8.10](https://github.com/lingui/js-lingui/compare/v3.8.9...v3.8.10) (2021-04-19) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.8.9](https://github.com/lingui/js-lingui/compare/v3.8.8...v3.8.9) (2021-04-09) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.8.8](https://github.com/lingui/js-lingui/compare/v3.8.7...v3.8.8) (2021-04-09) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.8.7](https://github.com/lingui/js-lingui/compare/v3.8.6...v3.8.7) (2021-04-09) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.8.6](https://github.com/lingui/js-lingui/compare/v3.8.5...v3.8.6) (2021-04-08) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.8.5](https://github.com/lingui/js-lingui/compare/v3.8.4...v3.8.5) (2021-04-08) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.8.4](https://github.com/lingui/js-lingui/compare/v3.8.3...v3.8.4) (2021-04-08) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.8.3](https://github.com/lingui/js-lingui/compare/v3.8.2...v3.8.3) (2021-04-05) + +### Bug Fixes + +- extract works with template string id's ([#1027](https://github.com/lingui/js-lingui/issues/1027)) ([a17d629](https://github.com/lingui/js-lingui/commit/a17d629d82395cd86cc080648ef2ebe2a9653225)) + +## [3.8.2](https://github.com/lingui/js-lingui/compare/v3.8.1...v3.8.2) (2021-03-31) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.8.1](https://github.com/lingui/js-lingui/compare/v3.8.0...v3.8.1) (2021-03-23) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.8.0](https://github.com/lingui/js-lingui/compare/v3.7.2...v3.8.0) (2021-03-23) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.7.2](https://github.com/lingui/js-lingui/compare/v3.7.1...v3.7.2) (2021-03-14) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.7.1](https://github.com/lingui/js-lingui/compare/v3.7.0...v3.7.1) (2021-03-07) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.7.0](https://github.com/lingui/js-lingui/compare/v3.6.0...v3.7.0) (2021-03-04) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.6.0](https://github.com/lingui/js-lingui/compare/v3.5.1...v3.6.0) (2021-02-23) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.5.1](https://github.com/lingui/js-lingui/compare/v3.5.0...v3.5.1) (2021-02-09) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.5.0](https://github.com/lingui/js-lingui/compare/v3.4.0...v3.5.0) (2021-02-02) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.4.0](https://github.com/lingui/js-lingui/compare/v3.3.0...v3.4.0) (2021-01-13) + +### Bug Fixes + +- prevent adding undefined msgid to messages ([#915](https://github.com/lingui/js-lingui/issues/915)) ([3afacec](https://github.com/lingui/js-lingui/commit/3afaceccb669b59ee2f5b42ee2e138646ccdb79d)) + +# [3.3.0](https://github.com/lingui/js-lingui/compare/v3.2.3...v3.3.0) (2020-12-08) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.2.3](https://github.com/lingui/js-lingui/compare/v3.2.2...v3.2.3) (2020-11-22) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +## [3.2.2](https://github.com/lingui/js-lingui/compare/v3.2.1...v3.2.2) (2020-11-20) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages + +# [3.2.0](https://github.com/lingui/js-lingui/compare/v3.1.0...v3.2.0) (2020-11-12) + +### Bug Fixes + +- t macro as function not extracting ([#846](https://github.com/lingui/js-lingui/issues/846)) ([d819bfc](https://github.com/lingui/js-lingui/commit/d819bfc74707a8766bfe1b1a3d43edce97f8f265)) + +### Features + +- extract multiple comments per translation ID ([#854](https://github.com/lingui/js-lingui/issues/854)) ([c849c9c](https://github.com/lingui/js-lingui/commit/c849c9c024832aa7b07e5f837791e287c3aebe29)) + +# [3.1.0](https://github.com/lingui/js-lingui/compare/v3.0.3...v3.1.0) (2020-11-10) + +**Note:** Version bump only for package @lingui/babel-plugin-extract-messages diff --git a/babel-plugin-extract-messages/README.md b/babel-plugin-extract-messages/README.md new file mode 100644 index 0000000..937212f --- /dev/null +++ b/babel-plugin-extract-messages/README.md @@ -0,0 +1,54 @@ +[![License][badge-license]][license] +[![Version][badge-version]][package] +[![Downloads][badge-downloads]][package] + +# @lingui/babel-plugin-extract-messages + +> Babel plugin which extracts messages for translation from source files + +`@lingui/babel-plugin-extract-messages` is part of [LinguiJS][linguijs]. See the [documentation][documentation] for all information, tutorials and examples. + +## Installation + +```sh +npm install --save-dev @lingui/babel-plugin-extract-messages +# yarn add --dev @lingui/babel-plugin-extract-messages +``` + +## Usage + +### Via `.babelrc` (Recommended) + +**.babelrc** + +```json +{ + "plugins": ["@lingui/babel-plugin-extract-messages"] +} +``` + +### Via CLI + +```bash +babel --plugins @lingui/babel-plugin-extract-messages script.js +``` + +### Via Node API + +```js +require("@babel/core").transform("code", { + plugins: ["@lingui/babel-plugin-extract-messages"] +}) +``` + +## License + +[MIT][license] + +[license]: https://github.com/lingui/js-lingui/blob/main/LICENSE +[linguijs]: https://github.com/lingui/js-lingui +[documentation]: https://lingui.dev +[package]: https://www.npmjs.com/package/@lingui/babel-plugin-extract-messages +[badge-downloads]: https://img.shields.io/npm/dw/@lingui/babel-plugin-extract-messages.svg +[badge-version]: https://img.shields.io/npm/v/@lingui/babel-plugin-extract-messages.svg +[badge-license]: https://img.shields.io/npm/l/@lingui/babel-plugin-extract-messages.svg diff --git a/babel-plugin-extract-messages/build.config.ts b/babel-plugin-extract-messages/build.config.ts new file mode 100644 index 0000000..602da13 --- /dev/null +++ b/babel-plugin-extract-messages/build.config.ts @@ -0,0 +1,5 @@ +import { defineBuildConfig } from "unbuild" + +export default defineBuildConfig({ + externals: ["@babel/core", "@babel/types", "@babel/traverse"], +}) diff --git a/babel-plugin-extract-messages/dist/index.d.mts b/babel-plugin-extract-messages/dist/index.d.mts new file mode 100644 index 0000000..b87c60f --- /dev/null +++ b/babel-plugin-extract-messages/dist/index.d.mts @@ -0,0 +1,22 @@ +import * as BabelTypesNamespace from '@babel/types'; +import { PluginObj } from '@babel/core'; + +type BabelTypes = typeof BabelTypesNamespace; +type ExtractedMessage = { + id: string; + message?: string; + context?: string; + origin?: Origin; + comment?: string; + placeholders?: Record; +}; +type ExtractPluginOpts = { + onMessageExtracted(msg: ExtractedMessage): void; +}; +type Origin = [filename: string, line: number, column?: number]; +declare function export_default({ types: t }: { + types: BabelTypes; +}): PluginObj; + +export { export_default as default }; +export type { ExtractPluginOpts, ExtractedMessage, Origin }; diff --git a/babel-plugin-extract-messages/dist/index.mjs b/babel-plugin-extract-messages/dist/index.mjs new file mode 100644 index 0000000..9b40d7e --- /dev/null +++ b/babel-plugin-extract-messages/dist/index.mjs @@ -0,0 +1,242 @@ +function collectMessage(path, props, ctx) { + if (props.id === void 0) return; + const node = path.node; + const line = node.loc ? node.loc.start.line : void 0; + const column = node.loc ? node.loc.start.column : void 0; + ctx.opts.onMessageExtracted({ + id: props.id, + message: props.message, + context: props.context, + comment: props.comment, + placeholders: props.placeholders || {}, + origin: ctx.file.opts.filename ? [ctx.file.opts.filename, line, column] : void 0 + }); +} +function getTextFromExpression(t, exp, hub, emitErrorOnVariable = true) { + if (t.isStringLiteral(exp)) { + return exp.value; + } + if (t.isBinaryExpression(exp)) { + return getTextFromExpression( + t, + exp.left, + hub, + emitErrorOnVariable + ) + getTextFromExpression( + t, + exp.right, + hub, + emitErrorOnVariable + ); + } + if (t.isTemplateLiteral(exp)) { + if (exp?.quasis.length > 1) { + console.warn( + hub.buildError( + exp, + "Could not extract from template literal with expressions.", + SyntaxError + ).message + ); + return ""; + } + return exp.quasis[0]?.value?.cooked || ""; + } + if (emitErrorOnVariable) { + console.warn( + hub.buildError( + exp, + "Only strings or template literals could be extracted.", + SyntaxError + ).message + ); + } + return ""; +} +function getNodeSource(fileContents, node) { + return fileContents.slice(node.start, node.end); +} +function valuesObjectExpressionToPlaceholdersRecord(t, exp, hub) { + const props = {}; + exp.properties.forEach(({ key, value }, i) => { + let name; + if (t.isStringLiteral(key) || t.isNumericLiteral(key)) { + name = key.value.toString(); + } else if (t.isIdentifier(key)) { + name = key.name; + } else { + console.warn( + hub.buildError( + exp, + `Could not extract values to placeholders. The key #${i} has unsupported syntax`, + SyntaxError + ).message + ); + } + if (name) { + props[name] = getNodeSource(hub.getCode(), value); + } + }); + return props; +} +function extractFromObjectExpression(t, exp, hub) { + const props = {}; + const textKeys = ["id", "message", "comment", "context"]; + exp.properties.forEach(({ key, value }, i) => { + const name = key.name; + if (name === "values" && t.isObjectExpression(value)) { + props.placeholders = valuesObjectExpressionToPlaceholdersRecord( + t, + value, + hub + ); + } else if (textKeys.includes(name)) { + props[name] = getTextFromExpression( + t, + value, + hub + ); + } + }); + return props; +} +const I18N_OBJECT = "i18n"; +function hasComment(node, comment) { + return !!node.leadingComments?.some((comm) => comm.value.trim() === comment); +} +function hasIgnoreComment(node) { + return hasComment(node, "lingui-extract-ignore"); +} +function hasI18nComment(node) { + return hasComment(node, "i18n"); +} +function index({ types: t }) { + function isTransComponent(path) { + return path.isJSXElement() && path.get("openingElement").get("name").referencesImport("@lingui/react", "Trans"); + } + const isI18nMethod = (node) => t.isMemberExpression(node) && (t.isIdentifier(node.object, { name: I18N_OBJECT }) || t.isMemberExpression(node.object) && t.isIdentifier(node.object.property, { name: I18N_OBJECT })) && (t.isIdentifier(node.property, { name: "_" }) || t.isIdentifier(node.property, { name: "t" })); + const extractFromMessageDescriptor = (path, ctx) => { + const props = extractFromObjectExpression(t, path.node, ctx.file.hub); + if (!props.id) { + console.warn( + path.buildCodeFrameError("Missing message ID, skipping.").message + ); + return; + } + collectMessage(path, props, ctx); + }; + return { + visitor: { + // Extract translation from component. + JSXElement(path, ctx) { + const { node } = path; + if (!isTransComponent(path)) return; + const attrs = node.openingElement.attributes || []; + if (attrs.find( + (attr) => t.isJSXSpreadAttribute(attr) && hasI18nComment(attr.argument) + )) { + return; + } + const props = attrs.reduce((acc, item) => { + if (t.isJSXSpreadAttribute(item)) { + return acc; + } + const key = item.name.name; + if (key === "id" || key === "message" || key === "comment" || key === "context") { + if (t.isStringLiteral(item.value)) { + acc[key] = item.value.value; + } else if (t.isJSXExpressionContainer(item.value) && t.isStringLiteral(item.value.expression)) { + acc[key] = item.value.expression.value; + } + } + if (key === "values" && t.isJSXExpressionContainer(item.value) && t.isObjectExpression(item.value.expression)) { + acc.placeholders = valuesObjectExpressionToPlaceholdersRecord( + t, + item.value.expression, + ctx.file.hub + ); + } + return acc; + }, {}); + if (!props.id) { + const idProp = attrs.filter( + (item) => t.isJSXAttribute(item) && item.name.name === "id" + )[0]; + if (idProp === void 0 || t.isLiteral(props.id)) { + console.warn( + path.buildCodeFrameError("Missing message ID, skipping.").message + ); + } + return; + } + collectMessage(path, props, ctx); + }, + CallExpression(path, ctx) { + if ([path.node, path.parent].some((node) => hasIgnoreComment(node))) { + return; + } + const firstArgument = path.get("arguments")[0]; + if (!isI18nMethod(path.node.callee)) { + return; + } + if (hasI18nComment(firstArgument.node)) { + return; + } + if (firstArgument.isObjectExpression()) { + extractFromMessageDescriptor(firstArgument, ctx); + return; + } else { + let props = { + id: getTextFromExpression( + t, + firstArgument.node, + ctx.file.hub, + false + ) + }; + if (!props.id) { + return; + } + const secondArgument = path.node.arguments[1]; + if (secondArgument && t.isObjectExpression(secondArgument)) { + props.placeholders = valuesObjectExpressionToPlaceholdersRecord( + t, + secondArgument, + ctx.file.hub + ); + } + const msgDescArg = path.node.arguments[2]; + if (t.isObjectExpression(msgDescArg)) { + props = { + ...props, + ...extractFromObjectExpression(t, msgDescArg, ctx.file.hub) + }; + } + collectMessage(path, props, ctx); + } + }, + StringLiteral(path, ctx) { + if (!hasI18nComment(path.node)) { + return; + } + const props = { + id: path.node.value + }; + if (!props.id) { + console.warn( + path.buildCodeFrameError("Empty StringLiteral, skipping.").message + ); + return; + } + collectMessage(path, props, ctx); + }, + // Extract message descriptors + ObjectExpression(path, ctx) { + if (!hasI18nComment(path.node)) return; + extractFromMessageDescriptor(path, ctx); + } + } + }; +} + +export { index as default }; diff --git a/babel-plugin-extract-messages/package.json b/babel-plugin-extract-messages/package.json new file mode 100644 index 0000000..e4a78da --- /dev/null +++ b/babel-plugin-extract-messages/package.json @@ -0,0 +1,57 @@ +{ + "name": "@lingui/babel-plugin-extract-messages", + "version": "5.9.0", + "description": "Babel plugin for collecting messages from source code for internationalization", + "type": "module", + "author": { + "name": "Tomáš Ehrlich", + "email": "tomas.ehrlich@gmail.com" + }, + "license": "MIT", + "keywords": [ + "babel-plugin", + "i18n", + "internationalization", + "i10n", + "localization", + "i9n", + "translation", + "multilingual" + ], + "scripts": { + "build": "unbuild", + "check-types": "tsc --noEmit" + }, + "files": [ + "LICENSE", + "README.md", + "dist/" + ], + "exports": { + ".": "./dist/index.mjs" + }, + "homepage": "https://lingui.dev", + "repository": { + "type": "git", + "url": "git+https://github.com/lingui/js-lingui.git", + "directory": "packages/babel-plugin-extract-messages" + }, + "bugs": { + "url": "https://github.com/lingui/js-lingui/issues" + }, + "engines": { + "node": ">=20.0.0" + }, + "devDependencies": { + "@babel/core": "^7.21.0", + "@babel/traverse": "^7.20.12", + "@babel/types": "^7.20.7", + "@lingui/babel-plugin-lingui-macro": "workspace:*", + "@lingui/test-utils": "workspace:*", + "unbuild": "3.6.1", + "vitest": "4.0.18" + }, + "unbuild": { + "declaration": "node16" + } +} diff --git a/babel-plugin-extract-messages/src/index.ts b/babel-plugin-extract-messages/src/index.ts new file mode 100644 index 0000000..90d049e --- /dev/null +++ b/babel-plugin-extract-messages/src/index.ts @@ -0,0 +1,393 @@ +import type * as BabelTypesNamespace from "@babel/types" +import type { + Expression, + Identifier, + Node, + ObjectExpression, + ObjectProperty, +} from "@babel/types" +import type { PluginObj, PluginPass, NodePath } from "@babel/core" +import type { Hub } from "@babel/traverse" + +type BabelTypes = typeof BabelTypesNamespace + +export type ExtractedMessage = { + id: string + + message?: string + context?: string + origin?: Origin + + comment?: string + placeholders?: Record +} + +export type ExtractPluginOpts = { + onMessageExtracted(msg: ExtractedMessage): void +} + +type RawMessage = { + id?: string + message?: string + comment?: string + context?: string + placeholders?: Record +} + +export type Origin = [filename: string, line: number, column?: number] + +function collectMessage( + path: NodePath, + props: RawMessage, + ctx: PluginPass, +) { + // prevent from adding undefined msgid + if (props.id === undefined) return + + const node: Node = path.node + + const line = node.loc ? node.loc.start.line : undefined + const column = node.loc ? node.loc.start.column : undefined + + ;(ctx.opts as ExtractPluginOpts).onMessageExtracted({ + id: props.id, + message: props.message, + context: props.context, + comment: props.comment, + placeholders: props.placeholders || {}, + origin: ctx.file.opts.filename + ? ([ctx.file.opts.filename, line, column] as Origin) + : undefined, + }) +} + +function getTextFromExpression( + t: BabelTypes, + exp: Expression, + hub: Hub, + emitErrorOnVariable = true, +): string { + if (t.isStringLiteral(exp)) { + return exp.value + } + + if (t.isBinaryExpression(exp)) { + return ( + getTextFromExpression( + t, + exp.left as Expression, + hub, + emitErrorOnVariable, + ) + + getTextFromExpression( + t, + exp.right as Expression, + hub, + emitErrorOnVariable, + ) + ) + } + + if (t.isTemplateLiteral(exp)) { + if (exp?.quasis.length > 1) { + console.warn( + hub.buildError( + exp, + "Could not extract from template literal with expressions.", + SyntaxError, + ).message, + ) + return "" + } + + return exp.quasis[0]?.value?.cooked || "" + } + + if (emitErrorOnVariable) { + console.warn( + hub.buildError( + exp, + "Only strings or template literals could be extracted.", + SyntaxError, + ).message, + ) + } + + return "" +} + +function getNodeSource(fileContents: string, node: Node) { + return fileContents.slice(node.start!, node.end!) +} + +function valuesObjectExpressionToPlaceholdersRecord( + t: BabelTypes, + exp: ObjectExpression, + hub: Hub, +) { + const props: Record = {} + + ;(exp.properties as ObjectProperty[]).forEach(({ key, value }, i) => { + let name: string | undefined + + if (t.isStringLiteral(key) || t.isNumericLiteral(key)) { + name = key.value.toString() + } else if (t.isIdentifier(key)) { + name = key.name + } else { + console.warn( + hub.buildError( + exp, + `Could not extract values to placeholders. The key #${i} has unsupported syntax`, + SyntaxError, + ).message, + ) + } + + if (name) { + props[name] = getNodeSource(hub.getCode()!, value) + } + }) + + return props +} + +function extractFromObjectExpression( + t: BabelTypes, + exp: ObjectExpression, + hub: Hub, +) { + const props: RawMessage = {} + + const textKeys = ["id", "message", "comment", "context"] as const + + ;(exp.properties as ObjectProperty[]).forEach(({ key, value }, i) => { + const name = (key as Identifier).name + + if (name === "values" && t.isObjectExpression(value)) { + props.placeholders = valuesObjectExpressionToPlaceholdersRecord( + t, + value, + hub, + ) + } else if (textKeys.includes(name as any)) { + props[name as (typeof textKeys)[number]] = getTextFromExpression( + t, + value as Expression, + hub, + ) + } + }) + + return props +} + +const I18N_OBJECT = "i18n" + +function hasComment(node: Node, comment: string): boolean { + return !!node.leadingComments?.some((comm) => comm.value.trim() === comment) +} + +function hasIgnoreComment(node: Node): boolean { + return hasComment(node, "lingui-extract-ignore") +} + +function hasI18nComment(node: Node): boolean { + return hasComment(node, "i18n") +} + +export default function ({ types: t }: { types: BabelTypes }): PluginObj { + function isTransComponent(path: NodePath) { + return ( + path.isJSXElement() && + path + .get("openingElement") + .get("name") + .referencesImport("@lingui/react", "Trans") + ) + } + + const isI18nMethod = (node: Node) => + t.isMemberExpression(node) && + (t.isIdentifier(node.object, { name: I18N_OBJECT }) || + (t.isMemberExpression(node.object) && + t.isIdentifier(node.object.property, { name: I18N_OBJECT }))) && + (t.isIdentifier(node.property, { name: "_" }) || + t.isIdentifier(node.property, { name: "t" })) + + const extractFromMessageDescriptor = ( + path: NodePath, + ctx: PluginPass, + ) => { + const props = extractFromObjectExpression(t, path.node, ctx.file.hub) + + if (!props.id) { + console.warn( + path.buildCodeFrameError("Missing message ID, skipping.").message, + ) + return + } + + collectMessage(path, props, ctx) + } + + return { + visitor: { + // Extract translation from component. + JSXElement(path, ctx) { + const { node } = path + if (!isTransComponent(path)) return + + const attrs = node.openingElement.attributes || [] + + if ( + attrs.find( + (attr) => + t.isJSXSpreadAttribute(attr) && hasI18nComment(attr.argument), + ) + ) { + return + } + + const props = attrs.reduce((acc, item) => { + if (t.isJSXSpreadAttribute(item)) { + return acc + } + + const key = item.name.name + if ( + key === "id" || + key === "message" || + key === "comment" || + key === "context" + ) { + if (t.isStringLiteral(item.value)) { + acc[key] = item.value.value + } else if ( + t.isJSXExpressionContainer(item.value) && + t.isStringLiteral(item.value.expression) + ) { + acc[key] = item.value.expression.value + } + } + + if ( + key === "values" && + t.isJSXExpressionContainer(item.value) && + t.isObjectExpression(item.value.expression) + ) { + acc.placeholders = valuesObjectExpressionToPlaceholdersRecord( + t, + item.value.expression, + ctx.file.hub, + ) + } + + return acc + }, {}) + + if (!props.id) { + // is valid, don't raise warning + const idProp = attrs.filter( + (item) => t.isJSXAttribute(item) && item.name.name === "id", + )[0] + if (idProp === undefined || t.isLiteral(props.id as any)) { + console.warn( + path.buildCodeFrameError("Missing message ID, skipping.").message, + ) + } + return + } + + collectMessage(path, props, ctx) + }, + + CallExpression(path, ctx) { + if ([path.node, path.parent].some((node) => hasIgnoreComment(node))) { + return + } + + const firstArgument = path.get("arguments")[0] + + // i18n._(...) + if (!isI18nMethod(path.node.callee)) { + return + } + + // call with explicit annotation + // i18n._(/*i18n*/ {descriptor}) + // skipping this as it is processed + // by ObjectExpression visitor + if (hasI18nComment(firstArgument.node)) { + return + } + + if (firstArgument.isObjectExpression()) { + // i8n._({message, id, context}) + extractFromMessageDescriptor(firstArgument, ctx) + return + } else { + // i18n._(id, variables, descriptor) + let props: RawMessage = { + id: getTextFromExpression( + t, + firstArgument.node as Expression, + ctx.file.hub, + false, + ), + } + + if (!props.id) { + return + } + + const secondArgument = path.node.arguments[1] + if (secondArgument && t.isObjectExpression(secondArgument)) { + props.placeholders = valuesObjectExpressionToPlaceholdersRecord( + t, + secondArgument, + ctx.file.hub, + ) + } + + const msgDescArg = path.node.arguments[2] + + if (t.isObjectExpression(msgDescArg)) { + props = { + ...props, + ...extractFromObjectExpression(t, msgDescArg, ctx.file.hub), + } + } + + collectMessage(path, props, ctx) + } + }, + + StringLiteral(path, ctx) { + if (!hasI18nComment(path.node)) { + return + } + + const props = { + id: path.node.value, + } + + if (!props.id) { + console.warn( + path.buildCodeFrameError("Empty StringLiteral, skipping.").message, + ) + return + } + + collectMessage(path, props, ctx) + }, + + // Extract message descriptors + ObjectExpression(path, ctx) { + if (!hasI18nComment(path.node)) return + + extractFromMessageDescriptor(path, ctx) + }, + }, + } +} diff --git a/babel-plugin-extract-messages/test/__snapshots__/extract-messages.test.ts.snap b/babel-plugin-extract-messages/test/__snapshots__/extract-messages.test.ts.snap new file mode 100644 index 0000000..265796b --- /dev/null +++ b/babel-plugin-extract-messages/test/__snapshots__/extract-messages.test.ts.snap @@ -0,0 +1,527 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`@lingui/babel-plugin-extract-messages > CallExpression i18n._() > should extract messages from i18n._ call expressions 1`] = ` +[ + { + "comment": undefined, + "context": undefined, + "id": "Message", + "message": undefined, + "origin": [ + "js-call-expression.js", + 1, + ], + "placeholders": {}, + }, + { + "comment": "description", + "context": undefined, + "id": "Description", + "message": undefined, + "origin": [ + "js-call-expression.js", + 3, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "ID", + "message": "Message with id", + "origin": [ + "js-call-expression.js", + 5, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "Values {param}", + "message": undefined, + "origin": [ + "js-call-expression.js", + 7, + ], + "placeholders": { + "param": "param", + }, + }, + { + "comment": undefined, + "context": "Context1", + "id": "Some id", + "message": undefined, + "origin": [ + "js-call-expression.js", + 9, + ], + "placeholders": {}, + }, + { + "comment": "My comment", + "context": undefined, + "id": "my.id", + "message": "My Id Message", + "origin": [ + "js-call-expression.js", + 12, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "Aliased Message", + "message": undefined, + "origin": [ + "js-call-expression.js", + 19, + ], + "placeholders": {}, + }, + { + "comment": "My comment", + "context": undefined, + "id": "my.id", + "message": "My Id Message", + "origin": [ + "js-call-expression.js", + 22, + ], + "placeholders": {}, + }, +] +`; + +exports[`@lingui/babel-plugin-extract-messages > MessageDescriptor > should extract messages from MessageDescriptors 1`] = ` +[ + { + "comment": undefined, + "context": undefined, + "id": "Message", + "message": undefined, + "origin": [ + "js-message-descriptor.js", + 1, + ], + "placeholders": {}, + }, + { + "comment": "description", + "context": undefined, + "id": "Description", + "message": undefined, + "origin": [ + "js-message-descriptor.js", + 3, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "ID", + "message": "Message with id", + "origin": [ + "js-message-descriptor.js", + 5, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "Values {param} {0} {name} {value}", + "message": undefined, + "origin": [ + "js-message-descriptor.js", + 7, + ], + "placeholders": { + "0": "user.getName()", + "name": ""foo"", + "param": "param", + "value": "user + ? user.name + : null", + }, + }, + { + "comment": undefined, + "context": undefined, + "id": "Values {param} {0}", + "message": undefined, + "origin": [ + "js-message-descriptor.js", + 23, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": "Context1", + "id": "Some id", + "message": undefined, + "origin": [ + "js-message-descriptor.js", + 25, + ], + "placeholders": {}, + }, +] +`; + +exports[`@lingui/babel-plugin-extract-messages > should extract Plural messages from JSX files when there's no Trans tag (integration) 1`] = ` +[ + { + "comment": undefined, + "context": undefined, + "id": "esnaQO", + "message": "{count, plural, one {# book} other {# books}}", + "origin": [ + "jsx-without-trans.js", + 2, + ], + "placeholders": { + "count": "count", + }, + }, + { + "comment": undefined, + "context": "Some context", + "id": "8qNz-K", + "message": "{count, plural, one {# book} other {# books}}", + "origin": [ + "jsx-without-trans.js", + 3, + ], + "placeholders": { + "count": "count", + }, + }, +] +`; + +exports[`@lingui/babel-plugin-extract-messages > should extract all messages from JS files (macros) 1`] = ` +[ + { + "comment": undefined, + "context": undefined, + "id": "xDAtGP", + "message": "Message", + "origin": [ + "js-with-macros.js", + 4, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "xDAtGP", + "message": "Message", + "origin": [ + "js-with-macros.js", + 6, + ], + "placeholders": {}, + }, + { + "comment": "description", + "context": undefined, + "id": "Nu4oKW", + "message": "Description", + "origin": [ + "js-with-macros.js", + 8, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "ID", + "message": "Message with id", + "origin": [ + "js-with-macros.js", + 13, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "QCVtWw", + "message": "Values {param}", + "origin": [ + "js-with-macros.js", + 18, + ], + "placeholders": { + "param": "param", + }, + }, + { + "comment": undefined, + "context": undefined, + "id": "ID Some", + "message": "Message with id some", + "origin": [ + "js-with-macros.js", + 20, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "Backtick", + "message": undefined, + "origin": [ + "js-with-macros.js", + 25, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": "Context1", + "id": "Some ID", + "message": undefined, + "origin": [ + "js-with-macros.js", + 29, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": "Context1", + "id": "Some other ID", + "message": undefined, + "origin": [ + "js-with-macros.js", + 34, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": "Context2", + "id": "Some ID", + "message": undefined, + "origin": [ + "js-with-macros.js", + 39, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": "Context2", + "id": "Some ID", + "message": undefined, + "origin": [ + "js-with-macros.js", + 44, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "sD7MQ4", + "message": "TplLiteral", + "origin": [ + "js-with-macros.js", + 49, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "VO4BJY", + "message": "[useLingui]: TplLiteral", + "origin": [ + "js-with-macros.js", + 54, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "ZxxjOE", + "message": "[useLingui]: Text {0, plural, offset:1 =0 {No books} =1 {1 book} other {# books}}", + "origin": [ + "js-with-macros.js", + 57, + ], + "placeholders": { + "0": "users.length", + }, + }, +] +`; + +exports[`@lingui/babel-plugin-extract-messages > should extract all messages from JSX files (macros) 1`] = ` +[ + { + "comment": undefined, + "context": undefined, + "id": "d1Kdl3", + "message": "Hi, my name is {name}", + "origin": [ + "jsx-with-macros.js", + 3, + ], + "placeholders": { + "name": "name", + }, + }, + { + "comment": undefined, + "context": "Context1", + "id": "YikuIL", + "message": "Some message", + "origin": [ + "jsx-with-macros.js", + 4, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": "Context1", + "id": "LBCs5C", + "message": "Some other message", + "origin": [ + "jsx-with-macros.js", + 5, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": "Context2", + "id": "ru2rzr", + "message": "Some message", + "origin": [ + "jsx-with-macros.js", + 6, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "MHrjPM", + "message": "Title", + "origin": [ + "jsx-with-macros.js", + 7, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "esnaQO", + "message": "{count, plural, one {# book} other {# books}}", + "origin": [ + "jsx-with-macros.js", + 9, + ], + "placeholders": { + "count": "count", + }, + }, +] +`; + +exports[`@lingui/babel-plugin-extract-messages > should extract all messages from JSX files 1`] = ` +[ + { + "comment": "Description", + "context": undefined, + "id": "msg.hello", + "message": undefined, + "origin": [ + "jsx-without-macros.js", + 5, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": "Context1", + "id": "msg.context", + "message": undefined, + "origin": [ + "jsx-without-macros.js", + 6, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": "Context1", + "id": "msg.notcontext", + "message": undefined, + "origin": [ + "jsx-without-macros.js", + 7, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": "Context2", + "id": "msg.context", + "message": undefined, + "origin": [ + "jsx-without-macros.js", + 8, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "msg.default", + "message": "Hello World", + "origin": [ + "jsx-without-macros.js", + 9, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "msg.default", + "message": "Hello World", + "origin": [ + "jsx-without-macros.js", + 10, + ], + "placeholders": {}, + }, + { + "comment": undefined, + "context": undefined, + "id": "Hi, my name is <0>{name}", + "message": undefined, + "origin": [ + "jsx-without-macros.js", + 11, + ], + "placeholders": { + "count": "count", + }, + }, +] +`; diff --git a/babel-plugin-extract-messages/test/extract-messages.test.ts b/babel-plugin-extract-messages/test/extract-messages.test.ts new file mode 100644 index 0000000..9936235 --- /dev/null +++ b/babel-plugin-extract-messages/test/extract-messages.test.ts @@ -0,0 +1,401 @@ +import path from "path" +import fs from "fs" +import { transform as babelTransform } from "@babel/core" +import plugin, { ExtractedMessage, ExtractPluginOpts } from "../src/index" +import { mockConsole } from "@lingui/test-utils" +import linguiMacroPlugin, { + type LinguiPluginOpts, +} from "@lingui/babel-plugin-lingui-macro" + +const transform = (filename: string) => { + const rootDir = path.join(__dirname, "fixtures") + + const filePath = path.join(rootDir, filename) + const code = fs.readFileSync(filePath).toString() + + return transformCode(code, filePath, rootDir) +} + +const transformCode = ( + code: string, + filename = "test-case.js", + rootDir = ".", +) => { + process.env.LINGUI_CONFIG = path.join( + __dirname, + "fixtures", + "lingui.config.js", + ) + const messages: ExtractedMessage[] = [] + + try { + const pluginOpts: ExtractPluginOpts = { + onMessageExtracted(msg: ExtractedMessage) { + const filename = path.relative(rootDir, msg.origin![0]) + messages.push({ + ...msg, + origin: [filename, msg.origin![1]], + }) + }, + } + + babelTransform(code, { + configFile: false, + filename, + plugins: [ + "@babel/plugin-syntax-jsx", + [ + linguiMacroPlugin, + { + extract: true, + } satisfies LinguiPluginOpts, + ], + [plugin, pluginOpts], + ], + }) + } finally { + process.env.LINGUI_CONFIG = undefined + } + + return messages +} + +function expectNoConsole(cb: () => void) { + return mockConsole((console) => { + cb() + + expect(console.warn).not.toBeCalled() + expect(console.error).not.toBeCalled() + }) +} + +describe("@lingui/babel-plugin-extract-messages", function () { + it("should ignore files without lingui import", () => { + expectNoConsole(() => { + const messages = transform("without-lingui.js") + expect(messages.length).toBe(0) + }) + }) + + it("should extract all messages from JSX files", () => { + expectNoConsole(() => { + const messages = transform("jsx-without-macros.js") + expect(messages).toMatchSnapshot() + }) + }) + + describe("JSX", () => { + it("Should not rise warning when translation from variable", () => { + const code = ` +import { Trans } from "@lingui/react"; + +; +; + ` + expectNoConsole(() => { + const messages = transformCode(code) + expect(messages.length).toBe(0) + }) + }) + + it("Should not rise warning when `key` used with macro", () => { + const code = ` +import { Trans } from "@lingui/react/macro"; + + + Some message + + ` + expectNoConsole(() => { + const messages = transformCode(code) + expect(messages.length).toBe(1) + }) + }) + + it("Should log error when no ID provided", () => { + const code = ` +import { Trans } from "@lingui/react"; + +; +; + ` + mockConsole((console) => { + const messages = transformCode(code) + + expect(messages.length).toBe(0) + expect(console.error).not.toBeCalled() + expect(console.warn).toBeCalledWith( + expect.stringContaining(`Missing message ID`), + ) + }) + }) + }) + + describe("CallExpression i18n._()", () => { + it("should extract messages from i18n._ call expressions", () => { + expectNoConsole(() => { + const messages = transform("js-call-expression.js") + expect(messages).toMatchSnapshot() + }) + }) + + it("should extract from member access expressions", () => { + const code = ` + // member access + ctx.i18n._("Message") + + // member access any depth + ctx.req.i18n._("Message") + ` + expectNoConsole(() => { + const messages = transformCode(code) + expect(messages.length).toBe(2) + }) + }) + + it("should not extract from random i18n members", () => { + const code = ` + i18n.load("Message") + ` + expectNoConsole(() => { + const messages = transformCode(code) + expect(messages.length).toBe(0) + }) + }) + + it("should not extract if disabled via annotation", () => { + const code = ` + /* lingui-extract-ignore */ + i18n._("Message") + + /* lingui-extract-ignore */ + ctx.i18n._("Message") + + /* lingui-extract-ignore */ + ctx.req.i18n._("Message") + ` + expectNoConsole(() => { + const messages = transformCode(code) + expect(messages.length).toBe(0) + }) + }) + + it("Should not rise warning when translation from variable", () => { + const code = ` + i18n._(message); + // member expression + i18n._(foo.bar); + // function call + i18n._(getMessage()); + ` + + expectNoConsole(() => { + const messages = transformCode(code) + expect(messages.length).toBe(0) + }) + }) + + it("Should throw error when not a string provided as comment", () => { + const code = `const msg = i18n._('message.id', {}, {comment: variable})` + + return mockConsole((console) => { + transformCode(code) + + expect(console.error).not.toBeCalled() + expect(console.warn).toBeCalledWith( + expect.stringContaining( + "Only strings or template literals could be extracted.", + ), + ) + }) + }) + + it("Should support extract id from TplLiteral and Concatenation", () => { + const code = ` + const msg = i18n._(\`message.id\`); + const msg2 = i18n._("second" + '.' + "id") + ` + + expectNoConsole(() => { + const messages = transformCode(code) + expect(messages[0]).toMatchObject({ + id: "message.id", + }) + expect(messages[1]).toMatchObject({ + id: "second.id", + }) + }) + }) + + it("Should support string concatenation", () => { + const code = `const msg = i18n._('message.id', {}, {comment: "first " + "second " + "third"})` + + expectNoConsole(() => { + const messages = transformCode(code) + expect(messages[0]).toMatchObject({ + comment: "first second third", + }) + }) + }) + + it("Should not double extract from call generated by macro and dont rise warnings", () => { + const code = `import { i18n } from "@lingui/core"; + const msg = + i18n._(/*i18n*/ + { + id: "Hello {name}", + values: { + name: name, + }, + }); + ` + expectNoConsole(() => { + const messages = transformCode(code) + expect(messages.length).toBe(1) + }) + }) + }) + + describe("StringLiteral", () => { + it("Should extract from marked StringLiteral", () => { + const code = `const t = /*i18n*/'Message'` + + expectNoConsole(() => { + const messages = transformCode(code) + + expect(messages[0]).toMatchObject({ + id: "Message", + }) + }) + }) + + it("Should log error when empty StringLiteral marked for extraction", () => { + const code = `const t = /*i18n*/''` + + return mockConsole((console) => { + const messages = transformCode(code) + + expect(messages.length).toBe(0) + expect(console.error).not.toBeCalled() + expect(console.warn).toBeCalledWith( + expect.stringContaining(`Empty StringLiteral`), + ) + }) + }) + }) + + describe("MessageDescriptor", () => { + it("should extract messages from MessageDescriptors", () => { + expectNoConsole(() => { + const messages = transform("js-message-descriptor.js") + expect(messages).toMatchSnapshot() + }) + }) + + it("Should extract id from TemplateLiteral", () => { + const code = "const msg = /*i18n*/{id: `Message`}" + + expectNoConsole(() => { + const messages = transformCode(code) + + expect(messages[0]).toMatchObject({ + id: "Message", + }) + }) + }) + + it("Should log error if TemplateLiteral in id has expressions", () => { + const code = "const msg = /*i18n*/{id: `Hello ${name}`}" + + return mockConsole((console) => { + const messages = transformCode(code) + + expect(messages.length).toBe(0) + + expect(console.error).not.toBeCalled() + expect(console.warn).toBeCalledWith( + expect.stringContaining( + `Could not extract from template literal with expressions.`, + ), + ) + }) + }) + + it("Should log error when no ID provided", () => { + const code = "const msg = /*i18n*/ {message: `Hello ${name}`}" + + return mockConsole((console) => { + const messages = transformCode(code) + + expect(messages.length).toBe(0) + expect(console.error).not.toBeCalled() + + expect(console.warn).toBeCalledWith( + expect.stringContaining(`Missing message ID`), + ) + }) + }) + + it("Should log error when not a string provided as ID", () => { + const code = "const msg = /*i18n*/ {id: id}" + + return mockConsole((console) => { + transformCode(code) + + expect(console.error).not.toBeCalled() + expect(console.warn).toBeCalledWith( + expect.stringContaining( + "Only strings or template literals could be extracted.", + ), + ) + }) + }) + + it("Should log error when not a string provided as comment", () => { + const code = `const msg = /*i18n*/ {id: "msg.id", comment: variable}` + + return mockConsole((console) => { + transformCode(code) + + expect(console.error).not.toBeCalled() + expect(console.warn).toBeCalledWith( + expect.stringContaining( + "Only strings or template literals could be extracted.", + ), + ) + }) + }) + + it("Should support string concatenation in comment", () => { + const code = `const msg = /*i18n*/ {id: "msg.id", comment: "first " + "second " + "third"}` + + return expectNoConsole(() => { + const messages = transformCode(code) + expect(messages[0]).toMatchObject({ + comment: "first second third", + }) + }) + }) + }) + + it("should extract all messages from JSX files (macros)", () => { + return expectNoConsole(() => { + const messages = transform("jsx-with-macros.js") + expect(messages).toMatchSnapshot() + }) + }) + + it("should extract Plural messages from JSX files when there's no Trans tag (integration)", () => { + return expectNoConsole(() => { + const messages = transform("jsx-without-trans.js") + expect(messages).toMatchSnapshot() + }) + }) + + it("should extract all messages from JS files (macros)", () => { + return expectNoConsole(() => { + const messages = transform("js-with-macros.js") + expect(messages).toMatchSnapshot() + }) + }) +}) diff --git a/babel-plugin-extract-messages/test/fixtures/js-call-expression.js b/babel-plugin-extract-messages/test/fixtures/js-call-expression.js new file mode 100644 index 0000000..19bc697 --- /dev/null +++ b/babel-plugin-extract-messages/test/fixtures/js-call-expression.js @@ -0,0 +1,26 @@ +const msg = i18n._("Message") + +const withDescription = i18n._("Description", {}, { comment: "description" }) + +const withId = i18n._("ID", {}, { message: "Message with id" }) + +const withValues = i18n._("Values {param}", { param: param }) + +const withContext = i18n._("Some id", {}, { context: "Context1" }) + +// from message descriptor +i18n._({ + id: "my.id", + message: "My Id Message", + comment: "My comment", +}) + +// support alias +i18n.t("Aliased Message") + +// from message descriptor +i18n.t({ + id: "my.id", + message: "My Id Message", + comment: "My comment", +}) diff --git a/babel-plugin-extract-messages/test/fixtures/js-message-descriptor.js b/babel-plugin-extract-messages/test/fixtures/js-message-descriptor.js new file mode 100644 index 0000000..3761efc --- /dev/null +++ b/babel-plugin-extract-messages/test/fixtures/js-message-descriptor.js @@ -0,0 +1,25 @@ +const msg = /*i18n*/ { id: "Message" } + +const withDescription = /*i18n*/ { id: "Description", comment: "description" } + +const withId = /*i18n*/ { id: "ID", message: "Message with id" } + +const withValues = /*i18n*/ { + id: "Values {param} {0} {name} {value}", + values: { + param: param, + 0: user.getName(), + ["name"]: "foo", + // prettier-ignore + value: user + ? user.name + : null, + }, +} +/** + * With values passed as variable + */ +const values = {} +const withValues2 = /*i18n*/ { id: "Values {param} {0}", values } + +const withContext = /*i18n*/ { id: "Some id", context: "Context1" } diff --git a/babel-plugin-extract-messages/test/fixtures/js-with-macros.js b/babel-plugin-extract-messages/test/fixtures/js-with-macros.js new file mode 100644 index 0000000..564320d --- /dev/null +++ b/babel-plugin-extract-messages/test/fixtures/js-with-macros.js @@ -0,0 +1,63 @@ +import { t, defineMessage, msg, plural } from "@lingui/core/macro" +import { useLingui } from "@lingui/react/macro" + +t`Message` + +const msg1 = t`Message` + +const withDescription = defineMessage({ + message: "Description", + comment: "description", +}) + +const withId = defineMessage({ + id: "ID", + message: "Message with id", +}) + +const withValues = t`Values ${param}` + +const withTId = t({ + id: "ID Some", + message: "Message with id some", +}) + +const withTIdBacktick = t({ + id: `Backtick`, +}) + +const tWithContextA = t({ + id: "Some ID", + context: "Context1", +}) + +const tWithContextB = t({ + id: "Some other ID", + context: "Context1", +}) + +const defineMessageWithContext = defineMessage({ + id: "Some ID", + context: "Context2", +}) + +const defineMessageAlias = msg({ + id: "Some ID", + context: "Context2", +}) + +const defineMessageAlias2 = msg`TplLiteral` + +function MyComponent() { + const { t } = useLingui() + + t`[useLingui]: TplLiteral` + + // macro nesting + const a = t`[useLingui]: Text ${plural(users.length, { + offset: 1, + 0: "No books", + 1: "1 book", + other: "# books", + })}` +} diff --git a/babel-plugin-extract-messages/test/fixtures/jsx-with-macros.js b/babel-plugin-extract-messages/test/fixtures/jsx-with-macros.js new file mode 100644 index 0000000..c14c5c3 --- /dev/null +++ b/babel-plugin-extract-messages/test/fixtures/jsx-with-macros.js @@ -0,0 +1,13 @@ +import { Trans } from "@lingui/react/macro" +import { t, plural } from "@lingui/core/macro" +;Hi, my name is {name} +;Some message +;Some other message +;Some message +; +; diff --git a/babel-plugin-extract-messages/test/fixtures/jsx-without-macros.js b/babel-plugin-extract-messages/test/fixtures/jsx-without-macros.js new file mode 100644 index 0000000..5a91b7e --- /dev/null +++ b/babel-plugin-extract-messages/test/fixtures/jsx-without-macros.js @@ -0,0 +1,12 @@ +import { Trans } from "@lingui/react" + +; + +; +; +; +; +; +; +; + diff --git a/babel-plugin-extract-messages/test/fixtures/jsx-without-trans.js b/babel-plugin-extract-messages/test/fixtures/jsx-without-trans.js new file mode 100644 index 0000000..6a6d0ee --- /dev/null +++ b/babel-plugin-extract-messages/test/fixtures/jsx-without-trans.js @@ -0,0 +1,3 @@ +import { Plural } from "@lingui/react/macro" +; +; diff --git a/babel-plugin-extract-messages/test/fixtures/lingui.config.js b/babel-plugin-extract-messages/test/fixtures/lingui.config.js new file mode 100644 index 0000000..56ad108 --- /dev/null +++ b/babel-plugin-extract-messages/test/fixtures/lingui.config.js @@ -0,0 +1,3 @@ +module.exports = { + locales: ["en", "cs"] +} diff --git a/babel-plugin-extract-messages/test/fixtures/without-lingui.js b/babel-plugin-extract-messages/test/fixtures/without-lingui.js new file mode 100644 index 0000000..16aa895 --- /dev/null +++ b/babel-plugin-extract-messages/test/fixtures/without-lingui.js @@ -0,0 +1,7 @@ +import { Select } from "awesome-form-lib" +import { Trans } from "awesome-animation-lib" + +; + Displaced element + +; {}} /> diff --git a/tests/message_extractor.rs b/tests/message_extractor.rs index 2198016..f36b1db 100644 --- a/tests/message_extractor.rs +++ b/tests/message_extractor.rs @@ -8,7 +8,7 @@ fn extract_and_sort(source_code: &str, filename: &str) -> (Vec fn assert_no_warnings(warnings: &[String]) { if !warnings.is_empty() { - panic!("Expected no warnings but got: {:?}", warnings); + panic!("Expected no warnings but got: {warnings:?}"); } } @@ -72,7 +72,7 @@ import { Trans } from "@lingui/react"; "#; let (messages, warnings) = extract_and_sort(code, "test.js"); - assert_eq!(messages.len(), 0); + assert!(messages.is_empty()); assert!(!warnings.is_empty()); assert!(warnings.iter().any(|w| w.contains("Missing message ID"))); } @@ -248,7 +248,7 @@ const t = /*i18n*/''; let (messages, warnings) = extract_and_sort(code, "test.js"); assert_eq!(messages.len(), 0); - assert!(warnings.len() > 0); + assert!(!warnings.is_empty()); assert!(warnings.iter().any(|w| w.contains("Empty StringLiteral"))); } @@ -308,7 +308,7 @@ const msg = /*i18n*/ {message: `Hello ${name}`}; let (messages, warnings) = extract_and_sort(code, "test.js"); assert_eq!(messages.len(), 0); - assert!(warnings.len() > 0); + assert!(!warnings.is_empty()); assert!(warnings.iter().any(|w| w.contains("Missing message ID"))); } @@ -360,5 +360,138 @@ const msg = i18n._("Message"); let origin = messages[0].origin.as_ref().unwrap(); assert_eq!(origin.0, "test.js"); - assert_eq!(origin.1, 2); // Line 2 + assert_eq!(origin.1, 1); +} + +// ============================================================================ +// Snapshot Testing Framework +// ============================================================================ + +use std::fs; +use std::path::{Path, PathBuf}; + +/// Load fixture file from tests/fixtures/ +fn load_fixture(filename: &str) -> String { + let fixture_path = PathBuf::from("tests/fixtures").join(filename); + fs::read_to_string(&fixture_path) + .unwrap_or_else(|e| panic!("Failed to read fixture {}: {}", fixture_path.display(), e)) +} + +/// Get snapshot path for a fixture +fn get_snapshot_path(fixture_name: &str) -> PathBuf { + let snapshot_name = format!("{}.json", fixture_name); + PathBuf::from("tests/__snapshots__").join(snapshot_name) +} + +/// Load snapshot from disk +fn load_snapshot(path: &Path) -> Option { + fs::read_to_string(path).ok() +} + +/// Save snapshot to disk +fn save_snapshot(path: &Path, content: &str) { + fs::create_dir_all(path.parent().unwrap()) + .unwrap_or_else(|e| panic!("Failed to create snapshots directory: {}", e)); + fs::write(path, content) + .unwrap_or_else(|e| panic!("Failed to write snapshot {}: {}", path.display(), e)); +} + +/// Check if UPDATE=1 environment variable is set +fn should_update_snapshots() -> bool { + std::env::var("UPDATE").unwrap_or_default() == "1" +} + +/// Serialize messages to JSON +fn serialize_to_json(messages: &[ExtractedMessage]) -> String { + serde_json::to_string_pretty(messages) + .expect("Failed to serialize messages to JSON") +} + +/// Perform snapshot test +fn snapshot_test(fixture_name: &str) { + // Load fixture + let source_code = load_fixture(fixture_name); + + // Extract messages + let (messages, warnings) = extract_and_sort(&source_code, fixture_name); + + // Fail if there are warnings (optional - you can remove this if warnings are expected) + if !warnings.is_empty() { + eprintln!("Warnings during extraction from {}:", fixture_name); + for warning in &warnings { + eprintln!(" - {}", warning); + } + } + + // Serialize to JSON + let actual_json = serialize_to_json(&messages); + + // Get snapshot path + let snapshot_path = get_snapshot_path(fixture_name); + + if should_update_snapshots() { + // Update mode: save the snapshot + save_snapshot(&snapshot_path, &actual_json); + println!("Updated snapshot: {}", snapshot_path.display()); + } else { + // Compare mode: check against existing snapshot + let expected_json = load_snapshot(&snapshot_path).unwrap_or_else(|| { + panic!( + "Snapshot file not found: {}\n\nTo create snapshots, run:\n UPDATE=1 cargo test", + snapshot_path.display() + ) + }); + + // Compare JSON + if actual_json != expected_json { + // Pretty print the difference + eprintln!("\n❌ Snapshot mismatch for {}\n", fixture_name); + eprintln!("Expected ({}):", snapshot_path.display()); + eprintln!("{}\n", expected_json); + eprintln!("Actual:"); + eprintln!("{}\n", actual_json); + eprintln!("To update the snapshot, run:\n UPDATE=1 cargo test {}", + fixture_name.replace(".js", "").replace("-", "_")); + panic!("Snapshot mismatch"); + } + } +} + +// ============================================================================ +// Snapshot Tests +// ============================================================================ + +#[test] +fn test_snapshot_js_call_expression() { + snapshot_test("js-call-expression.js"); +} + +#[test] +fn test_snapshot_js_message_descriptor() { + snapshot_test("js-message-descriptor.js"); +} + +#[test] +fn test_snapshot_js_with_macros() { + snapshot_test("js-with-macros.js"); +} + +#[test] +fn test_snapshot_jsx_with_macros() { + snapshot_test("jsx-with-macros.js"); +} + +#[test] +fn test_snapshot_jsx_without_macros() { + snapshot_test("jsx-without-macros.js"); +} + +#[test] +fn test_snapshot_jsx_without_trans() { + snapshot_test("jsx-without-trans.js"); +} + +#[test] +fn test_snapshot_without_lingui() { + snapshot_test("without-lingui.js"); } From fbacdd99711ac359c8330f56d53d0d836bfa205a Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Sun, 8 Feb 2026 17:14:48 +0100 Subject: [PATCH 03/34] improve extractor --- src/message_extractor.rs | 15 +- src/message_extractor_visitor.rs | 50 ++--- .../__snapshots__/js-call-expression.js.json | 18 +- .../js-message-descriptor.js.json | 18 +- tests/__snapshots__/js-with-macros.js.json | 175 +++++++++++++++++- tests/__snapshots__/jsx-with-macros.js.json | 79 +++++++- .../__snapshots__/jsx-without-macros.js.json | 21 ++- tests/__snapshots__/jsx-without-trans.js.json | 31 +++- tests/message_extractor.rs | 3 +- 9 files changed, 344 insertions(+), 66 deletions(-) diff --git a/src/message_extractor.rs b/src/message_extractor.rs index 6cb4ca6..a811e04 100644 --- a/src/message_extractor.rs +++ b/src/message_extractor.rs @@ -1,9 +1,6 @@ use crate::message_extractor_visitor::{ExtractionResult, MessageExtractorVisitor}; use crate::{LinguiMacroFolder, LinguiOptions}; use std::sync::Arc; -// use once_cell::sync::Lazy; -// use swc::Compiler; -// use swc_core::common::{sync::Lazy, FilePathMapping}; use swc_core::common::{Globals, Mark, GLOBALS}; use swc_core::ecma::transforms::base::resolver; use swc_core::{ @@ -42,7 +39,6 @@ pub fn extract_messages( let mut parser = Parser::new(syntax, StringInput::from(&*source_file), Some(&comments)); - // let mut parser = Parser::new_from(lexer); let module = parser .parse_module() .map_err(|e| format!("Parse error: {:?}", e))?; @@ -65,10 +61,13 @@ pub fn extract_messages( filename.to_string(), ); - let lingui_macro = LinguiMacroFolder::new(LinguiOptions { - strip_non_essential_fields: false, - ..Default::default() - }); + let lingui_macro = LinguiMacroFolder::new( + LinguiOptions { + strip_non_essential_fields: false, + ..Default::default() + }, + Some(&comments as &dyn Comments), + ); let globals = Globals::default(); diff --git a/src/message_extractor_visitor.rs b/src/message_extractor_visitor.rs index ed89b3f..03fbf92 100644 --- a/src/message_extractor_visitor.rs +++ b/src/message_extractor_visitor.rs @@ -17,46 +17,13 @@ pub type Origin = (String, usize, Option); #[derive(Debug, Clone, PartialEq, Serialize)] pub struct ExtractedMessage { pub id: String, - #[serde(serialize_with = "serialize_option_as_null")] pub message: Option, - #[serde(serialize_with = "serialize_option_as_null")] pub context: Option, - #[serde(serialize_with = "serialize_option_as_null")] pub comment: Option, pub placeholders: BTreeMap, - #[serde(serialize_with = "serialize_origin")] pub origin: Option, } -/// Serialize Option as null instead of omitting the field -fn serialize_option_as_null(value: &Option, serializer: S) -> Result -where - S: serde::Serializer, -{ - match value { - Some(v) => serializer.serialize_some(v), - None => serializer.serialize_none(), - } -} - -/// Serialize origin as a 2-element array [filename, line_number] -fn serialize_origin(value: &Option, serializer: S) -> Result -where - S: serde::Serializer, -{ - use serde::ser::SerializeSeq; - - match value { - Some((filename, line, _)) => { - let mut seq = serializer.serialize_seq(Some(2))?; - seq.serialize_element(filename)?; - seq.serialize_element(line)?; - seq.end() - } - None => serializer.serialize_none(), - } -} - /// Internal structure for building messages #[derive(Debug, Default)] struct RawMessage { @@ -250,16 +217,27 @@ impl<'a> MessageExtractorVisitor<'a> { } /// Collect a message and add it to the list - fn collect_message(&mut self, raw: RawMessage, _span: Span) { + fn collect_message(&mut self, raw: RawMessage, span: Span) { // Prevent from adding undefined msgid if raw.id.is_none() { return; } + // Extract line and column from span using SourceMap + let loc = self.source_map.lookup_char_pos(span.lo); + + // Check if column is valid (not a synthetic/dummy position from macros) + // Synthetic spans often have very large column values that would overflow + let col = if loc.col.0 < 1000000 { + Some(loc.col.to_usize() + 1) // Convert to 1-based + } else { + None // Invalid/synthetic column, omit it + }; + let origin = Some(( self.filename.clone(), - 1, // Line number (we'd need more complex logic to get accurate line numbers) - None, // Column (optional) + loc.line, // Accurate line number (1-based) + col, // Column number (1-based) or None if synthetic )); self.messages.push(ExtractedMessage { diff --git a/tests/__snapshots__/js-call-expression.js.json b/tests/__snapshots__/js-call-expression.js.json index 653de49..8938b01 100644 --- a/tests/__snapshots__/js-call-expression.js.json +++ b/tests/__snapshots__/js-call-expression.js.json @@ -7,7 +7,8 @@ "placeholders": {}, "origin": [ "js-call-expression.js", - 1 + 1, + 13 ] }, { @@ -18,7 +19,8 @@ "placeholders": {}, "origin": [ "js-call-expression.js", - 1 + 3, + 25 ] }, { @@ -29,7 +31,8 @@ "placeholders": {}, "origin": [ "js-call-expression.js", - 1 + 5, + 16 ] }, { @@ -42,7 +45,8 @@ }, "origin": [ "js-call-expression.js", - 1 + 7, + 20 ] }, { @@ -53,7 +57,8 @@ "placeholders": {}, "origin": [ "js-call-expression.js", - 1 + 9, + 21 ] }, { @@ -64,6 +69,7 @@ "placeholders": {}, "origin": [ "js-call-expression.js", + 12, 1 ] }, @@ -75,6 +81,7 @@ "placeholders": {}, "origin": [ "js-call-expression.js", + 19, 1 ] }, @@ -86,6 +93,7 @@ "placeholders": {}, "origin": [ "js-call-expression.js", + 22, 1 ] } diff --git a/tests/__snapshots__/js-message-descriptor.js.json b/tests/__snapshots__/js-message-descriptor.js.json index cede2ca..58b1b23 100644 --- a/tests/__snapshots__/js-message-descriptor.js.json +++ b/tests/__snapshots__/js-message-descriptor.js.json @@ -7,7 +7,8 @@ "placeholders": {}, "origin": [ "js-message-descriptor.js", - 1 + 1, + 22 ] }, { @@ -18,7 +19,8 @@ "placeholders": {}, "origin": [ "js-message-descriptor.js", - 1 + 3, + 34 ] }, { @@ -29,7 +31,8 @@ "placeholders": {}, "origin": [ "js-message-descriptor.js", - 1 + 5, + 25 ] }, { @@ -44,7 +47,8 @@ }, "origin": [ "js-message-descriptor.js", - 1 + 7, + 29 ] }, { @@ -55,7 +59,8 @@ "placeholders": {}, "origin": [ "js-message-descriptor.js", - 1 + 23, + 30 ] }, { @@ -66,7 +71,8 @@ "placeholders": {}, "origin": [ "js-message-descriptor.js", - 1 + 25, + 30 ] } ] \ No newline at end of file diff --git a/tests/__snapshots__/js-with-macros.js.json b/tests/__snapshots__/js-with-macros.js.json index 0637a08..1733709 100644 --- a/tests/__snapshots__/js-with-macros.js.json +++ b/tests/__snapshots__/js-with-macros.js.json @@ -1 +1,174 @@ -[] \ No newline at end of file +[ + { + "id": "xDAtGP", + "message": "Message", + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 4, + 2 + ] + }, + { + "id": "xDAtGP", + "message": "Message", + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 6, + 15 + ] + }, + { + "id": "Nu4oKW", + "message": "Description", + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 8, + 25 + ] + }, + { + "id": "ID", + "message": "Message with id", + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 13, + 16 + ] + }, + { + "id": "QCVtWw", + "message": "Values {param}", + "context": null, + "comment": null, + "placeholders": { + "param": "param" + }, + "origin": [ + "js-with-macros.js", + 18, + 21 + ] + }, + { + "id": "ID Some", + "message": "Message with id some", + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 20, + 19 + ] + }, + { + "id": "Backtick", + "message": null, + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 25, + 27 + ] + }, + { + "id": "Some ID", + "message": null, + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 29, + 25 + ] + }, + { + "id": "Some other ID", + "message": null, + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 34, + 25 + ] + }, + { + "id": "Some ID", + "message": null, + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 39, + 34 + ] + }, + { + "id": "Some ID", + "message": null, + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 44, + 28 + ] + }, + { + "id": "sD7MQ4", + "message": "TplLiteral", + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 49, + 29 + ] + }, + { + "id": "VO4BJY", + "message": "[useLingui]: TplLiteral", + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "js-with-macros.js", + 54, + 4 + ] + }, + { + "id": "ZxxjOE", + "message": "[useLingui]: Text {0, plural, offset:1 =0 {No books} =1 {1 book} other {# books}}", + "context": null, + "comment": null, + "placeholders": { + "0": "users.length" + }, + "origin": [ + "js-with-macros.js", + 57, + 14 + ] + } +] \ No newline at end of file diff --git a/tests/__snapshots__/jsx-with-macros.js.json b/tests/__snapshots__/jsx-with-macros.js.json index 0637a08..53d4c61 100644 --- a/tests/__snapshots__/jsx-with-macros.js.json +++ b/tests/__snapshots__/jsx-with-macros.js.json @@ -1 +1,78 @@ -[] \ No newline at end of file +[ + { + "id": "d1Kdl3", + "message": "Hi, my name is {name}", + "context": null, + "comment": null, + "placeholders": { + "name": "name" + }, + "origin": [ + "jsx-with-macros.js", + 3, + 9 + ] + }, + { + "id": "YikuIL", + "message": "Some message", + "context": "Context1", + "comment": null, + "placeholders": {}, + "origin": [ + "jsx-with-macros.js", + 4, + 28 + ] + }, + { + "id": "LBCs5C", + "message": "Some other message", + "context": "Context1", + "comment": null, + "placeholders": {}, + "origin": [ + "jsx-with-macros.js", + 5, + 28 + ] + }, + { + "id": "ru2rzr", + "message": "Some message", + "context": "Context2", + "comment": null, + "placeholders": {}, + "origin": [ + "jsx-with-macros.js", + 6, + 28 + ] + }, + { + "id": "MHrjPM", + "message": "Title", + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "jsx-with-macros.js", + 7, + 16 + ] + }, + { + "id": "esnaQO", + "message": "{count, plural, one {# book} other {# books}}", + "context": null, + "comment": null, + "placeholders": { + "count": "count" + }, + "origin": [ + "jsx-with-macros.js", + 9, + 17 + ] + } +] \ No newline at end of file diff --git a/tests/__snapshots__/jsx-without-macros.js.json b/tests/__snapshots__/jsx-without-macros.js.json index 19aeb0d..f90d86d 100644 --- a/tests/__snapshots__/jsx-without-macros.js.json +++ b/tests/__snapshots__/jsx-without-macros.js.json @@ -7,7 +7,8 @@ "placeholders": {}, "origin": [ "jsx-without-macros.js", - 1 + 5, + 2 ] }, { @@ -18,7 +19,8 @@ "placeholders": {}, "origin": [ "jsx-without-macros.js", - 1 + 6, + 2 ] }, { @@ -29,7 +31,8 @@ "placeholders": {}, "origin": [ "jsx-without-macros.js", - 1 + 7, + 2 ] }, { @@ -40,7 +43,8 @@ "placeholders": {}, "origin": [ "jsx-without-macros.js", - 1 + 8, + 2 ] }, { @@ -51,7 +55,8 @@ "placeholders": {}, "origin": [ "jsx-without-macros.js", - 1 + 9, + 2 ] }, { @@ -62,7 +67,8 @@ "placeholders": {}, "origin": [ "jsx-without-macros.js", - 1 + 10, + 2 ] }, { @@ -73,7 +79,8 @@ "placeholders": {}, "origin": [ "jsx-without-macros.js", - 1 + 11, + 2 ] } ] \ No newline at end of file diff --git a/tests/__snapshots__/jsx-without-trans.js.json b/tests/__snapshots__/jsx-without-trans.js.json index 0637a08..a8fc81e 100644 --- a/tests/__snapshots__/jsx-without-trans.js.json +++ b/tests/__snapshots__/jsx-without-trans.js.json @@ -1 +1,30 @@ -[] \ No newline at end of file +[ + { + "id": "esnaQO", + "message": "{count, plural, one {# book} other {# books}}", + "context": null, + "comment": null, + "placeholders": { + "count": "count" + }, + "origin": [ + "jsx-without-trans.js", + 2, + 16 + ] + }, + { + "id": "8qNz+K", + "message": "{count, plural, one {# book} other {# books}}", + "context": "Some context", + "comment": null, + "placeholders": { + "count": "count" + }, + "origin": [ + "jsx-without-trans.js", + 3, + 16 + ] + } +] \ No newline at end of file diff --git a/tests/message_extractor.rs b/tests/message_extractor.rs index f36b1db..cf01b83 100644 --- a/tests/message_extractor.rs +++ b/tests/message_extractor.rs @@ -360,7 +360,8 @@ const msg = i18n._("Message"); let origin = messages[0].origin.as_ref().unwrap(); assert_eq!(origin.0, "test.js"); - assert_eq!(origin.1, 1); + assert_eq!(origin.1, 2); // Line 2 because of the blank line at the start + assert_eq!(origin.2, Some(13)); // Column where i18n._ starts } // ============================================================================ From d3c225d898d162b7e39a5fdaa7edb1ecc5e4f533 Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:38:41 +0100 Subject: [PATCH 04/34] sourcemaps support --- Cargo.lock | 1408 ++++++++++++++++++- Cargo.toml | 2 + src/message_extractor.rs | 68 +- src/message_extractor_visitor.rs | 112 +- tests/__snapshots__/with-sourcemaps.js.json | 38 + tests/fixtures/with-sourcemaps.js | 12 + tests/message_extractor.rs | 14 +- tests/sourcemapped/a.jsx | 1 + tests/sourcemapped/b.jsx | 1 + tests/sourcemapped/c.jsx | 1 + tests/sourcemapped/index.jsx | 3 + tests/sourcemapped/out/index.js | 12 + 12 files changed, 1539 insertions(+), 133 deletions(-) create mode 100644 tests/__snapshots__/with-sourcemaps.js.json create mode 100644 tests/fixtures/with-sourcemaps.js create mode 100644 tests/sourcemapped/a.jsx create mode 100644 tests/sourcemapped/b.jsx create mode 100644 tests/sourcemapped/c.jsx create mode 100644 tests/sourcemapped/index.jsx create mode 100644 tests/sourcemapped/out/index.js diff --git a/Cargo.lock b/Cargo.lock index f20ac5b..494c7fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,7 +15,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", + "getrandom", "once_cell", + "serde", "version_check", "zerocopy", ] @@ -35,6 +37,15 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "ansi_term" version = "0.12.1" @@ -50,6 +61,12 @@ version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + [[package]] name = "ascii" version = "1.1.0" @@ -125,6 +142,43 @@ dependencies = [ "generic-array", ] +[[package]] +name = "browserslist-data" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21d369bf3fe9811518eead42e2cdf9ed9915579242864297689894c0f1089712" +dependencies = [ + "ahash", + "chrono", +] + +[[package]] +name = "browserslist-rs" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dd48a6ca358df4f7000e3fb5f08738b1b91a0e5d5f862e2f77b2b14647547f5" +dependencies = [ + "ahash", + "browserslist-data", + "chrono", + "either", + "itertools", + "nom", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "bstr" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -236,6 +290,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +dependencies = [ + "iana-time-zone", + "num-traits", + "windows-link", +] + [[package]] name = "compact_str" version = "0.7.1" @@ -249,6 +314,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + [[package]] name = "cpufeatures" version = "0.2.14" @@ -303,6 +374,19 @@ dependencies = [ "syn", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "data-encoding" version = "2.6.0" @@ -417,12 +501,30 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -458,12 +560,36 @@ dependencies = [ "version_check", ] +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + [[package]] name = "glob" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "globset" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" +dependencies = [ + "aho-corasick", + "bstr", + "regex-automata", + "regex-syntax", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -480,6 +606,17 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] + [[package]] name = "hermit-abi" version = "0.3.9" @@ -506,6 +643,30 @@ dependencies = [ "triomphe", ] +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "icu_collections" version = "1.5.0" @@ -513,9 +674,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ "displaydoc", - "yoke", + "yoke 0.7.5", + "zerofrom", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "serde", + "yoke 0.8.1", "zerofrom", - "zerovec", + "zerovec 0.11.5", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap 0.8.1", + "tinystr 0.8.2", + "writeable 0.6.2", + "zerovec 0.11.5", ] [[package]] @@ -525,10 +713,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", + "litemap 0.7.4", + "tinystr 0.7.6", + "writeable 0.5.5", + "zerovec 0.10.4", ] [[package]] @@ -540,9 +728,9 @@ dependencies = [ "displaydoc", "icu_locid", "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", + "icu_provider 1.5.0", + "tinystr 0.7.6", + "zerovec 0.10.4", ] [[package]] @@ -558,15 +746,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ "displaydoc", - "icu_collections", + "icu_collections 1.5.0", "icu_normalizer_data", - "icu_properties", - "icu_provider", + "icu_properties 1.5.1", + "icu_provider 1.5.0", "smallvec", "utf16_iter", "utf8_iter", "write16", - "zerovec", + "zerovec 0.10.4", ] [[package]] @@ -582,12 +770,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ "displaydoc", - "icu_collections", + "icu_collections 1.5.0", "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", + "icu_properties_data 1.5.0", + "icu_provider 1.5.0", + "tinystr 0.7.6", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections 2.1.1", + "icu_locale_core", + "icu_properties_data 2.1.2", + "icu_provider 2.1.1", + "serde", + "zerotrie", + "zerovec 0.11.5", ] [[package]] @@ -596,6 +799,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + [[package]] name = "icu_provider" version = "1.5.0" @@ -606,11 +815,26 @@ dependencies = [ "icu_locid", "icu_provider_macros", "stable_deref_trait", - "tinystr", - "writeable", - "yoke", + "tinystr 0.7.6", + "writeable 0.5.5", + "yoke 0.7.5", + "zerofrom", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable 0.6.2", + "yoke 0.8.1", "zerofrom", - "zerovec", + "zerotrie", + "zerovec 0.11.5", ] [[package]] @@ -648,7 +872,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ "icu_normalizer", - "icu_properties", + "icu_properties 1.5.1", ] [[package]] @@ -665,6 +889,7 @@ checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", "hashbrown 0.15.0", + "serde", ] [[package]] @@ -679,12 +904,40 @@ dependencies = [ "syn", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "js-sys" +version = "0.3.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "jsonc-parser" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6d80e6d70e7911a29f3cf3f44f452df85d06f73572b494ca99a2cad3fcf8f4" +dependencies = [ + "serde_json", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -708,6 +961,7 @@ dependencies = [ "serde_json", "sha2", "swc_core", + "swc_sourcemap", ] [[package]] @@ -722,6 +976,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + [[package]] name = "lock_api" version = "0.4.12" @@ -738,6 +998,15 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "lru" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" +dependencies = [ + "hashbrown 0.16.1", +] + [[package]] name = "matchers" version = "0.2.0" @@ -777,6 +1046,12 @@ dependencies = [ "syn", ] +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "munge" version = "0.4.2" @@ -803,6 +1078,25 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "normpath" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a9da8c9922c35a1033d76f7272dfc2e7ee20392083d75aeea6ced23c6266578" +dependencies = [ + "winapi", +] + [[package]] name = "nu-ansi-term" version = "0.50.3" @@ -878,6 +1172,16 @@ dependencies = [ "once_cell", ] +[[package]] +name = "par-iter" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eae0176a010bb94b9a67f0eb9da0fd31410817d58850649c54f485124c9a71a" +dependencies = [ + "either", + "par-core", +] + [[package]] name = "parking_lot" version = "0.12.3" @@ -901,12 +1205,34 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "path-clean" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd" + +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + [[package]] name = "percent-encoding" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "petgraph" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "phf" version = "0.11.2" @@ -955,6 +1281,39 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec 0.11.5", +] + +[[package]] +name = "precomputed-map" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84350ffee5cedfabf9bee3e8825721f651da8ff79d50fe7a37cf0ca015c428ee" + +[[package]] +name = "preset_env_base" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d4639c317ff6c06bfbca5d56a763dbd599766acf7d8f1e350eab15caf219b20" +dependencies = [ + "anyhow", + "browserslist-rs", + "dashmap", + "from_variant", + "once_cell", + "rustc-hash", + "semver", + "serde", + "st-map", + "tracing", +] + [[package]] name = "pretty_assertions" version = "1.4.1" @@ -1012,12 +1371,24 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "radium" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "radix_fmt" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce082a9940a7ace2ad4a8b7d0b1eac6aa378895f18be598230c5f2284ac05426" + [[package]] name = "rancor" version = "0.1.0" @@ -1080,6 +1451,16 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +[[package]] +name = "regress" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2057b2325e68a893284d1538021ab90279adac1139957ca2a74426c6f118fb48" +dependencies = [ + "hashbrown 0.16.1", + "memchr", +] + [[package]] name = "relative-path" version = "1.9.3" @@ -1156,6 +1537,12 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "ryu-js" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd29631678d6fb0903b69223673e122c32e9ae559d0960a38d574695ebc0ea15" + [[package]] name = "scoped-tls" version = "1.0.1" @@ -1226,6 +1613,17 @@ dependencies = [ "serde_core", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sha2" version = "0.10.8" @@ -1281,6 +1679,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "st-map" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8257dd592de7614be71a2342d36ba2d527ddad3f9a0c8d09d6ceed4c371531e4" +dependencies = [ + "arrayvec", + "static-map-macro", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -1300,6 +1708,17 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "static-map-macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "710e9696ef338691287aeb937ee6ffe60022f579d3c8d2fd9d58973a9a10a466" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -1323,6 +1742,54 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "swc" +version = "54.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c93b0a1fc0edfcb66eb6245175c17b402c644a228c5e750b5aaa9509b48f96a7" +dependencies = [ + "anyhow", + "base64", + "bytes-str", + "dashmap", + "either", + "indexmap", + "jsonc-parser", + "once_cell", + "par-core", + "par-iter", + "parking_lot", + "regex", + "rustc-hash", + "serde", + "serde_json", + "swc_atoms", + "swc_common", + "swc_compiler_base", + "swc_config", + "swc_ecma_ast", + "swc_ecma_codegen", + "swc_ecma_ext_transforms", + "swc_ecma_loader", + "swc_ecma_minifier", + "swc_ecma_parser", + "swc_ecma_preset_env", + "swc_ecma_transforms", + "swc_ecma_transforms_base", + "swc_ecma_transforms_compat", + "swc_ecma_transforms_optimization", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_error_reporters", + "swc_node_comments", + "swc_sourcemap", + "swc_timer", + "swc_transform_common", + "swc_visit", + "tracing", + "url", +] + [[package]] name = "swc_allocator" version = "4.0.1" @@ -1382,12 +1849,72 @@ dependencies = [ "url", ] +[[package]] +name = "swc_compiler_base" +version = "47.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224fb0c0bbd57594892659261702903298027623156ab133005057af8e6fbc3d" +dependencies = [ + "anyhow", + "base64", + "bytes-str", + "once_cell", + "pathdiff", + "rustc-hash", + "serde", + "serde_json", + "swc_atoms", + "swc_common", + "swc_config", + "swc_ecma_ast", + "swc_ecma_codegen", + "swc_ecma_minifier", + "swc_ecma_parser", + "swc_ecma_visit", + "swc_sourcemap", + "swc_timer", +] + +[[package]] +name = "swc_config" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e90b52ee734ded867104612218101722ad87ff4cf74fe30383bd244a533f97" +dependencies = [ + "anyhow", + "bytes-str", + "dashmap", + "globset", + "indexmap", + "once_cell", + "regex", + "regress", + "rustc-hash", + "serde", + "serde_json", + "swc_config_macro", + "swc_sourcemap", +] + +[[package]] +name = "swc_config_macro" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b416e8ce6de17dc5ea496e10c7012b35bbc0e3fef38d2e065eed936490db0b3" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common", + "syn", +] + [[package]] name = "swc_core" version = "56.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a98e364864dc10de940b04a8e2b60ea2d2d512b1aa1e940651e128446fe35d71" dependencies = [ + "swc", "swc_allocator", "swc_atoms", "swc_common", @@ -1417,101 +1944,591 @@ dependencies = [ "once_cell", "phf", "rustc-hash", + "serde", "string_enum", "swc_atoms", "swc_common", - "swc_visit", - "unicode-id-start", + "swc_visit", + "unicode-id-start", +] + +[[package]] +name = "swc_ecma_codegen" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56116de786118dce35e90b612a1f4d952116dd2728ecb197c8064cfccf527baf" +dependencies = [ + "ascii", + "compact_str", + "dragonbox_ecma", + "memchr", + "num-bigint", + "once_cell", + "regex", + "rustc-hash", + "serde", + "swc_allocator", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_codegen_macros", + "tracing", +] + +[[package]] +name = "swc_ecma_codegen_macros" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e276dc62c0a2625a560397827989c82a93fd545fcf6f7faec0935a82cc4ddbb8" +dependencies = [ + "proc-macro2", + "swc_macros_common", + "syn", +] + +[[package]] +name = "swc_ecma_compat_bugfixes" +version = "41.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06666c745fc486f1237e552a370e2f1d703d3a78a4d58e3c286d8c1a8834875" +dependencies = [ + "rustc-hash", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_compat_es2015", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_common" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9acb3c0cd3f8102af5021b6e666d5c2dfe2c0c78c9ccb35e8ed8ed79fad2d4c4" +dependencies = [ + "swc_common", + "swc_ecma_ast", + "swc_ecma_transformer", + "swc_ecma_utils", +] + +[[package]] +name = "swc_ecma_compat_es2015" +version = "41.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f34c347e38ce9ed1cc6b7bad12e459e5ffec861e6dd195fbbb5d325c4750792f" +dependencies = [ + "arrayvec", + "indexmap", + "is-macro", + "rustc-hash", + "serde", + "serde_derive", + "smallvec", + "swc_atoms", + "swc_common", + "swc_config", + "swc_ecma_ast", + "swc_ecma_compat_common", + "swc_ecma_transformer", + "swc_ecma_transforms_base", + "swc_ecma_transforms_classes", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2016" +version = "37.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a031de2780845fa3e8b45c2fd7c43cd14ce01239917262739a32db0233b6e6d" +dependencies = [ + "swc_ecma_ast", + "swc_ecma_transformer", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2017" +version = "37.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca488aa5f09dc20f27cf2d6b43241c99ef80006ce5fa7469636222bee3b8251" +dependencies = [ + "serde", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transformer", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2018" +version = "38.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1814e16a1ab0242461c0beeab8686d8334f9ffa94618ccdda5dc0e3b98ceeee7" +dependencies = [ + "serde", + "swc_ecma_ast", + "swc_ecma_transformer", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2019" +version = "37.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a1540e2d0910fad216450be4af5d460ee86a2dabafbfa8414f8845f3139209a" +dependencies = [ + "swc_common", + "swc_ecma_ast", + "swc_ecma_transformer", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2020" +version = "39.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589d4655c12f0bc3072b8514be3c46d0c50cfc8eced3b6453cb051b1bae1e09e" +dependencies = [ + "serde", + "swc_common", + "swc_ecma_ast", + "swc_ecma_compat_es2022", + "swc_ecma_transformer", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2021" +version = "37.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcdd8220e7a2148f0bb8e1f756718f66d0c6e4a7a42212e591ec9c009a8fc720" +dependencies = [ + "swc_ecma_ast", + "swc_ecma_transformer", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2022" +version = "39.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f48a3678e283bee646b4b96c4e6d90e3d4354f3f483ae6da79e7693d1fd68d5" +dependencies = [ + "rustc-hash", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transformer", + "swc_ecma_transforms_base", + "swc_ecma_transforms_classes", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_regexp" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c267d92e58db3f3c00cf3f7e93ee72391f5cc2d9a5877db63ca95d7495a535" +dependencies = [ + "icu_properties 2.1.2", + "swc_ecma_regexp_ast", + "swc_ecma_regexp_visit", +] + +[[package]] +name = "swc_ecma_ext_transforms" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a6aed670f87cde675f40dcd0ff5196f3cec9b2bc7e6fed12adf5b808f18eb69" +dependencies = [ + "phf", + "swc_common", + "swc_ecma_ast", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_hooks" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9adff1f01550ef653e262ad709a2914d3dd6cfd559aea2e28eeeab8f895981" +dependencies = [ + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_loader" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b36b38399698e77c3d63838c2e32e40df0d5e55e489bef529a77a349a722c7a" +dependencies = [ + "anyhow", + "dashmap", + "lru", + "normpath", + "once_cell", + "parking_lot", + "path-clean", + "pathdiff", + "rustc-hash", + "serde", + "serde_json", + "swc_atoms", + "swc_common", + "tracing", +] + +[[package]] +name = "swc_ecma_minifier" +version = "44.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d62a924e6d201251cf10c94eb88bb88404aa9b24312d05622140202818159e4" +dependencies = [ + "arrayvec", + "bitflags", + "indexmap", + "num-bigint", + "num_cpus", + "once_cell", + "par-core", + "par-iter", + "parking_lot", + "phf", + "radix_fmt", + "rustc-hash", + "ryu-js", + "serde", + "serde_json", + "swc_atoms", + "swc_common", + "swc_config", + "swc_ecma_ast", + "swc_ecma_codegen", + "swc_ecma_hooks", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_transforms_optimization", + "swc_ecma_usage_analyzer", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_timer", + "tracing", +] + +[[package]] +name = "swc_ecma_parser" +version = "33.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d237cf212d1f3ff5c0cf6ab5070f0ed4d624a0ab032ac4f0451675d31890e71" +dependencies = [ + "bitflags", + "either", + "num-bigint", + "phf", + "rustc-hash", + "seq-macro", + "serde", + "smartstring", + "stacker", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "tracing", +] + +[[package]] +name = "swc_ecma_preset_env" +version = "47.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c35d01f1b0d11bd915ff4757e1c9b045b287c5b6970f90b54eb9f3b638252d15" +dependencies = [ + "anyhow", + "foldhash 0.1.5", + "indexmap", + "once_cell", + "precomputed-map", + "preset_env_base", + "rustc-hash", + "serde", + "serde_json", + "string_enum", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transformer", + "swc_ecma_transforms", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_regexp" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fb1c912d1f73009546bc8271feb40a2371f148fcde6a4b6f4973a1ce167bc07" +dependencies = [ + "phf", + "rustc-hash", + "swc_atoms", + "swc_common", + "swc_ecma_regexp_ast", + "swc_ecma_regexp_common", + "swc_ecma_regexp_visit", + "unicode-id-start", +] + +[[package]] +name = "swc_ecma_regexp_ast" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "568b408134ad2e201cd48db4d1ed7bed40abbec6e242fb8492a066834f674b11" +dependencies = [ + "bitflags", + "is-macro", + "swc_atoms", + "swc_common", + "swc_ecma_regexp_common", +] + +[[package]] +name = "swc_ecma_regexp_common" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a0a09a9e4dc09c97f07273695bd4b58e46b99dbb0cb788ce0dad2a181eb1e94" + +[[package]] +name = "swc_ecma_regexp_visit" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258ea946dddb367af135b8255c6ddd0b86a066f3d3c7d4bca2e624b77cd1b51f" +dependencies = [ + "serde", + "swc_atoms", + "swc_common", + "swc_ecma_regexp_ast", + "swc_visit", +] + +[[package]] +name = "swc_ecma_testing" +version = "19.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "177244625cdecd268a07534c3b087f7f263604dd40f3ec7c7a984ca95351b632" +dependencies = [ + "anyhow", + "hex", + "sha2", + "testing", + "tracing", +] + +[[package]] +name = "swc_ecma_transformer" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6175f7560a1b3cdc5231f0a608cf132ffcca8c4977c7f7410bbca8ccfb6bc09a" +dependencies = [ + "rustc-hash", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_compat_regexp", + "swc_ecma_hooks", + "swc_ecma_regexp", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", + "tracing", +] + +[[package]] +name = "swc_ecma_transforms" +version = "46.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1eab738b6e8f9385aad8d143e7750134e503c48ba620e0bc27aabaec3822a16" +dependencies = [ + "par-core", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_transforms_compat", + "swc_ecma_transforms_optimization", + "swc_ecma_transforms_proposal", + "swc_ecma_transforms_react", + "swc_ecma_transforms_typescript", + "swc_ecma_utils", +] + +[[package]] +name = "swc_ecma_transforms_base" +version = "36.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf93abf3dc6d2b21a2a29c62b0197cd270b6105a483236ecba91993f895204e" +dependencies = [ + "better_scoped_tls", + "indexmap", + "once_cell", + "par-core", + "phf", + "rustc-hash", + "serde", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_utils", + "swc_ecma_visit", + "tracing", +] + +[[package]] +name = "swc_ecma_transforms_classes" +version = "36.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3567a1a95c2f6d5f7c3ca59051cf099c5ac54cf8f293bcfb43b385477b9f80a9" +dependencies = [ + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", ] [[package]] -name = "swc_ecma_codegen" -version = "23.0.0" +name = "swc_ecma_transforms_compat" +version = "42.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56116de786118dce35e90b612a1f4d952116dd2728ecb197c8064cfccf527baf" +checksum = "e472acb6e92135ab42646a41086ee8c81576b9e0e964b483ac6c504319b9d861" dependencies = [ - "ascii", - "compact_str", - "dragonbox_ecma", - "memchr", - "num-bigint", - "once_cell", - "regex", - "rustc-hash", + "indexmap", + "par-core", "serde", - "swc_allocator", "swc_atoms", "swc_common", "swc_ecma_ast", - "swc_ecma_codegen_macros", + "swc_ecma_compat_bugfixes", + "swc_ecma_compat_common", + "swc_ecma_compat_es2015", + "swc_ecma_compat_es2016", + "swc_ecma_compat_es2017", + "swc_ecma_compat_es2018", + "swc_ecma_compat_es2019", + "swc_ecma_compat_es2020", + "swc_ecma_compat_es2021", + "swc_ecma_compat_es2022", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", "tracing", ] [[package]] -name = "swc_ecma_codegen_macros" -version = "2.0.2" +name = "swc_ecma_transforms_macros" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e276dc62c0a2625a560397827989c82a93fd545fcf6f7faec0935a82cc4ddbb8" +checksum = "bc777288799bf6786e5200325a56e4fbabba590264a4a48a0c70b16ad0cf5cd8" dependencies = [ "proc-macro2", + "quote", "swc_macros_common", "syn", ] [[package]] -name = "swc_ecma_parser" -version = "33.0.1" +name = "swc_ecma_transforms_optimization" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d237cf212d1f3ff5c0cf6ab5070f0ed4d624a0ab032ac4f0451675d31890e71" +checksum = "ab76533e9da38c8f13ca1a9d0a6edd6b3de328a281441aee9810281e1b7ba4e9" dependencies = [ - "bitflags", - "either", - "num-bigint", - "phf", + "bytes-str", + "dashmap", + "indexmap", + "once_cell", + "par-core", + "petgraph", "rustc-hash", - "seq-macro", - "serde", - "smartstring", - "stacker", + "serde_json", "swc_atoms", "swc_common", "swc_ecma_ast", + "swc_ecma_parser", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", "tracing", ] [[package]] -name = "swc_ecma_testing" -version = "19.0.0" +name = "swc_ecma_transforms_proposal" +version = "36.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177244625cdecd268a07534c3b087f7f263604dd40f3ec7c7a984ca95351b632" +checksum = "55c6aac75098d237a4311922e69e587355089e7ae880d237e037c10275f27e8d" dependencies = [ - "anyhow", - "hex", - "sha2", - "testing", - "tracing", + "either", + "rustc-hash", + "serde", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_transforms_classes", + "swc_ecma_utils", + "swc_ecma_visit", ] [[package]] -name = "swc_ecma_transforms_base" -version = "36.0.1" +name = "swc_ecma_transforms_react" +version = "40.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf93abf3dc6d2b21a2a29c62b0197cd270b6105a483236ecba91993f895204e" +checksum = "06920cb2277974a0000f58fb7a70d23f2419dddd53de0d5de8db014a9a1163f9" dependencies = [ - "better_scoped_tls", + "base64", + "bytes-str", "indexmap", "once_cell", - "par-core", - "phf", "rustc-hash", "serde", + "sha1", + "string_enum", "swc_atoms", "swc_common", + "swc_config", "swc_ecma_ast", + "swc_ecma_hooks", "swc_ecma_parser", + "swc_ecma_transforms_base", "swc_ecma_utils", "swc_ecma_visit", - "tracing", ] [[package]] @@ -1540,6 +2557,42 @@ dependencies = [ "testing", ] +[[package]] +name = "swc_ecma_transforms_typescript" +version = "40.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1f479758dfdefc5f1af7df222c13c1521b176489aba4dc6d13c3e21739f6473" +dependencies = [ + "bytes-str", + "rustc-hash", + "serde", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_transforms_react", + "swc_ecma_utils", + "swc_ecma_visit", +] + +[[package]] +name = "swc_ecma_usage_analyzer" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7aec80849cab609d92af5dd2670f18fc760f7029beb11beebcef3fed9ba3466" +dependencies = [ + "bitflags", + "indexmap", + "rustc-hash", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_timer", + "tracing", +] + [[package]] name = "swc_ecma_utils" version = "26.0.1" @@ -1609,6 +2662,18 @@ dependencies = [ "syn", ] +[[package]] +name = "swc_node_comments" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e110f3d5684e9c087450ee522d4b8ba68fd91964992984032cc00194a212cde4" +dependencies = [ + "dashmap", + "rustc-hash", + "swc_atoms", + "swc_common", +] + [[package]] name = "swc_plugin" version = "1.0.1" @@ -1663,6 +2728,15 @@ dependencies = [ "url", ] +[[package]] +name = "swc_timer" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4db06b46cc832f7cf83c2ce21905fc465d01443a2bdccf63644383e1f5847532" +dependencies = [ + "tracing", +] + [[package]] name = "swc_trace_macro" version = "2.0.2" @@ -1829,7 +2903,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", - "zerovec", + "zerovec 0.10.4", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec 0.11.5", ] [[package]] @@ -2026,6 +3110,60 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +dependencies = [ + "unicode-ident", +] + [[package]] name = "winapi" version = "0.3.9" @@ -2057,6 +3195,65 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -2139,6 +3336,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" + [[package]] name = "write16" version = "1.0.0" @@ -2151,6 +3354,12 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + [[package]] name = "wyz" version = "0.5.1" @@ -2174,7 +3383,18 @@ checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", - "yoke-derive", + "yoke-derive 0.7.5", + "zerofrom", +] + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive 0.8.1", "zerofrom", ] @@ -2190,6 +3410,18 @@ dependencies = [ "synstructure", ] +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.8.27" @@ -2231,15 +3463,38 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke 0.8.1", + "zerofrom", +] + [[package]] name = "zerovec" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ - "yoke", + "yoke 0.7.5", + "zerofrom", + "zerovec-derive 0.10.3", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "serde", + "yoke 0.8.1", "zerofrom", - "zerovec-derive", + "zerovec-derive 0.11.2", ] [[package]] @@ -2252,3 +3507,14 @@ dependencies = [ "quote", "syn", ] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/Cargo.toml b/Cargo.toml index a8dd2e5..364ee6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ serde = "1.0.207" serde_json = "1.0.125" regex = "1.10.6" once_cell = "1.19.0" +swc_sourcemap = "9.3.4" swc_core = { version = "56.0.0", features = [ "ecma_plugin_transform", "ecma_utils", @@ -30,6 +31,7 @@ swc_core = { version = "56.0.0", features = [ "ecma_parser", "common", "testing_transform", + "base" ] } # .cargo/config defines few alias to build plugin. # cargo build-wasi generates wasm-wasi32 binary diff --git a/src/message_extractor.rs b/src/message_extractor.rs index a811e04..367b08f 100644 --- a/src/message_extractor.rs +++ b/src/message_extractor.rs @@ -1,6 +1,10 @@ use crate::message_extractor_visitor::{ExtractionResult, MessageExtractorVisitor}; use crate::{LinguiMacroFolder, LinguiOptions}; +use data_encoding::BASE64; use std::sync::Arc; + +use swc_sourcemap as sourcemap; + use swc_core::common::{Globals, Mark, GLOBALS}; use swc_core::ecma::transforms::base::resolver; use swc_core::{ @@ -11,23 +15,70 @@ use swc_core::{ }, ecma::{ ast::*, - parser::{EsSyntax, Parser, StringInput, Syntax}, + parser::{Parser, StringInput, Syntax, TsSyntax}, visit::VisitWith, }, }; +// static COMPILER: Lazy> = Lazy::new(|| { +// let cm = Arc::new(SourceMap::new(FilePathMapping::empty())); +// +// Arc::new(Compiler::new(cm)) +// }); +// +// fn get_compiler() -> Arc { +// COMPILER.clone() +// } + +/// Extract inline source map from source code +/// Looks for sourceMappingURL comments with inline base64 data +fn extract_inline_sourcemap(source_code: &str) -> Option { + // get_compiler().transform() + // Look for sourceMappingURL comment (typically at the end of the file) + let source_mapping_prefix = "sourceMappingURL="; + + // Search for the comment in the source code + if let Some(idx) = source_code.rfind(source_mapping_prefix) { + let url_part = &source_code[idx + source_mapping_prefix.len()..]; + + // Find the end of the URL (typically end of line or end of file) + let url = url_part.lines().next().unwrap_or(url_part).trim(); + + // Check if it's an inline base64 data URL + if url.starts_with("data:application/json;base64,") { + // Extract the base64 content + if let Some(base64_start) = url.find("base64,") { + let base64_content = &url[base64_start + "base64,".len()..].trim(); + + // Decode base64 + if let Ok(decoded) = BASE64.decode(base64_content.as_bytes()) { + // Parse the source map + if let Ok(source_map) = sourcemap::SourceMap::from_slice(&decoded) { + return Some(source_map); + } + } + } + } + } + + None +} + /// Extract messages from source code pub fn extract_messages( source_code: &str, filename: &str, ) -> Result> { // Set up parser with JSX support - let syntax = Syntax::Es(EsSyntax { - jsx: true, + let syntax = Syntax::Typescript(TsSyntax { + tsx: true, ..Default::default() }); + // let fm = c.cm.new_source_file(filename.into(), src); + let source_map = Lrc::new(SourceMap::default()); + // source_map.new_source_file() // let source_file = source_map.new_source_file(FileName::Anon, src.into()); let source_file = source_map.new_source_file( @@ -45,20 +96,15 @@ pub fn extract_messages( let program = Program::Module(module); - // let res = p - // .parse_module() - // .map_err(|e| e.into_diagnostic(tester.handler).emit()); - // - // for e in p.take_errors() { - // e.into_diagnostic(tester.handler).emit() - // } + // Extract inline source map if present + let inline_source_map = extract_inline_sourcemap(source_code); // Extract messages directly from parsed module let mut extractor_visitor = MessageExtractorVisitor::new( source_map.clone(), &comments as &dyn Comments, - source_code.to_string(), filename.to_string(), + inline_source_map, ); let lingui_macro = LinguiMacroFolder::new( diff --git a/src/message_extractor_visitor.rs b/src/message_extractor_visitor.rs index 03fbf92..46d88ff 100644 --- a/src/message_extractor_visitor.rs +++ b/src/message_extractor_visitor.rs @@ -3,12 +3,13 @@ use std::collections::BTreeMap; use std::sync::Arc as Lrc; use swc_core::common::comments::Comments; use swc_core::common::source_map::SmallPos; -use swc_core::common::{SourceMap, Span, Spanned}; +use swc_core::common::{SourceMap, SourceMapper, Span, Spanned}; use swc_core::ecma::ast::{ BinaryOp, CallExpr, Callee, Expr, JSXAttrName, JSXAttrOrSpread, JSXAttrValue, JSXElement, JSXElementName, JSXExpr, Lit, MemberProp, ObjectLit, Prop, PropName, PropOrSpread, Str, }; use swc_core::ecma::visit::{Visit, VisitWith}; +use swc_sourcemap as sourcemap; /// Represents the location where a message was found pub type Origin = (String, usize, Option); @@ -31,7 +32,7 @@ struct RawMessage { message: Option, comment: Option, context: Option, - placeholders: Option>, + placeholders: Option>, } /// Result of message extraction containing messages and any warnings @@ -99,24 +100,11 @@ fn get_text_from_expression( } } -/// Get source code text for a span -fn get_node_source(source_code: &str, span: Span) -> String { - let start = span.lo.to_usize() - 1; - let end = span.hi.to_usize() - 1; - - if start < source_code.len() && end <= source_code.len() && start < end { - source_code[start..end].to_string() - } else { - String::new() - } -} - /// Convert a values object expression to placeholders HashMap fn values_object_to_placeholders( obj: &ObjectLit, - source_code: &str, warnings: &mut Vec, -) -> BTreeMap { +) -> BTreeMap { let mut placeholders = BTreeMap::new(); for (i, prop) in obj.props.iter().enumerate() { @@ -135,9 +123,7 @@ fn values_object_to_placeholders( }; if let Some(name) = name { - // kv.value. - let value_source = get_node_source(source_code, kv.value.span()); - placeholders.insert(name, value_source); + placeholders.insert(name, kv.value.span()); } } } @@ -147,11 +133,7 @@ fn values_object_to_placeholders( } /// Extract message properties from an object expression -fn extract_from_object_expression( - obj: &ObjectLit, - source_code: &str, - warnings: &mut Vec, -) -> RawMessage { +fn extract_from_object_expression(obj: &ObjectLit, warnings: &mut Vec) -> RawMessage { let mut raw_msg = RawMessage::default(); let text_keys = ["id", "message", "comment", "context"]; @@ -164,11 +146,8 @@ fn extract_from_object_expression( if key_name == "values" { if let Expr::Object(obj_expr) = &*kv.value { - raw_msg.placeholders = Some(values_object_to_placeholders( - obj_expr, - source_code, - warnings, - )); + raw_msg.placeholders = + Some(values_object_to_placeholders(obj_expr, warnings)); } } else if text_keys.contains(&key_name) { let text = get_text_from_expression(&kv.value, true, warnings); @@ -195,24 +174,24 @@ pub struct MessageExtractorVisitor<'a> { pub warnings: Vec, source_map: Lrc, comments: &'a dyn Comments, - source_code: String, filename: String, + input_source_map: Option, } impl<'a> MessageExtractorVisitor<'a> { pub fn new( source_map: Lrc, comments: &'a dyn Comments, - source_code: String, filename: String, + inline_source_map: Option, ) -> Self { Self { messages: Vec::new(), warnings: Vec::new(), source_map, comments, - source_code, filename, + input_source_map: inline_source_map, } } @@ -234,18 +213,62 @@ impl<'a> MessageExtractorVisitor<'a> { None // Invalid/synthetic column, omit it }; - let origin = Some(( - self.filename.clone(), - loc.line, // Accurate line number (1-based) - col, // Column number (1-based) or None if synthetic - )); + let filename = self.source_map.span_to_filename(span).to_string(); + + // Try to resolve original location using inline source map if available + let origin = self + .input_source_map + .as_ref() + .and_then(|source_map| { + // Source maps are 0-based, so we need to convert from 1-based line + let line = if loc.line > 0 { loc.line - 1 } else { 0 }; + let column = loc.col.to_usize(); + + // Look up the token in the source map + let token = source_map.lookup_token(line as u32, column as u32)?; + + // Get the original source filename + let original_file = source_map + .get_source(token.get_src_id()) + .map(|s| s.to_string()) + .unwrap_or_else(|| filename.clone()); + + // Source map line/column are 0-based, convert to 1-based + Some(( + original_file, + (token.get_src_line() + 1) as usize, + Some((token.get_src_col() + 1) as usize), + )) + }) + .or_else(|| { + // Fallback if token not found in source map or no source map + Some(( + filename.clone(), + loc.line, // Accurate line number (1-based) + col, // Column number (1-based) or None if synthetic + )) + }); self.messages.push(ExtractedMessage { id: raw.id.unwrap(), message: raw.message, context: raw.context, comment: raw.comment, - placeholders: raw.placeholders.unwrap_or_default(), + placeholders: raw + .placeholders + .map(|placeholders| { + // map placeholders spans to snippets + placeholders + .into_iter() + .filter_map(|(key, span)| { + self.source_map + .span_to_snippet(span) + .ok() + .map(|snippet| (key, snippet)) + }) + .collect() + }) + .unwrap_or_default(), origin, }); } @@ -292,7 +315,7 @@ impl<'a> MessageExtractorVisitor<'a> { /// Extract from a message descriptor (object expression with i18n comment) fn extract_from_message_descriptor(&mut self, obj: &ObjectLit, span: Span) { - let raw = extract_from_object_expression(obj, &self.source_code, &mut self.warnings); + let raw = extract_from_object_expression(obj, &mut self.warnings); if raw.id.is_none() { let loc = self.source_map.span_to_string(span); @@ -360,19 +383,15 @@ impl<'a> Visit for MessageExtractorVisitor<'a> { // Extract placeholders from second argument if it's an object if let Some(second_arg) = call.args.get(1) { if let Expr::Object(obj) = &*second_arg.expr { - raw.placeholders = Some(values_object_to_placeholders( - obj, - &self.source_code, - &mut self.warnings, - )); + // self.source_map. + raw.placeholders = Some(values_object_to_placeholders(obj, &mut self.warnings)); } } // Merge with third argument if it's an object (message descriptor) if let Some(third_arg) = call.args.get(2) { if let Expr::Object(obj) = &*third_arg.expr { - let descriptor = - extract_from_object_expression(obj, &self.source_code, &mut self.warnings); + let descriptor = extract_from_object_expression(obj, &mut self.warnings); // Merge properties (keeping existing id) if descriptor.message.is_some() { @@ -453,7 +472,6 @@ impl<'a> Visit for MessageExtractorVisitor<'a> { if let Expr::Object(obj) = &**expr { raw.placeholders = Some(values_object_to_placeholders( obj, - &self.source_code, &mut self.warnings, )); } diff --git a/tests/__snapshots__/with-sourcemaps.js.json b/tests/__snapshots__/with-sourcemaps.js.json new file mode 100644 index 0000000..ef66260 --- /dev/null +++ b/tests/__snapshots__/with-sourcemaps.js.json @@ -0,0 +1,38 @@ +[ + { + "id": "Message from file a.jsx", + "message": null, + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "../a.jsx", + 1, + 1 + ] + }, + { + "id": "Message from file b.jsx", + "message": null, + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "../b.jsx", + 1, + 1 + ] + }, + { + "id": "Message from file c.jsx", + "message": null, + "context": null, + "comment": null, + "placeholders": {}, + "origin": [ + "../c.jsx", + 1, + 1 + ] + } +] \ No newline at end of file diff --git a/tests/fixtures/with-sourcemaps.js b/tests/fixtures/with-sourcemaps.js new file mode 100644 index 0000000..e2f060e --- /dev/null +++ b/tests/fixtures/with-sourcemaps.js @@ -0,0 +1,12 @@ +"use strict"; +(() => { + // a.jsx + i18n.t("Message from file a.jsx"); + + // b.jsx + i18n.t("Message from file b.jsx"); + + // c.jsx + i18n.t("Message from file c.jsx"); +})(); +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vYS5qc3giLCAiLi4vYi5qc3giLCAiLi4vYy5qc3giXSwKICAic291cmNlc0NvbnRlbnQiOiBbImkxOG4udCgnTWVzc2FnZSBmcm9tIGZpbGUgYS5qc3gnKVxuIiwgImkxOG4udCgnTWVzc2FnZSBmcm9tIGZpbGUgYi5qc3gnKVxuIiwgImkxOG4udCgnTWVzc2FnZSBmcm9tIGZpbGUgYy5qc3gnKVxuIl0sCiAgIm1hcHBpbmdzIjogIjs7O0FBQUEsT0FBSyxFQUFFLHlCQUF5Qjs7O0FDQWhDLE9BQUssRUFBRSx5QkFBeUI7OztBQ0FoQyxPQUFLLEVBQUUseUJBQXlCOyIsCiAgIm5hbWVzIjogW10KfQo= diff --git a/tests/message_extractor.rs b/tests/message_extractor.rs index cf01b83..7a497f6 100644 --- a/tests/message_extractor.rs +++ b/tests/message_extractor.rs @@ -404,8 +404,7 @@ fn should_update_snapshots() -> bool { /// Serialize messages to JSON fn serialize_to_json(messages: &[ExtractedMessage]) -> String { - serde_json::to_string_pretty(messages) - .expect("Failed to serialize messages to JSON") + serde_json::to_string_pretty(messages).expect("Failed to serialize messages to JSON") } /// Perform snapshot test @@ -451,8 +450,10 @@ fn snapshot_test(fixture_name: &str) { eprintln!("{}\n", expected_json); eprintln!("Actual:"); eprintln!("{}\n", actual_json); - eprintln!("To update the snapshot, run:\n UPDATE=1 cargo test {}", - fixture_name.replace(".js", "").replace("-", "_")); + eprintln!( + "To update the snapshot, run:\n UPDATE=1 cargo test {}", + fixture_name.replace(".js", "").replace("-", "_") + ); panic!("Snapshot mismatch"); } } @@ -496,3 +497,8 @@ fn test_snapshot_jsx_without_trans() { fn test_snapshot_without_lingui() { snapshot_test("without-lingui.js"); } + +#[test] +fn test_snapshot_with_sourcemaps() { + snapshot_test("with-sourcemaps.js"); +} diff --git a/tests/sourcemapped/a.jsx b/tests/sourcemapped/a.jsx new file mode 100644 index 0000000..d656317 --- /dev/null +++ b/tests/sourcemapped/a.jsx @@ -0,0 +1 @@ +i18n.t('Message from file a.jsx') diff --git a/tests/sourcemapped/b.jsx b/tests/sourcemapped/b.jsx new file mode 100644 index 0000000..f4fbcaf --- /dev/null +++ b/tests/sourcemapped/b.jsx @@ -0,0 +1 @@ +i18n.t('Message from file b.jsx') diff --git a/tests/sourcemapped/c.jsx b/tests/sourcemapped/c.jsx new file mode 100644 index 0000000..445dc18 --- /dev/null +++ b/tests/sourcemapped/c.jsx @@ -0,0 +1 @@ +i18n.t('Message from file c.jsx') diff --git a/tests/sourcemapped/index.jsx b/tests/sourcemapped/index.jsx new file mode 100644 index 0000000..df9bc0f --- /dev/null +++ b/tests/sourcemapped/index.jsx @@ -0,0 +1,3 @@ +import './a.jsx' +import './b.jsx' +import './c.jsx' diff --git a/tests/sourcemapped/out/index.js b/tests/sourcemapped/out/index.js new file mode 100644 index 0000000..e2f060e --- /dev/null +++ b/tests/sourcemapped/out/index.js @@ -0,0 +1,12 @@ +"use strict"; +(() => { + // a.jsx + i18n.t("Message from file a.jsx"); + + // b.jsx + i18n.t("Message from file b.jsx"); + + // c.jsx + i18n.t("Message from file c.jsx"); +})(); +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vYS5qc3giLCAiLi4vYi5qc3giLCAiLi4vYy5qc3giXSwKICAic291cmNlc0NvbnRlbnQiOiBbImkxOG4udCgnTWVzc2FnZSBmcm9tIGZpbGUgYS5qc3gnKVxuIiwgImkxOG4udCgnTWVzc2FnZSBmcm9tIGZpbGUgYi5qc3gnKVxuIiwgImkxOG4udCgnTWVzc2FnZSBmcm9tIGZpbGUgYy5qc3gnKVxuIl0sCiAgIm1hcHBpbmdzIjogIjs7O0FBQUEsT0FBSyxFQUFFLHlCQUF5Qjs7O0FDQWhDLE9BQUssRUFBRSx5QkFBeUI7OztBQ0FoQyxPQUFLLEVBQUUseUJBQXlCOyIsCiAgIm5hbWVzIjogW10KfQo= From 896c2297c4eb73faa4824b70369737b8f3315bda Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Wed, 11 Feb 2026 20:40:38 +0100 Subject: [PATCH 05/34] reorganize repo --- Cargo.lock | 17 ++++++++-- Cargo.toml | 34 ++++--------------- crates/lingui_extractor/Cargo.toml | 20 +++++++++++ crates/lingui_extractor/src/lib.rs | 5 +++ .../src}/message_extractor.rs | 3 +- .../src}/message_extractor_visitor.rs | 3 -- .../__snapshots__/js-call-expression.js.json | 0 .../js-message-descriptor.js.json | 0 .../__snapshots__/js-with-macros.js.json | 0 .../__snapshots__/jsx-with-macros.js.json | 0 .../__snapshots__/jsx-without-macros.js.json | 0 .../__snapshots__/jsx-without-trans.js.json | 0 .../__snapshots__/with-sourcemaps.js.json | 0 .../__snapshots__/without-lingui.js.json | 0 .../tests}/fixtures/js-call-expression.js | 0 .../tests}/fixtures/js-message-descriptor.js | 0 .../tests}/fixtures/js-with-macros.js | 0 .../tests}/fixtures/jsx-with-macros.js | 0 .../tests}/fixtures/jsx-without-macros.js | 0 .../tests}/fixtures/jsx-without-trans.js | 0 .../tests}/fixtures/with-sourcemaps.js | 0 .../tests}/fixtures/without-lingui.js | 0 .../tests}/message_extractor.rs | 4 +-- .../tests}/sourcemapped/a.jsx | 0 .../tests}/sourcemapped/b.jsx | 0 .../tests}/sourcemapped/c.jsx | 0 .../tests}/sourcemapped/index.jsx | 0 .../tests}/sourcemapped/out/index.js | 0 crates/lingui_macro/Cargo.toml | 25 ++++++++++++++ {src => crates/lingui_macro/src}/ast_utils.rs | 0 {src => crates/lingui_macro/src}/builder.rs | 0 .../lingui_macro/src}/generate_id.rs | 0 .../lingui_macro/src}/js_macro_folder.rs | 0 .../lingui_macro/src}/jsx_visitor.rs | 0 {src => crates/lingui_macro/src}/lib.rs | 5 --- .../lingui_macro/src}/macro_utils.rs | 0 {src => crates/lingui_macro/src}/options.rs | 0 {src => crates/lingui_macro/src}/tokens.rs | 0 ...ocess_only_elements_imported_from_macro.js | 0 ...cess_only_elements_imported_from_macro2.js | 0 .../js_should_support_renamed_imports.js | 0 ...ocess_only_elements_imported_from_macro.js | 0 ...cess_only_elements_imported_from_macro2.js | 0 .../jsx_should_support_renamed_imports.js | 0 ...d_add_imports_after_directive_prologues.js | 0 .../should_add_not_clashing_imports.js | 0 ...message_should_support_template_literal.js | 0 .../should_expand_macros.js | 0 .../should_expand_values.js | 0 .../should_kept_only_essential_props.js | 0 .../should_preserve_custom_id.js | 0 .../should_transform_define_message.js | 0 .../js_choices_may_contain_expressions.js | 0 .../tests/js_icu.rs/js_dedup_values_in_icu.js | 0 .../js_icu_diffrent_object_literal_syntax.js | 0 .../tests/js_icu.rs/js_icu_macro.js | 0 .../js_icu.rs/js_icu_nested_in_choices.js | 0 .../tests/js_icu.rs/js_icu_nested_in_t.js | 0 ...js_plural_with_offset_and_exact_matches.js | 0 .../js_icu.rs/js_plural_with_placeholders.js | 0 .../js_should_not_touch_non_lungui_fns.js | 0 .../js_should_not_treat_offset_in_select.js | 0 .../js_choice_labels_in_tpl_literal.js | 0 .../js_t.rs/js_continuation_character.js | 0 .../tests/js_t.rs/js_custom_i18n_passed.js | 0 .../js_t.rs/js_dedup_values_in_tpl_literal.js | 0 .../js_explicit_labels_in_tpl_literal.js | 0 .../js_t.rs/js_newlines_are_preserved.js | 0 .../js_t.rs/js_ph_labels_in_tpl_literal.js | 0 .../js_should_kept_only_essential_props.js | 0 ...hould_not_touch_code_if_no_macro_import.js | 0 ...hould_not_touch_not_related_tagget_tpls.js | 0 .../js_should_work_with_legacy_import.js | 0 .../js_t.rs/js_substitution_in_tpl_literal.js | 0 .../js_support_message_descriptor_in_t_fn.js | 0 ...macro_message_with_custom_i18n_instance.js | 0 .../js_t.rs/js_t_fn_wrapped_in_call_expr.js | 0 ...erate_diffrent_id_when_context_provided.js | 0 ...d_comment_in_t_macro_as_call_expression.js | 0 .../js_t.rs/support_id_in_template_literal.js | 0 .../js_t.rs/unicode_characters_interpreted.js | 0 .../elements_inside_expression_container.js | 0 .../tests/jsx.rs/elements_without_children.js | 0 .../jsx.rs/html_attributes_are_handled.js | 0 .../jsx.rs/ignore_jsx_empty_expression.js | 0 ...ents_should_not_affect_expression_index.js | 0 .../jsx.rs/jsx_components_interpolation.js | 0 .../tests/jsx.rs/jsx_explicit_labels.js | 0 .../jsx_explicit_labels_with_as_statement.js | 0 ...s_are_converted_to_positional_arguments.js | 0 .../tests/jsx.rs/jsx_nested_labels.js | 0 .../tests/jsx.rs/jsx_ph_labels.js | 0 .../jsx.rs/jsx_preserve_reserved_attrs.js | 0 .../jsx.rs/jsx_should_suppor_legacy_import.js | 0 .../tests/jsx.rs/jsx_simple_jsx.js | 0 .../jsx_template_literal_in_children.js | 0 .../tests/jsx.rs/jsx_values_dedup.js | 0 .../tests/jsx.rs/jsx_with_context.js | 0 .../tests/jsx.rs/jsx_with_custom_id.js | 0 .../jsx.rs/keep_multiple_forced_newlines.js | 0 .../non_breaking_whitespace_handling_2226.js | 0 .../tests/jsx.rs/normalize_crlf_lf_cr.js | 0 ...roduction_only_essential_props_are_kept.js | 0 .../quoted_jsx_attributes_are_handled.js | 0 .../strip_whitespace_around_arguments.js | 0 ...pace_around_tags_but_keep_forced_spaces.js | 0 ...t_but_keep_in_jsx_expression_containers.js | 0 .../tests/jsx.rs/use_decoded_html_entities.js | 0 .../tests/jsx.rs/use_js_macro_in_jsx_attrs.js | 0 .../jsx.rs/use_js_plural_in_jsx_attrs.js | 0 .../tests/jsx_icu.rs/jsx_icu.js | 0 .../tests/jsx_icu.rs/jsx_icu_explicit_id.js | 0 .../tests/jsx_icu.rs/jsx_icu_nested.js | 0 .../jsx_icu_with_template_literal.js | 0 .../jsx_icu.rs/jsx_multivelel_nesting.js | 0 .../jsx_plural_preserve_reserved_attrs.js | 0 ...sx_plural_with_offset_and_exact_matches.js | 0 ...t_ordinal_with_offset_and_exact_matches.js | 0 .../tests/jsx_icu.rs/jsx_select_simple.js | 0 .../jsx_select_with_expressions_in_cases.js | 0 .../jsx_select_with_reserved_attrs.js | 0 .../jsx_icu.rs/jsx_trans_inside_plural.js | 0 .../multiple_new_lines_with_nbsp_endind.js | 0 ...roduction_only_essential_props_are_kept.js | 0 .../should_use_provided_runtime_modules.js | 0 .../tests/use_lingui.rs/js_use_lingui_hook.js | 0 ...ro_with_matching_name_in_correct_scopes.js | 0 .../use_lingui.rs/support_nested_macro.js | 0 ...macro_when_in_arrow_function_issue_2095.js | 0 ...upport_passing_t_variable_as_dependency.js | 0 .../support_renamed_destructuring.js | 0 .../use_lingui.rs/work_when_t_is_not_used.js | 0 ...th_components_defined_as_arrow_function.js | 0 ...work_with_existing_use_lingui_statement.js | 0 .../work_with_multiple_react_components.js | 0 .../lingui_macro/tests}/common/mod.rs | 4 +-- .../lingui_macro/tests}/imports.rs | 0 .../lingui_macro/tests}/js_define_message.rs | 2 +- .../lingui_macro/tests}/js_icu.rs | 0 {tests => crates/lingui_macro/tests}/js_t.rs | 2 +- {tests => crates/lingui_macro/tests}/jsx.rs | 2 +- .../lingui_macro/tests}/jsx_icu.rs | 2 +- .../lingui_macro/tests}/runtime_config.rs | 4 +-- .../lingui_macro/tests}/use_lingui.rs | 0 ..._produce_all_fields_when_no_message_set.js | 6 ---- ...d_produce_all_fields_without_strip_flag.js | 10 ------ 146 files changed, 82 insertions(+), 66 deletions(-) create mode 100644 crates/lingui_extractor/Cargo.toml create mode 100644 crates/lingui_extractor/src/lib.rs rename {src => crates/lingui_extractor/src}/message_extractor.rs (98%) rename {src => crates/lingui_extractor/src}/message_extractor_visitor.rs (99%) rename {tests => crates/lingui_extractor/tests}/__snapshots__/js-call-expression.js.json (100%) rename {tests => crates/lingui_extractor/tests}/__snapshots__/js-message-descriptor.js.json (100%) rename {tests => crates/lingui_extractor/tests}/__snapshots__/js-with-macros.js.json (100%) rename {tests => crates/lingui_extractor/tests}/__snapshots__/jsx-with-macros.js.json (100%) rename {tests => crates/lingui_extractor/tests}/__snapshots__/jsx-without-macros.js.json (100%) rename {tests => crates/lingui_extractor/tests}/__snapshots__/jsx-without-trans.js.json (100%) rename {tests => crates/lingui_extractor/tests}/__snapshots__/with-sourcemaps.js.json (100%) rename {tests => crates/lingui_extractor/tests}/__snapshots__/without-lingui.js.json (100%) rename {tests => crates/lingui_extractor/tests}/fixtures/js-call-expression.js (100%) rename {tests => crates/lingui_extractor/tests}/fixtures/js-message-descriptor.js (100%) rename {tests => crates/lingui_extractor/tests}/fixtures/js-with-macros.js (100%) rename {tests => crates/lingui_extractor/tests}/fixtures/jsx-with-macros.js (100%) rename {tests => crates/lingui_extractor/tests}/fixtures/jsx-without-macros.js (100%) rename {tests => crates/lingui_extractor/tests}/fixtures/jsx-without-trans.js (100%) rename {tests => crates/lingui_extractor/tests}/fixtures/with-sourcemaps.js (100%) rename {tests => crates/lingui_extractor/tests}/fixtures/without-lingui.js (100%) rename {tests => crates/lingui_extractor/tests}/message_extractor.rs (99%) rename {tests => crates/lingui_extractor/tests}/sourcemapped/a.jsx (100%) rename {tests => crates/lingui_extractor/tests}/sourcemapped/b.jsx (100%) rename {tests => crates/lingui_extractor/tests}/sourcemapped/c.jsx (100%) rename {tests => crates/lingui_extractor/tests}/sourcemapped/index.jsx (100%) rename {tests => crates/lingui_extractor/tests}/sourcemapped/out/index.js (100%) create mode 100644 crates/lingui_macro/Cargo.toml rename {src => crates/lingui_macro/src}/ast_utils.rs (100%) rename {src => crates/lingui_macro/src}/builder.rs (100%) rename {src => crates/lingui_macro/src}/generate_id.rs (100%) rename {src => crates/lingui_macro/src}/js_macro_folder.rs (100%) rename {src => crates/lingui_macro/src}/jsx_visitor.rs (100%) rename {src => crates/lingui_macro/src}/lib.rs (98%) rename {src => crates/lingui_macro/src}/macro_utils.rs (100%) rename {src => crates/lingui_macro/src}/options.rs (100%) rename {src => crates/lingui_macro/src}/tokens.rs (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/imports.rs/js_should_process_only_elements_imported_from_macro.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/imports.rs/js_should_process_only_elements_imported_from_macro2.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/imports.rs/js_should_support_renamed_imports.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/imports.rs/jsx_should_process_only_elements_imported_from_macro.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/imports.rs/jsx_should_process_only_elements_imported_from_macro2.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/imports.rs/jsx_should_support_renamed_imports.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/imports.rs/should_add_imports_after_directive_prologues.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/imports.rs/should_add_not_clashing_imports.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_define_message.rs/define_message_should_support_template_literal.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_define_message.rs/should_expand_macros.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_define_message.rs/should_expand_values.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_define_message.rs/should_kept_only_essential_props.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_define_message.rs/should_preserve_custom_id.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_define_message.rs/should_transform_define_message.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_icu.rs/js_choices_may_contain_expressions.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_icu.rs/js_dedup_values_in_icu.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_icu.rs/js_icu_diffrent_object_literal_syntax.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_icu.rs/js_icu_macro.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_icu.rs/js_icu_nested_in_choices.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_icu.rs/js_icu_nested_in_t.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_icu.rs/js_plural_with_offset_and_exact_matches.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_icu.rs/js_plural_with_placeholders.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_icu.rs/js_should_not_touch_non_lungui_fns.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_icu.rs/js_should_not_treat_offset_in_select.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_choice_labels_in_tpl_literal.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_continuation_character.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_custom_i18n_passed.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_dedup_values_in_tpl_literal.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_explicit_labels_in_tpl_literal.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_newlines_are_preserved.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_ph_labels_in_tpl_literal.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_should_kept_only_essential_props.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_should_not_touch_code_if_no_macro_import.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_should_not_touch_not_related_tagget_tpls.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_should_work_with_legacy_import.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_substitution_in_tpl_literal.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_support_message_descriptor_in_t_fn.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_support_template_strings_in_t_macro_message_with_custom_i18n_instance.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/js_t_fn_wrapped_in_call_expr.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/should_generate_diffrent_id_when_context_provided.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/support_id_and_comment_in_t_macro_as_call_expression.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/support_id_in_template_literal.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/js_t.rs/unicode_characters_interpreted.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/elements_inside_expression_container.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/elements_without_children.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/html_attributes_are_handled.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/ignore_jsx_empty_expression.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_comments_should_not_affect_expression_index.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_components_interpolation.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_explicit_labels.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_explicit_labels_with_as_statement.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_expressions_are_converted_to_positional_arguments.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_nested_labels.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_ph_labels.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_preserve_reserved_attrs.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_should_suppor_legacy_import.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_simple_jsx.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_template_literal_in_children.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_values_dedup.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_with_context.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/jsx_with_custom_id.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/keep_multiple_forced_newlines.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/non_breaking_whitespace_handling_2226.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/normalize_crlf_lf_cr.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/production_only_essential_props_are_kept.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/quoted_jsx_attributes_are_handled.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/strip_whitespace_around_arguments.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/strip_whitespace_around_tags_but_keep_forced_spaces.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/strip_whitespaces_in_jsxtext_but_keep_in_jsx_expression_containers.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/use_decoded_html_entities.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/use_js_macro_in_jsx_attrs.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx.rs/use_js_plural_in_jsx_attrs.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_explicit_id.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_nested.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_with_template_literal.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_multivelel_nesting.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_plural_preserve_reserved_attrs.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_plural_with_offset_and_exact_matches.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_ordinal_with_offset_and_exact_matches.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_simple.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_with_expressions_in_cases.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_with_reserved_attrs.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/jsx_trans_inside_plural.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/multiple_new_lines_with_nbsp_endind.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/jsx_icu.rs/production_only_essential_props_are_kept.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/runtime_config.rs/should_use_provided_runtime_modules.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/use_lingui.rs/js_use_lingui_hook.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/use_lingui.rs/should_process_macro_with_matching_name_in_correct_scopes.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/use_lingui.rs/support_nested_macro.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/use_lingui.rs/support_nested_macro_when_in_arrow_function_issue_2095.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/use_lingui.rs/support_passing_t_variable_as_dependency.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/use_lingui.rs/support_renamed_destructuring.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/use_lingui.rs/work_when_t_is_not_used.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/use_lingui.rs/work_with_components_defined_as_arrow_function.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/use_lingui.rs/work_with_existing_use_lingui_statement.js (100%) rename {tests => crates/lingui_macro/tests}/__swc_snapshots__/tests/use_lingui.rs/work_with_multiple_react_components.js (100%) rename {tests => crates/lingui_macro/tests}/common/mod.rs (91%) rename {tests => crates/lingui_macro/tests}/imports.rs (100%) rename {tests => crates/lingui_macro/tests}/js_define_message.rs (97%) rename {tests => crates/lingui_macro/tests}/js_icu.rs (100%) rename {tests => crates/lingui_macro/tests}/js_t.rs (99%) rename {tests => crates/lingui_macro/tests}/jsx.rs (99%) rename {tests => crates/lingui_macro/tests}/jsx_icu.rs (99%) rename {tests => crates/lingui_macro/tests}/runtime_config.rs (80%) rename {tests => crates/lingui_macro/tests}/use_lingui.rs (100%) delete mode 100644 tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_when_no_message_set.js delete mode 100644 tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_without_strip_flag.js diff --git a/Cargo.lock b/Cargo.lock index 494c7fa..d3b9c49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -951,8 +951,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] -name = "lingui_macro_plugin" -version = "6.0.0-next.1" +name = "lingui_extractor" +version = "5.10.1" +dependencies = [ + "data-encoding", + "lingui_macro", + "serde", + "serde_json", + "swc_core", + "swc_sourcemap", +] + +[[package]] +name = "lingui_macro" +version = "5.10.1" dependencies = [ "data-encoding", "once_cell", @@ -961,7 +973,6 @@ dependencies = [ "serde_json", "sha2", "swc_core", - "swc_sourcemap", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 364ee6f..2e4e0e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,13 @@ -[package] -name = "lingui_macro_plugin" +[workspace] +members = [ + "crates/*", +] +resolver = "2" + +[workspace.package] version = "6.0.0-next.1" edition = "2021" -[lib] -crate-type = ["cdylib", 'rlib'] - [profile.release] # This removes more dead code codegen-units = 1 @@ -14,25 +16,3 @@ lto = false opt-level = "s" # Optimize for performance, this is default so you don't need to specify it # opt-level = "z" - -[dependencies] -data-encoding = "2.3.3" -sha2 = "0.10.8" -serde = "1.0.207" -serde_json = "1.0.125" -regex = "1.10.6" -once_cell = "1.19.0" -swc_sourcemap = "9.3.4" -swc_core = { version = "56.0.0", features = [ - "ecma_plugin_transform", - "ecma_utils", - "ecma_visit", - "ecma_ast", - "ecma_parser", - "common", - "testing_transform", - "base" -] } -# .cargo/config defines few alias to build plugin. -# cargo build-wasi generates wasm-wasi32 binary -# cargo build-wasm32 generates wasm32-unknown-unknown binary. diff --git a/crates/lingui_extractor/Cargo.toml b/crates/lingui_extractor/Cargo.toml new file mode 100644 index 0000000..15bdcb1 --- /dev/null +++ b/crates/lingui_extractor/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "lingui_extractor" +version.workspace = true +edition.workspace = true + +[lib] +crate-type = ["rlib"] + +[dependencies] +lingui_macro = { path = "../lingui_macro" } +data-encoding = "2.3.3" +serde = { version = "1.0.207", features = ["derive"] } +serde_json = "1.0.125" +swc_sourcemap = "9.3.4" +swc_core = { version = "56.0.0", features = [ + "ecma_ast", + "ecma_parser", + "ecma_visit", + "common" +] } diff --git a/crates/lingui_extractor/src/lib.rs b/crates/lingui_extractor/src/lib.rs new file mode 100644 index 0000000..4d93564 --- /dev/null +++ b/crates/lingui_extractor/src/lib.rs @@ -0,0 +1,5 @@ +mod message_extractor; +mod message_extractor_visitor; + +pub use message_extractor::extract_messages; +pub use message_extractor_visitor::{ExtractedMessage, ExtractionResult}; diff --git a/src/message_extractor.rs b/crates/lingui_extractor/src/message_extractor.rs similarity index 98% rename from src/message_extractor.rs rename to crates/lingui_extractor/src/message_extractor.rs index 367b08f..5c81d57 100644 --- a/src/message_extractor.rs +++ b/crates/lingui_extractor/src/message_extractor.rs @@ -1,6 +1,6 @@ use crate::message_extractor_visitor::{ExtractionResult, MessageExtractorVisitor}; -use crate::{LinguiMacroFolder, LinguiOptions}; use data_encoding::BASE64; +use lingui_macro::{LinguiMacroFolder, LinguiOptions}; use std::sync::Arc; use swc_sourcemap as sourcemap; @@ -103,7 +103,6 @@ pub fn extract_messages( let mut extractor_visitor = MessageExtractorVisitor::new( source_map.clone(), &comments as &dyn Comments, - filename.to_string(), inline_source_map, ); diff --git a/src/message_extractor_visitor.rs b/crates/lingui_extractor/src/message_extractor_visitor.rs similarity index 99% rename from src/message_extractor_visitor.rs rename to crates/lingui_extractor/src/message_extractor_visitor.rs index 46d88ff..e1b4693 100644 --- a/src/message_extractor_visitor.rs +++ b/crates/lingui_extractor/src/message_extractor_visitor.rs @@ -174,7 +174,6 @@ pub struct MessageExtractorVisitor<'a> { pub warnings: Vec, source_map: Lrc, comments: &'a dyn Comments, - filename: String, input_source_map: Option, } @@ -182,7 +181,6 @@ impl<'a> MessageExtractorVisitor<'a> { pub fn new( source_map: Lrc, comments: &'a dyn Comments, - filename: String, inline_source_map: Option, ) -> Self { Self { @@ -190,7 +188,6 @@ impl<'a> MessageExtractorVisitor<'a> { warnings: Vec::new(), source_map, comments, - filename, input_source_map: inline_source_map, } } diff --git a/tests/__snapshots__/js-call-expression.js.json b/crates/lingui_extractor/tests/__snapshots__/js-call-expression.js.json similarity index 100% rename from tests/__snapshots__/js-call-expression.js.json rename to crates/lingui_extractor/tests/__snapshots__/js-call-expression.js.json diff --git a/tests/__snapshots__/js-message-descriptor.js.json b/crates/lingui_extractor/tests/__snapshots__/js-message-descriptor.js.json similarity index 100% rename from tests/__snapshots__/js-message-descriptor.js.json rename to crates/lingui_extractor/tests/__snapshots__/js-message-descriptor.js.json diff --git a/tests/__snapshots__/js-with-macros.js.json b/crates/lingui_extractor/tests/__snapshots__/js-with-macros.js.json similarity index 100% rename from tests/__snapshots__/js-with-macros.js.json rename to crates/lingui_extractor/tests/__snapshots__/js-with-macros.js.json diff --git a/tests/__snapshots__/jsx-with-macros.js.json b/crates/lingui_extractor/tests/__snapshots__/jsx-with-macros.js.json similarity index 100% rename from tests/__snapshots__/jsx-with-macros.js.json rename to crates/lingui_extractor/tests/__snapshots__/jsx-with-macros.js.json diff --git a/tests/__snapshots__/jsx-without-macros.js.json b/crates/lingui_extractor/tests/__snapshots__/jsx-without-macros.js.json similarity index 100% rename from tests/__snapshots__/jsx-without-macros.js.json rename to crates/lingui_extractor/tests/__snapshots__/jsx-without-macros.js.json diff --git a/tests/__snapshots__/jsx-without-trans.js.json b/crates/lingui_extractor/tests/__snapshots__/jsx-without-trans.js.json similarity index 100% rename from tests/__snapshots__/jsx-without-trans.js.json rename to crates/lingui_extractor/tests/__snapshots__/jsx-without-trans.js.json diff --git a/tests/__snapshots__/with-sourcemaps.js.json b/crates/lingui_extractor/tests/__snapshots__/with-sourcemaps.js.json similarity index 100% rename from tests/__snapshots__/with-sourcemaps.js.json rename to crates/lingui_extractor/tests/__snapshots__/with-sourcemaps.js.json diff --git a/tests/__snapshots__/without-lingui.js.json b/crates/lingui_extractor/tests/__snapshots__/without-lingui.js.json similarity index 100% rename from tests/__snapshots__/without-lingui.js.json rename to crates/lingui_extractor/tests/__snapshots__/without-lingui.js.json diff --git a/tests/fixtures/js-call-expression.js b/crates/lingui_extractor/tests/fixtures/js-call-expression.js similarity index 100% rename from tests/fixtures/js-call-expression.js rename to crates/lingui_extractor/tests/fixtures/js-call-expression.js diff --git a/tests/fixtures/js-message-descriptor.js b/crates/lingui_extractor/tests/fixtures/js-message-descriptor.js similarity index 100% rename from tests/fixtures/js-message-descriptor.js rename to crates/lingui_extractor/tests/fixtures/js-message-descriptor.js diff --git a/tests/fixtures/js-with-macros.js b/crates/lingui_extractor/tests/fixtures/js-with-macros.js similarity index 100% rename from tests/fixtures/js-with-macros.js rename to crates/lingui_extractor/tests/fixtures/js-with-macros.js diff --git a/tests/fixtures/jsx-with-macros.js b/crates/lingui_extractor/tests/fixtures/jsx-with-macros.js similarity index 100% rename from tests/fixtures/jsx-with-macros.js rename to crates/lingui_extractor/tests/fixtures/jsx-with-macros.js diff --git a/tests/fixtures/jsx-without-macros.js b/crates/lingui_extractor/tests/fixtures/jsx-without-macros.js similarity index 100% rename from tests/fixtures/jsx-without-macros.js rename to crates/lingui_extractor/tests/fixtures/jsx-without-macros.js diff --git a/tests/fixtures/jsx-without-trans.js b/crates/lingui_extractor/tests/fixtures/jsx-without-trans.js similarity index 100% rename from tests/fixtures/jsx-without-trans.js rename to crates/lingui_extractor/tests/fixtures/jsx-without-trans.js diff --git a/tests/fixtures/with-sourcemaps.js b/crates/lingui_extractor/tests/fixtures/with-sourcemaps.js similarity index 100% rename from tests/fixtures/with-sourcemaps.js rename to crates/lingui_extractor/tests/fixtures/with-sourcemaps.js diff --git a/tests/fixtures/without-lingui.js b/crates/lingui_extractor/tests/fixtures/without-lingui.js similarity index 100% rename from tests/fixtures/without-lingui.js rename to crates/lingui_extractor/tests/fixtures/without-lingui.js diff --git a/tests/message_extractor.rs b/crates/lingui_extractor/tests/message_extractor.rs similarity index 99% rename from tests/message_extractor.rs rename to crates/lingui_extractor/tests/message_extractor.rs index 7a497f6..ed6d19f 100644 --- a/tests/message_extractor.rs +++ b/crates/lingui_extractor/tests/message_extractor.rs @@ -1,5 +1,5 @@ -use lingui_macro_plugin::extract_messages; -use lingui_macro_plugin::message_extractor_visitor::ExtractedMessage; +use lingui_extractor::extract_messages; +use lingui_extractor::ExtractedMessage; fn extract_and_sort(source_code: &str, filename: &str) -> (Vec, Vec) { let result = extract_messages(source_code, filename).expect("Failed to extract messages"); diff --git a/tests/sourcemapped/a.jsx b/crates/lingui_extractor/tests/sourcemapped/a.jsx similarity index 100% rename from tests/sourcemapped/a.jsx rename to crates/lingui_extractor/tests/sourcemapped/a.jsx diff --git a/tests/sourcemapped/b.jsx b/crates/lingui_extractor/tests/sourcemapped/b.jsx similarity index 100% rename from tests/sourcemapped/b.jsx rename to crates/lingui_extractor/tests/sourcemapped/b.jsx diff --git a/tests/sourcemapped/c.jsx b/crates/lingui_extractor/tests/sourcemapped/c.jsx similarity index 100% rename from tests/sourcemapped/c.jsx rename to crates/lingui_extractor/tests/sourcemapped/c.jsx diff --git a/tests/sourcemapped/index.jsx b/crates/lingui_extractor/tests/sourcemapped/index.jsx similarity index 100% rename from tests/sourcemapped/index.jsx rename to crates/lingui_extractor/tests/sourcemapped/index.jsx diff --git a/tests/sourcemapped/out/index.js b/crates/lingui_extractor/tests/sourcemapped/out/index.js similarity index 100% rename from tests/sourcemapped/out/index.js rename to crates/lingui_extractor/tests/sourcemapped/out/index.js diff --git a/crates/lingui_macro/Cargo.toml b/crates/lingui_macro/Cargo.toml new file mode 100644 index 0000000..fe3a6f1 --- /dev/null +++ b/crates/lingui_macro/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "lingui_macro" +version.workspace = true +edition.workspace = true + +[lib] +crate-type = ["cdylib", "rlib"] + +[dependencies] +data-encoding = "2.3.3" +sha2 = "0.10.8" +serde = "1.0.207" +serde_json = "1.0.125" +regex = "1.10.6" +once_cell = "1.19.0" +swc_core = { version = "56.0.0", features = [ + "ecma_plugin_transform", + "ecma_utils", + "ecma_visit", + "ecma_ast", + "ecma_parser", + "common", + "testing_transform", + "base" +] } diff --git a/src/ast_utils.rs b/crates/lingui_macro/src/ast_utils.rs similarity index 100% rename from src/ast_utils.rs rename to crates/lingui_macro/src/ast_utils.rs diff --git a/src/builder.rs b/crates/lingui_macro/src/builder.rs similarity index 100% rename from src/builder.rs rename to crates/lingui_macro/src/builder.rs diff --git a/src/generate_id.rs b/crates/lingui_macro/src/generate_id.rs similarity index 100% rename from src/generate_id.rs rename to crates/lingui_macro/src/generate_id.rs diff --git a/src/js_macro_folder.rs b/crates/lingui_macro/src/js_macro_folder.rs similarity index 100% rename from src/js_macro_folder.rs rename to crates/lingui_macro/src/js_macro_folder.rs diff --git a/src/jsx_visitor.rs b/crates/lingui_macro/src/jsx_visitor.rs similarity index 100% rename from src/jsx_visitor.rs rename to crates/lingui_macro/src/jsx_visitor.rs diff --git a/src/lib.rs b/crates/lingui_macro/src/lib.rs similarity index 98% rename from src/lib.rs rename to crates/lingui_macro/src/lib.rs index bb261c8..68af411 100644 --- a/src/lib.rs +++ b/crates/lingui_macro/src/lib.rs @@ -22,8 +22,6 @@ mod generate_id; mod js_macro_folder; mod jsx_visitor; mod macro_utils; -pub mod message_extractor; -pub mod message_extractor_visitor; mod options; mod tokens; @@ -34,8 +32,6 @@ use ast_utils::*; use builder::*; use js_macro_folder::JsMacroFolder; use jsx_visitor::TransJSXVisitor; -pub use message_extractor_visitor::ExtractedMessage; -pub use message_extractor_visitor::ExtractionResult; pub struct IdentReplacer { from: Id, @@ -515,7 +511,6 @@ where } } -pub use self::message_extractor::extract_messages; pub use self::options::{LinguiOptions, RuntimeModulesConfigMapNormalized}; #[plugin_transform] diff --git a/src/macro_utils.rs b/crates/lingui_macro/src/macro_utils.rs similarity index 100% rename from src/macro_utils.rs rename to crates/lingui_macro/src/macro_utils.rs diff --git a/src/options.rs b/crates/lingui_macro/src/options.rs similarity index 100% rename from src/options.rs rename to crates/lingui_macro/src/options.rs diff --git a/src/tokens.rs b/crates/lingui_macro/src/tokens.rs similarity index 100% rename from src/tokens.rs rename to crates/lingui_macro/src/tokens.rs diff --git a/tests/__swc_snapshots__/tests/imports.rs/js_should_process_only_elements_imported_from_macro.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/js_should_process_only_elements_imported_from_macro.js similarity index 100% rename from tests/__swc_snapshots__/tests/imports.rs/js_should_process_only_elements_imported_from_macro.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/js_should_process_only_elements_imported_from_macro.js diff --git a/tests/__swc_snapshots__/tests/imports.rs/js_should_process_only_elements_imported_from_macro2.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/js_should_process_only_elements_imported_from_macro2.js similarity index 100% rename from tests/__swc_snapshots__/tests/imports.rs/js_should_process_only_elements_imported_from_macro2.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/js_should_process_only_elements_imported_from_macro2.js diff --git a/tests/__swc_snapshots__/tests/imports.rs/js_should_support_renamed_imports.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/js_should_support_renamed_imports.js similarity index 100% rename from tests/__swc_snapshots__/tests/imports.rs/js_should_support_renamed_imports.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/js_should_support_renamed_imports.js diff --git a/tests/__swc_snapshots__/tests/imports.rs/jsx_should_process_only_elements_imported_from_macro.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/jsx_should_process_only_elements_imported_from_macro.js similarity index 100% rename from tests/__swc_snapshots__/tests/imports.rs/jsx_should_process_only_elements_imported_from_macro.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/jsx_should_process_only_elements_imported_from_macro.js diff --git a/tests/__swc_snapshots__/tests/imports.rs/jsx_should_process_only_elements_imported_from_macro2.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/jsx_should_process_only_elements_imported_from_macro2.js similarity index 100% rename from tests/__swc_snapshots__/tests/imports.rs/jsx_should_process_only_elements_imported_from_macro2.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/jsx_should_process_only_elements_imported_from_macro2.js diff --git a/tests/__swc_snapshots__/tests/imports.rs/jsx_should_support_renamed_imports.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/jsx_should_support_renamed_imports.js similarity index 100% rename from tests/__swc_snapshots__/tests/imports.rs/jsx_should_support_renamed_imports.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/jsx_should_support_renamed_imports.js diff --git a/tests/__swc_snapshots__/tests/imports.rs/should_add_imports_after_directive_prologues.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/should_add_imports_after_directive_prologues.js similarity index 100% rename from tests/__swc_snapshots__/tests/imports.rs/should_add_imports_after_directive_prologues.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/should_add_imports_after_directive_prologues.js diff --git a/tests/__swc_snapshots__/tests/imports.rs/should_add_not_clashing_imports.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/should_add_not_clashing_imports.js similarity index 100% rename from tests/__swc_snapshots__/tests/imports.rs/should_add_not_clashing_imports.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/imports.rs/should_add_not_clashing_imports.js diff --git a/tests/__swc_snapshots__/tests/js_define_message.rs/define_message_should_support_template_literal.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/define_message_should_support_template_literal.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_define_message.rs/define_message_should_support_template_literal.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/define_message_should_support_template_literal.js diff --git a/tests/__swc_snapshots__/tests/js_define_message.rs/should_expand_macros.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/should_expand_macros.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_define_message.rs/should_expand_macros.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/should_expand_macros.js diff --git a/tests/__swc_snapshots__/tests/js_define_message.rs/should_expand_values.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/should_expand_values.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_define_message.rs/should_expand_values.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/should_expand_values.js diff --git a/tests/__swc_snapshots__/tests/js_define_message.rs/should_kept_only_essential_props.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/should_kept_only_essential_props.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_define_message.rs/should_kept_only_essential_props.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/should_kept_only_essential_props.js diff --git a/tests/__swc_snapshots__/tests/js_define_message.rs/should_preserve_custom_id.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/should_preserve_custom_id.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_define_message.rs/should_preserve_custom_id.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/should_preserve_custom_id.js diff --git a/tests/__swc_snapshots__/tests/js_define_message.rs/should_transform_define_message.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/should_transform_define_message.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_define_message.rs/should_transform_define_message.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_define_message.rs/should_transform_define_message.js diff --git a/tests/__swc_snapshots__/tests/js_icu.rs/js_choices_may_contain_expressions.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_choices_may_contain_expressions.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_icu.rs/js_choices_may_contain_expressions.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_choices_may_contain_expressions.js diff --git a/tests/__swc_snapshots__/tests/js_icu.rs/js_dedup_values_in_icu.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_dedup_values_in_icu.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_icu.rs/js_dedup_values_in_icu.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_dedup_values_in_icu.js diff --git a/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_diffrent_object_literal_syntax.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_diffrent_object_literal_syntax.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_icu.rs/js_icu_diffrent_object_literal_syntax.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_diffrent_object_literal_syntax.js diff --git a/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_macro.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_macro.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_icu.rs/js_icu_macro.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_macro.js diff --git a/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_nested_in_choices.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_nested_in_choices.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_icu.rs/js_icu_nested_in_choices.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_nested_in_choices.js diff --git a/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_nested_in_t.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_nested_in_t.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_icu.rs/js_icu_nested_in_t.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_icu_nested_in_t.js diff --git a/tests/__swc_snapshots__/tests/js_icu.rs/js_plural_with_offset_and_exact_matches.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_plural_with_offset_and_exact_matches.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_icu.rs/js_plural_with_offset_and_exact_matches.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_plural_with_offset_and_exact_matches.js diff --git a/tests/__swc_snapshots__/tests/js_icu.rs/js_plural_with_placeholders.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_plural_with_placeholders.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_icu.rs/js_plural_with_placeholders.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_plural_with_placeholders.js diff --git a/tests/__swc_snapshots__/tests/js_icu.rs/js_should_not_touch_non_lungui_fns.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_should_not_touch_non_lungui_fns.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_icu.rs/js_should_not_touch_non_lungui_fns.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_should_not_touch_non_lungui_fns.js diff --git a/tests/__swc_snapshots__/tests/js_icu.rs/js_should_not_treat_offset_in_select.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_should_not_treat_offset_in_select.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_icu.rs/js_should_not_treat_offset_in_select.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_icu.rs/js_should_not_treat_offset_in_select.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_choice_labels_in_tpl_literal.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_choice_labels_in_tpl_literal.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_choice_labels_in_tpl_literal.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_choice_labels_in_tpl_literal.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_continuation_character.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_continuation_character.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_continuation_character.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_continuation_character.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_custom_i18n_passed.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_custom_i18n_passed.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_custom_i18n_passed.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_custom_i18n_passed.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_dedup_values_in_tpl_literal.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_dedup_values_in_tpl_literal.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_dedup_values_in_tpl_literal.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_dedup_values_in_tpl_literal.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_explicit_labels_in_tpl_literal.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_explicit_labels_in_tpl_literal.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_explicit_labels_in_tpl_literal.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_explicit_labels_in_tpl_literal.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_newlines_are_preserved.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_newlines_are_preserved.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_newlines_are_preserved.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_newlines_are_preserved.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_ph_labels_in_tpl_literal.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_ph_labels_in_tpl_literal.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_ph_labels_in_tpl_literal.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_ph_labels_in_tpl_literal.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_should_kept_only_essential_props.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_kept_only_essential_props.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_should_kept_only_essential_props.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_kept_only_essential_props.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_should_not_touch_code_if_no_macro_import.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_not_touch_code_if_no_macro_import.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_should_not_touch_code_if_no_macro_import.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_not_touch_code_if_no_macro_import.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_should_not_touch_not_related_tagget_tpls.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_not_touch_not_related_tagget_tpls.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_should_not_touch_not_related_tagget_tpls.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_not_touch_not_related_tagget_tpls.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_should_work_with_legacy_import.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_work_with_legacy_import.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_should_work_with_legacy_import.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_work_with_legacy_import.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_substitution_in_tpl_literal.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_substitution_in_tpl_literal.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_substitution_in_tpl_literal.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_substitution_in_tpl_literal.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_support_message_descriptor_in_t_fn.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_support_message_descriptor_in_t_fn.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_support_message_descriptor_in_t_fn.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_support_message_descriptor_in_t_fn.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_support_template_strings_in_t_macro_message_with_custom_i18n_instance.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_support_template_strings_in_t_macro_message_with_custom_i18n_instance.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_support_template_strings_in_t_macro_message_with_custom_i18n_instance.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_support_template_strings_in_t_macro_message_with_custom_i18n_instance.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_t_fn_wrapped_in_call_expr.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_t_fn_wrapped_in_call_expr.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/js_t_fn_wrapped_in_call_expr.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_t_fn_wrapped_in_call_expr.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/should_generate_diffrent_id_when_context_provided.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/should_generate_diffrent_id_when_context_provided.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/should_generate_diffrent_id_when_context_provided.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/should_generate_diffrent_id_when_context_provided.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/support_id_and_comment_in_t_macro_as_call_expression.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/support_id_and_comment_in_t_macro_as_call_expression.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/support_id_and_comment_in_t_macro_as_call_expression.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/support_id_and_comment_in_t_macro_as_call_expression.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/support_id_in_template_literal.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/support_id_in_template_literal.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/support_id_in_template_literal.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/support_id_in_template_literal.js diff --git a/tests/__swc_snapshots__/tests/js_t.rs/unicode_characters_interpreted.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/unicode_characters_interpreted.js similarity index 100% rename from tests/__swc_snapshots__/tests/js_t.rs/unicode_characters_interpreted.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/unicode_characters_interpreted.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/elements_inside_expression_container.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/elements_inside_expression_container.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/elements_inside_expression_container.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/elements_inside_expression_container.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/elements_without_children.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/elements_without_children.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/elements_without_children.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/elements_without_children.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/html_attributes_are_handled.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/html_attributes_are_handled.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/html_attributes_are_handled.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/html_attributes_are_handled.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/ignore_jsx_empty_expression.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/ignore_jsx_empty_expression.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/ignore_jsx_empty_expression.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/ignore_jsx_empty_expression.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_comments_should_not_affect_expression_index.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_comments_should_not_affect_expression_index.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_comments_should_not_affect_expression_index.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_comments_should_not_affect_expression_index.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_components_interpolation.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_components_interpolation.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_components_interpolation.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_components_interpolation.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_explicit_labels.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_explicit_labels.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_explicit_labels.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_explicit_labels.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_explicit_labels_with_as_statement.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_explicit_labels_with_as_statement.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_explicit_labels_with_as_statement.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_explicit_labels_with_as_statement.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_expressions_are_converted_to_positional_arguments.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_expressions_are_converted_to_positional_arguments.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_expressions_are_converted_to_positional_arguments.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_expressions_are_converted_to_positional_arguments.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_nested_labels.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_nested_labels.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_nested_labels.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_nested_labels.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_ph_labels.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_ph_labels.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_ph_labels.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_ph_labels.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_preserve_reserved_attrs.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_preserve_reserved_attrs.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_preserve_reserved_attrs.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_preserve_reserved_attrs.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_should_suppor_legacy_import.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_should_suppor_legacy_import.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_should_suppor_legacy_import.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_should_suppor_legacy_import.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_simple_jsx.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_simple_jsx.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_simple_jsx.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_simple_jsx.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_template_literal_in_children.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_template_literal_in_children.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_template_literal_in_children.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_template_literal_in_children.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_values_dedup.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_values_dedup.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_values_dedup.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_values_dedup.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_with_context.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_with_context.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_with_context.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_with_context.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/jsx_with_custom_id.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_with_custom_id.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/jsx_with_custom_id.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/jsx_with_custom_id.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/keep_multiple_forced_newlines.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/keep_multiple_forced_newlines.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/keep_multiple_forced_newlines.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/keep_multiple_forced_newlines.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/non_breaking_whitespace_handling_2226.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/non_breaking_whitespace_handling_2226.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/non_breaking_whitespace_handling_2226.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/non_breaking_whitespace_handling_2226.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/normalize_crlf_lf_cr.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/normalize_crlf_lf_cr.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/normalize_crlf_lf_cr.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/normalize_crlf_lf_cr.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/production_only_essential_props_are_kept.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/production_only_essential_props_are_kept.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/production_only_essential_props_are_kept.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/production_only_essential_props_are_kept.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/quoted_jsx_attributes_are_handled.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/quoted_jsx_attributes_are_handled.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/quoted_jsx_attributes_are_handled.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/quoted_jsx_attributes_are_handled.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/strip_whitespace_around_arguments.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/strip_whitespace_around_arguments.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/strip_whitespace_around_arguments.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/strip_whitespace_around_arguments.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/strip_whitespace_around_tags_but_keep_forced_spaces.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/strip_whitespace_around_tags_but_keep_forced_spaces.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/strip_whitespace_around_tags_but_keep_forced_spaces.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/strip_whitespace_around_tags_but_keep_forced_spaces.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/strip_whitespaces_in_jsxtext_but_keep_in_jsx_expression_containers.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/strip_whitespaces_in_jsxtext_but_keep_in_jsx_expression_containers.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/strip_whitespaces_in_jsxtext_but_keep_in_jsx_expression_containers.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/strip_whitespaces_in_jsxtext_but_keep_in_jsx_expression_containers.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/use_decoded_html_entities.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/use_decoded_html_entities.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/use_decoded_html_entities.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/use_decoded_html_entities.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/use_js_macro_in_jsx_attrs.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/use_js_macro_in_jsx_attrs.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/use_js_macro_in_jsx_attrs.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/use_js_macro_in_jsx_attrs.js diff --git a/tests/__swc_snapshots__/tests/jsx.rs/use_js_plural_in_jsx_attrs.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/use_js_plural_in_jsx_attrs.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx.rs/use_js_plural_in_jsx_attrs.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx.rs/use_js_plural_in_jsx_attrs.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_explicit_id.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_explicit_id.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_explicit_id.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_explicit_id.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_nested.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_nested.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_nested.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_nested.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_with_template_literal.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_with_template_literal.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_with_template_literal.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_icu_with_template_literal.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_multivelel_nesting.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_multivelel_nesting.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_multivelel_nesting.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_multivelel_nesting.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_plural_preserve_reserved_attrs.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_plural_preserve_reserved_attrs.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_plural_preserve_reserved_attrs.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_plural_preserve_reserved_attrs.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_plural_with_offset_and_exact_matches.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_plural_with_offset_and_exact_matches.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_plural_with_offset_and_exact_matches.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_plural_with_offset_and_exact_matches.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_ordinal_with_offset_and_exact_matches.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_ordinal_with_offset_and_exact_matches.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_ordinal_with_offset_and_exact_matches.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_ordinal_with_offset_and_exact_matches.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_simple.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_simple.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_simple.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_simple.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_with_expressions_in_cases.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_with_expressions_in_cases.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_with_expressions_in_cases.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_with_expressions_in_cases.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_with_reserved_attrs.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_with_reserved_attrs.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_with_reserved_attrs.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_select_with_reserved_attrs.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_trans_inside_plural.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_trans_inside_plural.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_trans_inside_plural.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/jsx_trans_inside_plural.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/multiple_new_lines_with_nbsp_endind.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/multiple_new_lines_with_nbsp_endind.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/multiple_new_lines_with_nbsp_endind.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/multiple_new_lines_with_nbsp_endind.js diff --git a/tests/__swc_snapshots__/tests/jsx_icu.rs/production_only_essential_props_are_kept.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/production_only_essential_props_are_kept.js similarity index 100% rename from tests/__swc_snapshots__/tests/jsx_icu.rs/production_only_essential_props_are_kept.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/jsx_icu.rs/production_only_essential_props_are_kept.js diff --git a/tests/__swc_snapshots__/tests/runtime_config.rs/should_use_provided_runtime_modules.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/runtime_config.rs/should_use_provided_runtime_modules.js similarity index 100% rename from tests/__swc_snapshots__/tests/runtime_config.rs/should_use_provided_runtime_modules.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/runtime_config.rs/should_use_provided_runtime_modules.js diff --git a/tests/__swc_snapshots__/tests/use_lingui.rs/js_use_lingui_hook.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/js_use_lingui_hook.js similarity index 100% rename from tests/__swc_snapshots__/tests/use_lingui.rs/js_use_lingui_hook.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/js_use_lingui_hook.js diff --git a/tests/__swc_snapshots__/tests/use_lingui.rs/should_process_macro_with_matching_name_in_correct_scopes.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/should_process_macro_with_matching_name_in_correct_scopes.js similarity index 100% rename from tests/__swc_snapshots__/tests/use_lingui.rs/should_process_macro_with_matching_name_in_correct_scopes.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/should_process_macro_with_matching_name_in_correct_scopes.js diff --git a/tests/__swc_snapshots__/tests/use_lingui.rs/support_nested_macro.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/support_nested_macro.js similarity index 100% rename from tests/__swc_snapshots__/tests/use_lingui.rs/support_nested_macro.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/support_nested_macro.js diff --git a/tests/__swc_snapshots__/tests/use_lingui.rs/support_nested_macro_when_in_arrow_function_issue_2095.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/support_nested_macro_when_in_arrow_function_issue_2095.js similarity index 100% rename from tests/__swc_snapshots__/tests/use_lingui.rs/support_nested_macro_when_in_arrow_function_issue_2095.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/support_nested_macro_when_in_arrow_function_issue_2095.js diff --git a/tests/__swc_snapshots__/tests/use_lingui.rs/support_passing_t_variable_as_dependency.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/support_passing_t_variable_as_dependency.js similarity index 100% rename from tests/__swc_snapshots__/tests/use_lingui.rs/support_passing_t_variable_as_dependency.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/support_passing_t_variable_as_dependency.js diff --git a/tests/__swc_snapshots__/tests/use_lingui.rs/support_renamed_destructuring.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/support_renamed_destructuring.js similarity index 100% rename from tests/__swc_snapshots__/tests/use_lingui.rs/support_renamed_destructuring.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/support_renamed_destructuring.js diff --git a/tests/__swc_snapshots__/tests/use_lingui.rs/work_when_t_is_not_used.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/work_when_t_is_not_used.js similarity index 100% rename from tests/__swc_snapshots__/tests/use_lingui.rs/work_when_t_is_not_used.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/work_when_t_is_not_used.js diff --git a/tests/__swc_snapshots__/tests/use_lingui.rs/work_with_components_defined_as_arrow_function.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/work_with_components_defined_as_arrow_function.js similarity index 100% rename from tests/__swc_snapshots__/tests/use_lingui.rs/work_with_components_defined_as_arrow_function.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/work_with_components_defined_as_arrow_function.js diff --git a/tests/__swc_snapshots__/tests/use_lingui.rs/work_with_existing_use_lingui_statement.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/work_with_existing_use_lingui_statement.js similarity index 100% rename from tests/__swc_snapshots__/tests/use_lingui.rs/work_with_existing_use_lingui_statement.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/work_with_existing_use_lingui_statement.js diff --git a/tests/__swc_snapshots__/tests/use_lingui.rs/work_with_multiple_react_components.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/work_with_multiple_react_components.js similarity index 100% rename from tests/__swc_snapshots__/tests/use_lingui.rs/work_with_multiple_react_components.js rename to crates/lingui_macro/tests/__swc_snapshots__/tests/use_lingui.rs/work_with_multiple_react_components.js diff --git a/tests/common/mod.rs b/crates/lingui_macro/tests/common/mod.rs similarity index 91% rename from tests/common/mod.rs rename to crates/lingui_macro/tests/common/mod.rs index 344b1db..2171832 100644 --- a/tests/common/mod.rs +++ b/crates/lingui_macro/tests/common/mod.rs @@ -13,7 +13,7 @@ macro_rules! to { swc_core::common::Mark::new(), true, ), - swc_core::ecma::visit::fold_pass(lingui_macro_plugin::LinguiMacroFolder::new( + swc_core::ecma::visit::fold_pass(lingui_macro::LinguiMacroFolder::new( Default::default(), Some(tester.comments.clone()), )), @@ -30,7 +30,7 @@ macro_rules! to { ..Default::default() }), |tester| { - swc_core::ecma::visit::fold_pass(lingui_macro_plugin::LinguiMacroFolder::new( + swc_core::ecma::visit::fold_pass(lingui_macro::LinguiMacroFolder::new( $options, Some(tester.comments.clone()), )) diff --git a/tests/imports.rs b/crates/lingui_macro/tests/imports.rs similarity index 100% rename from tests/imports.rs rename to crates/lingui_macro/tests/imports.rs diff --git a/tests/js_define_message.rs b/crates/lingui_macro/tests/js_define_message.rs similarity index 97% rename from tests/js_define_message.rs rename to crates/lingui_macro/tests/js_define_message.rs index 050b0b1..36e8c9c 100644 --- a/tests/js_define_message.rs +++ b/crates/lingui_macro/tests/js_define_message.rs @@ -1,4 +1,4 @@ -use lingui_macro_plugin::LinguiOptions; +use lingui_macro::LinguiOptions; #[macro_use] mod common; diff --git a/tests/js_icu.rs b/crates/lingui_macro/tests/js_icu.rs similarity index 100% rename from tests/js_icu.rs rename to crates/lingui_macro/tests/js_icu.rs diff --git a/tests/js_t.rs b/crates/lingui_macro/tests/js_t.rs similarity index 99% rename from tests/js_t.rs rename to crates/lingui_macro/tests/js_t.rs index 6816127..a110f64 100644 --- a/tests/js_t.rs +++ b/crates/lingui_macro/tests/js_t.rs @@ -1,4 +1,4 @@ -use lingui_macro_plugin::LinguiOptions; +use lingui_macro::LinguiOptions; #[macro_use] mod common; diff --git a/tests/jsx.rs b/crates/lingui_macro/tests/jsx.rs similarity index 99% rename from tests/jsx.rs rename to crates/lingui_macro/tests/jsx.rs index f8e8d30..98b787e 100644 --- a/tests/jsx.rs +++ b/crates/lingui_macro/tests/jsx.rs @@ -1,4 +1,4 @@ -use lingui_macro_plugin::LinguiOptions; +use lingui_macro::LinguiOptions; #[macro_use] mod common; diff --git a/tests/jsx_icu.rs b/crates/lingui_macro/tests/jsx_icu.rs similarity index 99% rename from tests/jsx_icu.rs rename to crates/lingui_macro/tests/jsx_icu.rs index e04d521..befb847 100644 --- a/tests/jsx_icu.rs +++ b/crates/lingui_macro/tests/jsx_icu.rs @@ -1,4 +1,4 @@ -use lingui_macro_plugin::LinguiOptions; +use lingui_macro::LinguiOptions; #[macro_use] mod common; diff --git a/tests/runtime_config.rs b/crates/lingui_macro/tests/runtime_config.rs similarity index 80% rename from tests/runtime_config.rs rename to crates/lingui_macro/tests/runtime_config.rs index c68872a..3f73f52 100644 --- a/tests/runtime_config.rs +++ b/crates/lingui_macro/tests/runtime_config.rs @@ -3,8 +3,8 @@ mod common; to!( should_use_provided_runtime_modules, - lingui_macro_plugin::LinguiOptions { - runtime_modules: lingui_macro_plugin::RuntimeModulesConfigMapNormalized { + lingui_macro::LinguiOptions { + runtime_modules: lingui_macro::RuntimeModulesConfigMapNormalized { i18n: ("./custom-core".into(), "customI18n".into()), trans: ("./custom-react".into(), "CustomTrans".into()), use_lingui: ("./custom-react".into(), "useLingui2".into()) diff --git a/tests/use_lingui.rs b/crates/lingui_macro/tests/use_lingui.rs similarity index 100% rename from tests/use_lingui.rs rename to crates/lingui_macro/tests/use_lingui.rs diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_when_no_message_set.js b/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_when_no_message_set.js deleted file mode 100644 index ffb8690..0000000 --- a/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_when_no_message_set.js +++ /dev/null @@ -1,6 +0,0 @@ -import { i18n as $_i18n } from "@lingui/core"; -const msg2 = $_i18n._(/*i18n*/ { - id: "msgId", - context: "My Context", - comment: "description for translators" -}); diff --git a/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_without_strip_flag.js b/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_without_strip_flag.js deleted file mode 100644 index 9a56ba0..0000000 --- a/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_without_strip_flag.js +++ /dev/null @@ -1,10 +0,0 @@ -import { i18n as $_i18n } from "@lingui/core"; -const msg2 = $_i18n._(/*i18n*/ { - id: "msgId", - message: "Hello {name}", - values: { - name: name - }, - context: "My Context", - comment: "description for translators" -}); From a13dd7028c144fb9ccdfcb13efc9ed8be5054d14 Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Sat, 14 Feb 2026 19:50:58 +0100 Subject: [PATCH 06/34] use object for Origin and add napi attribute --- crates/lingui_extractor/Cargo.toml | 2 + .../lingui_extractor/src/message_extractor.rs | 10 -- .../src/message_extractor_visitor.rs | 33 +++-- .../__snapshots__/js-call-expression.js.json | 80 +++++----- .../js-message-descriptor.js.json | 60 ++++---- .../__snapshots__/js-with-macros.js.json | 140 +++++++++--------- .../__snapshots__/jsx-with-macros.js.json | 60 ++++---- .../__snapshots__/jsx-without-macros.js.json | 70 ++++----- .../__snapshots__/jsx-without-trans.js.json | 20 +-- .../__snapshots__/with-sourcemaps.js.json | 30 ++-- .../tests/message_extractor.rs | 28 ++-- 11 files changed, 267 insertions(+), 266 deletions(-) diff --git a/crates/lingui_extractor/Cargo.toml b/crates/lingui_extractor/Cargo.toml index 15bdcb1..fe78ee4 100644 --- a/crates/lingui_extractor/Cargo.toml +++ b/crates/lingui_extractor/Cargo.toml @@ -7,6 +7,8 @@ edition.workspace = true crate-type = ["rlib"] [dependencies] +napi-derive = { version = "3.0.0", features = ["type-def"] } +napi = "3.8.3" lingui_macro = { path = "../lingui_macro" } data-encoding = "2.3.3" serde = { version = "1.0.207", features = ["derive"] } diff --git a/crates/lingui_extractor/src/message_extractor.rs b/crates/lingui_extractor/src/message_extractor.rs index 5c81d57..bef6a1b 100644 --- a/crates/lingui_extractor/src/message_extractor.rs +++ b/crates/lingui_extractor/src/message_extractor.rs @@ -20,16 +20,6 @@ use swc_core::{ }, }; -// static COMPILER: Lazy> = Lazy::new(|| { -// let cm = Arc::new(SourceMap::new(FilePathMapping::empty())); -// -// Arc::new(Compiler::new(cm)) -// }); -// -// fn get_compiler() -> Arc { -// COMPILER.clone() -// } - /// Extract inline source map from source code /// Looks for sourceMappingURL comments with inline base64 data fn extract_inline_sourcemap(source_code: &str) -> Option { diff --git a/crates/lingui_extractor/src/message_extractor_visitor.rs b/crates/lingui_extractor/src/message_extractor_visitor.rs index e1b4693..1515739 100644 --- a/crates/lingui_extractor/src/message_extractor_visitor.rs +++ b/crates/lingui_extractor/src/message_extractor_visitor.rs @@ -1,3 +1,4 @@ +use napi_derive::napi; use serde::Serialize; use std::collections::BTreeMap; use std::sync::Arc as Lrc; @@ -12,10 +13,17 @@ use swc_core::ecma::visit::{Visit, VisitWith}; use swc_sourcemap as sourcemap; /// Represents the location where a message was found -pub type Origin = (String, usize, Option); +#[napi(object)] +#[derive(Debug, Clone, Serialize)] +pub struct Origin { + pub filename: String, + pub line: u32, + pub column: Option, +} /// A message extracted from source code -#[derive(Debug, Clone, PartialEq, Serialize)] +#[napi(object)] +#[derive(Debug, Clone, Serialize)] pub struct ExtractedMessage { pub id: String, pub message: Option, @@ -36,6 +44,7 @@ struct RawMessage { } /// Result of message extraction containing messages and any warnings +#[napi(object)] #[derive(Debug)] pub struct ExtractionResult { pub messages: Vec, @@ -231,19 +240,19 @@ impl<'a> MessageExtractorVisitor<'a> { .unwrap_or_else(|| filename.clone()); // Source map line/column are 0-based, convert to 1-based - Some(( - original_file, - (token.get_src_line() + 1) as usize, - Some((token.get_src_col() + 1) as usize), - )) + Some(Origin { + filename: original_file, + line: (token.get_src_line() + 1), + column: Some(token.get_src_col() + 1), + }) }) .or_else(|| { // Fallback if token not found in source map or no source map - Some(( - filename.clone(), - loc.line, // Accurate line number (1-based) - col, // Column number (1-based) or None if synthetic - )) + Some(Origin { + filename: filename.clone(), + line: loc.line as u32, + column: col.map(|c| c as u32), + }) }); self.messages.push(ExtractedMessage { diff --git a/crates/lingui_extractor/tests/__snapshots__/js-call-expression.js.json b/crates/lingui_extractor/tests/__snapshots__/js-call-expression.js.json index 8938b01..425f5df 100644 --- a/crates/lingui_extractor/tests/__snapshots__/js-call-expression.js.json +++ b/crates/lingui_extractor/tests/__snapshots__/js-call-expression.js.json @@ -5,11 +5,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-call-expression.js", - 1, - 13 - ] + "origin": { + "filename": "js-call-expression.js", + "line": 1, + "column": 13 + } }, { "id": "Description", @@ -17,11 +17,11 @@ "context": null, "comment": "description", "placeholders": {}, - "origin": [ - "js-call-expression.js", - 3, - 25 - ] + "origin": { + "filename": "js-call-expression.js", + "line": 3, + "column": 25 + } }, { "id": "ID", @@ -29,11 +29,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-call-expression.js", - 5, - 16 - ] + "origin": { + "filename": "js-call-expression.js", + "line": 5, + "column": 16 + } }, { "id": "Values {param}", @@ -43,11 +43,11 @@ "placeholders": { "param": "param" }, - "origin": [ - "js-call-expression.js", - 7, - 20 - ] + "origin": { + "filename": "js-call-expression.js", + "line": 7, + "column": 20 + } }, { "id": "Some id", @@ -55,11 +55,11 @@ "context": "Context1", "comment": null, "placeholders": {}, - "origin": [ - "js-call-expression.js", - 9, - 21 - ] + "origin": { + "filename": "js-call-expression.js", + "line": 9, + "column": 21 + } }, { "id": "my.id", @@ -67,11 +67,11 @@ "context": null, "comment": "My comment", "placeholders": {}, - "origin": [ - "js-call-expression.js", - 12, - 1 - ] + "origin": { + "filename": "js-call-expression.js", + "line": 12, + "column": 1 + } }, { "id": "Aliased Message", @@ -79,11 +79,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-call-expression.js", - 19, - 1 - ] + "origin": { + "filename": "js-call-expression.js", + "line": 19, + "column": 1 + } }, { "id": "my.id", @@ -91,10 +91,10 @@ "context": null, "comment": "My comment", "placeholders": {}, - "origin": [ - "js-call-expression.js", - 22, - 1 - ] + "origin": { + "filename": "js-call-expression.js", + "line": 22, + "column": 1 + } } ] \ No newline at end of file diff --git a/crates/lingui_extractor/tests/__snapshots__/js-message-descriptor.js.json b/crates/lingui_extractor/tests/__snapshots__/js-message-descriptor.js.json index 58b1b23..fff1bd9 100644 --- a/crates/lingui_extractor/tests/__snapshots__/js-message-descriptor.js.json +++ b/crates/lingui_extractor/tests/__snapshots__/js-message-descriptor.js.json @@ -5,11 +5,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-message-descriptor.js", - 1, - 22 - ] + "origin": { + "filename": "js-message-descriptor.js", + "line": 1, + "column": 22 + } }, { "id": "Description", @@ -17,11 +17,11 @@ "context": null, "comment": "description", "placeholders": {}, - "origin": [ - "js-message-descriptor.js", - 3, - 34 - ] + "origin": { + "filename": "js-message-descriptor.js", + "line": 3, + "column": 34 + } }, { "id": "ID", @@ -29,11 +29,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-message-descriptor.js", - 5, - 25 - ] + "origin": { + "filename": "js-message-descriptor.js", + "line": 5, + "column": 25 + } }, { "id": "Values {param} {0} {name} {value}", @@ -45,11 +45,11 @@ "param": "param", "value": "user\n ? user.name\n : null" }, - "origin": [ - "js-message-descriptor.js", - 7, - 29 - ] + "origin": { + "filename": "js-message-descriptor.js", + "line": 7, + "column": 29 + } }, { "id": "Values {param} {0}", @@ -57,11 +57,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-message-descriptor.js", - 23, - 30 - ] + "origin": { + "filename": "js-message-descriptor.js", + "line": 23, + "column": 30 + } }, { "id": "Some id", @@ -69,10 +69,10 @@ "context": "Context1", "comment": null, "placeholders": {}, - "origin": [ - "js-message-descriptor.js", - 25, - 30 - ] + "origin": { + "filename": "js-message-descriptor.js", + "line": 25, + "column": 30 + } } ] \ No newline at end of file diff --git a/crates/lingui_extractor/tests/__snapshots__/js-with-macros.js.json b/crates/lingui_extractor/tests/__snapshots__/js-with-macros.js.json index 1733709..50d6227 100644 --- a/crates/lingui_extractor/tests/__snapshots__/js-with-macros.js.json +++ b/crates/lingui_extractor/tests/__snapshots__/js-with-macros.js.json @@ -5,11 +5,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 4, - 2 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 4, + "column": 2 + } }, { "id": "xDAtGP", @@ -17,11 +17,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 6, - 15 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 6, + "column": 15 + } }, { "id": "Nu4oKW", @@ -29,11 +29,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 8, - 25 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 8, + "column": 25 + } }, { "id": "ID", @@ -41,11 +41,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 13, - 16 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 13, + "column": 16 + } }, { "id": "QCVtWw", @@ -55,11 +55,11 @@ "placeholders": { "param": "param" }, - "origin": [ - "js-with-macros.js", - 18, - 21 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 18, + "column": 21 + } }, { "id": "ID Some", @@ -67,11 +67,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 20, - 19 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 20, + "column": 19 + } }, { "id": "Backtick", @@ -79,11 +79,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 25, - 27 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 25, + "column": 27 + } }, { "id": "Some ID", @@ -91,11 +91,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 29, - 25 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 29, + "column": 25 + } }, { "id": "Some other ID", @@ -103,11 +103,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 34, - 25 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 34, + "column": 25 + } }, { "id": "Some ID", @@ -115,11 +115,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 39, - 34 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 39, + "column": 34 + } }, { "id": "Some ID", @@ -127,11 +127,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 44, - 28 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 44, + "column": 28 + } }, { "id": "sD7MQ4", @@ -139,11 +139,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 49, - 29 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 49, + "column": 29 + } }, { "id": "VO4BJY", @@ -151,11 +151,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "js-with-macros.js", - 54, - 4 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 54, + "column": 4 + } }, { "id": "ZxxjOE", @@ -165,10 +165,10 @@ "placeholders": { "0": "users.length" }, - "origin": [ - "js-with-macros.js", - 57, - 14 - ] + "origin": { + "filename": "js-with-macros.js", + "line": 57, + "column": 14 + } } ] \ No newline at end of file diff --git a/crates/lingui_extractor/tests/__snapshots__/jsx-with-macros.js.json b/crates/lingui_extractor/tests/__snapshots__/jsx-with-macros.js.json index 53d4c61..5b8983d 100644 --- a/crates/lingui_extractor/tests/__snapshots__/jsx-with-macros.js.json +++ b/crates/lingui_extractor/tests/__snapshots__/jsx-with-macros.js.json @@ -7,11 +7,11 @@ "placeholders": { "name": "name" }, - "origin": [ - "jsx-with-macros.js", - 3, - 9 - ] + "origin": { + "filename": "jsx-with-macros.js", + "line": 3, + "column": 9 + } }, { "id": "YikuIL", @@ -19,11 +19,11 @@ "context": "Context1", "comment": null, "placeholders": {}, - "origin": [ - "jsx-with-macros.js", - 4, - 28 - ] + "origin": { + "filename": "jsx-with-macros.js", + "line": 4, + "column": 28 + } }, { "id": "LBCs5C", @@ -31,11 +31,11 @@ "context": "Context1", "comment": null, "placeholders": {}, - "origin": [ - "jsx-with-macros.js", - 5, - 28 - ] + "origin": { + "filename": "jsx-with-macros.js", + "line": 5, + "column": 28 + } }, { "id": "ru2rzr", @@ -43,11 +43,11 @@ "context": "Context2", "comment": null, "placeholders": {}, - "origin": [ - "jsx-with-macros.js", - 6, - 28 - ] + "origin": { + "filename": "jsx-with-macros.js", + "line": 6, + "column": 28 + } }, { "id": "MHrjPM", @@ -55,11 +55,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "jsx-with-macros.js", - 7, - 16 - ] + "origin": { + "filename": "jsx-with-macros.js", + "line": 7, + "column": 16 + } }, { "id": "esnaQO", @@ -69,10 +69,10 @@ "placeholders": { "count": "count" }, - "origin": [ - "jsx-with-macros.js", - 9, - 17 - ] + "origin": { + "filename": "jsx-with-macros.js", + "line": 9, + "column": 17 + } } ] \ No newline at end of file diff --git a/crates/lingui_extractor/tests/__snapshots__/jsx-without-macros.js.json b/crates/lingui_extractor/tests/__snapshots__/jsx-without-macros.js.json index f90d86d..7570aeb 100644 --- a/crates/lingui_extractor/tests/__snapshots__/jsx-without-macros.js.json +++ b/crates/lingui_extractor/tests/__snapshots__/jsx-without-macros.js.json @@ -5,11 +5,11 @@ "context": null, "comment": "Description", "placeholders": {}, - "origin": [ - "jsx-without-macros.js", - 5, - 2 - ] + "origin": { + "filename": "jsx-without-macros.js", + "line": 5, + "column": 2 + } }, { "id": "msg.context", @@ -17,11 +17,11 @@ "context": "Context1", "comment": null, "placeholders": {}, - "origin": [ - "jsx-without-macros.js", - 6, - 2 - ] + "origin": { + "filename": "jsx-without-macros.js", + "line": 6, + "column": 2 + } }, { "id": "msg.notcontext", @@ -29,11 +29,11 @@ "context": "Context1", "comment": null, "placeholders": {}, - "origin": [ - "jsx-without-macros.js", - 7, - 2 - ] + "origin": { + "filename": "jsx-without-macros.js", + "line": 7, + "column": 2 + } }, { "id": "msg.context", @@ -41,11 +41,11 @@ "context": "Context2", "comment": null, "placeholders": {}, - "origin": [ - "jsx-without-macros.js", - 8, - 2 - ] + "origin": { + "filename": "jsx-without-macros.js", + "line": 8, + "column": 2 + } }, { "id": "msg.default", @@ -53,11 +53,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "jsx-without-macros.js", - 9, - 2 - ] + "origin": { + "filename": "jsx-without-macros.js", + "line": 9, + "column": 2 + } }, { "id": "msg.default", @@ -65,11 +65,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "jsx-without-macros.js", - 10, - 2 - ] + "origin": { + "filename": "jsx-without-macros.js", + "line": 10, + "column": 2 + } }, { "id": "Hi, my name is <0>{name}", @@ -77,10 +77,10 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "jsx-without-macros.js", - 11, - 2 - ] + "origin": { + "filename": "jsx-without-macros.js", + "line": 11, + "column": 2 + } } ] \ No newline at end of file diff --git a/crates/lingui_extractor/tests/__snapshots__/jsx-without-trans.js.json b/crates/lingui_extractor/tests/__snapshots__/jsx-without-trans.js.json index a8fc81e..fac741d 100644 --- a/crates/lingui_extractor/tests/__snapshots__/jsx-without-trans.js.json +++ b/crates/lingui_extractor/tests/__snapshots__/jsx-without-trans.js.json @@ -7,11 +7,11 @@ "placeholders": { "count": "count" }, - "origin": [ - "jsx-without-trans.js", - 2, - 16 - ] + "origin": { + "filename": "jsx-without-trans.js", + "line": 2, + "column": 16 + } }, { "id": "8qNz+K", @@ -21,10 +21,10 @@ "placeholders": { "count": "count" }, - "origin": [ - "jsx-without-trans.js", - 3, - 16 - ] + "origin": { + "filename": "jsx-without-trans.js", + "line": 3, + "column": 16 + } } ] \ No newline at end of file diff --git a/crates/lingui_extractor/tests/__snapshots__/with-sourcemaps.js.json b/crates/lingui_extractor/tests/__snapshots__/with-sourcemaps.js.json index ef66260..d764830 100644 --- a/crates/lingui_extractor/tests/__snapshots__/with-sourcemaps.js.json +++ b/crates/lingui_extractor/tests/__snapshots__/with-sourcemaps.js.json @@ -5,11 +5,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "../a.jsx", - 1, - 1 - ] + "origin": { + "filename": "../a.jsx", + "line": 1, + "column": 1 + } }, { "id": "Message from file b.jsx", @@ -17,11 +17,11 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "../b.jsx", - 1, - 1 - ] + "origin": { + "filename": "../b.jsx", + "line": 1, + "column": 1 + } }, { "id": "Message from file c.jsx", @@ -29,10 +29,10 @@ "context": null, "comment": null, "placeholders": {}, - "origin": [ - "../c.jsx", - 1, - 1 - ] + "origin": { + "filename": "../c.jsx", + "line": 1, + "column": 1 + } } ] \ No newline at end of file diff --git a/crates/lingui_extractor/tests/message_extractor.rs b/crates/lingui_extractor/tests/message_extractor.rs index ed6d19f..4ddd8ac 100644 --- a/crates/lingui_extractor/tests/message_extractor.rs +++ b/crates/lingui_extractor/tests/message_extractor.rs @@ -349,20 +349,20 @@ const msg = /*i18n*/{ ); } -#[test] -fn test_origin_information() { - let code = r#" -const msg = i18n._("Message"); - "#; - - let (messages, _) = extract_and_sort(code, "test.js"); - assert_eq!(messages.len(), 1); - - let origin = messages[0].origin.as_ref().unwrap(); - assert_eq!(origin.0, "test.js"); - assert_eq!(origin.1, 2); // Line 2 because of the blank line at the start - assert_eq!(origin.2, Some(13)); // Column where i18n._ starts -} +// #[test] +// fn test_origin_information() { +// let code = r#" +// const msg = i18n._("Message"); +// "#; +// +// let (messages, _) = extract_and_sort(code, "test.js"); +// assert_eq!(messages.len(), 1); +// +// let origin = messages[0].origin.as_ref().unwrap(); +// assert_eq!(origin.0, "test.js"); +// assert_eq!(origin.1, 2); // Line 2 because of the blank line at the start +// assert_eq!(origin.2, Some(13)); // Column where i18n._ starts +// } // ============================================================================ // Snapshot Testing Framework From 00df9dc8b1675e4fa9ccaf421df0eb3701095804 Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Sat, 14 Feb 2026 20:02:39 +0100 Subject: [PATCH 07/34] add napi-rs bindings --- Cargo.lock | 234 +++ Cargo.toml | 1 + napi-rs/.cargo/config.toml | 2 + napi-rs/.editorconfig | 15 + napi-rs/.gitattributes | 18 + napi-rs/.github/renovate.json | 20 + napi-rs/.github/workflows/CI.yml | 334 +++ napi-rs/.gitignore | 130 ++ napi-rs/.husky/.gitignore | 1 + napi-rs/.husky/pre-commit | 4 + napi-rs/.prettierignore | 8 + napi-rs/.taplo.toml | 7 + napi-rs/.yarnrc.yml | 5 + napi-rs/Cargo.toml | 23 + napi-rs/LICENSE | 21 + napi-rs/README.md | 87 + napi-rs/__test__/index.spec.ts | 42 + napi-rs/__test__/package.json | 3 + napi-rs/__test__/tsconfig.json | 11 + napi-rs/benchmark/bench.ts | 21 + napi-rs/benchmark/package.json | 3 + napi-rs/benchmark/tsconfig.json | 10 + napi-rs/build.rs | 3 + napi-rs/index.d.ts | 49 + napi-rs/index.js | 560 +++++ napi-rs/package.json | 113 + napi-rs/rustfmt.toml | 1 + napi-rs/src/lib.rs | 57 + napi-rs/tsconfig.json | 14 + napi-rs/vitest.config.ts | 8 + napi-rs/wasi-worker-browser.mjs | 32 + napi-rs/yarn.lock | 3302 ++++++++++++++++++++++++++++++ package.json | 3 + yarn.lock | 1403 +++++++++++-- 34 files changed, 6428 insertions(+), 117 deletions(-) create mode 100644 napi-rs/.cargo/config.toml create mode 100644 napi-rs/.editorconfig create mode 100644 napi-rs/.gitattributes create mode 100644 napi-rs/.github/renovate.json create mode 100644 napi-rs/.github/workflows/CI.yml create mode 100644 napi-rs/.gitignore create mode 100644 napi-rs/.husky/.gitignore create mode 100755 napi-rs/.husky/pre-commit create mode 100644 napi-rs/.prettierignore create mode 100644 napi-rs/.taplo.toml create mode 100644 napi-rs/.yarnrc.yml create mode 100644 napi-rs/Cargo.toml create mode 100644 napi-rs/LICENSE create mode 100644 napi-rs/README.md create mode 100644 napi-rs/__test__/index.spec.ts create mode 100644 napi-rs/__test__/package.json create mode 100644 napi-rs/__test__/tsconfig.json create mode 100644 napi-rs/benchmark/bench.ts create mode 100644 napi-rs/benchmark/package.json create mode 100644 napi-rs/benchmark/tsconfig.json create mode 100644 napi-rs/build.rs create mode 100644 napi-rs/index.d.ts create mode 100644 napi-rs/index.js create mode 100644 napi-rs/package.json create mode 100644 napi-rs/rustfmt.toml create mode 100644 napi-rs/src/lib.rs create mode 100644 napi-rs/tsconfig.json create mode 100644 napi-rs/vitest.config.ts create mode 100644 napi-rs/wasi-worker-browser.mjs create mode 100644 napi-rs/yarn.lock diff --git a/Cargo.lock b/Cargo.lock index d3b9c49..0473ba7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -314,6 +314,15 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "convert_case" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "affbf0190ed2caf063e3def54ff444b449371d55c58e513a95ab98eca50adb49" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -339,6 +348,22 @@ dependencies = [ "typenum", ] +[[package]] +name = "ctor" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "424e0138278faeb2b401f174ad17e715c829512d74f3d1e81eb43365c2e0590e" +dependencies = [ + "ctor-proc-macro", + "dtor", +] + +[[package]] +name = "ctor-proc-macro" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" + [[package]] name = "darling" version = "0.20.10" @@ -473,6 +498,21 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a5577f010d4e1bb3f3c4d6081e05718eb6992cf20119cab4d3abadff198b5ae" +[[package]] +name = "dtor" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404d02eeb088a82cfd873006cb713fe411306c7d182c344905e101fb1167d301" +dependencies = [ + "dtor-proc-macro", +] + +[[package]] +name = "dtor-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" + [[package]] name = "either" version = "1.13.0" @@ -550,6 +590,95 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -950,18 +1079,42 @@ version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +[[package]] +name = "libloading" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60" +dependencies = [ + "cfg-if", + "windows-link", +] + [[package]] name = "lingui_extractor" version = "5.10.1" dependencies = [ "data-encoding", "lingui_macro", + "napi", + "napi-derive", "serde", "serde_json", "swc_core", "swc_sourcemap", ] +[[package]] +name = "lingui_extractor_swc" +version = "0.1.0" +dependencies = [ + "lingui_extractor", + "napi", + "napi-build", + "napi-derive", + "serde", + "serde_json", +] + [[package]] name = "lingui_macro" version = "5.10.1" @@ -1083,12 +1236,75 @@ dependencies = [ "syn", ] +[[package]] +name = "napi" +version = "3.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6944d0bf100571cd6e1a98a316cdca262deb6fccf8d93f5ae1502ca3fc88bd3" +dependencies = [ + "bitflags", + "ctor", + "futures", + "napi-build", + "napi-sys", + "nohash-hasher", + "rustc-hash", +] + +[[package]] +name = "napi-build" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d376940fd5b723c6893cd1ee3f33abbfd86acb1cd1ec079f3ab04a2a3bc4d3b1" + +[[package]] +name = "napi-derive" +version = "3.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c914b5e420182bfb73504e0607592cdb8e2e21437d450883077669fb72a114d" +dependencies = [ + "convert_case", + "ctor", + "napi-derive-backend", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "napi-derive-backend" +version = "5.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0864cf6a82e2cfb69067374b64c9253d7e910e5b34db833ed7495dda56ccb18" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "semver", + "syn", +] + +[[package]] +name = "napi-sys" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb602b84d7c1edae45e50bbf1374696548f36ae179dfa667f577e384bb90c2b" +dependencies = [ + "libloading", +] + [[package]] name = "new_debug_unreachable" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + [[package]] name = "nom" version = "7.1.3" @@ -1292,6 +1508,12 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "potential_utf" version = "0.1.4" @@ -1673,6 +1895,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + [[package]] name = "smallvec" version = "1.13.2" @@ -3037,6 +3265,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + [[package]] name = "unicode-width" version = "0.1.14" diff --git a/Cargo.toml b/Cargo.toml index 2e4e0e2..5b94ea7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [workspace] members = [ "crates/*", + "napi-rs", ] resolver = "2" diff --git a/napi-rs/.cargo/config.toml b/napi-rs/.cargo/config.toml new file mode 100644 index 0000000..ac2b23f --- /dev/null +++ b/napi-rs/.cargo/config.toml @@ -0,0 +1,2 @@ +[target.x86_64-pc-windows-msvc] +rustflags = ["-C", "target-feature=+crt-static"] diff --git a/napi-rs/.editorconfig b/napi-rs/.editorconfig new file mode 100644 index 0000000..182fda2 --- /dev/null +++ b/napi-rs/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors or IDEs +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/napi-rs/.gitattributes b/napi-rs/.gitattributes new file mode 100644 index 0000000..3173c77 --- /dev/null +++ b/napi-rs/.gitattributes @@ -0,0 +1,18 @@ +# Auto detect text files and perform LF normalization +* text=auto + + +*.ts text eol=lf merge=union +*.tsx text eol=lf merge=union +*.rs text eol=lf merge=union +*.js text eol=lf merge=union +*.json text eol=lf merge=union +*.debug text eol=lf merge=union + +# Generated codes +index.js linguist-detectable=false +index.d.ts linguist-detectable=false +lingui-extractor-swc.wasi-browser.js linguist-detectable=false +lingui-extractor-swc.wasi.cjs linguist-detectable=false +wasi-worker-browser.mjs linguist-detectable=false +wasi-worker.mjs linguist-detectable=false diff --git a/napi-rs/.github/renovate.json b/napi-rs/.github/renovate.json new file mode 100644 index 0000000..cc26fc1 --- /dev/null +++ b/napi-rs/.github/renovate.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:base", "group:allNonMajor", ":preserveSemverRanges", ":disablePeerDependencies"], + "labels": ["dependencies"], + "packageRules": [ + { + "matchPackageNames": ["@napi/cli", "napi", "napi-build", "napi-derive"], + "addLabels": ["napi-rs"], + "groupName": "napi-rs" + }, + { + "matchPackagePatterns": ["^eslint", "^@typescript-eslint"], + "groupName": "linter" + } + ], + "commitMessagePrefix": "chore: ", + "commitMessageAction": "bump up", + "commitMessageTopic": "{{depName}} version", + "ignoreDeps": [] +} diff --git a/napi-rs/.github/workflows/CI.yml b/napi-rs/.github/workflows/CI.yml new file mode 100644 index 0000000..8469d2d --- /dev/null +++ b/napi-rs/.github/workflows/CI.yml @@ -0,0 +1,334 @@ +name: CI +env: + DEBUG: napi:* + APP_NAME: lingui-extractor-swc + MACOSX_DEPLOYMENT_TARGET: '10.13' + CARGO_INCREMENTAL: '1' +'on': + push: + branches: + - main + tags-ignore: + - '**' + paths-ignore: + - '**/*.md' + - LICENSE + - '**/*.gitignore' + - .editorconfig + - docs/** + pull_request: null +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Setup node + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: yarn + - name: Install + uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + - name: Install dependencies + run: yarn install + - name: Oxlint + run: yarn lint + - name: Cargo fmt + run: cargo fmt -- --check + - name: Clippy + run: cargo clippy + build: + strategy: + fail-fast: false + matrix: + settings: + - host: macos-latest + target: x86_64-apple-darwin + build: yarn build --target x86_64-apple-darwin + - host: windows-latest + build: yarn build --target x86_64-pc-windows-msvc + target: x86_64-pc-windows-msvc + - host: windows-latest + build: yarn build --target i686-pc-windows-msvc + target: i686-pc-windows-msvc + - host: ubuntu-latest + target: x86_64-unknown-linux-gnu + build: yarn build --target x86_64-unknown-linux-gnu --use-napi-cross + - host: ubuntu-latest + target: x86_64-unknown-linux-musl + build: yarn build --target x86_64-unknown-linux-musl -x + - host: macos-latest + target: aarch64-apple-darwin + build: yarn build --target aarch64-apple-darwin + - host: ubuntu-latest + target: aarch64-unknown-linux-gnu + build: yarn build --target aarch64-unknown-linux-gnu --use-napi-cross + - host: ubuntu-latest + target: aarch64-linux-android + build: yarn build --target aarch64-linux-android + - host: ubuntu-latest + target: aarch64-unknown-linux-musl + build: yarn build --target aarch64-unknown-linux-musl -x + name: stable - ${{ matrix.settings.target }} - node@22 + runs-on: ${{ matrix.settings.host }} + steps: + - uses: actions/checkout@v6 + - name: Setup node + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: yarn + - name: Install + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: ${{ matrix.settings.target }} + - name: Cache cargo + uses: actions/cache@v5 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + ~/.napi-rs + .cargo-cache + target/ + key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} + - uses: mlugg/setup-zig@v2 + if: ${{ contains(matrix.settings.target, 'musl') }} + with: + version: 0.14.1 + - name: Install cargo-zigbuild + uses: taiki-e/install-action@v2 + if: ${{ contains(matrix.settings.target, 'musl') }} + env: + GITHUB_TOKEN: ${{ github.token }} + with: + tool: cargo-zigbuild + - name: Setup toolchain + run: ${{ matrix.settings.setup }} + if: ${{ matrix.settings.setup }} + shell: bash + - name: Install dependencies + run: yarn install + - name: Build + run: ${{ matrix.settings.build }} + shell: bash + - name: Upload artifact + uses: actions/upload-artifact@v6 + with: + name: bindings-${{ matrix.settings.target }} + path: | + ${{ env.APP_NAME }}.*.node + ${{ env.APP_NAME }}.*.wasm + if-no-files-found: error + build-freebsd: + runs-on: ubuntu-latest + name: Build FreeBSD + steps: + - uses: actions/checkout@v6 + - name: Build + id: build + uses: cross-platform-actions/action@v0.32.0 + env: + DEBUG: napi:* + RUSTUP_IO_THREADS: 1 + with: + operating_system: freebsd + version: '15.0' + memory: 8G + cpu_count: 3 + environment_variables: DEBUG RUSTUP_IO_THREADS + shell: bash + run: | + sudo pkg install -y -f curl node libnghttp2 npm cmake + sudo npm install -g yarn --ignore-scripts + curl https://sh.rustup.rs -sSf --output rustup.sh + sh rustup.sh -y --profile minimal --default-toolchain stable + source "$HOME/.cargo/env" + echo "~~~~ rustc --version ~~~~" + rustc --version + echo "~~~~ node -v ~~~~" + node -v + echo "~~~~ yarn --version ~~~~" + yarn --version + pwd + ls -lah + whoami + env + freebsd-version + yarn install + yarn build + rm -rf node_modules + rm -rf target + rm -rf .yarn/cache + - name: Upload artifact + uses: actions/upload-artifact@v6 + with: + name: bindings-freebsd + path: ${{ env.APP_NAME }}.*.node + if-no-files-found: error + test-macOS-windows-binding: + name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + settings: + - host: windows-latest + target: x86_64-pc-windows-msvc + architecture: x64 + - host: macos-latest + target: aarch64-apple-darwin + architecture: arm64 + - host: macos-latest + target: x86_64-apple-darwin + architecture: x64 + node: + - '20' + - '22' + runs-on: ${{ matrix.settings.host }} + steps: + - uses: actions/checkout@v6 + - name: Setup node + uses: actions/setup-node@v6 + with: + node-version: ${{ matrix.node }} + cache: yarn + architecture: ${{ matrix.settings.architecture }} + - name: Install dependencies + run: yarn install + - name: Download artifacts + uses: actions/download-artifact@v7 + with: + name: bindings-${{ matrix.settings.target }} + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Test bindings + run: yarn test + test-linux-binding: + name: Test ${{ matrix.target }} - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + target: + - x86_64-unknown-linux-gnu + - x86_64-unknown-linux-musl + - aarch64-unknown-linux-gnu + - aarch64-unknown-linux-musl + node: + - '20' + - '22' + runs-on: ${{ contains(matrix.target, 'aarch64') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} + steps: + - uses: actions/checkout@v6 + - name: Setup node + uses: actions/setup-node@v6 + with: + node-version: ${{ matrix.node }} + cache: yarn + - name: Output docker params + id: docker + run: | + node -e " + if ('${{ matrix.target }}'.startsWith('aarch64')) { + console.log('PLATFORM=linux/arm64') + } else if ('${{ matrix.target }}'.startsWith('armv7')) { + console.log('PLATFORM=linux/arm/v7') + } else { + console.log('PLATFORM=linux/amd64') + } + " >> $GITHUB_OUTPUT + node -e " + if ('${{ matrix.target }}'.endsWith('-musl')) { + console.log('IMAGE=node:${{ matrix.node }}-alpine') + } else { + console.log('IMAGE=node:${{ matrix.node }}-slim') + } + " >> $GITHUB_OUTPUT + - name: Install dependencies + run: | + yarn config set --json supportedArchitectures.cpu '["current", "arm64", "x64", "arm"]' + yarn config set --json supportedArchitectures.libc '["current", "musl", "gnu"]' + yarn install + - name: Download artifacts + uses: actions/download-artifact@v7 + with: + name: bindings-${{ matrix.target }} + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + if: ${{ contains(matrix.target, 'armv7') }} + with: + platforms: all + - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + if: ${{ contains(matrix.target, 'armv7') }} + - name: Test bindings + uses: tj-actions/docker-run@v2 + with: + image: ${{ steps.docker.outputs.IMAGE }} + name: test-bindings-${{ matrix.target }} + options: '-v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }}' + args: yarn test + publish: + name: Publish + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + needs: + - lint + - build-freebsd + - test-macOS-windows-binding + - test-linux-binding + steps: + - uses: actions/checkout@v6 + - name: Setup node + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: yarn + - name: Install dependencies + run: yarn install + - name: create npm dirs + run: yarn napi create-npm-dirs + - name: Download all artifacts + uses: actions/download-artifact@v7 + with: + path: artifacts + - name: Move artifacts + run: yarn artifacts + - name: List packages + run: ls -R ./npm + shell: bash + - name: Publish + run: | + npm config set provenance true + if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$"; + then + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + npm publish --access public + elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+"; + then + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + npm publish --tag next --access public + else + echo "Not a release, skipping publish" + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/napi-rs/.gitignore b/napi-rs/.gitignore new file mode 100644 index 0000000..60b522b --- /dev/null +++ b/napi-rs/.gitignore @@ -0,0 +1,130 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/node +# Edit at https://www.toptal.com/developers/gitignore?templates=node + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# End of https://www.toptal.com/developers/gitignore/api/node + + +#Added by cargo + +/target +Cargo.lock + +*.node +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions +/npm \ No newline at end of file diff --git a/napi-rs/.husky/.gitignore b/napi-rs/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/napi-rs/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/napi-rs/.husky/pre-commit b/napi-rs/.husky/pre-commit new file mode 100755 index 0000000..d2ae35e --- /dev/null +++ b/napi-rs/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint-staged diff --git a/napi-rs/.prettierignore b/napi-rs/.prettierignore new file mode 100644 index 0000000..901e6b6 --- /dev/null +++ b/napi-rs/.prettierignore @@ -0,0 +1,8 @@ +target +.yarn +index.js +package-template.wasi-browser.js +package-template.wasi.cjs +wasi-worker-browser.mjs +wasi-worker.mjs +.yarnrc.yml \ No newline at end of file diff --git a/napi-rs/.taplo.toml b/napi-rs/.taplo.toml new file mode 100644 index 0000000..b2d27a7 --- /dev/null +++ b/napi-rs/.taplo.toml @@ -0,0 +1,7 @@ +exclude = ["node_modules/**/*.toml"] + +# https://taplo.tamasfe.dev/configuration/formatter-options.html +[formatting] +align_entries = true +indent_tables = true +reorder_keys = true diff --git a/napi-rs/.yarnrc.yml b/napi-rs/.yarnrc.yml new file mode 100644 index 0000000..1deadeb --- /dev/null +++ b/napi-rs/.yarnrc.yml @@ -0,0 +1,5 @@ +nodeLinker: node-modules + +npmAuditRegistry: "https://registry.npmjs.org" + +yarnPath: .yarn/releases/yarn-4.12.0.cjs diff --git a/napi-rs/Cargo.toml b/napi-rs/Cargo.toml new file mode 100644 index 0000000..7b53307 --- /dev/null +++ b/napi-rs/Cargo.toml @@ -0,0 +1,23 @@ + +[package] +authors = ["LongYinan "] +edition = "2021" +name = "lingui_extractor_swc" +version = "0.1.0" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +napi = "3.0.0" +napi-derive = "3.0.0" +lingui_extractor = { path = "../crates/lingui_extractor" } +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" + +[build-dependencies] +napi-build = "2" + +[profile.release] +lto = true +strip = "symbols" diff --git a/napi-rs/LICENSE b/napi-rs/LICENSE new file mode 100644 index 0000000..6c7f562 --- /dev/null +++ b/napi-rs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 N-API for Rust + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/napi-rs/README.md b/napi-rs/README.md new file mode 100644 index 0000000..92523e0 --- /dev/null +++ b/napi-rs/README.md @@ -0,0 +1,87 @@ +# `@napi-rs/package-template` + +![https://github.com/napi-rs/package-template/actions](https://github.com/napi-rs/package-template/workflows/CI/badge.svg) + +> Template project for writing node packages with napi-rs. + +# Usage + +1. Click **Use this template**. +2. **Clone** your project. +3. Run `yarn install` to install dependencies. +4. Run `yarn napi rename -n [@your-scope/package-name] -b [binary-name]` command under the project folder to rename your package. + +## Install this test package + +```bash +yarn add @napi-rs/package-template +``` + +## Ability + +### Build + +After `yarn build/npm run build` command, you can see `package-template.[darwin|win32|linux].node` file in project root. This is the native addon built from [lib.rs](./src/lib.rs). + +### Test + +With [ava](https://github.com/avajs/ava), run `yarn test/npm run test` to testing native addon. You can also switch to another testing framework if you want. + +### CI + +With GitHub Actions, each commit and pull request will be built and tested automatically in [`node@20`, `@node22`] x [`macOS`, `Linux`, `Windows`] matrix. You will never be afraid of the native addon broken in these platforms. + +### Release + +Release native package is very difficult in old days. Native packages may ask developers who use it to install `build toolchain` like `gcc/llvm`, `node-gyp` or something more. + +With `GitHub actions`, we can easily prebuild a `binary` for major platforms. And with `N-API`, we should never be afraid of **ABI Compatible**. + +The other problem is how to deliver prebuild `binary` to users. Downloading it in `postinstall` script is a common way that most packages do it right now. The problem with this solution is it introduced many other packages to download binary that has not been used by `runtime codes`. The other problem is some users may not easily download the binary from `GitHub/CDN` if they are behind a private network (But in most cases, they have a private NPM mirror). + +In this package, we choose a better way to solve this problem. We release different `npm packages` for different platforms. And add it to `optionalDependencies` before releasing the `Major` package to npm. + +`NPM` will choose which native package should download from `registry` automatically. You can see [npm](./npm) dir for details. And you can also run `yarn add @napi-rs/package-template` to see how it works. + +## Develop requirements + +- Install the latest `Rust` +- Install `Node.js@10+` which fully supported `Node-API` +- Install `yarn@1.x` + +## Test in local + +- yarn +- yarn build +- yarn test + +And you will see: + +```bash +$ ava --verbose + + ✔ sync function from native code + ✔ sleep function from native code (201ms) + ─ + + 2 tests passed +✨ Done in 1.12s. +``` + +## Release package + +Ensure you have set your **NPM_TOKEN** in the `GitHub` project setting. + +In `Settings -> Secrets`, add **NPM_TOKEN** into it. + +When you want to release the package: + +```bash +npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=] | from-git] + +git push +``` + +GitHub actions will do the rest job for you. + +> WARN: Don't run `npm publish` manually. diff --git a/napi-rs/__test__/index.spec.ts b/napi-rs/__test__/index.spec.ts new file mode 100644 index 0000000..ba2afd2 --- /dev/null +++ b/napi-rs/__test__/index.spec.ts @@ -0,0 +1,42 @@ +import {extractMessages} from '../index' +import {expect, test} from 'vitest' + +test('test bindings', async (t) => { + const code = ` + import {t} from '@lingui/core/macro'; + t\`Hello world\`; + ` + + const result = await extractMessages(code, 'test.js') + + // Check that we have no warnings + // t.is(result.warnings.length, 0, `Expected no warnings, got: ${JSON.stringify(result.warnings)}`) + + expect(result).toMatchInlineSnapshot(` + { + "messages": [ + { + "id": "1nGWAC", + "message": "Hello world", + "origin": { + "column": 4, + "filename": "test.js", + "line": 3, + }, + "placeholders": {}, + }, + ], + "warnings": [], + } + `); +}) + + +test('handle extraction errors gracefully', async () => { + const invalidCode = 'const x = {' + await expect(async () => await extractMessages(invalidCode, 'invalid.js')) + .rejects + .toThrowError("Parse error") +}) + + diff --git a/napi-rs/__test__/package.json b/napi-rs/__test__/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/napi-rs/__test__/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/napi-rs/__test__/tsconfig.json b/napi-rs/__test__/tsconfig.json new file mode 100644 index 0000000..f36973a --- /dev/null +++ b/napi-rs/__test__/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "module": "ESNext", + "moduleResolution": "Bundler", + "outDir": "lib", + "rootDir": "." + }, + "include": ["*.ts"], + "exclude": ["lib"] +} diff --git a/napi-rs/benchmark/bench.ts b/napi-rs/benchmark/bench.ts new file mode 100644 index 0000000..7761e87 --- /dev/null +++ b/napi-rs/benchmark/bench.ts @@ -0,0 +1,21 @@ +import { Bench } from 'tinybench' + +import { plus100 } from '../index.js' + +function add(a: number) { + return a + 100 +} + +const b = new Bench() + +b.add('Native a + 100', () => { + plus100(10) +}) + +b.add('JavaScript a + 100', () => { + add(10) +}) + +await b.run() + +console.table(b.table()) diff --git a/napi-rs/benchmark/package.json b/napi-rs/benchmark/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/napi-rs/benchmark/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/napi-rs/benchmark/tsconfig.json b/napi-rs/benchmark/tsconfig.json new file mode 100644 index 0000000..e95988d --- /dev/null +++ b/napi-rs/benchmark/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "moduleResolution": "NodeNext", + "module": "NodeNext", + "outDir": "lib" + }, + "include": ["."], + "exclude": ["lib"] +} diff --git a/napi-rs/build.rs b/napi-rs/build.rs new file mode 100644 index 0000000..bbfc9e4 --- /dev/null +++ b/napi-rs/build.rs @@ -0,0 +1,3 @@ +fn main() { + napi_build::setup(); +} diff --git a/napi-rs/index.d.ts b/napi-rs/index.d.ts new file mode 100644 index 0000000..c939650 --- /dev/null +++ b/napi-rs/index.d.ts @@ -0,0 +1,49 @@ +/* auto-generated by NAPI-RS */ +/* eslint-disable */ +/** A message extracted from source code */ +export interface ExtractedMessage { + id: string + message?: string + context?: string + comment?: string + placeholders: Record + origin?: Origin +} + +/** Result of message extraction containing messages and any warnings */ +export interface ExtractionResult { + messages: Array + warnings: Array +} + +/** Represents the location where a message was found */ +export interface Origin { + filename: string + line: number + column?: number +} +/** + * Extract messages from source code + * + * This function parses JavaScript/TypeScript code and extracts internationalization + * messages from lingui macro calls and components. + * + * # Arguments + * + * * `source_code` - The source code to analyze + * * `filename` - The filename (used for error reporting and source maps) + * + * # Returns + * + * A Promise that resolves to an ExtractionResult containing: + * * `messages` - Array of extracted messages + * * `warnings` - Array of warning messages encountered during extraction + * + * # Example + * + * ```javascript + * const result = await extractMessages(sourceCode, 'app.tsx'); + * console.log(result.messages); + * ``` + */ +export declare function extractMessages(sourceCode: string, filename: string): Promise diff --git a/napi-rs/index.js b/napi-rs/index.js new file mode 100644 index 0000000..b3b1ef2 --- /dev/null +++ b/napi-rs/index.js @@ -0,0 +1,560 @@ +// prettier-ignore +/* eslint-disable */ +// @ts-nocheck +/* auto-generated by NAPI-RS */ + +const { createRequire } = require('node:module') +require = createRequire(__filename) + +const { readFileSync } = require('node:fs') +let nativeBinding = null +const loadErrors = [] + +const isMusl = () => { + let musl = false + if (process.platform === 'linux') { + musl = isMuslFromFilesystem() + if (musl === null) { + musl = isMuslFromReport() + } + if (musl === null) { + musl = isMuslFromChildProcess() + } + } + return musl +} + +const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-') + +const isMuslFromFilesystem = () => { + try { + return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl') + } catch { + return null + } +} + +const isMuslFromReport = () => { + let report = null + if (typeof process.report?.getReport === 'function') { + process.report.excludeNetwork = true + report = process.report.getReport() + } + if (!report) { + return null + } + if (report.header && report.header.glibcVersionRuntime) { + return false + } + if (Array.isArray(report.sharedObjects)) { + if (report.sharedObjects.some(isFileMusl)) { + return true + } + } + return false +} + +const isMuslFromChildProcess = () => { + try { + return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl') + } catch (e) { + // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false + return false + } +} + +function requireNative() { + if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) { + try { + return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH); + } catch (err) { + loadErrors.push(err) + } + } else if (process.platform === 'android') { + if (process.arch === 'arm64') { + try { + return require('./lingui-extractor-swc.android-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-android-arm64') + const bindingPackageVersion = require('lingui-extractor-swc-android-arm64/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm') { + try { + return require('./lingui-extractor-swc.android-arm-eabi.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-android-arm-eabi') + const bindingPackageVersion = require('lingui-extractor-swc-android-arm-eabi/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`)) + } + } else if (process.platform === 'win32') { + if (process.arch === 'x64') { + try { + return require('./lingui-extractor-swc.win32-x64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-win32-x64-msvc') + const bindingPackageVersion = require('lingui-extractor-swc-win32-x64-msvc/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'ia32') { + try { + return require('./lingui-extractor-swc.win32-ia32-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-win32-ia32-msvc') + const bindingPackageVersion = require('lingui-extractor-swc-win32-ia32-msvc/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm64') { + try { + return require('./lingui-extractor-swc.win32-arm64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-win32-arm64-msvc') + const bindingPackageVersion = require('lingui-extractor-swc-win32-arm64-msvc/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`)) + } + } else if (process.platform === 'darwin') { + try { + return require('./lingui-extractor-swc.darwin-universal.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-darwin-universal') + const bindingPackageVersion = require('lingui-extractor-swc-darwin-universal/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + if (process.arch === 'x64') { + try { + return require('./lingui-extractor-swc.darwin-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-darwin-x64') + const bindingPackageVersion = require('lingui-extractor-swc-darwin-x64/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm64') { + try { + return require('./lingui-extractor-swc.darwin-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-darwin-arm64') + const bindingPackageVersion = require('lingui-extractor-swc-darwin-arm64/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`)) + } + } else if (process.platform === 'freebsd') { + if (process.arch === 'x64') { + try { + return require('./lingui-extractor-swc.freebsd-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-freebsd-x64') + const bindingPackageVersion = require('lingui-extractor-swc-freebsd-x64/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm64') { + try { + return require('./lingui-extractor-swc.freebsd-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-freebsd-arm64') + const bindingPackageVersion = require('lingui-extractor-swc-freebsd-arm64/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`)) + } + } else if (process.platform === 'linux') { + if (process.arch === 'x64') { + if (isMusl()) { + try { + return require('./lingui-extractor-swc.linux-x64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-x64-musl') + const bindingPackageVersion = require('lingui-extractor-swc-linux-x64-musl/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./lingui-extractor-swc.linux-x64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-x64-gnu') + const bindingPackageVersion = require('lingui-extractor-swc-linux-x64-gnu/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'arm64') { + if (isMusl()) { + try { + return require('./lingui-extractor-swc.linux-arm64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-arm64-musl') + const bindingPackageVersion = require('lingui-extractor-swc-linux-arm64-musl/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./lingui-extractor-swc.linux-arm64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-arm64-gnu') + const bindingPackageVersion = require('lingui-extractor-swc-linux-arm64-gnu/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'arm') { + if (isMusl()) { + try { + return require('./lingui-extractor-swc.linux-arm-musleabihf.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-arm-musleabihf') + const bindingPackageVersion = require('lingui-extractor-swc-linux-arm-musleabihf/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./lingui-extractor-swc.linux-arm-gnueabihf.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-arm-gnueabihf') + const bindingPackageVersion = require('lingui-extractor-swc-linux-arm-gnueabihf/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'loong64') { + if (isMusl()) { + try { + return require('./lingui-extractor-swc.linux-loong64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-loong64-musl') + const bindingPackageVersion = require('lingui-extractor-swc-linux-loong64-musl/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./lingui-extractor-swc.linux-loong64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-loong64-gnu') + const bindingPackageVersion = require('lingui-extractor-swc-linux-loong64-gnu/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'riscv64') { + if (isMusl()) { + try { + return require('./lingui-extractor-swc.linux-riscv64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-riscv64-musl') + const bindingPackageVersion = require('lingui-extractor-swc-linux-riscv64-musl/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { + return require('./lingui-extractor-swc.linux-riscv64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-riscv64-gnu') + const bindingPackageVersion = require('lingui-extractor-swc-linux-riscv64-gnu/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } + } else if (process.arch === 'ppc64') { + try { + return require('./lingui-extractor-swc.linux-ppc64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-ppc64-gnu') + const bindingPackageVersion = require('lingui-extractor-swc-linux-ppc64-gnu/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 's390x') { + try { + return require('./lingui-extractor-swc.linux-s390x-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-linux-s390x-gnu') + const bindingPackageVersion = require('lingui-extractor-swc-linux-s390x-gnu/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`)) + } + } else if (process.platform === 'openharmony') { + if (process.arch === 'arm64') { + try { + return require('./lingui-extractor-swc.openharmony-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-openharmony-arm64') + const bindingPackageVersion = require('lingui-extractor-swc-openharmony-arm64/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'x64') { + try { + return require('./lingui-extractor-swc.openharmony-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-openharmony-x64') + const bindingPackageVersion = require('lingui-extractor-swc-openharmony-x64/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else if (process.arch === 'arm') { + try { + return require('./lingui-extractor-swc.openharmony-arm.node') + } catch (e) { + loadErrors.push(e) + } + try { + const binding = require('lingui-extractor-swc-openharmony-arm') + const bindingPackageVersion = require('lingui-extractor-swc-openharmony-arm/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`)) + } + } else { + loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`)) + } +} + +nativeBinding = requireNative() + +if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { + let wasiBinding = null + let wasiBindingError = null + try { + wasiBinding = require('./lingui-extractor-swc.wasi.cjs') + nativeBinding = wasiBinding + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + wasiBindingError = err + } + } + if (!nativeBinding) { + try { + wasiBinding = require('lingui-extractor-swc-wasm32-wasi') + nativeBinding = wasiBinding + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + wasiBindingError.cause = err + loadErrors.push(err) + } + } + } + if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) { + const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error') + error.cause = wasiBindingError + throw error + } +} + +if (!nativeBinding) { + if (loadErrors.length > 0) { + throw new Error( + `Cannot find native binding. ` + + `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` + + 'Please try `npm i` again after removing both package-lock.json and node_modules directory.', + { + cause: loadErrors.reduce((err, cur) => { + cur.cause = err + return cur + }), + }, + ) + } + throw new Error(`Failed to load native binding`) +} + +module.exports = nativeBinding +module.exports.extractMessages = nativeBinding.extractMessages diff --git a/napi-rs/package.json b/napi-rs/package.json new file mode 100644 index 0000000..c777430 --- /dev/null +++ b/napi-rs/package.json @@ -0,0 +1,113 @@ +{ + "name": "lingui-extractor-swc", + "version": "1.0.0", + "description": "Template project for writing node package with napi-rs", + "main": "index.js", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/napi-rs/package-template.git" + }, + "license": "MIT", + "browser": "browser.js", + "keywords": [ + "napi-rs", + "NAPI", + "N-API", + "Rust", + "node-addon", + "node-addon-api" + ], + "files": [ + "index.d.ts", + "index.js", + "browser.js" + ], + "napi": { + "binaryName": "lingui-extractor-swc", + "targets": [ + "x86_64-apple-darwin", + "x86_64-pc-windows-msvc", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-linux-musl", + "i686-pc-windows-msvc", + "armv7-unknown-linux-gnueabihf", + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "aarch64-pc-windows-msvc" + ] + }, + "engines": { + "node": ">= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, + "scripts": { + "artifacts": "napi artifacts", + "bench": "node --import @oxc-node/core/register benchmark/bench.ts", + "build": "napi build --platform --release", + "build:debug": "napi build --platform", + "format": "run-p format:prettier format:rs format:toml", + "format:prettier": "prettier . -w", + "format:toml": "taplo format", + "format:rs": "cargo fmt", + "lint": "oxlint .", + "prepublishOnly": "napi prepublish -t npm", + "test": "ava", + "preversion": "napi build --platform && git add .", + "version": "napi version", + "prepare": "husky" + }, + "devDependencies": { + "@emnapi/core": "^1.8.1", + "@emnapi/runtime": "^1.8.1", + "@napi-rs/cli": "^3.5.1", + "@oxc-node/core": "^0.0.35", + "@taplo/cli": "^0.7.0", + "@tybys/wasm-util": "^0.10.0", + "ava": "^6.4.1", + "husky": "^9.1.7", + "lint-staged": "^16.1.6", + "npm-run-all2": "^8.0.4", + "oxlint": "^1.14.0", + "prettier": "^3.6.2", + "tinybench": "^6.0.0", + "typescript": "^5.9.2", + "vitest": "^4.0.18" + }, + "lint-staged": { + "*.@(js|ts|tsx)": [ + "oxlint --fix" + ], + "*.@(js|ts|tsx|yml|yaml|md|json)": [ + "prettier --write" + ], + "*.toml": [ + "taplo format" + ] + }, + "ava": { + "extensions": { + "ts": "module" + }, + "timeout": "2m", + "workerThreads": false, + "environmentVariables": { + "OXC_TSCONFIG_PATH": "./__test__/tsconfig.json" + }, + "nodeArguments": [ + "--import", + "@oxc-node/core/register" + ] + }, + "prettier": { + "printWidth": 120, + "semi": false, + "trailingComma": "all", + "singleQuote": true, + "arrowParens": "always" + }, + "packageManager": "yarn@4.12.0" +} diff --git a/napi-rs/rustfmt.toml b/napi-rs/rustfmt.toml new file mode 100644 index 0000000..b196eaa --- /dev/null +++ b/napi-rs/rustfmt.toml @@ -0,0 +1 @@ +tab_spaces = 2 diff --git a/napi-rs/src/lib.rs b/napi-rs/src/lib.rs new file mode 100644 index 0000000..6245fa0 --- /dev/null +++ b/napi-rs/src/lib.rs @@ -0,0 +1,57 @@ +#![deny(clippy::all)] + +use lingui_extractor::ExtractionResult; +use napi::bindgen_prelude::*; +use napi_derive::napi; + +/// Task for extracting messages asynchronously +pub struct ExtractMessagesTask { + source_code: String, + filename: String, +} + +impl Task for ExtractMessagesTask { + type Output = ExtractionResult; + type JsValue = ExtractionResult; + + fn compute(&mut self) -> Result { + let result = lingui_extractor::extract_messages(&self.source_code, &self.filename) + .map_err(|e| Error::new(Status::GenericFailure, e.to_string()))?; + + Ok(result) + } + + fn resolve(&mut self, _env: Env, output: Self::Output) -> Result { + Ok(output) + } +} + +/// Extract messages from source code +/// +/// This function parses JavaScript/TypeScript code and extracts internationalization +/// messages from lingui macro calls and components. +/// +/// # Arguments +/// +/// * `source_code` - The source code to analyze +/// * `filename` - The filename (used for error reporting and source maps) +/// +/// # Returns +/// +/// A Promise that resolves to an ExtractionResult containing: +/// * `messages` - Array of extracted messages +/// * `warnings` - Array of warning messages encountered during extraction +/// +/// # Example +/// +/// ```javascript +/// const result = await extractMessages(sourceCode, 'app.tsx'); +/// console.log(result.messages); +/// ``` +#[napi(ts_return_type = "Promise")] +pub fn extract_messages(source_code: String, filename: String) -> AsyncTask { + AsyncTask::new(ExtractMessagesTask { + source_code, + filename, + }) +} diff --git a/napi-rs/tsconfig.json b/napi-rs/tsconfig.json new file mode 100644 index 0000000..5056788 --- /dev/null +++ b/napi-rs/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "target": "ESNext", + "strict": true, + "moduleResolution": "node", + "module": "CommonJS", + "noUnusedLocals": true, + "noUnusedParameters": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true + }, + "include": ["."], + "exclude": ["node_modules", "bench", "__test__"] +} diff --git a/napi-rs/vitest.config.ts b/napi-rs/vitest.config.ts new file mode 100644 index 0000000..e7e10ae --- /dev/null +++ b/napi-rs/vitest.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + environment: 'node', + globals: false, + }, +}) diff --git a/napi-rs/wasi-worker-browser.mjs b/napi-rs/wasi-worker-browser.mjs new file mode 100644 index 0000000..8b1b172 --- /dev/null +++ b/napi-rs/wasi-worker-browser.mjs @@ -0,0 +1,32 @@ +import { instantiateNapiModuleSync, MessageHandler, WASI } from '@napi-rs/wasm-runtime' + +const handler = new MessageHandler({ + onLoad({ wasmModule, wasmMemory }) { + const wasi = new WASI({ + print: function () { + // eslint-disable-next-line no-console + console.log.apply(console, arguments) + }, + printErr: function() { + // eslint-disable-next-line no-console + console.error.apply(console, arguments) + }, + }) + return instantiateNapiModuleSync(wasmModule, { + childThread: true, + wasi, + overwriteImports(importObject) { + importObject.env = { + ...importObject.env, + ...importObject.napi, + ...importObject.emnapi, + memory: wasmMemory, + } + }, + }) + }, +}) + +globalThis.onmessage = function (e) { + handler.handle(e) +} diff --git a/napi-rs/yarn.lock b/napi-rs/yarn.lock new file mode 100644 index 0000000..fef1bb4 --- /dev/null +++ b/napi-rs/yarn.lock @@ -0,0 +1,3302 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10c0 + +"@emnapi/core@npm:^1.5.0": + version: 1.5.0 + resolution: "@emnapi/core@npm:1.5.0" + dependencies: + "@emnapi/wasi-threads": "npm:1.1.0" + tslib: "npm:^2.4.0" + checksum: 10c0/52ba3485277706d92fa27d92b37e5b4f6ef0742c03ed68f8096f294c6bfa30f0752c82d4c2bfa14bff4dc30d63c9f71a8f9fb64a92743d00807d9e468fafd5ff + languageName: node + linkType: hard + +"@emnapi/runtime@npm:^1.5.0": + version: 1.5.0 + resolution: "@emnapi/runtime@npm:1.5.0" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/a85c9fc4e3af49cbe41e5437e5be2551392a931910cd0a5b5d3572532786927810c9cc1db11b232ec8f9657b33d4e6f7c4f985f1a052917d7cd703b5b2a20faa + languageName: node + linkType: hard + +"@emnapi/wasi-threads@npm:1.1.0": + version: 1.1.0 + resolution: "@emnapi/wasi-threads@npm:1.1.0" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/e6d54bf2b1e64cdd83d2916411e44e579b6ae35d5def0dea61a3c452d9921373044dff32a8b8473ae60c80692bdc39323e98b96a3f3d87ba6886b24dd0ef7ca1 + languageName: node + linkType: hard + +"@inquirer/checkbox@npm:^4.2.2": + version: 4.2.2 + resolution: "@inquirer/checkbox@npm:4.2.2" + dependencies: + "@inquirer/core": "npm:^10.2.0" + "@inquirer/figures": "npm:^1.0.13" + "@inquirer/type": "npm:^3.0.8" + ansi-escapes: "npm:^4.3.2" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/d5861d1e6c18ce263b2d88da5c8071857e65e5815409b062919fcfc489598615ccc7df1d32c7348dc2587aed2053ee045cf770612a73ef8a0b08374f969ed388 + languageName: node + linkType: hard + +"@inquirer/confirm@npm:^5.1.16": + version: 5.1.16 + resolution: "@inquirer/confirm@npm:5.1.16" + dependencies: + "@inquirer/core": "npm:^10.2.0" + "@inquirer/type": "npm:^3.0.8" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/9a54171554404bfc89f2a065bb89282ca7cc69046956943e348c29a6a7c4d263dfbcbb46ad115aef616866083eb42130d05424a4a8ef3b30777a912e7ae20fec + languageName: node + linkType: hard + +"@inquirer/core@npm:^10.2.0": + version: 10.2.0 + resolution: "@inquirer/core@npm:10.2.0" + dependencies: + "@inquirer/figures": "npm:^1.0.13" + "@inquirer/type": "npm:^3.0.8" + ansi-escapes: "npm:^4.3.2" + cli-width: "npm:^4.1.0" + mute-stream: "npm:^2.0.0" + signal-exit: "npm:^4.1.0" + wrap-ansi: "npm:^6.2.0" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/6dc93634dc6005bb7c58522cd80bbf8fb5f756f104445a1916ed7a00dad99e10165a559f5b13e6d141ae744dbe4a5b9e405e10c5986ef7859988de191b3b71f3 + languageName: node + linkType: hard + +"@inquirer/editor@npm:^4.2.18": + version: 4.2.18 + resolution: "@inquirer/editor@npm:4.2.18" + dependencies: + "@inquirer/core": "npm:^10.2.0" + "@inquirer/external-editor": "npm:^1.0.1" + "@inquirer/type": "npm:^3.0.8" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/a8b48bc692a566cbbf6c3ea3d095d26bef14abfba631958f61cea85b54bcd7a4dbd7aa164a4752f48d7317340ebe126ac4ef6593b12ad6b3b729d4ec99df1fc1 + languageName: node + linkType: hard + +"@inquirer/expand@npm:^4.0.18": + version: 4.0.18 + resolution: "@inquirer/expand@npm:4.0.18" + dependencies: + "@inquirer/core": "npm:^10.2.0" + "@inquirer/type": "npm:^3.0.8" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/9fe1daef1efefdc4760bfe0317e0a765a8defe2f9453230938886ea06abd65c6a7a3eb72dc90ba5bbb82709f6703a271b8f7bb97283b825763a4cd1f68efb8a8 + languageName: node + linkType: hard + +"@inquirer/external-editor@npm:^1.0.1": + version: 1.0.1 + resolution: "@inquirer/external-editor@npm:1.0.1" + dependencies: + chardet: "npm:^2.1.0" + iconv-lite: "npm:^0.6.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/bdac4395e0bba7065d39b141d618bfc06369f246c402c511396a5238baf2657f3038ccba8438521a49e5cb602f4302b9d1f46b52b647b27af2c9911720022118 + languageName: node + linkType: hard + +"@inquirer/figures@npm:^1.0.13": + version: 1.0.13 + resolution: "@inquirer/figures@npm:1.0.13" + checksum: 10c0/23700a4a0627963af5f51ef4108c338ae77bdd90393164b3fdc79a378586e1f5531259882b7084c690167bf5a36e83033e45aca0321570ba810890abe111014f + languageName: node + linkType: hard + +"@inquirer/input@npm:^4.2.2": + version: 4.2.2 + resolution: "@inquirer/input@npm:4.2.2" + dependencies: + "@inquirer/core": "npm:^10.2.0" + "@inquirer/type": "npm:^3.0.8" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/7d8f202eb0e970841005026634596ffdb3b68a9c6b599841ad46b25841e277d2950582e5eeddd69b168d7ef52631cf15782922844731d01d3808a018461d8f98 + languageName: node + linkType: hard + +"@inquirer/number@npm:^3.0.18": + version: 3.0.18 + resolution: "@inquirer/number@npm:3.0.18" + dependencies: + "@inquirer/core": "npm:^10.2.0" + "@inquirer/type": "npm:^3.0.8" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/dbaead7813bba1978ef429eb485bb02e55e9047194f2337313592546b4504b06ea18b37919e23ea53388f5314dc96ea038e4599c7f396344910b17b3d9a159cb + languageName: node + linkType: hard + +"@inquirer/password@npm:^4.0.18": + version: 4.0.18 + resolution: "@inquirer/password@npm:4.0.18" + dependencies: + "@inquirer/core": "npm:^10.2.0" + "@inquirer/type": "npm:^3.0.8" + ansi-escapes: "npm:^4.3.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/7d05940633f74d1fa3850884ce71b32c3790bc421439cd77366553df39ec910f64dcdb2084776ee9d9a10d248390801700113ca3d8b0b02b1517531109798814 + languageName: node + linkType: hard + +"@inquirer/prompts@npm:^7.8.4": + version: 7.8.4 + resolution: "@inquirer/prompts@npm:7.8.4" + dependencies: + "@inquirer/checkbox": "npm:^4.2.2" + "@inquirer/confirm": "npm:^5.1.16" + "@inquirer/editor": "npm:^4.2.18" + "@inquirer/expand": "npm:^4.0.18" + "@inquirer/input": "npm:^4.2.2" + "@inquirer/number": "npm:^3.0.18" + "@inquirer/password": "npm:^4.0.18" + "@inquirer/rawlist": "npm:^4.1.6" + "@inquirer/search": "npm:^3.1.1" + "@inquirer/select": "npm:^4.3.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/bf04aa108eeed602287eda26c646b6407cdd2db3d4a2175d1e88f1325987b5aeb7741af3f2ad82035811d74efa5c561d78ec642423060723d93b2275e669f0bb + languageName: node + linkType: hard + +"@inquirer/rawlist@npm:^4.1.6": + version: 4.1.6 + resolution: "@inquirer/rawlist@npm:4.1.6" + dependencies: + "@inquirer/core": "npm:^10.2.0" + "@inquirer/type": "npm:^3.0.8" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/0589a3098de545cf83450b2ce59623865e06e435a773240a5f6f47c20602a13ea3e9bf85849f39e57335e4faace510182c0251e88de0a3cc8d23b4f2270772e3 + languageName: node + linkType: hard + +"@inquirer/search@npm:^3.1.1": + version: 3.1.1 + resolution: "@inquirer/search@npm:3.1.1" + dependencies: + "@inquirer/core": "npm:^10.2.0" + "@inquirer/figures": "npm:^1.0.13" + "@inquirer/type": "npm:^3.0.8" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/31f5e74d200f1c40b47099ebb74f5138b0900c99afe1b98b4a3d60e286cd8ca062ed5a68a5d1394cb6b8584cac2931f2b584241cf39dc34b83dc4ce8eb7daddd + languageName: node + linkType: hard + +"@inquirer/select@npm:^4.3.2": + version: 4.3.2 + resolution: "@inquirer/select@npm:4.3.2" + dependencies: + "@inquirer/core": "npm:^10.2.0" + "@inquirer/figures": "npm:^1.0.13" + "@inquirer/type": "npm:^3.0.8" + ansi-escapes: "npm:^4.3.2" + yoctocolors-cjs: "npm:^2.1.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/48aaec29e21fd19b9b3045ad01d7fbe46aa9ac828adc5b8e5b8e5055daad47e0d1134cde40281e9e639bd963c30756ca729c20fcb629e3053ac411020cf4bc78 + languageName: node + linkType: hard + +"@inquirer/type@npm:^3.0.8": + version: 3.0.8 + resolution: "@inquirer/type@npm:3.0.8" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/1171bffb9ea0018b12ec4f46a7b485f7e2a328e620e89f3b03f2be8c25889e5b9e62daca3ea10ed040a71d847066c4d9879dc1fea8aa5690ebbc968d3254a5ac + languageName: node + linkType: hard + +"@isaacs/cliui@npm:^8.0.2": + version: 8.0.2 + resolution: "@isaacs/cliui@npm:8.0.2" + dependencies: + string-width: "npm:^5.1.2" + string-width-cjs: "npm:string-width@^4.2.0" + strip-ansi: "npm:^7.0.1" + strip-ansi-cjs: "npm:strip-ansi@^6.0.1" + wrap-ansi: "npm:^8.1.0" + wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" + checksum: 10c0/b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e + languageName: node + linkType: hard + +"@isaacs/fs-minipass@npm:^4.0.0": + version: 4.0.1 + resolution: "@isaacs/fs-minipass@npm:4.0.1" + dependencies: + minipass: "npm:^7.0.4" + checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2 + languageName: node + linkType: hard + +"@mapbox/node-pre-gyp@npm:^2.0.0": + version: 2.0.0 + resolution: "@mapbox/node-pre-gyp@npm:2.0.0" + dependencies: + consola: "npm:^3.2.3" + detect-libc: "npm:^2.0.0" + https-proxy-agent: "npm:^7.0.5" + node-fetch: "npm:^2.6.7" + nopt: "npm:^8.0.0" + semver: "npm:^7.5.3" + tar: "npm:^7.4.0" + bin: + node-pre-gyp: bin/node-pre-gyp + checksum: 10c0/7d874c7f6f5560a87be7207f28d9a4e53b750085a82167608fd573aab8073645e95b3608f69e244df0e1d24e90a66525aeae708aba82ca73ff668ed0ab6abda6 + languageName: node + linkType: hard + +"@napi-rs/cli@npm:^3.2.0": + version: 3.2.0 + resolution: "@napi-rs/cli@npm:3.2.0" + dependencies: + "@inquirer/prompts": "npm:^7.8.4" + "@napi-rs/cross-toolchain": "npm:^1.0.3" + "@napi-rs/wasm-tools": "npm:^1.0.1" + "@octokit/rest": "npm:^22.0.0" + clipanion: "npm:^4.0.0-rc.4" + colorette: "npm:^2.0.20" + debug: "npm:^4.4.1" + emnapi: "npm:^1.5.0" + es-toolkit: "npm:^1.39.10" + find-up: "npm:^7.0.0" + js-yaml: "npm:^4.1.0" + semver: "npm:^7.7.2" + typanion: "npm:^3.14.0" + peerDependencies: + "@emnapi/runtime": ^1.1.0 + emnapi: ^1.1.0 + peerDependenciesMeta: + "@emnapi/runtime": + optional: true + emnapi: + optional: true + bin: + napi: dist/cli.js + napi-raw: cli.mjs + checksum: 10c0/3b871bed67e7691ce5eb7e3a6b1f57ae628144e2f8ddcc0cfe0305c3603a0b4ad5073ca82ba74d8cf13aeaacd57c083bbf3423f89b256b3b34bb3ab03e55e1c0 + languageName: node + linkType: hard + +"@napi-rs/cross-toolchain@npm:^1.0.3": + version: 1.0.3 + resolution: "@napi-rs/cross-toolchain@npm:1.0.3" + dependencies: + "@napi-rs/lzma": "npm:^1.4.5" + "@napi-rs/tar": "npm:^1.1.0" + debug: "npm:^4.4.1" + peerDependencies: + "@napi-rs/cross-toolchain-arm64-target-aarch64": ^1.0.3 + "@napi-rs/cross-toolchain-arm64-target-armv7": ^1.0.3 + "@napi-rs/cross-toolchain-arm64-target-ppc64le": ^1.0.3 + "@napi-rs/cross-toolchain-arm64-target-s390x": ^1.0.3 + "@napi-rs/cross-toolchain-arm64-target-x86_64": ^1.0.3 + "@napi-rs/cross-toolchain-x64-target-aarch64": ^1.0.3 + "@napi-rs/cross-toolchain-x64-target-armv7": ^1.0.3 + "@napi-rs/cross-toolchain-x64-target-ppc64le": ^1.0.3 + "@napi-rs/cross-toolchain-x64-target-s390x": ^1.0.3 + "@napi-rs/cross-toolchain-x64-target-x86_64": ^1.0.3 + peerDependenciesMeta: + "@napi-rs/cross-toolchain-arm64-target-aarch64": + optional: true + "@napi-rs/cross-toolchain-arm64-target-armv7": + optional: true + "@napi-rs/cross-toolchain-arm64-target-ppc64le": + optional: true + "@napi-rs/cross-toolchain-arm64-target-s390x": + optional: true + "@napi-rs/cross-toolchain-arm64-target-x86_64": + optional: true + "@napi-rs/cross-toolchain-x64-target-aarch64": + optional: true + "@napi-rs/cross-toolchain-x64-target-armv7": + optional: true + "@napi-rs/cross-toolchain-x64-target-ppc64le": + optional: true + "@napi-rs/cross-toolchain-x64-target-s390x": + optional: true + "@napi-rs/cross-toolchain-x64-target-x86_64": + optional: true + checksum: 10c0/fcc7877c1e47ba6bf4801a4154240d3130703524b1fed17e736126ce58b53960872b9933f8434e3e86b4635e4c7fe881228be0d237210dd96c2087244523750f + languageName: node + linkType: hard + +"@napi-rs/lzma-android-arm-eabi@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-android-arm-eabi@npm:1.4.5" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@napi-rs/lzma-android-arm64@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-android-arm64@npm:1.4.5" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/lzma-darwin-arm64@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-darwin-arm64@npm:1.4.5" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/lzma-darwin-x64@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-darwin-x64@npm:1.4.5" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/lzma-freebsd-x64@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-freebsd-x64@npm:1.4.5" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-arm-gnueabihf@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-arm-gnueabihf@npm:1.4.5" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-arm64-gnu@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-arm64-gnu@npm:1.4.5" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-arm64-musl@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-arm64-musl@npm:1.4.5" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-ppc64-gnu@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-ppc64-gnu@npm:1.4.5" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-riscv64-gnu@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-riscv64-gnu@npm:1.4.5" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-s390x-gnu@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-s390x-gnu@npm:1.4.5" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-x64-gnu@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-x64-gnu@npm:1.4.5" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-x64-musl@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-x64-musl@npm:1.4.5" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@napi-rs/lzma-wasm32-wasi@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-wasm32-wasi@npm:1.4.5" + dependencies: + "@napi-rs/wasm-runtime": "npm:^1.0.3" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@napi-rs/lzma-win32-arm64-msvc@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-win32-arm64-msvc@npm:1.4.5" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/lzma-win32-ia32-msvc@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-win32-ia32-msvc@npm:1.4.5" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@napi-rs/lzma-win32-x64-msvc@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-win32-x64-msvc@npm:1.4.5" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/lzma@npm:^1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma@npm:1.4.5" + dependencies: + "@napi-rs/lzma-android-arm-eabi": "npm:1.4.5" + "@napi-rs/lzma-android-arm64": "npm:1.4.5" + "@napi-rs/lzma-darwin-arm64": "npm:1.4.5" + "@napi-rs/lzma-darwin-x64": "npm:1.4.5" + "@napi-rs/lzma-freebsd-x64": "npm:1.4.5" + "@napi-rs/lzma-linux-arm-gnueabihf": "npm:1.4.5" + "@napi-rs/lzma-linux-arm64-gnu": "npm:1.4.5" + "@napi-rs/lzma-linux-arm64-musl": "npm:1.4.5" + "@napi-rs/lzma-linux-ppc64-gnu": "npm:1.4.5" + "@napi-rs/lzma-linux-riscv64-gnu": "npm:1.4.5" + "@napi-rs/lzma-linux-s390x-gnu": "npm:1.4.5" + "@napi-rs/lzma-linux-x64-gnu": "npm:1.4.5" + "@napi-rs/lzma-linux-x64-musl": "npm:1.4.5" + "@napi-rs/lzma-wasm32-wasi": "npm:1.4.5" + "@napi-rs/lzma-win32-arm64-msvc": "npm:1.4.5" + "@napi-rs/lzma-win32-ia32-msvc": "npm:1.4.5" + "@napi-rs/lzma-win32-x64-msvc": "npm:1.4.5" + dependenciesMeta: + "@napi-rs/lzma-android-arm-eabi": + optional: true + "@napi-rs/lzma-android-arm64": + optional: true + "@napi-rs/lzma-darwin-arm64": + optional: true + "@napi-rs/lzma-darwin-x64": + optional: true + "@napi-rs/lzma-freebsd-x64": + optional: true + "@napi-rs/lzma-linux-arm-gnueabihf": + optional: true + "@napi-rs/lzma-linux-arm64-gnu": + optional: true + "@napi-rs/lzma-linux-arm64-musl": + optional: true + "@napi-rs/lzma-linux-ppc64-gnu": + optional: true + "@napi-rs/lzma-linux-riscv64-gnu": + optional: true + "@napi-rs/lzma-linux-s390x-gnu": + optional: true + "@napi-rs/lzma-linux-x64-gnu": + optional: true + "@napi-rs/lzma-linux-x64-musl": + optional: true + "@napi-rs/lzma-wasm32-wasi": + optional: true + "@napi-rs/lzma-win32-arm64-msvc": + optional: true + "@napi-rs/lzma-win32-ia32-msvc": + optional: true + "@napi-rs/lzma-win32-x64-msvc": + optional: true + checksum: 10c0/df098c99f904b54541e3a34feeb5878c98a4abf1ababf1d301d903b99d98402fff5eda49e1dd103bb4bf44a9217a5e1b17fb30b74044416561f8fe02ca098ee3 + languageName: node + linkType: hard + +"@napi-rs/tar-android-arm-eabi@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-android-arm-eabi@npm:1.1.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@napi-rs/tar-android-arm64@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-android-arm64@npm:1.1.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/tar-darwin-arm64@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-darwin-arm64@npm:1.1.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/tar-darwin-x64@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-darwin-x64@npm:1.1.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/tar-freebsd-x64@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-freebsd-x64@npm:1.1.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/tar-linux-arm-gnueabihf@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-arm-gnueabihf@npm:1.1.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@napi-rs/tar-linux-arm64-gnu@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-arm64-gnu@npm:1.1.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/tar-linux-arm64-musl@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-arm64-musl@npm:1.1.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@napi-rs/tar-linux-ppc64-gnu@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-ppc64-gnu@npm:1.1.0" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/tar-linux-s390x-gnu@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-s390x-gnu@npm:1.1.0" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/tar-linux-x64-gnu@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-x64-gnu@npm:1.1.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/tar-linux-x64-musl@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-x64-musl@npm:1.1.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@napi-rs/tar-wasm32-wasi@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-wasm32-wasi@npm:1.1.0" + dependencies: + "@napi-rs/wasm-runtime": "npm:^1.0.3" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@napi-rs/tar-win32-arm64-msvc@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-win32-arm64-msvc@npm:1.1.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/tar-win32-ia32-msvc@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-win32-ia32-msvc@npm:1.1.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@napi-rs/tar-win32-x64-msvc@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-win32-x64-msvc@npm:1.1.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/tar@npm:^1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar@npm:1.1.0" + dependencies: + "@napi-rs/tar-android-arm-eabi": "npm:1.1.0" + "@napi-rs/tar-android-arm64": "npm:1.1.0" + "@napi-rs/tar-darwin-arm64": "npm:1.1.0" + "@napi-rs/tar-darwin-x64": "npm:1.1.0" + "@napi-rs/tar-freebsd-x64": "npm:1.1.0" + "@napi-rs/tar-linux-arm-gnueabihf": "npm:1.1.0" + "@napi-rs/tar-linux-arm64-gnu": "npm:1.1.0" + "@napi-rs/tar-linux-arm64-musl": "npm:1.1.0" + "@napi-rs/tar-linux-ppc64-gnu": "npm:1.1.0" + "@napi-rs/tar-linux-s390x-gnu": "npm:1.1.0" + "@napi-rs/tar-linux-x64-gnu": "npm:1.1.0" + "@napi-rs/tar-linux-x64-musl": "npm:1.1.0" + "@napi-rs/tar-wasm32-wasi": "npm:1.1.0" + "@napi-rs/tar-win32-arm64-msvc": "npm:1.1.0" + "@napi-rs/tar-win32-ia32-msvc": "npm:1.1.0" + "@napi-rs/tar-win32-x64-msvc": "npm:1.1.0" + dependenciesMeta: + "@napi-rs/tar-android-arm-eabi": + optional: true + "@napi-rs/tar-android-arm64": + optional: true + "@napi-rs/tar-darwin-arm64": + optional: true + "@napi-rs/tar-darwin-x64": + optional: true + "@napi-rs/tar-freebsd-x64": + optional: true + "@napi-rs/tar-linux-arm-gnueabihf": + optional: true + "@napi-rs/tar-linux-arm64-gnu": + optional: true + "@napi-rs/tar-linux-arm64-musl": + optional: true + "@napi-rs/tar-linux-ppc64-gnu": + optional: true + "@napi-rs/tar-linux-s390x-gnu": + optional: true + "@napi-rs/tar-linux-x64-gnu": + optional: true + "@napi-rs/tar-linux-x64-musl": + optional: true + "@napi-rs/tar-wasm32-wasi": + optional: true + "@napi-rs/tar-win32-arm64-msvc": + optional: true + "@napi-rs/tar-win32-ia32-msvc": + optional: true + "@napi-rs/tar-win32-x64-msvc": + optional: true + checksum: 10c0/88a0ab081eacfa235266f14a0bc408b7581058b1f7e18b118c6f8e7012cca0dd91c5baf5de84e1d2eb8070386a7380aa4d8dedfc6f81e24ae9d0287ff50ae153 + languageName: node + linkType: hard + +"@napi-rs/wasm-runtime@npm:^1.0.3": + version: 1.0.4 + resolution: "@napi-rs/wasm-runtime@npm:1.0.4" + dependencies: + "@emnapi/core": "npm:^1.5.0" + "@emnapi/runtime": "npm:^1.5.0" + "@tybys/wasm-util": "npm:^0.10.0" + checksum: 10c0/69a2f45032bada5a648ccc2b8169d187289d40840e2e8771cb6745fa1bc683e8bd614e4eafe4ac9245e8142e249f9b074359fdd687d7a10498c524a0b63e613e + languageName: node + linkType: hard + +"@napi-rs/wasm-runtime@npm:^1.0.7": + version: 1.0.7 + resolution: "@napi-rs/wasm-runtime@npm:1.0.7" + dependencies: + "@emnapi/core": "npm:^1.5.0" + "@emnapi/runtime": "npm:^1.5.0" + "@tybys/wasm-util": "npm:^0.10.1" + checksum: 10c0/2d8635498136abb49d6dbf7395b78c63422292240963bf055f307b77aeafbde57ae2c0ceaaef215601531b36d6eb92a2cdd6f5ba90ed2aa8127c27aff9c4ae55 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-android-arm-eabi@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-android-arm-eabi@npm:1.0.1" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-android-arm64@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-android-arm64@npm:1.0.1" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-darwin-arm64@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-darwin-arm64@npm:1.0.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-darwin-x64@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-darwin-x64@npm:1.0.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-freebsd-x64@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-freebsd-x64@npm:1.0.1" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-linux-arm64-gnu@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-linux-arm64-gnu@npm:1.0.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-linux-arm64-musl@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-linux-arm64-musl@npm:1.0.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-linux-x64-gnu@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-linux-x64-gnu@npm:1.0.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-linux-x64-musl@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-linux-x64-musl@npm:1.0.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-wasm32-wasi@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-wasm32-wasi@npm:1.0.1" + dependencies: + "@napi-rs/wasm-runtime": "npm:^1.0.3" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-win32-arm64-msvc@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-win32-arm64-msvc@npm:1.0.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-win32-ia32-msvc@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-win32-ia32-msvc@npm:1.0.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-win32-x64-msvc@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-win32-x64-msvc@npm:1.0.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools@npm:^1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools@npm:1.0.1" + dependencies: + "@napi-rs/wasm-tools-android-arm-eabi": "npm:1.0.1" + "@napi-rs/wasm-tools-android-arm64": "npm:1.0.1" + "@napi-rs/wasm-tools-darwin-arm64": "npm:1.0.1" + "@napi-rs/wasm-tools-darwin-x64": "npm:1.0.1" + "@napi-rs/wasm-tools-freebsd-x64": "npm:1.0.1" + "@napi-rs/wasm-tools-linux-arm64-gnu": "npm:1.0.1" + "@napi-rs/wasm-tools-linux-arm64-musl": "npm:1.0.1" + "@napi-rs/wasm-tools-linux-x64-gnu": "npm:1.0.1" + "@napi-rs/wasm-tools-linux-x64-musl": "npm:1.0.1" + "@napi-rs/wasm-tools-wasm32-wasi": "npm:1.0.1" + "@napi-rs/wasm-tools-win32-arm64-msvc": "npm:1.0.1" + "@napi-rs/wasm-tools-win32-ia32-msvc": "npm:1.0.1" + "@napi-rs/wasm-tools-win32-x64-msvc": "npm:1.0.1" + dependenciesMeta: + "@napi-rs/wasm-tools-android-arm-eabi": + optional: true + "@napi-rs/wasm-tools-android-arm64": + optional: true + "@napi-rs/wasm-tools-darwin-arm64": + optional: true + "@napi-rs/wasm-tools-darwin-x64": + optional: true + "@napi-rs/wasm-tools-freebsd-x64": + optional: true + "@napi-rs/wasm-tools-linux-arm64-gnu": + optional: true + "@napi-rs/wasm-tools-linux-arm64-musl": + optional: true + "@napi-rs/wasm-tools-linux-x64-gnu": + optional: true + "@napi-rs/wasm-tools-linux-x64-musl": + optional: true + "@napi-rs/wasm-tools-wasm32-wasi": + optional: true + "@napi-rs/wasm-tools-win32-arm64-msvc": + optional: true + "@napi-rs/wasm-tools-win32-ia32-msvc": + optional: true + "@napi-rs/wasm-tools-win32-x64-msvc": + optional: true + checksum: 10c0/bee9258e0b16a2415acc57d9aa281fa50402b38f631aea28e3a8ecd16415cdfffade63313bca777e85c3a73b80cce899ac3dd35eba9104951d7da1eb28913122 + languageName: node + linkType: hard + +"@nodelib/fs.scandir@npm:2.1.5": + version: 2.1.5 + resolution: "@nodelib/fs.scandir@npm:2.1.5" + dependencies: + "@nodelib/fs.stat": "npm:2.0.5" + run-parallel: "npm:^1.1.9" + checksum: 10c0/732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb + languageName: node + linkType: hard + +"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": + version: 2.0.5 + resolution: "@nodelib/fs.stat@npm:2.0.5" + checksum: 10c0/88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d + languageName: node + linkType: hard + +"@nodelib/fs.walk@npm:^1.2.3": + version: 1.2.8 + resolution: "@nodelib/fs.walk@npm:1.2.8" + dependencies: + "@nodelib/fs.scandir": "npm:2.1.5" + fastq: "npm:^1.6.0" + checksum: 10c0/db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1 + languageName: node + linkType: hard + +"@octokit/auth-token@npm:^6.0.0": + version: 6.0.0 + resolution: "@octokit/auth-token@npm:6.0.0" + checksum: 10c0/32ecc904c5f6f4e5d090bfcc679d70318690c0a0b5040cd9a25811ad9dcd44c33f2cf96b6dbee1cd56cf58fde28fb1819c01b58718aa5c971f79c822357cb5c0 + languageName: node + linkType: hard + +"@octokit/core@npm:^7.0.2": + version: 7.0.3 + resolution: "@octokit/core@npm:7.0.3" + dependencies: + "@octokit/auth-token": "npm:^6.0.0" + "@octokit/graphql": "npm:^9.0.1" + "@octokit/request": "npm:^10.0.2" + "@octokit/request-error": "npm:^7.0.0" + "@octokit/types": "npm:^14.0.0" + before-after-hook: "npm:^4.0.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10c0/51427b4c3337e15b394d60277b673c5628a72d245a23b1a446e4249d15e37983fa01d09f10c8ab281207e024929f4d2f6cc27a4d345ec0ece2df78d42586d846 + languageName: node + linkType: hard + +"@octokit/endpoint@npm:^11.0.0": + version: 11.0.0 + resolution: "@octokit/endpoint@npm:11.0.0" + dependencies: + "@octokit/types": "npm:^14.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10c0/ba929128af5327393fdb3a31f416277ae3036a44566d35955a4eddd484a15b5ddc6abe219a56355f3313c7197d59f4e8bf574a4f0a8680bc1c8725b88433d391 + languageName: node + linkType: hard + +"@octokit/graphql@npm:^9.0.1": + version: 9.0.1 + resolution: "@octokit/graphql@npm:9.0.1" + dependencies: + "@octokit/request": "npm:^10.0.2" + "@octokit/types": "npm:^14.0.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10c0/d80ec923b7624e8a7c84430a287ff18da3c77058e3166ce8e9a67950af00e88767f85d973b4032fc837b67b72d02b323aff2d8f7eeae1ae463bde1a51ddcb83d + languageName: node + linkType: hard + +"@octokit/openapi-types@npm:^25.1.0": + version: 25.1.0 + resolution: "@octokit/openapi-types@npm:25.1.0" + checksum: 10c0/b5b1293b11c6ec7112c7a2713f8507c2696d5db8902ce893b594080ab0329f5a6fcda1b5ac6fe6eed9425e897f4d03326c1bdf5c337e35d324e7b925e52a2661 + languageName: node + linkType: hard + +"@octokit/plugin-paginate-rest@npm:^13.0.1": + version: 13.1.1 + resolution: "@octokit/plugin-paginate-rest@npm:13.1.1" + dependencies: + "@octokit/types": "npm:^14.1.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10c0/88d80608881df88f8e832856e9279ac1c1af30ced9adb7c847f4d120b4bb308c2ab9d791ffd4c9585759e57a938798b4c3f2f988a389f2d78a61aaaebc36ffa7 + languageName: node + linkType: hard + +"@octokit/plugin-request-log@npm:^6.0.0": + version: 6.0.0 + resolution: "@octokit/plugin-request-log@npm:6.0.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10c0/40e46ad0c77235742d0bf698ab4e17df1ae06e0d7824ffc5867ed71e27de860875adb73d89629b823fe8647459a8f262c26ed1aa6ee374873fa94095f37df0bb + languageName: node + linkType: hard + +"@octokit/plugin-rest-endpoint-methods@npm:^16.0.0": + version: 16.0.0 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:16.0.0" + dependencies: + "@octokit/types": "npm:^14.1.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10c0/6cfe068dbd550bd5914374e65b89482b9deac29f6c26bf02ab6298e956d95b62fc15a2a49dfc6ff76f5938c6ff7fdfe5b7eccdb7551eaff8b1daf7394bc946cb + languageName: node + linkType: hard + +"@octokit/request-error@npm:^7.0.0": + version: 7.0.0 + resolution: "@octokit/request-error@npm:7.0.0" + dependencies: + "@octokit/types": "npm:^14.0.0" + checksum: 10c0/e52bdd832a0187d66b20da5716c374d028f63d824908a9e16cad462754324083839b11cf6956e1d23f6112d3c77f17334ebbd80f49d56840b2b03ed9abef8cb0 + languageName: node + linkType: hard + +"@octokit/request@npm:^10.0.2": + version: 10.0.3 + resolution: "@octokit/request@npm:10.0.3" + dependencies: + "@octokit/endpoint": "npm:^11.0.0" + "@octokit/request-error": "npm:^7.0.0" + "@octokit/types": "npm:^14.0.0" + fast-content-type-parse: "npm:^3.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10c0/2d9b2134390ef3aa9fe0c5e659fe93dd94fbabc4dcc6da6e16998dc84b5bda200e6b7a4e178f567883d0ba99c0ea5a6d095a417d86d76854569196c39d2f9a6d + languageName: node + linkType: hard + +"@octokit/rest@npm:^22.0.0": + version: 22.0.0 + resolution: "@octokit/rest@npm:22.0.0" + dependencies: + "@octokit/core": "npm:^7.0.2" + "@octokit/plugin-paginate-rest": "npm:^13.0.1" + "@octokit/plugin-request-log": "npm:^6.0.0" + "@octokit/plugin-rest-endpoint-methods": "npm:^16.0.0" + checksum: 10c0/aea3714301f43fbadb22048045a7aef417cdefa997d1baf0b26860eaa9038fb033f7d4299eab06af57a03433871084cf38144fc5414caf80accce714e76d34e2 + languageName: node + linkType: hard + +"@octokit/types@npm:^14.0.0, @octokit/types@npm:^14.1.0": + version: 14.1.0 + resolution: "@octokit/types@npm:14.1.0" + dependencies: + "@octokit/openapi-types": "npm:^25.1.0" + checksum: 10c0/4640a6c0a95386be4d015b96c3a906756ea657f7df3c6e706d19fea6bf3ac44fd2991c8c817afe1e670ff9042b85b0e06f7fd373f6bbd47da64208701bb46d5b + languageName: node + linkType: hard + +"@oxc-node/core-android-arm-eabi@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-android-arm-eabi@npm:0.0.35" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@oxc-node/core-android-arm64@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-android-arm64@npm:0.0.35" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-node/core-darwin-arm64@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-darwin-arm64@npm:0.0.35" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-node/core-darwin-x64@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-darwin-x64@npm:0.0.35" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxc-node/core-freebsd-x64@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-freebsd-x64@npm:0.0.35" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@oxc-node/core-linux-arm-gnueabihf@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-linux-arm-gnueabihf@npm:0.0.35" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxc-node/core-linux-arm64-gnu@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-linux-arm64-gnu@npm:0.0.35" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-node/core-linux-arm64-musl@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-linux-arm64-musl@npm:0.0.35" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxc-node/core-linux-ppc64-gnu@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-linux-ppc64-gnu@npm:0.0.35" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-node/core-linux-s390x-gnu@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-linux-s390x-gnu@npm:0.0.35" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@oxc-node/core-linux-x64-gnu@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-linux-x64-gnu@npm:0.0.35" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-node/core-linux-x64-musl@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-linux-x64-musl@npm:0.0.35" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxc-node/core-openharmony-arm64@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-openharmony-arm64@npm:0.0.35" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-node/core-wasm32-wasi@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-wasm32-wasi@npm:0.0.35" + dependencies: + "@napi-rs/wasm-runtime": "npm:^1.0.7" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@oxc-node/core-win32-arm64-msvc@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-win32-arm64-msvc@npm:0.0.35" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-node/core-win32-ia32-msvc@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-win32-ia32-msvc@npm:0.0.35" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@oxc-node/core-win32-x64-msvc@npm:0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core-win32-x64-msvc@npm:0.0.35" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@oxc-node/core@npm:^0.0.35": + version: 0.0.35 + resolution: "@oxc-node/core@npm:0.0.35" + dependencies: + "@oxc-node/core-android-arm-eabi": "npm:0.0.35" + "@oxc-node/core-android-arm64": "npm:0.0.35" + "@oxc-node/core-darwin-arm64": "npm:0.0.35" + "@oxc-node/core-darwin-x64": "npm:0.0.35" + "@oxc-node/core-freebsd-x64": "npm:0.0.35" + "@oxc-node/core-linux-arm-gnueabihf": "npm:0.0.35" + "@oxc-node/core-linux-arm64-gnu": "npm:0.0.35" + "@oxc-node/core-linux-arm64-musl": "npm:0.0.35" + "@oxc-node/core-linux-ppc64-gnu": "npm:0.0.35" + "@oxc-node/core-linux-s390x-gnu": "npm:0.0.35" + "@oxc-node/core-linux-x64-gnu": "npm:0.0.35" + "@oxc-node/core-linux-x64-musl": "npm:0.0.35" + "@oxc-node/core-openharmony-arm64": "npm:0.0.35" + "@oxc-node/core-wasm32-wasi": "npm:0.0.35" + "@oxc-node/core-win32-arm64-msvc": "npm:0.0.35" + "@oxc-node/core-win32-ia32-msvc": "npm:0.0.35" + "@oxc-node/core-win32-x64-msvc": "npm:0.0.35" + pirates: "npm:^4.0.7" + dependenciesMeta: + "@oxc-node/core-android-arm-eabi": + optional: true + "@oxc-node/core-android-arm64": + optional: true + "@oxc-node/core-darwin-arm64": + optional: true + "@oxc-node/core-darwin-x64": + optional: true + "@oxc-node/core-freebsd-x64": + optional: true + "@oxc-node/core-linux-arm-gnueabihf": + optional: true + "@oxc-node/core-linux-arm64-gnu": + optional: true + "@oxc-node/core-linux-arm64-musl": + optional: true + "@oxc-node/core-linux-ppc64-gnu": + optional: true + "@oxc-node/core-linux-s390x-gnu": + optional: true + "@oxc-node/core-linux-x64-gnu": + optional: true + "@oxc-node/core-linux-x64-musl": + optional: true + "@oxc-node/core-openharmony-arm64": + optional: true + "@oxc-node/core-wasm32-wasi": + optional: true + "@oxc-node/core-win32-arm64-msvc": + optional: true + "@oxc-node/core-win32-ia32-msvc": + optional: true + "@oxc-node/core-win32-x64-msvc": + optional: true + checksum: 10c0/6328427d833c99b498f41b8dc58ed3503d17aabe66172a5aacce06c7e85377649aa6ac602dfa5dd8f8f01167b5fe428a65d751c40386eced495acbe9eb414e10 + languageName: node + linkType: hard + +"@oxlint/darwin-arm64@npm:1.14.0": + version: 1.14.0 + resolution: "@oxlint/darwin-arm64@npm:1.14.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/darwin-x64@npm:1.14.0": + version: 1.14.0 + resolution: "@oxlint/darwin-x64@npm:1.14.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxlint/linux-arm64-gnu@npm:1.14.0": + version: 1.14.0 + resolution: "@oxlint/linux-arm64-gnu@npm:1.14.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/linux-arm64-musl@npm:1.14.0": + version: 1.14.0 + resolution: "@oxlint/linux-arm64-musl@npm:1.14.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/linux-x64-gnu@npm:1.14.0": + version: 1.14.0 + resolution: "@oxlint/linux-x64-gnu@npm:1.14.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/linux-x64-musl@npm:1.14.0": + version: 1.14.0 + resolution: "@oxlint/linux-x64-musl@npm:1.14.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/win32-arm64@npm:1.14.0": + version: 1.14.0 + resolution: "@oxlint/win32-arm64@npm:1.14.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/win32-x64@npm:1.14.0": + version: 1.14.0 + resolution: "@oxlint/win32-x64@npm:1.14.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@pkgjs/parseargs@npm:^0.11.0": + version: 0.11.0 + resolution: "@pkgjs/parseargs@npm:0.11.0" + checksum: 10c0/5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd + languageName: node + linkType: hard + +"@rollup/pluginutils@npm:^5.1.3": + version: 5.3.0 + resolution: "@rollup/pluginutils@npm:5.3.0" + dependencies: + "@types/estree": "npm:^1.0.0" + estree-walker: "npm:^2.0.2" + picomatch: "npm:^4.0.2" + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + checksum: 10c0/001834bf62d7cf5bac424d2617c113f7f7d3b2bf3c1778cbcccb72cdc957b68989f8e7747c782c2b911f1dde8257f56f8ac1e779e29e74e638e3f1e2cac2bcd0 + languageName: node + linkType: hard + +"@sindresorhus/merge-streams@npm:^2.1.0": + version: 2.3.0 + resolution: "@sindresorhus/merge-streams@npm:2.3.0" + checksum: 10c0/69ee906f3125fb2c6bb6ec5cdd84e8827d93b49b3892bce8b62267116cc7e197b5cccf20c160a1d32c26014ecd14470a72a5e3ee37a58f1d6dadc0db1ccf3894 + languageName: node + linkType: hard + +"@taplo/cli@npm:^0.7.0": + version: 0.7.0 + resolution: "@taplo/cli@npm:0.7.0" + bin: + taplo: dist/cli.js + checksum: 10c0/c5a9a34502335731e405547fe24ba1a2f867fccdf8abe4d13e261e30fad6c18a2773a961981206166fde0c85b19accef40381c189c8c6ed4952c5b082c1d4996 + languageName: node + linkType: hard + +"@tybys/wasm-util@npm:^0.10.0": + version: 0.10.0 + resolution: "@tybys/wasm-util@npm:0.10.0" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/044feba55c1e2af703aa4946139969badb183ce1a659a75ed60bc195a90e73a3f3fc53bcd643497c9954597763ddb051fec62f80962b2ca6fc716ba897dc696e + languageName: node + linkType: hard + +"@tybys/wasm-util@npm:^0.10.1": + version: 0.10.1 + resolution: "@tybys/wasm-util@npm:0.10.1" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/b255094f293794c6d2289300c5fbcafbb5532a3aed3a5ffd2f8dc1828e639b88d75f6a376dd8f94347a44813fd7a7149d8463477a9a49525c8b2dcaa38c2d1e8 + languageName: node + linkType: hard + +"@types/estree@npm:^1.0.0": + version: 1.0.8 + resolution: "@types/estree@npm:1.0.8" + checksum: 10c0/39d34d1afaa338ab9763f37ad6066e3f349444f9052b9676a7cc0252ef9485a41c6d81c9c4e0d26e9077993354edf25efc853f3224dd4b447175ef62bdcc86a5 + languageName: node + linkType: hard + +"@vercel/nft@npm:^0.29.4": + version: 0.29.4 + resolution: "@vercel/nft@npm:0.29.4" + dependencies: + "@mapbox/node-pre-gyp": "npm:^2.0.0" + "@rollup/pluginutils": "npm:^5.1.3" + acorn: "npm:^8.6.0" + acorn-import-attributes: "npm:^1.9.5" + async-sema: "npm:^3.1.1" + bindings: "npm:^1.4.0" + estree-walker: "npm:2.0.2" + glob: "npm:^10.4.5" + graceful-fs: "npm:^4.2.9" + node-gyp-build: "npm:^4.2.2" + picomatch: "npm:^4.0.2" + resolve-from: "npm:^5.0.0" + bin: + nft: out/cli.js + checksum: 10c0/84ba32c685f9d7c2c849b1e8c963d3b7eb09d122e666143ed97c3776f5b04a4745605e1d29fd81383f72b1d1c0d7d58e39f06dc92f021b5de079dfa4e8523574 + languageName: node + linkType: hard + +"abbrev@npm:^3.0.0": + version: 3.0.1 + resolution: "abbrev@npm:3.0.1" + checksum: 10c0/21ba8f574ea57a3106d6d35623f2c4a9111d9ee3e9a5be47baed46ec2457d2eac46e07a5c4a60186f88cb98abbe3e24f2d4cca70bc2b12f1692523e2209a9ccf + languageName: node + linkType: hard + +"acorn-import-attributes@npm:^1.9.5": + version: 1.9.5 + resolution: "acorn-import-attributes@npm:1.9.5" + peerDependencies: + acorn: ^8 + checksum: 10c0/5926eaaead2326d5a86f322ff1b617b0f698aa61dc719a5baa0e9d955c9885cc71febac3fb5bacff71bbf2c4f9c12db2056883c68c53eb962c048b952e1e013d + languageName: node + linkType: hard + +"acorn-walk@npm:^8.3.4": + version: 8.3.4 + resolution: "acorn-walk@npm:8.3.4" + dependencies: + acorn: "npm:^8.11.0" + checksum: 10c0/76537ac5fb2c37a64560feaf3342023dadc086c46da57da363e64c6148dc21b57d49ace26f949e225063acb6fb441eabffd89f7a3066de5ad37ab3e328927c62 + languageName: node + linkType: hard + +"acorn@npm:^8.11.0, acorn@npm:^8.15.0, acorn@npm:^8.6.0": + version: 8.15.0 + resolution: "acorn@npm:8.15.0" + bin: + acorn: bin/acorn + checksum: 10c0/dec73ff59b7d6628a01eebaece7f2bdb8bb62b9b5926dcad0f8931f2b8b79c2be21f6c68ac095592adb5adb15831a3635d9343e6a91d028bbe85d564875ec3ec + languageName: node + linkType: hard + +"agent-base@npm:^7.1.2": + version: 7.1.4 + resolution: "agent-base@npm:7.1.4" + checksum: 10c0/c2c9ab7599692d594b6a161559ada307b7a624fa4c7b03e3afdb5a5e31cd0e53269115b620fcab024c5ac6a6f37fa5eb2e004f076ad30f5f7e6b8b671f7b35fe + languageName: node + linkType: hard + +"ansi-escapes@npm:^4.3.2": + version: 4.3.2 + resolution: "ansi-escapes@npm:4.3.2" + dependencies: + type-fest: "npm:^0.21.3" + checksum: 10c0/da917be01871525a3dfcf925ae2977bc59e8c513d4423368645634bf5d4ceba5401574eb705c1e92b79f7292af5a656f78c5725a4b0e1cec97c4b413705c1d50 + languageName: node + linkType: hard + +"ansi-escapes@npm:^7.0.0": + version: 7.1.0 + resolution: "ansi-escapes@npm:7.1.0" + dependencies: + environment: "npm:^1.0.0" + checksum: 10c0/c3aeb677bb272213936e8b96250d742f4d3a17b8135189cc22295713392de84c40765599d16ad2d4e30db38283355e77c8be2aa0441b733c48d7fb960782fbe3 + languageName: node + linkType: hard + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 10c0/9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 + languageName: node + linkType: hard + +"ansi-regex@npm:^6.0.1": + version: 6.2.2 + resolution: "ansi-regex@npm:6.2.2" + checksum: 10c0/05d4acb1d2f59ab2cf4b794339c7b168890d44dda4bf0ce01152a8da0213aca207802f930442ce8cd22d7a92f44907664aac6508904e75e038fa944d2601b30f + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: "npm:^2.0.1" + checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 + languageName: node + linkType: hard + +"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": + version: 6.2.3 + resolution: "ansi-styles@npm:6.2.3" + checksum: 10c0/23b8a4ce14e18fb854693b95351e286b771d23d8844057ed2e7d083cd3e708376c3323707ec6a24365f7d7eda3ca00327fe04092e29e551499ec4c8b7bfac868 + languageName: node + linkType: hard + +"argparse@npm:^1.0.7": + version: 1.0.10 + resolution: "argparse@npm:1.0.10" + dependencies: + sprintf-js: "npm:~1.0.2" + checksum: 10c0/b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10c0/c5640c2d89045371c7cedd6a70212a04e360fd34d6edeae32f6952c63949e3525ea77dbec0289d8213a99bbaeab5abfa860b5c12cf88a2e6cf8106e90dd27a7e + languageName: node + linkType: hard + +"array-find-index@npm:^1.0.1": + version: 1.0.2 + resolution: "array-find-index@npm:1.0.2" + checksum: 10c0/86b9485c74ddd324feab807e10a6de3f9c1683856267236fac4bb4d4667ada6463e106db3f6c540ae6b720e0442b590ec701d13676df4c6af30ebf4da09b4f57 + languageName: node + linkType: hard + +"arrgv@npm:^1.0.2": + version: 1.0.2 + resolution: "arrgv@npm:1.0.2" + checksum: 10c0/7e6e782e6b749923ac7cbc4048ef6fe0844c4a59bfc8932fcd4c44566ba25eed46501f94dd7cf3c7297da88f3f599ca056bfb77d0c2484aebc92f04239f69124 + languageName: node + linkType: hard + +"arrify@npm:^3.0.0": + version: 3.0.0 + resolution: "arrify@npm:3.0.0" + checksum: 10c0/2e26601b8486f29780f1f70f7ac05a226755814c2a3ab42e196748f650af1dc310cd575a11dd4b9841c70fd7460b2dd2b8fe6fb7a3375878e2660706efafa58e + languageName: node + linkType: hard + +"async-sema@npm:^3.1.1": + version: 3.1.1 + resolution: "async-sema@npm:3.1.1" + checksum: 10c0/a16da9f7f2dbdd00a969bf264b7ad331b59df3eac2b38f529b881c5cc8662594e68ed096d927ec2aabdc13454379cdc6d677bcdb0a3d2db338fb4be17957832b + languageName: node + linkType: hard + +"ava@npm:^6.4.1": + version: 6.4.1 + resolution: "ava@npm:6.4.1" + dependencies: + "@vercel/nft": "npm:^0.29.4" + acorn: "npm:^8.15.0" + acorn-walk: "npm:^8.3.4" + ansi-styles: "npm:^6.2.1" + arrgv: "npm:^1.0.2" + arrify: "npm:^3.0.0" + callsites: "npm:^4.2.0" + cbor: "npm:^10.0.9" + chalk: "npm:^5.4.1" + chunkd: "npm:^2.0.1" + ci-info: "npm:^4.3.0" + ci-parallel-vars: "npm:^1.0.1" + cli-truncate: "npm:^4.0.0" + code-excerpt: "npm:^4.0.0" + common-path-prefix: "npm:^3.0.0" + concordance: "npm:^5.0.4" + currently-unhandled: "npm:^0.4.1" + debug: "npm:^4.4.1" + emittery: "npm:^1.2.0" + figures: "npm:^6.1.0" + globby: "npm:^14.1.0" + ignore-by-default: "npm:^2.1.0" + indent-string: "npm:^5.0.0" + is-plain-object: "npm:^5.0.0" + is-promise: "npm:^4.0.0" + matcher: "npm:^5.0.0" + memoize: "npm:^10.1.0" + ms: "npm:^2.1.3" + p-map: "npm:^7.0.3" + package-config: "npm:^5.0.0" + picomatch: "npm:^4.0.2" + plur: "npm:^5.1.0" + pretty-ms: "npm:^9.2.0" + resolve-cwd: "npm:^3.0.0" + stack-utils: "npm:^2.0.6" + strip-ansi: "npm:^7.1.0" + supertap: "npm:^3.0.1" + temp-dir: "npm:^3.0.0" + write-file-atomic: "npm:^6.0.0" + yargs: "npm:^17.7.2" + peerDependencies: + "@ava/typescript": "*" + peerDependenciesMeta: + "@ava/typescript": + optional: true + bin: + ava: entrypoints/cli.mjs + checksum: 10c0/21972df1031ef46533ea1b7daa132a5fc66841c8a221b6901163d12d2a1cac39bfd8a6d3459da7eb9344fa90fc02f237f2fe2aac8785d04bf5894fa43625be28 + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee + languageName: node + linkType: hard + +"before-after-hook@npm:^4.0.0": + version: 4.0.0 + resolution: "before-after-hook@npm:4.0.0" + checksum: 10c0/9f8ae8d1b06142bcfb9ef6625226b5e50348bb11210f266660eddcf9734e0db6f9afc4cb48397ee3f5ac0a3728f3ae401cdeea88413f7bed748a71db84657be2 + languageName: node + linkType: hard + +"bindings@npm:^1.4.0": + version: 1.5.0 + resolution: "bindings@npm:1.5.0" + dependencies: + file-uri-to-path: "npm:1.0.0" + checksum: 10c0/3dab2491b4bb24124252a91e656803eac24292473e56554e35bbfe3cc1875332cfa77600c3bac7564049dc95075bf6fcc63a4609920ff2d64d0fe405fcf0d4ba + languageName: node + linkType: hard + +"blueimp-md5@npm:^2.10.0": + version: 2.19.0 + resolution: "blueimp-md5@npm:2.19.0" + checksum: 10c0/85d04343537dd99a288c62450341dcce7380d3454c81f8e5a971ddd80307d6f9ef51b5b92ad7d48aaaa92fd6d3a1f6b2f4fada068faae646887f7bfabc17a346 + languageName: node + linkType: hard + +"brace-expansion@npm:^2.0.1": + version: 2.0.2 + resolution: "brace-expansion@npm:2.0.2" + dependencies: + balanced-match: "npm:^1.0.0" + checksum: 10c0/6d117a4c793488af86b83172deb6af143e94c17bc53b0b3cec259733923b4ca84679d506ac261f4ba3c7ed37c46018e2ff442f9ce453af8643ecd64f4a54e6cf + languageName: node + linkType: hard + +"braces@npm:^3.0.3": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 + languageName: node + linkType: hard + +"callsites@npm:^4.2.0": + version: 4.2.0 + resolution: "callsites@npm:4.2.0" + checksum: 10c0/8f7e269ec09fc0946bb22d838a8bc7932e1909ab4a833b964749f4d0e8bdeaa1f253287c4f911f61781f09620b6925ccd19a5ea4897489c4e59442c660c312a3 + languageName: node + linkType: hard + +"cbor@npm:^10.0.9": + version: 10.0.11 + resolution: "cbor@npm:10.0.11" + dependencies: + nofilter: "npm:^3.0.2" + checksum: 10c0/0cb6fb3d5e98c7af4443200ff107049f6132b5649b8a0e586940ca811e5ab5622bf3d0a36f154f43107acfd9685cc462e6eac77876ef4c060bcec96c71b90d8a + languageName: node + linkType: hard + +"chalk@npm:^5.4.1, chalk@npm:^5.6.0": + version: 5.6.2 + resolution: "chalk@npm:5.6.2" + checksum: 10c0/99a4b0f0e7991796b1e7e3f52dceb9137cae2a9dfc8fc0784a550dc4c558e15ab32ed70b14b21b52beb2679b4892b41a0aa44249bcb996f01e125d58477c6976 + languageName: node + linkType: hard + +"chardet@npm:^2.1.0": + version: 2.1.0 + resolution: "chardet@npm:2.1.0" + checksum: 10c0/d1b03e47371851ed72741a898281d58f8a9b577aeea6fdfa75a86832898b36c550b3ad057e66d50d774a9cebd9f56c66b6880e4fe75e387794538ba7565b0b6f + languageName: node + linkType: hard + +"chownr@npm:^3.0.0": + version: 3.0.0 + resolution: "chownr@npm:3.0.0" + checksum: 10c0/43925b87700f7e3893296c8e9c56cc58f926411cce3a6e5898136daaf08f08b9a8eb76d37d3267e707d0dcc17aed2e2ebdf5848c0c3ce95cf910a919935c1b10 + languageName: node + linkType: hard + +"chunkd@npm:^2.0.1": + version: 2.0.1 + resolution: "chunkd@npm:2.0.1" + checksum: 10c0/4e0c5aac6048ecedfa4cd0a5f6c4f010c70a7b7645aeca7bfeb47cb0733c3463054f0ced3f2667b2e0e67edd75d68a8e05481b01115ba3f8a952a93026254504 + languageName: node + linkType: hard + +"ci-info@npm:^4.3.0": + version: 4.3.0 + resolution: "ci-info@npm:4.3.0" + checksum: 10c0/60d3dfe95d75c01454ec1cfd5108617dd598a28a2a3e148bd7e1523c1c208b5f5a3007cafcbe293e6fd0a5a310cc32217c5dc54743eeabc0a2bec80072fc055c + languageName: node + linkType: hard + +"ci-parallel-vars@npm:^1.0.1": + version: 1.0.1 + resolution: "ci-parallel-vars@npm:1.0.1" + checksum: 10c0/80952f699cbbc146092b077b4f3e28d085620eb4e6be37f069b4dbb3db0ee70e8eec3beef4ebe70ff60631e9fc743b9d0869678489f167442cac08b260e5ac08 + languageName: node + linkType: hard + +"cli-cursor@npm:^5.0.0": + version: 5.0.0 + resolution: "cli-cursor@npm:5.0.0" + dependencies: + restore-cursor: "npm:^5.0.0" + checksum: 10c0/7ec62f69b79f6734ab209a3e4dbdc8af7422d44d360a7cb1efa8a0887bbe466a6e625650c466fe4359aee44dbe2dc0b6994b583d40a05d0808a5cb193641d220 + languageName: node + linkType: hard + +"cli-truncate@npm:^4.0.0": + version: 4.0.0 + resolution: "cli-truncate@npm:4.0.0" + dependencies: + slice-ansi: "npm:^5.0.0" + string-width: "npm:^7.0.0" + checksum: 10c0/d7f0b73e3d9b88cb496e6c086df7410b541b56a43d18ade6a573c9c18bd001b1c3fba1ad578f741a4218fdc794d042385f8ac02c25e1c295a2d8b9f3cb86eb4c + languageName: node + linkType: hard + +"cli-width@npm:^4.1.0": + version: 4.1.0 + resolution: "cli-width@npm:4.1.0" + checksum: 10c0/1fbd56413578f6117abcaf858903ba1f4ad78370a4032f916745fa2c7e390183a9d9029cf837df320b0fdce8137668e522f60a30a5f3d6529ff3872d265a955f + languageName: node + linkType: hard + +"clipanion@npm:^4.0.0-rc.4": + version: 4.0.0-rc.4 + resolution: "clipanion@npm:4.0.0-rc.4" + dependencies: + typanion: "npm:^3.8.0" + peerDependencies: + typanion: "*" + checksum: 10c0/047b415b59a5e9777d00690fba563ccc850eca6bf27790a88d1deea3ecc8a89840ae9aed554ff284cc698a9f3f20256e43c25ff4a7c4c90a71e5e7d9dca61dd1 + languageName: node + linkType: hard + +"cliui@npm:^8.0.1": + version: 8.0.1 + resolution: "cliui@npm:8.0.1" + dependencies: + string-width: "npm:^4.2.0" + strip-ansi: "npm:^6.0.1" + wrap-ansi: "npm:^7.0.0" + checksum: 10c0/4bda0f09c340cbb6dfdc1ed508b3ca080f12992c18d68c6be4d9cf51756033d5266e61ec57529e610dacbf4da1c634423b0c1b11037709cc6b09045cbd815df5 + languageName: node + linkType: hard + +"code-excerpt@npm:^4.0.0": + version: 4.0.0 + resolution: "code-excerpt@npm:4.0.0" + dependencies: + convert-to-spaces: "npm:^2.0.1" + checksum: 10c0/b6c5a06e039cecd2ab6a0e10ee0831de8362107d1f298ca3558b5f9004cb8e0260b02dd6c07f57b9a0e346c76864d2873311ee1989809fdeb05bd5fbbadde773 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: "npm:~1.1.4" + checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 + languageName: node + linkType: hard + +"colorette@npm:^2.0.20": + version: 2.0.20 + resolution: "colorette@npm:2.0.20" + checksum: 10c0/e94116ff33b0ff56f3b83b9ace895e5bf87c2a7a47b3401b8c3f3226e050d5ef76cf4072fb3325f9dc24d1698f9b730baf4e05eeaf861d74a1883073f4c98a40 + languageName: node + linkType: hard + +"commander@npm:^14.0.0": + version: 14.0.0 + resolution: "commander@npm:14.0.0" + checksum: 10c0/73c4babfa558077868d84522b11ef56834165d472b9e86a634cd4c3ae7fc72d59af6377d8878e06bd570fe8f3161eced3cbe383c38f7093272bb65bd242b595b + languageName: node + linkType: hard + +"common-path-prefix@npm:^3.0.0": + version: 3.0.0 + resolution: "common-path-prefix@npm:3.0.0" + checksum: 10c0/c4a74294e1b1570f4a8ab435285d185a03976c323caa16359053e749db4fde44e3e6586c29cd051100335e11895767cbbd27ea389108e327d62f38daf4548fdb + languageName: node + linkType: hard + +"concordance@npm:^5.0.4": + version: 5.0.4 + resolution: "concordance@npm:5.0.4" + dependencies: + date-time: "npm:^3.1.0" + esutils: "npm:^2.0.3" + fast-diff: "npm:^1.2.0" + js-string-escape: "npm:^1.0.1" + lodash: "npm:^4.17.15" + md5-hex: "npm:^3.0.1" + semver: "npm:^7.3.2" + well-known-symbols: "npm:^2.0.0" + checksum: 10c0/59b440f330df3a7c9aa148ba588b3e99aed86acab225b4f01ffcea34ace4cf11f817e31153254e8f38ed48508998dad40b9106951a743c334d751f7ab21afb8a + languageName: node + linkType: hard + +"consola@npm:^3.2.3": + version: 3.4.2 + resolution: "consola@npm:3.4.2" + checksum: 10c0/7cebe57ecf646ba74b300bcce23bff43034ed6fbec9f7e39c27cee1dc00df8a21cd336b466ad32e304ea70fba04ec9e890c200270de9a526ce021ba8a7e4c11a + languageName: node + linkType: hard + +"convert-to-spaces@npm:^2.0.1": + version: 2.0.1 + resolution: "convert-to-spaces@npm:2.0.1" + checksum: 10c0/d90aa0e3b6a27f9d5265a8d32def3c5c855b3e823a9db1f26d772f8146d6b91020a2fdfd905ce8048a73fad3aaf836fef8188c67602c374405e2ae8396c4ac46 + languageName: node + linkType: hard + +"cross-spawn@npm:^7.0.6": + version: 7.0.6 + resolution: "cross-spawn@npm:7.0.6" + dependencies: + path-key: "npm:^3.1.0" + shebang-command: "npm:^2.0.0" + which: "npm:^2.0.1" + checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 + languageName: node + linkType: hard + +"currently-unhandled@npm:^0.4.1": + version: 0.4.1 + resolution: "currently-unhandled@npm:0.4.1" + dependencies: + array-find-index: "npm:^1.0.1" + checksum: 10c0/32d197689ec32f035910202c1abb0dc6424dce01d7b51779c685119b380d98535c110ffff67a262fc7e367612a7dfd30d3d3055f9a6634b5a9dd1302de7ef11c + languageName: node + linkType: hard + +"date-time@npm:^3.1.0": + version: 3.1.0 + resolution: "date-time@npm:3.1.0" + dependencies: + time-zone: "npm:^1.0.0" + checksum: 10c0/aa3e2e930d74b0b9e90f69de7a16d3376e30f21f1f4ce9a2311d8fec32d760e776efea752dafad0ce188187265235229013036202be053fc2d7979813bfb6ded + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.4.1": + version: 4.4.1 + resolution: "debug@npm:4.4.1" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/d2b44bc1afd912b49bb7ebb0d50a860dc93a4dd7d946e8de94abc957bb63726b7dd5aa48c18c2386c379ec024c46692e15ed3ed97d481729f929201e671fcd55 + languageName: node + linkType: hard + +"detect-libc@npm:^2.0.0": + version: 2.0.4 + resolution: "detect-libc@npm:2.0.4" + checksum: 10c0/c15541f836eba4b1f521e4eecc28eefefdbc10a94d3b8cb4c507689f332cc111babb95deda66f2de050b22122113189986d5190be97d51b5a2b23b938415e67c + languageName: node + linkType: hard + +"eastasianwidth@npm:^0.2.0": + version: 0.2.0 + resolution: "eastasianwidth@npm:0.2.0" + checksum: 10c0/26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 + languageName: node + linkType: hard + +"emittery@npm:^1.2.0": + version: 1.2.0 + resolution: "emittery@npm:1.2.0" + checksum: 10c0/3b16d67b2cbbc19d44fa124684039956dc94c376cefa8c7b29f4c934d9d370e6819f642cddaa343b83b1fc03fda554a1498e12f5861caf9d6f6394ff4b6e808a + languageName: node + linkType: hard + +"emnapi@npm:^1.5.0": + version: 1.5.0 + resolution: "emnapi@npm:1.5.0" + peerDependencies: + node-addon-api: ">= 6.1.0" + peerDependenciesMeta: + node-addon-api: + optional: true + checksum: 10c0/cd910c86331e5b68b5f5f99d8a263015a357218921400e5e3720489e4830c097fea01436e7f5301ecd81185d5344bb88b9088ef731cd155a17b776724b0e6f22 + languageName: node + linkType: hard + +"emoji-regex@npm:^10.3.0": + version: 10.5.0 + resolution: "emoji-regex@npm:10.5.0" + checksum: 10c0/17cf84335a461fc23bf90575122ace2902630dc760e53299474cd3b0b5e4cfbc6c0223a389a766817538e5d20bf0f36c67b753f27c9e705056af510b8777e312 + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: 10c0/b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 + languageName: node + linkType: hard + +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 10c0/af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 + languageName: node + linkType: hard + +"environment@npm:^1.0.0": + version: 1.1.0 + resolution: "environment@npm:1.1.0" + checksum: 10c0/fb26434b0b581ab397039e51ff3c92b34924a98b2039dcb47e41b7bca577b9dbf134a8eadb364415c74464b682e2d3afe1a4c0eb9873dc44ea814c5d3103331d + languageName: node + linkType: hard + +"es-toolkit@npm:^1.39.10": + version: 1.39.10 + resolution: "es-toolkit@npm:1.39.10" + dependenciesMeta: + "@trivago/prettier-plugin-sort-imports@4.3.0": + unplugged: true + prettier-plugin-sort-re-exports@0.0.1: + unplugged: true + checksum: 10c0/244dd6be25bc8c7af9f085f5b9aae08169eca760fc7d4735020f8f711b6a572e0bf205400326fa85a7924e20747d315756dba1b3a5f0d2887231374ec3651a98 + languageName: node + linkType: hard + +"escalade@npm:^3.1.1": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 10c0/ced4dd3a78e15897ed3be74e635110bbf3b08877b0a41be50dcb325ee0e0b5f65fc2d50e9845194d7c4633f327e2e1c6cce00a71b617c5673df0374201d67f65 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^2.0.0": + version: 2.0.0 + resolution: "escape-string-regexp@npm:2.0.0" + checksum: 10c0/2530479fe8db57eace5e8646c9c2a9c80fa279614986d16dcc6bcaceb63ae77f05a851ba6c43756d816c61d7f4534baf56e3c705e3e0d884818a46808811c507 + languageName: node + linkType: hard + +"escape-string-regexp@npm:^5.0.0": + version: 5.0.0 + resolution: "escape-string-regexp@npm:5.0.0" + checksum: 10c0/6366f474c6f37a802800a435232395e04e9885919873e382b157ab7e8f0feb8fed71497f84a6f6a81a49aab41815522f5839112bd38026d203aea0c91622df95 + languageName: node + linkType: hard + +"esprima@npm:^4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: 10c0/ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 + languageName: node + linkType: hard + +"estree-walker@npm:2.0.2, estree-walker@npm:^2.0.2": + version: 2.0.2 + resolution: "estree-walker@npm:2.0.2" + checksum: 10c0/53a6c54e2019b8c914dc395890153ffdc2322781acf4bd7d1a32d7aedc1710807bdcd866ac133903d5629ec601fbb50abe8c2e5553c7f5a0afdd9b6af6c945af + languageName: node + linkType: hard + +"esutils@npm:^2.0.3": + version: 2.0.3 + resolution: "esutils@npm:2.0.3" + checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 + languageName: node + linkType: hard + +"eventemitter3@npm:^5.0.1": + version: 5.0.1 + resolution: "eventemitter3@npm:5.0.1" + checksum: 10c0/4ba5c00c506e6c786b4d6262cfbce90ddc14c10d4667e5c83ae993c9de88aa856033994dd2b35b83e8dc1170e224e66a319fa80adc4c32adcd2379bbc75da814 + languageName: node + linkType: hard + +"fast-content-type-parse@npm:^3.0.0": + version: 3.0.0 + resolution: "fast-content-type-parse@npm:3.0.0" + checksum: 10c0/06251880c83b7118af3a5e66e8bcee60d44f48b39396fc60acc2b4630bd5f3e77552b999b5c8e943d45a818854360e5e97164c374ec4b562b4df96a2cdf2e188 + languageName: node + linkType: hard + +"fast-diff@npm:^1.2.0": + version: 1.3.0 + resolution: "fast-diff@npm:1.3.0" + checksum: 10c0/5c19af237edb5d5effda008c891a18a585f74bf12953be57923f17a3a4d0979565fc64dbc73b9e20926b9d895f5b690c618cbb969af0cf022e3222471220ad29 + languageName: node + linkType: hard + +"fast-glob@npm:^3.3.3": + version: 3.3.3 + resolution: "fast-glob@npm:3.3.3" + dependencies: + "@nodelib/fs.stat": "npm:^2.0.2" + "@nodelib/fs.walk": "npm:^1.2.3" + glob-parent: "npm:^5.1.2" + merge2: "npm:^1.3.0" + micromatch: "npm:^4.0.8" + checksum: 10c0/f6aaa141d0d3384cf73cbcdfc52f475ed293f6d5b65bfc5def368b09163a9f7e5ec2b3014d80f733c405f58e470ee0cc451c2937685045cddcdeaa24199c43fe + languageName: node + linkType: hard + +"fastq@npm:^1.6.0": + version: 1.19.1 + resolution: "fastq@npm:1.19.1" + dependencies: + reusify: "npm:^1.0.4" + checksum: 10c0/ebc6e50ac7048daaeb8e64522a1ea7a26e92b3cee5cd1c7f2316cdca81ba543aa40a136b53891446ea5c3a67ec215fbaca87ad405f102dd97012f62916905630 + languageName: node + linkType: hard + +"figures@npm:^6.1.0": + version: 6.1.0 + resolution: "figures@npm:6.1.0" + dependencies: + is-unicode-supported: "npm:^2.0.0" + checksum: 10c0/9159df4264d62ef447a3931537de92f5012210cf5135c35c010df50a2169377581378149abfe1eb238bd6acbba1c0d547b1f18e0af6eee49e30363cedaffcfe4 + languageName: node + linkType: hard + +"file-uri-to-path@npm:1.0.0": + version: 1.0.0 + resolution: "file-uri-to-path@npm:1.0.0" + checksum: 10c0/3b545e3a341d322d368e880e1c204ef55f1d45cdea65f7efc6c6ce9e0c4d22d802d5629320eb779d006fe59624ac17b0e848d83cc5af7cd101f206cb704f5519 + languageName: node + linkType: hard + +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 + languageName: node + linkType: hard + +"find-up-simple@npm:^1.0.0": + version: 1.0.1 + resolution: "find-up-simple@npm:1.0.1" + checksum: 10c0/ad34de157b7db925d50ff78302fefb28e309f3bc947c93ffca0f9b0bccf9cf1a2dc57d805d5c94ec9fc60f4838f5dbdfd2a48ecd77c23015fa44c6dd5f60bc40 + languageName: node + linkType: hard + +"find-up@npm:^7.0.0": + version: 7.0.0 + resolution: "find-up@npm:7.0.0" + dependencies: + locate-path: "npm:^7.2.0" + path-exists: "npm:^5.0.0" + unicorn-magic: "npm:^0.1.0" + checksum: 10c0/e6ee3e6154560bc0ab3bc3b7d1348b31513f9bdf49a5dd2e952495427d559fa48cdf33953e85a309a323898b43fa1bfbc8b80c880dfc16068384783034030008 + languageName: node + linkType: hard + +"foreground-child@npm:^3.1.0": + version: 3.3.1 + resolution: "foreground-child@npm:3.3.1" + dependencies: + cross-spawn: "npm:^7.0.6" + signal-exit: "npm:^4.0.1" + checksum: 10c0/8986e4af2430896e65bc2788d6679067294d6aee9545daefc84923a0a4b399ad9c7a3ea7bd8c0b2b80fdf4a92de4c69df3f628233ff3224260e9c1541a9e9ed3 + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.5": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: 10c0/c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde + languageName: node + linkType: hard + +"get-east-asian-width@npm:^1.0.0, get-east-asian-width@npm:^1.3.1": + version: 1.4.0 + resolution: "get-east-asian-width@npm:1.4.0" + checksum: 10c0/4e481d418e5a32061c36fbb90d1b225a254cc5b2df5f0b25da215dcd335a3c111f0c2023ffda43140727a9cafb62dac41d022da82c08f31083ee89f714ee3b83 + languageName: node + linkType: hard + +"glob-parent@npm:^5.1.2": + version: 5.1.2 + resolution: "glob-parent@npm:5.1.2" + dependencies: + is-glob: "npm:^4.0.1" + checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee + languageName: node + linkType: hard + +"glob@npm:^10.4.5": + version: 10.4.5 + resolution: "glob@npm:10.4.5" + dependencies: + foreground-child: "npm:^3.1.0" + jackspeak: "npm:^3.1.2" + minimatch: "npm:^9.0.4" + minipass: "npm:^7.1.2" + package-json-from-dist: "npm:^1.0.0" + path-scurry: "npm:^1.11.1" + bin: + glob: dist/esm/bin.mjs + checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e + languageName: node + linkType: hard + +"globby@npm:^14.1.0": + version: 14.1.0 + resolution: "globby@npm:14.1.0" + dependencies: + "@sindresorhus/merge-streams": "npm:^2.1.0" + fast-glob: "npm:^3.3.3" + ignore: "npm:^7.0.3" + path-type: "npm:^6.0.0" + slash: "npm:^5.1.0" + unicorn-magic: "npm:^0.3.0" + checksum: 10c0/527a1063c5958255969620c6fa4444a2b2e9278caddd571d46dfbfa307cb15977afb746e84d682ba5b6c94fc081e8997f80ff05dd235441ba1cb16f86153e58e + languageName: node + linkType: hard + +"graceful-fs@npm:^4.2.9": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.5": + version: 7.0.6 + resolution: "https-proxy-agent@npm:7.0.6" + dependencies: + agent-base: "npm:^7.1.2" + debug: "npm:4" + checksum: 10c0/f729219bc735edb621fa30e6e84e60ee5d00802b8247aac0d7b79b0bd6d4b3294737a337b93b86a0bd9e68099d031858a39260c976dc14cdbba238ba1f8779ac + languageName: node + linkType: hard + +"husky@npm:^9.1.7": + version: 9.1.7 + resolution: "husky@npm:9.1.7" + bin: + husky: bin.js + checksum: 10c0/35bb110a71086c48906aa7cd3ed4913fb913823715359d65e32e0b964cb1e255593b0ae8014a5005c66a68e6fa66c38dcfa8056dbbdfb8b0187c0ffe7ee3a58f + languageName: node + linkType: hard + +"iconv-lite@npm:^0.6.3": + version: 0.6.3 + resolution: "iconv-lite@npm:0.6.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10c0/98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 + languageName: node + linkType: hard + +"ignore-by-default@npm:^2.1.0": + version: 2.1.0 + resolution: "ignore-by-default@npm:2.1.0" + checksum: 10c0/3a6040dac25ed9da39dee73bf1634fdd1e15b0eb7cf52a6bdec81c310565782d8811c104ce40acb3d690d61c5fc38a91c78e6baee830a8a2232424dbc6b66981 + languageName: node + linkType: hard + +"ignore@npm:^7.0.3": + version: 7.0.5 + resolution: "ignore@npm:7.0.5" + checksum: 10c0/ae00db89fe873064a093b8999fe4cc284b13ef2a178636211842cceb650b9c3e390d3339191acb145d81ed5379d2074840cf0c33a20bdbd6f32821f79eb4ad5d + languageName: node + linkType: hard + +"imurmurhash@npm:^0.1.4": + version: 0.1.4 + resolution: "imurmurhash@npm:0.1.4" + checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 + languageName: node + linkType: hard + +"indent-string@npm:^5.0.0": + version: 5.0.0 + resolution: "indent-string@npm:5.0.0" + checksum: 10c0/8ee77b57d92e71745e133f6f444d6fa3ed503ad0e1bcd7e80c8da08b42375c07117128d670589725ed07b1978065803fa86318c309ba45415b7fe13e7f170220 + languageName: node + linkType: hard + +"irregular-plurals@npm:^3.3.0": + version: 3.5.0 + resolution: "irregular-plurals@npm:3.5.0" + checksum: 10c0/7c033bbe7325e5a6e0a26949cc6863b6ce273403d4cd5b93bd99b33fecb6605b0884097c4259c23ed0c52c2133bf7d1cdcdd7a0630e8c325161fe269b3447918 + languageName: node + linkType: hard + +"is-extglob@npm:^2.1.1": + version: 2.1.1 + resolution: "is-extglob@npm:2.1.1" + checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 10c0/bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^4.0.0": + version: 4.0.0 + resolution: "is-fullwidth-code-point@npm:4.0.0" + checksum: 10c0/df2a717e813567db0f659c306d61f2f804d480752526886954a2a3e2246c7745fd07a52b5fecf2b68caf0a6c79dcdace6166fdf29cc76ed9975cc334f0a018b8 + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^5.0.0": + version: 5.1.0 + resolution: "is-fullwidth-code-point@npm:5.1.0" + dependencies: + get-east-asian-width: "npm:^1.3.1" + checksum: 10c0/c1172c2e417fb73470c56c431851681591f6a17233603a9e6f94b7ba870b2e8a5266506490573b607fb1081318589372034aa436aec07b465c2029c0bc7f07a4 + languageName: node + linkType: hard + +"is-glob@npm:^4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" + dependencies: + is-extglob: "npm:^2.1.1" + checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a + languageName: node + linkType: hard + +"is-number@npm:^7.0.0": + version: 7.0.0 + resolution: "is-number@npm:7.0.0" + checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 + languageName: node + linkType: hard + +"is-plain-object@npm:^5.0.0": + version: 5.0.0 + resolution: "is-plain-object@npm:5.0.0" + checksum: 10c0/893e42bad832aae3511c71fd61c0bf61aa3a6d853061c62a307261842727d0d25f761ce9379f7ba7226d6179db2a3157efa918e7fe26360f3bf0842d9f28942c + languageName: node + linkType: hard + +"is-promise@npm:^4.0.0": + version: 4.0.0 + resolution: "is-promise@npm:4.0.0" + checksum: 10c0/ebd5c672d73db781ab33ccb155fb9969d6028e37414d609b115cc534654c91ccd061821d5b987eefaa97cf4c62f0b909bb2f04db88306de26e91bfe8ddc01503 + languageName: node + linkType: hard + +"is-unicode-supported@npm:^2.0.0": + version: 2.1.0 + resolution: "is-unicode-supported@npm:2.1.0" + checksum: 10c0/a0f53e9a7c1fdbcf2d2ef6e40d4736fdffff1c9f8944c75e15425118ff3610172c87bf7bc6c34d3903b04be59790bb2212ddbe21ee65b5a97030fc50370545a5 + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 10c0/228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d + languageName: node + linkType: hard + +"isexe@npm:^3.1.1": + version: 3.1.1 + resolution: "isexe@npm:3.1.1" + checksum: 10c0/9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 + languageName: node + linkType: hard + +"jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" + dependencies: + "@isaacs/cliui": "npm:^8.0.2" + "@pkgjs/parseargs": "npm:^0.11.0" + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: 10c0/6acc10d139eaefdbe04d2f679e6191b3abf073f111edf10b1de5302c97ec93fffeb2fdd8681ed17f16268aa9dd4f8c588ed9d1d3bffbbfa6e8bf897cbb3149b9 + languageName: node + linkType: hard + +"js-string-escape@npm:^1.0.1": + version: 1.0.1 + resolution: "js-string-escape@npm:1.0.1" + checksum: 10c0/2c33b9ff1ba6b84681c51ca0997e7d5a1639813c95d5b61cb7ad47e55cc28fa4a0b1935c3d218710d8e6bcee5d0cd8c44755231e3a4e45fc604534d9595a3628 + languageName: node + linkType: hard + +"js-yaml@npm:^3.14.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" + dependencies: + argparse: "npm:^1.0.7" + esprima: "npm:^4.0.0" + bin: + js-yaml: bin/js-yaml.js + checksum: 10c0/6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b + languageName: node + linkType: hard + +"js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f + languageName: node + linkType: hard + +"json-parse-even-better-errors@npm:^4.0.0": + version: 4.0.0 + resolution: "json-parse-even-better-errors@npm:4.0.0" + checksum: 10c0/84cd9304a97e8fb2af3937bf53acb91c026aeb859703c332684e688ea60db27fc2242aa532a84e1883fdcbe1e5c1fb57c2bef38e312021aa1cd300defc63cf16 + languageName: node + linkType: hard + +"lilconfig@npm:^3.1.3": + version: 3.1.3 + resolution: "lilconfig@npm:3.1.3" + checksum: 10c0/f5604e7240c5c275743561442fbc5abf2a84ad94da0f5adc71d25e31fa8483048de3dcedcb7a44112a942fed305fd75841cdf6c9681c7f640c63f1049e9a5dcc + languageName: node + linkType: hard + +"lingui-extractor-swc@workspace:.": + version: 0.0.0-use.local + resolution: "lingui-extractor-swc@workspace:." + dependencies: + "@emnapi/core": "npm:^1.5.0" + "@emnapi/runtime": "npm:^1.5.0" + "@napi-rs/cli": "npm:^3.2.0" + "@oxc-node/core": "npm:^0.0.35" + "@taplo/cli": "npm:^0.7.0" + "@tybys/wasm-util": "npm:^0.10.0" + ava: "npm:^6.4.1" + husky: "npm:^9.1.7" + lint-staged: "npm:^16.1.6" + npm-run-all2: "npm:^8.0.4" + oxlint: "npm:^1.14.0" + prettier: "npm:^3.6.2" + tinybench: "npm:^6.0.0" + typescript: "npm:^5.9.2" + languageName: unknown + linkType: soft + +"lint-staged@npm:^16.1.6": + version: 16.1.6 + resolution: "lint-staged@npm:16.1.6" + dependencies: + chalk: "npm:^5.6.0" + commander: "npm:^14.0.0" + debug: "npm:^4.4.1" + lilconfig: "npm:^3.1.3" + listr2: "npm:^9.0.3" + micromatch: "npm:^4.0.8" + nano-spawn: "npm:^1.0.2" + pidtree: "npm:^0.6.0" + string-argv: "npm:^0.3.2" + yaml: "npm:^2.8.1" + bin: + lint-staged: bin/lint-staged.js + checksum: 10c0/e695edfec7e330f2c7cd0bb0e56220aa95d3b3655fe64a87a02140609a3594df67e1ea7abc2cc4ce69aa010418e406b1b24703ba4bd026c873a5b43a5ab16c6a + languageName: node + linkType: hard + +"listr2@npm:^9.0.3": + version: 9.0.3 + resolution: "listr2@npm:9.0.3" + dependencies: + cli-truncate: "npm:^4.0.0" + colorette: "npm:^2.0.20" + eventemitter3: "npm:^5.0.1" + log-update: "npm:^6.1.0" + rfdc: "npm:^1.4.1" + wrap-ansi: "npm:^9.0.0" + checksum: 10c0/29978a32f9fb052f1efc11e8ad7745426c5bf706af87151672cb98e49fa11dc83a44f5065267f7f20a299e0942fed85677ab368e1cef8367800243675c50a20e + languageName: node + linkType: hard + +"load-json-file@npm:^7.0.1": + version: 7.0.1 + resolution: "load-json-file@npm:7.0.1" + checksum: 10c0/7117459608a0b6329c7f78e6e1f541b3162dd901c29dd5af721fec8b270177d2e3d7999c971f344fff04daac368d052732e2c7146014bc84d15e0b636975e19a + languageName: node + linkType: hard + +"locate-path@npm:^7.2.0": + version: 7.2.0 + resolution: "locate-path@npm:7.2.0" + dependencies: + p-locate: "npm:^6.0.0" + checksum: 10c0/139e8a7fe11cfbd7f20db03923cacfa5db9e14fa14887ea121345597472b4a63c1a42a8a5187defeeff6acf98fd568da7382aa39682d38f0af27433953a97751 + languageName: node + linkType: hard + +"lodash@npm:^4.17.15": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c + languageName: node + linkType: hard + +"log-update@npm:^6.1.0": + version: 6.1.0 + resolution: "log-update@npm:6.1.0" + dependencies: + ansi-escapes: "npm:^7.0.0" + cli-cursor: "npm:^5.0.0" + slice-ansi: "npm:^7.1.0" + strip-ansi: "npm:^7.1.0" + wrap-ansi: "npm:^9.0.0" + checksum: 10c0/4b350c0a83d7753fea34dcac6cd797d1dc9603291565de009baa4aa91c0447eab0d3815a05c8ec9ac04fdfffb43c82adcdb03ec1fceafd8518e1a8c1cff4ff89 + languageName: node + linkType: hard + +"lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb + languageName: node + linkType: hard + +"matcher@npm:^5.0.0": + version: 5.0.0 + resolution: "matcher@npm:5.0.0" + dependencies: + escape-string-regexp: "npm:^5.0.0" + checksum: 10c0/eda5471fc9d5b7264d63c81727824adc3585ddb5cfdc5fce5a9b7c86f946ff181610735d330b1c37a84811df872d1290bf4e9401d2be2a414204343701144b18 + languageName: node + linkType: hard + +"md5-hex@npm:^3.0.1": + version: 3.0.1 + resolution: "md5-hex@npm:3.0.1" + dependencies: + blueimp-md5: "npm:^2.10.0" + checksum: 10c0/ee2b4d8da16b527b3a3fe4d7a96720f43afd07b46a82d49421208b5a126235fb75cfb30b80d4029514772c8844273f940bddfbf4155c787f968f3be4060d01e4 + languageName: node + linkType: hard + +"memoize@npm:^10.1.0": + version: 10.1.0 + resolution: "memoize@npm:10.1.0" + dependencies: + mimic-function: "npm:^5.0.1" + checksum: 10c0/6cf71f673b89778b05cd1131f573ba858627daa8fec60f2197328386acf7ab184a89e52527abbd5a605b5ccf5ee12dc0cb96efb651d9a30dcfcc89e9baacc84d + languageName: node + linkType: hard + +"memorystream@npm:^0.3.1": + version: 0.3.1 + resolution: "memorystream@npm:0.3.1" + checksum: 10c0/4bd164657711d9747ff5edb0508b2944414da3464b7fe21ac5c67cf35bba975c4b446a0124bd0f9a8be54cfc18faf92e92bd77563a20328b1ccf2ff04e9f39b9 + languageName: node + linkType: hard + +"merge2@npm:^1.3.0": + version: 1.4.1 + resolution: "merge2@npm:1.4.1" + checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb + languageName: node + linkType: hard + +"micromatch@npm:^4.0.8": + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" + dependencies: + braces: "npm:^3.0.3" + picomatch: "npm:^2.3.1" + checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 + languageName: node + linkType: hard + +"mimic-function@npm:^5.0.0, mimic-function@npm:^5.0.1": + version: 5.0.1 + resolution: "mimic-function@npm:5.0.1" + checksum: 10c0/f3d9464dd1816ecf6bdf2aec6ba32c0728022039d992f178237d8e289b48764fee4131319e72eedd4f7f094e22ded0af836c3187a7edc4595d28dd74368fd81d + languageName: node + linkType: hard + +"minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.4, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 + languageName: node + linkType: hard + +"minizlib@npm:^3.0.1": + version: 3.0.2 + resolution: "minizlib@npm:3.0.2" + dependencies: + minipass: "npm:^7.1.2" + checksum: 10c0/9f3bd35e41d40d02469cb30470c55ccc21cae0db40e08d1d0b1dff01cc8cc89a6f78e9c5d2b7c844e485ec0a8abc2238111213fdc5b2038e6d1012eacf316f78 + languageName: node + linkType: hard + +"mkdirp@npm:^3.0.1": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 10c0/9f2b975e9246351f5e3a40dcfac99fcd0baa31fbfab615fe059fb11e51f10e4803c63de1f384c54d656e4db31d000e4767e9ef076a22e12a641357602e31d57d + languageName: node + linkType: hard + +"ms@npm:^2.1.3": + version: 2.1.3 + resolution: "ms@npm:2.1.3" + checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 + languageName: node + linkType: hard + +"mute-stream@npm:^2.0.0": + version: 2.0.0 + resolution: "mute-stream@npm:2.0.0" + checksum: 10c0/2cf48a2087175c60c8dcdbc619908b49c07f7adcfc37d29236b0c5c612d6204f789104c98cc44d38acab7b3c96f4a3ec2cfdc4934d0738d876dbefa2a12c69f4 + languageName: node + linkType: hard + +"nano-spawn@npm:^1.0.2": + version: 1.0.3 + resolution: "nano-spawn@npm:1.0.3" + checksum: 10c0/ea18857e493710a50ded333dd71677953bd9bd9e6a17ade74af957763c50a9a02205ef31bc0d6784f5b3ad82db3d9f47531e9baac2acf01118f9b7c35bd9d5de + languageName: node + linkType: hard + +"node-fetch@npm:^2.6.7": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: "npm:^5.0.0" + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: 10c0/b55786b6028208e6fbe594ccccc213cab67a72899c9234eb59dba51062a299ea853210fcf526998eaa2867b0963ad72338824450905679ff0fa304b8c5093ae8 + languageName: node + linkType: hard + +"node-gyp-build@npm:^4.2.2": + version: 4.8.4 + resolution: "node-gyp-build@npm:4.8.4" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 10c0/444e189907ece2081fe60e75368784f7782cfddb554b60123743dfb89509df89f1f29c03bbfa16b3a3e0be3f48799a4783f487da6203245fa5bed239ba7407e1 + languageName: node + linkType: hard + +"nofilter@npm:^3.0.2": + version: 3.1.0 + resolution: "nofilter@npm:3.1.0" + checksum: 10c0/92459f3864a067b347032263f0b536223cbfc98153913b5dce350cb39c8470bc1813366e41993f22c33cc6400c0f392aa324a4b51e24c22040635c1cdb046499 + languageName: node + linkType: hard + +"nopt@npm:^8.0.0": + version: 8.1.0 + resolution: "nopt@npm:8.1.0" + dependencies: + abbrev: "npm:^3.0.0" + bin: + nopt: bin/nopt.js + checksum: 10c0/62e9ea70c7a3eb91d162d2c706b6606c041e4e7b547cbbb48f8b3695af457dd6479904d7ace600856bf923dd8d1ed0696f06195c8c20f02ac87c1da0e1d315ef + languageName: node + linkType: hard + +"npm-normalize-package-bin@npm:^4.0.0": + version: 4.0.0 + resolution: "npm-normalize-package-bin@npm:4.0.0" + checksum: 10c0/1fa546fcae8eaab61ef9b9ec237b6c795008da50e1883eae030e9e38bb04ffa32c5aabcef9a0400eae3dc1f91809bcfa85e437ce80d677c69b419d1d9cacf0ab + languageName: node + linkType: hard + +"npm-run-all2@npm:^8.0.4": + version: 8.0.4 + resolution: "npm-run-all2@npm:8.0.4" + dependencies: + ansi-styles: "npm:^6.2.1" + cross-spawn: "npm:^7.0.6" + memorystream: "npm:^0.3.1" + picomatch: "npm:^4.0.2" + pidtree: "npm:^0.6.0" + read-package-json-fast: "npm:^4.0.0" + shell-quote: "npm:^1.7.3" + which: "npm:^5.0.0" + bin: + npm-run-all: bin/npm-run-all/index.js + npm-run-all2: bin/npm-run-all/index.js + run-p: bin/run-p/index.js + run-s: bin/run-s/index.js + checksum: 10c0/cfc2987df224e55456629301991b5fa6980cc644d1836fe3c22d74a4508512737d30389795b759bb5d659103e54281c59741ecdc0241cfd2615cb9bffbf7cceb + languageName: node + linkType: hard + +"onetime@npm:^7.0.0": + version: 7.0.0 + resolution: "onetime@npm:7.0.0" + dependencies: + mimic-function: "npm:^5.0.0" + checksum: 10c0/5cb9179d74b63f52a196a2e7037ba2b9a893245a5532d3f44360012005c9cadb60851d56716ebff18a6f47129dab7168022445df47c2aff3b276d92585ed1221 + languageName: node + linkType: hard + +"oxlint@npm:^1.14.0": + version: 1.14.0 + resolution: "oxlint@npm:1.14.0" + dependencies: + "@oxlint/darwin-arm64": "npm:1.14.0" + "@oxlint/darwin-x64": "npm:1.14.0" + "@oxlint/linux-arm64-gnu": "npm:1.14.0" + "@oxlint/linux-arm64-musl": "npm:1.14.0" + "@oxlint/linux-x64-gnu": "npm:1.14.0" + "@oxlint/linux-x64-musl": "npm:1.14.0" + "@oxlint/win32-arm64": "npm:1.14.0" + "@oxlint/win32-x64": "npm:1.14.0" + peerDependencies: + oxlint-tsgolint: ">=0.1.5" + dependenciesMeta: + "@oxlint/darwin-arm64": + optional: true + "@oxlint/darwin-x64": + optional: true + "@oxlint/linux-arm64-gnu": + optional: true + "@oxlint/linux-arm64-musl": + optional: true + "@oxlint/linux-x64-gnu": + optional: true + "@oxlint/linux-x64-musl": + optional: true + "@oxlint/win32-arm64": + optional: true + "@oxlint/win32-x64": + optional: true + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + bin: + oxc_language_server: bin/oxc_language_server + oxlint: bin/oxlint + checksum: 10c0/1f1f36e5c30f6b91489b756c033c0b6dbea8955ecd160c8dfbf6aaddebabf57db411c4045833e1fa9e63f77bce40472a4cefa9c79af965627c6cd28bf34d1bf1 + languageName: node + linkType: hard + +"p-limit@npm:^4.0.0": + version: 4.0.0 + resolution: "p-limit@npm:4.0.0" + dependencies: + yocto-queue: "npm:^1.0.0" + checksum: 10c0/a56af34a77f8df2ff61ddfb29431044557fcbcb7642d5a3233143ebba805fc7306ac1d448de724352861cb99de934bc9ab74f0d16fe6a5460bdbdf938de875ad + languageName: node + linkType: hard + +"p-locate@npm:^6.0.0": + version: 6.0.0 + resolution: "p-locate@npm:6.0.0" + dependencies: + p-limit: "npm:^4.0.0" + checksum: 10c0/d72fa2f41adce59c198270aa4d3c832536c87a1806e0f69dffb7c1a7ca998fb053915ca833d90f166a8c082d3859eabfed95f01698a3214c20df6bb8de046312 + languageName: node + linkType: hard + +"p-map@npm:^7.0.3": + version: 7.0.3 + resolution: "p-map@npm:7.0.3" + checksum: 10c0/46091610da2b38ce47bcd1d8b4835a6fa4e832848a6682cf1652bc93915770f4617afc844c10a77d1b3e56d2472bb2d5622353fa3ead01a7f42b04fc8e744a5c + languageName: node + linkType: hard + +"package-config@npm:^5.0.0": + version: 5.0.0 + resolution: "package-config@npm:5.0.0" + dependencies: + find-up-simple: "npm:^1.0.0" + load-json-file: "npm:^7.0.1" + checksum: 10c0/f6c48930700b73a41d839bf2898b628d23665827488a4f34aed2d05e4a99d7a70a70ada115c3546765947fbc8accff94c0779da21ea084b25df47cb774531eeb + languageName: node + linkType: hard + +"package-json-from-dist@npm:^1.0.0": + version: 1.0.1 + resolution: "package-json-from-dist@npm:1.0.1" + checksum: 10c0/62ba2785eb655fec084a257af34dbe24292ab74516d6aecef97ef72d4897310bc6898f6c85b5cd22770eaa1ce60d55a0230e150fb6a966e3ecd6c511e23d164b + languageName: node + linkType: hard + +"parse-ms@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-ms@npm:4.0.0" + checksum: 10c0/a7900f4f1ebac24cbf5e9708c16fb2fd482517fad353aecd7aefb8c2ba2f85ce017913ccb8925d231770404780df46244ea6fec598b3bde6490882358b4d2d16 + languageName: node + linkType: hard + +"path-exists@npm:^5.0.0": + version: 5.0.0 + resolution: "path-exists@npm:5.0.0" + checksum: 10c0/b170f3060b31604cde93eefdb7392b89d832dfbc1bed717c9718cbe0f230c1669b7e75f87e19901da2250b84d092989a0f9e44d2ef41deb09aa3ad28e691a40a + languageName: node + linkType: hard + +"path-key@npm:^3.1.0": + version: 3.1.1 + resolution: "path-key@npm:3.1.1" + checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c + languageName: node + linkType: hard + +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: "npm:^10.2.0" + minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" + checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d + languageName: node + linkType: hard + +"path-type@npm:^6.0.0": + version: 6.0.0 + resolution: "path-type@npm:6.0.0" + checksum: 10c0/55baa8b1187d6dc683d5a9cfcc866168d6adff58e5db91126795376d818eee46391e00b2a4d53e44d844c7524a7d96aa68cc68f4f3e500d3d069a39e6535481c + languageName: node + linkType: hard + +"picomatch@npm:^2.3.1": + version: 2.3.1 + resolution: "picomatch@npm:2.3.1" + checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be + languageName: node + linkType: hard + +"picomatch@npm:^4.0.2": + version: 4.0.3 + resolution: "picomatch@npm:4.0.3" + checksum: 10c0/9582c951e95eebee5434f59e426cddd228a7b97a0161a375aed4be244bd3fe8e3a31b846808ea14ef2c8a2527a6eeab7b3946a67d5979e81694654f939473ae2 + languageName: node + linkType: hard + +"pidtree@npm:^0.6.0": + version: 0.6.0 + resolution: "pidtree@npm:0.6.0" + bin: + pidtree: bin/pidtree.js + checksum: 10c0/0829ec4e9209e230f74ebf4265f5ccc9ebfb488334b525cb13f86ff801dca44b362c41252cd43ae4d7653a10a5c6ab3be39d2c79064d6895e0d78dc50a5ed6e9 + languageName: node + linkType: hard + +"pirates@npm:^4.0.7": + version: 4.0.7 + resolution: "pirates@npm:4.0.7" + checksum: 10c0/a51f108dd811beb779d58a76864bbd49e239fa40c7984cd11596c75a121a8cc789f1c8971d8bb15f0dbf9d48b76c05bb62fcbce840f89b688c0fa64b37e8478a + languageName: node + linkType: hard + +"plur@npm:^5.1.0": + version: 5.1.0 + resolution: "plur@npm:5.1.0" + dependencies: + irregular-plurals: "npm:^3.3.0" + checksum: 10c0/26bb622b8545fcfd47bbf56fbcca66c08693708a232e403fa3589e00003c56c14231ac57c7588ca5db83ef4be1f61383402c4ea954000768f779f8aef6eb6da8 + languageName: node + linkType: hard + +"prettier@npm:^3.6.2": + version: 3.6.2 + resolution: "prettier@npm:3.6.2" + bin: + prettier: bin/prettier.cjs + checksum: 10c0/488cb2f2b99ec13da1e50074912870217c11edaddedeadc649b1244c749d15ba94e846423d062e2c4c9ae683e2d65f754de28889ba06e697ac4f988d44f45812 + languageName: node + linkType: hard + +"pretty-ms@npm:^9.2.0": + version: 9.2.0 + resolution: "pretty-ms@npm:9.2.0" + dependencies: + parse-ms: "npm:^4.0.0" + checksum: 10c0/ab6d066f90e9f77020426986e1b018369f41575674544c539aabec2e63a20fec01166d8cf6571d0e165ad11cfe5a8134a2a48a36d42ab291c59c6deca5264cbb + languageName: node + linkType: hard + +"queue-microtask@npm:^1.2.2": + version: 1.2.3 + resolution: "queue-microtask@npm:1.2.3" + checksum: 10c0/900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102 + languageName: node + linkType: hard + +"read-package-json-fast@npm:^4.0.0": + version: 4.0.0 + resolution: "read-package-json-fast@npm:4.0.0" + dependencies: + json-parse-even-better-errors: "npm:^4.0.0" + npm-normalize-package-bin: "npm:^4.0.0" + checksum: 10c0/8a03509ae8e852f1abc4b109c1be571dd90ac9ea65d55433b2fe287e409113441a9b00df698288fe48aa786c1a2550569d47b5ab01ed83ada073d691d5aff582 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: 10c0/83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 + languageName: node + linkType: hard + +"resolve-cwd@npm:^3.0.0": + version: 3.0.0 + resolution: "resolve-cwd@npm:3.0.0" + dependencies: + resolve-from: "npm:^5.0.0" + checksum: 10c0/e608a3ebd15356264653c32d7ecbc8fd702f94c6703ea4ac2fb81d9c359180cba0ae2e6b71faa446631ed6145454d5a56b227efc33a2d40638ac13f8beb20ee4 + languageName: node + linkType: hard + +"resolve-from@npm:^5.0.0": + version: 5.0.0 + resolution: "resolve-from@npm:5.0.0" + checksum: 10c0/b21cb7f1fb746de8107b9febab60095187781137fd803e6a59a76d421444b1531b641bba5857f5dc011974d8a5c635d61cec49e6bd3b7fc20e01f0fafc4efbf2 + languageName: node + linkType: hard + +"restore-cursor@npm:^5.0.0": + version: 5.1.0 + resolution: "restore-cursor@npm:5.1.0" + dependencies: + onetime: "npm:^7.0.0" + signal-exit: "npm:^4.1.0" + checksum: 10c0/c2ba89131eea791d1b25205bdfdc86699767e2b88dee2a590b1a6caa51737deac8bad0260a5ded2f7c074b7db2f3a626bcf1fcf3cdf35974cbeea5e2e6764f60 + languageName: node + linkType: hard + +"reusify@npm:^1.0.4": + version: 1.1.0 + resolution: "reusify@npm:1.1.0" + checksum: 10c0/4eff0d4a5f9383566c7d7ec437b671cc51b25963bd61bf127c3f3d3f68e44a026d99b8d2f1ad344afff8d278a8fe70a8ea092650a716d22287e8bef7126bb2fa + languageName: node + linkType: hard + +"rfdc@npm:^1.4.1": + version: 1.4.1 + resolution: "rfdc@npm:1.4.1" + checksum: 10c0/4614e4292356cafade0b6031527eea9bc90f2372a22c012313be1dcc69a3b90c7338158b414539be863fa95bfcb2ddcd0587be696841af4e6679d85e62c060c7 + languageName: node + linkType: hard + +"run-parallel@npm:^1.1.9": + version: 1.2.0 + resolution: "run-parallel@npm:1.2.0" + dependencies: + queue-microtask: "npm:^1.2.2" + checksum: 10c0/200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 + languageName: node + linkType: hard + +"semver@npm:^7.3.2, semver@npm:^7.5.3, semver@npm:^7.7.2": + version: 7.7.2 + resolution: "semver@npm:7.7.2" + bin: + semver: bin/semver.js + checksum: 10c0/aca305edfbf2383c22571cb7714f48cadc7ac95371b4b52362fb8eeffdfbc0de0669368b82b2b15978f8848f01d7114da65697e56cd8c37b0dab8c58e543f9ea + languageName: node + linkType: hard + +"serialize-error@npm:^7.0.1": + version: 7.0.1 + resolution: "serialize-error@npm:7.0.1" + dependencies: + type-fest: "npm:^0.13.1" + checksum: 10c0/7982937d578cd901276c8ab3e2c6ed8a4c174137730f1fb0402d005af209a0e84d04acc874e317c936724c7b5b26c7a96ff7e4b8d11a469f4924a4b0ea814c05 + languageName: node + linkType: hard + +"shebang-command@npm:^2.0.0": + version: 2.0.0 + resolution: "shebang-command@npm:2.0.0" + dependencies: + shebang-regex: "npm:^3.0.0" + checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e + languageName: node + linkType: hard + +"shebang-regex@npm:^3.0.0": + version: 3.0.0 + resolution: "shebang-regex@npm:3.0.0" + checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 + languageName: node + linkType: hard + +"shell-quote@npm:^1.7.3": + version: 1.8.3 + resolution: "shell-quote@npm:1.8.3" + checksum: 10c0/bee87c34e1e986cfb4c30846b8e6327d18874f10b535699866f368ade11ea4ee45433d97bf5eada22c4320c27df79c3a6a7eb1bf3ecfc47f2c997d9e5e2672fd + languageName: node + linkType: hard + +"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 + languageName: node + linkType: hard + +"slash@npm:^5.1.0": + version: 5.1.0 + resolution: "slash@npm:5.1.0" + checksum: 10c0/eb48b815caf0bdc390d0519d41b9e0556a14380f6799c72ba35caf03544d501d18befdeeef074bc9c052acf69654bc9e0d79d7f1de0866284137a40805299eb3 + languageName: node + linkType: hard + +"slice-ansi@npm:^5.0.0": + version: 5.0.0 + resolution: "slice-ansi@npm:5.0.0" + dependencies: + ansi-styles: "npm:^6.0.0" + is-fullwidth-code-point: "npm:^4.0.0" + checksum: 10c0/2d4d40b2a9d5cf4e8caae3f698fe24ae31a4d778701724f578e984dcb485ec8c49f0c04dab59c401821e80fcdfe89cace9c66693b0244e40ec485d72e543914f + languageName: node + linkType: hard + +"slice-ansi@npm:^7.1.0": + version: 7.1.2 + resolution: "slice-ansi@npm:7.1.2" + dependencies: + ansi-styles: "npm:^6.2.1" + is-fullwidth-code-point: "npm:^5.0.0" + checksum: 10c0/36742f2eb0c03e2e81a38ed14d13a64f7b732fe38c3faf96cce0599788a345011e840db35f1430ca606ea3f8db2abeb92a8d25c2753a819e3babaa10c2e289a2 + languageName: node + linkType: hard + +"sprintf-js@npm:~1.0.2": + version: 1.0.3 + resolution: "sprintf-js@npm:1.0.3" + checksum: 10c0/ecadcfe4c771890140da5023d43e190b7566d9cf8b2d238600f31bec0fc653f328da4450eb04bd59a431771a8e9cc0e118f0aa3974b683a4981b4e07abc2a5bb + languageName: node + linkType: hard + +"stack-utils@npm:^2.0.6": + version: 2.0.6 + resolution: "stack-utils@npm:2.0.6" + dependencies: + escape-string-regexp: "npm:^2.0.0" + checksum: 10c0/651c9f87667e077584bbe848acaecc6049bc71979f1e9a46c7b920cad4431c388df0f51b8ad7cfd6eed3db97a2878d0fc8b3122979439ea8bac29c61c95eec8a + languageName: node + linkType: hard + +"string-argv@npm:^0.3.2": + version: 0.3.2 + resolution: "string-argv@npm:0.3.2" + checksum: 10c0/75c02a83759ad1722e040b86823909d9a2fc75d15dd71ec4b537c3560746e33b5f5a07f7332d1e3f88319909f82190843aa2f0a0d8c8d591ec08e93d5b8dec82 + languageName: node + linkType: hard + +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: "npm:^8.0.0" + is-fullwidth-code-point: "npm:^3.0.0" + strip-ansi: "npm:^6.0.1" + checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b + languageName: node + linkType: hard + +"string-width@npm:^5.0.1, string-width@npm:^5.1.2": + version: 5.1.2 + resolution: "string-width@npm:5.1.2" + dependencies: + eastasianwidth: "npm:^0.2.0" + emoji-regex: "npm:^9.2.2" + strip-ansi: "npm:^7.0.1" + checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca + languageName: node + linkType: hard + +"string-width@npm:^7.0.0": + version: 7.2.0 + resolution: "string-width@npm:7.2.0" + dependencies: + emoji-regex: "npm:^10.3.0" + get-east-asian-width: "npm:^1.0.0" + strip-ansi: "npm:^7.1.0" + checksum: 10c0/eb0430dd43f3199c7a46dcbf7a0b34539c76fe3aa62763d0b0655acdcbdf360b3f66f3d58ca25ba0205f42ea3491fa00f09426d3b7d3040e506878fc7664c9b9 + languageName: node + linkType: hard + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: "npm:^5.0.1" + checksum: 10c0/1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 + languageName: node + linkType: hard + +"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": + version: 7.1.2 + resolution: "strip-ansi@npm:7.1.2" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10c0/0d6d7a023de33368fd042aab0bf48f4f4077abdfd60e5393e73c7c411e85e1b3a83507c11af2e656188511475776215df9ca589b4da2295c9455cc399ce1858b + languageName: node + linkType: hard + +"supertap@npm:^3.0.1": + version: 3.0.1 + resolution: "supertap@npm:3.0.1" + dependencies: + indent-string: "npm:^5.0.0" + js-yaml: "npm:^3.14.1" + serialize-error: "npm:^7.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10c0/8164674f2e280cab875f0fef5bb36c15553c13e29697ff92f4e0d6bc62149f0303a89eee47535413ed145ea72e14a24d065bab233059d48a499ec5ebb4566b0f + languageName: node + linkType: hard + +"tar@npm:^7.4.0": + version: 7.4.3 + resolution: "tar@npm:7.4.3" + dependencies: + "@isaacs/fs-minipass": "npm:^4.0.0" + chownr: "npm:^3.0.0" + minipass: "npm:^7.1.2" + minizlib: "npm:^3.0.1" + mkdirp: "npm:^3.0.1" + yallist: "npm:^5.0.0" + checksum: 10c0/d4679609bb2a9b48eeaf84632b6d844128d2412b95b6de07d53d8ee8baf4ca0857c9331dfa510390a0727b550fd543d4d1a10995ad86cdf078423fbb8d99831d + languageName: node + linkType: hard + +"temp-dir@npm:^3.0.0": + version: 3.0.0 + resolution: "temp-dir@npm:3.0.0" + checksum: 10c0/a86978a400984cd5f315b77ebf3fe53bb58c61f192278cafcb1f3fb32d584a21dc8e08b93171d7874b7cc972234d3455c467306cc1bfc4524b622e5ad3bfd671 + languageName: node + linkType: hard + +"time-zone@npm:^1.0.0": + version: 1.0.0 + resolution: "time-zone@npm:1.0.0" + checksum: 10c0/d00ebd885039109011b6e2423ebbf225160927333c2ade6d833e9cc4676db20759f1f3855fafde00d1bd668c243a6aa68938ce71fe58aab0d514e820d59c1d81 + languageName: node + linkType: hard + +"tinybench@npm:^6.0.0": + version: 6.0.0 + resolution: "tinybench@npm:6.0.0" + checksum: 10c0/d0a0c3cf53881d227e8bdeae03e456e6ad0abc362440d296efc8fa14f8acdb97304c547bae90db2c56d18697432f359785f5866ff35ed2ae539380f8f5d4eb19 + languageName: node + linkType: hard + +"to-regex-range@npm:^5.0.1": + version: 5.0.1 + resolution: "to-regex-range@npm:5.0.1" + dependencies: + is-number: "npm:^7.0.0" + checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 + languageName: node + linkType: hard + +"tr46@npm:~0.0.3": + version: 0.0.3 + resolution: "tr46@npm:0.0.3" + checksum: 10c0/047cb209a6b60c742f05c9d3ace8fa510bff609995c129a37ace03476a9b12db4dbf975e74600830ef0796e18882b2381fb5fb1f6b4f96b832c374de3ab91a11 + languageName: node + linkType: hard + +"tslib@npm:^2.4.0": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 + languageName: node + linkType: hard + +"typanion@npm:^3.14.0, typanion@npm:^3.8.0": + version: 3.14.0 + resolution: "typanion@npm:3.14.0" + checksum: 10c0/8b03b19844e6955bfd906c31dc781bae6d7f1fb3ce4fe24b7501557013d4889ae5cefe671dafe98d87ead0adceb8afcb8bc16df7dc0bd2b7331bac96f3a7cae2 + languageName: node + linkType: hard + +"type-fest@npm:^0.13.1": + version: 0.13.1 + resolution: "type-fest@npm:0.13.1" + checksum: 10c0/0c0fa07ae53d4e776cf4dac30d25ad799443e9eef9226f9fddbb69242db86b08584084a99885cfa5a9dfe4c063ebdc9aa7b69da348e735baede8d43f1aeae93b + languageName: node + linkType: hard + +"type-fest@npm:^0.21.3": + version: 0.21.3 + resolution: "type-fest@npm:0.21.3" + checksum: 10c0/902bd57bfa30d51d4779b641c2bc403cdf1371fb9c91d3c058b0133694fcfdb817aef07a47f40faf79039eecbaa39ee9d3c532deff244f3a19ce68cea71a61e8 + languageName: node + linkType: hard + +"typescript@npm:^5.9.2": + version: 5.9.2 + resolution: "typescript@npm:5.9.2" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/cd635d50f02d6cf98ed42de2f76289701c1ec587a363369255f01ed15aaf22be0813226bff3c53e99d971f9b540e0b3cc7583dbe05faded49b1b0bed2f638a18 + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A^5.9.2#optional!builtin": + version: 5.9.2 + resolution: "typescript@patch:typescript@npm%3A5.9.2#optional!builtin::version=5.9.2&hash=5786d5" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 10c0/34d2a8e23eb8e0d1875072064d5e1d9c102e0bdce56a10a25c0b917b8aa9001a9cf5c225df12497e99da107dc379360bc138163c66b55b95f5b105b50578067e + languageName: node + linkType: hard + +"unicorn-magic@npm:^0.1.0": + version: 0.1.0 + resolution: "unicorn-magic@npm:0.1.0" + checksum: 10c0/e4ed0de05b0a05e735c7d8a2930881e5efcfc3ec897204d5d33e7e6247f4c31eac92e383a15d9a6bccb7319b4271ee4bea946e211bf14951fec6ff2cbbb66a92 + languageName: node + linkType: hard + +"unicorn-magic@npm:^0.3.0": + version: 0.3.0 + resolution: "unicorn-magic@npm:0.3.0" + checksum: 10c0/0a32a997d6c15f1c2a077a15b1c4ca6f268d574cf5b8975e778bb98e6f8db4ef4e86dfcae4e158cd4c7e38fb4dd383b93b13eefddc7f178dea13d3ac8a603271 + languageName: node + linkType: hard + +"universal-user-agent@npm:^7.0.0, universal-user-agent@npm:^7.0.2": + version: 7.0.3 + resolution: "universal-user-agent@npm:7.0.3" + checksum: 10c0/6043be466a9bb96c0ce82392842d9fddf4c37e296f7bacc2cb25f47123990eb436c82df824644f9c5070a94dbdb117be17f66d54599ab143648ec57ef93dbcc8 + languageName: node + linkType: hard + +"webidl-conversions@npm:^3.0.0": + version: 3.0.1 + resolution: "webidl-conversions@npm:3.0.1" + checksum: 10c0/5612d5f3e54760a797052eb4927f0ddc01383550f542ccd33d5238cfd65aeed392a45ad38364970d0a0f4fea32e1f4d231b3d8dac4a3bdd385e5cf802ae097db + languageName: node + linkType: hard + +"well-known-symbols@npm:^2.0.0": + version: 2.0.0 + resolution: "well-known-symbols@npm:2.0.0" + checksum: 10c0/cb6c12e98877e8952ec28d13ae6f4fdb54ae1cb49b16a728720276dadd76c930e6cb0e174af3a4620054dd2752546f842540122920c6e31410208abd4958ee6b + languageName: node + linkType: hard + +"whatwg-url@npm:^5.0.0": + version: 5.0.0 + resolution: "whatwg-url@npm:5.0.0" + dependencies: + tr46: "npm:~0.0.3" + webidl-conversions: "npm:^3.0.0" + checksum: 10c0/1588bed84d10b72d5eec1d0faa0722ba1962f1821e7539c535558fb5398d223b0c50d8acab950b8c488b4ba69043fd833cc2697056b167d8ad46fac3995a55d5 + languageName: node + linkType: hard + +"which@npm:^2.0.1": + version: 2.0.2 + resolution: "which@npm:2.0.2" + dependencies: + isexe: "npm:^2.0.0" + bin: + node-which: ./bin/node-which + checksum: 10c0/66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f + languageName: node + linkType: hard + +"which@npm:^5.0.0": + version: 5.0.0 + resolution: "which@npm:5.0.0" + dependencies: + isexe: "npm:^3.1.1" + bin: + node-which: bin/which.js + checksum: 10c0/e556e4cd8b7dbf5df52408c9a9dd5ac6518c8c5267c8953f5b0564073c66ed5bf9503b14d876d0e9c7844d4db9725fb0dcf45d6e911e17e26ab363dc3965ae7b + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da + languageName: node + linkType: hard + +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: "npm:^4.0.0" + string-width: "npm:^4.1.0" + strip-ansi: "npm:^6.0.0" + checksum: 10c0/baad244e6e33335ea24e86e51868fe6823626e3a3c88d9a6674642afff1d34d9a154c917e74af8d845fd25d170c4ea9cf69a47133c3f3656e1252b3d462d9f6c + languageName: node + linkType: hard + +"wrap-ansi@npm:^8.1.0": + version: 8.1.0 + resolution: "wrap-ansi@npm:8.1.0" + dependencies: + ansi-styles: "npm:^6.1.0" + string-width: "npm:^5.0.1" + strip-ansi: "npm:^7.0.1" + checksum: 10c0/138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 + languageName: node + linkType: hard + +"wrap-ansi@npm:^9.0.0": + version: 9.0.2 + resolution: "wrap-ansi@npm:9.0.2" + dependencies: + ansi-styles: "npm:^6.2.1" + string-width: "npm:^7.0.0" + strip-ansi: "npm:^7.1.0" + checksum: 10c0/3305839b9a0d6fb930cb63a52f34d3936013d8b0682ff3ec133c9826512620f213800ffa19ea22904876d5b7e9a3c1f40682f03597d986a4ca881fa7b033688c + languageName: node + linkType: hard + +"write-file-atomic@npm:^6.0.0": + version: 6.0.0 + resolution: "write-file-atomic@npm:6.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + signal-exit: "npm:^4.0.1" + checksum: 10c0/ae2f1c27474758a9aca92037df6c1dd9cb94c4e4983451210bd686bfe341f142662f6aa5913095e572ab037df66b1bfe661ed4ce4c0369ed0e8219e28e141786 + languageName: node + linkType: hard + +"y18n@npm:^5.0.5": + version: 5.0.8 + resolution: "y18n@npm:5.0.8" + checksum: 10c0/4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 + languageName: node + linkType: hard + +"yallist@npm:^5.0.0": + version: 5.0.0 + resolution: "yallist@npm:5.0.0" + checksum: 10c0/a499c81ce6d4a1d260d4ea0f6d49ab4da09681e32c3f0472dee16667ed69d01dae63a3b81745a24bd78476ec4fcf856114cb4896ace738e01da34b2c42235416 + languageName: node + linkType: hard + +"yaml@npm:^2.8.1": + version: 2.8.1 + resolution: "yaml@npm:2.8.1" + bin: + yaml: bin.mjs + checksum: 10c0/7c587be00d9303d2ae1566e03bc5bc7fe978ba0d9bf39cc418c3139d37929dfcb93a230d9749f2cb578b6aa5d9ebebc322415e4b653cb83acd8bc0bc321707f3 + languageName: node + linkType: hard + +"yargs-parser@npm:^21.1.1": + version: 21.1.1 + resolution: "yargs-parser@npm:21.1.1" + checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 + languageName: node + linkType: hard + +"yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: "npm:^8.0.1" + escalade: "npm:^3.1.1" + get-caller-file: "npm:^2.0.5" + require-directory: "npm:^2.1.1" + string-width: "npm:^4.2.3" + y18n: "npm:^5.0.5" + yargs-parser: "npm:^21.1.1" + checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 + languageName: node + linkType: hard + +"yocto-queue@npm:^1.0.0": + version: 1.2.1 + resolution: "yocto-queue@npm:1.2.1" + checksum: 10c0/5762caa3d0b421f4bdb7a1926b2ae2189fc6e4a14469258f183600028eb16db3e9e0306f46e8ebf5a52ff4b81a881f22637afefbef5399d6ad440824e9b27f9f + languageName: node + linkType: hard + +"yoctocolors-cjs@npm:^2.1.2": + version: 2.1.3 + resolution: "yoctocolors-cjs@npm:2.1.3" + checksum: 10c0/584168ef98eb5d913473a4858dce128803c4a6cd87c0f09e954fa01126a59a33ab9e513b633ad9ab953786ed16efdd8c8700097a51635aafaeed3fef7712fa79 + languageName: node + linkType: hard diff --git a/package.json b/package.json index 25d9302..7795e96 100644 --- a/package.json +++ b/package.json @@ -47,5 +47,8 @@ "typescript": "^5.9.3", "vitest": "^4.0.18" }, + "dependencies": { + "@napi-rs/cli": "^3.5.1" + }, "packageManager": "yarn@4.12.0+sha512.f45ab632439a67f8bc759bf32ead036a1f413287b9042726b7cc4818b7b49e14e9423ba49b18f9e06ea4941c1ad062385b1d8760a8d5091a1a31e5f6219afca8" } diff --git a/yarn.lock b/yarn.lock index 299f113..b4a92a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,34 @@ __metadata: version: 8 cacheKey: 10c0 +"@emnapi/core@npm:^1.7.1": + version: 1.8.1 + resolution: "@emnapi/core@npm:1.8.1" + dependencies: + "@emnapi/wasi-threads": "npm:1.1.0" + tslib: "npm:^2.4.0" + checksum: 10c0/2c242f4b49779bac403e1cbcc98edacdb1c8ad36562408ba9a20663824669e930bc8493be46a2522d9dc946b8d96cd7073970bae914928c7671b5221c85b432e + languageName: node + linkType: hard + +"@emnapi/runtime@npm:^1.7.1": + version: 1.8.1 + resolution: "@emnapi/runtime@npm:1.8.1" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/f4929d75e37aafb24da77d2f58816761fe3f826aad2e37fa6d4421dac9060cbd5098eea1ac3c9ecc4526b89deb58153852fa432f87021dc57863f2ff726d713f + languageName: node + linkType: hard + +"@emnapi/wasi-threads@npm:1.1.0": + version: 1.1.0 + resolution: "@emnapi/wasi-threads@npm:1.1.0" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/e6d54bf2b1e64cdd83d2916411e44e579b6ae35d5def0dea61a3c452d9921373044dff32a8b8473ae60c80692bdc39323e98b96a3f3d87ba6886b24dd0ef7ca1 + languageName: node + linkType: hard + "@esbuild/aix-ppc64@npm:0.27.3": version: 0.27.3 resolution: "@esbuild/aix-ppc64@npm:0.27.3" @@ -75,187 +103,1128 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/linux-ia32@npm:0.27.3" - conditions: os=linux & cpu=ia32 +"@esbuild/linux-ia32@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-ia32@npm:0.27.3" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-loong64@npm:0.27.3" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-mips64el@npm:0.27.3" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-ppc64@npm:0.27.3" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-riscv64@npm:0.27.3" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-s390x@npm:0.27.3" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-x64@npm:0.27.3" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/netbsd-arm64@npm:0.27.3" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/netbsd-x64@npm:0.27.3" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/openbsd-arm64@npm:0.27.3" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/openbsd-x64@npm:0.27.3" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openharmony-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/openharmony-arm64@npm:0.27.3" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/sunos-x64@npm:0.27.3" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/win32-arm64@npm:0.27.3" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/win32-ia32@npm:0.27.3" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/win32-x64@npm:0.27.3" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@inquirer/ansi@npm:^2.0.3": + version: 2.0.3 + resolution: "@inquirer/ansi@npm:2.0.3" + checksum: 10c0/69c87abf39878fc68b07f9171249434dc055b95dbcafe81dc6f273aaa59343ce192e50063e7438ad6f3792d059731558f1537124f8230f219676108df3d3396c + languageName: node + linkType: hard + +"@inquirer/checkbox@npm:^5.0.4": + version: 5.0.4 + resolution: "@inquirer/checkbox@npm:5.0.4" + dependencies: + "@inquirer/ansi": "npm:^2.0.3" + "@inquirer/core": "npm:^11.1.1" + "@inquirer/figures": "npm:^2.0.3" + "@inquirer/type": "npm:^4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/d09b1091b7cfc08d44e2307217a45ae43595c65c04a07411bab3400402627cc8d7c5b4eb248f177c7bbe6e024df560a2c042ee8a5884338638b10af3908f27c4 + languageName: node + linkType: hard + +"@inquirer/confirm@npm:^6.0.4": + version: 6.0.4 + resolution: "@inquirer/confirm@npm:6.0.4" + dependencies: + "@inquirer/core": "npm:^11.1.1" + "@inquirer/type": "npm:^4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/9396088b293f1c2a1272df96acbc6c83a33aa78f1063ee4f0bef86a5bbef3888ed68ad6698bca8132edfbe85584137a1783573ba11a611b965e507a349c9cf2f + languageName: node + linkType: hard + +"@inquirer/core@npm:^11.1.1": + version: 11.1.1 + resolution: "@inquirer/core@npm:11.1.1" + dependencies: + "@inquirer/ansi": "npm:^2.0.3" + "@inquirer/figures": "npm:^2.0.3" + "@inquirer/type": "npm:^4.0.3" + cli-width: "npm:^4.1.0" + mute-stream: "npm:^3.0.0" + signal-exit: "npm:^4.1.0" + wrap-ansi: "npm:^9.0.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/e8d909c32400092a66a51aea8f8f808372e4fc95635342c07b2a5957e487b1ececa8024341240d538056c63f31414b9a18710860473973685de733f029be4b36 + languageName: node + linkType: hard + +"@inquirer/editor@npm:^5.0.4": + version: 5.0.4 + resolution: "@inquirer/editor@npm:5.0.4" + dependencies: + "@inquirer/core": "npm:^11.1.1" + "@inquirer/external-editor": "npm:^2.0.3" + "@inquirer/type": "npm:^4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/012ef227807da127f1f585b069b28b88730398f555e76dfd74b70d5dfc377a0943bc5acd81db2efaa1b6f999f45222acb6ac6f0b2b05505f695f62a69c05d249 + languageName: node + linkType: hard + +"@inquirer/expand@npm:^5.0.4": + version: 5.0.4 + resolution: "@inquirer/expand@npm:5.0.4" + dependencies: + "@inquirer/core": "npm:^11.1.1" + "@inquirer/type": "npm:^4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/f4083ca5233a808606ccd5428873254dc67040139b5cb96a4e1823979a341b637e4187b99a81dc57a271275d7a4b2bf232de85c7df9f5389a9a1ea9fe44939e8 + languageName: node + linkType: hard + +"@inquirer/external-editor@npm:^2.0.3": + version: 2.0.3 + resolution: "@inquirer/external-editor@npm:2.0.3" + dependencies: + chardet: "npm:^2.1.1" + iconv-lite: "npm:^0.7.2" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/b1de771f92b2b7f61f9174b704159ba57b8490281b1d18060abbabde065425d6dbde6e061d319b117f541db3821ec1dc80089530effa234490b2aa06ea13976c + languageName: node + linkType: hard + +"@inquirer/figures@npm:^2.0.3": + version: 2.0.3 + resolution: "@inquirer/figures@npm:2.0.3" + checksum: 10c0/f316119e5cefd4d2d03dead3658b7ff02d34e0a41caa47f72a3ca095c1046ea252a62e9343f5847677ad6ddc490509fd7c10e845458d5af8936130ffb3a4810c + languageName: node + linkType: hard + +"@inquirer/input@npm:^5.0.4": + version: 5.0.4 + resolution: "@inquirer/input@npm:5.0.4" + dependencies: + "@inquirer/core": "npm:^11.1.1" + "@inquirer/type": "npm:^4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/4d4df38f7a983e98856bcf376fb5d2e94dcf35392275a60590c4ec2cca90f54b02bc5244351572e69aa9ecdfcb9ecddbe4d1ee51d79b610514b4be3a1d7a86fc + languageName: node + linkType: hard + +"@inquirer/number@npm:^4.0.4": + version: 4.0.4 + resolution: "@inquirer/number@npm:4.0.4" + dependencies: + "@inquirer/core": "npm:^11.1.1" + "@inquirer/type": "npm:^4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/01476614fdf2b4f9d63bba3d6aabd41b2d6688563a927e4e9bcf1a3408d47448a78c16d67fdb625cc630318d3f2b0d2158c5eece259a291b7399dcef2706218f + languageName: node + linkType: hard + +"@inquirer/password@npm:^5.0.4": + version: 5.0.4 + resolution: "@inquirer/password@npm:5.0.4" + dependencies: + "@inquirer/ansi": "npm:^2.0.3" + "@inquirer/core": "npm:^11.1.1" + "@inquirer/type": "npm:^4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/d3b07d72f6b2097db54a41926922f0a542e8f9ba107137c0d59ac8932452bc81b94f16c8be395bbd8b27cf31bd0ebbd45ee807feb71b16bb21af8f68e712a3e5 + languageName: node + linkType: hard + +"@inquirer/prompts@npm:^8.0.0": + version: 8.2.0 + resolution: "@inquirer/prompts@npm:8.2.0" + dependencies: + "@inquirer/checkbox": "npm:^5.0.4" + "@inquirer/confirm": "npm:^6.0.4" + "@inquirer/editor": "npm:^5.0.4" + "@inquirer/expand": "npm:^5.0.4" + "@inquirer/input": "npm:^5.0.4" + "@inquirer/number": "npm:^4.0.4" + "@inquirer/password": "npm:^5.0.4" + "@inquirer/rawlist": "npm:^5.2.0" + "@inquirer/search": "npm:^4.1.0" + "@inquirer/select": "npm:^5.0.4" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/f39a385298fb82994dfc21436e26da61c308952ad0538f4038110f3eb20113bcb0f6601068286b10d8ba53c62a28e706f338af80df86db47393a518d644ebb2d + languageName: node + linkType: hard + +"@inquirer/rawlist@npm:^5.2.0": + version: 5.2.0 + resolution: "@inquirer/rawlist@npm:5.2.0" + dependencies: + "@inquirer/core": "npm:^11.1.1" + "@inquirer/type": "npm:^4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/e0cd116b89fce2dbd4b7d3842ec8a4bd0182532df0e45261dc4525e3a13d749fe5af49fb878cf6dc1e2a7876d436f6a0fc2a42ca574cdbdded780c270e043e8f + languageName: node + linkType: hard + +"@inquirer/search@npm:^4.1.0": + version: 4.1.0 + resolution: "@inquirer/search@npm:4.1.0" + dependencies: + "@inquirer/core": "npm:^11.1.1" + "@inquirer/figures": "npm:^2.0.3" + "@inquirer/type": "npm:^4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/bdece740b9209058f8d56f26ac6d83b429f523ecda5a4e905f38c6ecaa3cac5671dce3bcd864a7f3db098456b6c630a634f249b8227e63e3ed1bf150273e4905 + languageName: node + linkType: hard + +"@inquirer/select@npm:^5.0.4": + version: 5.0.4 + resolution: "@inquirer/select@npm:5.0.4" + dependencies: + "@inquirer/ansi": "npm:^2.0.3" + "@inquirer/core": "npm:^11.1.1" + "@inquirer/figures": "npm:^2.0.3" + "@inquirer/type": "npm:^4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/85a776848ae58ee48a104704fabc195d0a52c5ac80216b252e71271e033cd8ff170eac20bc6763fd56bd8a6357a3c6a60ba85a3335526af4b654e1385da29496 + languageName: node + linkType: hard + +"@inquirer/type@npm:^4.0.3": + version: 4.0.3 + resolution: "@inquirer/type@npm:4.0.3" + peerDependencies: + "@types/node": ">=18" + peerDependenciesMeta: + "@types/node": + optional: true + checksum: 10c0/98f893c986194085a9b31916efe231fb6d4a4f7c01a3e698aab6ef6177cffbc19e10d76131968837a23ef620ef62fb2285884049f8d6f0962a39d8c338840041 + languageName: node + linkType: hard + +"@isaacs/balanced-match@npm:^4.0.1": + version: 4.0.1 + resolution: "@isaacs/balanced-match@npm:4.0.1" + checksum: 10c0/7da011805b259ec5c955f01cee903da72ad97c5e6f01ca96197267d3f33103d5b2f8a1af192140f3aa64526c593c8d098ae366c2b11f7f17645d12387c2fd420 + languageName: node + linkType: hard + +"@isaacs/brace-expansion@npm:^5.0.1": + version: 5.0.1 + resolution: "@isaacs/brace-expansion@npm:5.0.1" + dependencies: + "@isaacs/balanced-match": "npm:^4.0.1" + checksum: 10c0/e5d67c7bbf1f17b88132a35bc638af306d48acbb72810d48fa6e6edd8ab375854773108e8bf70f021f7ef6a8273455a6d1f0c3b5aa2aff06ce7894049ab77fb8 + languageName: node + linkType: hard + +"@isaacs/fs-minipass@npm:^4.0.0": + version: 4.0.1 + resolution: "@isaacs/fs-minipass@npm:4.0.1" + dependencies: + minipass: "npm:^7.0.4" + checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.5.5": + version: 1.5.5 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.5" + checksum: 10c0/f9e538f302b63c0ebc06eecb1dd9918dd4289ed36147a0ddce35d6ea4d7ebbda243cda7b2213b6a5e1d8087a298d5cf630fb2bd39329cdecb82017023f6081a0 + languageName: node + linkType: hard + +"@lingui/swc-plugin@workspace:.": + version: 0.0.0-use.local + resolution: "@lingui/swc-plugin@workspace:." + dependencies: + "@napi-rs/cli": "npm:^3.5.1" + "@swc/core": "npm:^1.15.11" + "@types/node": "npm:22.13.14" + typescript: "npm:^5.9.3" + vitest: "npm:^4.0.18" + peerDependencies: + "@lingui/core": 6 + peerDependenciesMeta: + "@swc/core": + optional: true + next: + optional: true + languageName: unknown + linkType: soft + +"@napi-rs/cli@npm:^3.5.1": + version: 3.5.1 + resolution: "@napi-rs/cli@npm:3.5.1" + dependencies: + "@inquirer/prompts": "npm:^8.0.0" + "@napi-rs/cross-toolchain": "npm:^1.0.3" + "@napi-rs/wasm-tools": "npm:^1.0.1" + "@octokit/rest": "npm:^22.0.1" + clipanion: "npm:^4.0.0-rc.4" + colorette: "npm:^2.0.20" + emnapi: "npm:^1.7.1" + es-toolkit: "npm:^1.41.0" + js-yaml: "npm:^4.1.0" + obug: "npm:^2.0.0" + semver: "npm:^7.7.3" + typanion: "npm:^3.14.0" + peerDependencies: + "@emnapi/runtime": ^1.7.1 + peerDependenciesMeta: + "@emnapi/runtime": + optional: true + bin: + napi: dist/cli.js + napi-raw: cli.mjs + checksum: 10c0/b67d057a052a28917c90653101dfcff9e7f60342b1120f4613d571533cf8080116d97d9825ad88d672c79a5165a0edf7aec4eb4db702464c0551ed48c1b81adf + languageName: node + linkType: hard + +"@napi-rs/cross-toolchain@npm:^1.0.3": + version: 1.0.3 + resolution: "@napi-rs/cross-toolchain@npm:1.0.3" + dependencies: + "@napi-rs/lzma": "npm:^1.4.5" + "@napi-rs/tar": "npm:^1.1.0" + debug: "npm:^4.4.1" + peerDependencies: + "@napi-rs/cross-toolchain-arm64-target-aarch64": ^1.0.3 + "@napi-rs/cross-toolchain-arm64-target-armv7": ^1.0.3 + "@napi-rs/cross-toolchain-arm64-target-ppc64le": ^1.0.3 + "@napi-rs/cross-toolchain-arm64-target-s390x": ^1.0.3 + "@napi-rs/cross-toolchain-arm64-target-x86_64": ^1.0.3 + "@napi-rs/cross-toolchain-x64-target-aarch64": ^1.0.3 + "@napi-rs/cross-toolchain-x64-target-armv7": ^1.0.3 + "@napi-rs/cross-toolchain-x64-target-ppc64le": ^1.0.3 + "@napi-rs/cross-toolchain-x64-target-s390x": ^1.0.3 + "@napi-rs/cross-toolchain-x64-target-x86_64": ^1.0.3 + peerDependenciesMeta: + "@napi-rs/cross-toolchain-arm64-target-aarch64": + optional: true + "@napi-rs/cross-toolchain-arm64-target-armv7": + optional: true + "@napi-rs/cross-toolchain-arm64-target-ppc64le": + optional: true + "@napi-rs/cross-toolchain-arm64-target-s390x": + optional: true + "@napi-rs/cross-toolchain-arm64-target-x86_64": + optional: true + "@napi-rs/cross-toolchain-x64-target-aarch64": + optional: true + "@napi-rs/cross-toolchain-x64-target-armv7": + optional: true + "@napi-rs/cross-toolchain-x64-target-ppc64le": + optional: true + "@napi-rs/cross-toolchain-x64-target-s390x": + optional: true + "@napi-rs/cross-toolchain-x64-target-x86_64": + optional: true + checksum: 10c0/fcc7877c1e47ba6bf4801a4154240d3130703524b1fed17e736126ce58b53960872b9933f8434e3e86b4635e4c7fe881228be0d237210dd96c2087244523750f + languageName: node + linkType: hard + +"@napi-rs/lzma-android-arm-eabi@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-android-arm-eabi@npm:1.4.5" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@napi-rs/lzma-android-arm64@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-android-arm64@npm:1.4.5" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/lzma-darwin-arm64@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-darwin-arm64@npm:1.4.5" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/lzma-darwin-x64@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-darwin-x64@npm:1.4.5" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/lzma-freebsd-x64@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-freebsd-x64@npm:1.4.5" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-arm-gnueabihf@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-arm-gnueabihf@npm:1.4.5" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-arm64-gnu@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-arm64-gnu@npm:1.4.5" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-arm64-musl@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-arm64-musl@npm:1.4.5" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-ppc64-gnu@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-ppc64-gnu@npm:1.4.5" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-riscv64-gnu@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-riscv64-gnu@npm:1.4.5" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-s390x-gnu@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-s390x-gnu@npm:1.4.5" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-x64-gnu@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-x64-gnu@npm:1.4.5" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/lzma-linux-x64-musl@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-linux-x64-musl@npm:1.4.5" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@napi-rs/lzma-wasm32-wasi@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-wasm32-wasi@npm:1.4.5" + dependencies: + "@napi-rs/wasm-runtime": "npm:^1.0.3" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@napi-rs/lzma-win32-arm64-msvc@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-win32-arm64-msvc@npm:1.4.5" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/lzma-win32-ia32-msvc@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-win32-ia32-msvc@npm:1.4.5" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@napi-rs/lzma-win32-x64-msvc@npm:1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma-win32-x64-msvc@npm:1.4.5" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/lzma@npm:^1.4.5": + version: 1.4.5 + resolution: "@napi-rs/lzma@npm:1.4.5" + dependencies: + "@napi-rs/lzma-android-arm-eabi": "npm:1.4.5" + "@napi-rs/lzma-android-arm64": "npm:1.4.5" + "@napi-rs/lzma-darwin-arm64": "npm:1.4.5" + "@napi-rs/lzma-darwin-x64": "npm:1.4.5" + "@napi-rs/lzma-freebsd-x64": "npm:1.4.5" + "@napi-rs/lzma-linux-arm-gnueabihf": "npm:1.4.5" + "@napi-rs/lzma-linux-arm64-gnu": "npm:1.4.5" + "@napi-rs/lzma-linux-arm64-musl": "npm:1.4.5" + "@napi-rs/lzma-linux-ppc64-gnu": "npm:1.4.5" + "@napi-rs/lzma-linux-riscv64-gnu": "npm:1.4.5" + "@napi-rs/lzma-linux-s390x-gnu": "npm:1.4.5" + "@napi-rs/lzma-linux-x64-gnu": "npm:1.4.5" + "@napi-rs/lzma-linux-x64-musl": "npm:1.4.5" + "@napi-rs/lzma-wasm32-wasi": "npm:1.4.5" + "@napi-rs/lzma-win32-arm64-msvc": "npm:1.4.5" + "@napi-rs/lzma-win32-ia32-msvc": "npm:1.4.5" + "@napi-rs/lzma-win32-x64-msvc": "npm:1.4.5" + dependenciesMeta: + "@napi-rs/lzma-android-arm-eabi": + optional: true + "@napi-rs/lzma-android-arm64": + optional: true + "@napi-rs/lzma-darwin-arm64": + optional: true + "@napi-rs/lzma-darwin-x64": + optional: true + "@napi-rs/lzma-freebsd-x64": + optional: true + "@napi-rs/lzma-linux-arm-gnueabihf": + optional: true + "@napi-rs/lzma-linux-arm64-gnu": + optional: true + "@napi-rs/lzma-linux-arm64-musl": + optional: true + "@napi-rs/lzma-linux-ppc64-gnu": + optional: true + "@napi-rs/lzma-linux-riscv64-gnu": + optional: true + "@napi-rs/lzma-linux-s390x-gnu": + optional: true + "@napi-rs/lzma-linux-x64-gnu": + optional: true + "@napi-rs/lzma-linux-x64-musl": + optional: true + "@napi-rs/lzma-wasm32-wasi": + optional: true + "@napi-rs/lzma-win32-arm64-msvc": + optional: true + "@napi-rs/lzma-win32-ia32-msvc": + optional: true + "@napi-rs/lzma-win32-x64-msvc": + optional: true + checksum: 10c0/df098c99f904b54541e3a34feeb5878c98a4abf1ababf1d301d903b99d98402fff5eda49e1dd103bb4bf44a9217a5e1b17fb30b74044416561f8fe02ca098ee3 + languageName: node + linkType: hard + +"@napi-rs/tar-android-arm-eabi@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-android-arm-eabi@npm:1.1.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@napi-rs/tar-android-arm64@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-android-arm64@npm:1.1.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/tar-darwin-arm64@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-darwin-arm64@npm:1.1.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/tar-darwin-x64@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-darwin-x64@npm:1.1.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/tar-freebsd-x64@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-freebsd-x64@npm:1.1.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/tar-linux-arm-gnueabihf@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-arm-gnueabihf@npm:1.1.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@napi-rs/tar-linux-arm64-gnu@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-arm64-gnu@npm:1.1.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/tar-linux-arm64-musl@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-arm64-musl@npm:1.1.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@napi-rs/tar-linux-ppc64-gnu@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-ppc64-gnu@npm:1.1.0" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/tar-linux-s390x-gnu@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-s390x-gnu@npm:1.1.0" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/tar-linux-x64-gnu@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-x64-gnu@npm:1.1.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/tar-linux-x64-musl@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-linux-x64-musl@npm:1.1.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@napi-rs/tar-wasm32-wasi@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-wasm32-wasi@npm:1.1.0" + dependencies: + "@napi-rs/wasm-runtime": "npm:^1.0.3" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@napi-rs/tar-win32-arm64-msvc@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-win32-arm64-msvc@npm:1.1.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/tar-win32-ia32-msvc@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-win32-ia32-msvc@npm:1.1.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@napi-rs/tar-win32-x64-msvc@npm:1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar-win32-x64-msvc@npm:1.1.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/tar@npm:^1.1.0": + version: 1.1.0 + resolution: "@napi-rs/tar@npm:1.1.0" + dependencies: + "@napi-rs/tar-android-arm-eabi": "npm:1.1.0" + "@napi-rs/tar-android-arm64": "npm:1.1.0" + "@napi-rs/tar-darwin-arm64": "npm:1.1.0" + "@napi-rs/tar-darwin-x64": "npm:1.1.0" + "@napi-rs/tar-freebsd-x64": "npm:1.1.0" + "@napi-rs/tar-linux-arm-gnueabihf": "npm:1.1.0" + "@napi-rs/tar-linux-arm64-gnu": "npm:1.1.0" + "@napi-rs/tar-linux-arm64-musl": "npm:1.1.0" + "@napi-rs/tar-linux-ppc64-gnu": "npm:1.1.0" + "@napi-rs/tar-linux-s390x-gnu": "npm:1.1.0" + "@napi-rs/tar-linux-x64-gnu": "npm:1.1.0" + "@napi-rs/tar-linux-x64-musl": "npm:1.1.0" + "@napi-rs/tar-wasm32-wasi": "npm:1.1.0" + "@napi-rs/tar-win32-arm64-msvc": "npm:1.1.0" + "@napi-rs/tar-win32-ia32-msvc": "npm:1.1.0" + "@napi-rs/tar-win32-x64-msvc": "npm:1.1.0" + dependenciesMeta: + "@napi-rs/tar-android-arm-eabi": + optional: true + "@napi-rs/tar-android-arm64": + optional: true + "@napi-rs/tar-darwin-arm64": + optional: true + "@napi-rs/tar-darwin-x64": + optional: true + "@napi-rs/tar-freebsd-x64": + optional: true + "@napi-rs/tar-linux-arm-gnueabihf": + optional: true + "@napi-rs/tar-linux-arm64-gnu": + optional: true + "@napi-rs/tar-linux-arm64-musl": + optional: true + "@napi-rs/tar-linux-ppc64-gnu": + optional: true + "@napi-rs/tar-linux-s390x-gnu": + optional: true + "@napi-rs/tar-linux-x64-gnu": + optional: true + "@napi-rs/tar-linux-x64-musl": + optional: true + "@napi-rs/tar-wasm32-wasi": + optional: true + "@napi-rs/tar-win32-arm64-msvc": + optional: true + "@napi-rs/tar-win32-ia32-msvc": + optional: true + "@napi-rs/tar-win32-x64-msvc": + optional: true + checksum: 10c0/88a0ab081eacfa235266f14a0bc408b7581058b1f7e18b118c6f8e7012cca0dd91c5baf5de84e1d2eb8070386a7380aa4d8dedfc6f81e24ae9d0287ff50ae153 + languageName: node + linkType: hard + +"@napi-rs/wasm-runtime@npm:^1.0.3": + version: 1.1.1 + resolution: "@napi-rs/wasm-runtime@npm:1.1.1" + dependencies: + "@emnapi/core": "npm:^1.7.1" + "@emnapi/runtime": "npm:^1.7.1" + "@tybys/wasm-util": "npm:^0.10.1" + checksum: 10c0/04d57b67e80736e41fe44674a011878db0a8ad893f4d44abb9d3608debb7c174224cba2796ed5b0c1d367368159f3ca6be45f1c59222f70e32ddc880f803d447 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-android-arm-eabi@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-android-arm-eabi@npm:1.0.1" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-android-arm64@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-android-arm64@npm:1.0.1" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-darwin-arm64@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-darwin-arm64@npm:1.0.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-darwin-x64@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-darwin-x64@npm:1.0.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-freebsd-x64@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-freebsd-x64@npm:1.0.1" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-linux-arm64-gnu@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-linux-arm64-gnu@npm:1.0.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@napi-rs/wasm-tools-linux-arm64-musl@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-linux-arm64-musl@npm:1.0.1" + conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/linux-loong64@npm:0.27.3" - conditions: os=linux & cpu=loong64 +"@napi-rs/wasm-tools-linux-x64-gnu@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-linux-x64-gnu@npm:1.0.1" + conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/linux-mips64el@npm:0.27.3" - conditions: os=linux & cpu=mips64el +"@napi-rs/wasm-tools-linux-x64-musl@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-linux-x64-musl@npm:1.0.1" + conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/linux-ppc64@npm:0.27.3" - conditions: os=linux & cpu=ppc64 +"@napi-rs/wasm-tools-wasm32-wasi@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-wasm32-wasi@npm:1.0.1" + dependencies: + "@napi-rs/wasm-runtime": "npm:^1.0.3" + conditions: cpu=wasm32 languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/linux-riscv64@npm:0.27.3" - conditions: os=linux & cpu=riscv64 +"@napi-rs/wasm-tools-win32-arm64-msvc@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-win32-arm64-msvc@npm:1.0.1" + conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/linux-s390x@npm:0.27.3" - conditions: os=linux & cpu=s390x +"@napi-rs/wasm-tools-win32-ia32-msvc@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-win32-ia32-msvc@npm:1.0.1" + conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/linux-x64@npm:0.27.3" - conditions: os=linux & cpu=x64 +"@napi-rs/wasm-tools-win32-x64-msvc@npm:1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools-win32-x64-msvc@npm:1.0.1" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@esbuild/netbsd-arm64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/netbsd-arm64@npm:0.27.3" - conditions: os=netbsd & cpu=arm64 +"@napi-rs/wasm-tools@npm:^1.0.1": + version: 1.0.1 + resolution: "@napi-rs/wasm-tools@npm:1.0.1" + dependencies: + "@napi-rs/wasm-tools-android-arm-eabi": "npm:1.0.1" + "@napi-rs/wasm-tools-android-arm64": "npm:1.0.1" + "@napi-rs/wasm-tools-darwin-arm64": "npm:1.0.1" + "@napi-rs/wasm-tools-darwin-x64": "npm:1.0.1" + "@napi-rs/wasm-tools-freebsd-x64": "npm:1.0.1" + "@napi-rs/wasm-tools-linux-arm64-gnu": "npm:1.0.1" + "@napi-rs/wasm-tools-linux-arm64-musl": "npm:1.0.1" + "@napi-rs/wasm-tools-linux-x64-gnu": "npm:1.0.1" + "@napi-rs/wasm-tools-linux-x64-musl": "npm:1.0.1" + "@napi-rs/wasm-tools-wasm32-wasi": "npm:1.0.1" + "@napi-rs/wasm-tools-win32-arm64-msvc": "npm:1.0.1" + "@napi-rs/wasm-tools-win32-ia32-msvc": "npm:1.0.1" + "@napi-rs/wasm-tools-win32-x64-msvc": "npm:1.0.1" + dependenciesMeta: + "@napi-rs/wasm-tools-android-arm-eabi": + optional: true + "@napi-rs/wasm-tools-android-arm64": + optional: true + "@napi-rs/wasm-tools-darwin-arm64": + optional: true + "@napi-rs/wasm-tools-darwin-x64": + optional: true + "@napi-rs/wasm-tools-freebsd-x64": + optional: true + "@napi-rs/wasm-tools-linux-arm64-gnu": + optional: true + "@napi-rs/wasm-tools-linux-arm64-musl": + optional: true + "@napi-rs/wasm-tools-linux-x64-gnu": + optional: true + "@napi-rs/wasm-tools-linux-x64-musl": + optional: true + "@napi-rs/wasm-tools-wasm32-wasi": + optional: true + "@napi-rs/wasm-tools-win32-arm64-msvc": + optional: true + "@napi-rs/wasm-tools-win32-ia32-msvc": + optional: true + "@napi-rs/wasm-tools-win32-x64-msvc": + optional: true + checksum: 10c0/bee9258e0b16a2415acc57d9aa281fa50402b38f631aea28e3a8ecd16415cdfffade63313bca777e85c3a73b80cce899ac3dd35eba9104951d7da1eb28913122 languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/netbsd-x64@npm:0.27.3" - conditions: os=netbsd & cpu=x64 +"@npmcli/agent@npm:^4.0.0": + version: 4.0.0 + resolution: "@npmcli/agent@npm:4.0.0" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^11.2.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10c0/f7b5ce0f3dd42c3f8c6546e8433573d8049f67ef11ec22aa4704bc41483122f68bf97752e06302c455ead667af5cb753e6a09bff06632bc465c1cfd4c4b75a53 languageName: node linkType: hard -"@esbuild/openbsd-arm64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/openbsd-arm64@npm:0.27.3" - conditions: os=openbsd & cpu=arm64 +"@npmcli/fs@npm:^5.0.0": + version: 5.0.0 + resolution: "@npmcli/fs@npm:5.0.0" + dependencies: + semver: "npm:^7.3.5" + checksum: 10c0/26e376d780f60ff16e874a0ac9bc3399186846baae0b6e1352286385ac134d900cc5dafaded77f38d77f86898fc923ae1cee9d7399f0275b1aa24878915d722b languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/openbsd-x64@npm:0.27.3" - conditions: os=openbsd & cpu=x64 +"@octokit/auth-token@npm:^6.0.0": + version: 6.0.0 + resolution: "@octokit/auth-token@npm:6.0.0" + checksum: 10c0/32ecc904c5f6f4e5d090bfcc679d70318690c0a0b5040cd9a25811ad9dcd44c33f2cf96b6dbee1cd56cf58fde28fb1819c01b58718aa5c971f79c822357cb5c0 languageName: node linkType: hard -"@esbuild/openharmony-arm64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/openharmony-arm64@npm:0.27.3" - conditions: os=openharmony & cpu=arm64 +"@octokit/core@npm:^7.0.6": + version: 7.0.6 + resolution: "@octokit/core@npm:7.0.6" + dependencies: + "@octokit/auth-token": "npm:^6.0.0" + "@octokit/graphql": "npm:^9.0.3" + "@octokit/request": "npm:^10.0.6" + "@octokit/request-error": "npm:^7.0.2" + "@octokit/types": "npm:^16.0.0" + before-after-hook: "npm:^4.0.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10c0/95a328ff7c7223d9eb4aa778c63171828514ae0e0f588d33beb81a4dc03bbeae055382f6060ce23c979ab46272409942ff2cf3172109999e48429c47055b1fbe languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/sunos-x64@npm:0.27.3" - conditions: os=sunos & cpu=x64 +"@octokit/endpoint@npm:^11.0.2": + version: 11.0.2 + resolution: "@octokit/endpoint@npm:11.0.2" + dependencies: + "@octokit/types": "npm:^16.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10c0/878ac12fbccff772968689b4744590677c5a3f12bebe31544832c84761bf1c6be521e8a3af07abffc9455a74dd4d1f350d714fc46fd7ce14a0a2b5f2d4e3a84c languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/win32-arm64@npm:0.27.3" - conditions: os=win32 & cpu=arm64 +"@octokit/graphql@npm:^9.0.3": + version: 9.0.3 + resolution: "@octokit/graphql@npm:9.0.3" + dependencies: + "@octokit/request": "npm:^10.0.6" + "@octokit/types": "npm:^16.0.0" + universal-user-agent: "npm:^7.0.0" + checksum: 10c0/58588d3fb2834f64244fa5376ca7922a30117b001b621e141fab0d52806370803ab0c046ac99b120fa5f45b770f52a815157fb6ffc147fc6c1da4047c1f1af49 languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/win32-ia32@npm:0.27.3" - conditions: os=win32 & cpu=ia32 +"@octokit/openapi-types@npm:^27.0.0": + version: 27.0.0 + resolution: "@octokit/openapi-types@npm:27.0.0" + checksum: 10c0/602d1de033da180a2e982cdbd3646bd5b2e16ecf36b9955a0f23e37ae9e6cb086abb48ff2ae6f2de000fce03e8ae9051794611ae4a95a8f5f6fb63276e7b8e31 languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.27.3": - version: 0.27.3 - resolution: "@esbuild/win32-x64@npm:0.27.3" - conditions: os=win32 & cpu=x64 +"@octokit/plugin-paginate-rest@npm:^14.0.0": + version: 14.0.0 + resolution: "@octokit/plugin-paginate-rest@npm:14.0.0" + dependencies: + "@octokit/types": "npm:^16.0.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10c0/841d79d4ccfe18fc809a4a67529b75c1dcdda13399bf4bf5b48ce7559c8b4b2cd422e3204bad4cbdea31c0cf0943521067415268e5bcfc615a3b813e058cad6b languageName: node linkType: hard -"@isaacs/balanced-match@npm:^4.0.1": - version: 4.0.1 - resolution: "@isaacs/balanced-match@npm:4.0.1" - checksum: 10c0/7da011805b259ec5c955f01cee903da72ad97c5e6f01ca96197267d3f33103d5b2f8a1af192140f3aa64526c593c8d098ae366c2b11f7f17645d12387c2fd420 +"@octokit/plugin-request-log@npm:^6.0.0": + version: 6.0.0 + resolution: "@octokit/plugin-request-log@npm:6.0.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10c0/40e46ad0c77235742d0bf698ab4e17df1ae06e0d7824ffc5867ed71e27de860875adb73d89629b823fe8647459a8f262c26ed1aa6ee374873fa94095f37df0bb languageName: node linkType: hard -"@isaacs/brace-expansion@npm:^5.0.1": - version: 5.0.1 - resolution: "@isaacs/brace-expansion@npm:5.0.1" +"@octokit/plugin-rest-endpoint-methods@npm:^17.0.0": + version: 17.0.0 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:17.0.0" dependencies: - "@isaacs/balanced-match": "npm:^4.0.1" - checksum: 10c0/e5d67c7bbf1f17b88132a35bc638af306d48acbb72810d48fa6e6edd8ab375854773108e8bf70f021f7ef6a8273455a6d1f0c3b5aa2aff06ce7894049ab77fb8 + "@octokit/types": "npm:^16.0.0" + peerDependencies: + "@octokit/core": ">=6" + checksum: 10c0/cf9984d7cf6a36ff7ff1b86078ae45fe246e3df10fcef0bccf20c8cfd27bf5e7d98dcb9cf5a7b56332b9c6fa30be28d159c2987d272a4758f77056903d94402f languageName: node linkType: hard -"@isaacs/fs-minipass@npm:^4.0.0": - version: 4.0.1 - resolution: "@isaacs/fs-minipass@npm:4.0.1" +"@octokit/request-error@npm:^7.0.2": + version: 7.1.0 + resolution: "@octokit/request-error@npm:7.1.0" dependencies: - minipass: "npm:^7.0.4" - checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2 + "@octokit/types": "npm:^16.0.0" + checksum: 10c0/62b90a54545c36a30b5ffdda42e302c751be184d85b68ffc7f1242c51d7ca54dbd185b7d0027b491991776923a910c85c9c51269fe0d86111bac187507a5abc4 languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.5.5": - version: 1.5.5 - resolution: "@jridgewell/sourcemap-codec@npm:1.5.5" - checksum: 10c0/f9e538f302b63c0ebc06eecb1dd9918dd4289ed36147a0ddce35d6ea4d7ebbda243cda7b2213b6a5e1d8087a298d5cf630fb2bd39329cdecb82017023f6081a0 +"@octokit/request@npm:^10.0.6": + version: 10.0.7 + resolution: "@octokit/request@npm:10.0.7" + dependencies: + "@octokit/endpoint": "npm:^11.0.2" + "@octokit/request-error": "npm:^7.0.2" + "@octokit/types": "npm:^16.0.0" + fast-content-type-parse: "npm:^3.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10c0/f789a75bf681b204ccd3d538921db662e148ed980005158d80ec4f16811e9ab73f375d4f30ef697852abd748a62f025060ea1b0c5198ec9c2e8d04e355064390 languageName: node linkType: hard -"@lingui/swc-plugin@workspace:.": - version: 0.0.0-use.local - resolution: "@lingui/swc-plugin@workspace:." - dependencies: - "@swc/core": "npm:^1.15.11" - "@types/node": "npm:22.13.14" - typescript: "npm:^5.9.3" - vitest: "npm:^4.0.18" - peerDependencies: - "@lingui/core": 6 - peerDependenciesMeta: - "@swc/core": - optional: true - next: - optional: true - languageName: unknown - linkType: soft - -"@npmcli/agent@npm:^4.0.0": - version: 4.0.0 - resolution: "@npmcli/agent@npm:4.0.0" +"@octokit/rest@npm:^22.0.1": + version: 22.0.1 + resolution: "@octokit/rest@npm:22.0.1" dependencies: - agent-base: "npm:^7.1.0" - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.1" - lru-cache: "npm:^11.2.1" - socks-proxy-agent: "npm:^8.0.3" - checksum: 10c0/f7b5ce0f3dd42c3f8c6546e8433573d8049f67ef11ec22aa4704bc41483122f68bf97752e06302c455ead667af5cb753e6a09bff06632bc465c1cfd4c4b75a53 + "@octokit/core": "npm:^7.0.6" + "@octokit/plugin-paginate-rest": "npm:^14.0.0" + "@octokit/plugin-request-log": "npm:^6.0.0" + "@octokit/plugin-rest-endpoint-methods": "npm:^17.0.0" + checksum: 10c0/f3abd84e887cc837973214ce70720a9bba53f5575f40601c6122aa25206e9055d859c0388437f0a137f6cd0e4ff405e1b46b903475b0db32a17bada0c6513d5b languageName: node linkType: hard -"@npmcli/fs@npm:^5.0.0": - version: 5.0.0 - resolution: "@npmcli/fs@npm:5.0.0" +"@octokit/types@npm:^16.0.0": + version: 16.0.0 + resolution: "@octokit/types@npm:16.0.0" dependencies: - semver: "npm:^7.3.5" - checksum: 10c0/26e376d780f60ff16e874a0ac9bc3399186846baae0b6e1352286385ac134d900cc5dafaded77f38d77f86898fc923ae1cee9d7399f0275b1aa24878915d722b + "@octokit/openapi-types": "npm:^27.0.0" + checksum: 10c0/b8d41098ba6fc194d13d641f9441347e3a3b96c0efabac0e14f57319340a2d4d1c8676e4cb37ab3062c5c323c617e790b0126916e9bf7b201b0cced0826f8ae2 languageName: node linkType: hard @@ -573,6 +1542,15 @@ __metadata: languageName: node linkType: hard +"@tybys/wasm-util@npm:^0.10.1": + version: 0.10.1 + resolution: "@tybys/wasm-util@npm:0.10.1" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/b255094f293794c6d2289300c5fbcafbb5532a3aed3a5ffd2f8dc1828e639b88d75f6a376dd8f94347a44813fd7a7149d8463477a9a49525c8b2dcaa38c2d1e8 + languageName: node + linkType: hard + "@types/chai@npm:^5.2.2": version: 5.2.3 resolution: "@types/chai@npm:5.2.3" @@ -700,6 +1678,27 @@ __metadata: languageName: node linkType: hard +"ansi-regex@npm:^6.0.1": + version: 6.2.2 + resolution: "ansi-regex@npm:6.2.2" + checksum: 10c0/05d4acb1d2f59ab2cf4b794339c7b168890d44dda4bf0ce01152a8da0213aca207802f930442ce8cd22d7a92f44907664aac6508904e75e038fa944d2601b30f + languageName: node + linkType: hard + +"ansi-styles@npm:^6.2.1": + version: 6.2.3 + resolution: "ansi-styles@npm:6.2.3" + checksum: 10c0/23b8a4ce14e18fb854693b95351e286b771d23d8844057ed2e7d083cd3e708376c3323707ec6a24365f7d7eda3ca00327fe04092e29e551499ec4c8b7bfac868 + languageName: node + linkType: hard + +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 10c0/c5640c2d89045371c7cedd6a70212a04e360fd34d6edeae32f6952c63949e3525ea77dbec0289d8213a99bbaeab5abfa860b5c12cf88a2e6cf8106e90dd27a7e + languageName: node + linkType: hard + "assertion-error@npm:^2.0.1": version: 2.0.1 resolution: "assertion-error@npm:2.0.1" @@ -707,6 +1706,13 @@ __metadata: languageName: node linkType: hard +"before-after-hook@npm:^4.0.0": + version: 4.0.0 + resolution: "before-after-hook@npm:4.0.0" + checksum: 10c0/9f8ae8d1b06142bcfb9ef6625226b5e50348bb11210f266660eddcf9734e0db6f9afc4cb48397ee3f5ac0a3728f3ae401cdeea88413f7bed748a71db84657be2 + languageName: node + linkType: hard + "cacache@npm:^20.0.1": version: 20.0.3 resolution: "cacache@npm:20.0.3" @@ -733,6 +1739,13 @@ __metadata: languageName: node linkType: hard +"chardet@npm:^2.1.1": + version: 2.1.1 + resolution: "chardet@npm:2.1.1" + checksum: 10c0/d8391dd412338442b3de0d3a488aa9327f8bcf74b62b8723d6bd0b85c4084d50b731320e0a7c710edb1d44de75969995d2784b80e4c13b004a6c7a0db4c6e793 + languageName: node + linkType: hard + "chownr@npm:^3.0.0": version: 3.0.0 resolution: "chownr@npm:3.0.0" @@ -740,7 +1753,32 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.3.4": +"cli-width@npm:^4.1.0": + version: 4.1.0 + resolution: "cli-width@npm:4.1.0" + checksum: 10c0/1fbd56413578f6117abcaf858903ba1f4ad78370a4032f916745fa2c7e390183a9d9029cf837df320b0fdce8137668e522f60a30a5f3d6529ff3872d265a955f + languageName: node + linkType: hard + +"clipanion@npm:^4.0.0-rc.4": + version: 4.0.0-rc.4 + resolution: "clipanion@npm:4.0.0-rc.4" + dependencies: + typanion: "npm:^3.8.0" + peerDependencies: + typanion: "*" + checksum: 10c0/047b415b59a5e9777d00690fba563ccc850eca6bf27790a88d1deea3ecc8a89840ae9aed554ff284cc698a9f3f20256e43c25ff4a7c4c90a71e5e7d9dca61dd1 + languageName: node + linkType: hard + +"colorette@npm:^2.0.20": + version: 2.0.20 + resolution: "colorette@npm:2.0.20" + checksum: 10c0/e94116ff33b0ff56f3b83b9ace895e5bf87c2a7a47b3401b8c3f3226e050d5ef76cf4072fb3325f9dc24d1698f9b730baf4e05eeaf861d74a1883073f4c98a40 + languageName: node + linkType: hard + +"debug@npm:4, debug@npm:^4.3.4, debug@npm:^4.4.1": version: 4.4.3 resolution: "debug@npm:4.4.3" dependencies: @@ -752,6 +1790,25 @@ __metadata: languageName: node linkType: hard +"emnapi@npm:^1.7.1": + version: 1.8.1 + resolution: "emnapi@npm:1.8.1" + peerDependencies: + node-addon-api: ">= 6.1.0" + peerDependenciesMeta: + node-addon-api: + optional: true + checksum: 10c0/a95b167083ee485a84a06202b693f9588bc32080dba82b5752bf805959e97005db1e0cb82ebfe9f35129858b7325f7161c63e97dc78e756a8d6a61443eca79bc + languageName: node + linkType: hard + +"emoji-regex@npm:^10.3.0": + version: 10.6.0 + resolution: "emoji-regex@npm:10.6.0" + checksum: 10c0/1e4aa097bb007301c3b4b1913879ae27327fdc48e93eeefefe3b87e495eb33c5af155300be951b4349ff6ac084f4403dc9eff970acba7c1c572d89396a9a32d7 + languageName: node + linkType: hard + "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -782,6 +1839,18 @@ __metadata: languageName: node linkType: hard +"es-toolkit@npm:^1.41.0": + version: 1.44.0 + resolution: "es-toolkit@npm:1.44.0" + dependenciesMeta: + "@trivago/prettier-plugin-sort-imports@4.3.0": + unplugged: true + prettier-plugin-sort-re-exports@0.0.1: + unplugged: true + checksum: 10c0/b80ff52ddc85ba26914cda57c9d4e46379ccc38c60dc097ef0d065cc0b20f95a16cf8d537969eea600b51c6687b5900a6cce67489db16d5ccc14d47597a29c34 + languageName: node + linkType: hard + "esbuild@npm:^0.27.0": version: 0.27.3 resolution: "esbuild@npm:0.27.3" @@ -894,6 +1963,13 @@ __metadata: languageName: node linkType: hard +"fast-content-type-parse@npm:^3.0.0": + version: 3.0.0 + resolution: "fast-content-type-parse@npm:3.0.0" + checksum: 10c0/06251880c83b7118af3a5e66e8bcee60d44f48b39396fc60acc2b4630bd5f3e77552b999b5c8e943d45a818854360e5e97164c374ec4b562b4df96a2cdf2e188 + languageName: node + linkType: hard + "fdir@npm:^6.5.0": version: 6.5.0 resolution: "fdir@npm:6.5.0" @@ -934,6 +2010,13 @@ __metadata: languageName: node linkType: hard +"get-east-asian-width@npm:^1.0.0": + version: 1.4.0 + resolution: "get-east-asian-width@npm:1.4.0" + checksum: 10c0/4e481d418e5a32061c36fbb90d1b225a254cc5b2df5f0b25da215dcd335a3c111f0c2023ffda43140727a9cafb62dac41d022da82c08f31083ee89f714ee3b83 + languageName: node + linkType: hard + "glob@npm:^13.0.0": version: 13.0.1 resolution: "glob@npm:13.0.1" @@ -988,6 +2071,15 @@ __metadata: languageName: node linkType: hard +"iconv-lite@npm:^0.7.2": + version: 0.7.2 + resolution: "iconv-lite@npm:0.7.2" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10c0/3c228920f3bd307f56bf8363706a776f4a060eb042f131cd23855ceca962951b264d0997ab38a1ad340e1c5df8499ed26e1f4f0db6b2a2ad9befaff22f14b722 + languageName: node + linkType: hard + "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -1009,6 +2101,17 @@ __metadata: languageName: node linkType: hard +"js-yaml@npm:^4.1.0": + version: 4.1.1 + resolution: "js-yaml@npm:4.1.1" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.js + checksum: 10c0/561c7d7088c40a9bb53cc75becbfb1df6ae49b34b5e6e5a81744b14ae8667ec564ad2527709d1a6e7d5e5fa6d483aa0f373a50ad98d42fde368ec4a190d4fae7 + languageName: node + linkType: hard + "lru-cache@npm:^11.0.0, lru-cache@npm:^11.1.0, lru-cache@npm:^11.2.1": version: 11.2.5 resolution: "lru-cache@npm:11.2.5" @@ -1136,6 +2239,13 @@ __metadata: languageName: node linkType: hard +"mute-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "mute-stream@npm:3.0.0" + checksum: 10c0/12cdb36a101694c7a6b296632e6d93a30b74401873cf7507c88861441a090c71c77a58f213acadad03bc0c8fa186639dec99d68a14497773a8744320c136e701 + languageName: node + linkType: hard + "nanoid@npm:^3.3.11": version: 3.3.11 resolution: "nanoid@npm:3.3.11" @@ -1183,7 +2293,7 @@ __metadata: languageName: node linkType: hard -"obug@npm:^2.1.1": +"obug@npm:^2.0.0, obug@npm:^2.1.1": version: 2.1.1 resolution: "obug@npm:2.1.1" checksum: 10c0/59dccd7de72a047e08f8649e94c1015ec72f94eefb6ddb57fb4812c4b425a813bc7e7cd30c9aca20db3c59abc3c85cc7a62bb656a968741d770f4e8e02bc2e78 @@ -1360,7 +2470,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5": +"semver@npm:^7.3.5, semver@npm:^7.7.3": version: 7.7.4 resolution: "semver@npm:7.7.4" bin: @@ -1376,6 +2486,13 @@ __metadata: languageName: node linkType: hard +"signal-exit@npm:^4.1.0": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 + languageName: node + linkType: hard + "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" @@ -1434,6 +2551,26 @@ __metadata: languageName: node linkType: hard +"string-width@npm:^7.0.0": + version: 7.2.0 + resolution: "string-width@npm:7.2.0" + dependencies: + emoji-regex: "npm:^10.3.0" + get-east-asian-width: "npm:^1.0.0" + strip-ansi: "npm:^7.1.0" + checksum: 10c0/eb0430dd43f3199c7a46dcbf7a0b34539c76fe3aa62763d0b0655acdcbdf360b3f66f3d58ca25ba0205f42ea3491fa00f09426d3b7d3040e506878fc7664c9b9 + languageName: node + linkType: hard + +"strip-ansi@npm:^7.1.0": + version: 7.1.2 + resolution: "strip-ansi@npm:7.1.2" + dependencies: + ansi-regex: "npm:^6.0.1" + checksum: 10c0/0d6d7a023de33368fd042aab0bf48f4f4077abdfd60e5393e73c7c411e85e1b3a83507c11af2e656188511475776215df9ca589b4da2295c9455cc399ce1858b + languageName: node + linkType: hard + "tar@npm:^7.5.4": version: 7.5.7 resolution: "tar@npm:7.5.7" @@ -1478,6 +2615,20 @@ __metadata: languageName: node linkType: hard +"tslib@npm:^2.4.0": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 + languageName: node + linkType: hard + +"typanion@npm:^3.14.0, typanion@npm:^3.8.0": + version: 3.14.0 + resolution: "typanion@npm:3.14.0" + checksum: 10c0/8b03b19844e6955bfd906c31dc781bae6d7f1fb3ce4fe24b7501557013d4889ae5cefe671dafe98d87ead0adceb8afcb8bc16df7dc0bd2b7331bac96f3a7cae2 + languageName: node + linkType: hard + "typescript@npm:^5.9.3": version: 5.9.3 resolution: "typescript@npm:5.9.3" @@ -1523,6 +2674,13 @@ __metadata: languageName: node linkType: hard +"universal-user-agent@npm:^7.0.0, universal-user-agent@npm:^7.0.2": + version: 7.0.3 + resolution: "universal-user-agent@npm:7.0.3" + checksum: 10c0/6043be466a9bb96c0ce82392842d9fddf4c37e296f7bacc2cb25f47123990eb436c82df824644f9c5070a94dbdb117be17f66d54599ab143648ec57ef93dbcc8 + languageName: node + linkType: hard + "vite@npm:^6.0.0 || ^7.0.0": version: 7.3.1 resolution: "vite@npm:7.3.1" @@ -1660,6 +2818,17 @@ __metadata: languageName: node linkType: hard +"wrap-ansi@npm:^9.0.2": + version: 9.0.2 + resolution: "wrap-ansi@npm:9.0.2" + dependencies: + ansi-styles: "npm:^6.2.1" + string-width: "npm:^7.0.0" + strip-ansi: "npm:^7.1.0" + checksum: 10c0/3305839b9a0d6fb930cb63a52f34d3936013d8b0682ff3ec133c9826512620f213800ffa19ea22904876d5b7e9a3c1f40682f03597d986a4ca881fa7b033688c + languageName: node + linkType: hard + "yallist@npm:^4.0.0": version: 4.0.0 resolution: "yallist@npm:4.0.0" From 1bb9a11525b0ccb6499c370494ef4bc3b286ffbd Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Sun, 22 Feb 2026 12:50:22 +0100 Subject: [PATCH 08/34] more extractor methods, extract from files with parallelism --- Cargo.lock | 69 + Cargo.toml | 3 + crates/lingui_extractor/src/lib.rs | 2 +- .../lingui_extractor/src/message_extractor.rs | 36 +- .../tests/message_extractor.rs | 14 +- crates/lingui_macro/Cargo.toml | 2 +- napi-rs/Cargo.toml | 4 +- .../__test__/__snapshots__/index.spec.ts.snap | 164 ++ napi-rs/__test__/fixtures/file1.js | 4 + napi-rs/__test__/fixtures/file2.tsx | 10 + napi-rs/__test__/fixtures/file3.ts | 11 + napi-rs/__test__/index.spec.ts | 116 +- napi-rs/benchmark/bench.ts | 21 - napi-rs/benchmark/package.json | 3 - napi-rs/benchmark/tsconfig.json | 10 - napi-rs/{index.d.ts => binding.d.ts} | 28 +- napi-rs/{index.js => binding.js} | 30 +- napi-rs/index.ts | 78 + napi-rs/package.json | 9 +- napi-rs/src/lib.rs | 112 +- napi-rs/yarn.lock | 1986 ++++++++++++++--- 21 files changed, 2339 insertions(+), 373 deletions(-) create mode 100644 napi-rs/__test__/__snapshots__/index.spec.ts.snap create mode 100644 napi-rs/__test__/fixtures/file1.js create mode 100644 napi-rs/__test__/fixtures/file2.tsx create mode 100644 napi-rs/__test__/fixtures/file3.ts delete mode 100644 napi-rs/benchmark/bench.ts delete mode 100644 napi-rs/benchmark/package.json delete mode 100644 napi-rs/benchmark/tsconfig.json rename napi-rs/{index.d.ts => binding.d.ts} (59%) rename napi-rs/{index.js => binding.js} (95%) create mode 100644 napi-rs/index.ts diff --git a/Cargo.lock b/Cargo.lock index 0473ba7..0e40c80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -338,6 +338,31 @@ dependencies = [ "libc", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + [[package]] name = "crypto-common" version = "0.1.6" @@ -1107,12 +1132,15 @@ dependencies = [ name = "lingui_extractor_swc" version = "0.1.0" dependencies = [ + "anyhow", "lingui_extractor", "napi", "napi-build", "napi-derive", + "rayon", "serde", "serde_json", + "swc_core", ] [[package]] @@ -1249,6 +1277,8 @@ dependencies = [ "napi-sys", "nohash-hasher", "rustc-hash", + "serde", + "serde_json", ] [[package]] @@ -1646,6 +1676,26 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +[[package]] +name = "rayon" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "redox_syscall" version = "0.5.7" @@ -1994,6 +2044,8 @@ dependencies = [ "either", "indexmap", "jsonc-parser", + "napi", + "napi-derive", "once_cell", "par-core", "par-iter", @@ -2097,6 +2149,8 @@ dependencies = [ "anyhow", "base64", "bytes-str", + "napi", + "napi-derive", "once_cell", "pathdiff", "rustc-hash", @@ -2157,12 +2211,14 @@ dependencies = [ "swc_allocator", "swc_atoms", "swc_common", + "swc_config", "swc_ecma_ast", "swc_ecma_parser", "swc_ecma_transforms_base", "swc_ecma_transforms_testing", "swc_ecma_utils", "swc_ecma_visit", + "swc_nodejs_common", "swc_plugin", "swc_plugin_macro", "swc_plugin_proxy", @@ -2913,6 +2969,19 @@ dependencies = [ "swc_common", ] +[[package]] +name = "swc_nodejs_common" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d48ec32365dba9a371950ce298483c3b714bd441878acea233711d66698863e" +dependencies = [ + "anyhow", + "napi", + "serde", + "serde_json", + "tracing", +] + [[package]] name = "swc_plugin" version = "1.0.1" diff --git a/Cargo.toml b/Cargo.toml index 5b94ea7..56c62bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,3 +17,6 @@ lto = false opt-level = "s" # Optimize for performance, this is default so you don't need to specify it # opt-level = "z" + +[workspace.dependencies] +swc_core = { version = "56.0.0", default-features = false } diff --git a/crates/lingui_extractor/src/lib.rs b/crates/lingui_extractor/src/lib.rs index 4d93564..842e9b6 100644 --- a/crates/lingui_extractor/src/lib.rs +++ b/crates/lingui_extractor/src/lib.rs @@ -1,5 +1,5 @@ mod message_extractor; mod message_extractor_visitor; -pub use message_extractor::extract_messages; +pub use message_extractor::{extract_messages, ExtractorOptions}; pub use message_extractor_visitor::{ExtractedMessage, ExtractionResult}; diff --git a/crates/lingui_extractor/src/message_extractor.rs b/crates/lingui_extractor/src/message_extractor.rs index bef6a1b..04ff7ca 100644 --- a/crates/lingui_extractor/src/message_extractor.rs +++ b/crates/lingui_extractor/src/message_extractor.rs @@ -1,10 +1,8 @@ use crate::message_extractor_visitor::{ExtractionResult, MessageExtractorVisitor}; use data_encoding::BASE64; use lingui_macro::{LinguiMacroFolder, LinguiOptions}; +use serde::{Deserialize, Serialize}; use std::sync::Arc; - -use swc_sourcemap as sourcemap; - use swc_core::common::{Globals, Mark, GLOBALS}; use swc_core::ecma::transforms::base::resolver; use swc_core::{ @@ -15,10 +13,11 @@ use swc_core::{ }, ecma::{ ast::*, - parser::{Parser, StringInput, Syntax, TsSyntax}, + parser::{Parser, StringInput, Syntax}, visit::VisitWith, }, }; +use swc_sourcemap as sourcemap; /// Extract inline source map from source code /// Looks for sourceMappingURL comments with inline base64 data @@ -54,22 +53,19 @@ fn extract_inline_sourcemap(source_code: &str) -> Option { None } +#[derive(Default, Clone, Serialize, Deserialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct ExtractorOptions { + pub parser: Syntax, +} + /// Extract messages from source code pub fn extract_messages( source_code: &str, filename: &str, + options: &ExtractorOptions, ) -> Result> { - // Set up parser with JSX support - let syntax = Syntax::Typescript(TsSyntax { - tsx: true, - ..Default::default() - }); - - // let fm = c.cm.new_source_file(filename.into(), src); - let source_map = Lrc::new(SourceMap::default()); - // source_map.new_source_file() - // let source_file = source_map.new_source_file(FileName::Anon, src.into()); let source_file = source_map.new_source_file( Arc::new(FileName::Custom(filename.to_string())), @@ -78,7 +74,11 @@ pub fn extract_messages( let comments = Lrc::new(SingleThreadedComments::default()); - let mut parser = Parser::new(syntax, StringInput::from(&*source_file), Some(&comments)); + let mut parser = Parser::new( + options.parser, + StringInput::from(&*source_file), + Some(&comments), + ); let module = parser .parse_module() @@ -111,7 +111,11 @@ pub fn extract_messages( let top_level_mark = Mark::new(); program - .apply(&mut resolver(unresolved_mark, top_level_mark, false)) + .apply(&mut resolver( + unresolved_mark, + top_level_mark, + options.parser.typescript(), + )) .apply(swc_core::ecma::visit::fold_pass(lingui_macro)) .visit_with(&mut extractor_visitor); }); diff --git a/crates/lingui_extractor/tests/message_extractor.rs b/crates/lingui_extractor/tests/message_extractor.rs index 4ddd8ac..a935e0b 100644 --- a/crates/lingui_extractor/tests/message_extractor.rs +++ b/crates/lingui_extractor/tests/message_extractor.rs @@ -1,8 +1,17 @@ -use lingui_extractor::extract_messages; use lingui_extractor::ExtractedMessage; +use lingui_extractor::{extract_messages, ExtractorOptions}; fn extract_and_sort(source_code: &str, filename: &str) -> (Vec, Vec) { - let result = extract_messages(source_code, filename).expect("Failed to extract messages"); + let options = ExtractorOptions { + syntax: Syntax::Typescript(TsSyntax { + tsx: true, + + ..Default::default() + }), + }; + + let result = + extract_messages(source_code, filename, &options).expect("Failed to extract messages"); (result.messages, result.warnings) } @@ -370,6 +379,7 @@ const msg = /*i18n*/{ use std::fs; use std::path::{Path, PathBuf}; +use swc_core::ecma::parser::{Syntax, TsSyntax}; /// Load fixture file from tests/fixtures/ fn load_fixture(filename: &str) -> String { diff --git a/crates/lingui_macro/Cargo.toml b/crates/lingui_macro/Cargo.toml index fe3a6f1..b50b7b2 100644 --- a/crates/lingui_macro/Cargo.toml +++ b/crates/lingui_macro/Cargo.toml @@ -13,7 +13,7 @@ serde = "1.0.207" serde_json = "1.0.125" regex = "1.10.6" once_cell = "1.19.0" -swc_core = { version = "56.0.0", features = [ +swc_core = { workspace = true, features = [ "ecma_plugin_transform", "ecma_utils", "ecma_visit", diff --git a/napi-rs/Cargo.toml b/napi-rs/Cargo.toml index 7b53307..96f4dd6 100644 --- a/napi-rs/Cargo.toml +++ b/napi-rs/Cargo.toml @@ -1,4 +1,3 @@ - [package] authors = ["LongYinan "] edition = "2021" @@ -12,8 +11,11 @@ crate-type = ["cdylib"] napi = "3.0.0" napi-derive = "3.0.0" lingui_extractor = { path = "../crates/lingui_extractor" } +swc_core = { workspace = true, features = ["base_node", "swc_config"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" +anyhow = "1.0.100" +rayon = "1.10" [build-dependencies] napi-build = "2" diff --git a/napi-rs/__test__/__snapshots__/index.spec.ts.snap b/napi-rs/__test__/__snapshots__/index.spec.ts.snap new file mode 100644 index 0000000..4cf203d --- /dev/null +++ b/napi-rs/__test__/__snapshots__/index.spec.ts.snap @@ -0,0 +1,164 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`extractMessagesFromFiles: messages should include origin with filename 1`] = ` +[ + { + "id": "1nGWAC", + "message": "Hello world", + "origin": { + "column": 19, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file1.js", + "line": 3, + }, + "placeholders": {}, + }, + { + "id": "cs9Rfg", + "message": "Goodbye, {name}!", + "origin": { + "column": 19, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file1.js", + "line": 4, + }, + "placeholders": { + "name": "name", + }, + }, + { + "id": "Vw8l6h", + "message": "An error occurred", + "origin": { + "column": 11, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file3.ts", + "line": 9, + }, + "placeholders": {}, + }, + { + "id": "x5qT5N", + "message": "Operation completed successfully", + "origin": { + "column": 13, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file3.ts", + "line": 10, + }, + "placeholders": {}, + }, +] +`; + +exports[`extractMessagesFromFiles: should extract from multiple files 1`] = ` +[ + { + "id": "1nGWAC", + "message": "Hello world", + "origin": { + "column": 19, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file1.js", + "line": 3, + }, + "placeholders": {}, + }, + { + "id": "cs9Rfg", + "message": "Goodbye, {name}!", + "origin": { + "column": 19, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file1.js", + "line": 4, + }, + "placeholders": { + "name": "name", + }, + }, + { + "id": "user-greeting", + "message": "Hello {userName}", + "origin": { + "column": 33, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file2.tsx", + "line": 7, + }, + "placeholders": { + "userName": "userName", + }, + }, + { + "id": "Vw8l6h", + "message": "An error occurred", + "origin": { + "column": 11, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file3.ts", + "line": 9, + }, + "placeholders": {}, + }, + { + "id": "welcome", + "message": "Welcome to our app", + "origin": { + "column": 27, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file2.tsx", + "line": 6, + }, + "placeholders": {}, + }, + { + "id": "x5qT5N", + "message": "Operation completed successfully", + "origin": { + "column": 13, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file3.ts", + "line": 10, + }, + "placeholders": {}, + }, +] +`; + +exports[`extractMessagesFromFiles: should handle non-existent files gracefully 1`] = ` +[ + { + "id": "1nGWAC", + "message": "Hello world", + "origin": { + "column": 19, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file1.js", + "line": 3, + }, + "placeholders": {}, + }, + { + "id": "cs9Rfg", + "message": "Goodbye, {name}!", + "origin": { + "column": 19, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file1.js", + "line": 4, + }, + "placeholders": { + "name": "name", + }, + }, + { + "id": "Vw8l6h", + "message": "An error occurred", + "origin": { + "column": 11, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file3.ts", + "line": 9, + }, + "placeholders": {}, + }, + { + "id": "x5qT5N", + "message": "Operation completed successfully", + "origin": { + "column": 13, + "filename": "/Users/timofei.Iatsenko/Projects/swc-plugin/napi-rs/__test__/fixtures/file3.ts", + "line": 10, + }, + "placeholders": {}, + }, +] +`; diff --git a/napi-rs/__test__/fixtures/file1.js b/napi-rs/__test__/fixtures/file1.js new file mode 100644 index 0000000..6a81930 --- /dev/null +++ b/napi-rs/__test__/fixtures/file1.js @@ -0,0 +1,4 @@ +import {t} from '@lingui/core/macro'; + +const greeting = t`Hello world`; +const farewell = t`Goodbye, ${name}!`; diff --git a/napi-rs/__test__/fixtures/file2.tsx b/napi-rs/__test__/fixtures/file2.tsx new file mode 100644 index 0000000..a5edefe --- /dev/null +++ b/napi-rs/__test__/fixtures/file2.tsx @@ -0,0 +1,10 @@ +import {Trans} from '@lingui/react/macro'; + +function Component() { + return ( +
+ Welcome to our app + Hello {userName} +
+ ); +} diff --git a/napi-rs/__test__/fixtures/file3.ts b/napi-rs/__test__/fixtures/file3.ts new file mode 100644 index 0000000..1e62aa0 --- /dev/null +++ b/napi-rs/__test__/fixtures/file3.ts @@ -0,0 +1,11 @@ +import {t} from '@lingui/core/macro'; + +type User = { + name: string; + age: number; +}; + +const messages = { + error: t`An error occurred`, + success: t`Operation completed successfully`, +}; diff --git a/napi-rs/__test__/index.spec.ts b/napi-rs/__test__/index.spec.ts index ba2afd2..927b8f4 100644 --- a/napi-rs/__test__/index.spec.ts +++ b/napi-rs/__test__/index.spec.ts @@ -1,7 +1,7 @@ import {extractMessages} from '../index' import {expect, test} from 'vitest' -test('test bindings', async (t) => { +test('test bindings', async () => { const code = ` import {t} from '@lingui/core/macro'; t\`Hello world\`; @@ -40,3 +40,117 @@ test('handle extraction errors gracefully', async () => { }) +test('parser options: should parse jsx', async () => { + const code = `const t =
Hello
` + + await extractMessages(code, 'test.js', { + parser: {jsx: true, syntax: "ecmascript"} + }) +}) + +test('parser options: should parse typescript', async () => { + const code = `type Test = number; const t: Test = 5;` + + await extractMessages(code, 'test.js', { + parser: {tsx: false, syntax: "typescript",} + }) + +}) + +test('extractMessagesFromFiles: should extract from multiple files', async () => { + const {extractMessagesFromFiles} = await import('../index') + const path = await import('path') + + const filePaths = [ + path.join(__dirname, 'fixtures/file1.js'), + path.join(__dirname, 'fixtures/file2.tsx'), + path.join(__dirname, 'fixtures/file3.ts'), + ] + + const result = await extractMessagesFromFiles(filePaths, { + parser: {jsx: true, tsx: true, syntax: "typescript"} + }) + + // Sort messages by id for deterministic results + result.messages.sort((a, b) => a.id.localeCompare(b.id)) + + expect(result.warnings).toHaveLength(0) + expect(result.messages).toHaveLength(6) + expect(result.messages).toMatchSnapshot() +}) + +test('extractMessagesFromFiles: should handle non-existent files gracefully', async () => { + const {extractMessagesFromFiles} = await import('../index') + const path = await import('path') + + const filePaths = [ + path.join(__dirname, 'fixtures/file1.js'), + path.join(__dirname, 'fixtures/non-existent.js'), + path.join(__dirname, 'fixtures/file3.ts'), + ] + + const result = await extractMessagesFromFiles(filePaths, { + parser: {jsx: true, tsx: true, syntax: "typescript"} + }) + + // Sort messages by id for deterministic results + result.messages.sort((a, b) => a.id.localeCompare(b.id)) + + expect(result.warnings.length).toBeGreaterThan(0) + expect(result.warnings.some(w => w.includes('non-existent.js'))).toBe(true) + expect(result.messages.length).toBeGreaterThan(0) // Should still have messages from valid files + expect(result.messages).toMatchSnapshot() +}) + +test('extractMessagesFromFiles: should handle empty array', async () => { + const {extractMessagesFromFiles} = await import('../index') + + const result = await extractMessagesFromFiles([]) + + expect(result.messages).toHaveLength(0) + expect(result.warnings).toHaveLength(0) +}) + +test('extractMessagesFromFiles: should work with different parser options', async () => { + const {extractMessagesFromFiles} = await import('../index') + const path = await import('path') + + const filePaths = [ + path.join(__dirname, 'fixtures/file1.js'), + ] + + const result = await extractMessagesFromFiles(filePaths, { + parser: {syntax: "ecmascript"} + }) + + expect(result.messages.length).toBeGreaterThan(0) + expect(result.warnings).toHaveLength(0) +}) + +test('extractMessagesFromFiles: messages should include origin with filename', async () => { + const {extractMessagesFromFiles} = await import('../index') + const path = await import('path') + + const filePaths = [ + path.join(__dirname, 'fixtures/file1.js'), + path.join(__dirname, 'fixtures/file3.ts'), + ] + + const result = await extractMessagesFromFiles(filePaths, { + parser: {syntax: "typescript"} + }) + + // Sort messages by id for deterministic results + result.messages.sort((a, b) => a.id.localeCompare(b.id)) + + expect(result.messages.length).toBeGreaterThan(0) + + // Check that all messages have origin with filename + result.messages.forEach(msg => { + expect(msg.origin).toBeDefined() + expect(msg.origin?.filename).toBeDefined() + expect(msg.origin?.filename).toMatch(/file[13]\.(js|ts)$/) + }) + + expect(result.messages).toMatchSnapshot() +}) diff --git a/napi-rs/benchmark/bench.ts b/napi-rs/benchmark/bench.ts deleted file mode 100644 index 7761e87..0000000 --- a/napi-rs/benchmark/bench.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Bench } from 'tinybench' - -import { plus100 } from '../index.js' - -function add(a: number) { - return a + 100 -} - -const b = new Bench() - -b.add('Native a + 100', () => { - plus100(10) -}) - -b.add('JavaScript a + 100', () => { - add(10) -}) - -await b.run() - -console.table(b.table()) diff --git a/napi-rs/benchmark/package.json b/napi-rs/benchmark/package.json deleted file mode 100644 index 3dbc1ca..0000000 --- a/napi-rs/benchmark/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/napi-rs/benchmark/tsconfig.json b/napi-rs/benchmark/tsconfig.json deleted file mode 100644 index e95988d..0000000 --- a/napi-rs/benchmark/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "moduleResolution": "NodeNext", - "module": "NodeNext", - "outDir": "lib" - }, - "include": ["."], - "exclude": ["lib"] -} diff --git a/napi-rs/index.d.ts b/napi-rs/binding.d.ts similarity index 59% rename from napi-rs/index.d.ts rename to napi-rs/binding.d.ts index c939650..634121f 100644 --- a/napi-rs/index.d.ts +++ b/napi-rs/binding.d.ts @@ -46,4 +46,30 @@ export interface Origin { * console.log(result.messages); * ``` */ -export declare function extractMessages(sourceCode: string, filename: string): Promise +export declare function extractMessages(sourceCode: string, filename: string, options: Buffer): Promise + +/** + * Extract messages from multiple files in parallel + * + * This function reads multiple files and extracts internationalization + * messages from all of them in parallel using all available CPU cores. + * + * # Arguments + * + * * `file_paths` - Array of file paths to process + * * `options` - Extraction options (parser configuration) + * + * # Returns + * + * A Promise that resolves to an ExtractionResult containing: + * * `messages` - Array of all extracted messages from all files + * * `warnings` - Array of warning messages (including file read errors) + * + * # Example + * + * ```javascript + * const result = await extractMessagesFromFiles(['app.tsx', 'components/Header.tsx']); + * console.log(result.messages); + * ``` + */ +export declare function extractMessagesFromFiles(filePaths: Array, options: Buffer): Promise diff --git a/napi-rs/index.js b/napi-rs/binding.js similarity index 95% rename from napi-rs/index.js rename to napi-rs/binding.js index b3b1ef2..430398a 100644 --- a/napi-rs/index.js +++ b/napi-rs/binding.js @@ -3,9 +3,6 @@ // @ts-nocheck /* auto-generated by NAPI-RS */ -const { createRequire } = require('node:module') -require = createRequire(__filename) - const { readFileSync } = require('node:fs') let nativeBinding = null const loadErrors = [] @@ -108,7 +105,24 @@ function requireNative() { } } else if (process.platform === 'win32') { if (process.arch === 'x64') { + if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') { + try { + return require('./lingui-extractor-swc.win32-x64-gnu.node') + } catch (e) { + loadErrors.push(e) + } try { + const binding = require('lingui-extractor-swc-win32-x64-gnu') + const bindingPackageVersion = require('lingui-extractor-swc-win32-x64-gnu/package.json').version + if (bindingPackageVersion !== '1.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 1.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + } + return binding + } catch (e) { + loadErrors.push(e) + } + } else { + try { return require('./lingui-extractor-swc.win32-x64-msvc.node') } catch (e) { loadErrors.push(e) @@ -123,6 +137,7 @@ function requireNative() { } catch (e) { loadErrors.push(e) } + } } else if (process.arch === 'ia32') { try { return require('./lingui-extractor-swc.win32-ia32-msvc.node') @@ -521,13 +536,17 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { wasiBindingError = err } } - if (!nativeBinding) { + if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { try { wasiBinding = require('lingui-extractor-swc-wasm32-wasi') nativeBinding = wasiBinding } catch (err) { if (process.env.NAPI_RS_FORCE_WASI) { - wasiBindingError.cause = err + if (!wasiBindingError) { + wasiBindingError = err + } else { + wasiBindingError.cause = err + } loadErrors.push(err) } } @@ -558,3 +577,4 @@ if (!nativeBinding) { module.exports = nativeBinding module.exports.extractMessages = nativeBinding.extractMessages +module.exports.extractMessagesFromFiles = nativeBinding.extractMessagesFromFiles diff --git a/napi-rs/index.ts b/napi-rs/index.ts new file mode 100644 index 0000000..4bbb734 --- /dev/null +++ b/napi-rs/index.ts @@ -0,0 +1,78 @@ +import * as binding from './binding' +import {ParserConfig} from "@swc/types" + +export type ExtractorOptions = { + parser?: ParserConfig +} + +function toBuffer(t: any): Buffer { + return Buffer.from(JSON.stringify(t)); +} + +/** + * Extract messages from source code + * + * This function parses JavaScript/TypeScript code and extracts internationalization + * messages from lingui macro calls and components. + * + * # Arguments + * + * * `source_code` - The source code to analyze + * * `filename` - The filename (used for error reporting and source maps) + * + * # Returns + * + * A Promise that resolves to an ExtractionResult containing: + * * `messages` - Array of extracted messages + * * `warnings` - Array of warning messages encountered during extraction + * + * # Example + * + * ```javascript + * const result = await extractMessages(sourceCode, 'app.tsx'); + * console.log(result.messages); + * ``` + */ +export function extractMessages(sourceCode: string, filename: string, options?: ExtractorOptions) { + options = options || { + parser: {syntax: "ecmascript"} + }; + + options!.parser!.syntax = options!.parser!.syntax || "ecmascript"; + + return binding.extractMessages(sourceCode, filename, toBuffer(options)) +} + +/** + * Extract messages from multiple files in parallel + * + * This function reads multiple files and extracts internationalization + * messages from all of them in parallel using all available CPU cores. + * + * # Arguments + * + * * `filePaths` - Array of file paths to process + * * `options` - Extraction options (parser configuration) + * + * # Returns + * + * A Promise that resolves to an ExtractionResult containing: + * * `messages` - Array of all extracted messages from all files + * * `warnings` - Array of warning messages (including file read errors) + * + * # Example + * + * ```javascript + * const result = await extractMessagesFromFiles(['app.tsx', 'components/Header.tsx']); + * console.log(result.messages); + * ``` + */ +export function extractMessagesFromFiles(filePaths: string[], options?: ExtractorOptions) { + options = options || { + parser: {syntax: "ecmascript"} + }; + + options!.parser!.syntax = options!.parser!.syntax || "ecmascript"; + + return binding.extractMessagesFromFiles(filePaths, toBuffer(options)) +} diff --git a/napi-rs/package.json b/napi-rs/package.json index c777430..6bf3540 100644 --- a/napi-rs/package.json +++ b/napi-rs/package.json @@ -2,7 +2,7 @@ "name": "lingui-extractor-swc", "version": "1.0.0", "description": "Template project for writing node package with napi-rs", - "main": "index.js", + "main": "index.ts", "repository": { "type": "git", "url": "git+ssh://git@github.com/napi-rs/package-template.git" @@ -19,7 +19,7 @@ ], "files": [ "index.d.ts", - "index.js", + "index.ts", "browser.js" ], "napi": { @@ -47,7 +47,7 @@ "scripts": { "artifacts": "napi artifacts", "bench": "node --import @oxc-node/core/register benchmark/bench.ts", - "build": "napi build --platform --release", + "build": "napi build --platform --release --js ./binding.js --dts ./binding.d.ts", "build:debug": "napi build --platform", "format": "run-p format:prettier format:rs format:toml", "format:prettier": "prettier . -w", @@ -55,7 +55,7 @@ "format:rs": "cargo fmt", "lint": "oxlint .", "prepublishOnly": "napi prepublish -t npm", - "test": "ava", + "test": "vitest run", "preversion": "napi build --platform && git add .", "version": "napi version", "prepare": "husky" @@ -65,6 +65,7 @@ "@emnapi/runtime": "^1.8.1", "@napi-rs/cli": "^3.5.1", "@oxc-node/core": "^0.0.35", + "@swc/types": "^0.1.25", "@taplo/cli": "^0.7.0", "@tybys/wasm-util": "^0.10.0", "ava": "^6.4.1", diff --git a/napi-rs/src/lib.rs b/napi-rs/src/lib.rs index 6245fa0..ba910db 100644 --- a/napi-rs/src/lib.rs +++ b/napi-rs/src/lib.rs @@ -1,13 +1,19 @@ #![deny(clippy::all)] -use lingui_extractor::ExtractionResult; +use lingui_extractor::{ExtractionResult, ExtractorOptions}; use napi::bindgen_prelude::*; use napi_derive::napi; +use rayon::prelude::*; +use std::fs; +use anyhow::Result as AnyhowResult; + +use swc_core::node::get_deserialized; /// Task for extracting messages asynchronously pub struct ExtractMessagesTask { source_code: String, filename: String, + pub options: String, } impl Task for ExtractMessagesTask { @@ -15,7 +21,9 @@ impl Task for ExtractMessagesTask { type JsValue = ExtractionResult; fn compute(&mut self) -> Result { - let result = lingui_extractor::extract_messages(&self.source_code, &self.filename) + let options: ExtractorOptions = get_deserialized(&self.options)?; + + let result = lingui_extractor::extract_messages(&self.source_code, &self.filename, &options) .map_err(|e| Error::new(Status::GenericFailure, e.to_string()))?; Ok(result) @@ -49,9 +57,107 @@ impl Task for ExtractMessagesTask { /// console.log(result.messages); /// ``` #[napi(ts_return_type = "Promise")] -pub fn extract_messages(source_code: String, filename: String) -> AsyncTask { +pub fn extract_messages( + source_code: String, + filename: String, + options: Buffer, +) -> AsyncTask { + let options = String::from_utf8_lossy(options.as_ref()).into_owned(); + AsyncTask::new(ExtractMessagesTask { source_code, filename, + options, + }) +} + +/// Task for extracting messages from multiple files in parallel +pub struct ExtractMessagesFromFilesTask { + file_paths: Vec, + pub options: String, +} + +impl Task for ExtractMessagesFromFilesTask { + type Output = ExtractionResult; + type JsValue = ExtractionResult; + + fn compute(&mut self) -> Result { + let options: ExtractorOptions = get_deserialized(&self.options)?; + + // Process files in parallel using rayon + let results: Vec<(String, AnyhowResult)> = self + .file_paths + .par_iter() + .map(|file_path| { + let result = fs::read_to_string(file_path) + .map_err(|e| anyhow::anyhow!("Failed to read file '{file_path}': {e}")) + .and_then(|source_code| { + lingui_extractor::extract_messages(&source_code, file_path, &options) + .map_err(|e| anyhow::anyhow!("Failed to extract from '{file_path}': {e}")) + }); + + (file_path.clone(), result) + }) + .collect(); + + // Aggregate all messages and warnings + let mut all_messages = Vec::new(); + let mut all_warnings = Vec::new(); + + for (_file_path, result) in results { + match result { + Ok(extraction_result) => { + all_messages.extend(extraction_result.messages); + all_warnings.extend(extraction_result.warnings); + } + Err(err) => { + all_warnings.push(err.to_string()); + } + } + } + + Ok(ExtractionResult { + messages: all_messages, + warnings: all_warnings, + }) + } + + fn resolve(&mut self, _env: Env, output: Self::Output) -> Result { + Ok(output) + } +} + +/// Extract messages from multiple files in parallel +/// +/// This function reads multiple files and extracts internationalization +/// messages from all of them in parallel using all available CPU cores. +/// +/// # Arguments +/// +/// * `file_paths` - Array of file paths to process +/// * `options` - Extraction options (parser configuration) +/// +/// # Returns +/// +/// A Promise that resolves to an ExtractionResult containing: +/// * `messages` - Array of all extracted messages from all files +/// * `warnings` - Array of warning messages (including file read errors) +/// +/// # Example +/// +/// ```javascript +/// const result = await extractMessagesFromFiles(['app.tsx', 'components/Header.tsx']); +/// console.log(result.messages); +/// ``` +#[napi(ts_return_type = "Promise")] +pub fn extract_messages_from_files( + file_paths: Vec, + options: Buffer, +) -> AsyncTask { + let options = String::from_utf8_lossy(options.as_ref()).into_owned(); + + AsyncTask::new(ExtractMessagesFromFilesTask { + file_paths, + options, }) } diff --git a/napi-rs/yarn.lock b/napi-rs/yarn.lock index fef1bb4..960ab45 100644 --- a/napi-rs/yarn.lock +++ b/napi-rs/yarn.lock @@ -15,6 +15,16 @@ __metadata: languageName: node linkType: hard +"@emnapi/core@npm:^1.8.1": + version: 1.8.1 + resolution: "@emnapi/core@npm:1.8.1" + dependencies: + "@emnapi/wasi-threads": "npm:1.1.0" + tslib: "npm:^2.4.0" + checksum: 10c0/2c242f4b49779bac403e1cbcc98edacdb1c8ad36562408ba9a20663824669e930bc8493be46a2522d9dc946b8d96cd7073970bae914928c7671b5221c85b432e + languageName: node + linkType: hard + "@emnapi/runtime@npm:^1.5.0": version: 1.5.0 resolution: "@emnapi/runtime@npm:1.5.0" @@ -24,6 +34,15 @@ __metadata: languageName: node linkType: hard +"@emnapi/runtime@npm:^1.8.1": + version: 1.8.1 + resolution: "@emnapi/runtime@npm:1.8.1" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/f4929d75e37aafb24da77d2f58816761fe3f826aad2e37fa6d4421dac9060cbd5098eea1ac3c9ecc4526b89deb58153852fa432f87021dc57863f2ff726d713f + languageName: node + linkType: hard + "@emnapi/wasi-threads@npm:1.1.0": version: 1.1.0 resolution: "@emnapi/wasi-threads@npm:1.1.0" @@ -33,243 +52,426 @@ __metadata: languageName: node linkType: hard -"@inquirer/checkbox@npm:^4.2.2": - version: 4.2.2 - resolution: "@inquirer/checkbox@npm:4.2.2" +"@esbuild/aix-ppc64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/aix-ppc64@npm:0.27.3" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/android-arm64@npm:0.27.3" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/android-arm@npm:0.27.3" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/android-x64@npm:0.27.3" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/darwin-arm64@npm:0.27.3" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/darwin-x64@npm:0.27.3" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/freebsd-arm64@npm:0.27.3" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/freebsd-x64@npm:0.27.3" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-arm64@npm:0.27.3" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-arm@npm:0.27.3" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-ia32@npm:0.27.3" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-loong64@npm:0.27.3" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-mips64el@npm:0.27.3" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-ppc64@npm:0.27.3" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-riscv64@npm:0.27.3" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-s390x@npm:0.27.3" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/linux-x64@npm:0.27.3" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/netbsd-arm64@npm:0.27.3" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/netbsd-x64@npm:0.27.3" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/openbsd-arm64@npm:0.27.3" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/openbsd-x64@npm:0.27.3" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openharmony-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/openharmony-arm64@npm:0.27.3" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/sunos-x64@npm:0.27.3" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/win32-arm64@npm:0.27.3" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/win32-ia32@npm:0.27.3" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.27.3": + version: 0.27.3 + resolution: "@esbuild/win32-x64@npm:0.27.3" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@inquirer/ansi@npm:^2.0.3": + version: 2.0.3 + resolution: "@inquirer/ansi@npm:2.0.3" + checksum: 10c0/69c87abf39878fc68b07f9171249434dc055b95dbcafe81dc6f273aaa59343ce192e50063e7438ad6f3792d059731558f1537124f8230f219676108df3d3396c + languageName: node + linkType: hard + +"@inquirer/checkbox@npm:^5.0.5": + version: 5.0.5 + resolution: "@inquirer/checkbox@npm:5.0.5" dependencies: - "@inquirer/core": "npm:^10.2.0" - "@inquirer/figures": "npm:^1.0.13" - "@inquirer/type": "npm:^3.0.8" - ansi-escapes: "npm:^4.3.2" - yoctocolors-cjs: "npm:^2.1.2" + "@inquirer/ansi": "npm:^2.0.3" + "@inquirer/core": "npm:^11.1.2" + "@inquirer/figures": "npm:^2.0.3" + "@inquirer/type": "npm:^4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/d5861d1e6c18ce263b2d88da5c8071857e65e5815409b062919fcfc489598615ccc7df1d32c7348dc2587aed2053ee045cf770612a73ef8a0b08374f969ed388 + checksum: 10c0/b83dcb89cf33459f6154a5d977750da353900d09d9d30b2b9ae82e708fa21504ed10d670b01e6ae2ead7f22ceafd06366d27531893431ec3e9a4cd76d1dabbfb languageName: node linkType: hard -"@inquirer/confirm@npm:^5.1.16": - version: 5.1.16 - resolution: "@inquirer/confirm@npm:5.1.16" +"@inquirer/confirm@npm:^6.0.5": + version: 6.0.5 + resolution: "@inquirer/confirm@npm:6.0.5" dependencies: - "@inquirer/core": "npm:^10.2.0" - "@inquirer/type": "npm:^3.0.8" + "@inquirer/core": "npm:^11.1.2" + "@inquirer/type": "npm:^4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/9a54171554404bfc89f2a065bb89282ca7cc69046956943e348c29a6a7c4d263dfbcbb46ad115aef616866083eb42130d05424a4a8ef3b30777a912e7ae20fec + checksum: 10c0/b73b6df72471d799b16d3ce1d8ac8cddef0949e3988bb2837b238acd9b5a6ff1a9989b1236c3af7aa039543901096f2cf6c4b480b54eca4a254882b74d5e03a2 languageName: node linkType: hard -"@inquirer/core@npm:^10.2.0": - version: 10.2.0 - resolution: "@inquirer/core@npm:10.2.0" +"@inquirer/core@npm:^11.1.2": + version: 11.1.2 + resolution: "@inquirer/core@npm:11.1.2" dependencies: - "@inquirer/figures": "npm:^1.0.13" - "@inquirer/type": "npm:^3.0.8" - ansi-escapes: "npm:^4.3.2" + "@inquirer/ansi": "npm:^2.0.3" + "@inquirer/figures": "npm:^2.0.3" + "@inquirer/type": "npm:^4.0.3" cli-width: "npm:^4.1.0" - mute-stream: "npm:^2.0.0" + fast-wrap-ansi: "npm:^0.2.0" + mute-stream: "npm:^3.0.0" signal-exit: "npm:^4.1.0" - wrap-ansi: "npm:^6.2.0" - yoctocolors-cjs: "npm:^2.1.2" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/6dc93634dc6005bb7c58522cd80bbf8fb5f756f104445a1916ed7a00dad99e10165a559f5b13e6d141ae744dbe4a5b9e405e10c5986ef7859988de191b3b71f3 + checksum: 10c0/8b59553500878d9822b863093d1e1f31d15b8b703029c1a83eca521fa0febc3ac166ae80fdb681aa51b6a1eca52e914b079aaecf7e1ac4ce006099af4b938c13 languageName: node linkType: hard -"@inquirer/editor@npm:^4.2.18": - version: 4.2.18 - resolution: "@inquirer/editor@npm:4.2.18" +"@inquirer/editor@npm:^5.0.5": + version: 5.0.5 + resolution: "@inquirer/editor@npm:5.0.5" dependencies: - "@inquirer/core": "npm:^10.2.0" - "@inquirer/external-editor": "npm:^1.0.1" - "@inquirer/type": "npm:^3.0.8" + "@inquirer/core": "npm:^11.1.2" + "@inquirer/external-editor": "npm:^2.0.3" + "@inquirer/type": "npm:^4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/a8b48bc692a566cbbf6c3ea3d095d26bef14abfba631958f61cea85b54bcd7a4dbd7aa164a4752f48d7317340ebe126ac4ef6593b12ad6b3b729d4ec99df1fc1 + checksum: 10c0/24fb50299ed76a93a4bc684e8d5ffe4314c36615deadbe3476a8abb52006b816686e779a7eb8243c44a433fc8629f16b09da76d015cd1372e10ef36dbf5cf676 languageName: node linkType: hard -"@inquirer/expand@npm:^4.0.18": - version: 4.0.18 - resolution: "@inquirer/expand@npm:4.0.18" +"@inquirer/expand@npm:^5.0.5": + version: 5.0.5 + resolution: "@inquirer/expand@npm:5.0.5" dependencies: - "@inquirer/core": "npm:^10.2.0" - "@inquirer/type": "npm:^3.0.8" - yoctocolors-cjs: "npm:^2.1.2" + "@inquirer/core": "npm:^11.1.2" + "@inquirer/type": "npm:^4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/9fe1daef1efefdc4760bfe0317e0a765a8defe2f9453230938886ea06abd65c6a7a3eb72dc90ba5bbb82709f6703a271b8f7bb97283b825763a4cd1f68efb8a8 + checksum: 10c0/ccf392906d6285166f7708e28cbfeeb5a8fb24b45c3a1cb635ea73cb27bf98e91135e3aa68d50971f86532fadda9d931bbc178dd6ea190291a45daf83e7d157e languageName: node linkType: hard -"@inquirer/external-editor@npm:^1.0.1": - version: 1.0.1 - resolution: "@inquirer/external-editor@npm:1.0.1" +"@inquirer/external-editor@npm:^2.0.3": + version: 2.0.3 + resolution: "@inquirer/external-editor@npm:2.0.3" dependencies: - chardet: "npm:^2.1.0" - iconv-lite: "npm:^0.6.3" + chardet: "npm:^2.1.1" + iconv-lite: "npm:^0.7.2" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/bdac4395e0bba7065d39b141d618bfc06369f246c402c511396a5238baf2657f3038ccba8438521a49e5cb602f4302b9d1f46b52b647b27af2c9911720022118 + checksum: 10c0/b1de771f92b2b7f61f9174b704159ba57b8490281b1d18060abbabde065425d6dbde6e061d319b117f541db3821ec1dc80089530effa234490b2aa06ea13976c languageName: node linkType: hard -"@inquirer/figures@npm:^1.0.13": - version: 1.0.13 - resolution: "@inquirer/figures@npm:1.0.13" - checksum: 10c0/23700a4a0627963af5f51ef4108c338ae77bdd90393164b3fdc79a378586e1f5531259882b7084c690167bf5a36e83033e45aca0321570ba810890abe111014f +"@inquirer/figures@npm:^2.0.3": + version: 2.0.3 + resolution: "@inquirer/figures@npm:2.0.3" + checksum: 10c0/f316119e5cefd4d2d03dead3658b7ff02d34e0a41caa47f72a3ca095c1046ea252a62e9343f5847677ad6ddc490509fd7c10e845458d5af8936130ffb3a4810c languageName: node linkType: hard -"@inquirer/input@npm:^4.2.2": - version: 4.2.2 - resolution: "@inquirer/input@npm:4.2.2" +"@inquirer/input@npm:^5.0.5": + version: 5.0.5 + resolution: "@inquirer/input@npm:5.0.5" dependencies: - "@inquirer/core": "npm:^10.2.0" - "@inquirer/type": "npm:^3.0.8" + "@inquirer/core": "npm:^11.1.2" + "@inquirer/type": "npm:^4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/7d8f202eb0e970841005026634596ffdb3b68a9c6b599841ad46b25841e277d2950582e5eeddd69b168d7ef52631cf15782922844731d01d3808a018461d8f98 + checksum: 10c0/0f19347e1e77cd22d21482d6f1224545f1ea225a91d91b364e2a6929709a2dc2e1db761d3b63204e20e01e65552bf487ea87e2cf4e5437e02818a1b09fd2a216 languageName: node linkType: hard -"@inquirer/number@npm:^3.0.18": - version: 3.0.18 - resolution: "@inquirer/number@npm:3.0.18" +"@inquirer/number@npm:^4.0.5": + version: 4.0.5 + resolution: "@inquirer/number@npm:4.0.5" dependencies: - "@inquirer/core": "npm:^10.2.0" - "@inquirer/type": "npm:^3.0.8" + "@inquirer/core": "npm:^11.1.2" + "@inquirer/type": "npm:^4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/dbaead7813bba1978ef429eb485bb02e55e9047194f2337313592546b4504b06ea18b37919e23ea53388f5314dc96ea038e4599c7f396344910b17b3d9a159cb + checksum: 10c0/840b45dc8cbf26cd5c27b4a01d2f695a423d22558fcd73ac741c41495ef32f652ac10af310ec3bb6cb90c8581cba1cda71890847532138d776fe8be2f3743001 languageName: node linkType: hard -"@inquirer/password@npm:^4.0.18": - version: 4.0.18 - resolution: "@inquirer/password@npm:4.0.18" +"@inquirer/password@npm:^5.0.5": + version: 5.0.5 + resolution: "@inquirer/password@npm:5.0.5" dependencies: - "@inquirer/core": "npm:^10.2.0" - "@inquirer/type": "npm:^3.0.8" - ansi-escapes: "npm:^4.3.2" + "@inquirer/ansi": "npm:^2.0.3" + "@inquirer/core": "npm:^11.1.2" + "@inquirer/type": "npm:^4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/7d05940633f74d1fa3850884ce71b32c3790bc421439cd77366553df39ec910f64dcdb2084776ee9d9a10d248390801700113ca3d8b0b02b1517531109798814 + checksum: 10c0/ea9e4055d6d12657587bc1db2114495034646ae07c6a0099cb5f1ad165fb9f500d927aaf6e436234b18b6fcffaad2bbd53fb666ad6c627b77604cf8490e8cd05 languageName: node linkType: hard -"@inquirer/prompts@npm:^7.8.4": - version: 7.8.4 - resolution: "@inquirer/prompts@npm:7.8.4" +"@inquirer/prompts@npm:^8.0.0": + version: 8.2.1 + resolution: "@inquirer/prompts@npm:8.2.1" dependencies: - "@inquirer/checkbox": "npm:^4.2.2" - "@inquirer/confirm": "npm:^5.1.16" - "@inquirer/editor": "npm:^4.2.18" - "@inquirer/expand": "npm:^4.0.18" - "@inquirer/input": "npm:^4.2.2" - "@inquirer/number": "npm:^3.0.18" - "@inquirer/password": "npm:^4.0.18" - "@inquirer/rawlist": "npm:^4.1.6" - "@inquirer/search": "npm:^3.1.1" - "@inquirer/select": "npm:^4.3.2" + "@inquirer/checkbox": "npm:^5.0.5" + "@inquirer/confirm": "npm:^6.0.5" + "@inquirer/editor": "npm:^5.0.5" + "@inquirer/expand": "npm:^5.0.5" + "@inquirer/input": "npm:^5.0.5" + "@inquirer/number": "npm:^4.0.5" + "@inquirer/password": "npm:^5.0.5" + "@inquirer/rawlist": "npm:^5.2.1" + "@inquirer/search": "npm:^4.1.1" + "@inquirer/select": "npm:^5.0.5" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/bf04aa108eeed602287eda26c646b6407cdd2db3d4a2175d1e88f1325987b5aeb7741af3f2ad82035811d74efa5c561d78ec642423060723d93b2275e669f0bb + checksum: 10c0/78b82b9a5dee14c613b8e72061895e022710cf327415f9eec124c64f51149f5f8a30af63774d6053c1ec86e75414524e412fd7e93a59ab9edbd92f0bb9d1e0da languageName: node linkType: hard -"@inquirer/rawlist@npm:^4.1.6": - version: 4.1.6 - resolution: "@inquirer/rawlist@npm:4.1.6" +"@inquirer/rawlist@npm:^5.2.1": + version: 5.2.1 + resolution: "@inquirer/rawlist@npm:5.2.1" dependencies: - "@inquirer/core": "npm:^10.2.0" - "@inquirer/type": "npm:^3.0.8" - yoctocolors-cjs: "npm:^2.1.2" + "@inquirer/core": "npm:^11.1.2" + "@inquirer/type": "npm:^4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/0589a3098de545cf83450b2ce59623865e06e435a773240a5f6f47c20602a13ea3e9bf85849f39e57335e4faace510182c0251e88de0a3cc8d23b4f2270772e3 + checksum: 10c0/5ab060774605d59e59852e3bcc5b61a64412fb2162fad43858cdc969940e4be078ae83e1c33140f5f9a46ad70cbfece7a7f2f05b88ae8d4666458e2adf31bff5 languageName: node linkType: hard -"@inquirer/search@npm:^3.1.1": - version: 3.1.1 - resolution: "@inquirer/search@npm:3.1.1" +"@inquirer/search@npm:^4.1.1": + version: 4.1.1 + resolution: "@inquirer/search@npm:4.1.1" dependencies: - "@inquirer/core": "npm:^10.2.0" - "@inquirer/figures": "npm:^1.0.13" - "@inquirer/type": "npm:^3.0.8" - yoctocolors-cjs: "npm:^2.1.2" + "@inquirer/core": "npm:^11.1.2" + "@inquirer/figures": "npm:^2.0.3" + "@inquirer/type": "npm:^4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/31f5e74d200f1c40b47099ebb74f5138b0900c99afe1b98b4a3d60e286cd8ca062ed5a68a5d1394cb6b8584cac2931f2b584241cf39dc34b83dc4ce8eb7daddd + checksum: 10c0/bc581846e04d1cac78bb4267c7411de875dd33a527fc4e6af4acbc388759a36b8e057a4a88e19797cb0d2402ab7a4dd32b43f61d9924bd8489a580f7f0f29365 languageName: node linkType: hard -"@inquirer/select@npm:^4.3.2": - version: 4.3.2 - resolution: "@inquirer/select@npm:4.3.2" +"@inquirer/select@npm:^5.0.5": + version: 5.0.5 + resolution: "@inquirer/select@npm:5.0.5" dependencies: - "@inquirer/core": "npm:^10.2.0" - "@inquirer/figures": "npm:^1.0.13" - "@inquirer/type": "npm:^3.0.8" - ansi-escapes: "npm:^4.3.2" - yoctocolors-cjs: "npm:^2.1.2" + "@inquirer/ansi": "npm:^2.0.3" + "@inquirer/core": "npm:^11.1.2" + "@inquirer/figures": "npm:^2.0.3" + "@inquirer/type": "npm:^4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/48aaec29e21fd19b9b3045ad01d7fbe46aa9ac828adc5b8e5b8e5055daad47e0d1134cde40281e9e639bd963c30756ca729c20fcb629e3053ac411020cf4bc78 + checksum: 10c0/991ccef6a5f6ae11721cef274ab87303cac072180132d00ae01211f7c3d637dd44f136b86610ababb67e2c132e291b798b3d45cab21f364bf0a4b9ad6cb360f1 languageName: node linkType: hard -"@inquirer/type@npm:^3.0.8": - version: 3.0.8 - resolution: "@inquirer/type@npm:3.0.8" +"@inquirer/type@npm:^4.0.3": + version: 4.0.3 + resolution: "@inquirer/type@npm:4.0.3" peerDependencies: "@types/node": ">=18" peerDependenciesMeta: "@types/node": optional: true - checksum: 10c0/1171bffb9ea0018b12ec4f46a7b485f7e2a328e620e89f3b03f2be8c25889e5b9e62daca3ea10ed040a71d847066c4d9879dc1fea8aa5690ebbc968d3254a5ac + checksum: 10c0/98f893c986194085a9b31916efe231fb6d4a4f7c01a3e698aab6ef6177cffbc19e10d76131968837a23ef620ef62fb2285884049f8d6f0962a39d8c338840041 languageName: node linkType: hard @@ -287,6 +489,13 @@ __metadata: languageName: node linkType: hard +"@isaacs/cliui@npm:^9.0.0": + version: 9.0.0 + resolution: "@isaacs/cliui@npm:9.0.0" + checksum: 10c0/971063b7296419f85053dacd0a0285dcadaa3dfc139228b23e016c1a9848121ad4aa5e7fcca7522062014e1eb6239a7424188b9f2cba893a79c90aae5710319c + languageName: node + linkType: hard + "@isaacs/fs-minipass@npm:^4.0.0": version: 4.0.1 resolution: "@isaacs/fs-minipass@npm:4.0.1" @@ -296,6 +505,13 @@ __metadata: languageName: node linkType: hard +"@jridgewell/sourcemap-codec@npm:^1.5.5": + version: 1.5.5 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.5" + checksum: 10c0/f9e538f302b63c0ebc06eecb1dd9918dd4289ed36147a0ddce35d6ea4d7ebbda243cda7b2213b6a5e1d8087a298d5cf630fb2bd39329cdecb82017023f6081a0 + languageName: node + linkType: hard + "@mapbox/node-pre-gyp@npm:^2.0.0": version: 2.0.0 resolution: "@mapbox/node-pre-gyp@npm:2.0.0" @@ -313,35 +529,31 @@ __metadata: languageName: node linkType: hard -"@napi-rs/cli@npm:^3.2.0": - version: 3.2.0 - resolution: "@napi-rs/cli@npm:3.2.0" +"@napi-rs/cli@npm:^3.5.1": + version: 3.5.1 + resolution: "@napi-rs/cli@npm:3.5.1" dependencies: - "@inquirer/prompts": "npm:^7.8.4" + "@inquirer/prompts": "npm:^8.0.0" "@napi-rs/cross-toolchain": "npm:^1.0.3" "@napi-rs/wasm-tools": "npm:^1.0.1" - "@octokit/rest": "npm:^22.0.0" + "@octokit/rest": "npm:^22.0.1" clipanion: "npm:^4.0.0-rc.4" colorette: "npm:^2.0.20" - debug: "npm:^4.4.1" - emnapi: "npm:^1.5.0" - es-toolkit: "npm:^1.39.10" - find-up: "npm:^7.0.0" + emnapi: "npm:^1.7.1" + es-toolkit: "npm:^1.41.0" js-yaml: "npm:^4.1.0" - semver: "npm:^7.7.2" + obug: "npm:^2.0.0" + semver: "npm:^7.7.3" typanion: "npm:^3.14.0" peerDependencies: - "@emnapi/runtime": ^1.1.0 - emnapi: ^1.1.0 + "@emnapi/runtime": ^1.7.1 peerDependenciesMeta: "@emnapi/runtime": optional: true - emnapi: - optional: true bin: napi: dist/cli.js napi-raw: cli.mjs - checksum: 10c0/3b871bed67e7691ce5eb7e3a6b1f57ae628144e2f8ddcc0cfe0305c3603a0b4ad5073ca82ba74d8cf13aeaacd57c083bbf3423f89b256b3b34bb3ab03e55e1c0 + checksum: 10c0/b67d057a052a28917c90653101dfcff9e7f60342b1120f4613d571533cf8080116d97d9825ad88d672c79a5165a0edf7aec4eb4db702464c0551ed48c1b81adf languageName: node linkType: hard @@ -930,6 +1142,28 @@ __metadata: languageName: node linkType: hard +"@npmcli/agent@npm:^4.0.0": + version: 4.0.0 + resolution: "@npmcli/agent@npm:4.0.0" + dependencies: + agent-base: "npm:^7.1.0" + http-proxy-agent: "npm:^7.0.0" + https-proxy-agent: "npm:^7.0.1" + lru-cache: "npm:^11.2.1" + socks-proxy-agent: "npm:^8.0.3" + checksum: 10c0/f7b5ce0f3dd42c3f8c6546e8433573d8049f67ef11ec22aa4704bc41483122f68bf97752e06302c455ead667af5cb753e6a09bff06632bc465c1cfd4c4b75a53 + languageName: node + linkType: hard + +"@npmcli/fs@npm:^5.0.0": + version: 5.0.0 + resolution: "@npmcli/fs@npm:5.0.0" + dependencies: + semver: "npm:^7.3.5" + checksum: 10c0/26e376d780f60ff16e874a0ac9bc3399186846baae0b6e1352286385ac134d900cc5dafaded77f38d77f86898fc923ae1cee9d7399f0275b1aa24878915d722b + languageName: node + linkType: hard + "@octokit/auth-token@npm:^6.0.0": version: 6.0.0 resolution: "@octokit/auth-token@npm:6.0.0" @@ -937,57 +1171,57 @@ __metadata: languageName: node linkType: hard -"@octokit/core@npm:^7.0.2": - version: 7.0.3 - resolution: "@octokit/core@npm:7.0.3" +"@octokit/core@npm:^7.0.6": + version: 7.0.6 + resolution: "@octokit/core@npm:7.0.6" dependencies: "@octokit/auth-token": "npm:^6.0.0" - "@octokit/graphql": "npm:^9.0.1" - "@octokit/request": "npm:^10.0.2" - "@octokit/request-error": "npm:^7.0.0" - "@octokit/types": "npm:^14.0.0" + "@octokit/graphql": "npm:^9.0.3" + "@octokit/request": "npm:^10.0.6" + "@octokit/request-error": "npm:^7.0.2" + "@octokit/types": "npm:^16.0.0" before-after-hook: "npm:^4.0.0" universal-user-agent: "npm:^7.0.0" - checksum: 10c0/51427b4c3337e15b394d60277b673c5628a72d245a23b1a446e4249d15e37983fa01d09f10c8ab281207e024929f4d2f6cc27a4d345ec0ece2df78d42586d846 + checksum: 10c0/95a328ff7c7223d9eb4aa778c63171828514ae0e0f588d33beb81a4dc03bbeae055382f6060ce23c979ab46272409942ff2cf3172109999e48429c47055b1fbe languageName: node linkType: hard -"@octokit/endpoint@npm:^11.0.0": - version: 11.0.0 - resolution: "@octokit/endpoint@npm:11.0.0" +"@octokit/endpoint@npm:^11.0.2": + version: 11.0.2 + resolution: "@octokit/endpoint@npm:11.0.2" dependencies: - "@octokit/types": "npm:^14.0.0" + "@octokit/types": "npm:^16.0.0" universal-user-agent: "npm:^7.0.2" - checksum: 10c0/ba929128af5327393fdb3a31f416277ae3036a44566d35955a4eddd484a15b5ddc6abe219a56355f3313c7197d59f4e8bf574a4f0a8680bc1c8725b88433d391 + checksum: 10c0/878ac12fbccff772968689b4744590677c5a3f12bebe31544832c84761bf1c6be521e8a3af07abffc9455a74dd4d1f350d714fc46fd7ce14a0a2b5f2d4e3a84c languageName: node linkType: hard -"@octokit/graphql@npm:^9.0.1": - version: 9.0.1 - resolution: "@octokit/graphql@npm:9.0.1" +"@octokit/graphql@npm:^9.0.3": + version: 9.0.3 + resolution: "@octokit/graphql@npm:9.0.3" dependencies: - "@octokit/request": "npm:^10.0.2" - "@octokit/types": "npm:^14.0.0" + "@octokit/request": "npm:^10.0.6" + "@octokit/types": "npm:^16.0.0" universal-user-agent: "npm:^7.0.0" - checksum: 10c0/d80ec923b7624e8a7c84430a287ff18da3c77058e3166ce8e9a67950af00e88767f85d973b4032fc837b67b72d02b323aff2d8f7eeae1ae463bde1a51ddcb83d + checksum: 10c0/58588d3fb2834f64244fa5376ca7922a30117b001b621e141fab0d52806370803ab0c046ac99b120fa5f45b770f52a815157fb6ffc147fc6c1da4047c1f1af49 languageName: node linkType: hard -"@octokit/openapi-types@npm:^25.1.0": - version: 25.1.0 - resolution: "@octokit/openapi-types@npm:25.1.0" - checksum: 10c0/b5b1293b11c6ec7112c7a2713f8507c2696d5db8902ce893b594080ab0329f5a6fcda1b5ac6fe6eed9425e897f4d03326c1bdf5c337e35d324e7b925e52a2661 +"@octokit/openapi-types@npm:^27.0.0": + version: 27.0.0 + resolution: "@octokit/openapi-types@npm:27.0.0" + checksum: 10c0/602d1de033da180a2e982cdbd3646bd5b2e16ecf36b9955a0f23e37ae9e6cb086abb48ff2ae6f2de000fce03e8ae9051794611ae4a95a8f5f6fb63276e7b8e31 languageName: node linkType: hard -"@octokit/plugin-paginate-rest@npm:^13.0.1": - version: 13.1.1 - resolution: "@octokit/plugin-paginate-rest@npm:13.1.1" +"@octokit/plugin-paginate-rest@npm:^14.0.0": + version: 14.0.0 + resolution: "@octokit/plugin-paginate-rest@npm:14.0.0" dependencies: - "@octokit/types": "npm:^14.1.0" + "@octokit/types": "npm:^16.0.0" peerDependencies: "@octokit/core": ">=6" - checksum: 10c0/88d80608881df88f8e832856e9279ac1c1af30ced9adb7c847f4d120b4bb308c2ab9d791ffd4c9585759e57a938798b4c3f2f988a389f2d78a61aaaebc36ffa7 + checksum: 10c0/841d79d4ccfe18fc809a4a67529b75c1dcdda13399bf4bf5b48ce7559c8b4b2cd422e3204bad4cbdea31c0cf0943521067415268e5bcfc615a3b813e058cad6b languageName: node linkType: hard @@ -1000,57 +1234,57 @@ __metadata: languageName: node linkType: hard -"@octokit/plugin-rest-endpoint-methods@npm:^16.0.0": - version: 16.0.0 - resolution: "@octokit/plugin-rest-endpoint-methods@npm:16.0.0" +"@octokit/plugin-rest-endpoint-methods@npm:^17.0.0": + version: 17.0.0 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:17.0.0" dependencies: - "@octokit/types": "npm:^14.1.0" + "@octokit/types": "npm:^16.0.0" peerDependencies: "@octokit/core": ">=6" - checksum: 10c0/6cfe068dbd550bd5914374e65b89482b9deac29f6c26bf02ab6298e956d95b62fc15a2a49dfc6ff76f5938c6ff7fdfe5b7eccdb7551eaff8b1daf7394bc946cb + checksum: 10c0/cf9984d7cf6a36ff7ff1b86078ae45fe246e3df10fcef0bccf20c8cfd27bf5e7d98dcb9cf5a7b56332b9c6fa30be28d159c2987d272a4758f77056903d94402f languageName: node linkType: hard -"@octokit/request-error@npm:^7.0.0": - version: 7.0.0 - resolution: "@octokit/request-error@npm:7.0.0" +"@octokit/request-error@npm:^7.0.2": + version: 7.1.0 + resolution: "@octokit/request-error@npm:7.1.0" dependencies: - "@octokit/types": "npm:^14.0.0" - checksum: 10c0/e52bdd832a0187d66b20da5716c374d028f63d824908a9e16cad462754324083839b11cf6956e1d23f6112d3c77f17334ebbd80f49d56840b2b03ed9abef8cb0 + "@octokit/types": "npm:^16.0.0" + checksum: 10c0/62b90a54545c36a30b5ffdda42e302c751be184d85b68ffc7f1242c51d7ca54dbd185b7d0027b491991776923a910c85c9c51269fe0d86111bac187507a5abc4 languageName: node linkType: hard -"@octokit/request@npm:^10.0.2": - version: 10.0.3 - resolution: "@octokit/request@npm:10.0.3" +"@octokit/request@npm:^10.0.6": + version: 10.0.7 + resolution: "@octokit/request@npm:10.0.7" dependencies: - "@octokit/endpoint": "npm:^11.0.0" - "@octokit/request-error": "npm:^7.0.0" - "@octokit/types": "npm:^14.0.0" + "@octokit/endpoint": "npm:^11.0.2" + "@octokit/request-error": "npm:^7.0.2" + "@octokit/types": "npm:^16.0.0" fast-content-type-parse: "npm:^3.0.0" universal-user-agent: "npm:^7.0.2" - checksum: 10c0/2d9b2134390ef3aa9fe0c5e659fe93dd94fbabc4dcc6da6e16998dc84b5bda200e6b7a4e178f567883d0ba99c0ea5a6d095a417d86d76854569196c39d2f9a6d + checksum: 10c0/f789a75bf681b204ccd3d538921db662e148ed980005158d80ec4f16811e9ab73f375d4f30ef697852abd748a62f025060ea1b0c5198ec9c2e8d04e355064390 languageName: node linkType: hard -"@octokit/rest@npm:^22.0.0": - version: 22.0.0 - resolution: "@octokit/rest@npm:22.0.0" +"@octokit/rest@npm:^22.0.1": + version: 22.0.1 + resolution: "@octokit/rest@npm:22.0.1" dependencies: - "@octokit/core": "npm:^7.0.2" - "@octokit/plugin-paginate-rest": "npm:^13.0.1" + "@octokit/core": "npm:^7.0.6" + "@octokit/plugin-paginate-rest": "npm:^14.0.0" "@octokit/plugin-request-log": "npm:^6.0.0" - "@octokit/plugin-rest-endpoint-methods": "npm:^16.0.0" - checksum: 10c0/aea3714301f43fbadb22048045a7aef417cdefa997d1baf0b26860eaa9038fb033f7d4299eab06af57a03433871084cf38144fc5414caf80accce714e76d34e2 + "@octokit/plugin-rest-endpoint-methods": "npm:^17.0.0" + checksum: 10c0/f3abd84e887cc837973214ce70720a9bba53f5575f40601c6122aa25206e9055d859c0388437f0a137f6cd0e4ff405e1b46b903475b0db32a17bada0c6513d5b languageName: node linkType: hard -"@octokit/types@npm:^14.0.0, @octokit/types@npm:^14.1.0": - version: 14.1.0 - resolution: "@octokit/types@npm:14.1.0" +"@octokit/types@npm:^16.0.0": + version: 16.0.0 + resolution: "@octokit/types@npm:16.0.0" dependencies: - "@octokit/openapi-types": "npm:^25.1.0" - checksum: 10c0/4640a6c0a95386be4d015b96c3a906756ea657f7df3c6e706d19fea6bf3ac44fd2991c8c817afe1e670ff9042b85b0e06f7fd373f6bbd47da64208701bb46d5b + "@octokit/openapi-types": "npm:^27.0.0" + checksum: 10c0/b8d41098ba6fc194d13d641f9441347e3a3b96c0efabac0e14f57319340a2d4d1c8676e4cb37ab3062c5c323c617e790b0126916e9bf7b201b0cced0826f8ae2 languageName: node linkType: hard @@ -1315,6 +1549,181 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-android-arm-eabi@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.57.1" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@rollup/rollup-android-arm64@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-android-arm64@npm:4.57.1" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-arm64@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-darwin-arm64@npm:4.57.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-x64@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-darwin-x64@npm:4.57.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-freebsd-arm64@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.57.1" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-freebsd-x64@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-freebsd-x64@npm:4.57.1" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-gnueabihf@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.57.1" + conditions: os=linux & cpu=arm & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-musleabihf@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.57.1" + conditions: os=linux & cpu=arm & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-gnu@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.57.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-musl@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.57.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-loong64-gnu@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-loong64-gnu@npm:4.57.1" + conditions: os=linux & cpu=loong64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-loong64-musl@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-loong64-musl@npm:4.57.1" + conditions: os=linux & cpu=loong64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-ppc64-gnu@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-ppc64-gnu@npm:4.57.1" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-ppc64-musl@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-ppc64-musl@npm:4.57.1" + conditions: os=linux & cpu=ppc64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-riscv64-gnu@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.57.1" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-riscv64-musl@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-riscv64-musl@npm:4.57.1" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-s390x-gnu@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.57.1" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-gnu@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.57.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-musl@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.57.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-openbsd-x64@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-openbsd-x64@npm:4.57.1" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-openharmony-arm64@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-openharmony-arm64@npm:4.57.1" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-win32-arm64-msvc@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.57.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-win32-ia32-msvc@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.57.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@rollup/rollup-win32-x64-gnu@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-win32-x64-gnu@npm:4.57.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-win32-x64-msvc@npm:4.57.1": + version: 4.57.1 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.57.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@sindresorhus/merge-streams@npm:^2.1.0": version: 2.3.0 resolution: "@sindresorhus/merge-streams@npm:2.3.0" @@ -1322,6 +1731,29 @@ __metadata: languageName: node linkType: hard +"@standard-schema/spec@npm:^1.0.0": + version: 1.1.0 + resolution: "@standard-schema/spec@npm:1.1.0" + checksum: 10c0/d90f55acde4b2deb983529c87e8025fa693de1a5e8b49ecc6eb84d1fd96328add0e03d7d551442156c7432fd78165b2c26ff561b970a9a881f046abb78d6a526 + languageName: node + linkType: hard + +"@swc/counter@npm:^0.1.3": + version: 0.1.3 + resolution: "@swc/counter@npm:0.1.3" + checksum: 10c0/8424f60f6bf8694cfd2a9bca45845bce29f26105cda8cf19cdb9fd3e78dc6338699e4db77a89ae449260bafa1cc6bec307e81e7fb96dbf7dcfce0eea55151356 + languageName: node + linkType: hard + +"@swc/types@npm:^0.1.25": + version: 0.1.25 + resolution: "@swc/types@npm:0.1.25" + dependencies: + "@swc/counter": "npm:^0.1.3" + checksum: 10c0/847a5b20b131281f89d640a7ed4887fb65724807d53d334b230e84b98c21097aa10cd28a074f9ed287a6ce109e443dd4bafbe7dcfb62333d7806c4ea3e7f8aca + languageName: node + linkType: hard + "@taplo/cli@npm:^0.7.0": version: 0.7.0 resolution: "@taplo/cli@npm:0.7.0" @@ -1349,7 +1781,24 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:^1.0.0": +"@types/chai@npm:^5.2.2": + version: 5.2.3 + resolution: "@types/chai@npm:5.2.3" + dependencies: + "@types/deep-eql": "npm:*" + assertion-error: "npm:^2.0.1" + checksum: 10c0/e0ef1de3b6f8045a5e473e867c8565788c444271409d155588504840ad1a53611011f85072188c2833941189400228c1745d78323dac13fcede9c2b28bacfb2f + languageName: node + linkType: hard + +"@types/deep-eql@npm:*": + version: 4.0.2 + resolution: "@types/deep-eql@npm:4.0.2" + checksum: 10c0/bf3f811843117900d7084b9d0c852da9a044d12eb40e6de73b552598a6843c21291a8a381b0532644574beecd5e3491c5ff3a0365ab86b15d59862c025384844 + languageName: node + linkType: hard + +"@types/estree@npm:1.0.8, @types/estree@npm:^1.0.0": version: 1.0.8 resolution: "@types/estree@npm:1.0.8" checksum: 10c0/39d34d1afaa338ab9763f37ad6066e3f349444f9052b9676a7cc0252ef9485a41c6d81c9c4e0d26e9077993354edf25efc853f3224dd4b447175ef62bdcc86a5 @@ -1378,14 +1827,101 @@ __metadata: languageName: node linkType: hard -"abbrev@npm:^3.0.0": - version: 3.0.1 - resolution: "abbrev@npm:3.0.1" - checksum: 10c0/21ba8f574ea57a3106d6d35623f2c4a9111d9ee3e9a5be47baed46ec2457d2eac46e07a5c4a60186f88cb98abbe3e24f2d4cca70bc2b12f1692523e2209a9ccf +"@vitest/expect@npm:4.0.18": + version: 4.0.18 + resolution: "@vitest/expect@npm:4.0.18" + dependencies: + "@standard-schema/spec": "npm:^1.0.0" + "@types/chai": "npm:^5.2.2" + "@vitest/spy": "npm:4.0.18" + "@vitest/utils": "npm:4.0.18" + chai: "npm:^6.2.1" + tinyrainbow: "npm:^3.0.3" + checksum: 10c0/123b0aa111682e82ec5289186df18037b1a1768700e468ee0f9879709aaa320cf790463c15c0d8ee10df92b402f4394baf5d27797e604d78e674766d87bcaadc languageName: node linkType: hard -"acorn-import-attributes@npm:^1.9.5": +"@vitest/mocker@npm:4.0.18": + version: 4.0.18 + resolution: "@vitest/mocker@npm:4.0.18" + dependencies: + "@vitest/spy": "npm:4.0.18" + estree-walker: "npm:^3.0.3" + magic-string: "npm:^0.30.21" + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0-0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + checksum: 10c0/fb0a257e7e167759d4ad228d53fa7bad2267586459c4a62188f2043dd7163b4b02e1e496dc3c227837f776e7d73d6c4343613e89e7da379d9d30de8260f1ee4b + languageName: node + linkType: hard + +"@vitest/pretty-format@npm:4.0.18": + version: 4.0.18 + resolution: "@vitest/pretty-format@npm:4.0.18" + dependencies: + tinyrainbow: "npm:^3.0.3" + checksum: 10c0/0086b8c88eeca896d8e4b98fcdef452c8041a1b63eb9e85d3e0bcc96c8aa76d8e9e0b6990ebb0bb0a697c4ebab347e7735888b24f507dbff2742ddce7723fd94 + languageName: node + linkType: hard + +"@vitest/runner@npm:4.0.18": + version: 4.0.18 + resolution: "@vitest/runner@npm:4.0.18" + dependencies: + "@vitest/utils": "npm:4.0.18" + pathe: "npm:^2.0.3" + checksum: 10c0/fdb4afa411475133c05ba266c8092eaf1e56cbd5fb601f92ec6ccb9bab7ca52e06733ee8626599355cba4ee71cb3a8f28c84d3b69dc972e41047edc50229bc01 + languageName: node + linkType: hard + +"@vitest/snapshot@npm:4.0.18": + version: 4.0.18 + resolution: "@vitest/snapshot@npm:4.0.18" + dependencies: + "@vitest/pretty-format": "npm:4.0.18" + magic-string: "npm:^0.30.21" + pathe: "npm:^2.0.3" + checksum: 10c0/d3bfefa558db9a69a66886ace6575eb96903a5ba59f4d9a5d0fecb4acc2bb8dbb443ef409f5ac1475f2e1add30bd1d71280f98912da35e89c75829df9e84ea43 + languageName: node + linkType: hard + +"@vitest/spy@npm:4.0.18": + version: 4.0.18 + resolution: "@vitest/spy@npm:4.0.18" + checksum: 10c0/6de537890b3994fcadb8e8d8ac05942320ae184f071ec395d978a5fba7fa928cbb0c5de85af86a1c165706c466e840de8779eaff8c93450c511c7abaeb9b8a4e + languageName: node + linkType: hard + +"@vitest/utils@npm:4.0.18": + version: 4.0.18 + resolution: "@vitest/utils@npm:4.0.18" + dependencies: + "@vitest/pretty-format": "npm:4.0.18" + tinyrainbow: "npm:^3.0.3" + checksum: 10c0/4a3c43c1421eb90f38576926496f6c80056167ba111e63f77cf118983902673737a1a38880b890d7c06ec0a12475024587344ee502b3c43093781533022f2aeb + languageName: node + linkType: hard + +"abbrev@npm:^3.0.0": + version: 3.0.1 + resolution: "abbrev@npm:3.0.1" + checksum: 10c0/21ba8f574ea57a3106d6d35623f2c4a9111d9ee3e9a5be47baed46ec2457d2eac46e07a5c4a60186f88cb98abbe3e24f2d4cca70bc2b12f1692523e2209a9ccf + languageName: node + linkType: hard + +"abbrev@npm:^4.0.0": + version: 4.0.0 + resolution: "abbrev@npm:4.0.0" + checksum: 10c0/b4cc16935235e80702fc90192e349e32f8ef0ed151ef506aa78c81a7c455ec18375c4125414b99f84b2e055199d66383e787675f0bcd87da7a4dbd59f9eac1d5 + languageName: node + linkType: hard + +"acorn-import-attributes@npm:^1.9.5": version: 1.9.5 resolution: "acorn-import-attributes@npm:1.9.5" peerDependencies: @@ -1412,22 +1948,13 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:^7.1.2": +"agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": version: 7.1.4 resolution: "agent-base@npm:7.1.4" checksum: 10c0/c2c9ab7599692d594b6a161559ada307b7a624fa4c7b03e3afdb5a5e31cd0e53269115b620fcab024c5ac6a6f37fa5eb2e004f076ad30f5f7e6b8b671f7b35fe languageName: node linkType: hard -"ansi-escapes@npm:^4.3.2": - version: 4.3.2 - resolution: "ansi-escapes@npm:4.3.2" - dependencies: - type-fest: "npm:^0.21.3" - checksum: 10c0/da917be01871525a3dfcf925ae2977bc59e8c513d4423368645634bf5d4ceba5401574eb705c1e92b79f7292af5a656f78c5725a4b0e1cec97c4b413705c1d50 - languageName: node - linkType: hard - "ansi-escapes@npm:^7.0.0": version: 7.1.0 resolution: "ansi-escapes@npm:7.1.0" @@ -1504,6 +2031,13 @@ __metadata: languageName: node linkType: hard +"assertion-error@npm:^2.0.1": + version: 2.0.1 + resolution: "assertion-error@npm:2.0.1" + checksum: 10c0/bbbcb117ac6480138f8c93cf7f535614282dea9dc828f540cdece85e3c665e8f78958b96afac52f29ff883c72638e6a87d469ecc9fe5bc902df03ed24a55dba8 + languageName: node + linkType: hard + "async-sema@npm:^3.1.1": version: 3.1.1 resolution: "async-sema@npm:3.1.1" @@ -1573,6 +2107,15 @@ __metadata: languageName: node linkType: hard +"balanced-match@npm:^4.0.2": + version: 4.0.2 + resolution: "balanced-match@npm:4.0.2" + dependencies: + jackspeak: "npm:^4.2.3" + checksum: 10c0/493eee4bece3f8b270cea8d3d6d1122ce008dd6b0d5aca8a3f1e623be6897be18c926018eadc454bd719bb7cc46d939c39fa2a05fff86b30f65382f020f6926d + languageName: node + linkType: hard + "before-after-hook@npm:^4.0.0": version: 4.0.0 resolution: "before-after-hook@npm:4.0.0" @@ -1605,6 +2148,15 @@ __metadata: languageName: node linkType: hard +"brace-expansion@npm:^5.0.2": + version: 5.0.2 + resolution: "brace-expansion@npm:5.0.2" + dependencies: + balanced-match: "npm:^4.0.2" + checksum: 10c0/60c765e5df6fc0ceca3d5703202ae6779db61f28ea3bf93a04dbf0d50c22ef8e4644e09d0459c827077cd2d09ba8f199a04d92c36419fcf874601a5565013174 + languageName: node + linkType: hard + "braces@npm:^3.0.3": version: 3.0.3 resolution: "braces@npm:3.0.3" @@ -1614,6 +2166,25 @@ __metadata: languageName: node linkType: hard +"cacache@npm:^20.0.1": + version: 20.0.3 + resolution: "cacache@npm:20.0.3" + dependencies: + "@npmcli/fs": "npm:^5.0.0" + fs-minipass: "npm:^3.0.0" + glob: "npm:^13.0.0" + lru-cache: "npm:^11.1.0" + minipass: "npm:^7.0.3" + minipass-collect: "npm:^2.0.1" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + p-map: "npm:^7.0.2" + ssri: "npm:^13.0.0" + unique-filename: "npm:^5.0.0" + checksum: 10c0/c7da1ca694d20e8f8aedabd21dc11518f809a7d2b59aa76a1fc655db5a9e62379e465c157ddd2afe34b19230808882288effa6911b2de26a088a6d5645123462 + languageName: node + linkType: hard + "callsites@npm:^4.2.0": version: 4.2.0 resolution: "callsites@npm:4.2.0" @@ -1630,6 +2201,13 @@ __metadata: languageName: node linkType: hard +"chai@npm:^6.2.1": + version: 6.2.2 + resolution: "chai@npm:6.2.2" + checksum: 10c0/e6c69e5f0c11dffe6ea13d0290936ebb68fcc1ad688b8e952e131df6a6d5797d5e860bc55cef1aca2e950c3e1f96daf79e9d5a70fb7dbaab4e46355e2635ed53 + languageName: node + linkType: hard + "chalk@npm:^5.4.1, chalk@npm:^5.6.0": version: 5.6.2 resolution: "chalk@npm:5.6.2" @@ -1637,10 +2215,10 @@ __metadata: languageName: node linkType: hard -"chardet@npm:^2.1.0": - version: 2.1.0 - resolution: "chardet@npm:2.1.0" - checksum: 10c0/d1b03e47371851ed72741a898281d58f8a9b577aeea6fdfa75a86832898b36c550b3ad057e66d50d774a9cebd9f56c66b6880e4fe75e387794538ba7565b0b6f +"chardet@npm:^2.1.1": + version: 2.1.1 + resolution: "chardet@npm:2.1.1" + checksum: 10c0/d8391dd412338442b3de0d3a488aa9327f8bcf74b62b8723d6bd0b85c4084d50b731320e0a7c710edb1d44de75969995d2784b80e4c13b004a6c7a0db4c6e793 languageName: node linkType: hard @@ -1837,6 +2415,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.3.4": + version: 4.4.3 + resolution: "debug@npm:4.4.3" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/d79136ec6c83ecbefd0f6a5593da6a9c91ec4d7ddc4b54c883d6e71ec9accb5f67a1a5e96d00a328196b5b5c86d365e98d8a3a70856aaf16b4e7b1985e67f5a6 + languageName: node + linkType: hard + "detect-libc@npm:^2.0.0": version: 2.0.4 resolution: "detect-libc@npm:2.0.4" @@ -1858,15 +2448,15 @@ __metadata: languageName: node linkType: hard -"emnapi@npm:^1.5.0": - version: 1.5.0 - resolution: "emnapi@npm:1.5.0" +"emnapi@npm:^1.7.1": + version: 1.8.1 + resolution: "emnapi@npm:1.8.1" peerDependencies: node-addon-api: ">= 6.1.0" peerDependenciesMeta: node-addon-api: optional: true - checksum: 10c0/cd910c86331e5b68b5f5f99d8a263015a357218921400e5e3720489e4830c097fea01436e7f5301ecd81185d5344bb88b9088ef731cd155a17b776724b0e6f22 + checksum: 10c0/a95b167083ee485a84a06202b693f9588bc32080dba82b5752bf805959e97005db1e0cb82ebfe9f35129858b7325f7161c63e97dc78e756a8d6a61443eca79bc languageName: node linkType: hard @@ -1891,6 +2481,22 @@ __metadata: languageName: node linkType: hard +"encoding@npm:^0.1.13": + version: 0.1.13 + resolution: "encoding@npm:0.1.13" + dependencies: + iconv-lite: "npm:^0.6.2" + checksum: 10c0/36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039 + languageName: node + linkType: hard + +"env-paths@npm:^2.2.0": + version: 2.2.1 + resolution: "env-paths@npm:2.2.1" + checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 + languageName: node + linkType: hard + "environment@npm:^1.0.0": version: 1.1.0 resolution: "environment@npm:1.1.0" @@ -1898,15 +2504,118 @@ __metadata: languageName: node linkType: hard -"es-toolkit@npm:^1.39.10": - version: 1.39.10 - resolution: "es-toolkit@npm:1.39.10" +"err-code@npm:^2.0.2": + version: 2.0.3 + resolution: "err-code@npm:2.0.3" + checksum: 10c0/b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66 + languageName: node + linkType: hard + +"es-module-lexer@npm:^1.7.0": + version: 1.7.0 + resolution: "es-module-lexer@npm:1.7.0" + checksum: 10c0/4c935affcbfeba7fb4533e1da10fa8568043df1e3574b869385980de9e2d475ddc36769891936dbb07036edb3c3786a8b78ccf44964cd130dedc1f2c984b6c7b + languageName: node + linkType: hard + +"es-toolkit@npm:^1.41.0": + version: 1.44.0 + resolution: "es-toolkit@npm:1.44.0" dependenciesMeta: "@trivago/prettier-plugin-sort-imports@4.3.0": unplugged: true prettier-plugin-sort-re-exports@0.0.1: unplugged: true - checksum: 10c0/244dd6be25bc8c7af9f085f5b9aae08169eca760fc7d4735020f8f711b6a572e0bf205400326fa85a7924e20747d315756dba1b3a5f0d2887231374ec3651a98 + checksum: 10c0/b80ff52ddc85ba26914cda57c9d4e46379ccc38c60dc097ef0d065cc0b20f95a16cf8d537969eea600b51c6687b5900a6cce67489db16d5ccc14d47597a29c34 + languageName: node + linkType: hard + +"esbuild@npm:^0.27.0": + version: 0.27.3 + resolution: "esbuild@npm:0.27.3" + dependencies: + "@esbuild/aix-ppc64": "npm:0.27.3" + "@esbuild/android-arm": "npm:0.27.3" + "@esbuild/android-arm64": "npm:0.27.3" + "@esbuild/android-x64": "npm:0.27.3" + "@esbuild/darwin-arm64": "npm:0.27.3" + "@esbuild/darwin-x64": "npm:0.27.3" + "@esbuild/freebsd-arm64": "npm:0.27.3" + "@esbuild/freebsd-x64": "npm:0.27.3" + "@esbuild/linux-arm": "npm:0.27.3" + "@esbuild/linux-arm64": "npm:0.27.3" + "@esbuild/linux-ia32": "npm:0.27.3" + "@esbuild/linux-loong64": "npm:0.27.3" + "@esbuild/linux-mips64el": "npm:0.27.3" + "@esbuild/linux-ppc64": "npm:0.27.3" + "@esbuild/linux-riscv64": "npm:0.27.3" + "@esbuild/linux-s390x": "npm:0.27.3" + "@esbuild/linux-x64": "npm:0.27.3" + "@esbuild/netbsd-arm64": "npm:0.27.3" + "@esbuild/netbsd-x64": "npm:0.27.3" + "@esbuild/openbsd-arm64": "npm:0.27.3" + "@esbuild/openbsd-x64": "npm:0.27.3" + "@esbuild/openharmony-arm64": "npm:0.27.3" + "@esbuild/sunos-x64": "npm:0.27.3" + "@esbuild/win32-arm64": "npm:0.27.3" + "@esbuild/win32-ia32": "npm:0.27.3" + "@esbuild/win32-x64": "npm:0.27.3" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-arm64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/openharmony-arm64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10c0/fdc3f87a3f08b3ef98362f37377136c389a0d180fda4b8d073b26ba930cf245521db0a368f119cc7624bc619248fff1439f5811f062d853576f8ffa3df8ee5f1 languageName: node linkType: hard @@ -1948,6 +2657,15 @@ __metadata: languageName: node linkType: hard +"estree-walker@npm:^3.0.3": + version: 3.0.3 + resolution: "estree-walker@npm:3.0.3" + dependencies: + "@types/estree": "npm:^1.0.0" + checksum: 10c0/c12e3c2b2642d2bcae7d5aa495c60fa2f299160946535763969a1c83fc74518ffa9c2cd3a8b69ac56aea547df6a8aac25f729a342992ef0bbac5f1c73e78995d + languageName: node + linkType: hard + "esutils@npm:^2.0.3": version: 2.0.3 resolution: "esutils@npm:2.0.3" @@ -1962,6 +2680,20 @@ __metadata: languageName: node linkType: hard +"expect-type@npm:^1.2.2": + version: 1.3.0 + resolution: "expect-type@npm:1.3.0" + checksum: 10c0/8412b3fe4f392c420ab41dae220b09700e4e47c639a29ba7ba2e83cc6cffd2b4926f7ac9e47d7e277e8f4f02acda76fd6931cb81fd2b382fa9477ef9ada953fd + languageName: node + linkType: hard + +"exponential-backoff@npm:^3.1.1": + version: 3.1.3 + resolution: "exponential-backoff@npm:3.1.3" + checksum: 10c0/77e3ae682b7b1f4972f563c6dbcd2b0d54ac679e62d5d32f3e5085feba20483cf28bd505543f520e287a56d4d55a28d7874299941faf637e779a1aa5994d1267 + languageName: node + linkType: hard + "fast-content-type-parse@npm:^3.0.0": version: 3.0.0 resolution: "fast-content-type-parse@npm:3.0.0" @@ -1989,6 +2721,31 @@ __metadata: languageName: node linkType: hard +"fast-string-truncated-width@npm:^3.0.2": + version: 3.0.3 + resolution: "fast-string-truncated-width@npm:3.0.3" + checksum: 10c0/043b8663397d14a3880ce4f3407bcda60b40db9bbeafe62863a35d1f9c69ea17c8da3fcd72de235553e6c9cd053128cde9e24ca0d4a7463208f48db3cd23d981 + languageName: node + linkType: hard + +"fast-string-width@npm:^3.0.2": + version: 3.0.2 + resolution: "fast-string-width@npm:3.0.2" + dependencies: + fast-string-truncated-width: "npm:^3.0.2" + checksum: 10c0/c8822d175315bb353ebe782b65214ac53b13e3bf704e03b132ea7bdfa8de6a636375b3ab7a4097545393d109381c37c4f387c72a462c90b61412dbc4632f39a7 + languageName: node + linkType: hard + +"fast-wrap-ansi@npm:^0.2.0": + version: 0.2.0 + resolution: "fast-wrap-ansi@npm:0.2.0" + dependencies: + fast-string-width: "npm:^3.0.2" + checksum: 10c0/c0eb6debee565c5dbb9132dddff5c4d4aba5eb02185ae4dab285acd6186018cffca04264e92f373cbf592a9bcd1c33d65dba036030a8f3baeff1169969a1b59b + languageName: node + linkType: hard + "fastq@npm:^1.6.0": version: 1.19.1 resolution: "fastq@npm:1.19.1" @@ -1998,6 +2755,18 @@ __metadata: languageName: node linkType: hard +"fdir@npm:^6.5.0": + version: 6.5.0 + resolution: "fdir@npm:6.5.0" + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + checksum: 10c0/e345083c4306b3aed6cb8ec551e26c36bab5c511e99ea4576a16750ddc8d3240e63826cc624f5ae17ad4dc82e68a253213b60d556c11bfad064b7607847ed07f + languageName: node + linkType: hard + "figures@npm:^6.1.0": version: 6.1.0 resolution: "figures@npm:6.1.0" @@ -2030,17 +2799,6 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^7.0.0": - version: 7.0.0 - resolution: "find-up@npm:7.0.0" - dependencies: - locate-path: "npm:^7.2.0" - path-exists: "npm:^5.0.0" - unicorn-magic: "npm:^0.1.0" - checksum: 10c0/e6ee3e6154560bc0ab3bc3b7d1348b31513f9bdf49a5dd2e952495427d559fa48cdf33953e85a309a323898b43fa1bfbc8b80c880dfc16068384783034030008 - languageName: node - linkType: hard - "foreground-child@npm:^3.1.0": version: 3.3.1 resolution: "foreground-child@npm:3.3.1" @@ -2051,6 +2809,34 @@ __metadata: languageName: node linkType: hard +"fs-minipass@npm:^3.0.0": + version: 3.0.3 + resolution: "fs-minipass@npm:3.0.3" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10c0/63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94 + languageName: node + linkType: hard + +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10c0/a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + "get-caller-file@npm:^2.0.5": version: 2.0.5 resolution: "get-caller-file@npm:2.0.5" @@ -2090,6 +2876,17 @@ __metadata: languageName: node linkType: hard +"glob@npm:^13.0.0": + version: 13.0.3 + resolution: "glob@npm:13.0.3" + dependencies: + minimatch: "npm:^10.2.0" + minipass: "npm:^7.1.2" + path-scurry: "npm:^2.0.0" + checksum: 10c0/333dc5c40ca0e50400465d8f5c45aa7cdd32580c4d1a4c502dfb4fb9c469a936b8e0c6bbd09cd6353fd05982e48d7f79e819159a36fb3e0a41ee722607bc11a9 + languageName: node + linkType: hard + "globby@npm:^14.1.0": version: 14.1.0 resolution: "globby@npm:14.1.0" @@ -2104,14 +2901,31 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 languageName: node linkType: hard -"https-proxy-agent@npm:^7.0.5": +"http-cache-semantics@npm:^4.1.1": + version: 4.2.0 + resolution: "http-cache-semantics@npm:4.2.0" + checksum: 10c0/45b66a945cf13ec2d1f29432277201313babf4a01d9e52f44b31ca923434083afeca03f18417f599c9ab3d0e7b618ceb21257542338b57c54b710463b4a53e37 + languageName: node + linkType: hard + +"http-proxy-agent@npm:^7.0.0": + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" + dependencies: + agent-base: "npm:^7.1.0" + debug: "npm:^4.3.4" + checksum: 10c0/4207b06a4580fb85dd6dff521f0abf6db517489e70863dca1a0291daa7f2d3d2d6015a57bd702af068ea5cf9f1f6ff72314f5f5b4228d299c0904135d2aef921 + languageName: node + linkType: hard + +"https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.5": version: 7.0.6 resolution: "https-proxy-agent@npm:7.0.6" dependencies: @@ -2130,7 +2944,7 @@ __metadata: languageName: node linkType: hard -"iconv-lite@npm:^0.6.3": +"iconv-lite@npm:^0.6.2": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" dependencies: @@ -2139,6 +2953,15 @@ __metadata: languageName: node linkType: hard +"iconv-lite@npm:^0.7.2": + version: 0.7.2 + resolution: "iconv-lite@npm:0.7.2" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10c0/3c228920f3bd307f56bf8363706a776f4a060eb042f131cd23855ceca962951b264d0997ab38a1ad340e1c5df8499ed26e1f4f0db6b2a2ad9befaff22f14b722 + languageName: node + linkType: hard + "ignore-by-default@npm:^2.1.0": version: 2.1.0 resolution: "ignore-by-default@npm:2.1.0" @@ -2167,6 +2990,13 @@ __metadata: languageName: node linkType: hard +"ip-address@npm:^10.0.1": + version: 10.1.0 + resolution: "ip-address@npm:10.1.0" + checksum: 10c0/0103516cfa93f6433b3bd7333fa876eb21263912329bfa47010af5e16934eeeff86f3d2ae700a3744a137839ddfad62b900c7a445607884a49b5d1e32a3d7566 + languageName: node + linkType: hard + "irregular-plurals@npm:^3.3.0": version: 3.5.0 resolution: "irregular-plurals@npm:3.5.0" @@ -2255,6 +3085,13 @@ __metadata: languageName: node linkType: hard +"isexe@npm:^4.0.0": + version: 4.0.0 + resolution: "isexe@npm:4.0.0" + checksum: 10c0/5884815115bceac452877659a9c7726382531592f43dc29e5d48b7c4100661aed54018cb90bd36cb2eaeba521092570769167acbb95c18d39afdccbcca06c5ce + languageName: node + linkType: hard + "jackspeak@npm:^3.1.2": version: 3.4.3 resolution: "jackspeak@npm:3.4.3" @@ -2268,6 +3105,15 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^4.2.3": + version: 4.2.3 + resolution: "jackspeak@npm:4.2.3" + dependencies: + "@isaacs/cliui": "npm:^9.0.0" + checksum: 10c0/b5c0c414f1607c2aa0597f4bf2c03b8443897fccd5fd3c2b3e4f77d556b2bc7c3d3413828ba91e0789f6fb40ad90242f7f89fb20aee9e9d705bc1681f7564f67 + languageName: node + linkType: hard + "js-string-escape@npm:^1.0.1": version: 1.0.1 resolution: "js-string-escape@npm:1.0.1" @@ -2316,10 +3162,11 @@ __metadata: version: 0.0.0-use.local resolution: "lingui-extractor-swc@workspace:." dependencies: - "@emnapi/core": "npm:^1.5.0" - "@emnapi/runtime": "npm:^1.5.0" - "@napi-rs/cli": "npm:^3.2.0" + "@emnapi/core": "npm:^1.8.1" + "@emnapi/runtime": "npm:^1.8.1" + "@napi-rs/cli": "npm:^3.5.1" "@oxc-node/core": "npm:^0.0.35" + "@swc/types": "npm:^0.1.25" "@taplo/cli": "npm:^0.7.0" "@tybys/wasm-util": "npm:^0.10.0" ava: "npm:^6.4.1" @@ -2330,6 +3177,7 @@ __metadata: prettier: "npm:^3.6.2" tinybench: "npm:^6.0.0" typescript: "npm:^5.9.2" + vitest: "npm:^4.0.18" languageName: unknown linkType: soft @@ -2374,15 +3222,6 @@ __metadata: languageName: node linkType: hard -"locate-path@npm:^7.2.0": - version: 7.2.0 - resolution: "locate-path@npm:7.2.0" - dependencies: - p-locate: "npm:^6.0.0" - checksum: 10c0/139e8a7fe11cfbd7f20db03923cacfa5db9e14fa14887ea121345597472b4a63c1a42a8a5187defeeff6acf98fd568da7382aa39682d38f0af27433953a97751 - languageName: node - linkType: hard - "lodash@npm:^4.17.15": version: 4.17.21 resolution: "lodash@npm:4.17.21" @@ -2410,6 +3249,41 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^11.0.0, lru-cache@npm:^11.1.0, lru-cache@npm:^11.2.1": + version: 11.2.6 + resolution: "lru-cache@npm:11.2.6" + checksum: 10c0/73bbffb298760e71b2bfe8ebc16a311c6a60ceddbba919cfedfd8635c2d125fbfb5a39b71818200e67973b11f8d59c5a9e31d6f90722e340e90393663a66e5cd + languageName: node + linkType: hard + +"magic-string@npm:^0.30.21": + version: 0.30.21 + resolution: "magic-string@npm:0.30.21" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.5.5" + checksum: 10c0/299378e38f9a270069fc62358522ddfb44e94244baa0d6a8980ab2a9b2490a1d03b236b447eee309e17eb3bddfa482c61259d47960eb018a904f0ded52780c4a + languageName: node + linkType: hard + +"make-fetch-happen@npm:^15.0.0": + version: 15.0.3 + resolution: "make-fetch-happen@npm:15.0.3" + dependencies: + "@npmcli/agent": "npm:^4.0.0" + cacache: "npm:^20.0.1" + http-cache-semantics: "npm:^4.1.1" + minipass: "npm:^7.0.2" + minipass-fetch: "npm:^5.0.0" + minipass-flush: "npm:^1.0.5" + minipass-pipeline: "npm:^1.2.4" + negotiator: "npm:^1.0.0" + proc-log: "npm:^6.0.0" + promise-retry: "npm:^2.0.1" + ssri: "npm:^13.0.0" + checksum: 10c0/525f74915660be60b616bcbd267c4a5b59481b073ba125e45c9c3a041bb1a47a2bd0ae79d028eb6f5f95bf9851a4158423f5068539c3093621abb64027e8e461 + languageName: node + linkType: hard + "matcher@npm:^5.0.0": version: 5.0.0 resolution: "matcher@npm:5.0.0" @@ -2468,6 +3342,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^10.2.0": + version: 10.2.0 + resolution: "minimatch@npm:10.2.0" + dependencies: + brace-expansion: "npm:^5.0.2" + checksum: 10c0/256e72812bb99a86cdc788bf46a4da3f6e139db9123e20ed85a6795b93fdc0b76468ac511eb5535a023adb02a53fd598f971e990d0ca3bd6de6d41ea0199def1 + languageName: node + linkType: hard + "minimatch@npm:^9.0.4": version: 9.0.5 resolution: "minimatch@npm:9.0.5" @@ -2477,7 +3360,67 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.4, minipass@npm:^7.1.2": +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10c0/5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e + languageName: node + linkType: hard + +"minipass-fetch@npm:^5.0.0": + version: 5.0.1 + resolution: "minipass-fetch@npm:5.0.1" + dependencies: + encoding: "npm:^0.1.13" + minipass: "npm:^7.0.3" + minipass-sized: "npm:^2.0.0" + minizlib: "npm:^3.0.1" + dependenciesMeta: + encoding: + optional: true + checksum: 10c0/50bcf48c9841ebb25e29a2817468595219c72cfffc7c175a1d7327843c8bef9b72cb01778f46df7eca695dfe47ab98e6167af4cb026ddd80f660842919a5193c + languageName: node + linkType: hard + +"minipass-flush@npm:^1.0.5": + version: 1.0.5 + resolution: "minipass-flush@npm:1.0.5" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10c0/2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd + languageName: node + linkType: hard + +"minipass-pipeline@npm:^1.2.4": + version: 1.2.4 + resolution: "minipass-pipeline@npm:1.2.4" + dependencies: + minipass: "npm:^3.0.0" + checksum: 10c0/cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2 + languageName: node + linkType: hard + +"minipass-sized@npm:^2.0.0": + version: 2.0.0 + resolution: "minipass-sized@npm:2.0.0" + dependencies: + minipass: "npm:^7.1.2" + checksum: 10c0/f9201696a6f6d68610d04c9c83e3d2e5cb9c026aae1c8cbf7e17f386105cb79c1bb088dbc21bf0b1eb4f3fb5df384fd1e7aa3bf1f33868c416ae8c8a92679db8 + languageName: node + linkType: hard + +"minipass@npm:^3.0.0": + version: 3.3.6 + resolution: "minipass@npm:3.3.6" + dependencies: + yallist: "npm:^4.0.0" + checksum: 10c0/a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c + languageName: node + linkType: hard + +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": version: 7.1.2 resolution: "minipass@npm:7.1.2" checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 @@ -2493,6 +3436,15 @@ __metadata: languageName: node linkType: hard +"minizlib@npm:^3.1.0": + version: 3.1.0 + resolution: "minizlib@npm:3.1.0" + dependencies: + minipass: "npm:^7.1.2" + checksum: 10c0/5aad75ab0090b8266069c9aabe582c021ae53eb33c6c691054a13a45db3b4f91a7fb1bd79151e6b4e9e9a86727b522527c0a06ec7d45206b745d54cd3097bcec + languageName: node + linkType: hard + "mkdirp@npm:^3.0.1": version: 3.0.1 resolution: "mkdirp@npm:3.0.1" @@ -2509,10 +3461,10 @@ __metadata: languageName: node linkType: hard -"mute-stream@npm:^2.0.0": - version: 2.0.0 - resolution: "mute-stream@npm:2.0.0" - checksum: 10c0/2cf48a2087175c60c8dcdbc619908b49c07f7adcfc37d29236b0c5c612d6204f789104c98cc44d38acab7b3c96f4a3ec2cfdc4934d0738d876dbefa2a12c69f4 +"mute-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "mute-stream@npm:3.0.0" + checksum: 10c0/12cdb36a101694c7a6b296632e6d93a30b74401873cf7507c88861441a090c71c77a58f213acadad03bc0c8fa186639dec99d68a14497773a8744320c136e701 languageName: node linkType: hard @@ -2523,6 +3475,22 @@ __metadata: languageName: node linkType: hard +"nanoid@npm:^3.3.11": + version: 3.3.11 + resolution: "nanoid@npm:3.3.11" + bin: + nanoid: bin/nanoid.cjs + checksum: 10c0/40e7f70b3d15f725ca072dfc4f74e81fcf1fbb02e491cf58ac0c79093adc9b0a73b152bcde57df4b79cd097e13023d7504acb38404a4da7bc1cd8e887b82fe0b + languageName: node + linkType: hard + +"negotiator@npm:^1.0.0": + version: 1.0.0 + resolution: "negotiator@npm:1.0.0" + checksum: 10c0/4c559dd52669ea48e1914f9d634227c561221dd54734070791f999c52ed0ff36e437b2e07d5c1f6e32909fc625fe46491c16e4a8f0572567d4dd15c3a4fda04b + languageName: node + linkType: hard + "node-fetch@npm:^2.6.7": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" @@ -2548,6 +3516,26 @@ __metadata: languageName: node linkType: hard +"node-gyp@npm:latest": + version: 12.2.0 + resolution: "node-gyp@npm:12.2.0" + dependencies: + env-paths: "npm:^2.2.0" + exponential-backoff: "npm:^3.1.1" + graceful-fs: "npm:^4.2.6" + make-fetch-happen: "npm:^15.0.0" + nopt: "npm:^9.0.0" + proc-log: "npm:^6.0.0" + semver: "npm:^7.3.5" + tar: "npm:^7.5.4" + tinyglobby: "npm:^0.2.12" + which: "npm:^6.0.0" + bin: + node-gyp: bin/node-gyp.js + checksum: 10c0/3ed046746a5a7d90950cd8b0547332b06598443f31fe213ef4332a7174c7b7d259e1704835feda79b87d3f02e59d7791842aac60642ede4396ab25fdf0f8f759 + languageName: node + linkType: hard + "nofilter@npm:^3.0.2": version: 3.1.0 resolution: "nofilter@npm:3.1.0" @@ -2566,6 +3554,17 @@ __metadata: languageName: node linkType: hard +"nopt@npm:^9.0.0": + version: 9.0.0 + resolution: "nopt@npm:9.0.0" + dependencies: + abbrev: "npm:^4.0.0" + bin: + nopt: bin/nopt.js + checksum: 10c0/1822eb6f9b020ef6f7a7516d7b64a8036e09666ea55ac40416c36e4b2b343122c3cff0e2f085675f53de1d2db99a2a89a60ccea1d120bcd6a5347bf6ceb4a7fd + languageName: node + linkType: hard + "npm-normalize-package-bin@npm:^4.0.0": version: 4.0.0 resolution: "npm-normalize-package-bin@npm:4.0.0" @@ -2594,6 +3593,13 @@ __metadata: languageName: node linkType: hard +"obug@npm:^2.0.0, obug@npm:^2.1.1": + version: 2.1.1 + resolution: "obug@npm:2.1.1" + checksum: 10c0/59dccd7de72a047e08f8649e94c1015ec72f94eefb6ddb57fb4812c4b425a813bc7e7cd30c9aca20db3c59abc3c85cc7a62bb656a968741d770f4e8e02bc2e78 + languageName: node + linkType: hard + "onetime@npm:^7.0.0": version: 7.0.0 resolution: "onetime@npm:7.0.0" @@ -2644,21 +3650,10 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^4.0.0": - version: 4.0.0 - resolution: "p-limit@npm:4.0.0" - dependencies: - yocto-queue: "npm:^1.0.0" - checksum: 10c0/a56af34a77f8df2ff61ddfb29431044557fcbcb7642d5a3233143ebba805fc7306ac1d448de724352861cb99de934bc9ab74f0d16fe6a5460bdbdf938de875ad - languageName: node - linkType: hard - -"p-locate@npm:^6.0.0": - version: 6.0.0 - resolution: "p-locate@npm:6.0.0" - dependencies: - p-limit: "npm:^4.0.0" - checksum: 10c0/d72fa2f41adce59c198270aa4d3c832536c87a1806e0f69dffb7c1a7ca998fb053915ca833d90f166a8c082d3859eabfed95f01698a3214c20df6bb8de046312 +"p-map@npm:^7.0.2": + version: 7.0.4 + resolution: "p-map@npm:7.0.4" + checksum: 10c0/a5030935d3cb2919d7e89454d1ce82141e6f9955413658b8c9403cfe379283770ed3048146b44cde168aa9e8c716505f196d5689db0ae3ce9a71521a2fef3abd languageName: node linkType: hard @@ -2693,13 +3688,6 @@ __metadata: languageName: node linkType: hard -"path-exists@npm:^5.0.0": - version: 5.0.0 - resolution: "path-exists@npm:5.0.0" - checksum: 10c0/b170f3060b31604cde93eefdb7392b89d832dfbc1bed717c9718cbe0f230c1669b7e75f87e19901da2250b84d092989a0f9e44d2ef41deb09aa3ad28e691a40a - languageName: node - linkType: hard - "path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" @@ -2717,6 +3705,16 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^2.0.0": + version: 2.0.1 + resolution: "path-scurry@npm:2.0.1" + dependencies: + lru-cache: "npm:^11.0.0" + minipass: "npm:^7.1.2" + checksum: 10c0/2a16ed0e81fbc43513e245aa5763354e25e787dab0d539581a6c3f0f967461a159ed6236b2559de23aa5b88e7dc32b469b6c47568833dd142a4b24b4f5cd2620 + languageName: node + linkType: hard + "path-type@npm:^6.0.0": version: 6.0.0 resolution: "path-type@npm:6.0.0" @@ -2724,6 +3722,20 @@ __metadata: languageName: node linkType: hard +"pathe@npm:^2.0.3": + version: 2.0.3 + resolution: "pathe@npm:2.0.3" + checksum: 10c0/c118dc5a8b5c4166011b2b70608762e260085180bb9e33e80a50dcdb1e78c010b1624f4280c492c92b05fc276715a4c357d1f9edc570f8f1b3d90b6839ebaca1 + languageName: node + linkType: hard + +"picocolors@npm:^1.1.1": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 + languageName: node + linkType: hard + "picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -2731,7 +3743,7 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^4.0.2": +"picomatch@npm:^4.0.2, picomatch@npm:^4.0.3": version: 4.0.3 resolution: "picomatch@npm:4.0.3" checksum: 10c0/9582c951e95eebee5434f59e426cddd228a7b97a0161a375aed4be244bd3fe8e3a31b846808ea14ef2c8a2527a6eeab7b3946a67d5979e81694654f939473ae2 @@ -2763,6 +3775,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.5.6": + version: 8.5.6 + resolution: "postcss@npm:8.5.6" + dependencies: + nanoid: "npm:^3.3.11" + picocolors: "npm:^1.1.1" + source-map-js: "npm:^1.2.1" + checksum: 10c0/5127cc7c91ed7a133a1b7318012d8bfa112da9ef092dddf369ae699a1f10ebbd89b1b9f25f3228795b84585c72aabd5ced5fc11f2ba467eedf7b081a66fad024 + languageName: node + linkType: hard + "prettier@npm:^3.6.2": version: 3.6.2 resolution: "prettier@npm:3.6.2" @@ -2781,6 +3804,23 @@ __metadata: languageName: node linkType: hard +"proc-log@npm:^6.0.0": + version: 6.1.0 + resolution: "proc-log@npm:6.1.0" + checksum: 10c0/4f178d4062733ead9d71a9b1ab24ebcecdfe2250916a5b1555f04fe2eda972a0ec76fbaa8df1ad9c02707add6749219d118a4fc46dc56bdfe4dde4b47d80bb82 + languageName: node + linkType: hard + +"promise-retry@npm:^2.0.1": + version: 2.0.1 + resolution: "promise-retry@npm:2.0.1" + dependencies: + err-code: "npm:^2.0.2" + retry: "npm:^0.12.0" + checksum: 10c0/9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96 + languageName: node + linkType: hard + "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -2831,6 +3871,13 @@ __metadata: languageName: node linkType: hard +"retry@npm:^0.12.0": + version: 0.12.0 + resolution: "retry@npm:0.12.0" + checksum: 10c0/59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe + languageName: node + linkType: hard + "reusify@npm:^1.0.4": version: 1.1.0 resolution: "reusify@npm:1.1.0" @@ -2845,6 +3892,96 @@ __metadata: languageName: node linkType: hard +"rollup@npm:^4.43.0": + version: 4.57.1 + resolution: "rollup@npm:4.57.1" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.57.1" + "@rollup/rollup-android-arm64": "npm:4.57.1" + "@rollup/rollup-darwin-arm64": "npm:4.57.1" + "@rollup/rollup-darwin-x64": "npm:4.57.1" + "@rollup/rollup-freebsd-arm64": "npm:4.57.1" + "@rollup/rollup-freebsd-x64": "npm:4.57.1" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.57.1" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.57.1" + "@rollup/rollup-linux-arm64-gnu": "npm:4.57.1" + "@rollup/rollup-linux-arm64-musl": "npm:4.57.1" + "@rollup/rollup-linux-loong64-gnu": "npm:4.57.1" + "@rollup/rollup-linux-loong64-musl": "npm:4.57.1" + "@rollup/rollup-linux-ppc64-gnu": "npm:4.57.1" + "@rollup/rollup-linux-ppc64-musl": "npm:4.57.1" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.57.1" + "@rollup/rollup-linux-riscv64-musl": "npm:4.57.1" + "@rollup/rollup-linux-s390x-gnu": "npm:4.57.1" + "@rollup/rollup-linux-x64-gnu": "npm:4.57.1" + "@rollup/rollup-linux-x64-musl": "npm:4.57.1" + "@rollup/rollup-openbsd-x64": "npm:4.57.1" + "@rollup/rollup-openharmony-arm64": "npm:4.57.1" + "@rollup/rollup-win32-arm64-msvc": "npm:4.57.1" + "@rollup/rollup-win32-ia32-msvc": "npm:4.57.1" + "@rollup/rollup-win32-x64-gnu": "npm:4.57.1" + "@rollup/rollup-win32-x64-msvc": "npm:4.57.1" + "@types/estree": "npm:1.0.8" + fsevents: "npm:~2.3.2" + dependenciesMeta: + "@rollup/rollup-android-arm-eabi": + optional: true + "@rollup/rollup-android-arm64": + optional: true + "@rollup/rollup-darwin-arm64": + optional: true + "@rollup/rollup-darwin-x64": + optional: true + "@rollup/rollup-freebsd-arm64": + optional: true + "@rollup/rollup-freebsd-x64": + optional: true + "@rollup/rollup-linux-arm-gnueabihf": + optional: true + "@rollup/rollup-linux-arm-musleabihf": + optional: true + "@rollup/rollup-linux-arm64-gnu": + optional: true + "@rollup/rollup-linux-arm64-musl": + optional: true + "@rollup/rollup-linux-loong64-gnu": + optional: true + "@rollup/rollup-linux-loong64-musl": + optional: true + "@rollup/rollup-linux-ppc64-gnu": + optional: true + "@rollup/rollup-linux-ppc64-musl": + optional: true + "@rollup/rollup-linux-riscv64-gnu": + optional: true + "@rollup/rollup-linux-riscv64-musl": + optional: true + "@rollup/rollup-linux-s390x-gnu": + optional: true + "@rollup/rollup-linux-x64-gnu": + optional: true + "@rollup/rollup-linux-x64-musl": + optional: true + "@rollup/rollup-openbsd-x64": + optional: true + "@rollup/rollup-openharmony-arm64": + optional: true + "@rollup/rollup-win32-arm64-msvc": + optional: true + "@rollup/rollup-win32-ia32-msvc": + optional: true + "@rollup/rollup-win32-x64-gnu": + optional: true + "@rollup/rollup-win32-x64-msvc": + optional: true + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: 10c0/a90aaf1166fc495920e44e52dced0b12283aaceb0924abd6f863102128dd428bbcbf85970f792c06bc63d2a2168e7f073b73e05f6f8d76fdae17b7ac6cacba06 + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -2861,7 +3998,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.2, semver@npm:^7.5.3, semver@npm:^7.7.2": +"semver@npm:^7.3.2, semver@npm:^7.5.3": version: 7.7.2 resolution: "semver@npm:7.7.2" bin: @@ -2870,6 +4007,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.3.5, semver@npm:^7.7.3": + version: 7.7.4 + resolution: "semver@npm:7.7.4" + bin: + semver: bin/semver.js + checksum: 10c0/5215ad0234e2845d4ea5bb9d836d42b03499546ddafb12075566899fc617f68794bb6f146076b6881d755de17d6c6cc73372555879ec7dce2c2feee947866ad2 + languageName: node + linkType: hard + "serialize-error@npm:^7.0.1": version: 7.0.1 resolution: "serialize-error@npm:7.0.1" @@ -2902,6 +4048,13 @@ __metadata: languageName: node linkType: hard +"siginfo@npm:^2.0.0": + version: 2.0.0 + resolution: "siginfo@npm:2.0.0" + checksum: 10c0/3def8f8e516fbb34cb6ae415b07ccc5d9c018d85b4b8611e3dc6f8be6d1899f693a4382913c9ed51a06babb5201639d76453ab297d1c54a456544acf5c892e34 + languageName: node + linkType: hard + "signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": version: 4.1.0 resolution: "signal-exit@npm:4.1.0" @@ -2936,6 +4089,41 @@ __metadata: languageName: node linkType: hard +"smart-buffer@npm:^4.2.0": + version: 4.2.0 + resolution: "smart-buffer@npm:4.2.0" + checksum: 10c0/a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539 + languageName: node + linkType: hard + +"socks-proxy-agent@npm:^8.0.3": + version: 8.0.5 + resolution: "socks-proxy-agent@npm:8.0.5" + dependencies: + agent-base: "npm:^7.1.2" + debug: "npm:^4.3.4" + socks: "npm:^2.8.3" + checksum: 10c0/5d2c6cecba6821389aabf18728325730504bf9bb1d9e342e7987a5d13badd7a98838cc9a55b8ed3cb866ad37cc23e1086f09c4d72d93105ce9dfe76330e9d2a6 + languageName: node + linkType: hard + +"socks@npm:^2.8.3": + version: 2.8.7 + resolution: "socks@npm:2.8.7" + dependencies: + ip-address: "npm:^10.0.1" + smart-buffer: "npm:^4.2.0" + checksum: 10c0/2805a43a1c4bcf9ebf6e018268d87b32b32b06fbbc1f9282573583acc155860dc361500f89c73bfbb157caa1b4ac78059eac0ef15d1811eb0ca75e0bdadbc9d2 + languageName: node + linkType: hard + +"source-map-js@npm:^1.2.1": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf + languageName: node + linkType: hard + "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -2943,6 +4131,15 @@ __metadata: languageName: node linkType: hard +"ssri@npm:^13.0.0": + version: 13.0.1 + resolution: "ssri@npm:13.0.1" + dependencies: + minipass: "npm:^7.0.3" + checksum: 10c0/cf6408a18676c57ff2ed06b8a20dc64bb3e748e5c7e095332e6aecaa2b8422b1e94a739a8453bf65156a8a47afe23757ba4ab52d3ea3b62322dc40875763e17a + languageName: node + linkType: hard + "stack-utils@npm:^2.0.6": version: 2.0.6 resolution: "stack-utils@npm:2.0.6" @@ -2952,6 +4149,20 @@ __metadata: languageName: node linkType: hard +"stackback@npm:0.0.2": + version: 0.0.2 + resolution: "stackback@npm:0.0.2" + checksum: 10c0/89a1416668f950236dd5ac9f9a6b2588e1b9b62b1b6ad8dff1bfc5d1a15dbf0aafc9b52d2226d00c28dffff212da464eaeebfc6b7578b9d180cef3e3782c5983 + languageName: node + linkType: hard + +"std-env@npm:^3.10.0": + version: 3.10.0 + resolution: "std-env@npm:3.10.0" + checksum: 10c0/1814927a45004d36dde6707eaf17552a546769bc79a6421be2c16ce77d238158dfe5de30910b78ec30d95135cc1c59ea73ee22d2ca170f8b9753f84da34c427f + languageName: node + linkType: hard + "string-argv@npm:^0.3.2": version: 0.3.2 resolution: "string-argv@npm:0.3.2" @@ -3036,6 +4247,19 @@ __metadata: languageName: node linkType: hard +"tar@npm:^7.5.4": + version: 7.5.7 + resolution: "tar@npm:7.5.7" + dependencies: + "@isaacs/fs-minipass": "npm:^4.0.0" + chownr: "npm:^3.0.0" + minipass: "npm:^7.1.2" + minizlib: "npm:^3.1.0" + yallist: "npm:^5.0.0" + checksum: 10c0/51f261afc437e1112c3e7919478d6176ea83f7f7727864d8c2cce10f0b03a631d1911644a567348c3063c45abdae39718ba97abb073d22aa3538b9a53ae1e31c + languageName: node + linkType: hard + "temp-dir@npm:^3.0.0": version: 3.0.0 resolution: "temp-dir@npm:3.0.0" @@ -3050,6 +4274,13 @@ __metadata: languageName: node linkType: hard +"tinybench@npm:^2.9.0": + version: 2.9.0 + resolution: "tinybench@npm:2.9.0" + checksum: 10c0/c3500b0f60d2eb8db65250afe750b66d51623057ee88720b7f064894a6cb7eb93360ca824a60a31ab16dab30c7b1f06efe0795b352e37914a9d4bad86386a20c + languageName: node + linkType: hard + "tinybench@npm:^6.0.0": version: 6.0.0 resolution: "tinybench@npm:6.0.0" @@ -3057,6 +4288,30 @@ __metadata: languageName: node linkType: hard +"tinyexec@npm:^1.0.2": + version: 1.0.2 + resolution: "tinyexec@npm:1.0.2" + checksum: 10c0/1261a8e34c9b539a9aae3b7f0bb5372045ff28ee1eba035a2a059e532198fe1a182ec61ac60fa0b4a4129f0c4c4b1d2d57355b5cb9aa2d17ac9454ecace502ee + languageName: node + linkType: hard + +"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.15": + version: 0.2.15 + resolution: "tinyglobby@npm:0.2.15" + dependencies: + fdir: "npm:^6.5.0" + picomatch: "npm:^4.0.3" + checksum: 10c0/869c31490d0d88eedb8305d178d4c75e7463e820df5a9b9d388291daf93e8b1eb5de1dad1c1e139767e4269fe75f3b10d5009b2cc14db96ff98986920a186844 + languageName: node + linkType: hard + +"tinyrainbow@npm:^3.0.3": + version: 3.0.3 + resolution: "tinyrainbow@npm:3.0.3" + checksum: 10c0/1e799d35cd23cabe02e22550985a3051dc88814a979be02dc632a159c393a998628eacfc558e4c746b3006606d54b00bcdea0c39301133956d10a27aa27e988c + languageName: node + linkType: hard + "to-regex-range@npm:^5.0.1": version: 5.0.1 resolution: "to-regex-range@npm:5.0.1" @@ -3094,13 +4349,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.21.3": - version: 0.21.3 - resolution: "type-fest@npm:0.21.3" - checksum: 10c0/902bd57bfa30d51d4779b641c2bc403cdf1371fb9c91d3c058b0133694fcfdb817aef07a47f40faf79039eecbaa39ee9d3c532deff244f3a19ce68cea71a61e8 - languageName: node - linkType: hard - "typescript@npm:^5.9.2": version: 5.9.2 resolution: "typescript@npm:5.9.2" @@ -3121,13 +4369,6 @@ __metadata: languageName: node linkType: hard -"unicorn-magic@npm:^0.1.0": - version: 0.1.0 - resolution: "unicorn-magic@npm:0.1.0" - checksum: 10c0/e4ed0de05b0a05e735c7d8a2930881e5efcfc3ec897204d5d33e7e6247f4c31eac92e383a15d9a6bccb7319b4271ee4bea946e211bf14951fec6ff2cbbb66a92 - languageName: node - linkType: hard - "unicorn-magic@npm:^0.3.0": version: 0.3.0 resolution: "unicorn-magic@npm:0.3.0" @@ -3135,6 +4376,24 @@ __metadata: languageName: node linkType: hard +"unique-filename@npm:^5.0.0": + version: 5.0.0 + resolution: "unique-filename@npm:5.0.0" + dependencies: + unique-slug: "npm:^6.0.0" + checksum: 10c0/afb897e9cf4c2fb622ea716f7c2bb462001928fc5f437972213afdf1cc32101a230c0f1e9d96fc91ee5185eca0f2feb34127145874975f347be52eb91d6ccc2c + languageName: node + linkType: hard + +"unique-slug@npm:^6.0.0": + version: 6.0.0 + resolution: "unique-slug@npm:6.0.0" + dependencies: + imurmurhash: "npm:^0.1.4" + checksum: 10c0/da7ade4cb04eb33ad0499861f82fe95ce9c7c878b7139dc54d140ecfb6a6541c18a5c8dac16188b8b379fe62c0c1f1b710814baac910cde5f4fec06212126c6a + languageName: node + linkType: hard + "universal-user-agent@npm:^7.0.0, universal-user-agent@npm:^7.0.2": version: 7.0.3 resolution: "universal-user-agent@npm:7.0.3" @@ -3142,6 +4401,120 @@ __metadata: languageName: node linkType: hard +"vite@npm:^6.0.0 || ^7.0.0": + version: 7.3.1 + resolution: "vite@npm:7.3.1" + dependencies: + esbuild: "npm:^0.27.0" + fdir: "npm:^6.5.0" + fsevents: "npm:~2.3.3" + picomatch: "npm:^4.0.3" + postcss: "npm:^8.5.6" + rollup: "npm:^4.43.0" + tinyglobby: "npm:^0.2.15" + peerDependencies: + "@types/node": ^20.19.0 || >=22.12.0 + jiti: ">=1.21.0" + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: ">=0.54.8" + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + "@types/node": + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + bin: + vite: bin/vite.js + checksum: 10c0/5c7548f5f43a23533e53324304db4ad85f1896b1bfd3ee32ae9b866bac2933782c77b350eb2b52a02c625c8ad1ddd4c000df077419410650c982cd97fde8d014 + languageName: node + linkType: hard + +"vitest@npm:^4.0.18": + version: 4.0.18 + resolution: "vitest@npm:4.0.18" + dependencies: + "@vitest/expect": "npm:4.0.18" + "@vitest/mocker": "npm:4.0.18" + "@vitest/pretty-format": "npm:4.0.18" + "@vitest/runner": "npm:4.0.18" + "@vitest/snapshot": "npm:4.0.18" + "@vitest/spy": "npm:4.0.18" + "@vitest/utils": "npm:4.0.18" + es-module-lexer: "npm:^1.7.0" + expect-type: "npm:^1.2.2" + magic-string: "npm:^0.30.21" + obug: "npm:^2.1.1" + pathe: "npm:^2.0.3" + picomatch: "npm:^4.0.3" + std-env: "npm:^3.10.0" + tinybench: "npm:^2.9.0" + tinyexec: "npm:^1.0.2" + tinyglobby: "npm:^0.2.15" + tinyrainbow: "npm:^3.0.3" + vite: "npm:^6.0.0 || ^7.0.0" + why-is-node-running: "npm:^2.3.0" + peerDependencies: + "@edge-runtime/vm": "*" + "@opentelemetry/api": ^1.9.0 + "@types/node": ^20.0.0 || ^22.0.0 || >=24.0.0 + "@vitest/browser-playwright": 4.0.18 + "@vitest/browser-preview": 4.0.18 + "@vitest/browser-webdriverio": 4.0.18 + "@vitest/ui": 4.0.18 + happy-dom: "*" + jsdom: "*" + peerDependenciesMeta: + "@edge-runtime/vm": + optional: true + "@opentelemetry/api": + optional: true + "@types/node": + optional: true + "@vitest/browser-playwright": + optional: true + "@vitest/browser-preview": + optional: true + "@vitest/browser-webdriverio": + optional: true + "@vitest/ui": + optional: true + happy-dom: + optional: true + jsdom: + optional: true + bin: + vitest: vitest.mjs + checksum: 10c0/b913cd32032c95f29ff08c931f4b4c6fd6d2da498908d6770952c561a1b8d75c62499a1f04cadf82fb89cc0f9a33f29fb5dfdb899f6dbb27686a9d91571be5fa + languageName: node + linkType: hard + "webidl-conversions@npm:^3.0.0": version: 3.0.1 resolution: "webidl-conversions@npm:3.0.1" @@ -3188,25 +4561,37 @@ __metadata: languageName: node linkType: hard -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" +"which@npm:^6.0.0": + version: 6.0.1 + resolution: "which@npm:6.0.1" dependencies: - ansi-styles: "npm:^4.0.0" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da + isexe: "npm:^4.0.0" + bin: + node-which: bin/which.js + checksum: 10c0/7e710e54ea36d2d6183bee2f9caa27a3b47b9baf8dee55a199b736fcf85eab3b9df7556fca3d02b50af7f3dfba5ea3a45644189836df06267df457e354da66d5 languageName: node linkType: hard -"wrap-ansi@npm:^6.2.0": - version: 6.2.0 - resolution: "wrap-ansi@npm:6.2.0" +"why-is-node-running@npm:^2.3.0": + version: 2.3.0 + resolution: "why-is-node-running@npm:2.3.0" + dependencies: + siginfo: "npm:^2.0.0" + stackback: "npm:0.0.2" + bin: + why-is-node-running: cli.js + checksum: 10c0/1cde0b01b827d2cf4cb11db962f3958b9175d5d9e7ac7361d1a7b0e2dc6069a263e69118bd974c4f6d0a890ef4eedfe34cf3d5167ec14203dbc9a18620537054 + languageName: node + linkType: hard + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": + version: 7.0.0 + resolution: "wrap-ansi@npm:7.0.0" dependencies: ansi-styles: "npm:^4.0.0" string-width: "npm:^4.1.0" strip-ansi: "npm:^6.0.0" - checksum: 10c0/baad244e6e33335ea24e86e51868fe6823626e3a3c88d9a6674642afff1d34d9a154c917e74af8d845fd25d170c4ea9cf69a47133c3f3656e1252b3d462d9f6c + checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da languageName: node linkType: hard @@ -3249,6 +4634,13 @@ __metadata: languageName: node linkType: hard +"yallist@npm:^4.0.0": + version: 4.0.0 + resolution: "yallist@npm:4.0.0" + checksum: 10c0/2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a + languageName: node + linkType: hard + "yallist@npm:^5.0.0": version: 5.0.0 resolution: "yallist@npm:5.0.0" @@ -3286,17 +4678,3 @@ __metadata: checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 languageName: node linkType: hard - -"yocto-queue@npm:^1.0.0": - version: 1.2.1 - resolution: "yocto-queue@npm:1.2.1" - checksum: 10c0/5762caa3d0b421f4bdb7a1926b2ae2189fc6e4a14469258f183600028eb16db3e9e0306f46e8ebf5a52ff4b81a881f22637afefbef5399d6ad440824e9b27f9f - languageName: node - linkType: hard - -"yoctocolors-cjs@npm:^2.1.2": - version: 2.1.3 - resolution: "yoctocolors-cjs@npm:2.1.3" - checksum: 10c0/584168ef98eb5d913473a4858dce128803c4a6cd87c0f09e954fa01126a59a33ab9e513b633ad9ab953786ed16efdd8c8700097a51635aafaeed3fef7712fa79 - languageName: node - linkType: hard From 2e4b249a2f78357458cc4df00c72f786138a0a09 Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:51:21 +0100 Subject: [PATCH 09/34] clean up --- napi-rs/package.json | 39 +- napi-rs/yarn.lock | 1631 +----------------------------------------- 2 files changed, 10 insertions(+), 1660 deletions(-) diff --git a/napi-rs/package.json b/napi-rs/package.json index 6bf3540..d016151 100644 --- a/napi-rs/package.json +++ b/napi-rs/package.json @@ -68,47 +68,10 @@ "@swc/types": "^0.1.25", "@taplo/cli": "^0.7.0", "@tybys/wasm-util": "^0.10.0", - "ava": "^6.4.1", - "husky": "^9.1.7", - "lint-staged": "^16.1.6", - "npm-run-all2": "^8.0.4", "oxlint": "^1.14.0", "prettier": "^3.6.2", "tinybench": "^6.0.0", "typescript": "^5.9.2", "vitest": "^4.0.18" - }, - "lint-staged": { - "*.@(js|ts|tsx)": [ - "oxlint --fix" - ], - "*.@(js|ts|tsx|yml|yaml|md|json)": [ - "prettier --write" - ], - "*.toml": [ - "taplo format" - ] - }, - "ava": { - "extensions": { - "ts": "module" - }, - "timeout": "2m", - "workerThreads": false, - "environmentVariables": { - "OXC_TSCONFIG_PATH": "./__test__/tsconfig.json" - }, - "nodeArguments": [ - "--import", - "@oxc-node/core/register" - ] - }, - "prettier": { - "printWidth": 120, - "semi": false, - "trailingComma": "all", - "singleQuote": true, - "arrowParens": "always" - }, - "packageManager": "yarn@4.12.0" + } } diff --git a/napi-rs/yarn.lock b/napi-rs/yarn.lock index 960ab45..3159498 100644 --- a/napi-rs/yarn.lock +++ b/napi-rs/yarn.lock @@ -475,20 +475,6 @@ __metadata: languageName: node linkType: hard -"@isaacs/cliui@npm:^8.0.2": - version: 8.0.2 - resolution: "@isaacs/cliui@npm:8.0.2" - dependencies: - string-width: "npm:^5.1.2" - string-width-cjs: "npm:string-width@^4.2.0" - strip-ansi: "npm:^7.0.1" - strip-ansi-cjs: "npm:strip-ansi@^6.0.1" - wrap-ansi: "npm:^8.1.0" - wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" - checksum: 10c0/b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e - languageName: node - linkType: hard - "@isaacs/cliui@npm:^9.0.0": version: 9.0.0 resolution: "@isaacs/cliui@npm:9.0.0" @@ -512,23 +498,6 @@ __metadata: languageName: node linkType: hard -"@mapbox/node-pre-gyp@npm:^2.0.0": - version: 2.0.0 - resolution: "@mapbox/node-pre-gyp@npm:2.0.0" - dependencies: - consola: "npm:^3.2.3" - detect-libc: "npm:^2.0.0" - https-proxy-agent: "npm:^7.0.5" - node-fetch: "npm:^2.6.7" - nopt: "npm:^8.0.0" - semver: "npm:^7.5.3" - tar: "npm:^7.4.0" - bin: - node-pre-gyp: bin/node-pre-gyp - checksum: 10c0/7d874c7f6f5560a87be7207f28d9a4e53b750085a82167608fd573aab8073645e95b3608f69e244df0e1d24e90a66525aeae708aba82ca73ff668ed0ab6abda6 - languageName: node - linkType: hard - "@napi-rs/cli@npm:^3.5.1": version: 3.5.1 resolution: "@napi-rs/cli@npm:3.5.1" @@ -1115,33 +1084,6 @@ __metadata: languageName: node linkType: hard -"@nodelib/fs.scandir@npm:2.1.5": - version: 2.1.5 - resolution: "@nodelib/fs.scandir@npm:2.1.5" - dependencies: - "@nodelib/fs.stat": "npm:2.0.5" - run-parallel: "npm:^1.1.9" - checksum: 10c0/732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb - languageName: node - linkType: hard - -"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": - version: 2.0.5 - resolution: "@nodelib/fs.stat@npm:2.0.5" - checksum: 10c0/88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d - languageName: node - linkType: hard - -"@nodelib/fs.walk@npm:^1.2.3": - version: 1.2.8 - resolution: "@nodelib/fs.walk@npm:1.2.8" - dependencies: - "@nodelib/fs.scandir": "npm:2.1.5" - fastq: "npm:^1.6.0" - checksum: 10c0/db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1 - languageName: node - linkType: hard - "@npmcli/agent@npm:^4.0.0": version: 4.0.0 resolution: "@npmcli/agent@npm:4.0.0" @@ -1526,29 +1468,6 @@ __metadata: languageName: node linkType: hard -"@pkgjs/parseargs@npm:^0.11.0": - version: 0.11.0 - resolution: "@pkgjs/parseargs@npm:0.11.0" - checksum: 10c0/5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd - languageName: node - linkType: hard - -"@rollup/pluginutils@npm:^5.1.3": - version: 5.3.0 - resolution: "@rollup/pluginutils@npm:5.3.0" - dependencies: - "@types/estree": "npm:^1.0.0" - estree-walker: "npm:^2.0.2" - picomatch: "npm:^4.0.2" - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - checksum: 10c0/001834bf62d7cf5bac424d2617c113f7f7d3b2bf3c1778cbcccb72cdc957b68989f8e7747c782c2b911f1dde8257f56f8ac1e779e29e74e638e3f1e2cac2bcd0 - languageName: node - linkType: hard - "@rollup/rollup-android-arm-eabi@npm:4.57.1": version: 4.57.1 resolution: "@rollup/rollup-android-arm-eabi@npm:4.57.1" @@ -1724,13 +1643,6 @@ __metadata: languageName: node linkType: hard -"@sindresorhus/merge-streams@npm:^2.1.0": - version: 2.3.0 - resolution: "@sindresorhus/merge-streams@npm:2.3.0" - checksum: 10c0/69ee906f3125fb2c6bb6ec5cdd84e8827d93b49b3892bce8b62267116cc7e197b5cccf20c160a1d32c26014ecd14470a72a5e3ee37a58f1d6dadc0db1ccf3894 - languageName: node - linkType: hard - "@standard-schema/spec@npm:^1.0.0": version: 1.1.0 resolution: "@standard-schema/spec@npm:1.1.0" @@ -1805,28 +1717,6 @@ __metadata: languageName: node linkType: hard -"@vercel/nft@npm:^0.29.4": - version: 0.29.4 - resolution: "@vercel/nft@npm:0.29.4" - dependencies: - "@mapbox/node-pre-gyp": "npm:^2.0.0" - "@rollup/pluginutils": "npm:^5.1.3" - acorn: "npm:^8.6.0" - acorn-import-attributes: "npm:^1.9.5" - async-sema: "npm:^3.1.1" - bindings: "npm:^1.4.0" - estree-walker: "npm:2.0.2" - glob: "npm:^10.4.5" - graceful-fs: "npm:^4.2.9" - node-gyp-build: "npm:^4.2.2" - picomatch: "npm:^4.0.2" - resolve-from: "npm:^5.0.0" - bin: - nft: out/cli.js - checksum: 10c0/84ba32c685f9d7c2c849b1e8c963d3b7eb09d122e666143ed97c3776f5b04a4745605e1d29fd81383f72b1d1c0d7d58e39f06dc92f021b5de079dfa4e8523574 - languageName: node - linkType: hard - "@vitest/expect@npm:4.0.18": version: 4.0.18 resolution: "@vitest/expect@npm:4.0.18" @@ -1907,13 +1797,6 @@ __metadata: languageName: node linkType: hard -"abbrev@npm:^3.0.0": - version: 3.0.1 - resolution: "abbrev@npm:3.0.1" - checksum: 10c0/21ba8f574ea57a3106d6d35623f2c4a9111d9ee3e9a5be47baed46ec2457d2eac46e07a5c4a60186f88cb98abbe3e24f2d4cca70bc2b12f1692523e2209a9ccf - languageName: node - linkType: hard - "abbrev@npm:^4.0.0": version: 4.0.0 resolution: "abbrev@npm:4.0.0" @@ -1921,33 +1804,6 @@ __metadata: languageName: node linkType: hard -"acorn-import-attributes@npm:^1.9.5": - version: 1.9.5 - resolution: "acorn-import-attributes@npm:1.9.5" - peerDependencies: - acorn: ^8 - checksum: 10c0/5926eaaead2326d5a86f322ff1b617b0f698aa61dc719a5baa0e9d955c9885cc71febac3fb5bacff71bbf2c4f9c12db2056883c68c53eb962c048b952e1e013d - languageName: node - linkType: hard - -"acorn-walk@npm:^8.3.4": - version: 8.3.4 - resolution: "acorn-walk@npm:8.3.4" - dependencies: - acorn: "npm:^8.11.0" - checksum: 10c0/76537ac5fb2c37a64560feaf3342023dadc086c46da57da363e64c6148dc21b57d49ace26f949e225063acb6fb441eabffd89f7a3066de5ad37ab3e328927c62 - languageName: node - linkType: hard - -"acorn@npm:^8.11.0, acorn@npm:^8.15.0, acorn@npm:^8.6.0": - version: 8.15.0 - resolution: "acorn@npm:8.15.0" - bin: - acorn: bin/acorn - checksum: 10c0/dec73ff59b7d6628a01eebaece7f2bdb8bb62b9b5926dcad0f8931f2b8b79c2be21f6c68ac095592adb5adb15831a3635d9343e6a91d028bbe85d564875ec3ec - languageName: node - linkType: hard - "agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": version: 7.1.4 resolution: "agent-base@npm:7.1.4" @@ -1955,54 +1811,6 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^7.0.0": - version: 7.1.0 - resolution: "ansi-escapes@npm:7.1.0" - dependencies: - environment: "npm:^1.0.0" - checksum: 10c0/c3aeb677bb272213936e8b96250d742f4d3a17b8135189cc22295713392de84c40765599d16ad2d4e30db38283355e77c8be2aa0441b733c48d7fb960782fbe3 - languageName: node - linkType: hard - -"ansi-regex@npm:^5.0.1": - version: 5.0.1 - resolution: "ansi-regex@npm:5.0.1" - checksum: 10c0/9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 - languageName: node - linkType: hard - -"ansi-regex@npm:^6.0.1": - version: 6.2.2 - resolution: "ansi-regex@npm:6.2.2" - checksum: 10c0/05d4acb1d2f59ab2cf4b794339c7b168890d44dda4bf0ce01152a8da0213aca207802f930442ce8cd22d7a92f44907664aac6508904e75e038fa944d2601b30f - languageName: node - linkType: hard - -"ansi-styles@npm:^4.0.0": - version: 4.3.0 - resolution: "ansi-styles@npm:4.3.0" - dependencies: - color-convert: "npm:^2.0.1" - checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 - languageName: node - linkType: hard - -"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": - version: 6.2.3 - resolution: "ansi-styles@npm:6.2.3" - checksum: 10c0/23b8a4ce14e18fb854693b95351e286b771d23d8844057ed2e7d083cd3e708376c3323707ec6a24365f7d7eda3ca00327fe04092e29e551499ec4c8b7bfac868 - languageName: node - linkType: hard - -"argparse@npm:^1.0.7": - version: 1.0.10 - resolution: "argparse@npm:1.0.10" - dependencies: - sprintf-js: "npm:~1.0.2" - checksum: 10c0/b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de - languageName: node - linkType: hard - "argparse@npm:^2.0.1": version: 2.0.1 resolution: "argparse@npm:2.0.1" @@ -2010,27 +1818,6 @@ __metadata: languageName: node linkType: hard -"array-find-index@npm:^1.0.1": - version: 1.0.2 - resolution: "array-find-index@npm:1.0.2" - checksum: 10c0/86b9485c74ddd324feab807e10a6de3f9c1683856267236fac4bb4d4667ada6463e106db3f6c540ae6b720e0442b590ec701d13676df4c6af30ebf4da09b4f57 - languageName: node - linkType: hard - -"arrgv@npm:^1.0.2": - version: 1.0.2 - resolution: "arrgv@npm:1.0.2" - checksum: 10c0/7e6e782e6b749923ac7cbc4048ef6fe0844c4a59bfc8932fcd4c44566ba25eed46501f94dd7cf3c7297da88f3f599ca056bfb77d0c2484aebc92f04239f69124 - languageName: node - linkType: hard - -"arrify@npm:^3.0.0": - version: 3.0.0 - resolution: "arrify@npm:3.0.0" - checksum: 10c0/2e26601b8486f29780f1f70f7ac05a226755814c2a3ab42e196748f650af1dc310cd575a11dd4b9841c70fd7460b2dd2b8fe6fb7a3375878e2660706efafa58e - languageName: node - linkType: hard - "assertion-error@npm:^2.0.1": version: 2.0.1 resolution: "assertion-error@npm:2.0.1" @@ -2038,75 +1825,6 @@ __metadata: languageName: node linkType: hard -"async-sema@npm:^3.1.1": - version: 3.1.1 - resolution: "async-sema@npm:3.1.1" - checksum: 10c0/a16da9f7f2dbdd00a969bf264b7ad331b59df3eac2b38f529b881c5cc8662594e68ed096d927ec2aabdc13454379cdc6d677bcdb0a3d2db338fb4be17957832b - languageName: node - linkType: hard - -"ava@npm:^6.4.1": - version: 6.4.1 - resolution: "ava@npm:6.4.1" - dependencies: - "@vercel/nft": "npm:^0.29.4" - acorn: "npm:^8.15.0" - acorn-walk: "npm:^8.3.4" - ansi-styles: "npm:^6.2.1" - arrgv: "npm:^1.0.2" - arrify: "npm:^3.0.0" - callsites: "npm:^4.2.0" - cbor: "npm:^10.0.9" - chalk: "npm:^5.4.1" - chunkd: "npm:^2.0.1" - ci-info: "npm:^4.3.0" - ci-parallel-vars: "npm:^1.0.1" - cli-truncate: "npm:^4.0.0" - code-excerpt: "npm:^4.0.0" - common-path-prefix: "npm:^3.0.0" - concordance: "npm:^5.0.4" - currently-unhandled: "npm:^0.4.1" - debug: "npm:^4.4.1" - emittery: "npm:^1.2.0" - figures: "npm:^6.1.0" - globby: "npm:^14.1.0" - ignore-by-default: "npm:^2.1.0" - indent-string: "npm:^5.0.0" - is-plain-object: "npm:^5.0.0" - is-promise: "npm:^4.0.0" - matcher: "npm:^5.0.0" - memoize: "npm:^10.1.0" - ms: "npm:^2.1.3" - p-map: "npm:^7.0.3" - package-config: "npm:^5.0.0" - picomatch: "npm:^4.0.2" - plur: "npm:^5.1.0" - pretty-ms: "npm:^9.2.0" - resolve-cwd: "npm:^3.0.0" - stack-utils: "npm:^2.0.6" - strip-ansi: "npm:^7.1.0" - supertap: "npm:^3.0.1" - temp-dir: "npm:^3.0.0" - write-file-atomic: "npm:^6.0.0" - yargs: "npm:^17.7.2" - peerDependencies: - "@ava/typescript": "*" - peerDependenciesMeta: - "@ava/typescript": - optional: true - bin: - ava: entrypoints/cli.mjs - checksum: 10c0/21972df1031ef46533ea1b7daa132a5fc66841c8a221b6901163d12d2a1cac39bfd8a6d3459da7eb9344fa90fc02f237f2fe2aac8785d04bf5894fa43625be28 - languageName: node - linkType: hard - -"balanced-match@npm:^1.0.0": - version: 1.0.2 - resolution: "balanced-match@npm:1.0.2" - checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee - languageName: node - linkType: hard - "balanced-match@npm:^4.0.2": version: 4.0.2 resolution: "balanced-match@npm:4.0.2" @@ -2123,31 +1841,6 @@ __metadata: languageName: node linkType: hard -"bindings@npm:^1.4.0": - version: 1.5.0 - resolution: "bindings@npm:1.5.0" - dependencies: - file-uri-to-path: "npm:1.0.0" - checksum: 10c0/3dab2491b4bb24124252a91e656803eac24292473e56554e35bbfe3cc1875332cfa77600c3bac7564049dc95075bf6fcc63a4609920ff2d64d0fe405fcf0d4ba - languageName: node - linkType: hard - -"blueimp-md5@npm:^2.10.0": - version: 2.19.0 - resolution: "blueimp-md5@npm:2.19.0" - checksum: 10c0/85d04343537dd99a288c62450341dcce7380d3454c81f8e5a971ddd80307d6f9ef51b5b92ad7d48aaaa92fd6d3a1f6b2f4fada068faae646887f7bfabc17a346 - languageName: node - linkType: hard - -"brace-expansion@npm:^2.0.1": - version: 2.0.2 - resolution: "brace-expansion@npm:2.0.2" - dependencies: - balanced-match: "npm:^1.0.0" - checksum: 10c0/6d117a4c793488af86b83172deb6af143e94c17bc53b0b3cec259733923b4ca84679d506ac261f4ba3c7ed37c46018e2ff442f9ce453af8643ecd64f4a54e6cf - languageName: node - linkType: hard - "brace-expansion@npm:^5.0.2": version: 5.0.2 resolution: "brace-expansion@npm:5.0.2" @@ -2157,15 +1850,6 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.3": - version: 3.0.3 - resolution: "braces@npm:3.0.3" - dependencies: - fill-range: "npm:^7.1.1" - checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 - languageName: node - linkType: hard - "cacache@npm:^20.0.1": version: 20.0.3 resolution: "cacache@npm:20.0.3" @@ -2185,22 +1869,6 @@ __metadata: languageName: node linkType: hard -"callsites@npm:^4.2.0": - version: 4.2.0 - resolution: "callsites@npm:4.2.0" - checksum: 10c0/8f7e269ec09fc0946bb22d838a8bc7932e1909ab4a833b964749f4d0e8bdeaa1f253287c4f911f61781f09620b6925ccd19a5ea4897489c4e59442c660c312a3 - languageName: node - linkType: hard - -"cbor@npm:^10.0.9": - version: 10.0.11 - resolution: "cbor@npm:10.0.11" - dependencies: - nofilter: "npm:^3.0.2" - checksum: 10c0/0cb6fb3d5e98c7af4443200ff107049f6132b5649b8a0e586940ca811e5ab5622bf3d0a36f154f43107acfd9685cc462e6eac77876ef4c060bcec96c71b90d8a - languageName: node - linkType: hard - "chai@npm:^6.2.1": version: 6.2.2 resolution: "chai@npm:6.2.2" @@ -2208,13 +1876,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^5.4.1, chalk@npm:^5.6.0": - version: 5.6.2 - resolution: "chalk@npm:5.6.2" - checksum: 10c0/99a4b0f0e7991796b1e7e3f52dceb9137cae2a9dfc8fc0784a550dc4c558e15ab32ed70b14b21b52beb2679b4892b41a0aa44249bcb996f01e125d58477c6976 - languageName: node - linkType: hard - "chardet@npm:^2.1.1": version: 2.1.1 resolution: "chardet@npm:2.1.1" @@ -2229,46 +1890,6 @@ __metadata: languageName: node linkType: hard -"chunkd@npm:^2.0.1": - version: 2.0.1 - resolution: "chunkd@npm:2.0.1" - checksum: 10c0/4e0c5aac6048ecedfa4cd0a5f6c4f010c70a7b7645aeca7bfeb47cb0733c3463054f0ced3f2667b2e0e67edd75d68a8e05481b01115ba3f8a952a93026254504 - languageName: node - linkType: hard - -"ci-info@npm:^4.3.0": - version: 4.3.0 - resolution: "ci-info@npm:4.3.0" - checksum: 10c0/60d3dfe95d75c01454ec1cfd5108617dd598a28a2a3e148bd7e1523c1c208b5f5a3007cafcbe293e6fd0a5a310cc32217c5dc54743eeabc0a2bec80072fc055c - languageName: node - linkType: hard - -"ci-parallel-vars@npm:^1.0.1": - version: 1.0.1 - resolution: "ci-parallel-vars@npm:1.0.1" - checksum: 10c0/80952f699cbbc146092b077b4f3e28d085620eb4e6be37f069b4dbb3db0ee70e8eec3beef4ebe70ff60631e9fc743b9d0869678489f167442cac08b260e5ac08 - languageName: node - linkType: hard - -"cli-cursor@npm:^5.0.0": - version: 5.0.0 - resolution: "cli-cursor@npm:5.0.0" - dependencies: - restore-cursor: "npm:^5.0.0" - checksum: 10c0/7ec62f69b79f6734ab209a3e4dbdc8af7422d44d360a7cb1efa8a0887bbe466a6e625650c466fe4359aee44dbe2dc0b6994b583d40a05d0808a5cb193641d220 - languageName: node - linkType: hard - -"cli-truncate@npm:^4.0.0": - version: 4.0.0 - resolution: "cli-truncate@npm:4.0.0" - dependencies: - slice-ansi: "npm:^5.0.0" - string-width: "npm:^7.0.0" - checksum: 10c0/d7f0b73e3d9b88cb496e6c086df7410b541b56a43d18ade6a573c9c18bd001b1c3fba1ad578f741a4218fdc794d042385f8ac02c25e1c295a2d8b9f3cb86eb4c - languageName: node - linkType: hard - "cli-width@npm:^4.1.0": version: 4.1.0 resolution: "cli-width@npm:4.1.0" @@ -2287,42 +1908,6 @@ __metadata: languageName: node linkType: hard -"cliui@npm:^8.0.1": - version: 8.0.1 - resolution: "cliui@npm:8.0.1" - dependencies: - string-width: "npm:^4.2.0" - strip-ansi: "npm:^6.0.1" - wrap-ansi: "npm:^7.0.0" - checksum: 10c0/4bda0f09c340cbb6dfdc1ed508b3ca080f12992c18d68c6be4d9cf51756033d5266e61ec57529e610dacbf4da1c634423b0c1b11037709cc6b09045cbd815df5 - languageName: node - linkType: hard - -"code-excerpt@npm:^4.0.0": - version: 4.0.0 - resolution: "code-excerpt@npm:4.0.0" - dependencies: - convert-to-spaces: "npm:^2.0.1" - checksum: 10c0/b6c5a06e039cecd2ab6a0e10ee0831de8362107d1f298ca3558b5f9004cb8e0260b02dd6c07f57b9a0e346c76864d2873311ee1989809fdeb05bd5fbbadde773 - languageName: node - linkType: hard - -"color-convert@npm:^2.0.1": - version: 2.0.1 - resolution: "color-convert@npm:2.0.1" - dependencies: - color-name: "npm:~1.1.4" - checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 - languageName: node - linkType: hard - -"color-name@npm:~1.1.4": - version: 1.1.4 - resolution: "color-name@npm:1.1.4" - checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 - languageName: node - linkType: hard - "colorette@npm:^2.0.20": version: 2.0.20 resolution: "colorette@npm:2.0.20" @@ -2330,79 +1915,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:^14.0.0": - version: 14.0.0 - resolution: "commander@npm:14.0.0" - checksum: 10c0/73c4babfa558077868d84522b11ef56834165d472b9e86a634cd4c3ae7fc72d59af6377d8878e06bd570fe8f3161eced3cbe383c38f7093272bb65bd242b595b - languageName: node - linkType: hard - -"common-path-prefix@npm:^3.0.0": - version: 3.0.0 - resolution: "common-path-prefix@npm:3.0.0" - checksum: 10c0/c4a74294e1b1570f4a8ab435285d185a03976c323caa16359053e749db4fde44e3e6586c29cd051100335e11895767cbbd27ea389108e327d62f38daf4548fdb - languageName: node - linkType: hard - -"concordance@npm:^5.0.4": - version: 5.0.4 - resolution: "concordance@npm:5.0.4" - dependencies: - date-time: "npm:^3.1.0" - esutils: "npm:^2.0.3" - fast-diff: "npm:^1.2.0" - js-string-escape: "npm:^1.0.1" - lodash: "npm:^4.17.15" - md5-hex: "npm:^3.0.1" - semver: "npm:^7.3.2" - well-known-symbols: "npm:^2.0.0" - checksum: 10c0/59b440f330df3a7c9aa148ba588b3e99aed86acab225b4f01ffcea34ace4cf11f817e31153254e8f38ed48508998dad40b9106951a743c334d751f7ab21afb8a - languageName: node - linkType: hard - -"consola@npm:^3.2.3": - version: 3.4.2 - resolution: "consola@npm:3.4.2" - checksum: 10c0/7cebe57ecf646ba74b300bcce23bff43034ed6fbec9f7e39c27cee1dc00df8a21cd336b466ad32e304ea70fba04ec9e890c200270de9a526ce021ba8a7e4c11a - languageName: node - linkType: hard - -"convert-to-spaces@npm:^2.0.1": - version: 2.0.1 - resolution: "convert-to-spaces@npm:2.0.1" - checksum: 10c0/d90aa0e3b6a27f9d5265a8d32def3c5c855b3e823a9db1f26d772f8146d6b91020a2fdfd905ce8048a73fad3aaf836fef8188c67602c374405e2ae8396c4ac46 - languageName: node - linkType: hard - -"cross-spawn@npm:^7.0.6": - version: 7.0.6 - resolution: "cross-spawn@npm:7.0.6" - dependencies: - path-key: "npm:^3.1.0" - shebang-command: "npm:^2.0.0" - which: "npm:^2.0.1" - checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 - languageName: node - linkType: hard - -"currently-unhandled@npm:^0.4.1": - version: 0.4.1 - resolution: "currently-unhandled@npm:0.4.1" - dependencies: - array-find-index: "npm:^1.0.1" - checksum: 10c0/32d197689ec32f035910202c1abb0dc6424dce01d7b51779c685119b380d98535c110ffff67a262fc7e367612a7dfd30d3d3055f9a6634b5a9dd1302de7ef11c - languageName: node - linkType: hard - -"date-time@npm:^3.1.0": - version: 3.1.0 - resolution: "date-time@npm:3.1.0" - dependencies: - time-zone: "npm:^1.0.0" - checksum: 10c0/aa3e2e930d74b0b9e90f69de7a16d3376e30f21f1f4ce9a2311d8fec32d760e776efea752dafad0ce188187265235229013036202be053fc2d7979813bfb6ded - languageName: node - linkType: hard - "debug@npm:4, debug@npm:^4.4.1": version: 4.4.1 resolution: "debug@npm:4.4.1" @@ -2427,27 +1939,6 @@ __metadata: languageName: node linkType: hard -"detect-libc@npm:^2.0.0": - version: 2.0.4 - resolution: "detect-libc@npm:2.0.4" - checksum: 10c0/c15541f836eba4b1f521e4eecc28eefefdbc10a94d3b8cb4c507689f332cc111babb95deda66f2de050b22122113189986d5190be97d51b5a2b23b938415e67c - languageName: node - linkType: hard - -"eastasianwidth@npm:^0.2.0": - version: 0.2.0 - resolution: "eastasianwidth@npm:0.2.0" - checksum: 10c0/26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 - languageName: node - linkType: hard - -"emittery@npm:^1.2.0": - version: 1.2.0 - resolution: "emittery@npm:1.2.0" - checksum: 10c0/3b16d67b2cbbc19d44fa124684039956dc94c376cefa8c7b29f4c934d9d370e6819f642cddaa343b83b1fc03fda554a1498e12f5861caf9d6f6394ff4b6e808a - languageName: node - linkType: hard - "emnapi@npm:^1.7.1": version: 1.8.1 resolution: "emnapi@npm:1.8.1" @@ -2460,27 +1951,6 @@ __metadata: languageName: node linkType: hard -"emoji-regex@npm:^10.3.0": - version: 10.5.0 - resolution: "emoji-regex@npm:10.5.0" - checksum: 10c0/17cf84335a461fc23bf90575122ace2902630dc760e53299474cd3b0b5e4cfbc6c0223a389a766817538e5d20bf0f36c67b753f27c9e705056af510b8777e312 - languageName: node - linkType: hard - -"emoji-regex@npm:^8.0.0": - version: 8.0.0 - resolution: "emoji-regex@npm:8.0.0" - checksum: 10c0/b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 - languageName: node - linkType: hard - -"emoji-regex@npm:^9.2.2": - version: 9.2.2 - resolution: "emoji-regex@npm:9.2.2" - checksum: 10c0/af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 - languageName: node - linkType: hard - "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -2497,13 +1967,6 @@ __metadata: languageName: node linkType: hard -"environment@npm:^1.0.0": - version: 1.1.0 - resolution: "environment@npm:1.1.0" - checksum: 10c0/fb26434b0b581ab397039e51ff3c92b34924a98b2039dcb47e41b7bca577b9dbf134a8eadb364415c74464b682e2d3afe1a4c0eb9873dc44ea814c5d3103331d - languageName: node - linkType: hard - "err-code@npm:^2.0.2": version: 2.0.3 resolution: "err-code@npm:2.0.3" @@ -2619,44 +2082,6 @@ __metadata: languageName: node linkType: hard -"escalade@npm:^3.1.1": - version: 3.2.0 - resolution: "escalade@npm:3.2.0" - checksum: 10c0/ced4dd3a78e15897ed3be74e635110bbf3b08877b0a41be50dcb325ee0e0b5f65fc2d50e9845194d7c4633f327e2e1c6cce00a71b617c5673df0374201d67f65 - languageName: node - linkType: hard - -"escape-string-regexp@npm:^2.0.0": - version: 2.0.0 - resolution: "escape-string-regexp@npm:2.0.0" - checksum: 10c0/2530479fe8db57eace5e8646c9c2a9c80fa279614986d16dcc6bcaceb63ae77f05a851ba6c43756d816c61d7f4534baf56e3c705e3e0d884818a46808811c507 - languageName: node - linkType: hard - -"escape-string-regexp@npm:^5.0.0": - version: 5.0.0 - resolution: "escape-string-regexp@npm:5.0.0" - checksum: 10c0/6366f474c6f37a802800a435232395e04e9885919873e382b157ab7e8f0feb8fed71497f84a6f6a81a49aab41815522f5839112bd38026d203aea0c91622df95 - languageName: node - linkType: hard - -"esprima@npm:^4.0.0": - version: 4.0.1 - resolution: "esprima@npm:4.0.1" - bin: - esparse: ./bin/esparse.js - esvalidate: ./bin/esvalidate.js - checksum: 10c0/ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 - languageName: node - linkType: hard - -"estree-walker@npm:2.0.2, estree-walker@npm:^2.0.2": - version: 2.0.2 - resolution: "estree-walker@npm:2.0.2" - checksum: 10c0/53a6c54e2019b8c914dc395890153ffdc2322781acf4bd7d1a32d7aedc1710807bdcd866ac133903d5629ec601fbb50abe8c2e5553c7f5a0afdd9b6af6c945af - languageName: node - linkType: hard - "estree-walker@npm:^3.0.3": version: 3.0.3 resolution: "estree-walker@npm:3.0.3" @@ -2666,24 +2091,10 @@ __metadata: languageName: node linkType: hard -"esutils@npm:^2.0.3": - version: 2.0.3 - resolution: "esutils@npm:2.0.3" - checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 - languageName: node - linkType: hard - -"eventemitter3@npm:^5.0.1": - version: 5.0.1 - resolution: "eventemitter3@npm:5.0.1" - checksum: 10c0/4ba5c00c506e6c786b4d6262cfbce90ddc14c10d4667e5c83ae993c9de88aa856033994dd2b35b83e8dc1170e224e66a319fa80adc4c32adcd2379bbc75da814 - languageName: node - linkType: hard - -"expect-type@npm:^1.2.2": - version: 1.3.0 - resolution: "expect-type@npm:1.3.0" - checksum: 10c0/8412b3fe4f392c420ab41dae220b09700e4e47c639a29ba7ba2e83cc6cffd2b4926f7ac9e47d7e277e8f4f02acda76fd6931cb81fd2b382fa9477ef9ada953fd +"expect-type@npm:^1.2.2": + version: 1.3.0 + resolution: "expect-type@npm:1.3.0" + checksum: 10c0/8412b3fe4f392c420ab41dae220b09700e4e47c639a29ba7ba2e83cc6cffd2b4926f7ac9e47d7e277e8f4f02acda76fd6931cb81fd2b382fa9477ef9ada953fd languageName: node linkType: hard @@ -2701,26 +2112,6 @@ __metadata: languageName: node linkType: hard -"fast-diff@npm:^1.2.0": - version: 1.3.0 - resolution: "fast-diff@npm:1.3.0" - checksum: 10c0/5c19af237edb5d5effda008c891a18a585f74bf12953be57923f17a3a4d0979565fc64dbc73b9e20926b9d895f5b690c618cbb969af0cf022e3222471220ad29 - languageName: node - linkType: hard - -"fast-glob@npm:^3.3.3": - version: 3.3.3 - resolution: "fast-glob@npm:3.3.3" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.8" - checksum: 10c0/f6aaa141d0d3384cf73cbcdfc52f475ed293f6d5b65bfc5def368b09163a9f7e5ec2b3014d80f733c405f58e470ee0cc451c2937685045cddcdeaa24199c43fe - languageName: node - linkType: hard - "fast-string-truncated-width@npm:^3.0.2": version: 3.0.3 resolution: "fast-string-truncated-width@npm:3.0.3" @@ -2746,15 +2137,6 @@ __metadata: languageName: node linkType: hard -"fastq@npm:^1.6.0": - version: 1.19.1 - resolution: "fastq@npm:1.19.1" - dependencies: - reusify: "npm:^1.0.4" - checksum: 10c0/ebc6e50ac7048daaeb8e64522a1ea7a26e92b3cee5cd1c7f2316cdca81ba543aa40a136b53891446ea5c3a67ec215fbaca87ad405f102dd97012f62916905630 - languageName: node - linkType: hard - "fdir@npm:^6.5.0": version: 6.5.0 resolution: "fdir@npm:6.5.0" @@ -2767,48 +2149,6 @@ __metadata: languageName: node linkType: hard -"figures@npm:^6.1.0": - version: 6.1.0 - resolution: "figures@npm:6.1.0" - dependencies: - is-unicode-supported: "npm:^2.0.0" - checksum: 10c0/9159df4264d62ef447a3931537de92f5012210cf5135c35c010df50a2169377581378149abfe1eb238bd6acbba1c0d547b1f18e0af6eee49e30363cedaffcfe4 - languageName: node - linkType: hard - -"file-uri-to-path@npm:1.0.0": - version: 1.0.0 - resolution: "file-uri-to-path@npm:1.0.0" - checksum: 10c0/3b545e3a341d322d368e880e1c204ef55f1d45cdea65f7efc6c6ce9e0c4d22d802d5629320eb779d006fe59624ac17b0e848d83cc5af7cd101f206cb704f5519 - languageName: node - linkType: hard - -"fill-range@npm:^7.1.1": - version: 7.1.1 - resolution: "fill-range@npm:7.1.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 - languageName: node - linkType: hard - -"find-up-simple@npm:^1.0.0": - version: 1.0.1 - resolution: "find-up-simple@npm:1.0.1" - checksum: 10c0/ad34de157b7db925d50ff78302fefb28e309f3bc947c93ffca0f9b0bccf9cf1a2dc57d805d5c94ec9fc60f4838f5dbdfd2a48ecd77c23015fa44c6dd5f60bc40 - languageName: node - linkType: hard - -"foreground-child@npm:^3.1.0": - version: 3.3.1 - resolution: "foreground-child@npm:3.3.1" - dependencies: - cross-spawn: "npm:^7.0.6" - signal-exit: "npm:^4.0.1" - checksum: 10c0/8986e4af2430896e65bc2788d6679067294d6aee9545daefc84923a0a4b399ad9c7a3ea7bd8c0b2b80fdf4a92de4c69df3f628233ff3224260e9c1541a9e9ed3 - languageName: node - linkType: hard - "fs-minipass@npm:^3.0.0": version: 3.0.3 resolution: "fs-minipass@npm:3.0.3" @@ -2837,45 +2177,6 @@ __metadata: languageName: node linkType: hard -"get-caller-file@npm:^2.0.5": - version: 2.0.5 - resolution: "get-caller-file@npm:2.0.5" - checksum: 10c0/c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde - languageName: node - linkType: hard - -"get-east-asian-width@npm:^1.0.0, get-east-asian-width@npm:^1.3.1": - version: 1.4.0 - resolution: "get-east-asian-width@npm:1.4.0" - checksum: 10c0/4e481d418e5a32061c36fbb90d1b225a254cc5b2df5f0b25da215dcd335a3c111f0c2023ffda43140727a9cafb62dac41d022da82c08f31083ee89f714ee3b83 - languageName: node - linkType: hard - -"glob-parent@npm:^5.1.2": - version: 5.1.2 - resolution: "glob-parent@npm:5.1.2" - dependencies: - is-glob: "npm:^4.0.1" - checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee - languageName: node - linkType: hard - -"glob@npm:^10.4.5": - version: 10.4.5 - resolution: "glob@npm:10.4.5" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^3.1.2" - minimatch: "npm:^9.0.4" - minipass: "npm:^7.1.2" - package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^1.11.1" - bin: - glob: dist/esm/bin.mjs - checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e - languageName: node - linkType: hard - "glob@npm:^13.0.0": version: 13.0.3 resolution: "glob@npm:13.0.3" @@ -2887,21 +2188,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^14.1.0": - version: 14.1.0 - resolution: "globby@npm:14.1.0" - dependencies: - "@sindresorhus/merge-streams": "npm:^2.1.0" - fast-glob: "npm:^3.3.3" - ignore: "npm:^7.0.3" - path-type: "npm:^6.0.0" - slash: "npm:^5.1.0" - unicorn-magic: "npm:^0.3.0" - checksum: 10c0/527a1063c5958255969620c6fa4444a2b2e9278caddd571d46dfbfa307cb15977afb746e84d682ba5b6c94fc081e8997f80ff05dd235441ba1cb16f86153e58e - languageName: node - linkType: hard - -"graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 @@ -2925,7 +2212,7 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.5": +"https-proxy-agent@npm:^7.0.1": version: 7.0.6 resolution: "https-proxy-agent@npm:7.0.6" dependencies: @@ -2935,15 +2222,6 @@ __metadata: languageName: node linkType: hard -"husky@npm:^9.1.7": - version: 9.1.7 - resolution: "husky@npm:9.1.7" - bin: - husky: bin.js - checksum: 10c0/35bb110a71086c48906aa7cd3ed4913fb913823715359d65e32e0b964cb1e255593b0ae8014a5005c66a68e6fa66c38dcfa8056dbbdfb8b0187c0ffe7ee3a58f - languageName: node - linkType: hard - "iconv-lite@npm:^0.6.2": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" @@ -2962,20 +2240,6 @@ __metadata: languageName: node linkType: hard -"ignore-by-default@npm:^2.1.0": - version: 2.1.0 - resolution: "ignore-by-default@npm:2.1.0" - checksum: 10c0/3a6040dac25ed9da39dee73bf1634fdd1e15b0eb7cf52a6bdec81c310565782d8811c104ce40acb3d690d61c5fc38a91c78e6baee830a8a2232424dbc6b66981 - languageName: node - linkType: hard - -"ignore@npm:^7.0.3": - version: 7.0.5 - resolution: "ignore@npm:7.0.5" - checksum: 10c0/ae00db89fe873064a093b8999fe4cc284b13ef2a178636211842cceb650b9c3e390d3339191acb145d81ed5379d2074840cf0c33a20bdbd6f32821f79eb4ad5d - languageName: node - linkType: hard - "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -2983,13 +2247,6 @@ __metadata: languageName: node linkType: hard -"indent-string@npm:^5.0.0": - version: 5.0.0 - resolution: "indent-string@npm:5.0.0" - checksum: 10c0/8ee77b57d92e71745e133f6f444d6fa3ed503ad0e1bcd7e80c8da08b42375c07117128d670589725ed07b1978065803fa86318c309ba45415b7fe13e7f170220 - languageName: node - linkType: hard - "ip-address@npm:^10.0.1": version: 10.1.0 resolution: "ip-address@npm:10.1.0" @@ -2997,94 +2254,6 @@ __metadata: languageName: node linkType: hard -"irregular-plurals@npm:^3.3.0": - version: 3.5.0 - resolution: "irregular-plurals@npm:3.5.0" - checksum: 10c0/7c033bbe7325e5a6e0a26949cc6863b6ce273403d4cd5b93bd99b33fecb6605b0884097c4259c23ed0c52c2133bf7d1cdcdd7a0630e8c325161fe269b3447918 - languageName: node - linkType: hard - -"is-extglob@npm:^2.1.1": - version: 2.1.1 - resolution: "is-extglob@npm:2.1.1" - checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^3.0.0": - version: 3.0.0 - resolution: "is-fullwidth-code-point@npm:3.0.0" - checksum: 10c0/bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^4.0.0": - version: 4.0.0 - resolution: "is-fullwidth-code-point@npm:4.0.0" - checksum: 10c0/df2a717e813567db0f659c306d61f2f804d480752526886954a2a3e2246c7745fd07a52b5fecf2b68caf0a6c79dcdace6166fdf29cc76ed9975cc334f0a018b8 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^5.0.0": - version: 5.1.0 - resolution: "is-fullwidth-code-point@npm:5.1.0" - dependencies: - get-east-asian-width: "npm:^1.3.1" - checksum: 10c0/c1172c2e417fb73470c56c431851681591f6a17233603a9e6f94b7ba870b2e8a5266506490573b607fb1081318589372034aa436aec07b465c2029c0bc7f07a4 - languageName: node - linkType: hard - -"is-glob@npm:^4.0.1": - version: 4.0.3 - resolution: "is-glob@npm:4.0.3" - dependencies: - is-extglob: "npm:^2.1.1" - checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a - languageName: node - linkType: hard - -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 - languageName: node - linkType: hard - -"is-plain-object@npm:^5.0.0": - version: 5.0.0 - resolution: "is-plain-object@npm:5.0.0" - checksum: 10c0/893e42bad832aae3511c71fd61c0bf61aa3a6d853061c62a307261842727d0d25f761ce9379f7ba7226d6179db2a3157efa918e7fe26360f3bf0842d9f28942c - languageName: node - linkType: hard - -"is-promise@npm:^4.0.0": - version: 4.0.0 - resolution: "is-promise@npm:4.0.0" - checksum: 10c0/ebd5c672d73db781ab33ccb155fb9969d6028e37414d609b115cc534654c91ccd061821d5b987eefaa97cf4c62f0b909bb2f04db88306de26e91bfe8ddc01503 - languageName: node - linkType: hard - -"is-unicode-supported@npm:^2.0.0": - version: 2.1.0 - resolution: "is-unicode-supported@npm:2.1.0" - checksum: 10c0/a0f53e9a7c1fdbcf2d2ef6e40d4736fdffff1c9f8944c75e15425118ff3610172c87bf7bc6c34d3903b04be59790bb2212ddbe21ee65b5a97030fc50370545a5 - languageName: node - linkType: hard - -"isexe@npm:^2.0.0": - version: 2.0.0 - resolution: "isexe@npm:2.0.0" - checksum: 10c0/228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d - languageName: node - linkType: hard - -"isexe@npm:^3.1.1": - version: 3.1.1 - resolution: "isexe@npm:3.1.1" - checksum: 10c0/9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 - languageName: node - linkType: hard - "isexe@npm:^4.0.0": version: 4.0.0 resolution: "isexe@npm:4.0.0" @@ -3092,19 +2261,6 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^3.1.2": - version: 3.4.3 - resolution: "jackspeak@npm:3.4.3" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10c0/6acc10d139eaefdbe04d2f679e6191b3abf073f111edf10b1de5302c97ec93fffeb2fdd8681ed17f16268aa9dd4f8c588ed9d1d3bffbbfa6e8bf897cbb3149b9 - languageName: node - linkType: hard - "jackspeak@npm:^4.2.3": version: 4.2.3 resolution: "jackspeak@npm:4.2.3" @@ -3114,25 +2270,6 @@ __metadata: languageName: node linkType: hard -"js-string-escape@npm:^1.0.1": - version: 1.0.1 - resolution: "js-string-escape@npm:1.0.1" - checksum: 10c0/2c33b9ff1ba6b84681c51ca0997e7d5a1639813c95d5b61cb7ad47e55cc28fa4a0b1935c3d218710d8e6bcee5d0cd8c44755231e3a4e45fc604534d9595a3628 - languageName: node - linkType: hard - -"js-yaml@npm:^3.14.1": - version: 3.14.1 - resolution: "js-yaml@npm:3.14.1" - dependencies: - argparse: "npm:^1.0.7" - esprima: "npm:^4.0.0" - bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b - languageName: node - linkType: hard - "js-yaml@npm:^4.1.0": version: 4.1.0 resolution: "js-yaml@npm:4.1.0" @@ -3144,20 +2281,6 @@ __metadata: languageName: node linkType: hard -"json-parse-even-better-errors@npm:^4.0.0": - version: 4.0.0 - resolution: "json-parse-even-better-errors@npm:4.0.0" - checksum: 10c0/84cd9304a97e8fb2af3937bf53acb91c026aeb859703c332684e688ea60db27fc2242aa532a84e1883fdcbe1e5c1fb57c2bef38e312021aa1cd300defc63cf16 - languageName: node - linkType: hard - -"lilconfig@npm:^3.1.3": - version: 3.1.3 - resolution: "lilconfig@npm:3.1.3" - checksum: 10c0/f5604e7240c5c275743561442fbc5abf2a84ad94da0f5adc71d25e31fa8483048de3dcedcb7a44112a942fed305fd75841cdf6c9681c7f640c63f1049e9a5dcc - languageName: node - linkType: hard - "lingui-extractor-swc@workspace:.": version: 0.0.0-use.local resolution: "lingui-extractor-swc@workspace:." @@ -3169,10 +2292,6 @@ __metadata: "@swc/types": "npm:^0.1.25" "@taplo/cli": "npm:^0.7.0" "@tybys/wasm-util": "npm:^0.10.0" - ava: "npm:^6.4.1" - husky: "npm:^9.1.7" - lint-staged: "npm:^16.1.6" - npm-run-all2: "npm:^8.0.4" oxlint: "npm:^1.14.0" prettier: "npm:^3.6.2" tinybench: "npm:^6.0.0" @@ -3181,74 +2300,6 @@ __metadata: languageName: unknown linkType: soft -"lint-staged@npm:^16.1.6": - version: 16.1.6 - resolution: "lint-staged@npm:16.1.6" - dependencies: - chalk: "npm:^5.6.0" - commander: "npm:^14.0.0" - debug: "npm:^4.4.1" - lilconfig: "npm:^3.1.3" - listr2: "npm:^9.0.3" - micromatch: "npm:^4.0.8" - nano-spawn: "npm:^1.0.2" - pidtree: "npm:^0.6.0" - string-argv: "npm:^0.3.2" - yaml: "npm:^2.8.1" - bin: - lint-staged: bin/lint-staged.js - checksum: 10c0/e695edfec7e330f2c7cd0bb0e56220aa95d3b3655fe64a87a02140609a3594df67e1ea7abc2cc4ce69aa010418e406b1b24703ba4bd026c873a5b43a5ab16c6a - languageName: node - linkType: hard - -"listr2@npm:^9.0.3": - version: 9.0.3 - resolution: "listr2@npm:9.0.3" - dependencies: - cli-truncate: "npm:^4.0.0" - colorette: "npm:^2.0.20" - eventemitter3: "npm:^5.0.1" - log-update: "npm:^6.1.0" - rfdc: "npm:^1.4.1" - wrap-ansi: "npm:^9.0.0" - checksum: 10c0/29978a32f9fb052f1efc11e8ad7745426c5bf706af87151672cb98e49fa11dc83a44f5065267f7f20a299e0942fed85677ab368e1cef8367800243675c50a20e - languageName: node - linkType: hard - -"load-json-file@npm:^7.0.1": - version: 7.0.1 - resolution: "load-json-file@npm:7.0.1" - checksum: 10c0/7117459608a0b6329c7f78e6e1f541b3162dd901c29dd5af721fec8b270177d2e3d7999c971f344fff04daac368d052732e2c7146014bc84d15e0b636975e19a - languageName: node - linkType: hard - -"lodash@npm:^4.17.15": - version: 4.17.21 - resolution: "lodash@npm:4.17.21" - checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c - languageName: node - linkType: hard - -"log-update@npm:^6.1.0": - version: 6.1.0 - resolution: "log-update@npm:6.1.0" - dependencies: - ansi-escapes: "npm:^7.0.0" - cli-cursor: "npm:^5.0.0" - slice-ansi: "npm:^7.1.0" - strip-ansi: "npm:^7.1.0" - wrap-ansi: "npm:^9.0.0" - checksum: 10c0/4b350c0a83d7753fea34dcac6cd797d1dc9603291565de009baa4aa91c0447eab0d3815a05c8ec9ac04fdfffb43c82adcdb03ec1fceafd8518e1a8c1cff4ff89 - languageName: node - linkType: hard - -"lru-cache@npm:^10.2.0": - version: 10.4.3 - resolution: "lru-cache@npm:10.4.3" - checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb - languageName: node - linkType: hard - "lru-cache@npm:^11.0.0, lru-cache@npm:^11.1.0, lru-cache@npm:^11.2.1": version: 11.2.6 resolution: "lru-cache@npm:11.2.6" @@ -3284,64 +2335,6 @@ __metadata: languageName: node linkType: hard -"matcher@npm:^5.0.0": - version: 5.0.0 - resolution: "matcher@npm:5.0.0" - dependencies: - escape-string-regexp: "npm:^5.0.0" - checksum: 10c0/eda5471fc9d5b7264d63c81727824adc3585ddb5cfdc5fce5a9b7c86f946ff181610735d330b1c37a84811df872d1290bf4e9401d2be2a414204343701144b18 - languageName: node - linkType: hard - -"md5-hex@npm:^3.0.1": - version: 3.0.1 - resolution: "md5-hex@npm:3.0.1" - dependencies: - blueimp-md5: "npm:^2.10.0" - checksum: 10c0/ee2b4d8da16b527b3a3fe4d7a96720f43afd07b46a82d49421208b5a126235fb75cfb30b80d4029514772c8844273f940bddfbf4155c787f968f3be4060d01e4 - languageName: node - linkType: hard - -"memoize@npm:^10.1.0": - version: 10.1.0 - resolution: "memoize@npm:10.1.0" - dependencies: - mimic-function: "npm:^5.0.1" - checksum: 10c0/6cf71f673b89778b05cd1131f573ba858627daa8fec60f2197328386acf7ab184a89e52527abbd5a605b5ccf5ee12dc0cb96efb651d9a30dcfcc89e9baacc84d - languageName: node - linkType: hard - -"memorystream@npm:^0.3.1": - version: 0.3.1 - resolution: "memorystream@npm:0.3.1" - checksum: 10c0/4bd164657711d9747ff5edb0508b2944414da3464b7fe21ac5c67cf35bba975c4b446a0124bd0f9a8be54cfc18faf92e92bd77563a20328b1ccf2ff04e9f39b9 - languageName: node - linkType: hard - -"merge2@npm:^1.3.0": - version: 1.4.1 - resolution: "merge2@npm:1.4.1" - checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb - languageName: node - linkType: hard - -"micromatch@npm:^4.0.8": - version: 4.0.8 - resolution: "micromatch@npm:4.0.8" - dependencies: - braces: "npm:^3.0.3" - picomatch: "npm:^2.3.1" - checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 - languageName: node - linkType: hard - -"mimic-function@npm:^5.0.0, mimic-function@npm:^5.0.1": - version: 5.0.1 - resolution: "mimic-function@npm:5.0.1" - checksum: 10c0/f3d9464dd1816ecf6bdf2aec6ba32c0728022039d992f178237d8e289b48764fee4131319e72eedd4f7f094e22ded0af836c3187a7edc4595d28dd74368fd81d - languageName: node - linkType: hard - "minimatch@npm:^10.2.0": version: 10.2.0 resolution: "minimatch@npm:10.2.0" @@ -3351,15 +2344,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.4": - version: 9.0.5 - resolution: "minimatch@npm:9.0.5" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed - languageName: node - linkType: hard - "minipass-collect@npm:^2.0.1": version: 2.0.1 resolution: "minipass-collect@npm:2.0.1" @@ -3420,7 +2404,7 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": +"minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": version: 7.1.2 resolution: "minipass@npm:7.1.2" checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 @@ -3445,15 +2429,6 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:^3.0.1": - version: 3.0.1 - resolution: "mkdirp@npm:3.0.1" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: 10c0/9f2b975e9246351f5e3a40dcfac99fcd0baa31fbfab615fe059fb11e51f10e4803c63de1f384c54d656e4db31d000e4767e9ef076a22e12a641357602e31d57d - languageName: node - linkType: hard - "ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" @@ -3468,13 +2443,6 @@ __metadata: languageName: node linkType: hard -"nano-spawn@npm:^1.0.2": - version: 1.0.3 - resolution: "nano-spawn@npm:1.0.3" - checksum: 10c0/ea18857e493710a50ded333dd71677953bd9bd9e6a17ade74af957763c50a9a02205ef31bc0d6784f5b3ad82db3d9f47531e9baac2acf01118f9b7c35bd9d5de - languageName: node - linkType: hard - "nanoid@npm:^3.3.11": version: 3.3.11 resolution: "nanoid@npm:3.3.11" @@ -3491,31 +2459,6 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.7": - version: 2.7.0 - resolution: "node-fetch@npm:2.7.0" - dependencies: - whatwg-url: "npm:^5.0.0" - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - checksum: 10c0/b55786b6028208e6fbe594ccccc213cab67a72899c9234eb59dba51062a299ea853210fcf526998eaa2867b0963ad72338824450905679ff0fa304b8c5093ae8 - languageName: node - linkType: hard - -"node-gyp-build@npm:^4.2.2": - version: 4.8.4 - resolution: "node-gyp-build@npm:4.8.4" - bin: - node-gyp-build: bin.js - node-gyp-build-optional: optional.js - node-gyp-build-test: build-test.js - checksum: 10c0/444e189907ece2081fe60e75368784f7782cfddb554b60123743dfb89509df89f1f29c03bbfa16b3a3e0be3f48799a4783f487da6203245fa5bed239ba7407e1 - languageName: node - linkType: hard - "node-gyp@npm:latest": version: 12.2.0 resolution: "node-gyp@npm:12.2.0" @@ -3536,24 +2479,6 @@ __metadata: languageName: node linkType: hard -"nofilter@npm:^3.0.2": - version: 3.1.0 - resolution: "nofilter@npm:3.1.0" - checksum: 10c0/92459f3864a067b347032263f0b536223cbfc98153913b5dce350cb39c8470bc1813366e41993f22c33cc6400c0f392aa324a4b51e24c22040635c1cdb046499 - languageName: node - linkType: hard - -"nopt@npm:^8.0.0": - version: 8.1.0 - resolution: "nopt@npm:8.1.0" - dependencies: - abbrev: "npm:^3.0.0" - bin: - nopt: bin/nopt.js - checksum: 10c0/62e9ea70c7a3eb91d162d2c706b6606c041e4e7b547cbbb48f8b3695af457dd6479904d7ace600856bf923dd8d1ed0696f06195c8c20f02ac87c1da0e1d315ef - languageName: node - linkType: hard - "nopt@npm:^9.0.0": version: 9.0.0 resolution: "nopt@npm:9.0.0" @@ -3565,34 +2490,6 @@ __metadata: languageName: node linkType: hard -"npm-normalize-package-bin@npm:^4.0.0": - version: 4.0.0 - resolution: "npm-normalize-package-bin@npm:4.0.0" - checksum: 10c0/1fa546fcae8eaab61ef9b9ec237b6c795008da50e1883eae030e9e38bb04ffa32c5aabcef9a0400eae3dc1f91809bcfa85e437ce80d677c69b419d1d9cacf0ab - languageName: node - linkType: hard - -"npm-run-all2@npm:^8.0.4": - version: 8.0.4 - resolution: "npm-run-all2@npm:8.0.4" - dependencies: - ansi-styles: "npm:^6.2.1" - cross-spawn: "npm:^7.0.6" - memorystream: "npm:^0.3.1" - picomatch: "npm:^4.0.2" - pidtree: "npm:^0.6.0" - read-package-json-fast: "npm:^4.0.0" - shell-quote: "npm:^1.7.3" - which: "npm:^5.0.0" - bin: - npm-run-all: bin/npm-run-all/index.js - npm-run-all2: bin/npm-run-all/index.js - run-p: bin/run-p/index.js - run-s: bin/run-s/index.js - checksum: 10c0/cfc2987df224e55456629301991b5fa6980cc644d1836fe3c22d74a4508512737d30389795b759bb5d659103e54281c59741ecdc0241cfd2615cb9bffbf7cceb - languageName: node - linkType: hard - "obug@npm:^2.0.0, obug@npm:^2.1.1": version: 2.1.1 resolution: "obug@npm:2.1.1" @@ -3600,15 +2497,6 @@ __metadata: languageName: node linkType: hard -"onetime@npm:^7.0.0": - version: 7.0.0 - resolution: "onetime@npm:7.0.0" - dependencies: - mimic-function: "npm:^5.0.0" - checksum: 10c0/5cb9179d74b63f52a196a2e7037ba2b9a893245a5532d3f44360012005c9cadb60851d56716ebff18a6f47129dab7168022445df47c2aff3b276d92585ed1221 - languageName: node - linkType: hard - "oxlint@npm:^1.14.0": version: 1.14.0 resolution: "oxlint@npm:1.14.0" @@ -3657,54 +2545,6 @@ __metadata: languageName: node linkType: hard -"p-map@npm:^7.0.3": - version: 7.0.3 - resolution: "p-map@npm:7.0.3" - checksum: 10c0/46091610da2b38ce47bcd1d8b4835a6fa4e832848a6682cf1652bc93915770f4617afc844c10a77d1b3e56d2472bb2d5622353fa3ead01a7f42b04fc8e744a5c - languageName: node - linkType: hard - -"package-config@npm:^5.0.0": - version: 5.0.0 - resolution: "package-config@npm:5.0.0" - dependencies: - find-up-simple: "npm:^1.0.0" - load-json-file: "npm:^7.0.1" - checksum: 10c0/f6c48930700b73a41d839bf2898b628d23665827488a4f34aed2d05e4a99d7a70a70ada115c3546765947fbc8accff94c0779da21ea084b25df47cb774531eeb - languageName: node - linkType: hard - -"package-json-from-dist@npm:^1.0.0": - version: 1.0.1 - resolution: "package-json-from-dist@npm:1.0.1" - checksum: 10c0/62ba2785eb655fec084a257af34dbe24292ab74516d6aecef97ef72d4897310bc6898f6c85b5cd22770eaa1ce60d55a0230e150fb6a966e3ecd6c511e23d164b - languageName: node - linkType: hard - -"parse-ms@npm:^4.0.0": - version: 4.0.0 - resolution: "parse-ms@npm:4.0.0" - checksum: 10c0/a7900f4f1ebac24cbf5e9708c16fb2fd482517fad353aecd7aefb8c2ba2f85ce017913ccb8925d231770404780df46244ea6fec598b3bde6490882358b4d2d16 - languageName: node - linkType: hard - -"path-key@npm:^3.1.0": - version: 3.1.1 - resolution: "path-key@npm:3.1.1" - checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c - languageName: node - linkType: hard - -"path-scurry@npm:^1.11.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" - dependencies: - lru-cache: "npm:^10.2.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d - languageName: node - linkType: hard - "path-scurry@npm:^2.0.0": version: 2.0.1 resolution: "path-scurry@npm:2.0.1" @@ -3715,13 +2555,6 @@ __metadata: languageName: node linkType: hard -"path-type@npm:^6.0.0": - version: 6.0.0 - resolution: "path-type@npm:6.0.0" - checksum: 10c0/55baa8b1187d6dc683d5a9cfcc866168d6adff58e5db91126795376d818eee46391e00b2a4d53e44d844c7524a7d96aa68cc68f4f3e500d3d069a39e6535481c - languageName: node - linkType: hard - "pathe@npm:^2.0.3": version: 2.0.3 resolution: "pathe@npm:2.0.3" @@ -3736,29 +2569,13 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.3.1": - version: 2.3.1 - resolution: "picomatch@npm:2.3.1" - checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be - languageName: node - linkType: hard - -"picomatch@npm:^4.0.2, picomatch@npm:^4.0.3": +"picomatch@npm:^4.0.3": version: 4.0.3 resolution: "picomatch@npm:4.0.3" checksum: 10c0/9582c951e95eebee5434f59e426cddd228a7b97a0161a375aed4be244bd3fe8e3a31b846808ea14ef2c8a2527a6eeab7b3946a67d5979e81694654f939473ae2 languageName: node linkType: hard -"pidtree@npm:^0.6.0": - version: 0.6.0 - resolution: "pidtree@npm:0.6.0" - bin: - pidtree: bin/pidtree.js - checksum: 10c0/0829ec4e9209e230f74ebf4265f5ccc9ebfb488334b525cb13f86ff801dca44b362c41252cd43ae4d7653a10a5c6ab3be39d2c79064d6895e0d78dc50a5ed6e9 - languageName: node - linkType: hard - "pirates@npm:^4.0.7": version: 4.0.7 resolution: "pirates@npm:4.0.7" @@ -3766,15 +2583,6 @@ __metadata: languageName: node linkType: hard -"plur@npm:^5.1.0": - version: 5.1.0 - resolution: "plur@npm:5.1.0" - dependencies: - irregular-plurals: "npm:^3.3.0" - checksum: 10c0/26bb622b8545fcfd47bbf56fbcca66c08693708a232e403fa3589e00003c56c14231ac57c7588ca5db83ef4be1f61383402c4ea954000768f779f8aef6eb6da8 - languageName: node - linkType: hard - "postcss@npm:^8.5.6": version: 8.5.6 resolution: "postcss@npm:8.5.6" @@ -3795,15 +2603,6 @@ __metadata: languageName: node linkType: hard -"pretty-ms@npm:^9.2.0": - version: 9.2.0 - resolution: "pretty-ms@npm:9.2.0" - dependencies: - parse-ms: "npm:^4.0.0" - checksum: 10c0/ab6d066f90e9f77020426986e1b018369f41575674544c539aabec2e63a20fec01166d8cf6571d0e165ad11cfe5a8134a2a48a36d42ab291c59c6deca5264cbb - languageName: node - linkType: hard - "proc-log@npm:^6.0.0": version: 6.1.0 resolution: "proc-log@npm:6.1.0" @@ -3821,56 +2620,6 @@ __metadata: languageName: node linkType: hard -"queue-microtask@npm:^1.2.2": - version: 1.2.3 - resolution: "queue-microtask@npm:1.2.3" - checksum: 10c0/900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102 - languageName: node - linkType: hard - -"read-package-json-fast@npm:^4.0.0": - version: 4.0.0 - resolution: "read-package-json-fast@npm:4.0.0" - dependencies: - json-parse-even-better-errors: "npm:^4.0.0" - npm-normalize-package-bin: "npm:^4.0.0" - checksum: 10c0/8a03509ae8e852f1abc4b109c1be571dd90ac9ea65d55433b2fe287e409113441a9b00df698288fe48aa786c1a2550569d47b5ab01ed83ada073d691d5aff582 - languageName: node - linkType: hard - -"require-directory@npm:^2.1.1": - version: 2.1.1 - resolution: "require-directory@npm:2.1.1" - checksum: 10c0/83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 - languageName: node - linkType: hard - -"resolve-cwd@npm:^3.0.0": - version: 3.0.0 - resolution: "resolve-cwd@npm:3.0.0" - dependencies: - resolve-from: "npm:^5.0.0" - checksum: 10c0/e608a3ebd15356264653c32d7ecbc8fd702f94c6703ea4ac2fb81d9c359180cba0ae2e6b71faa446631ed6145454d5a56b227efc33a2d40638ac13f8beb20ee4 - languageName: node - linkType: hard - -"resolve-from@npm:^5.0.0": - version: 5.0.0 - resolution: "resolve-from@npm:5.0.0" - checksum: 10c0/b21cb7f1fb746de8107b9febab60095187781137fd803e6a59a76d421444b1531b641bba5857f5dc011974d8a5c635d61cec49e6bd3b7fc20e01f0fafc4efbf2 - languageName: node - linkType: hard - -"restore-cursor@npm:^5.0.0": - version: 5.1.0 - resolution: "restore-cursor@npm:5.1.0" - dependencies: - onetime: "npm:^7.0.0" - signal-exit: "npm:^4.1.0" - checksum: 10c0/c2ba89131eea791d1b25205bdfdc86699767e2b88dee2a590b1a6caa51737deac8bad0260a5ded2f7c074b7db2f3a626bcf1fcf3cdf35974cbeea5e2e6764f60 - languageName: node - linkType: hard - "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -3878,20 +2627,6 @@ __metadata: languageName: node linkType: hard -"reusify@npm:^1.0.4": - version: 1.1.0 - resolution: "reusify@npm:1.1.0" - checksum: 10c0/4eff0d4a5f9383566c7d7ec437b671cc51b25963bd61bf127c3f3d3f68e44a026d99b8d2f1ad344afff8d278a8fe70a8ea092650a716d22287e8bef7126bb2fa - languageName: node - linkType: hard - -"rfdc@npm:^1.4.1": - version: 1.4.1 - resolution: "rfdc@npm:1.4.1" - checksum: 10c0/4614e4292356cafade0b6031527eea9bc90f2372a22c012313be1dcc69a3b90c7338158b414539be863fa95bfcb2ddcd0587be696841af4e6679d85e62c060c7 - languageName: node - linkType: hard - "rollup@npm:^4.43.0": version: 4.57.1 resolution: "rollup@npm:4.57.1" @@ -3982,15 +2717,6 @@ __metadata: languageName: node linkType: hard -"run-parallel@npm:^1.1.9": - version: 1.2.0 - resolution: "run-parallel@npm:1.2.0" - dependencies: - queue-microtask: "npm:^1.2.2" - checksum: 10c0/200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39 - languageName: node - linkType: hard - "safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" @@ -3998,15 +2724,6 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.2, semver@npm:^7.5.3": - version: 7.7.2 - resolution: "semver@npm:7.7.2" - bin: - semver: bin/semver.js - checksum: 10c0/aca305edfbf2383c22571cb7714f48cadc7ac95371b4b52362fb8eeffdfbc0de0669368b82b2b15978f8848f01d7114da65697e56cd8c37b0dab8c58e543f9ea - languageName: node - linkType: hard - "semver@npm:^7.3.5, semver@npm:^7.7.3": version: 7.7.4 resolution: "semver@npm:7.7.4" @@ -4016,38 +2733,6 @@ __metadata: languageName: node linkType: hard -"serialize-error@npm:^7.0.1": - version: 7.0.1 - resolution: "serialize-error@npm:7.0.1" - dependencies: - type-fest: "npm:^0.13.1" - checksum: 10c0/7982937d578cd901276c8ab3e2c6ed8a4c174137730f1fb0402d005af209a0e84d04acc874e317c936724c7b5b26c7a96ff7e4b8d11a469f4924a4b0ea814c05 - languageName: node - linkType: hard - -"shebang-command@npm:^2.0.0": - version: 2.0.0 - resolution: "shebang-command@npm:2.0.0" - dependencies: - shebang-regex: "npm:^3.0.0" - checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e - languageName: node - linkType: hard - -"shebang-regex@npm:^3.0.0": - version: 3.0.0 - resolution: "shebang-regex@npm:3.0.0" - checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 - languageName: node - linkType: hard - -"shell-quote@npm:^1.7.3": - version: 1.8.3 - resolution: "shell-quote@npm:1.8.3" - checksum: 10c0/bee87c34e1e986cfb4c30846b8e6327d18874f10b535699866f368ade11ea4ee45433d97bf5eada22c4320c27df79c3a6a7eb1bf3ecfc47f2c997d9e5e2672fd - languageName: node - linkType: hard - "siginfo@npm:^2.0.0": version: 2.0.0 resolution: "siginfo@npm:2.0.0" @@ -4055,40 +2740,13 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": +"signal-exit@npm:^4.1.0": version: 4.1.0 resolution: "signal-exit@npm:4.1.0" checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 languageName: node linkType: hard -"slash@npm:^5.1.0": - version: 5.1.0 - resolution: "slash@npm:5.1.0" - checksum: 10c0/eb48b815caf0bdc390d0519d41b9e0556a14380f6799c72ba35caf03544d501d18befdeeef074bc9c052acf69654bc9e0d79d7f1de0866284137a40805299eb3 - languageName: node - linkType: hard - -"slice-ansi@npm:^5.0.0": - version: 5.0.0 - resolution: "slice-ansi@npm:5.0.0" - dependencies: - ansi-styles: "npm:^6.0.0" - is-fullwidth-code-point: "npm:^4.0.0" - checksum: 10c0/2d4d40b2a9d5cf4e8caae3f698fe24ae31a4d778701724f578e984dcb485ec8c49f0c04dab59c401821e80fcdfe89cace9c66693b0244e40ec485d72e543914f - languageName: node - linkType: hard - -"slice-ansi@npm:^7.1.0": - version: 7.1.2 - resolution: "slice-ansi@npm:7.1.2" - dependencies: - ansi-styles: "npm:^6.2.1" - is-fullwidth-code-point: "npm:^5.0.0" - checksum: 10c0/36742f2eb0c03e2e81a38ed14d13a64f7b732fe38c3faf96cce0599788a345011e840db35f1430ca606ea3f8db2abeb92a8d25c2753a819e3babaa10c2e289a2 - languageName: node - linkType: hard - "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" @@ -4124,13 +2782,6 @@ __metadata: languageName: node linkType: hard -"sprintf-js@npm:~1.0.2": - version: 1.0.3 - resolution: "sprintf-js@npm:1.0.3" - checksum: 10c0/ecadcfe4c771890140da5023d43e190b7566d9cf8b2d238600f31bec0fc653f328da4450eb04bd59a431771a8e9cc0e118f0aa3974b683a4981b4e07abc2a5bb - languageName: node - linkType: hard - "ssri@npm:^13.0.0": version: 13.0.1 resolution: "ssri@npm:13.0.1" @@ -4140,15 +2791,6 @@ __metadata: languageName: node linkType: hard -"stack-utils@npm:^2.0.6": - version: 2.0.6 - resolution: "stack-utils@npm:2.0.6" - dependencies: - escape-string-regexp: "npm:^2.0.0" - checksum: 10c0/651c9f87667e077584bbe848acaecc6049bc71979f1e9a46c7b920cad4431c388df0f51b8ad7cfd6eed3db97a2878d0fc8b3122979439ea8bac29c61c95eec8a - languageName: node - linkType: hard - "stackback@npm:0.0.2": version: 0.0.2 resolution: "stackback@npm:0.0.2" @@ -4163,90 +2805,6 @@ __metadata: languageName: node linkType: hard -"string-argv@npm:^0.3.2": - version: 0.3.2 - resolution: "string-argv@npm:0.3.2" - checksum: 10c0/75c02a83759ad1722e040b86823909d9a2fc75d15dd71ec4b537c3560746e33b5f5a07f7332d1e3f88319909f82190843aa2f0a0d8c8d591ec08e93d5b8dec82 - languageName: node - linkType: hard - -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": - version: 4.2.3 - resolution: "string-width@npm:4.2.3" - dependencies: - emoji-regex: "npm:^8.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - strip-ansi: "npm:^6.0.1" - checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b - languageName: node - linkType: hard - -"string-width@npm:^5.0.1, string-width@npm:^5.1.2": - version: 5.1.2 - resolution: "string-width@npm:5.1.2" - dependencies: - eastasianwidth: "npm:^0.2.0" - emoji-regex: "npm:^9.2.2" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca - languageName: node - linkType: hard - -"string-width@npm:^7.0.0": - version: 7.2.0 - resolution: "string-width@npm:7.2.0" - dependencies: - emoji-regex: "npm:^10.3.0" - get-east-asian-width: "npm:^1.0.0" - strip-ansi: "npm:^7.1.0" - checksum: 10c0/eb0430dd43f3199c7a46dcbf7a0b34539c76fe3aa62763d0b0655acdcbdf360b3f66f3d58ca25ba0205f42ea3491fa00f09426d3b7d3040e506878fc7664c9b9 - languageName: node - linkType: hard - -"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": - version: 6.0.1 - resolution: "strip-ansi@npm:6.0.1" - dependencies: - ansi-regex: "npm:^5.0.1" - checksum: 10c0/1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 - languageName: node - linkType: hard - -"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": - version: 7.1.2 - resolution: "strip-ansi@npm:7.1.2" - dependencies: - ansi-regex: "npm:^6.0.1" - checksum: 10c0/0d6d7a023de33368fd042aab0bf48f4f4077abdfd60e5393e73c7c411e85e1b3a83507c11af2e656188511475776215df9ca589b4da2295c9455cc399ce1858b - languageName: node - linkType: hard - -"supertap@npm:^3.0.1": - version: 3.0.1 - resolution: "supertap@npm:3.0.1" - dependencies: - indent-string: "npm:^5.0.0" - js-yaml: "npm:^3.14.1" - serialize-error: "npm:^7.0.1" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/8164674f2e280cab875f0fef5bb36c15553c13e29697ff92f4e0d6bc62149f0303a89eee47535413ed145ea72e14a24d065bab233059d48a499ec5ebb4566b0f - languageName: node - linkType: hard - -"tar@npm:^7.4.0": - version: 7.4.3 - resolution: "tar@npm:7.4.3" - dependencies: - "@isaacs/fs-minipass": "npm:^4.0.0" - chownr: "npm:^3.0.0" - minipass: "npm:^7.1.2" - minizlib: "npm:^3.0.1" - mkdirp: "npm:^3.0.1" - yallist: "npm:^5.0.0" - checksum: 10c0/d4679609bb2a9b48eeaf84632b6d844128d2412b95b6de07d53d8ee8baf4ca0857c9331dfa510390a0727b550fd543d4d1a10995ad86cdf078423fbb8d99831d - languageName: node - linkType: hard - "tar@npm:^7.5.4": version: 7.5.7 resolution: "tar@npm:7.5.7" @@ -4260,20 +2818,6 @@ __metadata: languageName: node linkType: hard -"temp-dir@npm:^3.0.0": - version: 3.0.0 - resolution: "temp-dir@npm:3.0.0" - checksum: 10c0/a86978a400984cd5f315b77ebf3fe53bb58c61f192278cafcb1f3fb32d584a21dc8e08b93171d7874b7cc972234d3455c467306cc1bfc4524b622e5ad3bfd671 - languageName: node - linkType: hard - -"time-zone@npm:^1.0.0": - version: 1.0.0 - resolution: "time-zone@npm:1.0.0" - checksum: 10c0/d00ebd885039109011b6e2423ebbf225160927333c2ade6d833e9cc4676db20759f1f3855fafde00d1bd668c243a6aa68938ce71fe58aab0d514e820d59c1d81 - languageName: node - linkType: hard - "tinybench@npm:^2.9.0": version: 2.9.0 resolution: "tinybench@npm:2.9.0" @@ -4312,22 +2856,6 @@ __metadata: languageName: node linkType: hard -"to-regex-range@npm:^5.0.1": - version: 5.0.1 - resolution: "to-regex-range@npm:5.0.1" - dependencies: - is-number: "npm:^7.0.0" - checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 - languageName: node - linkType: hard - -"tr46@npm:~0.0.3": - version: 0.0.3 - resolution: "tr46@npm:0.0.3" - checksum: 10c0/047cb209a6b60c742f05c9d3ace8fa510bff609995c129a37ace03476a9b12db4dbf975e74600830ef0796e18882b2381fb5fb1f6b4f96b832c374de3ab91a11 - languageName: node - linkType: hard - "tslib@npm:^2.4.0": version: 2.8.1 resolution: "tslib@npm:2.8.1" @@ -4342,13 +2870,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.13.1": - version: 0.13.1 - resolution: "type-fest@npm:0.13.1" - checksum: 10c0/0c0fa07ae53d4e776cf4dac30d25ad799443e9eef9226f9fddbb69242db86b08584084a99885cfa5a9dfe4c063ebdc9aa7b69da348e735baede8d43f1aeae93b - languageName: node - linkType: hard - "typescript@npm:^5.9.2": version: 5.9.2 resolution: "typescript@npm:5.9.2" @@ -4369,13 +2890,6 @@ __metadata: languageName: node linkType: hard -"unicorn-magic@npm:^0.3.0": - version: 0.3.0 - resolution: "unicorn-magic@npm:0.3.0" - checksum: 10c0/0a32a997d6c15f1c2a077a15b1c4ca6f268d574cf5b8975e778bb98e6f8db4ef4e86dfcae4e158cd4c7e38fb4dd383b93b13eefddc7f178dea13d3ac8a603271 - languageName: node - linkType: hard - "unique-filename@npm:^5.0.0": version: 5.0.0 resolution: "unique-filename@npm:5.0.0" @@ -4515,52 +3029,6 @@ __metadata: languageName: node linkType: hard -"webidl-conversions@npm:^3.0.0": - version: 3.0.1 - resolution: "webidl-conversions@npm:3.0.1" - checksum: 10c0/5612d5f3e54760a797052eb4927f0ddc01383550f542ccd33d5238cfd65aeed392a45ad38364970d0a0f4fea32e1f4d231b3d8dac4a3bdd385e5cf802ae097db - languageName: node - linkType: hard - -"well-known-symbols@npm:^2.0.0": - version: 2.0.0 - resolution: "well-known-symbols@npm:2.0.0" - checksum: 10c0/cb6c12e98877e8952ec28d13ae6f4fdb54ae1cb49b16a728720276dadd76c930e6cb0e174af3a4620054dd2752546f842540122920c6e31410208abd4958ee6b - languageName: node - linkType: hard - -"whatwg-url@npm:^5.0.0": - version: 5.0.0 - resolution: "whatwg-url@npm:5.0.0" - dependencies: - tr46: "npm:~0.0.3" - webidl-conversions: "npm:^3.0.0" - checksum: 10c0/1588bed84d10b72d5eec1d0faa0722ba1962f1821e7539c535558fb5398d223b0c50d8acab950b8c488b4ba69043fd833cc2697056b167d8ad46fac3995a55d5 - languageName: node - linkType: hard - -"which@npm:^2.0.1": - version: 2.0.2 - resolution: "which@npm:2.0.2" - dependencies: - isexe: "npm:^2.0.0" - bin: - node-which: ./bin/node-which - checksum: 10c0/66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f - languageName: node - linkType: hard - -"which@npm:^5.0.0": - version: 5.0.0 - resolution: "which@npm:5.0.0" - dependencies: - isexe: "npm:^3.1.1" - bin: - node-which: bin/which.js - checksum: 10c0/e556e4cd8b7dbf5df52408c9a9dd5ac6518c8c5267c8953f5b0564073c66ed5bf9503b14d876d0e9c7844d4db9725fb0dcf45d6e911e17e26ab363dc3965ae7b - languageName: node - linkType: hard - "which@npm:^6.0.0": version: 6.0.1 resolution: "which@npm:6.0.1" @@ -4584,56 +3052,6 @@ __metadata: languageName: node linkType: hard -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" - dependencies: - ansi-styles: "npm:^4.0.0" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da - languageName: node - linkType: hard - -"wrap-ansi@npm:^8.1.0": - version: 8.1.0 - resolution: "wrap-ansi@npm:8.1.0" - dependencies: - ansi-styles: "npm:^6.1.0" - string-width: "npm:^5.0.1" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 - languageName: node - linkType: hard - -"wrap-ansi@npm:^9.0.0": - version: 9.0.2 - resolution: "wrap-ansi@npm:9.0.2" - dependencies: - ansi-styles: "npm:^6.2.1" - string-width: "npm:^7.0.0" - strip-ansi: "npm:^7.1.0" - checksum: 10c0/3305839b9a0d6fb930cb63a52f34d3936013d8b0682ff3ec133c9826512620f213800ffa19ea22904876d5b7e9a3c1f40682f03597d986a4ca881fa7b033688c - languageName: node - linkType: hard - -"write-file-atomic@npm:^6.0.0": - version: 6.0.0 - resolution: "write-file-atomic@npm:6.0.0" - dependencies: - imurmurhash: "npm:^0.1.4" - signal-exit: "npm:^4.0.1" - checksum: 10c0/ae2f1c27474758a9aca92037df6c1dd9cb94c4e4983451210bd686bfe341f142662f6aa5913095e572ab037df66b1bfe661ed4ce4c0369ed0e8219e28e141786 - languageName: node - linkType: hard - -"y18n@npm:^5.0.5": - version: 5.0.8 - resolution: "y18n@npm:5.0.8" - checksum: 10c0/4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 - languageName: node - linkType: hard - "yallist@npm:^4.0.0": version: 4.0.0 resolution: "yallist@npm:4.0.0" @@ -4647,34 +3065,3 @@ __metadata: checksum: 10c0/a499c81ce6d4a1d260d4ea0f6d49ab4da09681e32c3f0472dee16667ed69d01dae63a3b81745a24bd78476ec4fcf856114cb4896ace738e01da34b2c42235416 languageName: node linkType: hard - -"yaml@npm:^2.8.1": - version: 2.8.1 - resolution: "yaml@npm:2.8.1" - bin: - yaml: bin.mjs - checksum: 10c0/7c587be00d9303d2ae1566e03bc5bc7fe978ba0d9bf39cc418c3139d37929dfcb93a230d9749f2cb578b6aa5d9ebebc322415e4b653cb83acd8bc0bc321707f3 - languageName: node - linkType: hard - -"yargs-parser@npm:^21.1.1": - version: 21.1.1 - resolution: "yargs-parser@npm:21.1.1" - checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 - languageName: node - linkType: hard - -"yargs@npm:^17.7.2": - version: 17.7.2 - resolution: "yargs@npm:17.7.2" - dependencies: - cliui: "npm:^8.0.1" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.3" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^21.1.1" - checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 - languageName: node - linkType: hard From cc50ffb2b1aa79ddf3fcf5525533e5324492c47f Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Wed, 25 Feb 2026 11:52:43 +0100 Subject: [PATCH 10/34] support comment and context extraction --- Cargo.lock | 4 +-- .../__snapshots__/js-with-macros.js.json | 22 ++++++++++++---- .../__snapshots__/jsx-with-macros.js.json | 26 ++++++++++++++----- .../__snapshots__/jsx-without-trans.js.json | 2 +- .../tests/fixtures/js-with-macros.js | 12 ++++++--- .../tests/fixtures/jsx-with-macros.js | 11 +++++--- .../tests/message_extractor.rs | 2 +- ..._produce_all_fields_when_no_message_set.js | 6 +++++ ...d_produce_all_fields_without_strip_flag.js | 10 +++++++ 9 files changed, 72 insertions(+), 23 deletions(-) create mode 100644 crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_when_no_message_set.js create mode 100644 crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_without_strip_flag.js diff --git a/Cargo.lock b/Cargo.lock index 0e40c80..af65cab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1116,7 +1116,7 @@ dependencies = [ [[package]] name = "lingui_extractor" -version = "5.10.1" +version = "6.0.0-next.1" dependencies = [ "data-encoding", "lingui_macro", @@ -1145,7 +1145,7 @@ dependencies = [ [[package]] name = "lingui_macro" -version = "5.10.1" +version = "6.0.0-next.1" dependencies = [ "data-encoding", "once_cell", diff --git a/crates/lingui_extractor/tests/__snapshots__/js-with-macros.js.json b/crates/lingui_extractor/tests/__snapshots__/js-with-macros.js.json index 50d6227..d38d69a 100644 --- a/crates/lingui_extractor/tests/__snapshots__/js-with-macros.js.json +++ b/crates/lingui_extractor/tests/__snapshots__/js-with-macros.js.json @@ -27,7 +27,7 @@ "id": "Nu4oKW", "message": "Description", "context": null, - "comment": null, + "comment": "description", "placeholders": {}, "origin": { "filename": "js-with-macros.js", @@ -88,7 +88,7 @@ { "id": "Some ID", "message": null, - "context": null, + "context": "Context1", "comment": null, "placeholders": {}, "origin": { @@ -100,7 +100,7 @@ { "id": "Some other ID", "message": null, - "context": null, + "context": "Context1", "comment": null, "placeholders": {}, "origin": { @@ -112,7 +112,7 @@ { "id": "Some ID", "message": null, - "context": null, + "context": "Context2", "comment": null, "placeholders": {}, "origin": { @@ -124,7 +124,7 @@ { "id": "Some ID", "message": null, - "context": null, + "context": "Context2", "comment": null, "placeholders": {}, "origin": { @@ -170,5 +170,17 @@ "line": 57, "column": 14 } + }, + { + "id": "AZczQP", + "message": "Some ID", + "context": "Context2", + "comment": "This is a comment for a message", + "placeholders": {}, + "origin": { + "filename": "js-with-macros.js", + "line": 65, + "column": 36 + } } ] \ No newline at end of file diff --git a/crates/lingui_extractor/tests/__snapshots__/jsx-with-macros.js.json b/crates/lingui_extractor/tests/__snapshots__/jsx-with-macros.js.json index 5b8983d..cd92a6c 100644 --- a/crates/lingui_extractor/tests/__snapshots__/jsx-with-macros.js.json +++ b/crates/lingui_extractor/tests/__snapshots__/jsx-with-macros.js.json @@ -9,8 +9,8 @@ }, "origin": { "filename": "jsx-with-macros.js", - "line": 3, - "column": 9 + "line": 4, + "column": 8 } }, { @@ -21,7 +21,7 @@ "placeholders": {}, "origin": { "filename": "jsx-with-macros.js", - "line": 4, + "line": 5, "column": 28 } }, @@ -33,7 +33,7 @@ "placeholders": {}, "origin": { "filename": "jsx-with-macros.js", - "line": 5, + "line": 6, "column": 28 } }, @@ -45,7 +45,7 @@ "placeholders": {}, "origin": { "filename": "jsx-with-macros.js", - "line": 6, + "line": 7, "column": 28 } }, @@ -57,7 +57,7 @@ "placeholders": {}, "origin": { "filename": "jsx-with-macros.js", - "line": 7, + "line": 8, "column": 16 } }, @@ -71,8 +71,20 @@ }, "origin": { "filename": "jsx-with-macros.js", - "line": 9, + "line": 10, "column": 17 } + }, + { + "id": "TFdOtc", + "message": "Some message with comment", + "context": null, + "comment": "This is comment", + "placeholders": {}, + "origin": { + "filename": "jsx-with-macros.js", + "line": 15, + "column": 35 + } } ] \ No newline at end of file diff --git a/crates/lingui_extractor/tests/__snapshots__/jsx-without-trans.js.json b/crates/lingui_extractor/tests/__snapshots__/jsx-without-trans.js.json index fac741d..d576235 100644 --- a/crates/lingui_extractor/tests/__snapshots__/jsx-without-trans.js.json +++ b/crates/lingui_extractor/tests/__snapshots__/jsx-without-trans.js.json @@ -14,7 +14,7 @@ } }, { - "id": "8qNz+K", + "id": "8qNz-K", "message": "{count, plural, one {# book} other {# books}}", "context": "Some context", "comment": null, diff --git a/crates/lingui_extractor/tests/fixtures/js-with-macros.js b/crates/lingui_extractor/tests/fixtures/js-with-macros.js index 564320d..3a5df0c 100644 --- a/crates/lingui_extractor/tests/fixtures/js-with-macros.js +++ b/crates/lingui_extractor/tests/fixtures/js-with-macros.js @@ -1,5 +1,5 @@ -import { t, defineMessage, msg, plural } from "@lingui/core/macro" -import { useLingui } from "@lingui/react/macro" +import {t, defineMessage, msg, plural} from "@lingui/core/macro" +import {useLingui} from "@lingui/react/macro" t`Message` @@ -49,7 +49,7 @@ const defineMessageAlias = msg({ const defineMessageAlias2 = msg`TplLiteral` function MyComponent() { - const { t } = useLingui() + const {t} = useLingui() t`[useLingui]: TplLiteral` @@ -61,3 +61,9 @@ function MyComponent() { other: "# books", })}` } + +const defineMessageWithAllFields = msg({ + message: "Some ID", + context: "Context2", + comment: "This is a comment for a message" +}) diff --git a/crates/lingui_extractor/tests/fixtures/jsx-with-macros.js b/crates/lingui_extractor/tests/fixtures/jsx-with-macros.js index c14c5c3..99f7262 100644 --- a/crates/lingui_extractor/tests/fixtures/jsx-with-macros.js +++ b/crates/lingui_extractor/tests/fixtures/jsx-with-macros.js @@ -1,13 +1,16 @@ -import { Trans } from "@lingui/react/macro" -import { t, plural } from "@lingui/core/macro" -;Hi, my name is {name} +import {Trans} from "@lingui/react/macro"; +import {t, plural} from "@lingui/core/macro"; + +Hi, my name is {name} ;Some message ;Some other message ;Some message -; +; ; +;Some message with comment + diff --git a/crates/lingui_extractor/tests/message_extractor.rs b/crates/lingui_extractor/tests/message_extractor.rs index a935e0b..ae07d2b 100644 --- a/crates/lingui_extractor/tests/message_extractor.rs +++ b/crates/lingui_extractor/tests/message_extractor.rs @@ -3,7 +3,7 @@ use lingui_extractor::{extract_messages, ExtractorOptions}; fn extract_and_sort(source_code: &str, filename: &str) -> (Vec, Vec) { let options = ExtractorOptions { - syntax: Syntax::Typescript(TsSyntax { + parser: Syntax::Typescript(TsSyntax { tsx: true, ..Default::default() diff --git a/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_when_no_message_set.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_when_no_message_set.js new file mode 100644 index 0000000..ffb8690 --- /dev/null +++ b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_when_no_message_set.js @@ -0,0 +1,6 @@ +import { i18n as $_i18n } from "@lingui/core"; +const msg2 = $_i18n._(/*i18n*/ { + id: "msgId", + context: "My Context", + comment: "description for translators" +}); diff --git a/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_without_strip_flag.js b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_without_strip_flag.js new file mode 100644 index 0000000..9a56ba0 --- /dev/null +++ b/crates/lingui_macro/tests/__swc_snapshots__/tests/js_t.rs/js_should_produce_all_fields_without_strip_flag.js @@ -0,0 +1,10 @@ +import { i18n as $_i18n } from "@lingui/core"; +const msg2 = $_i18n._(/*i18n*/ { + id: "msgId", + message: "Hello {name}", + values: { + name: name + }, + context: "My Context", + comment: "description for translators" +}); From b95f9ca975e30a6aa4e0da0072a7b54eae1acb82 Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Wed, 25 Feb 2026 12:56:48 +0100 Subject: [PATCH 11/34] fixup tests --- napi-rs/__test__/index.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/napi-rs/__test__/index.spec.ts b/napi-rs/__test__/index.spec.ts index 927b8f4..8d8ecee 100644 --- a/napi-rs/__test__/index.spec.ts +++ b/napi-rs/__test__/index.spec.ts @@ -68,7 +68,7 @@ test('extractMessagesFromFiles: should extract from multiple files', async () => ] const result = await extractMessagesFromFiles(filePaths, { - parser: {jsx: true, tsx: true, syntax: "typescript"} + parser: {tsx: true, syntax: "typescript"} }) // Sort messages by id for deterministic results @@ -90,7 +90,7 @@ test('extractMessagesFromFiles: should handle non-existent files gracefully', as ] const result = await extractMessagesFromFiles(filePaths, { - parser: {jsx: true, tsx: true, syntax: "typescript"} + parser: {tsx: true, syntax: "typescript"} }) // Sort messages by id for deterministic results From 2ca5921752e124fad6fe686635527757469248db Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Thu, 26 Feb 2026 12:03:34 +0100 Subject: [PATCH 12/34] format --- napi-rs/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/napi-rs/src/lib.rs b/napi-rs/src/lib.rs index ba910db..4162b37 100644 --- a/napi-rs/src/lib.rs +++ b/napi-rs/src/lib.rs @@ -1,11 +1,11 @@ #![deny(clippy::all)] +use anyhow::Result as AnyhowResult; use lingui_extractor::{ExtractionResult, ExtractorOptions}; use napi::bindgen_prelude::*; use napi_derive::napi; use rayon::prelude::*; use std::fs; -use anyhow::Result as AnyhowResult; use swc_core::node::get_deserialized; From e6806c56dace5d2539be9281ac58e9f71bbb3677 Mon Sep 17 00:00:00 2001 From: iatsenko <1586852+timofei-iatsenko@users.noreply.github.com> Date: Thu, 26 Feb 2026 13:15:32 +0100 Subject: [PATCH 13/34] remove js extractor --- babel-plugin-extract-messages/CHANGELOG.md | 383 ------------- babel-plugin-extract-messages/README.md | 54 -- babel-plugin-extract-messages/build.config.ts | 5 - .../dist/index.d.mts | 22 - babel-plugin-extract-messages/dist/index.mjs | 242 -------- babel-plugin-extract-messages/package.json | 57 -- babel-plugin-extract-messages/src/index.ts | 393 ------------- .../extract-messages.test.ts.snap | 527 ------------------ .../test/extract-messages.test.ts | 401 ------------- .../test/fixtures/js-call-expression.js | 26 - .../test/fixtures/js-message-descriptor.js | 25 - .../test/fixtures/js-with-macros.js | 63 --- .../test/fixtures/jsx-with-macros.js | 13 - .../test/fixtures/jsx-without-macros.js | 12 - .../test/fixtures/jsx-without-trans.js | 3 - .../test/fixtures/lingui.config.js | 3 - .../test/fixtures/without-lingui.js | 7 - babel-plugin-extract-messages/tsconfig.json | 12 - .../vitest.config.ts | 10 - 19 files changed, 2258 deletions(-) delete mode 100644 babel-plugin-extract-messages/CHANGELOG.md delete mode 100644 babel-plugin-extract-messages/README.md delete mode 100644 babel-plugin-extract-messages/build.config.ts delete mode 100644 babel-plugin-extract-messages/dist/index.d.mts delete mode 100644 babel-plugin-extract-messages/dist/index.mjs delete mode 100644 babel-plugin-extract-messages/package.json delete mode 100644 babel-plugin-extract-messages/src/index.ts delete mode 100644 babel-plugin-extract-messages/test/__snapshots__/extract-messages.test.ts.snap delete mode 100644 babel-plugin-extract-messages/test/extract-messages.test.ts delete mode 100644 babel-plugin-extract-messages/test/fixtures/js-call-expression.js delete mode 100644 babel-plugin-extract-messages/test/fixtures/js-message-descriptor.js delete mode 100644 babel-plugin-extract-messages/test/fixtures/js-with-macros.js delete mode 100644 babel-plugin-extract-messages/test/fixtures/jsx-with-macros.js delete mode 100644 babel-plugin-extract-messages/test/fixtures/jsx-without-macros.js delete mode 100644 babel-plugin-extract-messages/test/fixtures/jsx-without-trans.js delete mode 100644 babel-plugin-extract-messages/test/fixtures/lingui.config.js delete mode 100644 babel-plugin-extract-messages/test/fixtures/without-lingui.js delete mode 100644 babel-plugin-extract-messages/tsconfig.json delete mode 100644 babel-plugin-extract-messages/vitest.config.ts diff --git a/babel-plugin-extract-messages/CHANGELOG.md b/babel-plugin-extract-messages/CHANGELOG.md deleted file mode 100644 index 7f7b327..0000000 --- a/babel-plugin-extract-messages/CHANGELOG.md +++ /dev/null @@ -1,383 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [5.9.0](https://github.com/lingui/js-lingui/compare/v5.8.0...v5.9.0) (2026-01-23) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [5.8.0](https://github.com/lingui/js-lingui/compare/v5.7.0...v5.8.0) (2026-01-16) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [5.7.0](https://github.com/lingui/js-lingui/compare/v5.6.1...v5.7.0) (2025-12-12) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [5.6.1](https://github.com/lingui/js-lingui/compare/v5.6.0...v5.6.1) (2025-11-28) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [5.6.0](https://github.com/lingui/js-lingui/compare/v5.5.2...v5.6.0) (2025-11-12) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [5.5.2](https://github.com/lingui/js-lingui/compare/v5.5.1...v5.5.2) (2025-10-30) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [5.5.1](https://github.com/lingui/js-lingui/compare/v5.5.0...v5.5.1) (2025-10-10) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [5.5.0](https://github.com/lingui/js-lingui/compare/v5.4.1...v5.5.0) (2025-09-12) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [5.4.1](https://github.com/lingui/js-lingui/compare/v5.4.0...v5.4.1) (2025-08-11) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [5.4.0](https://github.com/lingui/js-lingui/compare/v5.3.3...v5.4.0) (2025-08-01) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [5.3.3](https://github.com/lingui/js-lingui/compare/v5.3.2...v5.3.3) (2025-07-11) - -### Bug Fixes - -* standardize repository field format across all packages ([#2269](https://github.com/lingui/js-lingui/issues/2269)) ([a03a984](https://github.com/lingui/js-lingui/commit/a03a984cdc027ece9902277243f671ca15912adc)) - -## [5.3.2](https://github.com/lingui/js-lingui/compare/v5.3.1...v5.3.2) (2025-05-27) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [5.3.1](https://github.com/lingui/js-lingui/compare/v5.3.0...v5.3.1) (2025-04-14) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [5.3.0](https://github.com/lingui/js-lingui/compare/v5.2.0...v5.3.0) (2025-03-21) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [5.2.0](https://github.com/lingui/js-lingui/compare/v5.1.2...v5.2.0) (2025-01-31) - -### Bug Fixes - -* don't use anything from "@babel/types" in runtime ([#2132](https://github.com/lingui/js-lingui/issues/2132)) ([7ebb88d](https://github.com/lingui/js-lingui/commit/7ebb88dc79846839e0826d073cc0d830c09dda27)) - -## [5.1.2](https://github.com/lingui/js-lingui/compare/v5.1.1...v5.1.2) (2024-12-16) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [5.1.1](https://github.com/lingui/js-lingui/compare/v5.1.0...v5.1.1) (2024-12-16) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [5.1.0](https://github.com/lingui/js-lingui/compare/v5.0.0...v5.1.0) (2024-12-06) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.14.1](https://github.com/lingui/js-lingui/compare/v4.14.0...v4.14.1) (2024-11-28) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.14.0](https://github.com/lingui/js-lingui/compare/v4.13.0...v4.14.0) (2024-11-07) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.13.0](https://github.com/lingui/js-lingui/compare/v4.12.0...v4.13.0) (2024-10-15) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.12.0](https://github.com/lingui/js-lingui/compare/v4.11.4...v4.12.0) (2024-10-11) - -### Features - -- enable importAttributes and explicitResourceManagement for extractor ([#2009](https://github.com/lingui/js-lingui/issues/2009)) ([c20ce12](https://github.com/lingui/js-lingui/commit/c20ce12dbc3edaf476fd745df7e8f8b1390afe95)) - -## [4.11.4](https://github.com/lingui/js-lingui/compare/v4.11.3...v4.11.4) (2024-09-02) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.11.3](https://github.com/lingui/js-lingui/compare/v4.11.2...v4.11.3) (2024-08-09) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.11.2](https://github.com/lingui/js-lingui/compare/v4.11.1...v4.11.2) (2024-07-03) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.11.1](https://github.com/lingui/js-lingui/compare/v4.11.0...v4.11.1) (2024-05-30) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.11.0](https://github.com/lingui/js-lingui/compare/v4.10.1...v4.11.0) (2024-05-17) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.10.1](https://github.com/lingui/js-lingui/compare/v4.10.0...v4.10.1) (2024-05-03) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.10.0](https://github.com/lingui/js-lingui/compare/v4.8.0...v4.10.0) (2024-04-12) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.9.0](https://github.com/lingui/js-lingui/compare/v4.8.0...v4.9.0) (2024-04-12) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.8.0](https://github.com/lingui/js-lingui/compare/v4.7.2...v4.8.0) (2024-04-03) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.7.2](https://github.com/lingui/js-lingui/compare/v4.7.1...v4.7.2) (2024-03-26) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.7.1](https://github.com/lingui/js-lingui/compare/v4.7.0...v4.7.1) (2024-02-20) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.7.0](https://github.com/lingui/js-lingui/compare/v4.6.0...v4.7.0) (2024-01-05) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.6.0](https://github.com/lingui/js-lingui/compare/v4.5.0...v4.6.0) (2023-12-01) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.5.0](https://github.com/lingui/js-lingui/compare/v4.4.2...v4.5.0) (2023-09-14) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.4.2](https://github.com/lingui/js-lingui/compare/v4.4.1...v4.4.2) (2023-08-31) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.4.1](https://github.com/lingui/js-lingui/compare/v4.4.0...v4.4.1) (2023-08-30) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.4.0](https://github.com/lingui/js-lingui/compare/v4.3.0...v4.4.0) (2023-08-08) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.3.0](https://github.com/lingui/js-lingui/compare/v4.2.1...v4.3.0) (2023-06-29) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.2.1](https://github.com/lingui/js-lingui/compare/v4.2.0...v4.2.1) (2023-06-07) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.2.0](https://github.com/lingui/js-lingui/compare/v4.1.2...v4.2.0) (2023-05-26) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.1.2](https://github.com/lingui/js-lingui/compare/v4.1.1...v4.1.2) (2023-05-17) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [4.1.1](https://github.com/lingui/js-lingui/compare/v4.1.0...v4.1.1) (2023-05-17) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [4.1.0](https://github.com/lingui/js-lingui/compare/v4.0.0...v4.1.0) (2023-05-15) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.17.2](https://github.com/lingui/js-lingui/compare/v3.17.1...v3.17.2) (2023-02-24) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.17.1](https://github.com/lingui/js-lingui/compare/v3.17.0...v3.17.1) (2023-02-07) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.17.0](https://github.com/lingui/js-lingui/compare/v3.16.1...v3.17.0) (2023-02-01) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.16.1](https://github.com/lingui/js-lingui/compare/v3.16.0...v3.16.1) (2023-01-24) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.16.0](https://github.com/lingui/js-lingui/compare/v3.15.0...v3.16.0) (2023-01-18) - -### Features - -- allow extract to work with i18n.\_ calls not created from macro ([#1309](https://github.com/lingui/js-lingui/issues/1309)) ([90be171](https://github.com/lingui/js-lingui/commit/90be1719becc4710c910ea16928b7ce41ef9ab19)) - -# [3.15.0](https://github.com/lingui/js-lingui/compare/v3.14.0...v3.15.0) (2022-11-07) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.14.0](https://github.com/lingui/js-lingui/compare/v3.13.3...v3.14.0) (2022-06-22) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.13.3](https://github.com/lingui/js-lingui/compare/v3.13.2...v3.13.3) (2022-04-24) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.13.2](https://github.com/lingui/js-lingui/compare/v3.13.1...v3.13.2) (2022-01-24) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.13.1](https://github.com/lingui/js-lingui/compare/v3.13.0...v3.13.1) (2022-01-21) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.13.0](https://github.com/lingui/js-lingui/compare/v3.12.1...v3.13.0) (2021-11-26) - -### Features - -- add the ability to extract concatenated comments ([#1152](https://github.com/lingui/js-lingui/issues/1152)) ([0e553cf](https://github.com/lingui/js-lingui/commit/0e553cf14f5f6dce87839abed76fd21f351a2eae)) -- msgctxt support ([#1094](https://github.com/lingui/js-lingui/issues/1094)) ([8ee42cb](https://github.com/lingui/js-lingui/commit/8ee42cbfe26bc6d055748dcf2713ab8ade7ec827)) - -## [3.12.1](https://github.com/lingui/js-lingui/compare/v3.12.0...v3.12.1) (2021-09-28) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.12.0](https://github.com/lingui/js-lingui/compare/v3.11.1...v3.12.0) (2021-09-28) - -### Bug Fixes - -- **#1137:** configPath is passed through babel-plugin-extract-messages ([#1140](https://github.com/lingui/js-lingui/issues/1140)) ([8921156](https://github.com/lingui/js-lingui/commit/89211567632733cf9955cafc9c92bd87c6154852)), closes [#1137](https://github.com/lingui/js-lingui/issues/1137) - -## [3.11.1](https://github.com/lingui/js-lingui/compare/v3.11.0...v3.11.1) (2021-09-07) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.11.0](https://github.com/lingui/js-lingui/compare/v3.10.4...v3.11.0) (2021-09-07) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.10.4](https://github.com/lingui/js-lingui/compare/v3.10.3...v3.10.4) (2021-06-16) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.10.3](https://github.com/lingui/js-lingui/compare/v3.10.2...v3.10.3) (2021-06-14) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.10.2](https://github.com/lingui/js-lingui/compare/v3.10.1...v3.10.2) (2021-06-08) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.10.1](https://github.com/lingui/js-lingui/compare/v3.10.0...v3.10.1) (2021-06-08) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.10.0](https://github.com/lingui/js-lingui/compare/v3.9.0...v3.10.0) (2021-06-08) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.9.0](https://github.com/lingui/js-lingui/compare/v3.8.10...v3.9.0) (2021-05-18) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.8.10](https://github.com/lingui/js-lingui/compare/v3.8.9...v3.8.10) (2021-04-19) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.8.9](https://github.com/lingui/js-lingui/compare/v3.8.8...v3.8.9) (2021-04-09) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.8.8](https://github.com/lingui/js-lingui/compare/v3.8.7...v3.8.8) (2021-04-09) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.8.7](https://github.com/lingui/js-lingui/compare/v3.8.6...v3.8.7) (2021-04-09) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.8.6](https://github.com/lingui/js-lingui/compare/v3.8.5...v3.8.6) (2021-04-08) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.8.5](https://github.com/lingui/js-lingui/compare/v3.8.4...v3.8.5) (2021-04-08) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.8.4](https://github.com/lingui/js-lingui/compare/v3.8.3...v3.8.4) (2021-04-08) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.8.3](https://github.com/lingui/js-lingui/compare/v3.8.2...v3.8.3) (2021-04-05) - -### Bug Fixes - -- extract works with template string id's ([#1027](https://github.com/lingui/js-lingui/issues/1027)) ([a17d629](https://github.com/lingui/js-lingui/commit/a17d629d82395cd86cc080648ef2ebe2a9653225)) - -## [3.8.2](https://github.com/lingui/js-lingui/compare/v3.8.1...v3.8.2) (2021-03-31) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.8.1](https://github.com/lingui/js-lingui/compare/v3.8.0...v3.8.1) (2021-03-23) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.8.0](https://github.com/lingui/js-lingui/compare/v3.7.2...v3.8.0) (2021-03-23) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.7.2](https://github.com/lingui/js-lingui/compare/v3.7.1...v3.7.2) (2021-03-14) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.7.1](https://github.com/lingui/js-lingui/compare/v3.7.0...v3.7.1) (2021-03-07) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.7.0](https://github.com/lingui/js-lingui/compare/v3.6.0...v3.7.0) (2021-03-04) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.6.0](https://github.com/lingui/js-lingui/compare/v3.5.1...v3.6.0) (2021-02-23) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.5.1](https://github.com/lingui/js-lingui/compare/v3.5.0...v3.5.1) (2021-02-09) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.5.0](https://github.com/lingui/js-lingui/compare/v3.4.0...v3.5.0) (2021-02-02) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.4.0](https://github.com/lingui/js-lingui/compare/v3.3.0...v3.4.0) (2021-01-13) - -### Bug Fixes - -- prevent adding undefined msgid to messages ([#915](https://github.com/lingui/js-lingui/issues/915)) ([3afacec](https://github.com/lingui/js-lingui/commit/3afaceccb669b59ee2f5b42ee2e138646ccdb79d)) - -# [3.3.0](https://github.com/lingui/js-lingui/compare/v3.2.3...v3.3.0) (2020-12-08) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.2.3](https://github.com/lingui/js-lingui/compare/v3.2.2...v3.2.3) (2020-11-22) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -## [3.2.2](https://github.com/lingui/js-lingui/compare/v3.2.1...v3.2.2) (2020-11-20) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages - -# [3.2.0](https://github.com/lingui/js-lingui/compare/v3.1.0...v3.2.0) (2020-11-12) - -### Bug Fixes - -- t macro as function not extracting ([#846](https://github.com/lingui/js-lingui/issues/846)) ([d819bfc](https://github.com/lingui/js-lingui/commit/d819bfc74707a8766bfe1b1a3d43edce97f8f265)) - -### Features - -- extract multiple comments per translation ID ([#854](https://github.com/lingui/js-lingui/issues/854)) ([c849c9c](https://github.com/lingui/js-lingui/commit/c849c9c024832aa7b07e5f837791e287c3aebe29)) - -# [3.1.0](https://github.com/lingui/js-lingui/compare/v3.0.3...v3.1.0) (2020-11-10) - -**Note:** Version bump only for package @lingui/babel-plugin-extract-messages diff --git a/babel-plugin-extract-messages/README.md b/babel-plugin-extract-messages/README.md deleted file mode 100644 index 937212f..0000000 --- a/babel-plugin-extract-messages/README.md +++ /dev/null @@ -1,54 +0,0 @@ -[![License][badge-license]][license] -[![Version][badge-version]][package] -[![Downloads][badge-downloads]][package] - -# @lingui/babel-plugin-extract-messages - -> Babel plugin which extracts messages for translation from source files - -`@lingui/babel-plugin-extract-messages` is part of [LinguiJS][linguijs]. See the [documentation][documentation] for all information, tutorials and examples. - -## Installation - -```sh -npm install --save-dev @lingui/babel-plugin-extract-messages -# yarn add --dev @lingui/babel-plugin-extract-messages -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["@lingui/babel-plugin-extract-messages"] -} -``` - -### Via CLI - -```bash -babel --plugins @lingui/babel-plugin-extract-messages script.js -``` - -### Via Node API - -```js -require("@babel/core").transform("code", { - plugins: ["@lingui/babel-plugin-extract-messages"] -}) -``` - -## License - -[MIT][license] - -[license]: https://github.com/lingui/js-lingui/blob/main/LICENSE -[linguijs]: https://github.com/lingui/js-lingui -[documentation]: https://lingui.dev -[package]: https://www.npmjs.com/package/@lingui/babel-plugin-extract-messages -[badge-downloads]: https://img.shields.io/npm/dw/@lingui/babel-plugin-extract-messages.svg -[badge-version]: https://img.shields.io/npm/v/@lingui/babel-plugin-extract-messages.svg -[badge-license]: https://img.shields.io/npm/l/@lingui/babel-plugin-extract-messages.svg diff --git a/babel-plugin-extract-messages/build.config.ts b/babel-plugin-extract-messages/build.config.ts deleted file mode 100644 index 602da13..0000000 --- a/babel-plugin-extract-messages/build.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { defineBuildConfig } from "unbuild" - -export default defineBuildConfig({ - externals: ["@babel/core", "@babel/types", "@babel/traverse"], -}) diff --git a/babel-plugin-extract-messages/dist/index.d.mts b/babel-plugin-extract-messages/dist/index.d.mts deleted file mode 100644 index b87c60f..0000000 --- a/babel-plugin-extract-messages/dist/index.d.mts +++ /dev/null @@ -1,22 +0,0 @@ -import * as BabelTypesNamespace from '@babel/types'; -import { PluginObj } from '@babel/core'; - -type BabelTypes = typeof BabelTypesNamespace; -type ExtractedMessage = { - id: string; - message?: string; - context?: string; - origin?: Origin; - comment?: string; - placeholders?: Record; -}; -type ExtractPluginOpts = { - onMessageExtracted(msg: ExtractedMessage): void; -}; -type Origin = [filename: string, line: number, column?: number]; -declare function export_default({ types: t }: { - types: BabelTypes; -}): PluginObj; - -export { export_default as default }; -export type { ExtractPluginOpts, ExtractedMessage, Origin }; diff --git a/babel-plugin-extract-messages/dist/index.mjs b/babel-plugin-extract-messages/dist/index.mjs deleted file mode 100644 index 9b40d7e..0000000 --- a/babel-plugin-extract-messages/dist/index.mjs +++ /dev/null @@ -1,242 +0,0 @@ -function collectMessage(path, props, ctx) { - if (props.id === void 0) return; - const node = path.node; - const line = node.loc ? node.loc.start.line : void 0; - const column = node.loc ? node.loc.start.column : void 0; - ctx.opts.onMessageExtracted({ - id: props.id, - message: props.message, - context: props.context, - comment: props.comment, - placeholders: props.placeholders || {}, - origin: ctx.file.opts.filename ? [ctx.file.opts.filename, line, column] : void 0 - }); -} -function getTextFromExpression(t, exp, hub, emitErrorOnVariable = true) { - if (t.isStringLiteral(exp)) { - return exp.value; - } - if (t.isBinaryExpression(exp)) { - return getTextFromExpression( - t, - exp.left, - hub, - emitErrorOnVariable - ) + getTextFromExpression( - t, - exp.right, - hub, - emitErrorOnVariable - ); - } - if (t.isTemplateLiteral(exp)) { - if (exp?.quasis.length > 1) { - console.warn( - hub.buildError( - exp, - "Could not extract from template literal with expressions.", - SyntaxError - ).message - ); - return ""; - } - return exp.quasis[0]?.value?.cooked || ""; - } - if (emitErrorOnVariable) { - console.warn( - hub.buildError( - exp, - "Only strings or template literals could be extracted.", - SyntaxError - ).message - ); - } - return ""; -} -function getNodeSource(fileContents, node) { - return fileContents.slice(node.start, node.end); -} -function valuesObjectExpressionToPlaceholdersRecord(t, exp, hub) { - const props = {}; - exp.properties.forEach(({ key, value }, i) => { - let name; - if (t.isStringLiteral(key) || t.isNumericLiteral(key)) { - name = key.value.toString(); - } else if (t.isIdentifier(key)) { - name = key.name; - } else { - console.warn( - hub.buildError( - exp, - `Could not extract values to placeholders. The key #${i} has unsupported syntax`, - SyntaxError - ).message - ); - } - if (name) { - props[name] = getNodeSource(hub.getCode(), value); - } - }); - return props; -} -function extractFromObjectExpression(t, exp, hub) { - const props = {}; - const textKeys = ["id", "message", "comment", "context"]; - exp.properties.forEach(({ key, value }, i) => { - const name = key.name; - if (name === "values" && t.isObjectExpression(value)) { - props.placeholders = valuesObjectExpressionToPlaceholdersRecord( - t, - value, - hub - ); - } else if (textKeys.includes(name)) { - props[name] = getTextFromExpression( - t, - value, - hub - ); - } - }); - return props; -} -const I18N_OBJECT = "i18n"; -function hasComment(node, comment) { - return !!node.leadingComments?.some((comm) => comm.value.trim() === comment); -} -function hasIgnoreComment(node) { - return hasComment(node, "lingui-extract-ignore"); -} -function hasI18nComment(node) { - return hasComment(node, "i18n"); -} -function index({ types: t }) { - function isTransComponent(path) { - return path.isJSXElement() && path.get("openingElement").get("name").referencesImport("@lingui/react", "Trans"); - } - const isI18nMethod = (node) => t.isMemberExpression(node) && (t.isIdentifier(node.object, { name: I18N_OBJECT }) || t.isMemberExpression(node.object) && t.isIdentifier(node.object.property, { name: I18N_OBJECT })) && (t.isIdentifier(node.property, { name: "_" }) || t.isIdentifier(node.property, { name: "t" })); - const extractFromMessageDescriptor = (path, ctx) => { - const props = extractFromObjectExpression(t, path.node, ctx.file.hub); - if (!props.id) { - console.warn( - path.buildCodeFrameError("Missing message ID, skipping.").message - ); - return; - } - collectMessage(path, props, ctx); - }; - return { - visitor: { - // Extract translation from component. - JSXElement(path, ctx) { - const { node } = path; - if (!isTransComponent(path)) return; - const attrs = node.openingElement.attributes || []; - if (attrs.find( - (attr) => t.isJSXSpreadAttribute(attr) && hasI18nComment(attr.argument) - )) { - return; - } - const props = attrs.reduce((acc, item) => { - if (t.isJSXSpreadAttribute(item)) { - return acc; - } - const key = item.name.name; - if (key === "id" || key === "message" || key === "comment" || key === "context") { - if (t.isStringLiteral(item.value)) { - acc[key] = item.value.value; - } else if (t.isJSXExpressionContainer(item.value) && t.isStringLiteral(item.value.expression)) { - acc[key] = item.value.expression.value; - } - } - if (key === "values" && t.isJSXExpressionContainer(item.value) && t.isObjectExpression(item.value.expression)) { - acc.placeholders = valuesObjectExpressionToPlaceholdersRecord( - t, - item.value.expression, - ctx.file.hub - ); - } - return acc; - }, {}); - if (!props.id) { - const idProp = attrs.filter( - (item) => t.isJSXAttribute(item) && item.name.name === "id" - )[0]; - if (idProp === void 0 || t.isLiteral(props.id)) { - console.warn( - path.buildCodeFrameError("Missing message ID, skipping.").message - ); - } - return; - } - collectMessage(path, props, ctx); - }, - CallExpression(path, ctx) { - if ([path.node, path.parent].some((node) => hasIgnoreComment(node))) { - return; - } - const firstArgument = path.get("arguments")[0]; - if (!isI18nMethod(path.node.callee)) { - return; - } - if (hasI18nComment(firstArgument.node)) { - return; - } - if (firstArgument.isObjectExpression()) { - extractFromMessageDescriptor(firstArgument, ctx); - return; - } else { - let props = { - id: getTextFromExpression( - t, - firstArgument.node, - ctx.file.hub, - false - ) - }; - if (!props.id) { - return; - } - const secondArgument = path.node.arguments[1]; - if (secondArgument && t.isObjectExpression(secondArgument)) { - props.placeholders = valuesObjectExpressionToPlaceholdersRecord( - t, - secondArgument, - ctx.file.hub - ); - } - const msgDescArg = path.node.arguments[2]; - if (t.isObjectExpression(msgDescArg)) { - props = { - ...props, - ...extractFromObjectExpression(t, msgDescArg, ctx.file.hub) - }; - } - collectMessage(path, props, ctx); - } - }, - StringLiteral(path, ctx) { - if (!hasI18nComment(path.node)) { - return; - } - const props = { - id: path.node.value - }; - if (!props.id) { - console.warn( - path.buildCodeFrameError("Empty StringLiteral, skipping.").message - ); - return; - } - collectMessage(path, props, ctx); - }, - // Extract message descriptors - ObjectExpression(path, ctx) { - if (!hasI18nComment(path.node)) return; - extractFromMessageDescriptor(path, ctx); - } - } - }; -} - -export { index as default }; diff --git a/babel-plugin-extract-messages/package.json b/babel-plugin-extract-messages/package.json deleted file mode 100644 index e4a78da..0000000 --- a/babel-plugin-extract-messages/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "@lingui/babel-plugin-extract-messages", - "version": "5.9.0", - "description": "Babel plugin for collecting messages from source code for internationalization", - "type": "module", - "author": { - "name": "Tomáš Ehrlich", - "email": "tomas.ehrlich@gmail.com" - }, - "license": "MIT", - "keywords": [ - "babel-plugin", - "i18n", - "internationalization", - "i10n", - "localization", - "i9n", - "translation", - "multilingual" - ], - "scripts": { - "build": "unbuild", - "check-types": "tsc --noEmit" - }, - "files": [ - "LICENSE", - "README.md", - "dist/" - ], - "exports": { - ".": "./dist/index.mjs" - }, - "homepage": "https://lingui.dev", - "repository": { - "type": "git", - "url": "git+https://github.com/lingui/js-lingui.git", - "directory": "packages/babel-plugin-extract-messages" - }, - "bugs": { - "url": "https://github.com/lingui/js-lingui/issues" - }, - "engines": { - "node": ">=20.0.0" - }, - "devDependencies": { - "@babel/core": "^7.21.0", - "@babel/traverse": "^7.20.12", - "@babel/types": "^7.20.7", - "@lingui/babel-plugin-lingui-macro": "workspace:*", - "@lingui/test-utils": "workspace:*", - "unbuild": "3.6.1", - "vitest": "4.0.18" - }, - "unbuild": { - "declaration": "node16" - } -} diff --git a/babel-plugin-extract-messages/src/index.ts b/babel-plugin-extract-messages/src/index.ts deleted file mode 100644 index 90d049e..0000000 --- a/babel-plugin-extract-messages/src/index.ts +++ /dev/null @@ -1,393 +0,0 @@ -import type * as BabelTypesNamespace from "@babel/types" -import type { - Expression, - Identifier, - Node, - ObjectExpression, - ObjectProperty, -} from "@babel/types" -import type { PluginObj, PluginPass, NodePath } from "@babel/core" -import type { Hub } from "@babel/traverse" - -type BabelTypes = typeof BabelTypesNamespace - -export type ExtractedMessage = { - id: string - - message?: string - context?: string - origin?: Origin - - comment?: string - placeholders?: Record -} - -export type ExtractPluginOpts = { - onMessageExtracted(msg: ExtractedMessage): void -} - -type RawMessage = { - id?: string - message?: string - comment?: string - context?: string - placeholders?: Record -} - -export type Origin = [filename: string, line: number, column?: number] - -function collectMessage( - path: NodePath, - props: RawMessage, - ctx: PluginPass, -) { - // prevent from adding undefined msgid - if (props.id === undefined) return - - const node: Node = path.node - - const line = node.loc ? node.loc.start.line : undefined - const column = node.loc ? node.loc.start.column : undefined - - ;(ctx.opts as ExtractPluginOpts).onMessageExtracted({ - id: props.id, - message: props.message, - context: props.context, - comment: props.comment, - placeholders: props.placeholders || {}, - origin: ctx.file.opts.filename - ? ([ctx.file.opts.filename, line, column] as Origin) - : undefined, - }) -} - -function getTextFromExpression( - t: BabelTypes, - exp: Expression, - hub: Hub, - emitErrorOnVariable = true, -): string { - if (t.isStringLiteral(exp)) { - return exp.value - } - - if (t.isBinaryExpression(exp)) { - return ( - getTextFromExpression( - t, - exp.left as Expression, - hub, - emitErrorOnVariable, - ) + - getTextFromExpression( - t, - exp.right as Expression, - hub, - emitErrorOnVariable, - ) - ) - } - - if (t.isTemplateLiteral(exp)) { - if (exp?.quasis.length > 1) { - console.warn( - hub.buildError( - exp, - "Could not extract from template literal with expressions.", - SyntaxError, - ).message, - ) - return "" - } - - return exp.quasis[0]?.value?.cooked || "" - } - - if (emitErrorOnVariable) { - console.warn( - hub.buildError( - exp, - "Only strings or template literals could be extracted.", - SyntaxError, - ).message, - ) - } - - return "" -} - -function getNodeSource(fileContents: string, node: Node) { - return fileContents.slice(node.start!, node.end!) -} - -function valuesObjectExpressionToPlaceholdersRecord( - t: BabelTypes, - exp: ObjectExpression, - hub: Hub, -) { - const props: Record = {} - - ;(exp.properties as ObjectProperty[]).forEach(({ key, value }, i) => { - let name: string | undefined - - if (t.isStringLiteral(key) || t.isNumericLiteral(key)) { - name = key.value.toString() - } else if (t.isIdentifier(key)) { - name = key.name - } else { - console.warn( - hub.buildError( - exp, - `Could not extract values to placeholders. The key #${i} has unsupported syntax`, - SyntaxError, - ).message, - ) - } - - if (name) { - props[name] = getNodeSource(hub.getCode()!, value) - } - }) - - return props -} - -function extractFromObjectExpression( - t: BabelTypes, - exp: ObjectExpression, - hub: Hub, -) { - const props: RawMessage = {} - - const textKeys = ["id", "message", "comment", "context"] as const - - ;(exp.properties as ObjectProperty[]).forEach(({ key, value }, i) => { - const name = (key as Identifier).name - - if (name === "values" && t.isObjectExpression(value)) { - props.placeholders = valuesObjectExpressionToPlaceholdersRecord( - t, - value, - hub, - ) - } else if (textKeys.includes(name as any)) { - props[name as (typeof textKeys)[number]] = getTextFromExpression( - t, - value as Expression, - hub, - ) - } - }) - - return props -} - -const I18N_OBJECT = "i18n" - -function hasComment(node: Node, comment: string): boolean { - return !!node.leadingComments?.some((comm) => comm.value.trim() === comment) -} - -function hasIgnoreComment(node: Node): boolean { - return hasComment(node, "lingui-extract-ignore") -} - -function hasI18nComment(node: Node): boolean { - return hasComment(node, "i18n") -} - -export default function ({ types: t }: { types: BabelTypes }): PluginObj { - function isTransComponent(path: NodePath) { - return ( - path.isJSXElement() && - path - .get("openingElement") - .get("name") - .referencesImport("@lingui/react", "Trans") - ) - } - - const isI18nMethod = (node: Node) => - t.isMemberExpression(node) && - (t.isIdentifier(node.object, { name: I18N_OBJECT }) || - (t.isMemberExpression(node.object) && - t.isIdentifier(node.object.property, { name: I18N_OBJECT }))) && - (t.isIdentifier(node.property, { name: "_" }) || - t.isIdentifier(node.property, { name: "t" })) - - const extractFromMessageDescriptor = ( - path: NodePath, - ctx: PluginPass, - ) => { - const props = extractFromObjectExpression(t, path.node, ctx.file.hub) - - if (!props.id) { - console.warn( - path.buildCodeFrameError("Missing message ID, skipping.").message, - ) - return - } - - collectMessage(path, props, ctx) - } - - return { - visitor: { - // Extract translation from component. - JSXElement(path, ctx) { - const { node } = path - if (!isTransComponent(path)) return - - const attrs = node.openingElement.attributes || [] - - if ( - attrs.find( - (attr) => - t.isJSXSpreadAttribute(attr) && hasI18nComment(attr.argument), - ) - ) { - return - } - - const props = attrs.reduce((acc, item) => { - if (t.isJSXSpreadAttribute(item)) { - return acc - } - - const key = item.name.name - if ( - key === "id" || - key === "message" || - key === "comment" || - key === "context" - ) { - if (t.isStringLiteral(item.value)) { - acc[key] = item.value.value - } else if ( - t.isJSXExpressionContainer(item.value) && - t.isStringLiteral(item.value.expression) - ) { - acc[key] = item.value.expression.value - } - } - - if ( - key === "values" && - t.isJSXExpressionContainer(item.value) && - t.isObjectExpression(item.value.expression) - ) { - acc.placeholders = valuesObjectExpressionToPlaceholdersRecord( - t, - item.value.expression, - ctx.file.hub, - ) - } - - return acc - }, {}) - - if (!props.id) { - // is valid, don't raise warning - const idProp = attrs.filter( - (item) => t.isJSXAttribute(item) && item.name.name === "id", - )[0] - if (idProp === undefined || t.isLiteral(props.id as any)) { - console.warn( - path.buildCodeFrameError("Missing message ID, skipping.").message, - ) - } - return - } - - collectMessage(path, props, ctx) - }, - - CallExpression(path, ctx) { - if ([path.node, path.parent].some((node) => hasIgnoreComment(node))) { - return - } - - const firstArgument = path.get("arguments")[0] - - // i18n._(...) - if (!isI18nMethod(path.node.callee)) { - return - } - - // call with explicit annotation - // i18n._(/*i18n*/ {descriptor}) - // skipping this as it is processed - // by ObjectExpression visitor - if (hasI18nComment(firstArgument.node)) { - return - } - - if (firstArgument.isObjectExpression()) { - // i8n._({message, id, context}) - extractFromMessageDescriptor(firstArgument, ctx) - return - } else { - // i18n._(id, variables, descriptor) - let props: RawMessage = { - id: getTextFromExpression( - t, - firstArgument.node as Expression, - ctx.file.hub, - false, - ), - } - - if (!props.id) { - return - } - - const secondArgument = path.node.arguments[1] - if (secondArgument && t.isObjectExpression(secondArgument)) { - props.placeholders = valuesObjectExpressionToPlaceholdersRecord( - t, - secondArgument, - ctx.file.hub, - ) - } - - const msgDescArg = path.node.arguments[2] - - if (t.isObjectExpression(msgDescArg)) { - props = { - ...props, - ...extractFromObjectExpression(t, msgDescArg, ctx.file.hub), - } - } - - collectMessage(path, props, ctx) - } - }, - - StringLiteral(path, ctx) { - if (!hasI18nComment(path.node)) { - return - } - - const props = { - id: path.node.value, - } - - if (!props.id) { - console.warn( - path.buildCodeFrameError("Empty StringLiteral, skipping.").message, - ) - return - } - - collectMessage(path, props, ctx) - }, - - // Extract message descriptors - ObjectExpression(path, ctx) { - if (!hasI18nComment(path.node)) return - - extractFromMessageDescriptor(path, ctx) - }, - }, - } -} diff --git a/babel-plugin-extract-messages/test/__snapshots__/extract-messages.test.ts.snap b/babel-plugin-extract-messages/test/__snapshots__/extract-messages.test.ts.snap deleted file mode 100644 index 265796b..0000000 --- a/babel-plugin-extract-messages/test/__snapshots__/extract-messages.test.ts.snap +++ /dev/null @@ -1,527 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`@lingui/babel-plugin-extract-messages > CallExpression i18n._() > should extract messages from i18n._ call expressions 1`] = ` -[ - { - "comment": undefined, - "context": undefined, - "id": "Message", - "message": undefined, - "origin": [ - "js-call-expression.js", - 1, - ], - "placeholders": {}, - }, - { - "comment": "description", - "context": undefined, - "id": "Description", - "message": undefined, - "origin": [ - "js-call-expression.js", - 3, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "ID", - "message": "Message with id", - "origin": [ - "js-call-expression.js", - 5, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "Values {param}", - "message": undefined, - "origin": [ - "js-call-expression.js", - 7, - ], - "placeholders": { - "param": "param", - }, - }, - { - "comment": undefined, - "context": "Context1", - "id": "Some id", - "message": undefined, - "origin": [ - "js-call-expression.js", - 9, - ], - "placeholders": {}, - }, - { - "comment": "My comment", - "context": undefined, - "id": "my.id", - "message": "My Id Message", - "origin": [ - "js-call-expression.js", - 12, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "Aliased Message", - "message": undefined, - "origin": [ - "js-call-expression.js", - 19, - ], - "placeholders": {}, - }, - { - "comment": "My comment", - "context": undefined, - "id": "my.id", - "message": "My Id Message", - "origin": [ - "js-call-expression.js", - 22, - ], - "placeholders": {}, - }, -] -`; - -exports[`@lingui/babel-plugin-extract-messages > MessageDescriptor > should extract messages from MessageDescriptors 1`] = ` -[ - { - "comment": undefined, - "context": undefined, - "id": "Message", - "message": undefined, - "origin": [ - "js-message-descriptor.js", - 1, - ], - "placeholders": {}, - }, - { - "comment": "description", - "context": undefined, - "id": "Description", - "message": undefined, - "origin": [ - "js-message-descriptor.js", - 3, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "ID", - "message": "Message with id", - "origin": [ - "js-message-descriptor.js", - 5, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "Values {param} {0} {name} {value}", - "message": undefined, - "origin": [ - "js-message-descriptor.js", - 7, - ], - "placeholders": { - "0": "user.getName()", - "name": ""foo"", - "param": "param", - "value": "user - ? user.name - : null", - }, - }, - { - "comment": undefined, - "context": undefined, - "id": "Values {param} {0}", - "message": undefined, - "origin": [ - "js-message-descriptor.js", - 23, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": "Context1", - "id": "Some id", - "message": undefined, - "origin": [ - "js-message-descriptor.js", - 25, - ], - "placeholders": {}, - }, -] -`; - -exports[`@lingui/babel-plugin-extract-messages > should extract Plural messages from JSX files when there's no Trans tag (integration) 1`] = ` -[ - { - "comment": undefined, - "context": undefined, - "id": "esnaQO", - "message": "{count, plural, one {# book} other {# books}}", - "origin": [ - "jsx-without-trans.js", - 2, - ], - "placeholders": { - "count": "count", - }, - }, - { - "comment": undefined, - "context": "Some context", - "id": "8qNz-K", - "message": "{count, plural, one {# book} other {# books}}", - "origin": [ - "jsx-without-trans.js", - 3, - ], - "placeholders": { - "count": "count", - }, - }, -] -`; - -exports[`@lingui/babel-plugin-extract-messages > should extract all messages from JS files (macros) 1`] = ` -[ - { - "comment": undefined, - "context": undefined, - "id": "xDAtGP", - "message": "Message", - "origin": [ - "js-with-macros.js", - 4, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "xDAtGP", - "message": "Message", - "origin": [ - "js-with-macros.js", - 6, - ], - "placeholders": {}, - }, - { - "comment": "description", - "context": undefined, - "id": "Nu4oKW", - "message": "Description", - "origin": [ - "js-with-macros.js", - 8, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "ID", - "message": "Message with id", - "origin": [ - "js-with-macros.js", - 13, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "QCVtWw", - "message": "Values {param}", - "origin": [ - "js-with-macros.js", - 18, - ], - "placeholders": { - "param": "param", - }, - }, - { - "comment": undefined, - "context": undefined, - "id": "ID Some", - "message": "Message with id some", - "origin": [ - "js-with-macros.js", - 20, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "Backtick", - "message": undefined, - "origin": [ - "js-with-macros.js", - 25, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": "Context1", - "id": "Some ID", - "message": undefined, - "origin": [ - "js-with-macros.js", - 29, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": "Context1", - "id": "Some other ID", - "message": undefined, - "origin": [ - "js-with-macros.js", - 34, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": "Context2", - "id": "Some ID", - "message": undefined, - "origin": [ - "js-with-macros.js", - 39, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": "Context2", - "id": "Some ID", - "message": undefined, - "origin": [ - "js-with-macros.js", - 44, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "sD7MQ4", - "message": "TplLiteral", - "origin": [ - "js-with-macros.js", - 49, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "VO4BJY", - "message": "[useLingui]: TplLiteral", - "origin": [ - "js-with-macros.js", - 54, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "ZxxjOE", - "message": "[useLingui]: Text {0, plural, offset:1 =0 {No books} =1 {1 book} other {# books}}", - "origin": [ - "js-with-macros.js", - 57, - ], - "placeholders": { - "0": "users.length", - }, - }, -] -`; - -exports[`@lingui/babel-plugin-extract-messages > should extract all messages from JSX files (macros) 1`] = ` -[ - { - "comment": undefined, - "context": undefined, - "id": "d1Kdl3", - "message": "Hi, my name is {name}", - "origin": [ - "jsx-with-macros.js", - 3, - ], - "placeholders": { - "name": "name", - }, - }, - { - "comment": undefined, - "context": "Context1", - "id": "YikuIL", - "message": "Some message", - "origin": [ - "jsx-with-macros.js", - 4, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": "Context1", - "id": "LBCs5C", - "message": "Some other message", - "origin": [ - "jsx-with-macros.js", - 5, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": "Context2", - "id": "ru2rzr", - "message": "Some message", - "origin": [ - "jsx-with-macros.js", - 6, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "MHrjPM", - "message": "Title", - "origin": [ - "jsx-with-macros.js", - 7, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "esnaQO", - "message": "{count, plural, one {# book} other {# books}}", - "origin": [ - "jsx-with-macros.js", - 9, - ], - "placeholders": { - "count": "count", - }, - }, -] -`; - -exports[`@lingui/babel-plugin-extract-messages > should extract all messages from JSX files 1`] = ` -[ - { - "comment": "Description", - "context": undefined, - "id": "msg.hello", - "message": undefined, - "origin": [ - "jsx-without-macros.js", - 5, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": "Context1", - "id": "msg.context", - "message": undefined, - "origin": [ - "jsx-without-macros.js", - 6, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": "Context1", - "id": "msg.notcontext", - "message": undefined, - "origin": [ - "jsx-without-macros.js", - 7, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": "Context2", - "id": "msg.context", - "message": undefined, - "origin": [ - "jsx-without-macros.js", - 8, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "msg.default", - "message": "Hello World", - "origin": [ - "jsx-without-macros.js", - 9, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "msg.default", - "message": "Hello World", - "origin": [ - "jsx-without-macros.js", - 10, - ], - "placeholders": {}, - }, - { - "comment": undefined, - "context": undefined, - "id": "Hi, my name is <0>{name}", - "message": undefined, - "origin": [ - "jsx-without-macros.js", - 11, - ], - "placeholders": { - "count": "count", - }, - }, -] -`; diff --git a/babel-plugin-extract-messages/test/extract-messages.test.ts b/babel-plugin-extract-messages/test/extract-messages.test.ts deleted file mode 100644 index 9936235..0000000 --- a/babel-plugin-extract-messages/test/extract-messages.test.ts +++ /dev/null @@ -1,401 +0,0 @@ -import path from "path" -import fs from "fs" -import { transform as babelTransform } from "@babel/core" -import plugin, { ExtractedMessage, ExtractPluginOpts } from "../src/index" -import { mockConsole } from "@lingui/test-utils" -import linguiMacroPlugin, { - type LinguiPluginOpts, -} from "@lingui/babel-plugin-lingui-macro" - -const transform = (filename: string) => { - const rootDir = path.join(__dirname, "fixtures") - - const filePath = path.join(rootDir, filename) - const code = fs.readFileSync(filePath).toString() - - return transformCode(code, filePath, rootDir) -} - -const transformCode = ( - code: string, - filename = "test-case.js", - rootDir = ".", -) => { - process.env.LINGUI_CONFIG = path.join( - __dirname, - "fixtures", - "lingui.config.js", - ) - const messages: ExtractedMessage[] = [] - - try { - const pluginOpts: ExtractPluginOpts = { - onMessageExtracted(msg: ExtractedMessage) { - const filename = path.relative(rootDir, msg.origin![0]) - messages.push({ - ...msg, - origin: [filename, msg.origin![1]], - }) - }, - } - - babelTransform(code, { - configFile: false, - filename, - plugins: [ - "@babel/plugin-syntax-jsx", - [ - linguiMacroPlugin, - { - extract: true, - } satisfies LinguiPluginOpts, - ], - [plugin, pluginOpts], - ], - }) - } finally { - process.env.LINGUI_CONFIG = undefined - } - - return messages -} - -function expectNoConsole(cb: () => void) { - return mockConsole((console) => { - cb() - - expect(console.warn).not.toBeCalled() - expect(console.error).not.toBeCalled() - }) -} - -describe("@lingui/babel-plugin-extract-messages", function () { - it("should ignore files without lingui import", () => { - expectNoConsole(() => { - const messages = transform("without-lingui.js") - expect(messages.length).toBe(0) - }) - }) - - it("should extract all messages from JSX files", () => { - expectNoConsole(() => { - const messages = transform("jsx-without-macros.js") - expect(messages).toMatchSnapshot() - }) - }) - - describe("JSX", () => { - it("Should not rise warning when translation from variable", () => { - const code = ` -import { Trans } from "@lingui/react"; - -; -; - ` - expectNoConsole(() => { - const messages = transformCode(code) - expect(messages.length).toBe(0) - }) - }) - - it("Should not rise warning when `key` used with macro", () => { - const code = ` -import { Trans } from "@lingui/react/macro"; - - - Some message - - ` - expectNoConsole(() => { - const messages = transformCode(code) - expect(messages.length).toBe(1) - }) - }) - - it("Should log error when no ID provided", () => { - const code = ` -import { Trans } from "@lingui/react"; - -; -; - ` - mockConsole((console) => { - const messages = transformCode(code) - - expect(messages.length).toBe(0) - expect(console.error).not.toBeCalled() - expect(console.warn).toBeCalledWith( - expect.stringContaining(`Missing message ID`), - ) - }) - }) - }) - - describe("CallExpression i18n._()", () => { - it("should extract messages from i18n._ call expressions", () => { - expectNoConsole(() => { - const messages = transform("js-call-expression.js") - expect(messages).toMatchSnapshot() - }) - }) - - it("should extract from member access expressions", () => { - const code = ` - // member access - ctx.i18n._("Message") - - // member access any depth - ctx.req.i18n._("Message") - ` - expectNoConsole(() => { - const messages = transformCode(code) - expect(messages.length).toBe(2) - }) - }) - - it("should not extract from random i18n members", () => { - const code = ` - i18n.load("Message") - ` - expectNoConsole(() => { - const messages = transformCode(code) - expect(messages.length).toBe(0) - }) - }) - - it("should not extract if disabled via annotation", () => { - const code = ` - /* lingui-extract-ignore */ - i18n._("Message") - - /* lingui-extract-ignore */ - ctx.i18n._("Message") - - /* lingui-extract-ignore */ - ctx.req.i18n._("Message") - ` - expectNoConsole(() => { - const messages = transformCode(code) - expect(messages.length).toBe(0) - }) - }) - - it("Should not rise warning when translation from variable", () => { - const code = ` - i18n._(message); - // member expression - i18n._(foo.bar); - // function call - i18n._(getMessage()); - ` - - expectNoConsole(() => { - const messages = transformCode(code) - expect(messages.length).toBe(0) - }) - }) - - it("Should throw error when not a string provided as comment", () => { - const code = `const msg = i18n._('message.id', {}, {comment: variable})` - - return mockConsole((console) => { - transformCode(code) - - expect(console.error).not.toBeCalled() - expect(console.warn).toBeCalledWith( - expect.stringContaining( - "Only strings or template literals could be extracted.", - ), - ) - }) - }) - - it("Should support extract id from TplLiteral and Concatenation", () => { - const code = ` - const msg = i18n._(\`message.id\`); - const msg2 = i18n._("second" + '.' + "id") - ` - - expectNoConsole(() => { - const messages = transformCode(code) - expect(messages[0]).toMatchObject({ - id: "message.id", - }) - expect(messages[1]).toMatchObject({ - id: "second.id", - }) - }) - }) - - it("Should support string concatenation", () => { - const code = `const msg = i18n._('message.id', {}, {comment: "first " + "second " + "third"})` - - expectNoConsole(() => { - const messages = transformCode(code) - expect(messages[0]).toMatchObject({ - comment: "first second third", - }) - }) - }) - - it("Should not double extract from call generated by macro and dont rise warnings", () => { - const code = `import { i18n } from "@lingui/core"; - const msg = - i18n._(/*i18n*/ - { - id: "Hello {name}", - values: { - name: name, - }, - }); - ` - expectNoConsole(() => { - const messages = transformCode(code) - expect(messages.length).toBe(1) - }) - }) - }) - - describe("StringLiteral", () => { - it("Should extract from marked StringLiteral", () => { - const code = `const t = /*i18n*/'Message'` - - expectNoConsole(() => { - const messages = transformCode(code) - - expect(messages[0]).toMatchObject({ - id: "Message", - }) - }) - }) - - it("Should log error when empty StringLiteral marked for extraction", () => { - const code = `const t = /*i18n*/''` - - return mockConsole((console) => { - const messages = transformCode(code) - - expect(messages.length).toBe(0) - expect(console.error).not.toBeCalled() - expect(console.warn).toBeCalledWith( - expect.stringContaining(`Empty StringLiteral`), - ) - }) - }) - }) - - describe("MessageDescriptor", () => { - it("should extract messages from MessageDescriptors", () => { - expectNoConsole(() => { - const messages = transform("js-message-descriptor.js") - expect(messages).toMatchSnapshot() - }) - }) - - it("Should extract id from TemplateLiteral", () => { - const code = "const msg = /*i18n*/{id: `Message`}" - - expectNoConsole(() => { - const messages = transformCode(code) - - expect(messages[0]).toMatchObject({ - id: "Message", - }) - }) - }) - - it("Should log error if TemplateLiteral in id has expressions", () => { - const code = "const msg = /*i18n*/{id: `Hello ${name}`}" - - return mockConsole((console) => { - const messages = transformCode(code) - - expect(messages.length).toBe(0) - - expect(console.error).not.toBeCalled() - expect(console.warn).toBeCalledWith( - expect.stringContaining( - `Could not extract from template literal with expressions.`, - ), - ) - }) - }) - - it("Should log error when no ID provided", () => { - const code = "const msg = /*i18n*/ {message: `Hello ${name}`}" - - return mockConsole((console) => { - const messages = transformCode(code) - - expect(messages.length).toBe(0) - expect(console.error).not.toBeCalled() - - expect(console.warn).toBeCalledWith( - expect.stringContaining(`Missing message ID`), - ) - }) - }) - - it("Should log error when not a string provided as ID", () => { - const code = "const msg = /*i18n*/ {id: id}" - - return mockConsole((console) => { - transformCode(code) - - expect(console.error).not.toBeCalled() - expect(console.warn).toBeCalledWith( - expect.stringContaining( - "Only strings or template literals could be extracted.", - ), - ) - }) - }) - - it("Should log error when not a string provided as comment", () => { - const code = `const msg = /*i18n*/ {id: "msg.id", comment: variable}` - - return mockConsole((console) => { - transformCode(code) - - expect(console.error).not.toBeCalled() - expect(console.warn).toBeCalledWith( - expect.stringContaining( - "Only strings or template literals could be extracted.", - ), - ) - }) - }) - - it("Should support string concatenation in comment", () => { - const code = `const msg = /*i18n*/ {id: "msg.id", comment: "first " + "second " + "third"}` - - return expectNoConsole(() => { - const messages = transformCode(code) - expect(messages[0]).toMatchObject({ - comment: "first second third", - }) - }) - }) - }) - - it("should extract all messages from JSX files (macros)", () => { - return expectNoConsole(() => { - const messages = transform("jsx-with-macros.js") - expect(messages).toMatchSnapshot() - }) - }) - - it("should extract Plural messages from JSX files when there's no Trans tag (integration)", () => { - return expectNoConsole(() => { - const messages = transform("jsx-without-trans.js") - expect(messages).toMatchSnapshot() - }) - }) - - it("should extract all messages from JS files (macros)", () => { - return expectNoConsole(() => { - const messages = transform("js-with-macros.js") - expect(messages).toMatchSnapshot() - }) - }) -}) diff --git a/babel-plugin-extract-messages/test/fixtures/js-call-expression.js b/babel-plugin-extract-messages/test/fixtures/js-call-expression.js deleted file mode 100644 index 19bc697..0000000 --- a/babel-plugin-extract-messages/test/fixtures/js-call-expression.js +++ /dev/null @@ -1,26 +0,0 @@ -const msg = i18n._("Message") - -const withDescription = i18n._("Description", {}, { comment: "description" }) - -const withId = i18n._("ID", {}, { message: "Message with id" }) - -const withValues = i18n._("Values {param}", { param: param }) - -const withContext = i18n._("Some id", {}, { context: "Context1" }) - -// from message descriptor -i18n._({ - id: "my.id", - message: "My Id Message", - comment: "My comment", -}) - -// support alias -i18n.t("Aliased Message") - -// from message descriptor -i18n.t({ - id: "my.id", - message: "My Id Message", - comment: "My comment", -}) diff --git a/babel-plugin-extract-messages/test/fixtures/js-message-descriptor.js b/babel-plugin-extract-messages/test/fixtures/js-message-descriptor.js deleted file mode 100644 index 3761efc..0000000 --- a/babel-plugin-extract-messages/test/fixtures/js-message-descriptor.js +++ /dev/null @@ -1,25 +0,0 @@ -const msg = /*i18n*/ { id: "Message" } - -const withDescription = /*i18n*/ { id: "Description", comment: "description" } - -const withId = /*i18n*/ { id: "ID", message: "Message with id" } - -const withValues = /*i18n*/ { - id: "Values {param} {0} {name} {value}", - values: { - param: param, - 0: user.getName(), - ["name"]: "foo", - // prettier-ignore - value: user - ? user.name - : null, - }, -} -/** - * With values passed as variable - */ -const values = {} -const withValues2 = /*i18n*/ { id: "Values {param} {0}", values } - -const withContext = /*i18n*/ { id: "Some id", context: "Context1" } diff --git a/babel-plugin-extract-messages/test/fixtures/js-with-macros.js b/babel-plugin-extract-messages/test/fixtures/js-with-macros.js deleted file mode 100644 index 564320d..0000000 --- a/babel-plugin-extract-messages/test/fixtures/js-with-macros.js +++ /dev/null @@ -1,63 +0,0 @@ -import { t, defineMessage, msg, plural } from "@lingui/core/macro" -import { useLingui } from "@lingui/react/macro" - -t`Message` - -const msg1 = t`Message` - -const withDescription = defineMessage({ - message: "Description", - comment: "description", -}) - -const withId = defineMessage({ - id: "ID", - message: "Message with id", -}) - -const withValues = t`Values ${param}` - -const withTId = t({ - id: "ID Some", - message: "Message with id some", -}) - -const withTIdBacktick = t({ - id: `Backtick`, -}) - -const tWithContextA = t({ - id: "Some ID", - context: "Context1", -}) - -const tWithContextB = t({ - id: "Some other ID", - context: "Context1", -}) - -const defineMessageWithContext = defineMessage({ - id: "Some ID", - context: "Context2", -}) - -const defineMessageAlias = msg({ - id: "Some ID", - context: "Context2", -}) - -const defineMessageAlias2 = msg`TplLiteral` - -function MyComponent() { - const { t } = useLingui() - - t`[useLingui]: TplLiteral` - - // macro nesting - const a = t`[useLingui]: Text ${plural(users.length, { - offset: 1, - 0: "No books", - 1: "1 book", - other: "# books", - })}` -} diff --git a/babel-plugin-extract-messages/test/fixtures/jsx-with-macros.js b/babel-plugin-extract-messages/test/fixtures/jsx-with-macros.js deleted file mode 100644 index c14c5c3..0000000 --- a/babel-plugin-extract-messages/test/fixtures/jsx-with-macros.js +++ /dev/null @@ -1,13 +0,0 @@ -import { Trans } from "@lingui/react/macro" -import { t, plural } from "@lingui/core/macro" -;Hi, my name is {name} -;Some message -;Some other message -;Some message -; -; diff --git a/babel-plugin-extract-messages/test/fixtures/jsx-without-macros.js b/babel-plugin-extract-messages/test/fixtures/jsx-without-macros.js deleted file mode 100644 index 5a91b7e..0000000 --- a/babel-plugin-extract-messages/test/fixtures/jsx-without-macros.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Trans } from "@lingui/react" - -; - -; -; -; -; -; -; -; - diff --git a/babel-plugin-extract-messages/test/fixtures/jsx-without-trans.js b/babel-plugin-extract-messages/test/fixtures/jsx-without-trans.js deleted file mode 100644 index 6a6d0ee..0000000 --- a/babel-plugin-extract-messages/test/fixtures/jsx-without-trans.js +++ /dev/null @@ -1,3 +0,0 @@ -import { Plural } from "@lingui/react/macro" -; -; diff --git a/babel-plugin-extract-messages/test/fixtures/lingui.config.js b/babel-plugin-extract-messages/test/fixtures/lingui.config.js deleted file mode 100644 index 56ad108..0000000 --- a/babel-plugin-extract-messages/test/fixtures/lingui.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - locales: ["en", "cs"] -} diff --git a/babel-plugin-extract-messages/test/fixtures/without-lingui.js b/babel-plugin-extract-messages/test/fixtures/without-lingui.js deleted file mode 100644 index 16aa895..0000000 --- a/babel-plugin-extract-messages/test/fixtures/without-lingui.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Select } from "awesome-form-lib" -import { Trans } from "awesome-animation-lib" - -; - Displaced element - -;