Skip to content

fix: fix incorrect return of package.json when a workspace module has node_modules#482

Merged
Boshen merged 1 commit intomainfrom
04-30-fix_fix_incorrect_return_of_package.json_when_a_workspace_module_has_node_modules_
Apr 30, 2025
Merged

fix: fix incorrect return of package.json when a workspace module has node_modules#482
Boshen merged 1 commit intomainfrom
04-30-fix_fix_incorrect_return_of_package.json_when_a_workspace_module_has_node_modules_

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Apr 30, 2025

fixes #481

Copy link
Member Author

Boshen commented Apr 30, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Apr 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.73%. Comparing base (c15d02f) to head (d8ba84a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #482      +/-   ##
==========================================
- Coverage   93.83%   93.73%   -0.11%     
==========================================
  Files          13       13              
  Lines        2824     2825       +1     
==========================================
- Hits         2650     2648       -2     
- Misses        174      177       +3     

☔ 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 Apr 30, 2025

CodSpeed Performance Report

Merging #482 will degrade performances by 31%

Comparing 04-30-fix_fix_incorrect_return_of_package.json_when_a_workspace_module_has_node_modules_ (d8ba84a) with main (c15d02f)

Summary

❌ 3 regressions

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
resolver[multi-thread] 466.4 µs 572.1 µs -18.49%
resolver[resolve from symlinks] 58.8 ms 85.2 ms -31%
resolver[single-thread] 458.7 µs 543.9 µs -15.67%

@Boshen Boshen merged commit 9931467 into main Apr 30, 2025
17 of 18 checks passed
Copy link
Member Author

Boshen commented Apr 30, 2025

Merge activity

@Boshen Boshen deleted the 04-30-fix_fix_incorrect_return_of_package.json_when_a_workspace_module_has_node_modules_ branch April 30, 2025 16:06
@oxc-bot oxc-bot mentioned this pull request Apr 30, 2025
@Boshen
Copy link
Member Author

Boshen commented Apr 30, 2025

CodSpeed Performance Report

Merging #482 will degrade performances by 31%

Comparing 04-30-fix_fix_incorrect_return_of_package.json_when_a_workspace_module_has_node_modules_ (d8ba84a) with main (c15d02f)

Summary

❌ 3 regressions

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
resolver[multi-thread] 466.4 µs 572.1 µs -18.49%
resolver[resolve from symlinks] 58.8 ms 85.2 ms -31%
resolver[single-thread] 458.7 µs 543.9 µs -15.67%

Will fix in a follow up PR.

Boshen pushed a commit that referenced this pull request May 1, 2025
## 🤖 New release

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

### ⚠ `oxc_resolver` breaking changes

```text
--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/inherent_method_missing.ron

Failed in:
  ResolveOptions::with_module, previously in file /tmp/.tmpCfZ3uE/oxc_resolver/src/options.rs:342

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field description_files of struct ResolveOptions, previously in file /tmp/.tmpCfZ3uE/oxc_resolver/src/options.rs:47
  field modules of struct ResolveOptions, previously in file /tmp/.tmpCfZ3uE/oxc_resolver/src/options.rs:119

--- 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::is_node_modules in file /tmp/.tmpoUaDz8/oxc-resolver/src/cache.rs:65
  trait method oxc_resolver::CachedPath::inside_node_modules in file /tmp/.tmpoUaDz8/oxc-resolver/src/cache.rs:67

--- failure trait_method_missing: pub trait method removed or renamed ---

Description:
A trait method is no longer callable, and may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#major-any-change-to-trait-item-signatures
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/trait_method_missing.ron

Failed in:
  method node_modules of trait CachedPath, previously in file /tmp/.tmpCfZ3uE/oxc_resolver/src/cache.rs:65
  method module_directory of trait CachedPath, previously in file /tmp/.tmpCfZ3uE/oxc_resolver/src/cache.rs:67
  method cached_node_modules of trait CachedPath, previously in file /tmp/.tmpCfZ3uE/oxc_resolver/src/cache.rs:74
```

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

<blockquote>

##
[8.0.0](oxc_resolver-v7.0.1...oxc_resolver-v8.0.0)
- 2025-05-01

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

- fix incorrect return of package.json when a workspace module has
`node_modules`
([#482](#482))

### <!-- 2 -->Performance

- cache whether a path is `node_modules` or inside `node_modules`
([#490](#490))
- remove a useless `load_as_directory` call
([#487](#487))

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

- [**breaking**] remove `description_files` option
([#488](#488))
- [**breaking**] remove `modules` options
([#484](#484))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Added a new changelog entry for version 8.0.0, highlighting a bug fix,
performance improvements, and breaking changes.
- **Chores**
  - Updated the package version to 8.0.0 in project files.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

The result resolved by 7.0.0 no longer includes package.json.

1 participant