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

Performance History

Latest Results

fix(cache): gate the node_modules anchor fast paths on a detected layout The anchor fast paths assume nothing is a symlink strictly below a `<...>/node_modules/<pkg>` directory. That holds for package-manager installs but not for an arbitrary hand-built or custom-FileSystem `node_modules/`, where the per-component canonicalize walk could need to follow a symlink the fast path skips. Classify the `node_modules/` layout once (cached on the Cache) by probing for markers — `.pnp.cjs` (Pnp), a `.pnpm`/`.store`/`.bun` virtual store (Isolated), or a bare `node_modules/` (Flat) — and only take the anchor fast paths for a recognized layout. An unrecognized tree (Generic) falls back to the normal per-component walk. Internal only, no ResolveOptions surface. All recognized package-manager layouts stay on the fast path, so the syscall win is preserved for real installs.
perf/node-modules-anchor-fast-paths
6 hours ago
chore: release v11.21.0
release-plz-2026-05-28T15-25-06Z
10 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
10 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
10 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
10 hours ago
chore: release v11.20.1
release-plz-2026-05-28T15-25-06Z
11 hours ago
feat(tsconfig): support package.json imports field in extends (#1199) ## What Resolve `#`-prefixed Node.js subpath imports in tsconfig `extends` through the nearest `package.json` `imports` field: ```jsonc // package.json { "imports": { "#base": "./common.tsconfig.json" } } // tsconfig.json { "extends": "#base" } ``` Previously this failed with `TsconfigNotFound`: `get_extended_tsconfig_path` only handled `/`, `.`/`..`, and bare package specifiers (the last via `exports`/`node_modules`, which never consults `imports`). ## Why TypeScript supports this — it's used in monorepos to avoid brittle `../../../tsconfig.json` paths. Verified against `typescript-go`: `tsgo --showConfig` resolves the fixture to the same targets this PR asserts (`#string` → es2020, `#conditional` node-branch → es6). Reported in rolldown/rolldown#9611 (labeled `bug: upstream`). ## How - New `Some(b'#')` arm in `get_extended_tsconfig_path` that routes through `load_package_imports` — the same wrapper the resolver uses for `require("#x")`, so it gets the correct package-scope lookup (`LOOKUP_PACKAGE_SCOPE`) and result verification (`resolve_esm_match`). - Extracted `tsconfig_extends_resolver` so the `#` (imports) and bare-package (`exports`/`node_modules`) arms share one lookup config (conditions `["node", "import"]`) — `extends: "pkg"` and `extends: "#pkg"` now agree on which condition wins. - An undefined `#import` (or a missing target) is reported as `TsconfigNotFound`, consistent with how a missing bare-package or relative `extends` target is reported — and with `tsgo`, which emits `File '#missing' not found`. ## Tests One fixture (`fixtures/tsconfig/cases/extends-imports/`) and one test (`test_extend_imports`) covering, via its `package.json` `imports` map: - `#string` → string target → `target: ES2020` - `#conditional` → `{ node, default }` object → `node` wins over `default` → `target: ES2015` - `extends: "#missing"` (not in `imports`) → `TsconfigNotFound` All cross-checked against `tsgo` (es2020 / es6 / `File '#missing' not found`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
main
11 hours ago

Latest Branches

CodSpeed Performance Gauge
+6%
perf: node_modules-anchor fast paths#1189
7 hours ago
b848eb6
perf/node-modules-anchor-fast-paths
CodSpeed Performance Gauge
+4%
chore: release v11.21.0#1178
10 hours ago
7a75c9e
release-plz-2026-05-28T15-25-06Z
CodSpeed Performance Gauge
-3%
18 hours 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