Skip to content

Core: Pin oxc-resolver to 11.21.2 to keep tsconfig path aliases on solution-style tsconfigs - #35929

Merged
valentinpalkovic merged 2 commits into
nextfrom
valentin/sb-1821-pin-oxc-resolver
Aug 18, 2026
Merged

valentinpalkovic merged 2 commits into
nextfrom
valentin/sb-1821-pin-oxc-resolver

Conversation

@valentinpalkovic

Copy link
Copy Markdown
Contributor

Closes SB-1821

What I did

A fresh install of any Angular repo with the standard ng new tsconfig shape - a solution-style root tsconfig.json that declares paths itself - silently loses docgen for every alias-imported component.
Core declares oxc-resolver: ^11.19.1, a fresh install resolves that caret to 11.24.2 today, and from 11.21.3 on the resolver no longer applies those path aliases.
This PR pins the dependency to 11.21.2, the last version before the behavior change, so fresh installs are safe again.

-    "oxc-resolver": "^11.19.1",
+    "oxc-resolver": "11.21.2",

The mechanism: oxc-resolver 11.21.3 started attaching an auto-discovered tsconfig only to files it owns via files/include/references (oxc-project/oxc-resolver#1220).
A solution-style root tsconfig owns almost no files directly, so its paths stop being consulted, and every meta.component imported through an alias fails extraction.
This is what every affected component's payload looks like on 11.24.2 (captured from a real build of BIRU-Scop/tenzu-front):

// storybook-static/services/core/docgen/components-button.json
"error": {
  "name": "AngularComponentMetaNotFound",
  "message": "The story file imports \"ButtonComponent\" from \"@tenzu/shared/components/ui/button/button.component\", which did not resolve to a file.\nCheck the import specifier (and any tsconfig path aliases it relies on) ..."
}

Same repo, same tree, with oxc-resolver overridden to 11.21.2: the grep for AngularComponentMetaNotFound over storybook-static/services/core/docgen/ comes back empty and the same payload carries the component's full argTypes and apiDescription.
Restoring 11.24.2 breaks it again on the same tree, so this is A/B-verified in both directions.

Scope of the breakage, for the record:

  • Triggers: paths declared in the solution-style root tsconfig.json itself - the default ng new layout since Angular 15.
  • Does not trigger: paths inherited via extends from a tsconfig.base.json (Nx layout) and flat single-tsconfig repos - both verified clean even on 11.24.2.

The pin is a stopgap, not the endgame: our module-graph resolver deliberately retries failed resolutions from a virtual __sb_resolver_root__.ts entry to pick up root-level paths - and a virtual file is something no tsconfig can ever own under the new upstream semantics.
Unpinning therefore needs a rework of that fallback (for example resolving the root pass against an explicitly configured tsconfig instead of auto-discovery); I would like to tackle that separately so this fix can ship immediately.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

No new tests - this is a dependency pin. The existing resolver suites (resolver-factory, module-resolver, mocking-utils) now run against 11.21.2 and pass.

Manual testing

  1. Clone an Angular repo whose root tsconfig.json is solution-style and declares paths (e.g. git clone https://github.com/BIRU-Scop/tenzu-front), or generate one with ng new and add a path alias plus a story whose meta.component is imported through it.
  2. Upgrade the repo to the canary of this PR and reinstall; confirm node_modules/oxc-resolver/package.json reports 11.21.2.
  3. Run npx storybook build.
  4. Check grep -rl AngularComponentMetaNotFound storybook-static/services/core/docgen/ returns nothing, and that the alias-imported component's docgen payload contains its argTypes.

Without this PR, step 4 lists every alias-imported component with the error payload shown above.

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Declare whether manual QA will be needed for this PR during the next release, through qa:needed or qa:skip

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NrtpW9f2Uj5c3KKFTB4po3

oxc-resolver 11.21.3 changed tsconfig auto-discovery to only attach a
tsconfig to files it owns (oxc-project/oxc-resolver#1220). A solution-style
root tsconfig (the ng-new shape since Angular 15) owns no files directly,
so its path aliases are no longer applied when resolving component files,
and every alias-imported meta.component fails extraction with
AngularComponentMetaNotFound on a fresh install.

Pin to 11.21.2, the last version before the ownership check, until the
module-graph resolver is reworked to be compatible with it.

Claude-Session: https://claude.ai/code/session_01NrtpW9f2Uj5c3KKFTB4po3
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b83d1500-342b-4485-b862-fd0f3a622445

📥 Commits

Reviewing files that changed from the base of the PR and between b8cc04e and 3f5366a.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • code/core/package.json

Included review availability: 0 reviews are currently available. Based on recent review activity, included reviews refill at 2 per hour.


Walkthrough

The core package pins oxc-resolver to exactly version 11.21.2 instead of using the compatible range ^11.19.1.

Changes

Dependency version pinning

Layer / File(s) Summary
Pin oxc-resolver dependency
code/core/package.json
The manifest requires exactly version 11.21.2 instead of accepting compatible 11.x versions.

Merge Risk: ⚪ Minimal · up to 3f536

This change pins the resolver to the known-compatible version to preserve path-alias docgen behavior; no actionable merge-blocking risk remains after normal checks and review.


Comment @coderabbitai help to get the list of available commands.

@valentinpalkovic valentinpalkovic added the ci:normal Run our default set of CI jobs (choose this for most PRs). label Aug 17, 2026
@valentinpalkovic valentinpalkovic self-assigned this Aug 17, 2026
@valentinpalkovic valentinpalkovic added qa:skip Pull Requests that do not need any QA. (e.g. documentation) and removed bug labels Aug 18, 2026
@storybook-app-bot

Copy link
Copy Markdown
Contributor

Package Benchmarks

Commit: 6963dff, ran on 18 August 2026 at 05:38:01 UTC

The following packages have significant changes to their size or dependencies:

storybook

Before After Difference
Dependency count 73 73 0
Self size 21.85 MB 21.85 MB 🎉 -1 B 🎉
Dependency size 30.98 MB 31.20 MB 🚨 +219 KB 🚨
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 205 205 0
Self size 852 KB 852 KB 0 B
Dependency size 86.49 MB 86.71 MB 🚨 +219 KB 🚨
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 198 198 0
Self size 44 KB 44 KB 0 B
Dependency size 84.96 MB 85.18 MB 🚨 +219 KB 🚨
Bundle Size Analyzer Link Link

create-storybook

Before After Difference
Dependency count 74 74 0
Self size 1.09 MB 1.09 MB 🚨 +60 B 🚨
Dependency size 52.83 MB 53.05 MB 🚨 +219 KB 🚨
Bundle Size Analyzer node node

@huang-julien huang-julien left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to me, let's get resolving the root pass against an explicitly configured tsconfig instead of auto-discovery fix asap

@valentinpalkovic
valentinpalkovic merged commit 08c61b7 into next Aug 18, 2026
145 of 146 checks passed
@valentinpalkovic
valentinpalkovic deleted the valentin/sb-1821-pin-oxc-resolver branch August 18, 2026 07:28
@github-actions github-actions Bot mentioned this pull request Aug 18, 2026
3 tasks done
huang-julien added a commit to storybookjs/sandboxes that referenced this pull request Aug 18, 2026
Check the diff here: storybookjs/storybook@f96ed20...add38a0

List of included PRs since previous version:
- storybookjs/storybook#35922 (valentin/sb-1766-angular-docgen-documentation-pass)
- storybookjs/storybook#35844 (s-robertson/u/srobertson/fix-react-component-meta-union-props)
- storybookjs/storybook#35931 (valentin/sb-1847-componentid-collision-warning)
- storybookjs/storybook#35923 (valentin/sb-1789-server-side-code-snippets-resolve-spreads-and-identifier)
- storybookjs/storybook#35940 (valentin/sb-1789-review-fixes)
- storybookjs/storybook#35900 (julien/vue-api-description)
- storybookjs/storybook#35938 (fix-publish-ansi-parsing)
- storybookjs/storybook#35929 (valentin/sb-1821-pin-oxc-resolver)
- storybookjs/storybook#35936 (chore/changelog-v10.5.9)
- storybookjs/storybook#35930 (valentin/sb-1789-review-fixes)
- storybookjs/storybook#35921 (valentin/sb-1809-bug-angular-constructor-and-generic-function-inputs-lose-the)
- storybookjs/storybook#35917 (norbert/fix-publish-staged-retries)
- storybookjs/storybook#35896 (valentin/sb-1776-angular-docs-end-to-end)
- storybookjs/storybook#35920 (julien/vue_server_docgen_options)
- storybookjs/storybook#35907 (valentin/docgen-server-arg-types)
- storybookjs/storybook#35886 (valentin/sb-1799-default-docgen-server-angular-vite)
- storybookjs/storybook#35902 (fix/vue-snippet-runtimeoverride)
- storybookjs/storybook#35825 (norbert/module-graph-skip-noop-mirror)
- storybookjs/storybook#35629 (reuben/fix-pseudo-states-cssom-rewrites)
- storybookjs/storybook#35915 (next-merge-prerelease)
- storybookjs/storybook#35906 (valentin/angular-docs-decorator-gate)
- storybookjs/storybook#35830 (version-non-patch-from-10.6.0-alpha.5)
- storybookjs/storybook#35899 (valentin/angular-required-input-with-default)
- storybookjs/storybook#35831 (norbert/spike-module-graph-hot-cold-split)
@ndelangen ndelangen added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Aug 20, 2026
@github-actions github-actions Bot mentioned this pull request Aug 20, 2026
5 tasks done
ndelangen pushed a commit that referenced this pull request Aug 20, 2026
…esolver

Core: Pin oxc-resolver to 11.21.2 to keep tsconfig path aliases on solution-style tsconfigs
(cherry picked from commit 08c61b7)
@github-actions github-actions Bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:normal Run our default set of CI jobs (choose this for most PRs). dependencies patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch qa:skip Pull Requests that do not need any QA. (e.g. documentation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants