Repository navigation
fix: return the enclosing package.json if it is inside node_modules - #476
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #476 +/- ##
==========================================
+ Coverage 95.31% 95.36% +0.05%
==========================================
Files 13 13
Lines 2709 2739 +30
==========================================
+ Hits 2582 2612 +30
Misses 127 127 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #476 will not alter performanceComparing Summary
|
Boshen
force-pushed
the
fix-package-json-nested
branch
from
April 28, 2025 16:35
acb1f38 to
deaeafb
Compare
Member
Author
|
3 days and this is the best I can come up with, I don't like the solution but ... it kind of works? |
Boshen
force-pushed
the
fix-package-json-nested
branch
from
April 29, 2025 02:10
deaeafb to
496ea5c
Compare
Member
Author
|
No breakage in Rolldown, merging. |
Merged
Boshen
pushed a commit
that referenced
this pull request
Apr 29, 2025
## 🤖 New release
* `oxc_resolver`: 6.0.2 -> 7.0.0 (⚠ API breaking changes)
### ⚠ `oxc_resolver` breaking changes
```text
--- 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::node_modules in file /tmp/.tmpKIFAk9/oxc-resolver/src/cache.rs:65
```
<details><summary><i><b>Changelog</b></i></summary><p>
<blockquote>
##
[7.0.0](oxc_resolver-v6.0.2...oxc_resolver-v7.0.0)
- 2025-04-29
### <!-- 1 -->Bug Fixes
- return the enclosing `package.json` if it is inside `node_modules`
([#476](#476))
### <!-- 4 -->Refactor
- add `Debug` to `FsCachedPath`
([#478](#478))
</blockquote>
</p></details>
---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
Merged
hanzo-dev
pushed a commit
to hanzoai/unrs-resolver
that referenced
this pull request
Sep 9, 2026
## 🤖 New release
* `oxc_resolver`: 6.0.2 -> 7.0.0 (⚠ API breaking changes)
### ⚠ `oxc_resolver` breaking changes
```text
--- 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::node_modules in file /tmp/.tmpKIFAk9/oxc-resolver/src/cache.rs:65
```
<details><summary><i><b>Changelog</b></i></summary><p>
<blockquote>
##
[7.0.0](oxc-project/oxc-resolver@oxc_resolver-v6.0.2...oxc_resolver-v7.0.0)
- 2025-04-29
### <!-- 1 -->Bug Fixes
- return the enclosing `package.json` if it is inside `node_modules`
([#476](oxc-project/oxc-resolver#476))
### <!-- 4 -->Refactor
- add `Debug` to `FsCachedPath`
([#478](oxc-project/oxc-resolver#478))
</blockquote>
</p></details>
---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #396
A package may contain package.json inside its subdirectories, they must not participate in module resolution.
Example:
In the published vue package, it contains
When requesting
vue/server-renderer, it now esolves tovue/server-renderer/index.mjswithvue/package.json. It returnedvue/server-renderer/package.jsonbefore this PR.vue/server-renderer/package.jsondoes not participate in module resolution according to the node.js module resolution algorithm so the returned package.json resolution should not bevue/server-renderer/package.json.Note: There is an undefined behavior for resolving the
sideEffectsfield.What should
sideEffectsreturn when requestingvue/server-renderer?vue/server-renderer/package.json (sideEffects: true)-resolvers assume a package has only a root package.json so they just find the closes package.json starting from the end of the resolved pathvue/server-renderer/package.jsonnever participated in module resolution, why would we end up reading itssideEffectsfield?