Skip to content

fix(pnp): support pnpapi core module and package deep link#24

Merged
JounQin merged 5 commits intomainfrom
fix/pnp
Mar 19, 2025
Merged

fix(pnp): support pnpapi core module and package deep link#24
JounQin merged 5 commits intomainfrom
fix/pnp

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Mar 18, 2025

@socket-security
Copy link

socket-security bot commented Mar 18, 2025

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/helper-validator-identifier@7.25.9 None 0 48.3 kB nicolo-ribaudo
npm/@nodelib/fs.scandir@2.1.5 filesystem 0 22.2 kB mrmlnc
npm/@nodelib/fs.stat@2.0.5 filesystem 0 11.8 kB mrmlnc
npm/@nodelib/fs.walk@1.2.8 None 0 26.4 kB mrmlnc
npm/@yarnpkg/lockfile@1.1.0 environment, eval, filesystem 0 280 kB arcanis
npm/array-union@2.1.0 None 0 3.17 kB sindresorhus
npm/balanced-match@1.0.2 None 0 6.94 kB juliangruber
npm/beachball@2.51.0 None 0 409 kB ecraig12345_msft
npm/brace-expansion@1.1.11 None 0 11.1 kB juliangruber
npm/braces@3.0.3 None 0 44.6 kB jonschlinkert
npm/callsites@3.1.0 None 0 6.33 kB sindresorhus
npm/concat-map@0.0.1 None 0 4.86 kB substack
npm/cosmiconfig@8.3.6 filesystem 0 78.5 kB d-fischer
npm/cross-spawn@7.0.6 environment, filesystem, shell 0 16.1 kB satazor
npm/dir-glob@3.0.1 None 0 5.42 kB sindresorhus
npm/error-ex@1.3.2 None 0 9.04 kB qix
npm/execa@5.1.1 environment, shell 0 57.5 kB sindresorhus
npm/fast-glob@3.3.3 filesystem 0 98.4 kB mrmlnc
npm/fastq@1.19.1 None 0 45.9 kB matteo.collina
npm/fill-range@7.1.1 None 0 16.7 kB jonschlinkert
npm/fs-extra@11.3.0 None 0 55.3 kB ryanzim
npm/get-stream@6.0.1 None 0 12.2 kB sindresorhus
npm/git-up@7.0.0 None 0 10.9 kB ionicabizau
npm/git-url-parse@13.1.1 None 0 31 kB ionicabizau
npm/glob-parent@5.1.2 None 0 12.1 kB phated
npm/globby@11.1.0 filesystem 0 21.8 kB sindresorhus
npm/human-signals@2.1.0 None 0 44.3 kB ehmicky
npm/ignore@5.3.2 None 0 53.6 kB kael
npm/import-fresh@3.3.1 None 0 4.69 kB sindresorhus
npm/is-arrayish@0.2.1 None 0 4.05 kB qix
npm/is-extglob@2.1.1 None 0 6.22 kB jonschlinkert
npm/is-glob@4.0.3 None 0 13.6 kB phated
npm/is-number@7.0.0 None 0 9.62 kB jonschlinkert
npm/is-ssh@1.4.1 None 0 19.5 kB ionicabizau
npm/is-stream@2.0.1 None 0 5.93 kB sindresorhus
npm/isexe@2.0.0 environment, filesystem 0 11 kB isaacs
npm/jju@1.4.0 filesystem 0 70.4 kB rlidwka
npm/json-parse-even-better-errors@2.3.1 None 0 10.4 kB isaacs
npm/jsonfile@6.1.0 filesystem 0 19.8 kB ryanzim
npm/kleur@3.0.3 None 0 9.89 kB lukeed
npm/lines-and-columns@1.2.4 None 0 5.39 kB eventualbuddha
npm/lodash@4.17.21 None 0 1.41 MB bnjmnt4n
npm/merge-stream@2.0.0 None 0 4.31 kB stevemao
npm/mimic-fn@2.1.0 None 0 4.46 kB sindresorhus
npm/minimatch@3.1.2 None 0 34.9 kB isaacs
npm/npm-run-path@4.0.1 environment 0 8.13 kB sindresorhus
npm/onetime@5.1.2 None 0 6.17 kB sindresorhus
npm/p-graph@1.1.2 None 0 58.3 kB kenotron_msft
npm/p-limit@3.1.0 None 0 7.75 kB sindresorhus
npm/parent-module@1.0.1 None 0 3.92 kB sindresorhus
npm/parse-json@5.2.0 None 0 5.41 kB sindresorhus
npm/parse-path@7.0.1 None 0 20.8 kB ionicabizau, simon-p-r
npm/parse-url@8.1.0 None 0 36.3 kB ionicabizau
npm/path-type@4.0.0 filesystem 0 5.41 kB sindresorhus
npm/picomatch@2.3.1 None 0 90 kB mrmlnc
npm/prompts@2.4.2 None 0 187 kB terkelg
npm/protocols@2.0.2 None 0 7.28 kB ionicabizau
npm/queue-microtask@1.2.3 None 0 8.37 kB feross
npm/resolve-from@4.0.0 filesystem, unsafe 0 4.64 kB sindresorhus
npm/reusify@1.1.0 None 0 11.7 kB matteo.collina
npm/run-parallel@1.2.0 None 0 6.56 kB feross
npm/shebang-command@2.0.0 None 0 2.56 kB kevva
npm/shebang-regex@3.0.0 None 0 2.83 kB sindresorhus
npm/signal-exit@3.0.7 None 0 9.96 kB isaacs
npm/sisteransi@1.0.5 None 0 6.79 kB terkelg
npm/slash@3.0.0 None 0 3.51 kB sindresorhus
npm/strip-final-newline@2.0.0 None 0 3.05 kB sindresorhus
npm/to-regex-range@5.0.1 None 0 22.9 kB jonschlinkert
npm/toposort@2.0.2 None 0 16.7 kB marcelklehr
npm/universalify@2.0.1 None 0 4.67 kB ryanzim
npm/which@2.0.2 environment 0 9.97 kB isaacs
npm/workspace-tools@0.38.1 environment, filesystem, shell 0 190 kB ecraig12345_msft
npm/yargs-parser@21.1.1 environment, filesystem 0 128 kB oss-bot
npm/yocto-queue@0.1.0 None 0 6.03 kB sindresorhus

View full report↗︎

@codecov
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.38%. Comparing base (1e3a6b8) to head (24d2b98).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
+ Coverage   93.34%   93.38%   +0.03%     
==========================================
  Files          13       13              
  Lines        2812     2827      +15     
==========================================
+ Hits         2625     2640      +15     
  Misses        187      187              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 19, 2025

CodSpeed Performance Report

Merging #24 will not alter performance

Comparing fix/pnp (24d2b98) with main (1e3a6b8)

Summary

✅ 3 untouched benchmarks

@JounQin JounQin marked this pull request as ready for review March 19, 2025 00:35
@JounQin JounQin changed the title fix(pnp): package deep link fix(pnp): support pnpapi core module and package deep link Mar 19, 2025
@JounQin JounQin merged commit 82b5baa into main Mar 19, 2025
16 checks passed
@JounQin JounQin deleted the fix/pnp branch March 19, 2025 00:36
@JounQin JounQin mentioned this pull request Mar 19, 2025
JounQin pushed a commit that referenced this pull request Jun 10, 2025
## 🤖 New release

* `oxc_resolver`: 8.0.0 -> 9.0.0 (⚠ API breaking changes)
* `oxc_napi_resolver`: 8.0.0

### ⚠ `oxc_resolver` breaking changes

```text
--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field ResolveOptions.modules in /tmp/.tmpTBvVad/oxc-resolver/src/options.rs:114

--- failure trait_method_added: pub trait method added ---

Description:
A non-sealed public trait added a new method without a default implementation, which breaks downstream implementations of the trait
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-item-no-default
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/trait_method_added.ron

Failed in:
  trait method oxc_resolver::CachedPath::module_directory in file /tmp/.tmpTBvVad/oxc-resolver/src/cache.rs:69
  trait method oxc_resolver::CachedPath::cached_node_modules in file /tmp/.tmpTBvVad/oxc-resolver/src/cache.rs:76
```

<details><summary><i><b>Changelog</b></i></summary><p>

## `oxc_resolver`

<blockquote>

##
[9.0.0](oxc-project/oxc-resolver@oxc_resolver-v8.0.0...oxc_resolver-v9.0.0)
- 2025-05-09

### <!-- 1 -->Bug Fixes

- hash import does not need to load from node_modules
([#501](oxc-project/oxc-resolver#501))

### <!-- 7 -->Chore

- add `--tsconfig` to example
([#505](oxc-project/oxc-resolver#505))
- publish `oxc_napi_resolver`
([#496](oxc-project/oxc-resolver#496))
</blockquote>

## `oxc_napi_resolver`

<blockquote>

##
[8.0.0](https://github.com/oxc-project/oxc-resolver/releases/tag/oxc_napi_resolver-v8.0.0)
- 2025-05-09

### <!-- 0 -->Features

- *(napi)* add mimalloc
([#423](oxc-project/oxc-resolver#423))
- [**breaking**] Rust Edition 2024
([#402](oxc-project/oxc-resolver#402))
- expose `package_json_path`
([#376](oxc-project/oxc-resolver#376))
- *(napi)* expose module type info in ResolveResult
([#223](oxc-project/oxc-resolver#223))
- *(napi)* add tracing via `OXC_LOG:DEBUG`
([#202](oxc-project/oxc-resolver#202))
- *(napi)* add async API
([#191](oxc-project/oxc-resolver#191))
- add `imports_fields` option
([#138](oxc-project/oxc-resolver#138))
- add more builder functions for options
([#110](oxc-project/oxc-resolver#110))
- *(napi)* support wasi target
([#31](oxc-project/oxc-resolver#31))
- add file_dependencies and missing_dependencies API
([#50](oxc-project/oxc-resolver#50))
- *(napi)* expose cloneWithOptions and clearCache methods
([#40](oxc-project/oxc-resolver#40))
- *(napi)* update the doc and type for tsconfig references
([#24](oxc-project/oxc-resolver#24))
- *(napi)* add options
([#19](oxc-project/oxc-resolver#19))
- *(resolver)* add tracing-subscriber feature
([#904](oxc-project/oxc-resolver#904))
- *(resolver)* tsconfig project references
([#862](oxc-project/oxc-resolver#862))
- *(resolver)* add thiserror
([#847](oxc-project/oxc-resolver#847))
- *(resolver)* implement nested alias field
([#795](oxc-project/oxc-resolver#795))
- *(resolver)* implement tsconfig-paths
([#750](oxc-project/oxc-resolver#750))
- *(resolver)* implement configurable `exports_fields` option
([#733](oxc-project/oxc-resolver#733))
- *(resolver)* implement `main_fields`
- *(resolver)* implement resolveToContext
([#694](oxc-project/oxc-resolver#694))
- *(resolver)* implement restrictions (path only)
([#693](oxc-project/oxc-resolver#693))
- *(resolver)* implement fully specified
([#687](oxc-project/oxc-resolver#687))
- *(resolver)* imports field
([#681](oxc-project/oxc-resolver#681))
- *(resolver)* finish most of exports field
([#674](oxc-project/oxc-resolver#674))
- *(resolver)* port the rest of the exports field tests
([#659](oxc-project/oxc-resolver#659))
- *(resolver)* implement symlinks
([#582](oxc-project/oxc-resolver#582))
- *(resolver)* complete query and fragment parsing
([#579](oxc-project/oxc-resolver#579))
- *(resolver)* add preferRelative and preferAbsolute
([#577](oxc-project/oxc-resolver#577))
- *(resolver)* implement roots
([#576](oxc-project/oxc-resolver#576))
- *(resolver)* implement fallback
([#572](oxc-project/oxc-resolver#572))
- *(resolver)* implement enforceExtension
([#566](oxc-project/oxc-resolver#566))
- *(resolver)* implement descriptionFiles option
([#565](oxc-project/oxc-resolver#565))
- *(resolver)* implement the basics of path alias
([#564](oxc-project/oxc-resolver#564))
- *(resolver)* accept different file system implementations
([#562](oxc-project/oxc-resolver#562))
- *(resolver)* implement browser field
([#561](oxc-project/oxc-resolver#561))
- *(resolver)* implement scoped packages
([#558](oxc-project/oxc-resolver#558))
- *(resolver)* port incorrect description file test
([#557](oxc-project/oxc-resolver#557))
- *(resolver)* implement extension_alias
([#556](oxc-project/oxc-resolver#556))
- *(resolver)* port resolve tests
([#555](oxc-project/oxc-resolver#555))
- *(resolver)* resolve extensions
([#549](oxc-project/oxc-resolver#549))
- *(resolver)* add resolver test fixtures
([#542](oxc-project/oxc-resolver#542))

### <!-- 1 -->Bug Fixes

- hash import does not need to load from node_modules
([#501](oxc-project/oxc-resolver#501))
- *(napi)* `new ResolverFactory()` options should be optional
([#256](oxc-project/oxc-resolver#256))
- *(napi)* update buggy NAPI-RS versions
([#225](oxc-project/oxc-resolver#225))
- canonicalize is not supported on wasi target
([#124](oxc-project/oxc-resolver#124))
- resolve "browser" field when "exports" is present
([#59](oxc-project/oxc-resolver#59))

### <!-- 4 -->Refactor

- [**breaking**] remove `description_files` option
([#488](oxc-project/oxc-resolver#488))
- [**breaking**] remove `modules` options
([#484](oxc-project/oxc-resolver#484))
- vitest ([#380](oxc-project/oxc-resolver#380))
- apply latest `cargo +nightly fmt`
([#281](oxc-project/oxc-resolver#281))
- selectively parse package_json fields instead of parsing everything
([#103](oxc-project/oxc-resolver#103))
- *(resolver)* clean up some code and tests
- *(resolver)* change internal funcs to non-pub by moving to unit tests
([#682](oxc-project/oxc-resolver#682))

### <!-- 7 -->Chore

- publish `oxc_napi_resolver`
([#496](oxc-project/oxc-resolver#496))
- *(napi)* make mimalloc optional to build
([#495](oxc-project/oxc-resolver#495))
- *(README)* add wasm usage example
- *(README)* crates.io badge use recent downloads
- *(napi)* auto download wasm binding on webcontainer
([#471](oxc-project/oxc-resolver#471))
- use root package.json for napi build
([#469](oxc-project/oxc-resolver#469))
- *(deps)* update github-actions
([#444](oxc-project/oxc-resolver#444))
- *(deps)* lock file maintenance npm packages
([#436](oxc-project/oxc-resolver#436))
- bump napi
([#404](oxc-project/oxc-resolver#404))
- *(deps)* lock file maintenance npm packages
([#391](oxc-project/oxc-resolver#391))
- *(deps)* lock file maintenance rust crates
([#390](oxc-project/oxc-resolver#390))
- *(README)* clarify Rust and node.js usages
- add dprint
([#326](oxc-project/oxc-resolver#326))
- *(deps)* update napi-rs to 3.0.0-alpha
- `cargo upgrade` && `pnpm upgrade`
- *(deps)* update napi-rs to 3.0.0-alpha
- update napi changes
- *(deps)* update rust crate napi-derive to 3.0.0-alpha
- *(deps)* update rust crate napi to 3.0.0-alpha
- *(deps)* update napi-rs to 2.16.8
- *(napi)* make napi binary smaller with minimal tracing features
([#213](oxc-project/oxc-resolver#213))
- *(napi)* remove tokio
([#212](oxc-project/oxc-resolver#212))
- document directory is an absolute path for `resolve(directory,
specifier)`
([#206](oxc-project/oxc-resolver#206))
- re-enable the wasi build
([#193](oxc-project/oxc-resolver#193))
- use pnpm workspace
([#182](oxc-project/oxc-resolver#182))
- *(deps)* update rust crates
([#176](oxc-project/oxc-resolver#176))
- *(napi)* update NAPI-RS cli version and binding template
([#111](oxc-project/oxc-resolver#111))
- update project github url
- *(deps)* update pnpm to v8.14.1
([#52](oxc-project/oxc-resolver#52))
- *(deps)* update pnpm to v8.14.0
([#48](oxc-project/oxc-resolver#48))
- *(deps)* update pnpm to v8.13.1
([#42](oxc-project/oxc-resolver#42))
- remove FIXME comments
- *(napi)* align `*Fields` user options with enhanced-resolve
([#35](oxc-project/oxc-resolver#35))
- *(deps)* update pnpm to v8.12.1
([#21](oxc-project/oxc-resolver#21))
- add some doc for napi TsconfigOptions
([#20](oxc-project/oxc-resolver#20))
- *(deps)* update pnpm to v8.12.0
([#18](oxc-project/oxc-resolver#18))
- *(README)* adding debugging command from Rspack
- *(deps)* update pnpm to v8.11.0
([#9](oxc-project/oxc-resolver#9))
- *(resolver)* remove tracing_subscriber
([#1362](https://github.com/oxc-project/oxc-resolver/pull/1362))
- *(resolver)* improve documentation
([#591](oxc-project/oxc-resolver#591))

### <!-- 8 -->CI

- check for napi .d.index changes
([#491](oxc-project/oxc-resolver#491))
- *(release-napi)* support `riscv64gc-unknown-linux-gnu` and
`s390x-unknown-linux-gnu`
([#451](oxc-project/oxc-resolver#451))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rspack-resolver + pnp - cannot resolve imports with extension?

1 participant