Avatar for the oxc-project user
oxc-project
oxc-resolver
BlogDocsChangelog

Performance History

Latest Results

refactor(cache): drop node_modules layout detection; the suffix check suffices The anchor fast paths were gated on a detected `node_modules` layout (`NodeModulesLayout` / `trusts_node_modules_anchor`), but that gate was both unnecessary and a net cost. It was unnecessary because correctness comes from elsewhere: - The canonicalize fast path canonicalizes a real `<...>/node_modules/<pkg>` anchor and appends the suffix only after `suffix_below_anchor_is_symlink_free` confirms every component below the anchor is a real (non-symlink) entry — reusing the cached `lstat`, so components already stat'd while resolving the file cost nothing. A symlinked anchor or a symlink in the suffix falls back to the normal per-component walk. So it is already correct for any layout. - The package.json jump already falls back to the directory walk when the anchor has no manifest, so the layout gate guarded nothing there. It was a net cost because detection ran a `metadata` ancestor-walk per `node_modules` tree — once per nested store directory for isolated/pnp layouts, which regressed them (yarn-pnp 164 -> 221). Removing it makes every layout faster than `main` on the 16-request package-managers workload: | combo | main | now | |---|---|---| | npm / yarn / bun-flat | 96 | 75 | | pnpm-isolated / pnpm-hoisted | 121 | 100 | | yarn-isolated | 114 | 93 | | bun-isolated | 121 | 100 | | yarn-pnp | 164 | 120 |
perf/node-modules-anchor-fast-paths
1 hour ago
chore: release v11.21.0
release-plz-2026-05-28T15-25-06Z
22 hours ago
chore: release v11.21.0 (#1178) ## 🤖 New release * `oxc_resolver`: 11.20.0 -> 11.21.0 * `oxc_resolver_napi`: 11.20.0 -> 11.21.0 <details><summary><i><b>Changelog</b></i></summary><p> ## `oxc_resolver` <blockquote> ## [11.21.0](https://github.com/oxc-project/oxc-resolver/compare/v11.20.0...v11.21.0) - 2026-06-03 ### <!-- 0 -->🚀 Features - *(tsconfig)* support package.json imports field in extends ([#1199](https://github.com/oxc-project/oxc-resolver/pull/1199)) (by @Boshen) ### <!-- 1 -->🐛 Bug Fixes - *(tsconfig)* apply each referenced project's own `allowJs` ([#1198](https://github.com/oxc-project/oxc-resolver/pull/1198)) (by @shulaoda) - make symlink_metadata VPath-aware for Yarn PnP ([#1183](https://github.com/oxc-project/oxc-resolver/pull/1183)) (by @Boshen) ### <!-- 4 -->⚡ Performance - borrow relative main field instead of allocating a "./" prefix ([#1187](https://github.com/oxc-project/oxc-resolver/pull/1187)) (by @Boshen) - *(cache)* move package.json path into parse instead of cloning ([#1186](https://github.com/oxc-project/oxc-resolver/pull/1186)) (by @Boshen) - eliminate symlink stat syscalls by reusing canonicalization ([#1184](https://github.com/oxc-project/oxc-resolver/pull/1184)) (by @Boshen) - reduce resolution syscalls by unifying stat and lstat ([#1182](https://github.com/oxc-project/oxc-resolver/pull/1182)) (by @Boshen) ### <!-- 9 -->💼 Other - add baselines for each package manager x node_modules layout ([#1176](https://github.com/oxc-project/oxc-resolver/pull/1176)) (by @Boshen) ### Contributors * @shulaoda * @Boshen * @renovate[bot] </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>
main
22 hours ago
fix(tsconfig): apply each referenced project's own `allowJs` (#1198) ## What Fixes solution-style `tsconfig.json` resolution so that each **referenced project's own `allowJs`** decides whether it claims a `.js`/`.jsx`/`.mjs`/`.cjs` file, instead of inheriting the answer from the parent solution config. ## Why A common Vite project layout uses a solution `tsconfig.json` that contains nothing but references: ```jsonc // tsconfig.json { "include": [], "references": [{ "path": "./tsconfig.app.json" }] } ``` ```jsonc // tsconfig.app.json { "compilerOptions": { "composite": true, "allowJs": true, "paths": { "@alias/*": ["./src/*"] } }, "include": ["src/**/*"] } ``` The root config does **not** set `allowJs`, but the referenced `tsconfig.app.json` does. `resolve_tsconfig_solution` used to short-circuit on `tsconfig.is_file_extension_allowed_in_tsconfig(path)` — i.e. the **parent's** `allowJs` — *before* iterating the references. For a `.js` file this returned `false`, so no reference was ever consulted, the referenced project's `paths` alias never applied, and resolving `@alias/foo.js` from `src/index.js` failed with `NotFound`. ## How - Remove the parent-level extension check from `resolve_tsconfig_solution`. - Add the extension check as step `0` inside `is_file_included_in_tsconfig`, where it is evaluated against `self` — i.e. each referenced project's own `allowJs`. This keeps the existing `is_glob_match` fast-path behavior intact and makes ownership consistent with `claims_ownership_of`, which already evaluates references via `is_file_included_in_tsconfig`. ## Tests Added `referenced_config_allow_js_uses_own_setting` in `src/tests/tsconfig_project_references.rs` with a new fixture under `fixtures/tsconfig/cases/project-references-ref-allow-js/` (root solution without `allowJs`, referenced app config with `allowJs: true` and a `paths` alias). Resolving `@alias/foo.js` from `src/index.js`: - **Before the fix:** `Err(NotFound("@alias/foo.js"))` - **After the fix:** `Ok(.../src/foo.js)`
main
22 hours ago
fix(tsconfig): apply each referenced project's own allowJs when resolving a solution
shulaoda:06-03-fix_tsconfig_apply_each_referenced_project_s_own_allowjs_when_resolving_a_solution
22 hours ago

Latest Branches

CodSpeed Performance Gauge
+6%
perf: node_modules-anchor fast paths#1189
1 hour ago
87ad871
perf/node-modules-anchor-fast-paths
CodSpeed Performance Gauge
+4%
chore: release v11.21.0#1178
22 hours ago
7a75c9e
release-plz-2026-05-28T15-25-06Z
CodSpeed Performance Gauge
-3%
1 day ago
eb4f9a2
shulaoda:06-03-fix_tsconfig_apply_each_referenced_project_s_own_allowjs_when_resolving_a_solution
© 2026 CodSpeed Technology
Home Terms Privacy Docs