Release: Prerelease 10.5.0-alpha.1#34865
Closed
github-actions[bot] wants to merge 85 commits into
Closed
Conversation
Now that `oxc-resolver` is a runtime dependency of `code/core` (added in
the change-detection PR), the two remaining call sites of the legacy
`resolve` and `resolve.exports` packages can be migrated:
- `common/utils/interpret-files.ts`: `resolve.sync` + `packageFilter`
(prefer `module` over `main`) → `ResolverFactory.sync` with
`mainFields: ['module', 'main']`.
- `mocking-utils/resolve.ts`: `resolve.exports({ browser: true })` on a
manually-fetched `package.json` → `ResolverFactory.sync` with
`conditionNames: ['browser', 'import', 'module', 'default']`,
`mainFields: ['browser', 'module', 'main']`, and
`aliasFields: [['browser']]`. The `require.resolve` fallback for
legacy package layouts is preserved.
`resolve` and `resolve.exports` are removed from `code/core`'s
dependencies.
The public `resolveImport(id, options)` signature changes from
`resolve.SyncOpts` to `{ basedir: string }`. Both internal callers
(`StoryIndexGenerator.resolveComponentPath`, `cachedResolveImport` in
the React renderer's component manifest) only pass `basedir`, so this
is a safe narrowing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ntials: false Agent-Logs-Url: https://github.com/storybookjs/storybook/sessions/f1c2abf3-88ab-4e7b-b5c7-afb27dab0857 Co-authored-by: Sidnioulz <5108577+Sidnioulz@users.noreply.github.com>
Adds Layer A native detection of Angular model() signal outputs in the @storybook/angular public type inference. Refs #34831 - Adds AngularModelSignal / AngularHasModelSignal / ModelSignal aliases mirroring the existing InputSignal/OutputEmitterRef conditional style. - Adds TransformModelSignalType<T>: maps each ModelSignal<E> field to E and synthesizes an intersection member `${prop}Change`: (e: E) => void (the xChange member is compiler-synthesized, never a real keyof T member). - Pins TransformComponentType composition with TransformModelSignalType as the INNERMOST wrapper (do not reorder): the synthesized `${prop}Change` is (e:E)=>void so it passes the outer Input/Output/Event transforms unchanged, and since ModelSignal extends InputSignal the model value field is idempotently re-collapsed by the outer TransformInputSignalType (no double-transform divergence). - Adds public-types.test-d.ts asserting the FINAL composed TransformComponentType<C> (composed, NOT TransformModelSignalType in isolation) for color/colorChange + model.required() + full no-regression coverage (input(), transform input(), output(), EventEmitter, @input, @output) resolving simultaneously in one type. Documented limitation (for the AC-X3 changelog): aliased model(prop, { alias: 'a' }) produces aChange at runtime, but Layer A can only synthesize ${propName}Change because TypeScript cannot observe the runtime alias. Runtime detection (Layer C) handles the alias via the resolved binding name on ɵcmp. model.required() is fully covered. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extends getComponentInputsOutputs with an additive dual detection path so a
model() field surfaces BOTH its `color` input and the compiler-synthesized
`colorChange` output, without altering @Input/@Output/input()/output()/
EventEmitter results from the decorator path.
Strategy (Probe C: esbuild/JIT strips signal AOT metadata in the unit-test
harness, so `ecmp` I/O maps are empty for signal members / `signals===false`):
- Primary: read the Angular component def via ɵgetComponentDef; ɵcmp keys the
I/O maps by template name -> propName (verified empirically), so aliased
model(x,{alias}) and model.required() resolve to their real binding names.
- Fallback: synthesize from the component instance brand (writable+subscribable
signal => model() input + ${name}Change output) for non-AOT/JIT classes.
All 3 consumers verified (no edits needed): computesTemplateFromComponent and
computesTemplateSourceFromComponent emit [color]+(colorChange) via the existing
pure I/O builders; StorybookWrapperComponent filter-inversion confirmed -- the
model input now reaches the instance through the template Input binding
(initial render + live storyProps$ updates) instead of the dropped
getNonInputsOutputsProps direct-assignment path.
Adds a NEW factory-free test block covering @Input/@output, input(), output(),
EventEmitter, model(), model.required(), aliased model(), plus a throws-if-called
ComponentFactoryResolver guard proving zero factory invocation in model()
detection. L50-212 kept commented with a tracked TODO(angular-22).
Refs #34831
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…er B) Refs #34831 Angular `model()` two-way binding signals were not surfaced in compodoc autodocs. compodoc (verified against the captured v1.2.1 output) emits a `model()` member as an IDENTICAL entry — same bare name, no decorators/ jsdoctags, ModelSignal<T> wrapper erased — in BOTH `inputsClass` AND `outputsClass`. Plain @Input/input() only land in inputsClass; plain @Output/output()/EventEmitter only in outputsClass. The reliable, version-tolerant discriminator is therefore a property whose name appears in BOTH arrays of the same component (the both-arrays discriminator); compodoc emits no model() marker, so compodoc-types.ts Property is unchanged. - extractArgTypesFromData now detects model props via the both-arrays discriminator, suppresses compodoc's spurious bare-name outputsClass duplicate (model surfaces as an input control), and synthesizes a `${name}Change` output (action: '${name}Change') reusing the per-item output shape. - Deterministic angularFilterNonInputControls re-surface branch: the synthesized `${name}Change` output + companion input are present with the flag OFF, and still re-surfaced with the flag ON despite iteration being restricted to ['inputsClass']. - New __testfixtures__/doc-model fixture (mirrors doc-button) with the captured compodoc JSON; angular-properties.test.ts now asserts the synthesized colorChange/showTextChange rows for both filter states. - doc-button EventEmitter fixture regression-guarded (untouched, still green). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Stacked commit 4 of 4 (cross-cutting) for native @storybook/angular model() signal output detection. Refs: #34831 - AC-X2a: ControlsAndActions story for a model() ColorPickerComponent (color = model<string>('#345F92')) asserting colorChange appears as an Action (fires on emit) and color is a Control/arg. Mirrors the existing Angular signal/ story precedent (template/stories_angular-cli-*/signal/, cli/page.stories.ts play pattern) exactly. - AC-X2b: TwoWayRoundTrip story whose play runs the exact sequence: (1) initial render -> initial args.color reached the instance; (2) live storyProps$ arg change via useArgs().updateArgs -> new value reaches the instance (the StorybookWrapperComponent L125->L131 live path AC-C3c flags highest-risk); (3) in-component colorChange emission round-trips back to args.color (positive two-way [(color)]); (4) action received colorChange. - AC-X3: CHANGELOG.prerelease.md entry under 10.5.0-alpha.0 describing native model() support (type inference + compodoc autodocs + runtime binding/actions) and that the hand-written Args workaround is no longer required. Explicitly documents the KNOWN LIMITATION: aliased model(prop,{alias}) - the type layer (Layer A) can only synthesize ${propName}Change, not the runtime alias; runtime (Layer C) resolves the alias via the Angular component def at AOT. model.required() fully covered. AC-X1 full verification (real output): - yarn nx run-many -t check: angular:check -> "No type errors" (Layers A/B/C clean). Single failing task nextjs-vite:check (TS2451 storybookNextJsPlugin redeclaration) is PRE-EXISTING and unrelated - nextjs-vite is not touched by any of the 4 stacked commits; zero NEW errors from A/B/C/X. - yarn nx run-many -t compile: exit 0 (42 projects). - yarn lint: exit 0 (clean). - yarn fmt:write: applied (4451 files; only the new story files + changelog modified, no unrelated changes). - Targeted Angular vitest from repo root (NgComponentAnalyzer, ComputesTemplateFromComponent, docs/angular-properties, compodoc): 14 files / 137 tests passed, no type errors, exit 0 - zero regression from Layers A/B/C. Story-execution environment constraint (honest, FALLBACK - not a faked green): the storybook-ui Vitest project (cd code && yarn storybook:vitest) is the React-based internal Storybook; its include globs cover only core/** and addons/*/** - frameworks/angular/template/** is not included, so `yarn vitest run --project storybook-ui color-picker.stories` exits 1 with "No test files found". The @storybook/angular unit harness has no AOT Vite plugin and does not glob *.stories.ts. No angular-cli sandbox exists locally. The model() play stories therefore run only in a generated Angular sandbox in CI - the exact established validation path for the pre-existing template/stories_angular-cli-*/signal/ precedent. The stories are authored correctly as real CI/sandbox-validated deliverables. Full detail recorded in .omc/plans/probe-results-angular-model-signal-outputs.md (STEP 4 story-execution environment section). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…s, comments, limitations) comment-only repoint to committed compodoc-input.json fixture; document same-name @Input/@output discriminator false-positive (compodoc.ts + changelog); synthesized ${name}Change output no longer inherits misleading input defaultValue/type summary (Docs-table only, detection logic unchanged); reference #34831. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ic ɵcmp only Address review feedback (Karpathy + Pragmatic): - NgComponentAnalyzer: drop the new-instance fallback (runInInjectionContext + new component()) and its orphaned imports. Signal I/O is now read purely statically from the compiled component definition (ɵcmp), so the analysis path never executes user constructor code. Verified the fallback was test-harness-only (ComputesTemplateFromComponent/compodoc/angular-properties unaffected). - Tests: assert the production ɵcmp reader via a synthetic ɵcmp mirroring the AOT shape (now also covers aliased model() resolution). Drop the over-engineered throws-if-called resolveComponentFactory guard; restore pre-existing imports. - Strip internal investigation jargon (Probe/AC/R6/Lxxx) from comments in NgComponentAnalyzer, compodoc, public-types, and the model-signal stories. - CHANGELOG: collapse to the repo one-line convention. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Cut comments that restated the code or repeated the rationale across call site and JSDoc; kept the load-bearing ones (ɵcmp shape, type-composition order, compodoc both-arrays heuristic + its limitation). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Remove the CHANGELOG.prerelease.md entry (reverts to next). - public-types.test-d.ts: drop "Layer A"/"AC-X3" transcript prose, tighten the transform-input comment. - public-types.ts: condense the TransformComponentType JSDoc to the load-bearing do-NOT-reorder constraint. - compodoc.ts: broaden the model() false-positive note (inherited / accessor splits) and document the aliased-model() autodocs gap. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
`useArgs()` is a preview hook and throws when called in a `play`
function ("hooks can only be called inside decorators and story
functions"), which crashed the TwoWayRoundTrip story and failed
Chromatic with 1 component error.
Update args from `play` via the channel (UPDATE_STORY_ARGS +
STORY_RENDERED), matching the existing core/svelte precedent, and
tag the story `!vitest` since live arg updates disrupt the runner.
The valid render-side useArgs() write-back is unchanged.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…sor-position Vitest: Reset playwright cursor position to avoid hover bug
- Add ariaLabel?: string to ActionItem in ActionBar.tsx - Sync the duplicate inline type in addons/docs/src/types.ts - Pass ariaLabel through to Button in Preview.tsx (defaults to false to suppress the mandatory-prop warning when title is visible) Closes #34746
Addresses CodeRabbit review feedback. ActionBar.tsx now destructures ariaLabel and passes it as aria-label HTML attribute, so ActionItem.ariaLabel is honored when ActionBar is used directly (not only via Preview.tsx).
…n-item-aria-label Docs: Add ariaLabel support to ActionItem interface
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Docs: Update AI docs to include `get-changed-stories` tool
…eta-id Docs: Support explicit id prop on <Meta> for standalone MDX
…nique-control-ids Docs: Scope control input ids to each <Controls /> block instance
…nal-outputs Angular: Detect model() signal outputs (type inference + compodoc autodocs + runtime binding)
…op-types Sandboxes: RN add missing `prop-types`
Vue3: Specify a specific version for non-dev dependency
…eading-anchors-a11y A11y: Fix MDX heading anchors not keyboard accessible
c301ad5 to
6b1357b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automated pull request that bumps the version from
10.5.0-alpha.0to10.5.0-alpha.1.Once this pull request is merged, it will trigger a new release of version
10.5.0-alpha.1.If you're not a core maintainer with permissions to release you can ignore this pull request.
To do
Before merging the PR, there are a few QA steps to go through:
And for each change below:
This is a list of all the PRs merged and commits pushed directly to
next, that will be part of this release:resolveandresolve.exportswithoxc-resolver#34692peerDependenciesin framework detection for component libraries #34516 (will also be patched)npx expo install --fixafter init for Expo projects #34803 (will also be patched)prop-types#34854 (will also be patched)get-changed-storiestool #34643 (will also be patched)46eba0bfbe0d4558c4918c9df532d161ee9455a4actions/checkout#34848tanstack-reactsnippets #34814 (will also be patched)npm create#34828.typeFAQ #34813 (will also be patched)If you've made any changes doing the above QA (change PR titles, revert PRs), manually trigger a re-generation of this PR with this workflow and wait for it to finish. It will wipe your progress in this to do, which is expected.
Feel free to manually commit any changes necessary to this branch after you've done the last re-generation, following the Make Manual Changes section in the docs, especially if you're making changes to the changelog.
When everything above is done:
Generated changelog
10.5.0-alpha.1
npx expo install --fixafter init for Expo projects - #34803, thanks ndelangen!peerDependenciesin framework detection for component libraries - #34516, thanks zhyd1997!resolveandresolve.exportswithoxc-resolver- #34692, thanks valentinpalkovic!