test: verify node_modules canonicalization across layouts#1200
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1200 +/- ##
=======================================
Coverage 93.75% 93.75%
=======================================
Files 22 22
Lines 4229 4229
=======================================
Hits 3965 3965
Misses 264 264 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will improve performance by 5.35%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | pm/pnpm-isolated |
1.1 ms | 1.1 ms | +6.62% |
| ⚡ | resolver_memory[multi-thread] |
412.6 µs | 389.2 µs | +6.01% |
| ⚡ | pm/yarn-isolated |
1.1 ms | 1.1 ms | +3.44% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing node-modules-canonicalize-tests (44566bd) with main (6ae46ed)
Footnotes
-
5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Add canonicalization checks to `symlink.rs` (alongside the existing symlink resolution tests) with committed symlink fixtures, asserting the resolver's canonicalization equals `std::fs::canonicalize`: - `canonicalize_matches_os_for_all_node_modules` — walks every path in each installed `fixtures/bench-pm/installs/<combo>/node_modules` tree; skipped when the bench fixtures are not installed. - `symlinked_package_anchor_walks_suffix_symlinks` — a symlinked workspace anchor with a symlink in the suffix below it. - `real_package_anchor_walks_internal_symlinks` — a real anchor that ships an internal directory/file symlink. - `nested_monorepo_canonicalize_matches_os` — a monorepo version conflict where a workspace nests its own dependency version via an isolated-store symlink. These pass on main; they pin canonicalization correctness independent of any resolver optimization.
dbfbbab to
44566bd
Compare
## 🤖 New release * `oxc_resolver`: 11.21.0 -> 11.21.1 * `oxc_resolver_napi`: 11.21.0 -> 11.21.1 <details><summary><i><b>Changelog</b></i></summary><p> ## `oxc_resolver` <blockquote> ## [11.21.1](v11.21.0...v11.21.1) - 2026-06-17 ### <!-- 1 -->🐛 Bug Fixes - *(tsconfig)* walk up for non-TS and `allowJs`-off `.js` importers ([#1216](#1216)) (by @shulaoda) - *(tsconfig)* honor explicit non-TS extensions in `include` ([#1213](#1213)) (by @shulaoda) ### <!-- 2 -->🚜 Refactor - *(cache)* replace papaya with dashmap ([#1214](#1214)) (by @Boshen) ### <!-- 6 -->🧪 Testing - verify node_modules canonicalization across layouts ([#1200](#1200)) (by @Boshen) ### Contributors * @shulaoda * @Boshen </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: oxc-guard[bot] <276638029+oxc-guard[bot]@users.noreply.github.com>
Adds a
node_modulescanonicalization test suite + committed symlink fixtures that assert the resolver's canonicalization equalsstd::fs::canonicalizeacross the layout families:canonicalize_matches_os_for_all_node_modules— walks every path in each installedfixtures/bench-pm/installs/<combo>/node_modulestree (npm/pnpm/yarn/bun × flat/isolated/hoisted/pnp); skipped when the bench fixtures aren't installed.symlinked_package_anchor_walks_suffix_symlinks— a symlinked workspace anchor with a symlink in the suffix below it.real_package_anchor_walks_internal_symlinks— a realnode_modules/<pkg>anchor that ships an internal directory/file symlink (lib -> dist, a re-export file).nested_monorepo_canonicalize_matches_os— a monorepo version conflict where a workspace package nests its own dependency version via an isolated-store symlink (root resolvesdep@2,packages/uinestsdep@1).These all pass on
main— they pin canonicalization correctness independent of any resolver optimization, so they can land on their own (and guard #1189).🤖 Generated with Claude Code