Skip to content

feat(nova-react-test-utils): add proper support for storybook 10 - #193

Merged
Mark Polak (Markionium) merged 2 commits into
microsoft:mainfrom
sjwilczynski:stwilczy-microsoft-storybook-9-10-compatibility
Sep 8, 2026
Merged

Mark Polak (Markionium) merged 2 commits into
microsoft:mainfrom
sjwilczynski:stwilczy-microsoft-storybook-9-10-compatibility

Conversation

@sjwilczynski

Copy link
Copy Markdown
Contributor

Summary

Updates @nova/react-test-utils to support both Storybook 9 and Storybook 10 while moving this repository’s development and examples environment to Storybook 10.

Changes

  • expands the Storybook peer dependency ranges in @nova/react-test-utils to:
    • @storybook/react: ^9.0.0 || ^10.0.0
    • storybook: ^9.0.0 || ^10.0.0
  • upgrades the test-utils development dependencies and examples package to Storybook 10
  • updates the examples Storybook configuration to valid ESM
  • uses package specifiers for the framework and Vitest addon, which work with both supported Storybook versions
  • raises the Node.js requirement to ^20.19.0 || >=22.12.0, as required by Storybook 10
  • documents the supported Storybook versions
  • adds a dedicated CI job that downgrades the Storybook packages together and exercises the repository against Storybook 9

Compatibility approach

No runtime compatibility layer is required in @nova/react-test-utils. The Storybook APIs it uses, including makeDecorator and the exported React Storybook types, remain compatible across versions 9 and 10.

Storybook packages must be tested on the same major within a workspace because mixing v9 and v10 packages introduces separate, incompatible Storybook type identities. The new CI job therefore tests the complete Storybook 9 dependency set, while the normal build uses Storybook 10.

Validation

Validated both dependency sets:

  • @nova/react-test-utils type generation, browser tests, and build
  • examples type generation and test suite
  • static Storybook build
  • Storybook 9 compatibility downgrade workflow

Stanislaw Wilczynski and others added 2 commits September 7, 2026 16:48
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Normalize bin paths for packages introduced by the Storybook 10 dependency graph so Yarn hardened mode accepts the lockfile in fork-based PR builds.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Markionium
Mark Polak (Markionium) merged commit 4478b0c into microsoft:main Sep 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants