diff --git a/.clippy.toml b/.clippy.toml new file mode 100644 index 00000000..cda8d17e --- /dev/null +++ b/.clippy.toml @@ -0,0 +1 @@ +avoid-breaking-exported-api = false diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index f37cf1b5..b3ddcf80 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -33,7 +33,7 @@ jobs: - run: just fmt - - uses: autofix-ci/action@2891949f3779a1cafafae1523058501de3d4e944 # v1.3.1 + - uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # v1.3.2 with: fail-fast: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01862be2..6b516bf6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,3 +102,5 @@ jobs: run: pnpm run test env: WASI_TEST: 1 + + - run: git diff --exit-code # Must commit index.d.ts diff --git a/.github/workflows/release-napi.yml b/.github/workflows/release-napi.yml index 71498781..a1551291 100644 --- a/.github/workflows/release-napi.yml +++ b/.github/workflows/release-napi.yml @@ -8,7 +8,7 @@ on: branches: - main paths: - - npm/package.json # Please only commit this file, so we don't need to wait for test CI to pass. + - package.json env: DEBUG: napi:* @@ -32,7 +32,7 @@ jobs: with: static-checking: localIsNew file-url: https://unpkg.com/unrs-resolver@latest/package.json - file-name: npm/package.json + file-name: package.json - name: Set version name if: steps.version.outputs.changed == 'true' @@ -102,7 +102,7 @@ jobs: target: wasm32-wasip1-threads build: pnpm build - name: Package ${{ matrix.target }} + name: Build ${{ matrix.target }} runs-on: ${{ matrix.os }} steps: - uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1 @@ -148,10 +148,10 @@ jobs: RUSTUP_IO_THREADS: 1 with: operating_system: freebsd - version: "14.2" + version: 14.2 memory: 8G cpu_count: 3 - environment_variables: "DEBUG RUSTUP_IO_THREADS" + environment_variables: DEBUG RUSTUP_IO_THREADS shell: bash run: | sudo pkg install -y -f curl libnghttp2 node22 npm cmake @@ -187,13 +187,10 @@ jobs: needs: - build - build-freebsd - env: - COREPACK_INTEGRITY_KEYS: 0 steps: - uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1 - - name: Install pnpm - run: corepack enable + - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 - name: Setup Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 @@ -211,18 +208,19 @@ jobs: - name: Prepare dirs and artifacts run: | - pnpm napi create-npm-dirs --package-json-path npm/package.json - pnpm napi artifacts --package-json-path npm/package.json --build-output-dir napi + cp package.json napi/package.json + pnpm napi create-npm-dirs + pnpm napi artifacts --npm-dir npm --build-output-dir napi - name: Publish npm packages as latest env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - shell: bash run: | - cp napi/index.js npm/index.js - cp napi/index.d.ts npm/index.d.ts - cp napi/browser.js npm/browser.js echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - pnpm napi pre-publish --no-gh-release -t npm --package-json-path npm/package.json - npm publish npm/ --tag latest --provenance --access public + pnpm napi pre-publish --no-gh-release --tagstyle npm --npm-dir npm + + # Publish root package + cp package.json napi/package.json + cp README.md napi/README.md + npm publish napi/ --tag latest --provenance --access public diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml index e43992f3..9218b3ba 100644 --- a/.github/workflows/release-plz.yml +++ b/.github/workflows/release-plz.yml @@ -47,8 +47,8 @@ jobs: if [[ -n "$pr_number" ]]; then version="${VERSION}" - jq --arg version "${version}" '.version = ($version) | .scripts.postinstall = "napi-postinstall unrs-resolver \($version) check"' npm/package.json > tmp - mv tmp npm/package.json + jq --arg version "${version}" '.version = ($version) | .scripts.postinstall = "napi-postinstall unrs-resolver \($version) check"' package.json > tmp + mv tmp package.json gh pr checkout $pr_number git add . diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 34c6a818..84501de9 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -29,7 +29,7 @@ jobs: steps: - uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1 - - uses: taiki-e/install-action@1cefd1553b1693f47889dc747f7d230904296a3b # v2.52.6 + - uses: taiki-e/install-action@92f69c195229fe62d58b4d697ab4bc75def98e76 # v2.52.7 with: tool: zizmor diff --git a/.gitignore b/.gitignore index 922809bb..e6ab68b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ target/ +/npm /node_modules +/fixtures/pnpm/node_modules fuzz/Cargo.lock diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..5fdb852a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "semi": false, + "singleQuote": true, + "plugins": ["prettier-plugin-pkg"] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3424eb05..6267ee2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.8.0](https://github.com/unrs/unrs-resolver/compare/v1.7.13...v1.8.0) - 2025-06-11 + +### Features + +- support runtime fallback for webcontainer ([#144](https://github.com/unrs/unrs-resolver/pull/144)) (by @JounQin) - #144 +- merge from upstream `oxc-project/oxc-resolver` - 6th ([#146](https://github.com/unrs/unrs-resolver/pull/146)) (by @JounQin) - #146 + +### Chore + +- *(deps)* update all dependencies ([#141](https://github.com/unrs/unrs-resolver/pull/141)) (by @renovate[bot]) + +### Contributors + +* @JounQin +* @renovate[bot] + ## [1.7.13](https://github.com/unrs/unrs-resolver/compare/v1.7.12...v1.7.13) - 2025-06-10 ### Bug Fixes diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..a0f80cec --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,21 @@ +# CONTRIBUTING.md + +```bash +just init +just install +just ready +``` + +## Rust + +```bash +just example /path/to/directory specifier +just test +``` + +## Napi + +```bash +pnpm run build +pnpm test +``` diff --git a/Cargo.lock b/Cargo.lock index 1f038142..56175ff2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,15 +84,15 @@ checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" [[package]] name = "bpaf" -version = "0.9.19" +version = "0.9.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4848ed5727d39a7573551c205bcb1ccd88c8cad4ed2c80f62e2316f208196b8d" +checksum = "473976d7a8620bb1e06dcdd184407c2363fe4fec8e983ee03ed9197222634a31" [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" [[package]] name = "byteorder" @@ -108,24 +108,24 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.19" +version = "1.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" +checksum = "956a5e21988b87f372569b66183b78babf23ebc2e744b733e4350a752c4dafac" dependencies = [ "shlex", ] [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "chrono" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", @@ -342,7 +342,7 @@ dependencies = [ "cfg-if", "crossbeam-utils", "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.4", "lock_api", "parking_lot_core", ] @@ -463,14 +463,14 @@ checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "libc", @@ -496,9 +496,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" [[package]] name = "hex" @@ -554,7 +554,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.4", "serde", ] @@ -597,12 +597,12 @@ checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libloading" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets", + "windows-targets 0.53.0", ] [[package]] @@ -635,9 +635,9 @@ checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -675,9 +675,9 @@ dependencies = [ [[package]] name = "napi" -version = "3.0.0-beta.7" +version = "3.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "738f7ddf53c70b9bbddaf876317c985640a2c89061035fa87ff171fd93193e37" +checksum = "c502f122fc89e92c6222810b3144411c6f945da5aa3b713ddfad3bdcae7c9bb4" dependencies = [ "bitflags", "ctor", @@ -697,9 +697,9 @@ checksum = "44e0e3177307063d3e7e55b7dd7b648cca9d7f46daa35422c0d98cc2bf48c2c1" [[package]] name = "napi-derive" -version = "3.0.0-beta.6" +version = "3.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c48e8ab579e603cb66e0f9048303d25fca9f4275f421c0af150a40080bd299d" +checksum = "fcf1e732a67e934b069d6d527251d6288753a36840572abe132a7aed9e77f0bc" dependencies = [ "convert_case", "ctor", @@ -711,9 +711,9 @@ dependencies = [ [[package]] name = "napi-derive-backend" -version = "2.0.0-beta.6" +version = "2.0.0-beta.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a767a2d3aa9fe20f7032b9e90912e8061224dc48fcfd5a3e8716dbef8ba39a5" +checksum = "462b775ba74791c98989fadc46c4bb2ec53016427be4d420d31c4bbaab34b308" dependencies = [ "convert_case", "proc-macro2", @@ -797,15 +797,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -820,6 +820,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + [[package]] name = "pin-project-lite" version = "0.2.16" @@ -912,9 +918,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" +checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" dependencies = [ "bitflags", ] @@ -967,9 +973,9 @@ checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" [[package]] name = "ryu" @@ -1094,9 +1100,9 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "smallvec" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "strsim" @@ -1106,9 +1112,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.101" +version = "2.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "f6397daf94fa90f058bd0fd88429dd9e5738999cca8d701813c80723add80462" dependencies = [ "proc-macro2", "quote", @@ -1189,9 +1195,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "1b1ffbcf9c6f6b99d386e7444eb608ba646ae452a36b39737deb9663b610f662" dependencies = [ "proc-macro2", "quote", @@ -1200,9 +1206,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", ] @@ -1232,7 +1238,7 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unrs_resolver" -version = "1.7.13" +version = "1.8.0" dependencies = [ "cfg-if", "criterion2", @@ -1245,6 +1251,7 @@ dependencies = [ "normalize-path", "once_cell", "papaya", + "pico-args", "pnp", "rayon", "rustc-hash", @@ -1271,11 +1278,13 @@ dependencies = [ [[package]] name = "uuid" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" +checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.3.3", + "js-sys", + "wasm-bindgen", ] [[package]] @@ -1299,9 +1308,9 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" @@ -1381,9 +1390,9 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.61.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", @@ -1422,18 +1431,18 @@ checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" [[package]] name = "windows-result" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ "windows-link", ] @@ -1444,7 +1453,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1453,7 +1462,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1462,14 +1471,30 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] [[package]] @@ -1478,48 +1503,96 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "wit-bindgen-rt" version = "0.39.0" diff --git a/Cargo.toml b/Cargo.toml index 2a2df3dc..8b1fafac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,9 +2,7 @@ members = ["napi"] resolver = "2" -[package] -name = "unrs_resolver" -version = "1.7.13" +[workspace.package] authors = ["JounQin (https://www.1stG.me)"] categories = ["development-tools"] edition = "2024" @@ -17,6 +15,24 @@ repository = "https://github.com/unrs/unrs-resolver" rust-version = "1.85.0" description = "ESM / CJS module resolution" +[workspace.dependencies] +unrs_resolver = { version = "1.8.0", path = "." } + +[package] +name = "unrs_resolver" +version = "1.8.0" +authors.workspace = true +categories.workspace = true +edition.workspace = true +homepage.workspace = true +include.workspace = true +keywords.workspace = true +license.workspace = true +readme.workspace = true +repository.workspace = true +rust-version.workspace = true +description.workspace = true + [lib] doctest = false @@ -86,6 +102,7 @@ document-features = { version = "0.2.11", optional = true } criterion2 = { version = "3.0.0", default-features = false } dirs = { version = "6.0.0" } normalize-path = { version = "0.2.1" } +pico-args = "0.5.0" rayon = { version = "1.10.0" } vfs = "0.12.1" # for testing with in memory file system @@ -101,6 +118,16 @@ yarn_pnp = ["pnp"] # For codspeed benchmark codspeed = ["criterion2/codspeed"] +[profile.dev] +# Disabling debug info speeds up local and CI builds, +# and we don't rely on it for debugging that much. +debug = false + +[profile.test] +# Disabling debug info speeds up local and CI builds, +# and we don't rely on it for debugging that much. +debug = false + [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] diff --git a/README.md b/README.md index c2ede7a3..3a4755ec 100644 --- a/README.md +++ b/README.md @@ -44,17 +44,64 @@ Rust port of [enhanced-resolve]. -- released on [crates.io][crates-url] and [npm][npm-url]. -- built-in [tsconfig-paths-webpack-plugin] +- Released on [crates.io][crates-url] and [npm][npm-url]. +- Implements the [ESM](https://nodejs.org/api/esm.html#resolution-algorithm) and [CommonJS](https://nodejs.org/api/modules.html#all-together) module resolution algorithm specification. +- Built-in [tsconfig-paths-webpack-plugin] - support extending tsconfig defined in `tsconfig.extends` - support paths alias defined in `tsconfig.compilerOptions.paths` - support project references defined `tsconfig.references` - support [template variable ${configDir} for substitution of config files directory path](https://github.com/microsoft/TypeScript/pull/58042) -- supports in-memory file system via the `FileSystem` trait -- contains `tracing` instrumentation +- Supports in-memory file system via the `FileSystem` trait. +- Contains `tracing` instrumentation. ## Usage +### npm package + +See `index.d.ts` for `resolveSync` and `ResolverFactory` API. + +Quick example: + +```javascript +import assert from 'node:assert'; +import path from 'node:path'; + +import resolve, { ResolverFactory } from 'unrs-resolver'; + +// `resolve` +assert(resolve.sync(process.cwd(), './index.js').path, path.resolve('index.js')); + +// `ResolverFactory` +const resolver = new ResolverFactory(); +assert(resolver.sync(process.cwd(), './index.js').path, path.resolve('index.js')); +``` + +### Rust + +See [docs.rs/unrs_resolver](https://docs.rs/unrs_resolver/latest/unrs_resolver/). + +## Terminology + +### `directory` + +An **absolute** path to a directory where the specifier is resolved against. + +For CommonJS modules, it is the `__dirname` variable that contains the absolute path to the folder containing current module. + +For ECMAScript modules, it is the value of `import.meta.url`. + +Behavior is undefined when given a path to a file. + +### `specifier` + +The string passed to `require` or `import`, i.e. `require("specifier")` or `import "specifier"` + +## Errors and Trouble Shooting + +- `Error: Package subpath '.' is not defined by "exports" in` - occurs when resolving without `conditionNames`. + +## Configuration + The following usages apply to both Rust and Node.js; the code snippets are written in JavaScript. To handle the `exports` field in `package.json`, ESM and CJS need to be differentiated. @@ -132,10 +179,6 @@ Quoting esbuild's documentation: - `module` - This field came from a [proposal](https://github.com/dherman/defense-of-dot-js/blob/f31319be735b21739756b87d551f6711bd7aa283/proposal.md) for how to integrate ECMAScript modules into node. Because of this, it's reasonable to expect that the file path in this field is an ECMAScript-style module. This proposal wasn't adopted by node (node uses "type": "module" instead) but it was adopted by major bundlers because ECMAScript-style modules lead to better tree shaking, or dead code removal. - `browser` - This field came from a [proposal](https://gist.github.com/defunctzombie/4339901/49493836fb873ddaa4b8a7aa0ef2352119f69211) that allows bundlers to replace node-specific files or modules with their browser-friendly versions. It lets you specify an alternate browser-specific entry point. Note that it is possible for a package to use both the browser and module field together (see the note below). -## Errors & Trouble Shooting - -- `Error: Package subpath '.' is not defined by "exports" in` - occurs when resolving without `conditionNames`. - ## Options The following options are aligned with [enhanced-resolve], and is implemented for Rust crate usage. @@ -201,12 +244,6 @@ OXC_LOG=DEBUG your_program RD_LOG='oxc_resolver' rolldown build ``` -### Rspack - -```bash -RSPACK_PROFILE='TRACE=filter=oxc_resolver=trace&layer=logger' rspack build -``` - ## Test Tests are ported from diff --git a/benches/resolver.rs b/benches/resolver.rs index 5fe8a81f..7ec49f17 100644 --- a/benches/resolver.rs +++ b/benches/resolver.rs @@ -148,7 +148,7 @@ fn bench_resolver(c: &mut Criterion) { // check validity for (path, request) in &data { - assert!(unrs_resolver().resolve(path, request).is_ok(), "{:?} {request}", path.display()); + assert!(unrs_resolver().resolve(path, request).is_ok(), "{} {request}", path.display()); } let symlink_test_dir = create_symlinks().expect("Create symlink fixtures failed"); diff --git a/cliff.toml b/cliff.toml deleted file mode 100644 index 80be251b..00000000 --- a/cliff.toml +++ /dev/null @@ -1,15 +0,0 @@ -# git-cliff ~ configuration file -# https://git-cliff.org/docs/configuration - -[git] -commit_parsers = [ - { message = "^doc", group = "Documentation" }, - { message = "^feat", group = "Features" }, - { message = "^fix", group = "Bug Fixes" }, - { message = "^perf", group = "Performance" }, - { message = "^refactor", group = "Refactor" }, - { message = "^style", group = "Styling" }, - { message = "^test", group = "Testing" }, -] -# protect breaking changes from being skipped due to matching a skipping commit_parser -protect_breaking_commits = false diff --git a/examples/resolver.rs b/examples/resolver.rs index 9a5e7cac..8edaa7ae 100644 --- a/examples/resolver.rs +++ b/examples/resolver.rs @@ -1,19 +1,25 @@ // See documentation at -use std::{env, path::PathBuf}; +use std::path::PathBuf; -use unrs_resolver::{AliasValue, ResolveOptions, Resolver}; +use pico_args::Arguments; +use unrs_resolver::{AliasValue, ResolveOptions, Resolver, TsconfigOptions, TsconfigReferences}; fn main() { - let path = PathBuf::from(env::args().nth(1).expect("path")); + let mut args = Arguments::from_env(); + + let tsconfig_path = args.value_from_str::<&'static str, PathBuf>("--tsconfig").ok(); + let path = args.free_from_str::().expect("path"); + let specifier = args.free_from_str::().expect("specifier"); assert!(path.is_dir(), "{} must be a directory that will be resolved against.", path.display()); assert!(path.is_absolute(), "{} must be an absolute path.", path.display()); - let specifier = env::args().nth(2).expect("specifier"); - println!("path: {}", path.to_string_lossy()); println!("specifier: {specifier}"); + if let Some(path) = &tsconfig_path { + println!("tsconfig: {}", path.to_string_lossy()); + } let options = ResolveOptions { alias_fields: vec![vec!["browser".into()]], @@ -24,11 +30,24 @@ fn main() { condition_names: vec!["node".into(), "import".into()], // CJS // condition_names: vec!["node".into(), "require".into()], + tsconfig: tsconfig_path.map(|config_file| TsconfigOptions { + config_file, + references: TsconfigReferences::Auto, + }), ..ResolveOptions::default() }; + println!(); + match Resolver::new(options).resolve(path, &specifier) { Err(error) => println!("Error: {error}"), - Ok(resolution) => println!("Resolved: {}", resolution.full_path().display()), + Ok(resolution) => { + println!("Resolution: {}", resolution.full_path().to_string_lossy()); + println!("Module Type: {:?}", resolution.module_type()); + println!( + "package json: {:?}", + resolution.package_json().map(|p| p.path.to_string_lossy()) + ); + } } } diff --git a/fixtures/enhanced_resolve/test/fixtures/multiple_modules/node_modules/m1/package.json b/fixtures/enhanced_resolve/test/fixtures/multiple_modules/node_modules/m1/package.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/fixtures/enhanced_resolve/test/fixtures/multiple_modules/node_modules/m1/package.json @@ -0,0 +1 @@ +{} diff --git a/fixtures/enhanced_resolve/test/fixtures/node_modules/complexm/package.json b/fixtures/enhanced_resolve/test/fixtures/node_modules/complexm/package.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/fixtures/enhanced_resolve/test/fixtures/node_modules/complexm/package.json @@ -0,0 +1 @@ +{} diff --git a/fixtures/enhanced_resolve/test/fixtures/node_modules/m1/package.json b/fixtures/enhanced_resolve/test/fixtures/node_modules/m1/package.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/fixtures/enhanced_resolve/test/fixtures/node_modules/m1/package.json @@ -0,0 +1 @@ +{} diff --git a/fixtures/enhanced_resolve/test/fixtures/node_modules/m2/package.json b/fixtures/enhanced_resolve/test/fixtures/node_modules/m2/package.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/fixtures/enhanced_resolve/test/fixtures/node_modules/m2/package.json @@ -0,0 +1 @@ +{} diff --git a/fixtures/misc/module-type/cjs/file.cjs b/fixtures/misc/module-type/cjs/file.cjs new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/cjs/file.js b/fixtures/misc/module-type/cjs/file.js new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/cjs/file.mjs b/fixtures/misc/module-type/cjs/file.mjs new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/cjs/package.json b/fixtures/misc/module-type/cjs/package.json new file mode 100644 index 00000000..5bbefffb --- /dev/null +++ b/fixtures/misc/module-type/cjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/fixtures/misc/module-type/esm/file.cjs b/fixtures/misc/module-type/esm/file.cjs new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/esm/file.js b/fixtures/misc/module-type/esm/file.js new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/esm/file.mjs b/fixtures/misc/module-type/esm/file.mjs new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/esm/package.json b/fixtures/misc/module-type/esm/package.json new file mode 100644 index 00000000..3dbc1ca5 --- /dev/null +++ b/fixtures/misc/module-type/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/fixtures/misc/module-type/file b/fixtures/misc/module-type/file new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/file.cjs b/fixtures/misc/module-type/file.cjs new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/file.ext b/fixtures/misc/module-type/file.ext new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/file.json b/fixtures/misc/module-type/file.json new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/file.mjs b/fixtures/misc/module-type/file.mjs new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/file.node b/fixtures/misc/module-type/file.node new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/file.wasm b/fixtures/misc/module-type/file.wasm new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/no/file.js b/fixtures/misc/module-type/no/file.js new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/module-type/no/package.json b/fixtures/misc/module-type/no/package.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/fixtures/misc/module-type/no/package.json @@ -0,0 +1 @@ +{} diff --git a/fixtures/misc/module-type/package.json b/fixtures/misc/module-type/package.json new file mode 100644 index 00000000..5bbefffb --- /dev/null +++ b/fixtures/misc/module-type/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/fixtures/misc/node_modules/package-json-nested/foo/bar/index.js b/fixtures/misc/node_modules/package-json-nested/foo/bar/index.js new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/node_modules/package-json-nested/foo/bar/package.json b/fixtures/misc/node_modules/package-json-nested/foo/bar/package.json new file mode 100644 index 00000000..694594cf --- /dev/null +++ b/fixtures/misc/node_modules/package-json-nested/foo/bar/package.json @@ -0,0 +1,3 @@ +{ + "name": "bar" +} diff --git a/fixtures/misc/node_modules/package-json-nested/foo/index.js b/fixtures/misc/node_modules/package-json-nested/foo/index.js new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/node_modules/package-json-nested/foo/package.json b/fixtures/misc/node_modules/package-json-nested/foo/package.json new file mode 100644 index 00000000..bde99de9 --- /dev/null +++ b/fixtures/misc/node_modules/package-json-nested/foo/package.json @@ -0,0 +1,3 @@ +{ + "name": "foo" +} diff --git a/fixtures/misc/node_modules/package-json-nested/index.js b/fixtures/misc/node_modules/package-json-nested/index.js new file mode 100644 index 00000000..e69de29b diff --git a/fixtures/misc/node_modules/package-json-nested/package.json b/fixtures/misc/node_modules/package-json-nested/package.json new file mode 100644 index 00000000..755e83af --- /dev/null +++ b/fixtures/misc/node_modules/package-json-nested/package.json @@ -0,0 +1,3 @@ +{ + "name": "package-json-nested" +} diff --git a/fixtures/misc/package.json b/fixtures/misc/package.json new file mode 100644 index 00000000..b9d8af1a --- /dev/null +++ b/fixtures/misc/package.json @@ -0,0 +1,3 @@ +{ + "name": "misc" +} diff --git a/fixtures/pnpm/.gitignore b/fixtures/pnpm/.gitignore deleted file mode 100644 index 3c3629e6..00000000 --- a/fixtures/pnpm/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/fixtures/pnpm/package.json b/fixtures/pnpm/package.json index aa7c9e93..43f84250 100644 --- a/fixtures/pnpm/package.json +++ b/fixtures/pnpm/package.json @@ -8,6 +8,7 @@ "decimal.js": "10.5.0", "ipaddr.js": "2.2.0", "mathjs": "14.4.0", + "minimatch": "10.0.1", "postcss": "8.5.3", "styled-components": "6.1.17" } diff --git a/fixtures/pnpm/pnpm-lock.yaml b/fixtures/pnpm/pnpm-lock.yaml deleted file mode 100644 index e51dfd6a..00000000 --- a/fixtures/pnpm/pnpm-lock.yaml +++ /dev/null @@ -1,212 +0,0 @@ -lockfileVersion: '6.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -devDependencies: - axios: - specifier: 1.6.2 - version: 1.6.2 - postcss: - specifier: 8.4.33 - version: 8.4.33 - styled-components: - specifier: 6.1.1 - version: 6.1.1(react-dom@18.2.0)(react@18.2.0) - -packages: - - /@emotion/is-prop-valid@1.2.1: - resolution: {integrity: sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==} - dependencies: - '@emotion/memoize': 0.8.1 - dev: true - - /@emotion/memoize@0.8.1: - resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} - dev: true - - /@emotion/unitless@0.8.1: - resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} - dev: true - - /@types/stylis@4.2.4: - resolution: {integrity: sha512-36ZrGJ8fgtBr6nwNnuJ9jXIj+bn/pF6UoqmrQT7+Y99+tFFeHHsoR54+194dHdyhPjgbeoNz3Qru0oRt0l6ASQ==} - dev: true - - /asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - dev: true - - /axios@1.6.2: - resolution: {integrity: sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==} - dependencies: - follow-redirects: 1.15.3 - form-data: 4.0.0 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - dev: true - - /camelize@1.0.1: - resolution: {integrity: sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==} - dev: true - - /combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - dependencies: - delayed-stream: 1.0.0 - dev: true - - /css-color-keywords@1.0.0: - resolution: {integrity: sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==} - engines: {node: '>=4'} - dev: true - - /css-to-react-native@3.2.0: - resolution: {integrity: sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==} - dependencies: - camelize: 1.0.1 - css-color-keywords: 1.0.0 - postcss-value-parser: 4.2.0 - dev: true - - /csstype@3.1.2: - resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} - dev: true - - /delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - dev: true - - /follow-redirects@1.15.3: - resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - dev: true - - /form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} - engines: {node: '>= 6'} - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - dev: true - - /js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true - - /loose-envify@1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true - dependencies: - js-tokens: 4.0.0 - dev: true - - /mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - dev: true - - /mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - dependencies: - mime-db: 1.52.0 - dev: true - - /nanoid@3.3.7: - resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - - /picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true - - /postcss-value-parser@4.2.0: - resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - dev: true - - /postcss@8.4.33: - resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.7 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: true - - /proxy-from-env@1.1.0: - resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - dev: true - - /react-dom@18.2.0(react@18.2.0): - resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} - peerDependencies: - react: ^18.2.0 - dependencies: - loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.0 - dev: true - - /react@18.2.0: - resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} - engines: {node: '>=0.10.0'} - dependencies: - loose-envify: 1.4.0 - dev: true - - /scheduler@0.23.0: - resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} - dependencies: - loose-envify: 1.4.0 - dev: true - - /shallowequal@1.1.0: - resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} - dev: true - - /source-map-js@1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} - engines: {node: '>=0.10.0'} - dev: true - - /styled-components@6.1.1(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-cpZZP5RrKRIClBW5Eby4JM1wElLVP4NQrJbJ0h10TidTyJf4SIIwa3zLXOoPb4gJi8MsJ8mjq5mu2IrEhZIAcQ==} - engines: {node: '>= 16'} - peerDependencies: - react: '>= 16.8.0' - react-dom: '>= 16.8.0' - dependencies: - '@emotion/is-prop-valid': 1.2.1 - '@emotion/unitless': 0.8.1 - '@types/stylis': 4.2.4 - css-to-react-native: 3.2.0 - csstype: 3.1.2 - postcss: 8.4.33 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - shallowequal: 1.1.0 - stylis: 4.3.0 - tslib: 2.6.2 - dev: true - - /stylis@4.3.0: - resolution: {integrity: sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ==} - dev: true - - /tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - dev: true diff --git a/fixtures/tsconfig/cases/merge_compiler_options/base-tsconfig.json b/fixtures/tsconfig/cases/merge_compiler_options/base-tsconfig.json index d76d2d0c..34d7c544 100644 --- a/fixtures/tsconfig/cases/merge_compiler_options/base-tsconfig.json +++ b/fixtures/tsconfig/cases/merge_compiler_options/base-tsconfig.json @@ -4,6 +4,8 @@ "jsx": "react-jsx", "jsxFactory": "h", "jsxFragmentFactory": "Fragment", - "jsxImportSource": "xxx" + "jsxImportSource": "xxx", + "module": "ESNext", + "target": "ESNext" } } diff --git a/justfile b/justfile index 61d89d09..698f8e9f 100644 --- a/justfile +++ b/justfile @@ -37,7 +37,7 @@ watch-check: watch-example *args='': just watch "cargo run --example resolver -- {{args}}" -# Run the example in `parser`, `formatter`, `linter` +# Run the example example *args='': cargo run --example resolver -- {{args}} diff --git a/napi/Cargo.toml b/napi/Cargo.toml index 088dcd6a..e066841b 100644 --- a/napi/Cargo.toml +++ b/napi/Cargo.toml @@ -1,29 +1,45 @@ [package] name = "unrs_resolver_napi" version = "0.0.0" -edition = "2024" +authors.workspace = true +categories.workspace = true +edition.workspace = true +homepage.workspace = true +include = ["src", "build.rs"] +keywords.workspace = true +license.workspace = true publish = false -rust-version = "1.85.0" +readme.workspace = true +repository.workspace = true +rust-version.workspace = true +description.workspace = true [lib] -crate-type = ["cdylib"] +crate-type = ["cdylib", "lib"] test = false doctest = false [dependencies] -napi = { version = "3.0.0-beta.7", default-features = false, features = ["napi3", "serde-json"] } -napi-derive = { version = "3.0.0-beta.6" } -oxc_resolver = { path = "..", package = "unrs_resolver" } -tracing-subscriber = { version = "0.3.19", default-features = false, features = ["std", "fmt"] } # Omit the `regex` feature +unrs_resolver = { workspace = true } + +napi = { version = "3.0.0-beta.8", default-features = false, features = ["napi3", "serde-json"] } +napi-derive = { version = "3.0.0-beta.8" } +tracing-subscriber = { version = "0.3.19", optional = true, default-features = false, features = ["std", "fmt"] } # Omit the `regex` feature [target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] -mimalloc-safe = { version = "0.1.52", features = ["skip_collect_on_exit"] } +mimalloc-safe = { version = "0.1.52", optional = true, features = ["skip_collect_on_exit"] } [target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] -mimalloc-safe = { version = "0.1.52", features = ["skip_collect_on_exit", "local_dynamic_tls"] } +mimalloc-safe = { version = "0.1.52", optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls"] } [target.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.dependencies] -mimalloc-safe = { version = "0.1.52", features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] } +mimalloc-safe = { version = "0.1.52", optional = true, features = ["skip_collect_on_exit", "local_dynamic_tls", "no_opt_arch"] } [build-dependencies] napi-build = "2.2.1" + +[features] +default = ["tracing-subscriber"] +allocator = ["dep:mimalloc-safe"] +tracing-subscriber = ["dep:tracing-subscriber"] +yarn_pnp = ["unrs_resolver/yarn_pnp"] diff --git a/napi/README.md b/napi/README.md deleted file mode 100644 index 07c9e263..00000000 --- a/napi/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Installation - -```bash -corepack enable -``` - -# Build - -```bash -pnpm install -pnpm run build -``` - -# Test - -```bash -pnpm test -``` diff --git a/napi/fallback.js b/napi/fallback.js new file mode 100644 index 00000000..c5e3816e --- /dev/null +++ b/napi/fallback.js @@ -0,0 +1,54 @@ +const { execFileSync } = require('node:child_process') + +const pkg = require('unrs-resolver/package.json') + +const userAgent = + (process.env.npm_config_user_agent || '').split('/')[0] || 'npm' + +const EXECUTORS = { + npm: 'npx', + pnpm: 'pnpm', + yarn: 'yarn', + bun: 'bun', + deno: (args) => ['deno', 'run', `npm:${args[0]}`, ...args.slice(1)], +} + +const executor = EXECUTORS[userAgent] + +if (!executor) { + console.error( + `Unsupported package manager: ${userAgent}. Supported managers are: ${Object.keys( + EXECUTORS, + ).join(', ')}.`, + ) + process.exitCode = 1 + return +} + +function constructCommand(value, args) { + const list = typeof value === 'function' ? value(args) : [value].concat(args) + return { + command: list[0], + args: list.slice(1), + } +} + +const { command, args } = constructCommand(executor, [ + 'napi-postinstall', + 'unrs-resolver', + pkg.version, + 'check', +]) + +execFileSync(command, args, { + cwd: __dirname, + stdio: 'inherit', +}) + +process.env.SKIP_UNRS_RESOLVER_FALLBACK = '1' + +const UNRS_RESOLVER_PATH = require.resolve('unrs-resolver') + +delete require.cache[UNRS_RESOLVER_PATH] + +module.exports = require('unrs-resolver') diff --git a/napi/index.d.ts b/napi/index.d.ts index b240737e..1174268d 100644 --- a/napi/index.d.ts +++ b/napi/index.d.ts @@ -19,6 +19,14 @@ export declare const enum EnforceExtension { Disabled = 2 } +export declare const enum ModuleType { + Module = 'module', + CommonJs = 'commonjs', + Json = 'json', + Wasm = 'wasm', + Addon = 'addon' +} + /** * Module Resolution Options * @@ -183,13 +191,28 @@ export interface NapiResolveOptions { * Default `false` */ builtinModules?: boolean + /** + * Resolve [ResolveResult::moduleType]. + * + * Default `false` + */ + moduleType?: boolean } export interface ResolveResult { path?: string error?: string - /** "type" field in the package.json file */ - moduleType?: string + /** + * Module type for this path. + * + * Enable with `ResolveOptions#moduleType`. + * + * The module type is computed `ESM_FILE_FORMAT` from the [ESM resolution algorithm specification](https://nodejs.org/docs/latest/api/esm.html#resolution-algorithm-specification). + * + * The algorithm uses the file extension or finds the closest `package.json` with the `type` field. + */ + moduleType?: ModuleType + /** `package.json` path for the given module. */ packageJsonPath?: string } diff --git a/napi/index.js b/napi/index.js index cbe5450e..840bf99c 100644 --- a/napi/index.js +++ b/napi/index.js @@ -363,6 +363,14 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { } } +if (!nativeBinding && process.env.SKIP_UNRS_RESOLVER_FALLBACK !== '1') { + try { + nativeBinding = require('./fallback.js'); + } catch (err) { + loadErrors.push(err) + } +} + if (!nativeBinding) { if (loadErrors.length > 0) { // TODO Link to documentation with potential fixes @@ -377,4 +385,5 @@ if (!nativeBinding) { module.exports = nativeBinding module.exports.ResolverFactory = nativeBinding.ResolverFactory module.exports.EnforceExtension = nativeBinding.EnforceExtension +module.exports.ModuleType = nativeBinding.ModuleType module.exports.sync = nativeBinding.sync diff --git a/napi/patch.mjs b/napi/patch.mjs new file mode 100644 index 00000000..ae9549e2 --- /dev/null +++ b/napi/patch.mjs @@ -0,0 +1,21 @@ +import fs from 'node:fs' + +const fileUrl = new URL('index.js', import.meta.url) + +let data = fs.readFileSync(fileUrl, 'utf-8') + +data = data.replace( + '\nif (!nativeBinding) {', + (value) => + ` +if (!nativeBinding && process.env.SKIP_UNRS_RESOLVER_FALLBACK !== '1') { + try { + nativeBinding = require('./fallback.js'); + } catch (err) { + loadErrors.push(err) + } +} +` + value, +) + +fs.writeFileSync(fileUrl, data) diff --git a/napi/resolver.wasi-browser.js b/napi/resolver.wasi-browser.js index 30047a47..59e101e3 100644 --- a/napi/resolver.wasi-browser.js +++ b/napi/resolver.wasi-browser.js @@ -63,4 +63,5 @@ const { export default __napiModule.exports export const ResolverFactory = __napiModule.exports.ResolverFactory export const EnforceExtension = __napiModule.exports.EnforceExtension +export const ModuleType = __napiModule.exports.ModuleType export const sync = __napiModule.exports.sync diff --git a/napi/resolver.wasi.cjs b/napi/resolver.wasi.cjs index 236c6430..21a58e9a 100644 --- a/napi/resolver.wasi.cjs +++ b/napi/resolver.wasi.cjs @@ -87,4 +87,5 @@ const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule module.exports = __napiModule.exports module.exports.ResolverFactory = __napiModule.exports.ResolverFactory module.exports.EnforceExtension = __napiModule.exports.EnforceExtension +module.exports.ModuleType = __napiModule.exports.ModuleType module.exports.sync = __napiModule.exports.sync diff --git a/napi/src/lib.rs b/napi/src/lib.rs index 5de7d19c..364c0a32 100644 --- a/napi/src/lib.rs +++ b/napi/src/lib.rs @@ -1,4 +1,7 @@ -#[cfg(not(any(target_arch = "arm", target_os = "freebsd", target_family = "wasm")))] +#[cfg(all( + feature = "allocator", + not(any(target_arch = "arm", target_os = "freebsd", target_family = "wasm")) +))] #[global_allocator] static ALLOC: mimalloc_safe::MiMalloc = mimalloc_safe::MiMalloc; @@ -9,22 +12,28 @@ use std::{ use napi::{Task, bindgen_prelude::AsyncTask}; use napi_derive::napi; -use oxc_resolver::{PackageJson, ResolveOptions, Resolver}; +use unrs_resolver::{PackageJson, ResolveOptions, Resolver}; -use self::{ - options::{NapiResolveOptions, StrOrStrList}, - tracing::init_tracing, -}; +use self::options::{NapiResolveOptions, StrOrStrList}; mod options; +#[cfg(feature = "tracing-subscriber")] mod tracing; #[napi(object)] pub struct ResolveResult { pub path: Option, pub error: Option, - /// "type" field in the package.json file - pub module_type: Option, + /// Module type for this path. + /// + /// Enable with `ResolveOptions#moduleType`. + /// + /// The module type is computed `ESM_FILE_FORMAT` from the [ESM resolution algorithm specification](https://nodejs.org/docs/latest/api/esm.html#resolution-algorithm-specification). + /// + /// The algorithm uses the file extension or finds the closest `package.json` with the `type` field. + pub module_type: Option, + + /// `package.json` path for the given module. pub package_json_path: Option, } @@ -33,7 +42,7 @@ fn resolve(resolver: &Resolver, path: &Path, request: &str) -> ResolveResult { Ok(resolution) => ResolveResult { path: Some(resolution.full_path().to_string_lossy().to_string()), error: None, - module_type: resolution.package_json().and_then(|p| p.r#type()).map(|t| t.to_string()), + module_type: resolution.module_type().map(ModuleType::from), package_json_path: resolution .package_json() .and_then(|p| p.path().to_str()) @@ -48,6 +57,27 @@ fn resolve(resolver: &Resolver, path: &Path, request: &str) -> ResolveResult { } } +#[napi(string_enum = "lowercase")] +pub enum ModuleType { + Module, + CommonJs, + Json, + Wasm, + Addon, +} + +impl From for ModuleType { + fn from(value: unrs_resolver::ModuleType) -> Self { + match value { + unrs_resolver::ModuleType::Module => Self::Module, + unrs_resolver::ModuleType::CommonJs => Self::CommonJs, + unrs_resolver::ModuleType::Json => Self::Json, + unrs_resolver::ModuleType::Wasm => Self::Wasm, + unrs_resolver::ModuleType::Addon => Self::Addon, + } + } +} + #[allow(clippy::needless_pass_by_value)] #[napi] pub fn sync(path: String, request: String) -> ResolveResult { @@ -85,7 +115,10 @@ pub struct ResolverFactory { impl ResolverFactory { #[napi(constructor)] pub fn new(options: Option) -> Self { - init_tracing(); + #[cfg(feature = "tracing-subscriber")] + { + tracing::init_tracing(); + } let options = options.map_or_else(ResolveOptions::default, Self::normalize_options); Self { resolver: Arc::new(Resolver::new(options)) } } @@ -143,8 +176,8 @@ impl ResolverFactory { let v = v .into_iter() .map(|item| match item { - Some(path) => oxc_resolver::AliasValue::from(path), - None => oxc_resolver::AliasValue::Ignore, + Some(path) => unrs_resolver::AliasValue::from(path), + None => unrs_resolver::AliasValue::Ignore, }) .collect(); (k, v) @@ -184,8 +217,8 @@ impl ResolverFactory { let v = v .into_iter() .map(|item| match item { - Some(path) => oxc_resolver::AliasValue::from(path), - None => oxc_resolver::AliasValue::Ignore, + Some(path) => unrs_resolver::AliasValue::from(path), + None => unrs_resolver::AliasValue::Ignore, }) .collect(); (k, v) @@ -218,6 +251,9 @@ impl ResolverFactory { .unwrap_or(default.roots), symlinks: op.symlinks.unwrap_or(default.symlinks), builtin_modules: op.builtin_modules.unwrap_or(default.builtin_modules), + module_type: op.module_type.unwrap_or(default.module_type), + #[cfg(feature = "yarn_pnp")] + enable_pnp: true, } } } diff --git a/napi/src/options.rs b/napi/src/options.rs index a817461d..80dcce30 100644 --- a/napi/src/options.rs +++ b/napi/src/options.rs @@ -149,6 +149,11 @@ pub struct NapiResolveOptions { /// /// Default `false` pub builtin_modules: Option, + + /// Resolve [ResolveResult::moduleType]. + /// + /// Default `false` + pub module_type: Option, } #[napi] @@ -202,14 +207,14 @@ pub struct TsconfigOptions { pub references: Option>>, } -impl From for oxc_resolver::Restriction { +impl From for unrs_resolver::Restriction { fn from(val: Restriction) -> Self { match (val.path, val.regex) { (None, None) => { panic!("Should specify path or regex") } - (None, Some(regex)) => oxc_resolver::Restriction::RegExp(regex), - (Some(path), None) => oxc_resolver::Restriction::Path(PathBuf::from(path)), + (None, Some(regex)) => unrs_resolver::Restriction::RegExp(regex), + (Some(path), None) => unrs_resolver::Restriction::Path(PathBuf::from(path)), (Some(_), Some(_)) => { panic!("Restriction can't be path and regex at the same time") } @@ -217,31 +222,31 @@ impl From for oxc_resolver::Restriction { } } -impl From for oxc_resolver::EnforceExtension { +impl From for unrs_resolver::EnforceExtension { fn from(val: EnforceExtension) -> Self { match val { - EnforceExtension::Auto => oxc_resolver::EnforceExtension::Auto, - EnforceExtension::Enabled => oxc_resolver::EnforceExtension::Enabled, - EnforceExtension::Disabled => oxc_resolver::EnforceExtension::Disabled, + EnforceExtension::Auto => unrs_resolver::EnforceExtension::Auto, + EnforceExtension::Enabled => unrs_resolver::EnforceExtension::Enabled, + EnforceExtension::Disabled => unrs_resolver::EnforceExtension::Disabled, } } } -impl From for oxc_resolver::TsconfigOptions { +impl From for unrs_resolver::TsconfigOptions { fn from(val: TsconfigOptions) -> Self { - oxc_resolver::TsconfigOptions { + unrs_resolver::TsconfigOptions { config_file: PathBuf::from(val.config_file), references: match val.references { Some(Either::A(string)) if string.as_str() == "auto" => { - oxc_resolver::TsconfigReferences::Auto + unrs_resolver::TsconfigReferences::Auto } Some(Either::A(opt)) => { panic!("`{}` is not a valid option for tsconfig references", opt) } - Some(Either::B(paths)) => oxc_resolver::TsconfigReferences::Paths( + Some(Either::B(paths)) => unrs_resolver::TsconfigReferences::Paths( paths.into_iter().map(PathBuf::from).collect::>(), ), - None => oxc_resolver::TsconfigReferences::Disabled, + None => unrs_resolver::TsconfigReferences::Disabled, }, } } diff --git a/napi/tests/simple.test.mjs b/napi/tests/simple.test.mjs index 6c3c1628..976ef022 100644 --- a/napi/tests/simple.test.mjs +++ b/napi/tests/simple.test.mjs @@ -1,17 +1,18 @@ -import path from 'path'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { assert, test } from 'vitest'; -import resolve, { ResolverFactory } from '../index.js'; +import resolve, { ModuleType, ResolverFactory } from '../index.js'; -const cwd = path.join(__dirname, '..'); +const cwd = join(fileURLToPath(import.meta.url), '..', '..'); test('simple', () => { // `resolve` - assert.equal(resolve.sync(cwd, './index.js').path, path.join(cwd, 'index.js')); + assert.equal(resolve.sync(cwd, './index.js').path, join(cwd, 'index.js')); // `ResolverFactory` const resolver = new ResolverFactory(); - assert.equal(resolver.sync(cwd, './index.js').path, path.join(cwd, 'index.js')); + assert.equal(resolver.sync(cwd, './index.js').path, join(cwd, 'index.js')); assert.isAbove(resolver.sync(cwd, './ts').error.length, 0); @@ -22,3 +23,21 @@ test('simple', () => { const newResolver = resolver.cloneWithOptions({}); newResolver.clearCache(); }); + +test('module_type', () => { + const dir = join(cwd, '..', 'fixtures', 'pnpm'); + + const esmResolver = new ResolverFactory({ + conditionNames: ['node', 'import'], + moduleType: true, + }); + + assert.equal(esmResolver.sync(dir, 'minimatch').moduleType, ModuleType.Module); + + const cjsResolver = esmResolver.cloneWithOptions({ + conditionNames: ['node', 'require'], + moduleType: true, + }); + + assert.equal(cjsResolver.sync(dir, 'minimatch').moduleType, ModuleType.CommonJs); +}); diff --git a/npm/.gitignore b/npm/.gitignore deleted file mode 100644 index 8856de93..00000000 --- a/npm/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!package.json -!README.md -!.gitignore diff --git a/npm/README.md b/npm/README.md deleted file mode 100644 index e2a777c5..00000000 --- a/npm/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# UnRS Resolver Napi Binding - -See - -- `index.d.ts` for `resolveSync` and `ResolverFactory` API. -- [README.md](https://github.com/unrs/unrs-resolver#unrs-resolver) for options. - -## API - -`resolve(directory, specifier)` - resolve `specifier` at an absolute path to a `directory`. - -### `directory` - -An **absolute** path to a directory where the specifier is resolved against. - -For CommonJS modules, it is the `__dirname` variable that contains the absolute path to the folder containing current module. - -For ECMAScript modules, it is the value of `import.meta.url`. - -Behavior is undefined when given a path to a file. - -### `specifier` - -The string passed to `require` or `import`, i.e. `require("specifier")` or `import "specifier"` - -## ESM Example - -```javascript -import assert from 'assert'; -import path from 'path'; -import resolve, { ResolverFactory } from './index.js'; - -// `resolve` -assert(resolve.sync(process.cwd(), './index.js').path, path.join(cwd, 'index.js')); - -// `ResolverFactory` -const resolver = new ResolverFactory(); -assert(resolver.sync(process.cwd(), './index.js').path, path.join(cwd, 'index.js')); -``` diff --git a/npm/package.json b/npm/package.json deleted file mode 100644 index 80437ef7..00000000 --- a/npm/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "unrs-resolver", - "version": "1.7.13", - "type": "commonjs", - "description": "UnRS Resolver Node API with PNP support", - "repository": "git+https://github.com/unrs/unrs-resolver.git", - "homepage": "https://github.com/unrs/unrs-resolver#readme", - "author": "JounQin (https://www.1stG.me)", - "funding": "https://opencollective.com/unrs-resolver", - "license": "MIT", - "main": "index.js", - "browser": "browser.js", - "files": [ - "index.d.ts", - "index.js", - "browser.js" - ], - "scripts": { - "postinstall": "napi-postinstall unrs-resolver 1.7.13 check" - }, - "dependencies": { - "napi-postinstall": "^0.2.2" - }, - "napi": { - "binaryName": "resolver", - "packageName": "@unrs/resolver-binding", - "wasm": { - "browser": { - "fs": true - } - }, - "targets": [ - "x86_64-pc-windows-msvc", - "aarch64-pc-windows-msvc", - "i686-pc-windows-msvc", - "x86_64-unknown-linux-gnu", - "x86_64-unknown-linux-musl", - "x86_64-unknown-freebsd", - "aarch64-unknown-linux-gnu", - "aarch64-unknown-linux-musl", - "armv7-unknown-linux-gnueabihf", - "armv7-unknown-linux-musleabihf", - "powerpc64le-unknown-linux-gnu", - "riscv64gc-unknown-linux-gnu", - "riscv64gc-unknown-linux-musl", - "s390x-unknown-linux-gnu", - "x86_64-apple-darwin", - "aarch64-apple-darwin", - "wasm32-wasip1-threads" - ] - }, - "publishConfig": { - "registry": "https://registry.npmjs.org", - "access": "public" - } -} diff --git a/package.json b/package.json index b29950c9..8869637f 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,74 @@ { - "name": "@unrs/resolver-binding", - "private": true, - "version": "0.0.0", + "name": "unrs-resolver", + "version": "1.8.0", + "type": "commonjs", + "description": "UnRS Resolver Node API with PNP support", "repository": "git+https://github.com/unrs/unrs-resolver.git", + "homepage": "https://github.com/unrs/unrs-resolver#readme", + "author": "JounQin (https://www.1stG.me)", "funding": "https://opencollective.com/unrs-resolver", + "license": "MIT", + "packageManager": "pnpm@10.12.1", + "main": "index.js", + "browser": "browser.js", + "files": [ + "browser.js", + "fallback.js", + "index.d.ts", + "index.js" + ], "scripts": { - "build": "napi build --platform --release --package-json-path npm/package.json --manifest-path napi/Cargo.toml", - "build:debug": "napi build --platform --package-json-path npm/package.json --manifest-path napi/Cargo.toml", - "prepublishOnly": "napi pre-publish -t npm", + "build": "pnpm build:debug --features allocator --release", + "build:debug": "napi build --platform --manifest-path napi/Cargo.toml", + "postbuild": "node napi/patch.mjs", + "postinstall": "napi-postinstall unrs-resolver 1.8.0 check", + "prepublishOnly": "clean-pkg-json", "test": "vitest run -r ./napi" }, + "dependencies": { + "napi-postinstall": "^0.2.2" + }, "devDependencies": { - "@napi-rs/cli": "3.0.0-alpha.87", - "@napi-rs/wasm-runtime": "^0.2.10", - "@types/node": "^22.15.29", + "@napi-rs/cli": "3.0.0-alpha.88", + "@napi-rs/wasm-runtime": "^0.2.11", + "@types/node": "^22.15.31", + "clean-pkg-json": "^1.3.0", "emnapi": "^1.4.3", + "prettier": "^3.5.3", + "prettier-plugin-pkg": "^0.21.1", "typescript": "^5.8.3", - "vitest": "^3.2.1" + "vitest": "^3.2.3" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" }, - "packageManager": "pnpm@10.11.1" + "napi": { + "binaryName": "resolver", + "packageName": "@unrs/resolver-binding", + "wasm": { + "browser": { + "fs": true + } + }, + "targets": [ + "x86_64-pc-windows-msvc", + "aarch64-pc-windows-msvc", + "i686-pc-windows-msvc", + "x86_64-unknown-linux-gnu", + "x86_64-unknown-linux-musl", + "x86_64-unknown-freebsd", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "armv7-unknown-linux-gnueabihf", + "armv7-unknown-linux-musleabihf", + "powerpc64le-unknown-linux-gnu", + "riscv64gc-unknown-linux-gnu", + "riscv64gc-unknown-linux-musl", + "s390x-unknown-linux-gnu", + "x86_64-apple-darwin", + "aarch64-apple-darwin", + "wasm32-wasip1-threads" + ] + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a4e2d59..19fa4be5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,25 +7,38 @@ settings: importers: .: + dependencies: + napi-postinstall: + specifier: ^0.2.2 + version: 0.2.4 devDependencies: '@napi-rs/cli': - specifier: 3.0.0-alpha.87 - version: 3.0.0-alpha.87(@emnapi/runtime@1.4.3)(@types/node@22.15.29)(emnapi@1.4.3) + specifier: 3.0.0-alpha.88 + version: 3.0.0-alpha.88(@emnapi/runtime@1.4.3)(@types/node@22.15.31)(emnapi@1.4.3) '@napi-rs/wasm-runtime': - specifier: ^0.2.10 - version: 0.2.10 + specifier: ^0.2.11 + version: 0.2.11 '@types/node': - specifier: ^22.15.29 - version: 22.15.29 + specifier: ^22.15.31 + version: 22.15.31 + clean-pkg-json: + specifier: ^1.3.0 + version: 1.3.0 emnapi: specifier: ^1.4.3 version: 1.4.3 + prettier: + specifier: ^3.5.3 + version: 3.5.3 + prettier-plugin-pkg: + specifier: ^0.21.1 + version: 0.21.1(prettier@3.5.3) typescript: specifier: ^5.8.3 version: 5.8.3 vitest: - specifier: ^3.2.1 - version: 3.2.1(@types/node@22.15.29) + specifier: ^3.2.3 + version: 3.2.3(@types/node@22.15.31) fixtures/pnpm: devDependencies: @@ -44,6 +57,9 @@ importers: mathjs: specifier: 14.4.0 version: 14.4.0 + minimatch: + specifier: 10.0.1 + version: 10.0.1 postcss: specifier: 8.5.3 version: 8.5.3 @@ -58,7 +74,7 @@ importers: version: 5.18.1 unrs-resolver: specifier: workspace:* - version: link:../../npm + version: link:../.. fixtures/pnpm-workspace/packages/app: dependencies: @@ -72,16 +88,10 @@ importers: specifier: ^19.1.0 version: 19.1.0 - npm: - dependencies: - napi-postinstall: - specifier: ^0.2.2 - version: 0.2.4 - packages: - '@babel/runtime@7.27.0': - resolution: {integrity: sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==} + '@babel/runtime@7.27.6': + resolution: {integrity: sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==} engines: {node: '>=6.9.0'} '@emnapi/core@1.4.3': @@ -102,158 +112,158 @@ packages: '@emotion/unitless@0.8.1': resolution: {integrity: sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==} - '@esbuild/aix-ppc64@0.25.3': - resolution: {integrity: sha512-W8bFfPA8DowP8l//sxjJLSLkD8iEjMc7cBVyP+u4cEv9sM7mdUCkgsj+t0n/BWPFtv7WWCN5Yzj0N6FJNUUqBQ==} + '@esbuild/aix-ppc64@0.25.5': + resolution: {integrity: sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.25.3': - resolution: {integrity: sha512-XelR6MzjlZuBM4f5z2IQHK6LkK34Cvv6Rj2EntER3lwCBFdg6h2lKbtRjpTTsdEjD/WSe1q8UyPBXP1x3i/wYQ==} + '@esbuild/android-arm64@0.25.5': + resolution: {integrity: sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.25.3': - resolution: {integrity: sha512-PuwVXbnP87Tcff5I9ngV0lmiSu40xw1At6i3GsU77U7cjDDB4s0X2cyFuBiDa1SBk9DnvWwnGvVaGBqoFWPb7A==} + '@esbuild/android-arm@0.25.5': + resolution: {integrity: sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.25.3': - resolution: {integrity: sha512-ogtTpYHT/g1GWS/zKM0cc/tIebFjm1F9Aw1boQ2Y0eUQ+J89d0jFY//s9ei9jVIlkYi8AfOjiixcLJSGNSOAdQ==} + '@esbuild/android-x64@0.25.5': + resolution: {integrity: sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.25.3': - resolution: {integrity: sha512-eESK5yfPNTqpAmDfFWNsOhmIOaQA59tAcF/EfYvo5/QWQCzXn5iUSOnqt3ra3UdzBv073ykTtmeLJZGt3HhA+w==} + '@esbuild/darwin-arm64@0.25.5': + resolution: {integrity: sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.25.3': - resolution: {integrity: sha512-Kd8glo7sIZtwOLcPbW0yLpKmBNWMANZhrC1r6K++uDR2zyzb6AeOYtI6udbtabmQpFaxJ8uduXMAo1gs5ozz8A==} + '@esbuild/darwin-x64@0.25.5': + resolution: {integrity: sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.25.3': - resolution: {integrity: sha512-EJiyS70BYybOBpJth3M0KLOus0n+RRMKTYzhYhFeMwp7e/RaajXvP+BWlmEXNk6uk+KAu46j/kaQzr6au+JcIw==} + '@esbuild/freebsd-arm64@0.25.5': + resolution: {integrity: sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.3': - resolution: {integrity: sha512-Q+wSjaLpGxYf7zC0kL0nDlhsfuFkoN+EXrx2KSB33RhinWzejOd6AvgmP5JbkgXKmjhmpfgKZq24pneodYqE8Q==} + '@esbuild/freebsd-x64@0.25.5': + resolution: {integrity: sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.25.3': - resolution: {integrity: sha512-xCUgnNYhRD5bb1C1nqrDV1PfkwgbswTTBRbAd8aH5PhYzikdf/ddtsYyMXFfGSsb/6t6QaPSzxtbfAZr9uox4A==} + '@esbuild/linux-arm64@0.25.5': + resolution: {integrity: sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.25.3': - resolution: {integrity: sha512-dUOVmAUzuHy2ZOKIHIKHCm58HKzFqd+puLaS424h6I85GlSDRZIA5ycBixb3mFgM0Jdh+ZOSB6KptX30DD8YOQ==} + '@esbuild/linux-arm@0.25.5': + resolution: {integrity: sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.25.3': - resolution: {integrity: sha512-yplPOpczHOO4jTYKmuYuANI3WhvIPSVANGcNUeMlxH4twz/TeXuzEP41tGKNGWJjuMhotpGabeFYGAOU2ummBw==} + '@esbuild/linux-ia32@0.25.5': + resolution: {integrity: sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.25.3': - resolution: {integrity: sha512-P4BLP5/fjyihmXCELRGrLd793q/lBtKMQl8ARGpDxgzgIKJDRJ/u4r1A/HgpBpKpKZelGct2PGI4T+axcedf6g==} + '@esbuild/linux-loong64@0.25.5': + resolution: {integrity: sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.25.3': - resolution: {integrity: sha512-eRAOV2ODpu6P5divMEMa26RRqb2yUoYsuQQOuFUexUoQndm4MdpXXDBbUoKIc0iPa4aCO7gIhtnYomkn2x+bag==} + '@esbuild/linux-mips64el@0.25.5': + resolution: {integrity: sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.25.3': - resolution: {integrity: sha512-ZC4jV2p7VbzTlnl8nZKLcBkfzIf4Yad1SJM4ZMKYnJqZFD4rTI+pBG65u8ev4jk3/MPwY9DvGn50wi3uhdaghg==} + '@esbuild/linux-ppc64@0.25.5': + resolution: {integrity: sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.25.3': - resolution: {integrity: sha512-LDDODcFzNtECTrUUbVCs6j9/bDVqy7DDRsuIXJg6so+mFksgwG7ZVnTruYi5V+z3eE5y+BJZw7VvUadkbfg7QA==} + '@esbuild/linux-riscv64@0.25.5': + resolution: {integrity: sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.25.3': - resolution: {integrity: sha512-s+w/NOY2k0yC2p9SLen+ymflgcpRkvwwa02fqmAwhBRI3SC12uiS10edHHXlVWwfAagYSY5UpmT/zISXPMW3tQ==} + '@esbuild/linux-s390x@0.25.5': + resolution: {integrity: sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.25.3': - resolution: {integrity: sha512-nQHDz4pXjSDC6UfOE1Fw9Q8d6GCAd9KdvMZpfVGWSJztYCarRgSDfOVBY5xwhQXseiyxapkiSJi/5/ja8mRFFA==} + '@esbuild/linux-x64@0.25.5': + resolution: {integrity: sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.3': - resolution: {integrity: sha512-1QaLtOWq0mzK6tzzp0jRN3eccmN3hezey7mhLnzC6oNlJoUJz4nym5ZD7mDnS/LZQgkrhEbEiTn515lPeLpgWA==} + '@esbuild/netbsd-arm64@0.25.5': + resolution: {integrity: sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.3': - resolution: {integrity: sha512-i5Hm68HXHdgv8wkrt+10Bc50zM0/eonPb/a/OFVfB6Qvpiirco5gBA5bz7S2SHuU+Y4LWn/zehzNX14Sp4r27g==} + '@esbuild/netbsd-x64@0.25.5': + resolution: {integrity: sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.3': - resolution: {integrity: sha512-zGAVApJEYTbOC6H/3QBr2mq3upG/LBEXr85/pTtKiv2IXcgKV0RT0QA/hSXZqSvLEpXeIxah7LczB4lkiYhTAQ==} + '@esbuild/openbsd-arm64@0.25.5': + resolution: {integrity: sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.3': - resolution: {integrity: sha512-fpqctI45NnCIDKBH5AXQBsD0NDPbEFczK98hk/aa6HJxbl+UtLkJV2+Bvy5hLSLk3LHmqt0NTkKNso1A9y1a4w==} + '@esbuild/openbsd-x64@0.25.5': + resolution: {integrity: sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.25.3': - resolution: {integrity: sha512-ROJhm7d8bk9dMCUZjkS8fgzsPAZEjtRJqCAmVgB0gMrvG7hfmPmz9k1rwO4jSiblFjYmNvbECL9uhaPzONMfgA==} + '@esbuild/sunos-x64@0.25.5': + resolution: {integrity: sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.25.3': - resolution: {integrity: sha512-YWcow8peiHpNBiIXHwaswPnAXLsLVygFwCB3A7Bh5jRkIBFWHGmNQ48AlX4xDvQNoMZlPYzjVOQDYEzWCqufMQ==} + '@esbuild/win32-arm64@0.25.5': + resolution: {integrity: sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.25.3': - resolution: {integrity: sha512-qspTZOIGoXVS4DpNqUYUs9UxVb04khS1Degaw/MnfMe7goQ3lTfQ13Vw4qY/Nj0979BGvMRpAYbs/BAxEvU8ew==} + '@esbuild/win32-ia32@0.25.5': + resolution: {integrity: sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.25.3': - resolution: {integrity: sha512-ICgUR+kPimx0vvRzf+N/7L7tVSQeE3BYY+NhHRHXS1kBuPO7z2+7ea2HbhDyZdTephgvNvKrlDDKUexuCVBVvg==} + '@esbuild/win32-x64@0.25.5': + resolution: {integrity: sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==} engines: {node: '>=18'} cpu: [x64] os: [win32] - '@inquirer/checkbox@4.1.5': - resolution: {integrity: sha512-swPczVU+at65xa5uPfNP9u3qx/alNwiaykiI/ExpsmMSQW55trmZcwhYWzw/7fj+n6Q8z1eENvR7vFfq9oPSAQ==} + '@inquirer/checkbox@4.1.8': + resolution: {integrity: sha512-d/QAsnwuHX2OPolxvYcgSj7A9DO9H6gVOy2DvBTx+P2LH2iRTo/RSGV3iwCzW024nP9hw98KIuDmdyhZQj1UQg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -261,8 +271,8 @@ packages: '@types/node': optional: true - '@inquirer/confirm@5.1.9': - resolution: {integrity: sha512-NgQCnHqFTjF7Ys2fsqK2WtnA8X1kHyInyG+nMIuHowVTIgIuS10T4AznI/PvbqSpJqjCUqNBlKGh1v3bwLFL4w==} + '@inquirer/confirm@5.1.12': + resolution: {integrity: sha512-dpq+ielV9/bqgXRUbNH//KsY6WEw9DrGPmipkpmgC1Y46cwuBTNx7PXFWTjc3MQ+urcc0QxoVHcMI0FW4Ok0hg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -270,8 +280,8 @@ packages: '@types/node': optional: true - '@inquirer/core@10.1.10': - resolution: {integrity: sha512-roDaKeY1PYY0aCqhRmXihrHjoSW2A00pV3Ke5fTpMCkzcGF64R8e0lw3dK+eLEHwS4vB5RnW1wuQmvzoRul8Mw==} + '@inquirer/core@10.1.13': + resolution: {integrity: sha512-1viSxebkYN2nJULlzCxES6G9/stgHSepZ9LqqfdIGPHj5OHhiBUXVS0a6R0bEC2A+VL4D9w6QB66ebCr6HGllA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -279,8 +289,8 @@ packages: '@types/node': optional: true - '@inquirer/editor@4.2.10': - resolution: {integrity: sha512-5GVWJ+qeI6BzR6TIInLP9SXhWCEcvgFQYmcRG6d6RIlhFjM5TyG18paTGBgRYyEouvCmzeco47x9zX9tQEofkw==} + '@inquirer/editor@4.2.13': + resolution: {integrity: sha512-WbicD9SUQt/K8O5Vyk9iC2ojq5RHoCLK6itpp2fHsWe44VxxcA9z3GTWlvjSTGmMQpZr+lbVmrxdHcumJoLbMA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -288,8 +298,8 @@ packages: '@types/node': optional: true - '@inquirer/expand@4.0.12': - resolution: {integrity: sha512-jV8QoZE1fC0vPe6TnsOfig+qwu7Iza1pkXoUJ3SroRagrt2hxiL+RbM432YAihNR7m7XnU0HWl/WQ35RIGmXHw==} + '@inquirer/expand@4.0.15': + resolution: {integrity: sha512-4Y+pbr/U9Qcvf+N/goHzPEXiHH8680lM3Dr3Y9h9FFw4gHS+zVpbj8LfbKWIb/jayIB4aSO4pWiBTrBYWkvi5A==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -297,12 +307,12 @@ packages: '@types/node': optional: true - '@inquirer/figures@1.0.11': - resolution: {integrity: sha512-eOg92lvrn/aRUqbxRyvpEWnrvRuTYRifixHkYVpJiygTgVSBIHDqLh0SrMQXkafvULg3ck11V7xvR+zcgvpHFw==} + '@inquirer/figures@1.0.12': + resolution: {integrity: sha512-MJttijd8rMFcKJC8NYmprWr6hD3r9Gd9qUC0XwPNwoEPWSMVJwA2MlXxF+nhZZNMY+HXsWa+o7KY2emWYIn0jQ==} engines: {node: '>=18'} - '@inquirer/input@4.1.9': - resolution: {integrity: sha512-mshNG24Ij5KqsQtOZMgj5TwEjIf+F2HOESk6bjMwGWgcH5UBe8UoljwzNFHqdMbGYbgAf6v2wU/X9CAdKJzgOA==} + '@inquirer/input@4.1.12': + resolution: {integrity: sha512-xJ6PFZpDjC+tC1P8ImGprgcsrzQRsUh9aH3IZixm1lAZFK49UGHxM3ltFfuInN2kPYNfyoPRh+tU4ftsjPLKqQ==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -310,8 +320,8 @@ packages: '@types/node': optional: true - '@inquirer/number@3.0.12': - resolution: {integrity: sha512-7HRFHxbPCA4e4jMxTQglHJwP+v/kpFsCf2szzfBHy98Wlc3L08HL76UDiA87TOdX5fwj2HMOLWqRWv9Pnn+Z5Q==} + '@inquirer/number@3.0.15': + resolution: {integrity: sha512-xWg+iYfqdhRiM55MvqiTCleHzszpoigUpN5+t1OMcRkJrUrw7va3AzXaxvS+Ak7Gny0j2mFSTv2JJj8sMtbV2g==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -319,8 +329,8 @@ packages: '@types/node': optional: true - '@inquirer/password@4.0.12': - resolution: {integrity: sha512-FlOB0zvuELPEbnBYiPaOdJIaDzb2PmJ7ghi/SVwIHDDSQ2K4opGBkF+5kXOg6ucrtSUQdLhVVY5tycH0j0l+0g==} + '@inquirer/password@4.0.15': + resolution: {integrity: sha512-75CT2p43DGEnfGTaqFpbDC2p2EEMrq0S+IRrf9iJvYreMy5mAWj087+mdKyLHapUEPLjN10mNvABpGbk8Wdraw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -328,8 +338,8 @@ packages: '@types/node': optional: true - '@inquirer/prompts@7.5.0': - resolution: {integrity: sha512-tk8Bx7l5AX/CR0sVfGj3Xg6v7cYlFBkEahH+EgBB+cZib6Fc83dwerTbzj7f2+qKckjIUGsviWRI1d7lx6nqQA==} + '@inquirer/prompts@7.5.3': + resolution: {integrity: sha512-8YL0WiV7J86hVAxrh3fE5mDCzcTDe1670unmJRz6ArDgN+DBK1a0+rbnNWp4DUB5rPMwqD5ZP6YHl9KK1mbZRg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -337,8 +347,8 @@ packages: '@types/node': optional: true - '@inquirer/rawlist@4.1.0': - resolution: {integrity: sha512-6ob45Oh9pXmfprKqUiEeMz/tjtVTFQTgDDz1xAMKMrIvyrYjAmRbQZjMJfsictlL4phgjLhdLu27IkHNnNjB7g==} + '@inquirer/rawlist@4.1.3': + resolution: {integrity: sha512-7XrV//6kwYumNDSsvJIPeAqa8+p7GJh7H5kRuxirct2cgOcSWwwNGoXDRgpNFbY/MG2vQ4ccIWCi8+IXXyFMZA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -346,8 +356,8 @@ packages: '@types/node': optional: true - '@inquirer/search@3.0.12': - resolution: {integrity: sha512-H/kDJA3kNlnNIjB8YsaXoQI0Qccgf0Na14K1h8ExWhNmUg2E941dyFPrZeugihEa9AZNW5NdsD/NcvUME83OPQ==} + '@inquirer/search@3.0.15': + resolution: {integrity: sha512-YBMwPxYBrADqyvP4nNItpwkBnGGglAvCLVW8u4pRmmvOsHUtCAUIMbUrLX5B3tFL1/WsLGdQ2HNzkqswMs5Uaw==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -355,8 +365,8 @@ packages: '@types/node': optional: true - '@inquirer/select@4.2.0': - resolution: {integrity: sha512-KkXQ4aSySWimpV4V/TUJWdB3tdfENZUU765GjOIZ0uPwdbGIG6jrxD4dDf1w68uP+DVtfNhr1A92B+0mbTZ8FA==} + '@inquirer/select@4.2.3': + resolution: {integrity: sha512-OAGhXU0Cvh0PhLz9xTF/kx6g6x+sP+PcyTiLvCrewI99P3BBeexD+VbuwkNDvqGkk3y2h5ZiWLeRP7BFlhkUDg==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -364,8 +374,8 @@ packages: '@types/node': optional: true - '@inquirer/type@3.0.6': - resolution: {integrity: sha512-/mKVCtVpyBu3IDarv0G+59KC4stsD5mDsGpYh+GKs1NZT88Jh52+cuoA1AtLk2Q0r/quNl+1cSUyLRHBFeD0XA==} + '@inquirer/type@3.0.7': + resolution: {integrity: sha512-PfunHQcjwnju84L+ycmcMKB/pTPIngjUJvfnRhKY6FKPuYXlM4aQCb/nIdTFR6BEhMjFvngzvng/vBAJMZpLSA==} engines: {node: '>=18'} peerDependencies: '@types/node': '>=18' @@ -376,8 +386,8 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@napi-rs/cli@3.0.0-alpha.87': - resolution: {integrity: sha512-0pMA5n/f3jO8v0ey7nVTE3TXwAXdavfFNejLjU5KL8rc7wZnUKi+2xQ/sEjh8ac47QLPeVBqnzdJUGiVCd6HCw==} + '@napi-rs/cli@3.0.0-alpha.88': + resolution: {integrity: sha512-tAzLbGY+7JhRwAfeykv/Rl44mq3rufJzV5MuVQ2Nr+bMq6fr8winy0kV/myACDtYiXYx5Ax+XMHBKiLU2Xw5Ng==} engines: {node: '>= 16'} hasBin: true peerDependencies: @@ -412,225 +422,225 @@ packages: '@napi-rs/cross-toolchain-x64-target-x86_64': optional: true - '@napi-rs/lzma-android-arm-eabi@1.4.1': - resolution: {integrity: sha512-yenreSpZ9IrqppJOiWDqWMmja7XtSgio9LhtxYwgdILmy/OJTe/mlTYv+FhJBf7hIV9Razu5eBuEa3zKri81IA==} + '@napi-rs/lzma-android-arm-eabi@1.4.3': + resolution: {integrity: sha512-XpjRUZ/EbWtVbMvW+ucon5Ykz7PjMoX65mIlUdAiVnaPGykzFAUrl8dl6Br5bfqnhQQfDjjUIgTAwWl3G++n1g==} engines: {node: '>= 10'} cpu: [arm] os: [android] - '@napi-rs/lzma-android-arm64@1.4.1': - resolution: {integrity: sha512-piutVBz5B1TNxXeEjub0n/IKI6dMaXPPRbVSXuc4gnZgzcihNDUh68vcLZgYd+IMiACZvBxvx2O3t5nthtph3A==} + '@napi-rs/lzma-android-arm64@1.4.3': + resolution: {integrity: sha512-Bve6BF/4pnlO6HotIgRWgmUT3rbbW/QH471RF/GBA29GfEeUOPEdfQWC7tlzrLYsVFNX2KCWKd+XlxQNz9sRaA==} engines: {node: '>= 10'} cpu: [arm64] os: [android] - '@napi-rs/lzma-darwin-arm64@1.4.1': - resolution: {integrity: sha512-sDfOhQQFqV8lGbpgJN9DqNLBPR7QOfYjcWUv8FOGPaVP1LPJDnrc5uCpRWWEa2zIKmTiO8P9xzIl0TDzrYmghg==} + '@napi-rs/lzma-darwin-arm64@1.4.3': + resolution: {integrity: sha512-UxTb56kL6pSVTsZ1ShibnqLSwJZLTWtPU5TNYuyIjVNQYAIG8JQ5Yxz35azjwBCK7AjD8pBdpWLYUSyJRGAVAw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@napi-rs/lzma-darwin-x64@1.4.1': - resolution: {integrity: sha512-S5/RbC6EP4QkYy2xhxbfm48ZD9FkysfpWY4Slve0nj5RGGsHvcJBg2Pi69jrTPB/zLKz2SUa0i+RfUt9zvZNaw==} + '@napi-rs/lzma-darwin-x64@1.4.3': + resolution: {integrity: sha512-ps6HiwGKS1P4ottyV2/hVboZ0ugdM1Z1qO9YFpcuKweORfxAkxwJ6S8jOt7G27LQiWiiQHVwsUCODTHDFhOUPQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@napi-rs/lzma-freebsd-x64@1.4.1': - resolution: {integrity: sha512-4AFnq6aZnclwameSBkDWu5Ftb8y4GwvVXeQXJKbN7hf7O5GG/8QpQB1R1NJw2QORUhpKwjAQUpbkTyhL2GFWWw==} + '@napi-rs/lzma-freebsd-x64@1.4.3': + resolution: {integrity: sha512-W49h41U3+vLnbthbPzvJX1fQtTG+1jyUlfB+wX3oxILvIur06PjJRdMXrFtOZpWkFsihK9gO2DRkQYQJIIgTZw==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@napi-rs/lzma-linux-arm-gnueabihf@1.4.1': - resolution: {integrity: sha512-j5rL1YRIm6rWmmGAvN6DPX6QuRjvFGB93xJ7DTRB47GXW4zHekXae6ivowjJ95vT4Iz4hSWkZbuwAy95eFrWRA==} + '@napi-rs/lzma-linux-arm-gnueabihf@1.4.3': + resolution: {integrity: sha512-11PNPiMGuwwxIxd9yPZY3Ek6RFGFRFQb/AtMStJIwlmJ6sM/djEknClLJVbVXbC/nqm7htVZEr+qmYgoDy0fAw==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@napi-rs/lzma-linux-arm64-gnu@1.4.1': - resolution: {integrity: sha512-1XdFGKyTS9m+VrRQYs9uz+ToHf4Jwm0ejHU48k9lT9MPl8jSqzKdVtFzZBPzronHteSynBfKmUq0+HeWmjrsOQ==} + '@napi-rs/lzma-linux-arm64-gnu@1.4.3': + resolution: {integrity: sha512-XzlxZjSXTcrWFHbvvv2xbV5+bSV5IJqCJ8CCksc7xV3uWEAso9yBPJ8VSRD3GPc7ZoBDRqJmgCb/HQzHpLBekw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] libc: [glibc] - '@napi-rs/lzma-linux-arm64-musl@1.4.1': - resolution: {integrity: sha512-9d09tYS0/rBwIk1QTcO2hMZEB/ZpsG2+uFW5am1RHElSWMclObirB1An7b6AMDJcRvcomkOg2GZ9COzrvHKwEA==} + '@napi-rs/lzma-linux-arm64-musl@1.4.3': + resolution: {integrity: sha512-k4fWiI4Pm61Esj8hnm7NWIbpZueTtP2jlJqmMhTqJyjqW3NUxbTHjSErZOZKIFRF1B3if4v5Tyzo7JL2X+BaSQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] libc: [musl] - '@napi-rs/lzma-linux-ppc64-gnu@1.4.1': - resolution: {integrity: sha512-UzEkmsgoJ3IOGIRb6kBzNiw+ThUpiighop7dVYfSqlF5juGzwf7YewC57RGn4FoJCvadOCrSm5VikAcgrwVgAw==} + '@napi-rs/lzma-linux-ppc64-gnu@1.4.3': + resolution: {integrity: sha512-tTIfk+TYZYbFySxaCMuzp4Zz1T3I6OYVYNAm+IrCSkZDLmUKUzBK3+Su+mT+PjcTNsAiHBa5NVjARXC7b7jmgQ==} engines: {node: '>= 10'} cpu: [ppc64] os: [linux] libc: [glibc] - '@napi-rs/lzma-linux-riscv64-gnu@1.4.1': - resolution: {integrity: sha512-9dUKlZ1PdwxTaFF+j3oc+xjlk9nqFwo1NWWOH30uwjl4Rm5Gkv+Fx0pHrzu4kR/iVA+oyQqa9/2uDYnGSTijBA==} + '@napi-rs/lzma-linux-riscv64-gnu@1.4.3': + resolution: {integrity: sha512-HPyLYOYhkN7QYaWiKWhSnsLmx/l0pqgiiyaYeycgxCm9dwL8ummFWxveZqYjqdbUUvG7Mgi1jqgRe+55MVdyZQ==} engines: {node: '>= 10'} cpu: [riscv64] os: [linux] libc: [glibc] - '@napi-rs/lzma-linux-s390x-gnu@1.4.1': - resolution: {integrity: sha512-MOVXUWJSLLCJDCCAlGa39sh7nv9XjvXzCf7QJus7rD8Ciz0mpXNXF9mg0ji7/MZ7pZlKPlXjXDnpVCfFdSEaFQ==} + '@napi-rs/lzma-linux-s390x-gnu@1.4.3': + resolution: {integrity: sha512-YkcV+RSZZIMM3D5sPZqvo2Q7/tHXBhgJWBi+6ceo46pTlqgn/nH+pVz+CzsDmLWz5hqNSXyv5IAhOcg2CH6rAg==} engines: {node: '>= 10'} cpu: [s390x] os: [linux] libc: [glibc] - '@napi-rs/lzma-linux-x64-gnu@1.4.1': - resolution: {integrity: sha512-Sxu7aJxU1sDbUTqjqLVDV3DCOAlbsFKvmuCN/S5uXBJd1IF2wJ9jK3NbFzfqTAo5Hudx8Y7kOb6+3K+fYPI1KQ==} + '@napi-rs/lzma-linux-x64-gnu@1.4.3': + resolution: {integrity: sha512-ep6PLjN1+g4P12Hc7sLRmVpXXaHX22ykqxnOzjXUoj1KTph5XgM4+fUCyE5dsYI+lB4/tXqFuf9ZeFgHk5f00A==} engines: {node: '>= 10'} cpu: [x64] os: [linux] libc: [glibc] - '@napi-rs/lzma-linux-x64-musl@1.4.1': - resolution: {integrity: sha512-4I3BeKBQJSE5gF2/VTEv7wCLLjhapeutbCGpZPmDiLHZ74rm9edmNXAlKpdjADQ4YDLJ2GIBzttvwLXkJ9U+cw==} + '@napi-rs/lzma-linux-x64-musl@1.4.3': + resolution: {integrity: sha512-QkCO6rVw0Z7eY0ziVc4aCFplbOTMpt0UBLPXWxsPd2lXtkAlRChzqaHOxdcL/HoLmBsqdCxmG0EZuHuAP/vKZQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] libc: [musl] - '@napi-rs/lzma-wasm32-wasi@1.4.1': - resolution: {integrity: sha512-s32HdKqQWbohf6DGWpG9YMODaBdbKJ++JpNr6Ii7821sKf4h/o+p8IRFTOaWdmdJdllEWlRirnd5crA29VivJQ==} + '@napi-rs/lzma-wasm32-wasi@1.4.3': + resolution: {integrity: sha512-+rMamB0xaeDyVt4OP4cV888cnmso+m78iUebNhGcrL/WXIziwql50KQrmj7PBdBCza/W7XEcraZT8pO8gSDGcg==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@napi-rs/lzma-win32-arm64-msvc@1.4.1': - resolution: {integrity: sha512-ISz+v7ML5mKnjEZ7Kk4Z1BIn411r/fz3tDy9j5yDnwQI0MgTsUQFrIQElGUpULWYs2aYc6EZ9PhECbLBfSjh7A==} + '@napi-rs/lzma-win32-arm64-msvc@1.4.3': + resolution: {integrity: sha512-6gQ+R6ztw11hswdsEu0jsOOXXnJPwhOA1yHRjqfuFemhf6esMd8l9b0uh3BfLBNe7qumtrH4KLrHu8yC9pSY3g==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@napi-rs/lzma-win32-ia32-msvc@1.4.1': - resolution: {integrity: sha512-3WKuCpZBrd7Jrw+h1jSu5XAsRWepMJu0sYuRoA4Y4Cwfu9gI7p5Z5Bc510nfjg7M7xvdpkI4UoW2WY7kBFRYrQ==} + '@napi-rs/lzma-win32-ia32-msvc@1.4.3': + resolution: {integrity: sha512-+AJeJQoGE+QtZKlwM4VzDkfLmUa+6DsGOO5zdbIPlRCB6PEstRCXxp8lkMiQBNgk9f/IO0UEkRcJSZ+Hhqd8zw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@napi-rs/lzma-win32-x64-msvc@1.4.1': - resolution: {integrity: sha512-0ixRo5z1zFXdh62hlrTV+QCTKHK0te5NHKaExOluhtcc6AdpMmpslvM9JhUxNHI+zM46w/DmmcvcOtqsaTmHgg==} + '@napi-rs/lzma-win32-x64-msvc@1.4.3': + resolution: {integrity: sha512-66dFCX9ACpVUyTTom89nxhllc88yJyjxGFHO0M2olFcrSJArulfbE9kNIATgh04NDAe/l8VsDhnAxWuvJY1GuA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@napi-rs/lzma@1.4.1': - resolution: {integrity: sha512-5f8K9NHjwHjZKGm3SS+7CFxXQhz8rbg2umBm/9g0xQRXBdYEI31N5z1ACuk9bmBQOusXAq9CArGfs/ZQso2rUA==} + '@napi-rs/lzma@1.4.3': + resolution: {integrity: sha512-uBjLLoUM9ll03jL/bP7XjyPg0vTU0vQ35N1vVqQHbzlK/fVZyuF2B1p/A6kqPsFFhaoBKgO6oaxsuerv091RtQ==} engines: {node: '>= 10'} - '@napi-rs/tar-android-arm-eabi@0.1.4': - resolution: {integrity: sha512-LMSysWp5AmZj1NOCB2jshc9KCvp4gm7vm0Cra5U2crMvlj/fwGrvv6+EzSw49y8wCkNEcQ8QaGq5NBQKiLogSg==} + '@napi-rs/tar-android-arm-eabi@0.1.5': + resolution: {integrity: sha512-FM2qNG3ELeYibnZC8dfsCV4i/pql1nlLKVINfRC7TSwqFfgj5gbezZ0rT8gRPHbLyslVt6m4MPZfRE8Uj/MuCA==} engines: {node: '>= 10'} cpu: [arm] os: [android] - '@napi-rs/tar-android-arm64@0.1.4': - resolution: {integrity: sha512-A/2rl8xr7F5yOtHVARROoSwjRRDNL1RlXCsg/K+RE5/V9iPBojsJsLpFPilp7InF6bi+z7aYn+yWCD6wSwfF4A==} + '@napi-rs/tar-android-arm64@0.1.5': + resolution: {integrity: sha512-OpP0QyD+K0a68nqyko793lLWiC2BN1wWF/Doatus1OCKxgj61vtrUPVO2cQGQS5i07I/+YGRF8lD0tQDrk4JDQ==} engines: {node: '>= 10'} cpu: [arm64] os: [android] - '@napi-rs/tar-darwin-arm64@0.1.4': - resolution: {integrity: sha512-mnGBswBRtxDqUwXUZx+f9Uuy2uPssxuvcWFTYgUSZqlS2pg/XIWZdHZhbqWqKGpjpZrYcr+42roytbWlZ+epMA==} + '@napi-rs/tar-darwin-arm64@0.1.5': + resolution: {integrity: sha512-sfyM/9gxFabdMTFt4quvLJuKbXS6StGIUf7Cp3l8aV2WqCURJevdpN6wW8XtGBo/iSnAP52ERwMRdyIavPYruw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@napi-rs/tar-darwin-x64@0.1.4': - resolution: {integrity: sha512-I81Fvl/cfnFVBET49xywNd57dXLJPO7jqrjD9Z2bKeXA0v0Zt1cwV1IOOTihFZXJv7kgu6EfNB7oumoLOTqq5A==} + '@napi-rs/tar-darwin-x64@0.1.5': + resolution: {integrity: sha512-NtY8bADKE/3ODBM3hW/RgPeeERJpI6/jgipT3eLJ/CQWY1VJ6t9GHR7anJKhx1oxVdmSfqfCGMolM8WPV9x9bw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@napi-rs/tar-freebsd-x64@0.1.4': - resolution: {integrity: sha512-p5OFr3MqidZHkt9bHV2FgeS6k06g+s0GR2kvj/wm2mIxr7u3/sj3+RTr7GHz5DQq08T7uH85HhsrGYWN3vxmSg==} + '@napi-rs/tar-freebsd-x64@0.1.5': + resolution: {integrity: sha512-azl0nWrDJAGg25cGVKEY7UtU5ABGz4sQASKvemDLwGbzMDtkJgCoPb+OunI1pezijRAyhiuZEQ4jK8S1qNAWCg==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] - '@napi-rs/tar-linux-arm-gnueabihf@0.1.4': - resolution: {integrity: sha512-POp2zb/Yuw6taEmrTlEoQI5S+2HmgfV1VtqGQZgRmCa85NlWLDsR6vbW9euu/6NbLj3ld15cCeJC2oJkv9k/xg==} + '@napi-rs/tar-linux-arm-gnueabihf@0.1.5': + resolution: {integrity: sha512-OjGdKjaW7b0m96rAvsLthMBhwYSSgpTM/WkHqRJo91HCYQ6tHXDBnq4VIQx2FpwT1PoetvRsbSgy0tOc95iYjA==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@napi-rs/tar-linux-arm64-gnu@0.1.4': - resolution: {integrity: sha512-TV+2AppSgJx5U9nk1C9bh1afWcBVnnANJ4SmtqUF6ediHcDS2rLebeI8BGljfnX9F149qbT9gOGN+R8tofpCsg==} + '@napi-rs/tar-linux-arm64-gnu@0.1.5': + resolution: {integrity: sha512-o3b2VE5c7+NFb6XRcXrdXgur1yhpx+XNItFoeJUMBE8z0AGAISf2DJSbcJawmefUvrGtr+iLr61hsr6f2hw+5Q==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] libc: [glibc] - '@napi-rs/tar-linux-arm64-musl@0.1.4': - resolution: {integrity: sha512-UFBvKpYmuQRbgmXuSSPb8mRjq4JRZLYJhqwrWWnlfQP13xK2WB7mL2GhewBgynSH4YKDm6biKhK6U5RrSWEDgw==} + '@napi-rs/tar-linux-arm64-musl@0.1.5': + resolution: {integrity: sha512-5xTxsoPVqovnZ197CqTc+q3psRM4i+ErdiyfDgkG4nP045jh50gp22WKZuE24dc7/iS+IyUrM3+PRbmj2mzR8g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] libc: [musl] - '@napi-rs/tar-linux-ppc64-gnu@0.1.4': - resolution: {integrity: sha512-HT+h6Wv51SKXqks8UBF+KVuNJ09fM1GyO+SvCnDB5MF66tGiI2C6/MSX69zf1ZeqjACds1K/UwKiZCmE76/j9A==} + '@napi-rs/tar-linux-ppc64-gnu@0.1.5': + resolution: {integrity: sha512-7FF1u8EkDpCEPCgU0/kvuzsO+opB7eIbsGfKRIbOqrDT7c1DYxDetNTtukPvNoT2kvwfxxThgTfcPADPxdOE/w==} engines: {node: '>= 10'} cpu: [ppc64] os: [linux] libc: [glibc] - '@napi-rs/tar-linux-s390x-gnu@0.1.4': - resolution: {integrity: sha512-SJ+HSr281Y6cgJrQ4nkYbXaTHAmTLv/FZm5k9ZRA6Khml//ZoWi7CiT8dnPeD4QxYwCzAFA4aYMUOQJM/mk2/w==} + '@napi-rs/tar-linux-s390x-gnu@0.1.5': + resolution: {integrity: sha512-uyIZ7OLCLHtVBpogoJUD0GSAF1IUa3d5c5AVUemTLIwYkVgzdEB+khh3i2+/oKObf79ZKfQ8mYxOryHqfx+ulw==} engines: {node: '>= 10'} cpu: [s390x] os: [linux] libc: [glibc] - '@napi-rs/tar-linux-x64-gnu@0.1.4': - resolution: {integrity: sha512-LrF0lRFiFOkO40jfgTdF8dRTvYOLV52fdZ/YnJuBodNcxqEl9rChO3v5Uag//sy0me85FjqtobQNRQP8Nd80dA==} + '@napi-rs/tar-linux-x64-gnu@0.1.5': + resolution: {integrity: sha512-y8pFyVTU6lSYiW2lse6i1Ns9yt9mBkAqPbcJnIjqC7ZqRd61T6g3XZDSrKmsM6ycTfsAqoE5WyyFxBjQN29AOA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] libc: [glibc] - '@napi-rs/tar-linux-x64-musl@0.1.4': - resolution: {integrity: sha512-etGUWbs+Tk1PtzgyWrVzXa2fQrHNKSc/whHm+4x1Num8Oz+wGdjCDTUktYxAVy33PKZhdblVxxE83QXxkgjneQ==} + '@napi-rs/tar-linux-x64-musl@0.1.5': + resolution: {integrity: sha512-8phLYc0QX+tqvp34PQHUulZUi4sy/fdg1KgFHiyYExTRRleBB01vM7KSn7Bk9dwH7lannO5D7j4O8OY46Xcr/A==} engines: {node: '>= 10'} cpu: [x64] os: [linux] libc: [musl] - '@napi-rs/tar-wasm32-wasi@0.1.4': - resolution: {integrity: sha512-mANkm93AKy+OspkOBAC5WI64SopXT0VawdTjpeGW1OgyUSJWdUB5rhs3I7B/HW1bi5tsUoZOZQe3rVgYdfzA6g==} + '@napi-rs/tar-wasm32-wasi@0.1.5': + resolution: {integrity: sha512-OpVWC/bwY0zb6nbQDg6koxeZGb441gXwPkaYVjaK4O0TJjNpRKbokLAMlGFtcc/sVSPjghFL0+enfnLDt/P7og==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@napi-rs/tar-win32-arm64-msvc@0.1.4': - resolution: {integrity: sha512-/5/gp6WR9b36CysJDe8AdyjNeje+NqCniYJz/AZc+UvpKwG8MG9nS6TMpJ9IgrQacJXvc4lWXxYyn6uuPQVvaQ==} + '@napi-rs/tar-win32-arm64-msvc@0.1.5': + resolution: {integrity: sha512-FXwQA2Ib55q98szshvDsitgo2iLW2lTD1Q53e8dPMGobPa2yL5e8IjJDCcMI7XJwBZPl9YjJk7nAb8y20DXF+Q==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@napi-rs/tar-win32-ia32-msvc@0.1.4': - resolution: {integrity: sha512-HnQi0op9BqJqPekKXhEAI1TWkLtavxKDBDGXNhUSm2//jriMeRykahUcKoUUxr1UGrmtxpc5dx0cThBt13paEw==} + '@napi-rs/tar-win32-ia32-msvc@0.1.5': + resolution: {integrity: sha512-XEt58yFslNkwf2yJ+uX5nDNmPAk15Metkx2hVPeH29mOpuG2H8nuS8/42hZ+dQfZf3xABRjyurVMMH9JcgLZIQ==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@napi-rs/tar-win32-x64-msvc@0.1.4': - resolution: {integrity: sha512-vy2ebEXerblni6XOgi3a27+CnI6PdQ9Phy/ru5HM4bVd/oulAJohmynAmBAB1AmXg1NLbAEWu43nATEDp5O2hA==} + '@napi-rs/tar-win32-x64-msvc@0.1.5': + resolution: {integrity: sha512-9Rq0Ob4S5NGFwNL3kGQkgrYlObqQgw19QMSZdVuhzZ9sSxn9OSF5cWgZ/n1oMEPWK+u6n9GSN2XbPn4DI7pm7Q==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@napi-rs/tar@0.1.4': - resolution: {integrity: sha512-hDsvmMZY8tl2CcLfjnTeE1o5W1eGTSL+ZIX8YEybtcJwA+Cc8SNHb7l6JqMnGcjOrWBZbHt8tzTN+W7qHS5Wmg==} + '@napi-rs/tar@0.1.5': + resolution: {integrity: sha512-skgWKcpjtUqJUk1jwhVl8vXYCXQlFC532KiryU3hQBr6ZIJk0E0qD9FG99hUqtPko8mIMS5HDPO+uSnvHfgRVg==} engines: {node: '>= 10'} - '@napi-rs/wasm-runtime@0.2.10': - resolution: {integrity: sha512-bCsCyeZEwVErsGmyPNSzwfwFn4OdxBj0mmv6hOFucB/k81Ojdu68RbZdxYsRQUPc9l6SU5F/cG+bXgWs3oUgsQ==} + '@napi-rs/wasm-runtime@0.2.11': + resolution: {integrity: sha512-9DPkXtvHydrcOsopiYpUgPHpmj0HWZKMUnL2dZqpvC42lsratuBG06V5ipyno0fUek5VlFsNQ+AcFATSrJXgMA==} '@napi-rs/wasm-tools-android-arm-eabi@0.0.3': resolution: {integrity: sha512-T2tme8w5jZ/ZCjJurqNtKCxYtGoDjW9v2rn1bfI60ewCfkYXNpxrTURdkOib85sz+BcwmOfXn0enbg5W9KohoQ==} @@ -772,114 +782,114 @@ packages: '@oxc-resolver/test-longfilename-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@file:fixtures/pnpm/longfilename': resolution: {directory: fixtures/pnpm/longfilename, type: directory} - '@rollup/rollup-android-arm-eabi@4.40.0': - resolution: {integrity: sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==} + '@rollup/rollup-android-arm-eabi@4.42.0': + resolution: {integrity: sha512-gldmAyS9hpj+H6LpRNlcjQWbuKUtb94lodB9uCz71Jm+7BxK1VIOo7y62tZZwxhA7j1ylv/yQz080L5WkS+LoQ==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.40.0': - resolution: {integrity: sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==} + '@rollup/rollup-android-arm64@4.42.0': + resolution: {integrity: sha512-bpRipfTgmGFdCZDFLRvIkSNO1/3RGS74aWkJJTFJBH7h3MRV4UijkaEUeOMbi9wxtxYmtAbVcnMtHTPBhLEkaw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.40.0': - resolution: {integrity: sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==} + '@rollup/rollup-darwin-arm64@4.42.0': + resolution: {integrity: sha512-JxHtA081izPBVCHLKnl6GEA0w3920mlJPLh89NojpU2GsBSB6ypu4erFg/Wx1qbpUbepn0jY4dVWMGZM8gplgA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.40.0': - resolution: {integrity: sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==} + '@rollup/rollup-darwin-x64@4.42.0': + resolution: {integrity: sha512-rv5UZaWVIJTDMyQ3dCEK+m0SAn6G7H3PRc2AZmExvbDvtaDc+qXkei0knQWcI3+c9tEs7iL/4I4pTQoPbNL2SA==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.40.0': - resolution: {integrity: sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==} + '@rollup/rollup-freebsd-arm64@4.42.0': + resolution: {integrity: sha512-fJcN4uSGPWdpVmvLuMtALUFwCHgb2XiQjuECkHT3lWLZhSQ3MBQ9pq+WoWeJq2PrNxr9rPM1Qx+IjyGj8/c6zQ==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.40.0': - resolution: {integrity: sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==} + '@rollup/rollup-freebsd-x64@4.42.0': + resolution: {integrity: sha512-CziHfyzpp8hJpCVE/ZdTizw58gr+m7Y2Xq5VOuCSrZR++th2xWAz4Nqk52MoIIrV3JHtVBhbBsJcAxs6NammOQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.40.0': - resolution: {integrity: sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==} + '@rollup/rollup-linux-arm-gnueabihf@4.42.0': + resolution: {integrity: sha512-UsQD5fyLWm2Fe5CDM7VPYAo+UC7+2Px4Y+N3AcPh/LdZu23YcuGPegQly++XEVaC8XUTFVPscl5y5Cl1twEI4A==} cpu: [arm] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm-musleabihf@4.40.0': - resolution: {integrity: sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==} + '@rollup/rollup-linux-arm-musleabihf@4.42.0': + resolution: {integrity: sha512-/i8NIrlgc/+4n1lnoWl1zgH7Uo0XK5xK3EDqVTf38KvyYgCU/Rm04+o1VvvzJZnVS5/cWSd07owkzcVasgfIkQ==} cpu: [arm] os: [linux] libc: [musl] - '@rollup/rollup-linux-arm64-gnu@4.40.0': - resolution: {integrity: sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==} + '@rollup/rollup-linux-arm64-gnu@4.42.0': + resolution: {integrity: sha512-eoujJFOvoIBjZEi9hJnXAbWg+Vo1Ov8n/0IKZZcPZ7JhBzxh2A+2NFyeMZIRkY9iwBvSjloKgcvnjTbGKHE44Q==} cpu: [arm64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.40.0': - resolution: {integrity: sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==} + '@rollup/rollup-linux-arm64-musl@4.42.0': + resolution: {integrity: sha512-/3NrcOWFSR7RQUQIuZQChLND36aTU9IYE4j+TB40VU78S+RA0IiqHR30oSh6P1S9f9/wVOenHQnacs/Byb824g==} cpu: [arm64] os: [linux] libc: [musl] - '@rollup/rollup-linux-loongarch64-gnu@4.40.0': - resolution: {integrity: sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==} + '@rollup/rollup-linux-loongarch64-gnu@4.42.0': + resolution: {integrity: sha512-O8AplvIeavK5ABmZlKBq9/STdZlnQo7Sle0LLhVA7QT+CiGpNVe197/t8Aph9bhJqbDVGCHpY2i7QyfEDDStDg==} cpu: [loong64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': - resolution: {integrity: sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==} + '@rollup/rollup-linux-powerpc64le-gnu@4.42.0': + resolution: {integrity: sha512-6Qb66tbKVN7VyQrekhEzbHRxXXFFD8QKiFAwX5v9Xt6FiJ3BnCVBuyBxa2fkFGqxOCSGGYNejxd8ht+q5SnmtA==} cpu: [ppc64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-riscv64-gnu@4.40.0': - resolution: {integrity: sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==} + '@rollup/rollup-linux-riscv64-gnu@4.42.0': + resolution: {integrity: sha512-KQETDSEBamQFvg/d8jajtRwLNBlGc3aKpaGiP/LvEbnmVUKlFta1vqJqTrvPtsYsfbE/DLg5CC9zyXRX3fnBiA==} cpu: [riscv64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-riscv64-musl@4.40.0': - resolution: {integrity: sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==} + '@rollup/rollup-linux-riscv64-musl@4.42.0': + resolution: {integrity: sha512-qMvnyjcU37sCo/tuC+JqeDKSuukGAd+pVlRl/oyDbkvPJ3awk6G6ua7tyum02O3lI+fio+eM5wsVd66X0jQtxw==} cpu: [riscv64] os: [linux] libc: [musl] - '@rollup/rollup-linux-s390x-gnu@4.40.0': - resolution: {integrity: sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==} + '@rollup/rollup-linux-s390x-gnu@4.42.0': + resolution: {integrity: sha512-I2Y1ZUgTgU2RLddUHXTIgyrdOwljjkmcZ/VilvaEumtS3Fkuhbw4p4hgHc39Ypwvo2o7sBFNl2MquNvGCa55Iw==} cpu: [s390x] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.40.0': - resolution: {integrity: sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==} + '@rollup/rollup-linux-x64-gnu@4.42.0': + resolution: {integrity: sha512-Gfm6cV6mj3hCUY8TqWa63DB8Mx3NADoFwiJrMpoZ1uESbK8FQV3LXkhfry+8bOniq9pqY1OdsjFWNsSbfjPugw==} cpu: [x64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.40.0': - resolution: {integrity: sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==} + '@rollup/rollup-linux-x64-musl@4.42.0': + resolution: {integrity: sha512-g86PF8YZ9GRqkdi0VoGlcDUb4rYtQKyTD1IVtxxN4Hpe7YqLBShA7oHMKU6oKTCi3uxwW4VkIGnOaH/El8de3w==} cpu: [x64] os: [linux] libc: [musl] - '@rollup/rollup-win32-arm64-msvc@4.40.0': - resolution: {integrity: sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==} + '@rollup/rollup-win32-arm64-msvc@4.42.0': + resolution: {integrity: sha512-+axkdyDGSp6hjyzQ5m1pgcvQScfHnMCcsXkx8pTgy/6qBmWVhtRVlgxjWwDp67wEXXUr0x+vD6tp5W4x6V7u1A==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.40.0': - resolution: {integrity: sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==} + '@rollup/rollup-win32-ia32-msvc@4.42.0': + resolution: {integrity: sha512-F+5J9pelstXKwRSDq92J0TEBXn2nfUrQGg+HK1+Tk7VOL09e0gBqUHugZv7SW4MGrYj41oNCUe3IKCDGVlis2g==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.40.0': - resolution: {integrity: sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==} + '@rollup/rollup-win32-x64-msvc@4.42.0': + resolution: {integrity: sha512-LpHiJRwkaVz/LqjHjK8LCi8osq7elmpwujwbXKNW88bM8eeGxavJIKKjkjpMHAh/2xfnrt1ZSnhTv41WYUHYmA==} cpu: [x64] os: [win32] @@ -895,17 +905,20 @@ packages: '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} - '@types/node@22.15.29': - resolution: {integrity: sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==} + '@types/estree@1.0.8': + resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + + '@types/node@22.15.31': + resolution: {integrity: sha512-jnVe5ULKl6tijxUhvQeNbQG/84fHfg+yMak02cT8QVhBx/F05rAVxCGBYYTh2EKz22D6JF5ktXuNwdx7b9iEGw==} '@types/stylis@4.2.5': resolution: {integrity: sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==} - '@vitest/expect@3.2.1': - resolution: {integrity: sha512-FqS/BnDOzV6+IpxrTg5GQRyLOCtcJqkwMwcS8qGCI2IyRVDwPAtutztaf1CjtPHlZlWtl1yUPCd7HM0cNiDOYw==} + '@vitest/expect@3.2.3': + resolution: {integrity: sha512-W2RH2TPWVHA1o7UmaFKISPvdicFJH+mjykctJFoAkUw+SPTJTGjUNdKscFBrqM7IPnCVu6zihtKYa7TkZS1dkQ==} - '@vitest/mocker@3.2.1': - resolution: {integrity: sha512-OXxMJnx1lkB+Vl65Re5BrsZEHc90s5NMjD23ZQ9NlU7f7nZiETGoX4NeKZSmsKjseuMq2uOYXdLOeoM0pJU+qw==} + '@vitest/mocker@3.2.3': + resolution: {integrity: sha512-cP6fIun+Zx8he4rbWvi+Oya6goKQDZK+Yq4hhlggwQBbrlOQ4qtZ+G4nxB6ZnzI9lyIb+JnvyiJnPC2AGbKSPA==} peerDependencies: msw: ^2.4.9 vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 @@ -915,20 +928,20 @@ packages: vite: optional: true - '@vitest/pretty-format@3.2.1': - resolution: {integrity: sha512-xBh1X2GPlOGBupp6E1RcUQWIxw0w/hRLd3XyBS6H+dMdKTAqHDNsIR2AnJwPA3yYe9DFy3VUKTe3VRTrAiQ01g==} + '@vitest/pretty-format@3.2.3': + resolution: {integrity: sha512-yFglXGkr9hW/yEXngO+IKMhP0jxyFw2/qys/CK4fFUZnSltD+MU7dVYGrH8rvPcK/O6feXQA+EU33gjaBBbAng==} - '@vitest/runner@3.2.1': - resolution: {integrity: sha512-kygXhNTu/wkMYbwYpS3z/9tBe0O8qpdBuC3dD/AW9sWa0LE/DAZEjnHtWA9sIad7lpD4nFW1yQ+zN7mEKNH3yA==} + '@vitest/runner@3.2.3': + resolution: {integrity: sha512-83HWYisT3IpMaU9LN+VN+/nLHVBCSIUKJzGxC5RWUOsK1h3USg7ojL+UXQR3b4o4UBIWCYdD2fxuzM7PQQ1u8w==} - '@vitest/snapshot@3.2.1': - resolution: {integrity: sha512-5xko/ZpW2Yc65NVK9Gpfg2y4BFvcF+At7yRT5AHUpTg9JvZ4xZoyuRY4ASlmNcBZjMslV08VRLDrBOmUe2YX3g==} + '@vitest/snapshot@3.2.3': + resolution: {integrity: sha512-9gIVWx2+tysDqUmmM1L0hwadyumqssOL1r8KJipwLx5JVYyxvVRfxvMq7DaWbZZsCqZnu/dZedaZQh4iYTtneA==} - '@vitest/spy@3.2.1': - resolution: {integrity: sha512-Nbfib34Z2rfcJGSetMxjDCznn4pCYPZOtQYox2kzebIJcgH75yheIKd5QYSFmR8DIZf2M8fwOm66qSDIfRFFfQ==} + '@vitest/spy@3.2.3': + resolution: {integrity: sha512-JHu9Wl+7bf6FEejTCREy+DmgWe+rQKbK+y32C/k5f4TBIAlijhJbRBIRIOCEpVevgRsCQR2iHRUH2/qKVM/plw==} - '@vitest/utils@3.2.1': - resolution: {integrity: sha512-KkHlGhePEKZSub5ViknBcN5KEF+u7dSUr9NW8QsVICusUojrgrOnnY3DEWWO877ax2Pyopuk2qHmt+gkNKnBVw==} + '@vitest/utils@3.2.3': + resolution: {integrity: sha512-4zFBCU5Pf+4Z6v+rwnZ1HU1yzOKKvDkMXZrymE2PBlbjKJRlrOxbvpfPSvJTGRIwGoahaOGvp+kbCoxifhzJ1Q==} ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} @@ -955,9 +968,15 @@ packages: axios@1.8.4: resolution: {integrity: sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==} + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + before-after-hook@4.0.0: resolution: {integrity: sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==} + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -980,6 +999,10 @@ packages: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} + clean-pkg-json@1.3.0: + resolution: {integrity: sha512-EsOnQbKkrmCTIHCYODpIZ4FS1kP8UqX9fEji5SAA2OhG4K+Z/xuXON53hJdSBroVIpxddrUtR/dbh+QF5Aq7Vw==} + hasBin: true + cli-width@4.1.0: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} @@ -1074,8 +1097,8 @@ packages: resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} - esbuild@0.25.3: - resolution: {integrity: sha512-qKA6Pvai73+M2FtftpNKRxJ78GIjmFXFxd/1DVBqGo/qNhLSfv+G12n9pNoWdytJC8U00TrViOwpjT0zgqQS8Q==} + esbuild@0.25.5: + resolution: {integrity: sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==} engines: {node: '>=18'} hasBin: true @@ -1113,8 +1136,8 @@ packages: debug: optional: true - form-data@4.0.2: - resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} + form-data@4.0.3: + resolution: {integrity: sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==} engines: {node: '>= 6'} fraction.js@5.2.2: @@ -1171,6 +1194,9 @@ packages: javascript-natural-sort@0.7.1: resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true @@ -1201,6 +1227,10 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -1247,6 +1277,17 @@ packages: resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} engines: {node: ^10 || ^12 || >=14} + prettier-plugin-pkg@0.21.1: + resolution: {integrity: sha512-f9qlj08joTh+x4UAQvL0UdhLf+LyJyBN9CBEnH7Ip1hitcc52vfkZEH5I7PsRFyDu/bm4d94GaJ7mfeLmFEsfg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + prettier: ^3.0.3 + + prettier@3.5.3: + resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} + engines: {node: '>=14'} + hasBin: true + proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} @@ -1259,11 +1300,8 @@ packages: resolution: {integrity: sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==} engines: {node: '>=0.10.0'} - regenerator-runtime@0.14.1: - resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} - - rollup@4.40.0: - resolution: {integrity: sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==} + rollup@4.42.0: + resolution: {integrity: sha512-LW+Vse3BJPyGJGAJt1j8pWDKPd73QM8cRXYK1IxOBgL2AGLu7Xd2YOW0M2sLUBCkF5MshXXtMApyEAEzMVMsnw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -1276,8 +1314,8 @@ packages: seedrandom@3.0.5: resolution: {integrity: sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==} - semver@7.7.1: - resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} + semver@7.7.2: + resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} engines: {node: '>=10'} hasBin: true @@ -1309,6 +1347,9 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + strip-literal@3.0.0: + resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} + styled-components@6.1.17: resolution: {integrity: sha512-97D7DwWanI7nN24v0D4SvbfjLE9656umNSJZkBkDIWL37aZqG/wRQ+Y9pWtXyBIM/NSfcBzHLErEsqHmJNSVUg==} engines: {node: '>= 16'} @@ -1380,16 +1421,16 @@ packages: undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} - universal-user-agent@7.0.2: - resolution: {integrity: sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==} + universal-user-agent@7.0.3: + resolution: {integrity: sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==} - vite-node@3.2.1: - resolution: {integrity: sha512-V4EyKQPxquurNJPtQJRZo8hKOoKNBRIhxcDbQFPFig0JdoWcUhwRgK8yoCXXrfYVPKS6XwirGHPszLnR8FbjCA==} + vite-node@3.2.3: + resolution: {integrity: sha512-gc8aAifGuDIpZHrPjuHyP4dpQmYXqWw7D1GmDnWeNWP654UEXzVfQ5IHPSK5HaHkwB/+p1atpYpSdw/2kOv8iQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true - vite@6.3.3: - resolution: {integrity: sha512-5nXH+QsELbFKhsEfWLkHrvgRpTdGJzqOZ+utSdmPTvwHmvU6ITTm3xx+mRusihkcI8GeC7lCDyn3kDtiki9scw==} + vite@6.3.5: + resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -1428,16 +1469,16 @@ packages: yaml: optional: true - vitest@3.2.1: - resolution: {integrity: sha512-VZ40MBnlE1/V5uTgdqY3DmjUgZtIzsYq758JGlyQrv5syIsaYcabkfPkEuWML49Ph0D/SoqpVFd0dyVTr551oA==} + vitest@3.2.3: + resolution: {integrity: sha512-E6U2ZFXe3N/t4f5BwUaVCKRLHqUpk1CBWeMh78UT4VaTPH/2dyvH6ALl29JTovEPu9dVKr/K/J4PkXgrMbw4Ww==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/debug': ^4.1.12 '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 3.2.1 - '@vitest/ui': 3.2.1 + '@vitest/browser': 3.2.3 + '@vitest/ui': 3.2.3 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -1474,9 +1515,7 @@ packages: snapshots: - '@babel/runtime@7.27.0': - dependencies: - regenerator-runtime: 0.14.1 + '@babel/runtime@7.27.6': {} '@emnapi/core@1.4.3': dependencies: @@ -1499,102 +1538,102 @@ snapshots: '@emotion/unitless@0.8.1': {} - '@esbuild/aix-ppc64@0.25.3': + '@esbuild/aix-ppc64@0.25.5': optional: true - '@esbuild/android-arm64@0.25.3': + '@esbuild/android-arm64@0.25.5': optional: true - '@esbuild/android-arm@0.25.3': + '@esbuild/android-arm@0.25.5': optional: true - '@esbuild/android-x64@0.25.3': + '@esbuild/android-x64@0.25.5': optional: true - '@esbuild/darwin-arm64@0.25.3': + '@esbuild/darwin-arm64@0.25.5': optional: true - '@esbuild/darwin-x64@0.25.3': + '@esbuild/darwin-x64@0.25.5': optional: true - '@esbuild/freebsd-arm64@0.25.3': + '@esbuild/freebsd-arm64@0.25.5': optional: true - '@esbuild/freebsd-x64@0.25.3': + '@esbuild/freebsd-x64@0.25.5': optional: true - '@esbuild/linux-arm64@0.25.3': + '@esbuild/linux-arm64@0.25.5': optional: true - '@esbuild/linux-arm@0.25.3': + '@esbuild/linux-arm@0.25.5': optional: true - '@esbuild/linux-ia32@0.25.3': + '@esbuild/linux-ia32@0.25.5': optional: true - '@esbuild/linux-loong64@0.25.3': + '@esbuild/linux-loong64@0.25.5': optional: true - '@esbuild/linux-mips64el@0.25.3': + '@esbuild/linux-mips64el@0.25.5': optional: true - '@esbuild/linux-ppc64@0.25.3': + '@esbuild/linux-ppc64@0.25.5': optional: true - '@esbuild/linux-riscv64@0.25.3': + '@esbuild/linux-riscv64@0.25.5': optional: true - '@esbuild/linux-s390x@0.25.3': + '@esbuild/linux-s390x@0.25.5': optional: true - '@esbuild/linux-x64@0.25.3': + '@esbuild/linux-x64@0.25.5': optional: true - '@esbuild/netbsd-arm64@0.25.3': + '@esbuild/netbsd-arm64@0.25.5': optional: true - '@esbuild/netbsd-x64@0.25.3': + '@esbuild/netbsd-x64@0.25.5': optional: true - '@esbuild/openbsd-arm64@0.25.3': + '@esbuild/openbsd-arm64@0.25.5': optional: true - '@esbuild/openbsd-x64@0.25.3': + '@esbuild/openbsd-x64@0.25.5': optional: true - '@esbuild/sunos-x64@0.25.3': + '@esbuild/sunos-x64@0.25.5': optional: true - '@esbuild/win32-arm64@0.25.3': + '@esbuild/win32-arm64@0.25.5': optional: true - '@esbuild/win32-ia32@0.25.3': + '@esbuild/win32-ia32@0.25.5': optional: true - '@esbuild/win32-x64@0.25.3': + '@esbuild/win32-x64@0.25.5': optional: true - '@inquirer/checkbox@4.1.5(@types/node@22.15.29)': + '@inquirer/checkbox@4.1.8(@types/node@22.15.31)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.15.29) - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/core': 10.1.13(@types/node@22.15.31) + '@inquirer/figures': 1.0.12 + '@inquirer/type': 3.0.7(@types/node@22.15.31) ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/confirm@5.1.9(@types/node@22.15.29)': + '@inquirer/confirm@5.1.12(@types/node@22.15.31)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.15.29) - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/core': 10.1.13(@types/node@22.15.31) + '@inquirer/type': 3.0.7(@types/node@22.15.31) optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/core@10.1.10(@types/node@22.15.29)': + '@inquirer/core@10.1.13(@types/node@22.15.31)': dependencies: - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/figures': 1.0.12 + '@inquirer/type': 3.0.7(@types/node@22.15.31) ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -1602,99 +1641,99 @@ snapshots: wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/editor@4.2.10(@types/node@22.15.29)': + '@inquirer/editor@4.2.13(@types/node@22.15.31)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.15.29) - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/core': 10.1.13(@types/node@22.15.31) + '@inquirer/type': 3.0.7(@types/node@22.15.31) external-editor: 3.1.0 optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/expand@4.0.12(@types/node@22.15.29)': + '@inquirer/expand@4.0.15(@types/node@22.15.31)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.15.29) - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/core': 10.1.13(@types/node@22.15.31) + '@inquirer/type': 3.0.7(@types/node@22.15.31) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/figures@1.0.11': {} + '@inquirer/figures@1.0.12': {} - '@inquirer/input@4.1.9(@types/node@22.15.29)': + '@inquirer/input@4.1.12(@types/node@22.15.31)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.15.29) - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/core': 10.1.13(@types/node@22.15.31) + '@inquirer/type': 3.0.7(@types/node@22.15.31) optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/number@3.0.12(@types/node@22.15.29)': + '@inquirer/number@3.0.15(@types/node@22.15.31)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.15.29) - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/core': 10.1.13(@types/node@22.15.31) + '@inquirer/type': 3.0.7(@types/node@22.15.31) optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/password@4.0.12(@types/node@22.15.29)': + '@inquirer/password@4.0.15(@types/node@22.15.31)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.15.29) - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/core': 10.1.13(@types/node@22.15.31) + '@inquirer/type': 3.0.7(@types/node@22.15.31) ansi-escapes: 4.3.2 optionalDependencies: - '@types/node': 22.15.29 - - '@inquirer/prompts@7.5.0(@types/node@22.15.29)': - dependencies: - '@inquirer/checkbox': 4.1.5(@types/node@22.15.29) - '@inquirer/confirm': 5.1.9(@types/node@22.15.29) - '@inquirer/editor': 4.2.10(@types/node@22.15.29) - '@inquirer/expand': 4.0.12(@types/node@22.15.29) - '@inquirer/input': 4.1.9(@types/node@22.15.29) - '@inquirer/number': 3.0.12(@types/node@22.15.29) - '@inquirer/password': 4.0.12(@types/node@22.15.29) - '@inquirer/rawlist': 4.1.0(@types/node@22.15.29) - '@inquirer/search': 3.0.12(@types/node@22.15.29) - '@inquirer/select': 4.2.0(@types/node@22.15.29) + '@types/node': 22.15.31 + + '@inquirer/prompts@7.5.3(@types/node@22.15.31)': + dependencies: + '@inquirer/checkbox': 4.1.8(@types/node@22.15.31) + '@inquirer/confirm': 5.1.12(@types/node@22.15.31) + '@inquirer/editor': 4.2.13(@types/node@22.15.31) + '@inquirer/expand': 4.0.15(@types/node@22.15.31) + '@inquirer/input': 4.1.12(@types/node@22.15.31) + '@inquirer/number': 3.0.15(@types/node@22.15.31) + '@inquirer/password': 4.0.15(@types/node@22.15.31) + '@inquirer/rawlist': 4.1.3(@types/node@22.15.31) + '@inquirer/search': 3.0.15(@types/node@22.15.31) + '@inquirer/select': 4.2.3(@types/node@22.15.31) optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/rawlist@4.1.0(@types/node@22.15.29)': + '@inquirer/rawlist@4.1.3(@types/node@22.15.31)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.15.29) - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/core': 10.1.13(@types/node@22.15.31) + '@inquirer/type': 3.0.7(@types/node@22.15.31) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/search@3.0.12(@types/node@22.15.29)': + '@inquirer/search@3.0.15(@types/node@22.15.31)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.15.29) - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/core': 10.1.13(@types/node@22.15.31) + '@inquirer/figures': 1.0.12 + '@inquirer/type': 3.0.7(@types/node@22.15.31) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/select@4.2.0(@types/node@22.15.29)': + '@inquirer/select@4.2.3(@types/node@22.15.31)': dependencies: - '@inquirer/core': 10.1.10(@types/node@22.15.29) - '@inquirer/figures': 1.0.11 - '@inquirer/type': 3.0.6(@types/node@22.15.29) + '@inquirer/core': 10.1.13(@types/node@22.15.31) + '@inquirer/figures': 1.0.12 + '@inquirer/type': 3.0.7(@types/node@22.15.31) ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 - '@inquirer/type@3.0.6(@types/node@22.15.29)': + '@inquirer/type@3.0.7(@types/node@22.15.31)': optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 '@jridgewell/sourcemap-codec@1.5.0': {} - '@napi-rs/cli@3.0.0-alpha.87(@emnapi/runtime@1.4.3)(@types/node@22.15.29)(emnapi@1.4.3)': + '@napi-rs/cli@3.0.0-alpha.88(@emnapi/runtime@1.4.3)(@types/node@22.15.31)(emnapi@1.4.3)': dependencies: - '@inquirer/prompts': 7.5.0(@types/node@22.15.29) + '@inquirer/prompts': 7.5.3(@types/node@22.15.31) '@napi-rs/cross-toolchain': 0.0.19 '@napi-rs/wasm-tools': 0.0.3 '@octokit/rest': 22.0.0 @@ -1703,7 +1742,7 @@ snapshots: debug: 4.4.1 js-yaml: 4.1.0 lodash-es: 4.17.21 - semver: 7.7.1 + semver: 7.7.2 toml: 3.0.0 typanion: 3.14.0 wasm-sjlj: 1.0.6 @@ -1722,155 +1761,155 @@ snapshots: '@napi-rs/cross-toolchain@0.0.19': dependencies: - '@napi-rs/lzma': 1.4.1 - '@napi-rs/tar': 0.1.4 + '@napi-rs/lzma': 1.4.3 + '@napi-rs/tar': 0.1.5 debug: 4.4.1 transitivePeerDependencies: - supports-color - '@napi-rs/lzma-android-arm-eabi@1.4.1': + '@napi-rs/lzma-android-arm-eabi@1.4.3': optional: true - '@napi-rs/lzma-android-arm64@1.4.1': + '@napi-rs/lzma-android-arm64@1.4.3': optional: true - '@napi-rs/lzma-darwin-arm64@1.4.1': + '@napi-rs/lzma-darwin-arm64@1.4.3': optional: true - '@napi-rs/lzma-darwin-x64@1.4.1': + '@napi-rs/lzma-darwin-x64@1.4.3': optional: true - '@napi-rs/lzma-freebsd-x64@1.4.1': + '@napi-rs/lzma-freebsd-x64@1.4.3': optional: true - '@napi-rs/lzma-linux-arm-gnueabihf@1.4.1': + '@napi-rs/lzma-linux-arm-gnueabihf@1.4.3': optional: true - '@napi-rs/lzma-linux-arm64-gnu@1.4.1': + '@napi-rs/lzma-linux-arm64-gnu@1.4.3': optional: true - '@napi-rs/lzma-linux-arm64-musl@1.4.1': + '@napi-rs/lzma-linux-arm64-musl@1.4.3': optional: true - '@napi-rs/lzma-linux-ppc64-gnu@1.4.1': + '@napi-rs/lzma-linux-ppc64-gnu@1.4.3': optional: true - '@napi-rs/lzma-linux-riscv64-gnu@1.4.1': + '@napi-rs/lzma-linux-riscv64-gnu@1.4.3': optional: true - '@napi-rs/lzma-linux-s390x-gnu@1.4.1': + '@napi-rs/lzma-linux-s390x-gnu@1.4.3': optional: true - '@napi-rs/lzma-linux-x64-gnu@1.4.1': + '@napi-rs/lzma-linux-x64-gnu@1.4.3': optional: true - '@napi-rs/lzma-linux-x64-musl@1.4.1': + '@napi-rs/lzma-linux-x64-musl@1.4.3': optional: true - '@napi-rs/lzma-wasm32-wasi@1.4.1': + '@napi-rs/lzma-wasm32-wasi@1.4.3': dependencies: - '@napi-rs/wasm-runtime': 0.2.10 + '@napi-rs/wasm-runtime': 0.2.11 optional: true - '@napi-rs/lzma-win32-arm64-msvc@1.4.1': + '@napi-rs/lzma-win32-arm64-msvc@1.4.3': optional: true - '@napi-rs/lzma-win32-ia32-msvc@1.4.1': + '@napi-rs/lzma-win32-ia32-msvc@1.4.3': optional: true - '@napi-rs/lzma-win32-x64-msvc@1.4.1': + '@napi-rs/lzma-win32-x64-msvc@1.4.3': optional: true - '@napi-rs/lzma@1.4.1': + '@napi-rs/lzma@1.4.3': optionalDependencies: - '@napi-rs/lzma-android-arm-eabi': 1.4.1 - '@napi-rs/lzma-android-arm64': 1.4.1 - '@napi-rs/lzma-darwin-arm64': 1.4.1 - '@napi-rs/lzma-darwin-x64': 1.4.1 - '@napi-rs/lzma-freebsd-x64': 1.4.1 - '@napi-rs/lzma-linux-arm-gnueabihf': 1.4.1 - '@napi-rs/lzma-linux-arm64-gnu': 1.4.1 - '@napi-rs/lzma-linux-arm64-musl': 1.4.1 - '@napi-rs/lzma-linux-ppc64-gnu': 1.4.1 - '@napi-rs/lzma-linux-riscv64-gnu': 1.4.1 - '@napi-rs/lzma-linux-s390x-gnu': 1.4.1 - '@napi-rs/lzma-linux-x64-gnu': 1.4.1 - '@napi-rs/lzma-linux-x64-musl': 1.4.1 - '@napi-rs/lzma-wasm32-wasi': 1.4.1 - '@napi-rs/lzma-win32-arm64-msvc': 1.4.1 - '@napi-rs/lzma-win32-ia32-msvc': 1.4.1 - '@napi-rs/lzma-win32-x64-msvc': 1.4.1 + '@napi-rs/lzma-android-arm-eabi': 1.4.3 + '@napi-rs/lzma-android-arm64': 1.4.3 + '@napi-rs/lzma-darwin-arm64': 1.4.3 + '@napi-rs/lzma-darwin-x64': 1.4.3 + '@napi-rs/lzma-freebsd-x64': 1.4.3 + '@napi-rs/lzma-linux-arm-gnueabihf': 1.4.3 + '@napi-rs/lzma-linux-arm64-gnu': 1.4.3 + '@napi-rs/lzma-linux-arm64-musl': 1.4.3 + '@napi-rs/lzma-linux-ppc64-gnu': 1.4.3 + '@napi-rs/lzma-linux-riscv64-gnu': 1.4.3 + '@napi-rs/lzma-linux-s390x-gnu': 1.4.3 + '@napi-rs/lzma-linux-x64-gnu': 1.4.3 + '@napi-rs/lzma-linux-x64-musl': 1.4.3 + '@napi-rs/lzma-wasm32-wasi': 1.4.3 + '@napi-rs/lzma-win32-arm64-msvc': 1.4.3 + '@napi-rs/lzma-win32-ia32-msvc': 1.4.3 + '@napi-rs/lzma-win32-x64-msvc': 1.4.3 - '@napi-rs/tar-android-arm-eabi@0.1.4': + '@napi-rs/tar-android-arm-eabi@0.1.5': optional: true - '@napi-rs/tar-android-arm64@0.1.4': + '@napi-rs/tar-android-arm64@0.1.5': optional: true - '@napi-rs/tar-darwin-arm64@0.1.4': + '@napi-rs/tar-darwin-arm64@0.1.5': optional: true - '@napi-rs/tar-darwin-x64@0.1.4': + '@napi-rs/tar-darwin-x64@0.1.5': optional: true - '@napi-rs/tar-freebsd-x64@0.1.4': + '@napi-rs/tar-freebsd-x64@0.1.5': optional: true - '@napi-rs/tar-linux-arm-gnueabihf@0.1.4': + '@napi-rs/tar-linux-arm-gnueabihf@0.1.5': optional: true - '@napi-rs/tar-linux-arm64-gnu@0.1.4': + '@napi-rs/tar-linux-arm64-gnu@0.1.5': optional: true - '@napi-rs/tar-linux-arm64-musl@0.1.4': + '@napi-rs/tar-linux-arm64-musl@0.1.5': optional: true - '@napi-rs/tar-linux-ppc64-gnu@0.1.4': + '@napi-rs/tar-linux-ppc64-gnu@0.1.5': optional: true - '@napi-rs/tar-linux-s390x-gnu@0.1.4': + '@napi-rs/tar-linux-s390x-gnu@0.1.5': optional: true - '@napi-rs/tar-linux-x64-gnu@0.1.4': + '@napi-rs/tar-linux-x64-gnu@0.1.5': optional: true - '@napi-rs/tar-linux-x64-musl@0.1.4': + '@napi-rs/tar-linux-x64-musl@0.1.5': optional: true - '@napi-rs/tar-wasm32-wasi@0.1.4': + '@napi-rs/tar-wasm32-wasi@0.1.5': dependencies: - '@napi-rs/wasm-runtime': 0.2.10 + '@napi-rs/wasm-runtime': 0.2.11 optional: true - '@napi-rs/tar-win32-arm64-msvc@0.1.4': + '@napi-rs/tar-win32-arm64-msvc@0.1.5': optional: true - '@napi-rs/tar-win32-ia32-msvc@0.1.4': + '@napi-rs/tar-win32-ia32-msvc@0.1.5': optional: true - '@napi-rs/tar-win32-x64-msvc@0.1.4': + '@napi-rs/tar-win32-x64-msvc@0.1.5': optional: true - '@napi-rs/tar@0.1.4': + '@napi-rs/tar@0.1.5': optionalDependencies: - '@napi-rs/tar-android-arm-eabi': 0.1.4 - '@napi-rs/tar-android-arm64': 0.1.4 - '@napi-rs/tar-darwin-arm64': 0.1.4 - '@napi-rs/tar-darwin-x64': 0.1.4 - '@napi-rs/tar-freebsd-x64': 0.1.4 - '@napi-rs/tar-linux-arm-gnueabihf': 0.1.4 - '@napi-rs/tar-linux-arm64-gnu': 0.1.4 - '@napi-rs/tar-linux-arm64-musl': 0.1.4 - '@napi-rs/tar-linux-ppc64-gnu': 0.1.4 - '@napi-rs/tar-linux-s390x-gnu': 0.1.4 - '@napi-rs/tar-linux-x64-gnu': 0.1.4 - '@napi-rs/tar-linux-x64-musl': 0.1.4 - '@napi-rs/tar-wasm32-wasi': 0.1.4 - '@napi-rs/tar-win32-arm64-msvc': 0.1.4 - '@napi-rs/tar-win32-ia32-msvc': 0.1.4 - '@napi-rs/tar-win32-x64-msvc': 0.1.4 - - '@napi-rs/wasm-runtime@0.2.10': + '@napi-rs/tar-android-arm-eabi': 0.1.5 + '@napi-rs/tar-android-arm64': 0.1.5 + '@napi-rs/tar-darwin-arm64': 0.1.5 + '@napi-rs/tar-darwin-x64': 0.1.5 + '@napi-rs/tar-freebsd-x64': 0.1.5 + '@napi-rs/tar-linux-arm-gnueabihf': 0.1.5 + '@napi-rs/tar-linux-arm64-gnu': 0.1.5 + '@napi-rs/tar-linux-arm64-musl': 0.1.5 + '@napi-rs/tar-linux-ppc64-gnu': 0.1.5 + '@napi-rs/tar-linux-s390x-gnu': 0.1.5 + '@napi-rs/tar-linux-x64-gnu': 0.1.5 + '@napi-rs/tar-linux-x64-musl': 0.1.5 + '@napi-rs/tar-wasm32-wasi': 0.1.5 + '@napi-rs/tar-win32-arm64-msvc': 0.1.5 + '@napi-rs/tar-win32-ia32-msvc': 0.1.5 + '@napi-rs/tar-win32-x64-msvc': 0.1.5 + + '@napi-rs/wasm-runtime@0.2.11': dependencies: '@emnapi/core': 1.4.3 '@emnapi/runtime': 1.4.3 @@ -1905,7 +1944,7 @@ snapshots: '@napi-rs/wasm-tools-wasm32-wasi@0.0.3': dependencies: - '@napi-rs/wasm-runtime': 0.2.10 + '@napi-rs/wasm-runtime': 0.2.11 optional: true '@napi-rs/wasm-tools-win32-arm64-msvc@0.0.3': @@ -1943,18 +1982,18 @@ snapshots: '@octokit/request-error': 7.0.0 '@octokit/types': 14.1.0 before-after-hook: 4.0.0 - universal-user-agent: 7.0.2 + universal-user-agent: 7.0.3 '@octokit/endpoint@11.0.0': dependencies: '@octokit/types': 14.1.0 - universal-user-agent: 7.0.2 + universal-user-agent: 7.0.3 '@octokit/graphql@9.0.1': dependencies: '@octokit/request': 10.0.2 '@octokit/types': 14.1.0 - universal-user-agent: 7.0.2 + universal-user-agent: 7.0.3 '@octokit/openapi-types@25.1.0': {} @@ -1982,7 +2021,7 @@ snapshots: '@octokit/request-error': 7.0.0 '@octokit/types': 14.1.0 fast-content-type-parse: 3.0.0 - universal-user-agent: 7.0.2 + universal-user-agent: 7.0.3 '@octokit/rest@22.0.0': dependencies: @@ -1997,64 +2036,64 @@ snapshots: '@oxc-resolver/test-longfilename-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@file:fixtures/pnpm/longfilename': {} - '@rollup/rollup-android-arm-eabi@4.40.0': + '@rollup/rollup-android-arm-eabi@4.42.0': optional: true - '@rollup/rollup-android-arm64@4.40.0': + '@rollup/rollup-android-arm64@4.42.0': optional: true - '@rollup/rollup-darwin-arm64@4.40.0': + '@rollup/rollup-darwin-arm64@4.42.0': optional: true - '@rollup/rollup-darwin-x64@4.40.0': + '@rollup/rollup-darwin-x64@4.42.0': optional: true - '@rollup/rollup-freebsd-arm64@4.40.0': + '@rollup/rollup-freebsd-arm64@4.42.0': optional: true - '@rollup/rollup-freebsd-x64@4.40.0': + '@rollup/rollup-freebsd-x64@4.42.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.40.0': + '@rollup/rollup-linux-arm-gnueabihf@4.42.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.40.0': + '@rollup/rollup-linux-arm-musleabihf@4.42.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.40.0': + '@rollup/rollup-linux-arm64-gnu@4.42.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.40.0': + '@rollup/rollup-linux-arm64-musl@4.42.0': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.40.0': + '@rollup/rollup-linux-loongarch64-gnu@4.42.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.42.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.40.0': + '@rollup/rollup-linux-riscv64-gnu@4.42.0': optional: true - '@rollup/rollup-linux-riscv64-musl@4.40.0': + '@rollup/rollup-linux-riscv64-musl@4.42.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.40.0': + '@rollup/rollup-linux-s390x-gnu@4.42.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.40.0': + '@rollup/rollup-linux-x64-gnu@4.42.0': optional: true - '@rollup/rollup-linux-x64-musl@4.40.0': + '@rollup/rollup-linux-x64-musl@4.42.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.40.0': + '@rollup/rollup-win32-arm64-msvc@4.42.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.40.0': + '@rollup/rollup-win32-ia32-msvc@4.42.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.40.0': + '@rollup/rollup-win32-x64-msvc@4.42.0': optional: true '@tybys/wasm-util@0.9.0': @@ -2069,50 +2108,53 @@ snapshots: '@types/estree@1.0.7': {} - '@types/node@22.15.29': + '@types/estree@1.0.8': {} + + '@types/node@22.15.31': dependencies: undici-types: 6.21.0 '@types/stylis@4.2.5': {} - '@vitest/expect@3.2.1': + '@vitest/expect@3.2.3': dependencies: '@types/chai': 5.2.2 - '@vitest/spy': 3.2.1 - '@vitest/utils': 3.2.1 + '@vitest/spy': 3.2.3 + '@vitest/utils': 3.2.3 chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.1(vite@6.3.3(@types/node@22.15.29))': + '@vitest/mocker@3.2.3(vite@6.3.5(@types/node@22.15.31))': dependencies: - '@vitest/spy': 3.2.1 + '@vitest/spy': 3.2.3 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 6.3.3(@types/node@22.15.29) + vite: 6.3.5(@types/node@22.15.31) - '@vitest/pretty-format@3.2.1': + '@vitest/pretty-format@3.2.3': dependencies: tinyrainbow: 2.0.0 - '@vitest/runner@3.2.1': + '@vitest/runner@3.2.3': dependencies: - '@vitest/utils': 3.2.1 + '@vitest/utils': 3.2.3 pathe: 2.0.3 + strip-literal: 3.0.0 - '@vitest/snapshot@3.2.1': + '@vitest/snapshot@3.2.3': dependencies: - '@vitest/pretty-format': 3.2.1 + '@vitest/pretty-format': 3.2.3 magic-string: 0.30.17 pathe: 2.0.3 - '@vitest/spy@3.2.1': + '@vitest/spy@3.2.3': dependencies: tinyspy: 4.0.3 - '@vitest/utils@3.2.1': + '@vitest/utils@3.2.3': dependencies: - '@vitest/pretty-format': 3.2.1 + '@vitest/pretty-format': 3.2.3 loupe: 3.1.3 tinyrainbow: 2.0.0 @@ -2135,13 +2177,19 @@ snapshots: axios@1.8.4: dependencies: follow-redirects: 1.15.9 - form-data: 4.0.2 + form-data: 4.0.3 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug + balanced-match@1.0.2: {} + before-after-hook@4.0.0: {} + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + cac@6.7.14: {} call-bind-apply-helpers@1.0.2: @@ -2163,6 +2211,8 @@ snapshots: check-error@2.1.1: {} + clean-pkg-json@1.3.0: {} + cli-width@4.1.0: {} clipanion@4.0.0-rc.4(typanion@3.14.0): @@ -2235,39 +2285,39 @@ snapshots: has-tostringtag: 1.0.2 hasown: 2.0.2 - esbuild@0.25.3: + esbuild@0.25.5: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.3 - '@esbuild/android-arm': 0.25.3 - '@esbuild/android-arm64': 0.25.3 - '@esbuild/android-x64': 0.25.3 - '@esbuild/darwin-arm64': 0.25.3 - '@esbuild/darwin-x64': 0.25.3 - '@esbuild/freebsd-arm64': 0.25.3 - '@esbuild/freebsd-x64': 0.25.3 - '@esbuild/linux-arm': 0.25.3 - '@esbuild/linux-arm64': 0.25.3 - '@esbuild/linux-ia32': 0.25.3 - '@esbuild/linux-loong64': 0.25.3 - '@esbuild/linux-mips64el': 0.25.3 - '@esbuild/linux-ppc64': 0.25.3 - '@esbuild/linux-riscv64': 0.25.3 - '@esbuild/linux-s390x': 0.25.3 - '@esbuild/linux-x64': 0.25.3 - '@esbuild/netbsd-arm64': 0.25.3 - '@esbuild/netbsd-x64': 0.25.3 - '@esbuild/openbsd-arm64': 0.25.3 - '@esbuild/openbsd-x64': 0.25.3 - '@esbuild/sunos-x64': 0.25.3 - '@esbuild/win32-arm64': 0.25.3 - '@esbuild/win32-ia32': 0.25.3 - '@esbuild/win32-x64': 0.25.3 + '@esbuild/aix-ppc64': 0.25.5 + '@esbuild/android-arm': 0.25.5 + '@esbuild/android-arm64': 0.25.5 + '@esbuild/android-x64': 0.25.5 + '@esbuild/darwin-arm64': 0.25.5 + '@esbuild/darwin-x64': 0.25.5 + '@esbuild/freebsd-arm64': 0.25.5 + '@esbuild/freebsd-x64': 0.25.5 + '@esbuild/linux-arm': 0.25.5 + '@esbuild/linux-arm64': 0.25.5 + '@esbuild/linux-ia32': 0.25.5 + '@esbuild/linux-loong64': 0.25.5 + '@esbuild/linux-mips64el': 0.25.5 + '@esbuild/linux-ppc64': 0.25.5 + '@esbuild/linux-riscv64': 0.25.5 + '@esbuild/linux-s390x': 0.25.5 + '@esbuild/linux-x64': 0.25.5 + '@esbuild/netbsd-arm64': 0.25.5 + '@esbuild/netbsd-x64': 0.25.5 + '@esbuild/openbsd-arm64': 0.25.5 + '@esbuild/openbsd-x64': 0.25.5 + '@esbuild/sunos-x64': 0.25.5 + '@esbuild/win32-arm64': 0.25.5 + '@esbuild/win32-ia32': 0.25.5 + '@esbuild/win32-x64': 0.25.5 escape-latex@1.2.0: {} estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.7 + '@types/estree': 1.0.8 expect-type@1.2.1: {} @@ -2285,11 +2335,12 @@ snapshots: follow-redirects@1.15.9: {} - form-data@4.0.2: + form-data@4.0.3: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 es-set-tostringtag: 2.1.0 + hasown: 2.0.2 mime-types: 2.1.35 fraction.js@5.2.2: {} @@ -2341,6 +2392,8 @@ snapshots: javascript-natural-sort@0.7.1: {} + js-tokens@9.0.1: {} + js-yaml@4.1.0: dependencies: argparse: 2.0.1 @@ -2357,7 +2410,7 @@ snapshots: mathjs@14.4.0: dependencies: - '@babel/runtime': 7.27.0 + '@babel/runtime': 7.27.6 complex.js: 2.4.2 decimal.js: 10.5.0 escape-latex: 1.2.0 @@ -2373,6 +2426,10 @@ snapshots: dependencies: mime-db: 1.52.0 + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + ms@2.1.3: {} mute-stream@2.0.0: {} @@ -2405,6 +2462,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + prettier-plugin-pkg@0.21.1(prettier@3.5.3): + dependencies: + prettier: 3.5.3 + + prettier@3.5.3: {} + proxy-from-env@1.1.0: {} react-dom@19.1.0(react@19.1.0): @@ -2414,32 +2477,30 @@ snapshots: react@19.1.0: {} - regenerator-runtime@0.14.1: {} - - rollup@4.40.0: + rollup@4.42.0: dependencies: '@types/estree': 1.0.7 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.40.0 - '@rollup/rollup-android-arm64': 4.40.0 - '@rollup/rollup-darwin-arm64': 4.40.0 - '@rollup/rollup-darwin-x64': 4.40.0 - '@rollup/rollup-freebsd-arm64': 4.40.0 - '@rollup/rollup-freebsd-x64': 4.40.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.40.0 - '@rollup/rollup-linux-arm-musleabihf': 4.40.0 - '@rollup/rollup-linux-arm64-gnu': 4.40.0 - '@rollup/rollup-linux-arm64-musl': 4.40.0 - '@rollup/rollup-linux-loongarch64-gnu': 4.40.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.40.0 - '@rollup/rollup-linux-riscv64-gnu': 4.40.0 - '@rollup/rollup-linux-riscv64-musl': 4.40.0 - '@rollup/rollup-linux-s390x-gnu': 4.40.0 - '@rollup/rollup-linux-x64-gnu': 4.40.0 - '@rollup/rollup-linux-x64-musl': 4.40.0 - '@rollup/rollup-win32-arm64-msvc': 4.40.0 - '@rollup/rollup-win32-ia32-msvc': 4.40.0 - '@rollup/rollup-win32-x64-msvc': 4.40.0 + '@rollup/rollup-android-arm-eabi': 4.42.0 + '@rollup/rollup-android-arm64': 4.42.0 + '@rollup/rollup-darwin-arm64': 4.42.0 + '@rollup/rollup-darwin-x64': 4.42.0 + '@rollup/rollup-freebsd-arm64': 4.42.0 + '@rollup/rollup-freebsd-x64': 4.42.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.42.0 + '@rollup/rollup-linux-arm-musleabihf': 4.42.0 + '@rollup/rollup-linux-arm64-gnu': 4.42.0 + '@rollup/rollup-linux-arm64-musl': 4.42.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.42.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.42.0 + '@rollup/rollup-linux-riscv64-gnu': 4.42.0 + '@rollup/rollup-linux-riscv64-musl': 4.42.0 + '@rollup/rollup-linux-s390x-gnu': 4.42.0 + '@rollup/rollup-linux-x64-gnu': 4.42.0 + '@rollup/rollup-linux-x64-musl': 4.42.0 + '@rollup/rollup-win32-arm64-msvc': 4.42.0 + '@rollup/rollup-win32-ia32-msvc': 4.42.0 + '@rollup/rollup-win32-x64-msvc': 4.42.0 fsevents: 2.3.3 safer-buffer@2.1.2: {} @@ -2448,7 +2509,7 @@ snapshots: seedrandom@3.0.5: {} - semver@7.7.1: {} + semver@7.7.2: {} shallowequal@1.1.0: {} @@ -2472,6 +2533,10 @@ snapshots: dependencies: ansi-regex: 5.0.1 + strip-literal@3.0.0: + dependencies: + js-tokens: 9.0.1 + styled-components@6.1.17(react-dom@19.1.0(react@19.1.0))(react@19.1.0): dependencies: '@emotion/is-prop-valid': 1.2.2 @@ -2527,15 +2592,15 @@ snapshots: undici-types@6.21.0: {} - universal-user-agent@7.0.2: {} + universal-user-agent@7.0.3: {} - vite-node@3.2.1(@types/node@22.15.29): + vite-node@3.2.3(@types/node@22.15.31): dependencies: cac: 6.7.14 debug: 4.4.1 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 6.3.3(@types/node@22.15.29) + vite: 6.3.5(@types/node@22.15.31) transitivePeerDependencies: - '@types/node' - jiti @@ -2550,28 +2615,28 @@ snapshots: - tsx - yaml - vite@6.3.3(@types/node@22.15.29): + vite@6.3.5(@types/node@22.15.31): dependencies: - esbuild: 0.25.3 + esbuild: 0.25.5 fdir: 6.4.5(picomatch@4.0.2) picomatch: 4.0.2 postcss: 8.5.3 - rollup: 4.40.0 + rollup: 4.42.0 tinyglobby: 0.2.14 optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 fsevents: 2.3.3 - vitest@3.2.1(@types/node@22.15.29): + vitest@3.2.3(@types/node@22.15.31): dependencies: '@types/chai': 5.2.2 - '@vitest/expect': 3.2.1 - '@vitest/mocker': 3.2.1(vite@6.3.3(@types/node@22.15.29)) - '@vitest/pretty-format': 3.2.1 - '@vitest/runner': 3.2.1 - '@vitest/snapshot': 3.2.1 - '@vitest/spy': 3.2.1 - '@vitest/utils': 3.2.1 + '@vitest/expect': 3.2.3 + '@vitest/mocker': 3.2.3(vite@6.3.5(@types/node@22.15.31)) + '@vitest/pretty-format': 3.2.3 + '@vitest/runner': 3.2.3 + '@vitest/snapshot': 3.2.3 + '@vitest/spy': 3.2.3 + '@vitest/utils': 3.2.3 chai: 5.2.0 debug: 4.4.1 expect-type: 1.2.1 @@ -2584,11 +2649,11 @@ snapshots: tinyglobby: 0.2.14 tinypool: 1.1.0 tinyrainbow: 2.0.0 - vite: 6.3.3(@types/node@22.15.29) - vite-node: 3.2.1(@types/node@22.15.29) + vite: 6.3.5(@types/node@22.15.31) + vite-node: 3.2.3(@types/node@22.15.31) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.15.29 + '@types/node': 22.15.31 transitivePeerDependencies: - jiti - less diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8a42a4e8..8fa98621 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,5 +7,7 @@ packages: ignoredBuiltDependencies: - esbuild +ignoreScripts: true + # For `windows_symlinked_longfilename` in tests/resolve_test.rs virtualStoreDirMaxLength: 1024 diff --git a/release-plz.toml b/release-plz.toml index 27dbd857..d58df251 100644 --- a/release-plz.toml +++ b/release-plz.toml @@ -1,6 +1,54 @@ [workspace] semver_check = true allow_dirty = true # The "fixtures" is being marked as dirty. -changelog_config = "cliff.toml" git_tag_name = "v{{ version }}" git_release_name = "v{{ version }}" + +[changelog] +body = """ + +## [{{ version }}]\ + {%- if release_link -%}\ + ({{ release_link }})\ + {% endif %} \ + - {{ timestamp | date(format="%Y-%m-%d") }} +{% for group, commits in commits | group_by(attribute="group") %} +### {{ group | upper_first }} + + {% for commit in commits %} + {%- if commit.scope -%} + - *({{commit.scope}})* {% if commit.breaking %}[**breaking**] {% endif %}\ + {{ commit.message }}{{ self::username(commit=commit) }}\ + {%- if commit.links %} \ + ({% for link in commit.links %}[{{link.text}}]({{link.href}}) {% endfor -%})\ + {% endif %} + {% else -%} + - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message }}{{ self::username(commit=commit) }}{{ self::pr(commit=commit) }} + {% endif -%} + {% endfor -%} +{% endfor %} +{%- if remote.contributors %} +### Contributors +{% for contributor in remote.contributors %} + * @{{ contributor.username }} +{%- endfor %} +{% endif -%} +{%- macro username(commit) -%} + {% if commit.remote.username %} (by @{{ commit.remote.username }}){% endif -%} +{% endmacro -%} +{%- macro pr(commit) -%} + {% if commit.remote.pr_number %} - #{{ commit.remote.pr_number }}{% endif -%} +{% endmacro -%} +""" + +commit_parsers = [ + { message = "^feat", group = "Features" }, + { message = "^fix", group = "Bug Fixes" }, + { message = "^perf", group = "Performance" }, + { message = "^doc", group = "Documentation" }, + { message = "^refactor", group = "Refactor" }, + { message = "^style", group = "Styling" }, + { message = "^test", group = "Testing" }, + { message = "^chore", group = "Chore" }, + { message = "^ci", group = "CI" }, +] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 4bd1ff45..291696d0 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.86.0" +channel = "1.87.0" profile = "default" diff --git a/src/cache.rs b/src/cache.rs index 2156661c..2b35bae0 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -8,8 +8,8 @@ use crate::{Ctx, PackageJson, ResolveError, ResolveOptions, TsConfig}; #[allow(clippy::missing_errors_doc)] // trait impls should be free to return any typesafe error pub trait Cache: Sized { - type Cp: CachedPath + Clone; - type Pj: PackageJson; + type Cp: CachedPath + Clone + Debug; + type Pj: PackageJson + Debug; type Tc: TsConfig + Debug; /// Clears the cache. @@ -62,6 +62,10 @@ pub trait CachedPath: Sized { fn parent(&self) -> Option<&Self>; + fn is_node_modules(&self) -> bool; + + fn inside_node_modules(&self) -> bool; + fn module_directory>( &self, module_name: &str, @@ -89,7 +93,7 @@ pub trait CachedPath: Sized { /// Returns a new path by resolving the given subpath (including "." and /// ".." components) with this path. #[must_use] - fn normalize_with>(&self, subpath: impl AsRef, cache: &C) -> Self; + fn normalize_with, P: AsRef>(&self, subpath: P, cache: &C) -> Self; #[must_use] fn normalize_root>(&self, _cache: &C) -> Self; diff --git a/src/error.rs b/src/error.rs index ee1e2ad4..61952cec 100644 --- a/src/error.rs +++ b/src/error.rs @@ -71,7 +71,7 @@ pub enum ResolveError { /// JSON parse error #[error("{0:?}")] - JSON(JSONError), + Json(JSONError), /// Restricted by `ResolveOptions::restrictions` #[error(r#"Path "{0}" restricted by {0}"#)] @@ -114,17 +114,12 @@ impl ResolveError { #[must_use] #[cfg(feature = "fs_cache")] - pub fn from_serde_json_error( - path: PathBuf, - error: &serde_json::Error, - content: Option, - ) -> Self { - Self::JSON(JSONError { + pub fn from_serde_json_error(path: PathBuf, error: &serde_json::Error) -> Self { + Self::Json(JSONError { path, message: error.to_string(), line: error.line(), column: error.column(), - content, }) } } @@ -143,7 +138,6 @@ pub struct JSONError { pub message: String, pub line: usize, pub column: usize, - pub content: Option, } #[derive(Debug, Clone, Error)] diff --git a/src/fs_cache.rs b/src/fs_cache.rs index a2f0dc70..eebd9add 100644 --- a/src/fs_cache.rs +++ b/src/fs_cache.rs @@ -2,6 +2,7 @@ use std::{ borrow::Cow, cell::RefCell, convert::AsRef, + fmt, hash::{BuildHasherDefault, Hash, Hasher}, io, ops::Deref, @@ -66,9 +67,14 @@ impl Cache for FsCache { return entry.clone(); } let parent = path.parent().map(|p| self.value(p)); + let is_node_modules = path.file_name().as_ref().is_some_and(|&name| name == "node_modules"); + let inside_node_modules = + is_node_modules || parent.as_ref().is_some_and(|parent| parent.inside_node_modules); let cached_path = FsCachedPath(Arc::new(CachedPathImpl::new( hash, path.to_path_buf().into_boxed_path(), + is_node_modules, + inside_node_modules, parent, ))); paths.insert(cached_path.clone()); @@ -128,13 +134,7 @@ impl Cache for FsCache { }; PackageJsonSerde::parse(package_json_path.clone(), real_path, &package_json_string) .map(|package_json| Some((path.clone(), (Arc::new(package_json))))) - .map_err(|error| { - ResolveError::from_serde_json_error( - package_json_path, - &error, - Some(package_json_string), - ) - }) + .map_err(|error| ResolveError::from_serde_json_error(package_json_path, &error)) }) .cloned(); // https://github.com/webpack/enhanced-resolve/blob/58464fc7cb56673c9aa849e68e6300239601e615/lib/DescriptionFileUtils.js#L68-L82 @@ -183,11 +183,7 @@ impl Cache for FsCache { .map_err(|_| ResolveError::TsconfigNotFound(path.to_path_buf()))?; let mut tsconfig = TsConfigSerde::parse(root, &tsconfig_path, &mut tsconfig_string) .map_err(|error| { - ResolveError::from_serde_json_error( - tsconfig_path.to_path_buf(), - &error, - Some(tsconfig_string), - ) + ResolveError::from_serde_json_error(tsconfig_path.to_path_buf(), &error) })?; callback(&mut tsconfig)?; let tsconfig = Arc::new(tsconfig.build()); @@ -285,6 +281,8 @@ pub struct CachedPathImpl { hash: u64, path: Box, parent: Option, + is_node_modules: bool, + inside_node_modules: bool, meta: OnceLock>, canonicalized: OnceLock>, canonicalizing: AtomicU64, @@ -293,11 +291,19 @@ pub struct CachedPathImpl { } impl CachedPathImpl { - const fn new(hash: u64, path: Box, parent: Option) -> Self { + fn new( + hash: u64, + path: Box, + is_node_modules: bool, + inside_node_modules: bool, + parent: Option, + ) -> Self { Self { hash, path, parent, + is_node_modules, + inside_node_modules, meta: OnceLock::new(), canonicalized: OnceLock::new(), canonicalizing: AtomicU64::new(0), @@ -328,6 +334,14 @@ impl CachedPath for FsCachedPath { self.0.parent.as_ref() } + fn is_node_modules(&self) -> bool { + self.is_node_modules + } + + fn inside_node_modules(&self) -> bool { + self.inside_node_modules + } + fn module_directory>( &self, module_name: &str, @@ -346,7 +360,7 @@ impl CachedPath for FsCachedPath { /// /// # Errors /// - /// * [ResolveError::JSON] + /// * [ResolveError::Json] fn find_package_json>( &self, options: &ResolveOptions, @@ -399,7 +413,7 @@ impl CachedPath for FsCachedPath { } /// Returns a new path by resolving the given subpath (including "." and ".." components) with this path. - fn normalize_with>(&self, subpath: impl AsRef, cache: &C) -> Self { + fn normalize_with, P: AsRef>(&self, subpath: P, cache: &C) -> Self { let subpath = subpath.as_ref(); let mut components = subpath.components(); let Some(head) = components.next() else { return cache.value(subpath) }; @@ -475,6 +489,12 @@ impl PartialEq for FsCachedPath { impl Eq for FsCachedPath {} +impl fmt::Debug for FsCachedPath { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("FsCachedPath").field("path", &self.path).finish() + } +} + struct BorrowedCachedPath<'a> { hash: u64, path: &'a Path, diff --git a/src/lib.rs b/src/lib.rs index bcac70ac..e54b6469 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -77,7 +77,7 @@ use std::{ borrow::Cow, cmp::Ordering, ffi::OsStr, - fmt, + fmt, iter, path::{Component, Path, PathBuf}, sync::Arc, }; @@ -106,7 +106,7 @@ pub use crate::{ PackageJson, PackageType, }, path::PathUtil, - resolution::Resolution, + resolution::{ModuleType, Resolution}, tsconfig::{CompilerOptions, CompilerOptionsPathsMap, ProjectReference, TsConfig}, }; use crate::{context::ResolveContext as Ctx, path::SLASH_START, specifier::Specifier}; @@ -296,20 +296,52 @@ impl> ResolverGeneric { // enhanced-resolve: restrictions self.check_restrictions(&path)?; - let package_json = - cached_path.find_package_json(&self.options, self.cache.as_ref(), ctx)?; - if let Some((_, package_json)) = &package_json { + let package_json = self.find_package_json_for_a_package(&cached_path, ctx)?; + if let Some(package_json) = &package_json { // path must be inside the package. debug_assert!(path.starts_with(package_json.directory())); } + let module_type = self.esm_file_format(&cached_path, ctx)?; Ok(Resolution { path, query: ctx.query.take(), fragment: ctx.fragment.take(), - package_json: package_json.map(|(_, p)| p), + package_json, + module_type, }) } + fn find_package_json_for_a_package( + &self, + cached_path: &C::Cp, + ctx: &mut Ctx, + ) -> Result>, ResolveError> { + // Algorithm: + // Find `node_modules/package/package.json` + // or the first package.json if the path is not inside node_modules. + let inside_node_modules = cached_path.inside_node_modules(); + if inside_node_modules { + let mut last = None; + for cp in iter::successors(Some(cached_path), |cp| cp.parent()) { + if cp.is_node_modules() { + break; + } + if self.cache.is_dir(cp, ctx) { + if let Some((_, package_json)) = + self.cache.get_package_json(cp, &self.options, ctx)? + { + last = Some(package_json); + } + } + } + Ok(last) + } else { + cached_path + .find_package_json(&self.options, self.cache.as_ref(), ctx) + .map(|result| result.map(|(_, p)| p)) + } + } + /// require(X) from module at path Y /// /// X: specifier @@ -474,10 +506,8 @@ impl> ResolverGeneric { ) -> Result { debug_assert_eq!(specifier.chars().next(), Some('#')); // a. LOAD_PACKAGE_IMPORTS(X, dirname(Y)) - if let Some(path) = self.load_package_imports(cached_path, specifier, ctx)? { - return Ok(path); - } - self.load_package_self_or_node_modules(cached_path, specifier, ctx) + self.load_package_imports(cached_path, specifier, ctx)? + .map_or_else(|| Err(ResolveError::NotFound(specifier.to_string())), Ok) } fn require_bare( @@ -1966,4 +1996,59 @@ impl> ResolverGeneric { .strip_prefix(package_name) .filter(|tail| tail.is_empty() || tail.starts_with(SLASH_START)) } + + /// ESM_FILE_FORMAT(url) + /// + /// + fn esm_file_format( + &self, + cached_path: &C::Cp, + ctx: &mut Ctx, + ) -> Result, ResolveError> { + if !self.options.module_type { + return Ok(None); + } + // 1. Assert: url corresponds to an existing file. + let ext = cached_path.path().extension().and_then(|ext| ext.to_str()); + match ext { + // 2. If url ends in ".mjs", then + // 1. Return "module". + Some("mjs" | "mts") => Ok(Some(ModuleType::Module)), + // 3. If url ends in ".cjs", then + // 1. Return "commonjs". + Some("cjs" | "cts") => Ok(Some(ModuleType::CommonJs)), + // 4. If url ends in ".json", then + // 1. Return "json". + Some("json") => Ok(Some(ModuleType::Json)), + // 5. If --experimental-wasm-modules is enabled and url ends in ".wasm", then + // 1. Return "wasm". + Some("wasm") => Ok(Some(ModuleType::Wasm)), + // 6. If --experimental-addon-modules is enabled and url ends in ".node", then + // 1. Return "addon". + Some("node") => Ok(Some(ModuleType::Addon)), + // 11. If url ends in ".js", then + // 1. If packageType is not null, then + // 1. Return packageType. + Some("js" | "ts") => { + // 7. Let packageURL be the result of LOOKUP_PACKAGE_SCOPE(url). + // 8. Let pjson be the result of READ_PACKAGE_JSON(packageURL). + let package_json = + cached_path.find_package_json(&self.options, self.cache.as_ref(), ctx)?; + // 9. Let packageType be null. + if let Some((_, package_json)) = package_json { + // 10. If pjson?.type is "module" or "commonjs", then + // 1. Set packageType to pjson.type. + if let Some(ty) = package_json.r#type() { + return Ok(Some(match ty { + PackageType::Module => ModuleType::Module, + PackageType::CommonJs => ModuleType::CommonJs, + })); + } + } + Ok(None) + } + // Step 11.2 .. 12 omitted, which involves detecting file content. + _ => Ok(None), + } + } } diff --git a/src/options.rs b/src/options.rs index ccb3ec7f..6165e35b 100644 --- a/src/options.rs +++ b/src/options.rs @@ -177,6 +177,11 @@ pub struct ResolveOptions { /// /// Default `false` pub builtin_modules: bool, + + /// Resolve [crate::Resolution::module_type]. + /// + /// Default: `false` + pub module_type: bool, } impl ResolveOptions { @@ -394,7 +399,7 @@ impl ResolveOptions { } /// Value for [ResolveOptions::enforce_extension] -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Eq, PartialEq)] pub enum EnforceExtension { Auto, Enabled, @@ -403,17 +408,17 @@ pub enum EnforceExtension { impl EnforceExtension { #[must_use] - pub const fn is_auto(&self) -> bool { + pub const fn is_auto(self) -> bool { matches!(self, Self::Auto) } #[must_use] - pub const fn is_enabled(&self) -> bool { + pub const fn is_enabled(self) -> bool { matches!(self, Self::Enabled) } #[must_use] - pub const fn is_disabled(&self) -> bool { + pub const fn is_disabled(self) -> bool { matches!(self, Self::Disabled) } } @@ -498,6 +503,7 @@ impl Default for ResolveOptions { roots: vec![], symlinks: true, builtin_modules: false, + module_type: false, } } } @@ -649,6 +655,7 @@ mod test { roots: vec![], symlinks: false, tsconfig: None, + module_type: false, }; assert_eq!(format!("{options}"), ""); diff --git a/src/resolution.rs b/src/resolution.rs index 63f635d7..ee07cbe1 100644 --- a/src/resolution.rs +++ b/src/resolution.rs @@ -6,17 +6,36 @@ use std::{ use crate::{Cache, PackageJson}; +#[derive(Debug, Clone, Copy, Eq, PartialEq)] +pub enum ModuleType { + Module, + CommonJs, + Json, + Wasm, + Addon, +} + /// The final path resolution with optional `?query` and `#fragment` pub struct Resolution { pub(crate) path: PathBuf, - /// path query `?query`, contains `?`. + /// Path query `?query`, contains `?`. pub(crate) query: Option, - /// path fragment `#query`, contains `#`. + /// Path fragment `#query`, contains `#`. pub(crate) fragment: Option, + /// `package.json` for the given module. pub(crate) package_json: Option>, + + /// Module type for this path. + /// + /// Enable with [crate::ResolveOptions::module_type]. + /// + /// The module type is computed `ESM_FILE_FORMAT` from the [ESM resolution algorithm specification](https://nodejs.org/docs/latest/api/esm.html#resolution-algorithm-specification). + /// + /// The algorithm uses the file extension or finds the closest `package.json` with the `type` field. + pub(crate) module_type: Option, } impl Clone for Resolution { @@ -26,6 +45,7 @@ impl Clone for Resolution { query: self.query.clone(), fragment: self.fragment.clone(), package_json: self.package_json.clone(), + module_type: self.module_type, } } } @@ -36,6 +56,7 @@ impl fmt::Debug for Resolution { .field("path", &self.path) .field("query", &self.query) .field("fragment", &self.fragment) + .field("module_type", &self.module_type) .field("package_json", &self.package_json.as_ref().map(|p| p.path())) .finish() } @@ -91,4 +112,10 @@ impl Resolution { } PathBuf::from(path) } + + /// Returns the module type of this path. + #[must_use] + pub fn module_type(&self) -> Option { + self.module_type + } } diff --git a/src/tests/dependencies.rs b/src/tests/dependencies.rs index 3442b9d2..9f1b6da2 100644 --- a/src/tests/dependencies.rs +++ b/src/tests/dependencies.rs @@ -99,8 +99,11 @@ mod windows { assert_eq!(resolved_path, Ok(PathBuf::from(result))); let file_dependencies = file_dependencies.iter().map(PathBuf::from).collect(); let missing_dependencies = missing_dependencies.iter().map(PathBuf::from).collect(); - assert_eq!(ctx.file_dependencies, file_dependencies, "{name}"); - assert_eq!(ctx.missing_dependencies, missing_dependencies, "{name}"); + assert_eq!(ctx.file_dependencies, file_dependencies, "{name} file_dependencies"); + assert_eq!( + ctx.missing_dependencies, missing_dependencies, + "{name} missing_dependencies" + ); } } } diff --git a/src/tests/incorrect_description_file.rs b/src/tests/incorrect_description_file.rs index dc688003..a1ee1656 100644 --- a/src/tests/incorrect_description_file.rs +++ b/src/tests/incorrect_description_file.rs @@ -10,15 +10,13 @@ fn incorrect_description_file_1() { let f = super::fixture().join("incorrect-package"); let mut ctx = ResolveContext::default(); let resolution = Resolver::default().resolve_with_context(f.join("pack1"), ".", &mut ctx); - let _error = ResolveError::JSON(JSONError { + let error = ResolveError::Json(JSONError { path: f.join("pack1/package.json"), message: String::from("EOF while parsing a value at line 3 column 0"), line: 3, column: 0, - content: None, }); - - assert!(matches!(resolution, Err(ResolveError::JSON(_)))); + assert_eq!(resolution, Err(error)); assert_eq!( ctx.file_dependencies, FxHashSet::from_iter([f.join("pack1"), f.join("pack1/package.json")]) @@ -31,14 +29,13 @@ fn incorrect_description_file_1() { fn incorrect_description_file_2() { let f = super::fixture().join("incorrect-package"); let resolution = Resolver::default().resolve(f.join("pack2"), "."); - let _error = ResolveError::JSON(JSONError { + let error = ResolveError::Json(JSONError { path: f.join("pack2/package.json"), message: String::from("EOF while parsing a value at line 1 column 0"), line: 1, column: 0, - content: Some(String::new()), }); - assert!(matches!(resolution, Err(ResolveError::JSON(_)))); + assert_eq!(resolution, Err(error)); } // should not resolve main in incorrect description file #3 diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 6887e388..18b23082 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -12,6 +12,8 @@ mod incorrect_description_file; mod main_field; mod memory_fs; mod missing; +mod module_type; +mod package_json; #[cfg(feature = "yarn_pnp")] mod pnp; mod resolution; diff --git a/src/tests/module_type.rs b/src/tests/module_type.rs new file mode 100644 index 00000000..a08dd3ea --- /dev/null +++ b/src/tests/module_type.rs @@ -0,0 +1,33 @@ +use crate::{ModuleType, ResolveOptions, Resolver}; + +#[test] +fn test() { + let f = super::fixture_root().join("misc").join("module-type"); + + let resolver = Resolver::new(ResolveOptions { module_type: true, ..ResolveOptions::default() }); + + let pass = [ + ("./file.cjs", ModuleType::CommonJs), + ("./file.mjs", ModuleType::Module), + ("./file.node", ModuleType::Addon), + ("./file.wasm", ModuleType::Wasm), + ("./cjs/file.cjs", ModuleType::CommonJs), + ("./cjs/file.mjs", ModuleType::Module), + ("./cjs/file.js", ModuleType::CommonJs), + ("./esm/file.cjs", ModuleType::CommonJs), + ("./esm/file.mjs", ModuleType::Module), + ("./esm/file.js", ModuleType::Module), + ]; + + for (file, module_type) in pass { + let resolution = resolver.resolve(&f, file).unwrap(); + assert_eq!(resolution.module_type(), Some(module_type), "{file}"); + } + + let fail = ["./file", "./file.ext", "./no/file.js"]; + + for file in fail { + let resolution = resolver.resolve(&f, file).unwrap(); + assert_eq!(resolution.module_type(), None); + } +} diff --git a/src/tests/package_json.rs b/src/tests/package_json.rs new file mode 100644 index 00000000..1e417757 --- /dev/null +++ b/src/tests/package_json.rs @@ -0,0 +1,48 @@ +//! Tests for `Resolution::package_json`. + +use crate::Resolver; + +#[test] +fn test() { + let f = super::fixture_root().join("misc"); + + let resolver = Resolver::default(); + + let data = [ + (f.clone(), "package-json-nested"), + // Nested package.json do not participate in module resolution. + (f.clone(), "package-json-nested/foo"), + (f.clone(), "package-json-nested/foo/bar"), + ]; + + let resolved_package_json_path = f.join("node_modules/package-json-nested/package.json"); + + for (path, request) in data { + let package_json = + resolver.resolve(&path, request).ok().and_then(|f| f.package_json().cloned()); + let package_json_path = package_json.as_ref().map(|p| &p.path); + let package_json_name = package_json.as_ref().and_then(|p| p.name.as_deref()); + assert_eq!(package_json_path, Some(&resolved_package_json_path), "{path:?} {request}"); + assert_eq!(package_json_name, Some("package-json-nested"), "{path:?} {request}"); + } +} + +#[test] +fn adjacent_to_node_modules() { + let f = super::fixture_root().join("misc"); + + let resolver = Resolver::default(); + + // populate cache + let _ = resolver.resolve(&f, "package-json-nested"); + + let path = f.join("dir-with-index"); + let request = "./index.js"; + let resolved_package_json_path = f.join("package.json"); + + let package_json = resolver.resolve(&path, request).unwrap().package_json().cloned(); + let package_json_path = package_json.as_ref().map(|p| &p.path); + let package_json_name = package_json.as_ref().and_then(|p| p.name.as_deref()); + assert_eq!(package_json_path, Some(&resolved_package_json_path)); + assert_eq!(package_json_name, Some("misc")); +} diff --git a/src/tests/resolution.rs b/src/tests/resolution.rs index 27b81f00..70b596a5 100644 --- a/src/tests/resolution.rs +++ b/src/tests/resolution.rs @@ -9,10 +9,12 @@ fn test() { query: Some("?query".to_string()), fragment: Some("#fragment".to_string()), package_json: None, + module_type: None, }; assert_eq!(resolution.path(), Path::new("foo")); assert_eq!(resolution.query(), Some("?query")); assert_eq!(resolution.fragment(), Some("#fragment")); assert_eq!(resolution.full_path(), PathBuf::from("foo?query#fragment")); + assert_eq!(resolution.module_type(), None); assert_eq!(resolution.into_path_buf(), PathBuf::from("foo")); } diff --git a/src/tests/resolve.rs b/src/tests/resolve.rs index 1e2cd55a..c5fd1dc1 100644 --- a/src/tests/resolve.rs +++ b/src/tests/resolve.rs @@ -1,6 +1,6 @@ //! -use crate::{ResolveError, ResolveOptions, Resolver}; +use crate::{Resolution, ResolveError, ResolveOptions, Resolver}; #[test] fn resolve() { @@ -53,8 +53,14 @@ fn resolve() { ]; for (comment, path, request, expected) in pass { - let resolved_path = resolver.resolve(&path, request).map(|r| r.full_path()); - assert_eq!(resolved_path, Ok(expected), "{comment} {path:?} {request}"); + let resolution = resolver.resolve(&path, request).ok(); + let resolved_path = resolution.as_ref().map(Resolution::full_path); + let resolved_package_json = + resolution.as_ref().and_then(|r| r.package_json()).map(|p| p.path.clone()); + if expected.to_str().unwrap().contains("node_modules") { + assert!(resolved_package_json.is_some(), "{comment} {path:?} {request}"); + } + assert_eq!(resolved_path, Some(expected), "{comment} {path:?} {request}"); } } diff --git a/src/tests/scoped_packages.rs b/src/tests/scoped_packages.rs index 8258f00f..08548739 100644 --- a/src/tests/scoped_packages.rs +++ b/src/tests/scoped_packages.rs @@ -1,6 +1,6 @@ //! -use crate::{ResolveOptions, Resolver}; +use crate::{Resolution, ResolveOptions, Resolver}; #[test] fn scoped_packages() { @@ -13,13 +13,18 @@ fn scoped_packages() { #[rustfmt::skip] let pass = [ - ("main field should work", f.clone(), "@scope/pack1", f.join("./node_modules/@scope/pack1/main.js")), - ("browser field should work", f.clone(), "@scope/pack2", f.join("./node_modules/@scope/pack2/main.js")), - ("folder request should work", f.clone(), "@scope/pack2/lib", f.join("./node_modules/@scope/pack2/lib/index.js")) + ("main field should work", f.clone(), "@scope/pack1", "@scope/pack1", f.join("./node_modules/@scope/pack1/main.js")), + ("browser field should work", f.clone(), "@scope/pack2", "@scope/pack2", f.join("./node_modules/@scope/pack2/main.js")), + ("folder request should work", f.clone(), "@scope/pack2/lib", "@scope/pack2", f.join("./node_modules/@scope/pack2/lib/index.js")) ]; - for (comment, path, request, expected) in pass { - let resolved_path = resolver.resolve(&f, request).map(|r| r.full_path()); - assert_eq!(resolved_path, Ok(expected), "{comment} {path:?} {request}"); + for (comment, path, request, package, expected) in pass { + let resolution = resolver.resolve(&path, request).ok(); + let resolved_path = resolution.as_ref().map(Resolution::full_path); + let resolved_package_json = + resolution.as_ref().and_then(|r| r.package_json()).map(|p| p.path.clone()); + assert_eq!(resolved_path, Some(expected), "{comment} {path:?} {request}"); + let package_json_path = f.join("node_modules").join(package).join("package.json"); + assert_eq!(resolved_package_json, Some(package_json_path), "{path:?} {request}"); } } diff --git a/src/tests/simple.rs b/src/tests/simple.rs index c7ec677d..b1222792 100644 --- a/src/tests/simple.rs +++ b/src/tests/simple.rs @@ -2,7 +2,7 @@ use std::env; -use crate::Resolver; +use crate::{Resolution, Resolver}; #[test] fn resolve_abs_main() { @@ -52,8 +52,13 @@ fn dashed_name() { ]; for (path, request, expected) in data { - let resolved_path = resolver.resolve(&path, request).map(|f| f.full_path()); - assert_eq!(resolved_path, Ok(expected), "{path:?} {request}"); + let resolution = resolver.resolve(&path, request).ok(); + let resolved_path = resolution.as_ref().map(Resolution::full_path); + let resolved_package_json = + resolution.as_ref().and_then(|r| r.package_json()).map(|p| p.path.clone()); + assert_eq!(resolved_path, Some(expected), "{path:?} {request}"); + let package_json_path = f.join("node_modules").join(request).join("package.json"); + assert_eq!(resolved_package_json, Some(package_json_path), "{path:?} {request}"); } } diff --git a/src/tests/tsconfig_paths.rs b/src/tests/tsconfig_paths.rs index 186b45a3..18404a49 100644 --- a/src/tests/tsconfig_paths.rs +++ b/src/tests/tsconfig_paths.rs @@ -122,14 +122,13 @@ fn broken() { }); let resolved_path = resolver.resolve(&f, "/"); - let _error = ResolveError::JSON(JSONError { + let error = ResolveError::Json(JSONError { path: f.join("tsconfig_broken.json"), message: String::from("EOF while parsing an object at line 2 column 0"), line: 2, column: 0, - content: Some("{\n".to_string()), }); - assert!(matches!(resolved_path, Err(ResolveError::JSON(_)))); + assert_eq!(resolved_path, Err(error)); } // @@ -239,6 +238,8 @@ fn test_merge_tsconfig() { assert_eq!(compiler_options.jsx_factory, Some("h".to_string())); assert_eq!(compiler_options.jsx_fragment_factory, Some("Fragment".to_string())); assert_eq!(compiler_options.jsx_import_source, Some("xxx".to_string())); + assert_eq!(compiler_options.module, Some("ESNext".to_string())); + assert_eq!(compiler_options.target, Some("ESNext".to_string())); } #[test] diff --git a/src/tsconfig.rs b/src/tsconfig.rs index dbe3f7aa..06d2c30c 100644 --- a/src/tsconfig.rs +++ b/src/tsconfig.rs @@ -139,8 +139,44 @@ pub trait TsConfig: Sized + Debug { compiler_options.set_jsx_import_source(jsx_import_source.to_string()); } } - } + if compiler_options.verbatim_module_syntax().is_none() { + if let Some(verbatim_module_syntax) = + tsconfig.compiler_options().verbatim_module_syntax() + { + compiler_options.set_verbatim_module_syntax(*verbatim_module_syntax); + } + } + + if compiler_options.preserve_value_imports().is_none() { + if let Some(preserve_value_imports) = + tsconfig.compiler_options().preserve_value_imports() + { + compiler_options.set_preserve_value_imports(*preserve_value_imports); + } + } + + if compiler_options.imports_not_used_as_values().is_none() { + if let Some(imports_not_used_as_values) = + tsconfig.compiler_options().imports_not_used_as_values() + { + compiler_options + .set_imports_not_used_as_values(imports_not_used_as_values.to_string()); + } + } + + if compiler_options.target().is_none() { + if let Some(target) = tsconfig.compiler_options().target() { + compiler_options.set_target(target.to_string()); + } + } + + if compiler_options.module().is_none() { + if let Some(module) = tsconfig.compiler_options().module() { + compiler_options.set_module(module.to_string()); + } + } + } /// "Build" the root tsconfig, resolve: /// /// * `{configDir}` template variable @@ -355,6 +391,46 @@ pub trait CompilerOptions { /// Sets JSX import source. fn set_jsx_import_source(&mut self, _jsx_import_source: String) {} + + /// Whether to use verbatim module syntax. + fn verbatim_module_syntax(&self) -> Option<&bool> { + None + } + + /// Sets whether to use verbatim module syntax. + fn set_verbatim_module_syntax(&mut self, _verbatim_module_syntax: bool) {} + + /// Whether to preserve value imports. + fn preserve_value_imports(&self) -> Option<&bool> { + None + } + + /// Sets whether to preserve value imports. + fn set_preserve_value_imports(&mut self, _preserve_value_imports: bool) {} + + /// Whether to use imports not used as values. + fn imports_not_used_as_values(&self) -> Option<&str> { + None + } + + /// Sets whether to use imports not used as values. + fn set_imports_not_used_as_values(&mut self, _imports_not_used_as_values: String) {} + + /// Target. + fn target(&self) -> Option<&str> { + None + } + + /// Sets the target. + fn set_target(&mut self, _target: String) {} + + /// Module. + fn module(&self) -> Option<&str> { + None + } + + /// Sets the module. + fn set_module(&mut self, _module: String) {} } /// Project Reference. diff --git a/src/tsconfig_serde.rs b/src/tsconfig_serde.rs index 93e54cfe..e7d14bd7 100644 --- a/src/tsconfig_serde.rs +++ b/src/tsconfig_serde.rs @@ -145,6 +145,9 @@ pub struct CompilerOptionsSerde { /// pub target: Option, + + /// + pub module: Option, } impl CompilerOptions for CompilerOptionsSerde { @@ -223,6 +226,46 @@ impl CompilerOptions for CompilerOptionsSerde { fn set_jsx_import_source(&mut self, jsx_import_source: String) { self.jsx_import_source = Some(jsx_import_source); } + + fn verbatim_module_syntax(&self) -> Option<&bool> { + self.verbatim_module_syntax.as_ref() + } + + fn set_verbatim_module_syntax(&mut self, verbatim_module_syntax: bool) { + self.verbatim_module_syntax = Some(verbatim_module_syntax); + } + + fn preserve_value_imports(&self) -> Option<&bool> { + self.preserve_value_imports.as_ref() + } + + fn set_preserve_value_imports(&mut self, preserve_value_imports: bool) { + self.preserve_value_imports = Some(preserve_value_imports); + } + + fn imports_not_used_as_values(&self) -> Option<&str> { + self.imports_not_used_as_values.as_deref() + } + + fn set_imports_not_used_as_values(&mut self, imports_not_used_as_values: String) { + self.imports_not_used_as_values = Some(imports_not_used_as_values); + } + + fn target(&self) -> Option<&str> { + self.target.as_deref() + } + + fn set_target(&mut self, target: String) { + self.target = Some(target); + } + + fn module(&self) -> Option<&str> { + self.module.as_deref() + } + + fn set_module(&mut self, module: String) { + self.module = Some(module); + } } /// Value for the "extends" field. diff --git a/tests/resolve_test.rs b/tests/resolve_test.rs index ebaea47c..8f6be8ad 100644 --- a/tests/resolve_test.rs +++ b/tests/resolve_test.rs @@ -1,6 +1,6 @@ use std::{env, path::PathBuf}; -use unrs_resolver::{Resolution, ResolveError, ResolveOptions, Resolver}; +use unrs_resolver::{ModuleType, Resolution, ResolveError, ResolveOptions, Resolver}; fn dir() -> PathBuf { env::current_dir().unwrap() @@ -191,6 +191,37 @@ fn decimal_js_from_mathjs() { } } +#[test] +fn minimatch() { + let dir = dir(); + let path = dir.join("fixtures/pnpm"); + let esm_resolver = Resolver::new(ResolveOptions { + condition_names: vec!["import".into()], + module_type: true, + ..ResolveOptions::default() + }); + let resolution = esm_resolver.resolve(&path, "minimatch").unwrap(); + assert_eq!( + resolution.full_path(), + dir.join("node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/index.js") + ); + assert_eq!(resolution.module_type(), Some(ModuleType::Module)); + + let cjs_resolver = esm_resolver.clone_with_options(ResolveOptions { + condition_names: vec!["require".into()], + module_type: true, + ..ResolveOptions::default() + }); + let resolution = cjs_resolver.resolve(&path, "minimatch").unwrap(); + assert_eq!( + resolution.full_path(), + dir.join( + "node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/commonjs/index.js" + ) + ); + assert_eq!(resolution.module_type(), Some(ModuleType::CommonJs)); +} + #[test] // regression: https://github.com/NicholasLYang/oxc-repro fn nested_symlinks() {