Repository navigation
Core: Pin oxc-resolver to 11.21.2 to keep tsconfig path aliases on solution-style tsconfigs - #35929
Conversation
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
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: 0 reviews are currently available. Based on recent review activity, included reviews refill at 2 per hour. WalkthroughThe core package pins ChangesDependency version pinning
Merge Risk: ⚪ Minimal · up to 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 |
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| 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
left a comment
There was a problem hiding this comment.
Good to me, let's get resolving the root pass against an explicitly configured tsconfig instead of auto-discovery fix asap
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)
…esolver Core: Pin oxc-resolver to 11.21.2 to keep tsconfig path aliases on solution-style tsconfigs (cherry picked from commit 08c61b7)
Closes SB-1821
What I did
A fresh install of any Angular repo with the standard
ng newtsconfig shape - a solution-style roottsconfig.jsonthat declarespathsitself - 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.
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
pathsstop being consulted, and everymeta.componentimported 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):
Same repo, same tree, with
oxc-resolveroverridden to 11.21.2: the grep forAngularComponentMetaNotFoundoverstorybook-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:
pathsdeclared in the solution-style roottsconfig.jsonitself - the defaultng newlayout since Angular 15.pathsinherited viaextendsfrom atsconfig.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__.tsentry to pick up root-levelpaths- 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:
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
tsconfig.jsonis solution-style and declarespaths(e.g.git clone https://github.com/BIRU-Scop/tenzu-front), or generate one withng newand add a path alias plus a story whosemeta.componentis imported through it.node_modules/oxc-resolver/package.jsonreports11.21.2.npx storybook build.grep -rl AngularComponentMetaNotFound storybook-static/services/core/docgen/returns nothing, and that the alias-imported component's docgen payload contains itsargTypes.Without this PR, step 4 lists every alias-imported component with the error payload shown above.
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake 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