Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
352 commits
Select commit Hold shift + click to select a range
c14bdd4
Update CircleCI configuration to use medium executor class for test-i…
valentinpalkovic Oct 27, 2025
6f00339
Update CircleCI configuration to use medium+ executor class for test-…
valentinpalkovic Oct 27, 2025
f500eaf
Revert (for debugging purposes
valentinpalkovic Oct 27, 2025
a72ee5b
Refactor FrameworkDetectionCommand to enforce framework presence and …
valentinpalkovic Oct 27, 2025
650fbfd
Refactor GeneratorExecutionCommand and baseGenerator to enhance frame…
valentinpalkovic Oct 27, 2025
9bfb67b
Refactor baseGenerator to streamline framework package handling
valentinpalkovic Oct 27, 2025
a58ac65
Enhance Angular generator to prompt for Compodoc usage
valentinpalkovic Oct 27, 2025
69a49be
Refactor generator execution and user preferences handling to improve…
valentinpalkovic Oct 27, 2025
fc738f3
Refactor GeneratorExecutionCommand to enhance type definitions and re…
valentinpalkovic Oct 27, 2025
6ae03af
Fix tests
valentinpalkovic Oct 27, 2025
98a6d87
Install @storybook/addon-docs if docs should be installed
valentinpalkovic Oct 27, 2025
742898d
Refactor type definitions and logging in server-statics
valentinpalkovic Oct 27, 2025
dc4970b
Update AddonManager tests to use SupportedBuilder constants
valentinpalkovic Oct 27, 2025
f542c30
Refactor logging in server-statics to use project root for relative p…
valentinpalkovic Oct 27, 2025
ed93646
Refactor Compodoc logging in Angular generator for improved readability
valentinpalkovic Oct 27, 2025
55ab695
Enable debug mode for init
valentinpalkovic Oct 27, 2025
0636bca
Add yes option to GeneratorExecutionCommand for user confirmation
valentinpalkovic Oct 27, 2025
a94202e
WIP
valentinpalkovic Oct 27, 2025
9b61d16
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Oct 27, 2025
8803ec2
Refactor postinstall and logger integration across CLI components
valentinpalkovic Oct 27, 2025
db397d5
Refactor logger messages for consistency and clarity
valentinpalkovic Oct 28, 2025
fab118c
Fix tests
valentinpalkovic Oct 28, 2025
c43c7d1
Enhance GeneratorOptions type and streamline baseGenerator parameters
valentinpalkovic Oct 28, 2025
8f4adc9
Refactor framework configuration in baseGenerator for simplicity
valentinpalkovic Oct 28, 2025
494a348
Remove ConfigGenerationService and its associated tests
valentinpalkovic Oct 28, 2025
f2e303f
Add logger and prompt expectations in AddonConfigurationCommand tests
valentinpalkovic Oct 28, 2025
22e819f
Refactor feature handling in CLI components to use Feature enum
valentinpalkovic Oct 28, 2025
c30500d
Add Feature enum to exports and clean up ConfigGenerationService exports
valentinpalkovic Oct 28, 2025
82491a8
Fix tests
valentinpalkovic Oct 28, 2025
950ca75
Fix tests
valentinpalkovic Oct 28, 2025
fc4c3dd
Refactor dependency management and introduce AddonService
valentinpalkovic Oct 28, 2025
b8954bb
Fix tests
valentinpalkovic Oct 28, 2025
d0ac4e6
Add logging for build and start processes in Angular Storybook builders
valentinpalkovic Oct 28, 2025
48c1634
Enhance AddonService tests to include A11Y feature and verify addon c…
valentinpalkovic Oct 28, 2025
cc9ec9c
Fix tests
valentinpalkovic Oct 28, 2025
650ba10
Merge branch 'next' into valentin/cli-init-rework
valentinpalkovic Oct 28, 2025
e14a93b
Refactor telemetry notification message formatting
valentinpalkovic Oct 29, 2025
e9b2e09
Update CircleCI configuration to use `--loglevel=debug` for create-st…
valentinpalkovic Oct 29, 2025
e4f9db7
Update CircleCI configuration to skip installation during Storybook i…
valentinpalkovic Oct 29, 2025
9e0a69a
Enhance error logging in BUNProxy and NPMProxy classes
valentinpalkovic Oct 29, 2025
a2e2697
Refactor spinner and task log functions to support non-TTY environments
valentinpalkovic Oct 29, 2025
b0f26de
Refactor terminal check for spinner and task log functions
valentinpalkovic Oct 29, 2025
a289692
Update CircleCI configuration to remove redundant npm install during …
valentinpalkovic Oct 29, 2025
74aa16a
Refactor Playwright installation logic in AddonVitestService
valentinpalkovic Oct 29, 2025
c1fd37a
Fix tests
valentinpalkovic Oct 29, 2025
f8641b6
Fix type issues
valentinpalkovic Oct 29, 2025
8964063
Fix types
valentinpalkovic Oct 29, 2025
7822623
Fix error handling in executeTaskWithSpinner to stop task on SIGINT
valentinpalkovic Oct 30, 2025
a85f440
Add nextjsToNextjsVite migration fix to allFixes export
valentinpalkovic Oct 30, 2025
e3d2f2c
Fix indentation handling in wrapTextForClackHint and update prompt-fu…
valentinpalkovic Oct 30, 2025
be57f8f
Fix tests
valentinpalkovic Oct 30, 2025
96baa71
Fix tests
valentinpalkovic Oct 30, 2025
44105d3
Fix tests
valentinpalkovic Oct 30, 2025
6b32df7
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Oct 30, 2025
be6d33a
Refactor UserPreferencesCommand to use CommandOptions for better conf…
valentinpalkovic Oct 30, 2025
be0e21b
Delete integration test attempt
valentinpalkovic Oct 30, 2025
0dd4c12
Enhance logging functions to conditionally log messages based on the …
valentinpalkovic Oct 30, 2025
bbc2123
Refactor telemetry logging to remove unnecessary newline and ensure c…
valentinpalkovic Oct 31, 2025
9ff8653
Various logging improvements
valentinpalkovic Oct 31, 2025
7775199
Refactor logging and task execution to improve message handling and r…
valentinpalkovic Oct 31, 2025
a08cb94
Improve logging
valentinpalkovic Nov 2, 2025
04f6bcd
Core: Move builder-specific mocking logic into builders
valentinpalkovic Nov 3, 2025
6aae3d9
Fix tests
valentinpalkovic Nov 3, 2025
1f13f05
Fix tests
valentinpalkovic Nov 3, 2025
48b24cc
Fix tests
valentinpalkovic Nov 3, 2025
efedfe9
Add caching for package.json files in JsPackageManager to optimize fi…
valentinpalkovic Nov 3, 2025
14becd3
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 3, 2025
07dd5d4
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Nov 3, 2025
d08caed
Fix tests
valentinpalkovic Nov 3, 2025
12ed766
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 3, 2025
03a3473
Minor logging fixes
valentinpalkovic Nov 3, 2025
970ec6d
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 3, 2025
ec0855b
Update feature selection in GeneratorExecutionCommand to use selected…
valentinpalkovic Nov 3, 2025
eef0799
Add support for Nuxt framework in get-storybook-info utility
valentinpalkovic Nov 3, 2025
16b7aab
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 3, 2025
aa29e7f
Refactor logging messages in AddonConfigurationCommand for clarity
valentinpalkovic Nov 4, 2025
34f9bce
Enhance logger function signatures for better type safety and clarity…
valentinpalkovic Nov 4, 2025
051edf1
Add 'doctor' event type to telemetry and implement telemetry logging …
valentinpalkovic Nov 4, 2025
2915632
Improve error handling and logging in dependency installation process…
valentinpalkovic Nov 4, 2025
d5071f5
Refactor info logging in Vite logger to include spacing for improved …
valentinpalkovic Nov 4, 2025
6ed2906
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 4, 2025
e379604
Improve error logging in extractMockCalls function to include error m…
valentinpalkovic Nov 4, 2025
22ae068
Update framework type definitions to allow null values in various com…
valentinpalkovic Nov 4, 2025
056f22b
Refactor logging in FinalizationCommand to use warning level for debu…
valentinpalkovic Nov 4, 2025
d8c2ffd
Several test and type fixes
valentinpalkovic Nov 4, 2025
ca75222
Merge remote-tracking branch 'origin/valentin/cli-init-rework' into v…
valentinpalkovic Nov 4, 2025
2fda23b
Cleanup
valentinpalkovic Nov 4, 2025
423a1a9
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 4, 2025
eb521b3
Remove obsolete outro's
valentinpalkovic Nov 5, 2025
541b4df
Fix nextjs-vite automigration to update to the right version
valentinpalkovic Nov 5, 2025
926fd23
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 5, 2025
31bee8b
Refactor upgrade process to improve logging and error handling; strea…
valentinpalkovic Nov 5, 2025
264865b
Enhance upgrade logging by replacing log messages with step indicator…
valentinpalkovic Nov 5, 2025
62527cd
Refactor migration summary logging to improve readability by formatti…
valentinpalkovic Nov 5, 2025
d201104
Add NX project detection error handling in ProjectDetectionCommand; t…
valentinpalkovic Nov 5, 2025
28b96f1
Fix condition in ProjectDetectionCommand to correctly handle force op…
valentinpalkovic Nov 5, 2025
04f7a99
Improve user prompt message formatting in ProjectDetectionCommand by …
valentinpalkovic Nov 5, 2025
eb1da8e
Cleanup logging new lines
valentinpalkovic Nov 5, 2025
2497fc6
Update '--write-logs' option description to specify log file name; ad…
valentinpalkovic Nov 5, 2025
4d8782a
Enhance ProjectDetectionCommand to include an additional check for th…
valentinpalkovic Nov 5, 2025
31bda49
Merge remote-tracking branch 'origin/valentin/cli-init-rework' into v…
valentinpalkovic Nov 5, 2025
bada431
Refactor command execution across package managers to use a unified e…
valentinpalkovic Nov 6, 2025
a9da81c
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 6, 2025
71c8766
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Nov 6, 2025
d1f6bed
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 6, 2025
a1366f7
Refactor BUNProxy command execution to use 'npx' instead of 'bun run'…
valentinpalkovic Nov 6, 2025
cd441a7
Fix: Update installDependencies method to use arrow function for impr…
valentinpalkovic Nov 6, 2025
248b61a
Update CircleCI configuration to reduce parallelism for e2e-dev workf…
valentinpalkovic Nov 6, 2025
82cd1be
Refactor package manager commands to replace runRemoteCommand with ru…
valentinpalkovic Nov 6, 2025
cabdff3
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 6, 2025
6321d48
Remove abstract method
valentinpalkovic Nov 6, 2025
5f21e96
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 6, 2025
9f8743a
Fix tests
valentinpalkovic Nov 6, 2025
2c7ac43
Enhance project scaffolding by adding 'Other' option for unsupported …
valentinpalkovic Nov 7, 2025
b5e87fc
Refactor command execution by removing 'shell: true' option in variou…
valentinpalkovic Nov 7, 2025
871c615
Update telemetry notification message to remove unnecessary formattin…
valentinpalkovic Nov 7, 2025
bbc59ea
Remove unnecessary formatting from abort messages in task execution f…
valentinpalkovic Nov 7, 2025
a960afd
Refactor FinalizationCommand to remove selectedFeatures parameter, si…
valentinpalkovic Nov 7, 2025
061781a
Remove unnecessary output from initiation completion logger for impro…
valentinpalkovic Nov 7, 2025
78236e1
Add silent flag for npm package manager in Storybook initiation to re…
valentinpalkovic Nov 7, 2025
3ffa86e
Refactor logging output in various components for improved clarity an…
valentinpalkovic Nov 7, 2025
6e1bb50
Update Playwright installation prompt to indicate abort option; remov…
valentinpalkovic Nov 7, 2025
e54f891
Update code/lib/cli-storybook/src/upgrade.ts
valentinpalkovic Nov 7, 2025
897cf7a
Refactor postinstall command execution to use spawnSync for synchrono…
valentinpalkovic Nov 7, 2025
ec6de36
Refactor sandbox function to remove unused borderColor variable and u…
valentinpalkovic Nov 7, 2025
64fbedc
Fix command argument formatting in dispatcher.ts to remove unnecessar…
valentinpalkovic Nov 7, 2025
9719b1d
Refactor postinstall command argument handling for improved clarity b…
valentinpalkovic Nov 7, 2025
bf72e84
Refactor command execution in link.ts to utilize executeCommand for i…
valentinpalkovic Nov 7, 2025
b56df2c
Remove 'skip-install' option from init function in sandbox-parts.ts f…
valentinpalkovic Nov 7, 2025
993b2dd
Add debug logging for version handling in postinstall and package man…
valentinpalkovic Nov 10, 2025
eee9dbe
Enhance version handling in JsPackageManager by incorporating version…
valentinpalkovic Nov 10, 2025
9ba0234
Refactor JsPackageManager tests to use spyOn for mocking latestVersio…
valentinpalkovic Nov 10, 2025
1942e52
Update CircleCI configuration to remove loglevel flag from create-sto…
valentinpalkovic Nov 11, 2025
8384d92
Update CircleCI configuration to change executor class from medium+ t…
valentinpalkovic Nov 11, 2025
cd83b83
Enhance logging in logger.ts to counteract default behavior of clack …
valentinpalkovic Nov 11, 2025
1e614ac
Add warning suppression to customViteLogger in logger.ts to prevent d…
valentinpalkovic Nov 11, 2025
d54b4b7
Small cleanup
valentinpalkovic Nov 11, 2025
e550bfe
Add test
valentinpalkovic Nov 11, 2025
8ccc6e1
Refactor package manager classes to remove synchronous command execut…
valentinpalkovic Nov 11, 2025
0df27a4
Update framework-to-renderer and framework-to-builder mappings to cor…
valentinpalkovic Nov 11, 2025
54fd6e5
Refactor getStorybookInfo function to ensure correct configuration di…
valentinpalkovic Nov 11, 2025
879348e
Cleanup and small improvements
valentinpalkovic Nov 11, 2025
6df4537
Refactor logger functions to use parameterized types for improved typ…
valentinpalkovic Nov 11, 2025
f1ac524
Refactor runCompodoc to use asynchronous package command execution fo…
valentinpalkovic Nov 11, 2025
a77ee36
Add comments
valentinpalkovic Nov 11, 2025
79093a6
Update gitpick version in sandbox.ts to ensure compatibility and prev…
valentinpalkovic Nov 11, 2025
a90e13b
Refactor logger color constants to improve clarity and consistency in…
valentinpalkovic Nov 11, 2025
c74f361
Remove unused file
valentinpalkovic Nov 11, 2025
b3d776e
Implement dry run option for package.json updates in nextjs-to-nextjs…
valentinpalkovic Nov 11, 2025
9d927b5
Small cleanup
valentinpalkovic Nov 11, 2025
4fe5728
Refactor logging options in CLI commands to use --logfile for specify…
valentinpalkovic Nov 11, 2025
9d044ba
Enhance logging functionality in Storybook initialization by passing …
valentinpalkovic Nov 11, 2025
67d3622
Improve error handling in AddonConfigurationCommand by enhancing logg…
valentinpalkovic Nov 11, 2025
45db1a6
Remove unused addon dependency functions for a11y and vitest, streaml…
valentinpalkovic Nov 11, 2025
4a3c63a
Refactor PreflightCheckCommand to use options directly for package ma…
valentinpalkovic Nov 11, 2025
ecd6ecb
Improve error handling in ProjectDetectionCommand by allowing specifi…
valentinpalkovic Nov 11, 2025
f09bcd2
Small refactorings
valentinpalkovic Nov 11, 2025
b9f4440
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Nov 11, 2025
38a925e
Remove --logfile option from CLI dev command, simplifying command opt…
valentinpalkovic Nov 11, 2025
1441e05
Fix tests
valentinpalkovic Nov 11, 2025
a6955af
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Nov 11, 2025
02f2ddb
Fix types
valentinpalkovic Nov 11, 2025
34d3f5e
Fix tests
valentinpalkovic Nov 11, 2025
edcf22f
Merge branch 'next' into valentin/cli-init-rework
valentinpalkovic Nov 11, 2025
c4ce21c
Refactor JsPackageManager to normalize paths using resolve() for cons…
valentinpalkovic Nov 12, 2025
37524ac
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Nov 12, 2025
aaad3f1
Update Yarn1Proxy to correctly pass command arguments with '--' separ…
valentinpalkovic Nov 12, 2025
b7fece0
Change default return value in getErrorLevel function from 'full' to …
valentinpalkovic Nov 12, 2025
8e2937d
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-rework…
valentinpalkovic Nov 12, 2025
baa5ad6
Refactor command execution in dispatcher and add synchronous command …
valentinpalkovic Nov 12, 2025
116cf23
Refactor taskLog implementation to simplify logging conditions and re…
valentinpalkovic Nov 12, 2025
a84ea41
Refactor command spawning in dispatcher to separate command and argum…
valentinpalkovic Nov 12, 2025
b9eb956
Refactor telemetry error handling to conditionally send errors only w…
valentinpalkovic Nov 12, 2025
f9221a8
Update stdio configuration in AddonVitestService to inherit and pipe …
valentinpalkovic Nov 12, 2025
ae93da3
Update Playwright installation command in AddonVitestService to use '…
valentinpalkovic Nov 12, 2025
80a78e7
Update automigration logging to handle optional fixId for improved cl…
valentinpalkovic Nov 12, 2025
eb59ba8
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Nov 12, 2025
1be5aa8
Update yarn.lock file
valentinpalkovic Nov 12, 2025
1ab6043
Add RSBuild support
valentinpalkovic Nov 13, 2025
e8977ce
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-docs-p…
valentinpalkovic Nov 13, 2025
5667637
Merge pull request #32921 from storybookjs/valentin/cli-init-docs-per…
valentinpalkovic Nov 13, 2025
a2d573b
Merge branch 'valentin/cli-init-rework' into valentin/cli-init-rework…
valentinpalkovic Nov 13, 2025
5df8b2f
Merge pull request #32984 from storybookjs/valentin/cli-init-rework-d…
valentinpalkovic Nov 13, 2025
11c1b66
Refactor package manager handling to use enums for type safety
valentinpalkovic Nov 13, 2025
5771247
Refactor getApplicationFilesCountUncached to simplify command constru…
valentinpalkovic Nov 13, 2025
f712f28
Refactor JsPackageManagerFactory tests to use executeCommandSync
valentinpalkovic Nov 13, 2025
f3cf116
Refactor project type handling for improved consistency and type safety
valentinpalkovic Nov 14, 2025
629e0a9
Reorganize logic for better structure and readability
valentinpalkovic Nov 14, 2025
f2862e2
Fix tests
valentinpalkovic Nov 14, 2025
8e2cc64
Update configuration call in React Native generator to include contex…
valentinpalkovic Nov 14, 2025
9e9d891
Import ProjectType from core for improved type handling in sandbox te…
valentinpalkovic Nov 14, 2025
edc314e
Refactor import statements in sandbox templates for improved clarity …
valentinpalkovic Nov 14, 2025
87bd414
Update CircleCI configuration to remove 'dev' feature from Storybook …
valentinpalkovic Nov 14, 2025
da8535c
Update ProjectTypeService instantiation to handle package manager typ…
valentinpalkovic Nov 14, 2025
2fb3ded
Fix tests
valentinpalkovic Nov 14, 2025
b764abe
Fix preset loading in yarn pnp mode
valentinpalkovic Nov 14, 2025
abdfb4d
Update taskLog function to require both interactive terminal and info…
valentinpalkovic Nov 14, 2025
922b4f3
Refactor execCommandCountLines to accept command arguments and update…
valentinpalkovic Nov 14, 2025
669c2a9
Enhance command execution by adding cross-platform support for Node-b…
valentinpalkovic Nov 14, 2025
76d2b20
Removed `execa` from `create-storybook`
valentinpalkovic Nov 14, 2025
f2fb106
Remove `execa` across storybook packages
valentinpalkovic Nov 14, 2025
b13e056
Add 'ng' to command resolution and refactor command execution in Stor…
valentinpalkovic Nov 14, 2025
881a637
Cleanup
valentinpalkovic Nov 14, 2025
c0d0a5e
Refactor logging in spinner functions to use conditional logging base…
valentinpalkovic Nov 14, 2025
5ff022b
Cleanup
valentinpalkovic Nov 14, 2025
ad5b4ad
Update getApplicationFilesCountUncached to await execCommandCountLine…
valentinpalkovic Nov 14, 2025
788ad55
Update yarn.lock
valentinpalkovic Nov 14, 2025
9ded6e4
Add shell option to command execution in scaffoldNewProject
valentinpalkovic Nov 14, 2025
659c72d
Refactor command execution in dispatcher to use internal executeComma…
valentinpalkovic Nov 15, 2025
58e0e7e
Fix tests
valentinpalkovic Nov 15, 2025
d980a39
Fix tests
valentinpalkovic Nov 15, 2025
47ba298
Enhance command execution in dispatcher by adding stdio inheritance f…
valentinpalkovic Nov 16, 2025
f340a68
Refactor PackageManagerName enum to use 'yarn' instead of 'yarn1' and…
valentinpalkovic Nov 17, 2025
aed6511
Shorten prompt
valentinpalkovic Nov 17, 2025
5ad2c34
Addon-A11y: Fix a11y postinstall
valentinpalkovic Nov 17, 2025
b8c5e10
Refactor a11y postinstall to pass args as an object in runPackageCommand
valentinpalkovic Nov 17, 2025
f201f00
Refactor upgrade function to use PackageManagerName enum for better c…
valentinpalkovic Nov 17, 2025
fbdca15
Refactor UserPreferencesCommand and ProjectDetectionCommand to use Ar…
valentinpalkovic Nov 17, 2025
1e131d4
Fix tests and linting
valentinpalkovic Nov 17, 2025
3377ff9
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Nov 17, 2025
32ecbaa
Linting
valentinpalkovic Nov 17, 2025
aa48b31
Update CLI color configuration to use cyan for info messages on Windo…
valentinpalkovic Nov 17, 2025
26d7272
Fix exit code handling in dispatcher to default to 1 if undefined
valentinpalkovic Nov 17, 2025
c24667d
Refactor GeneratorExecutionCommand to use type assertion with 'satisf…
valentinpalkovic Nov 17, 2025
c0982c8
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Nov 17, 2025
1aa4ae3
Add error names to AddonVitestPostinstall and AutomigrateError classe…
valentinpalkovic Nov 17, 2025
2129a2f
Remove comment
valentinpalkovic Nov 17, 2025
8ebf943
Refactor GeneratorExecutionCommand to use type assertion with 'as' fo…
valentinpalkovic Nov 17, 2025
59d7b8e
Introduce --no-features flag for init command
valentinpalkovic Nov 18, 2025
0abdc8c
Remove eslint-disable-next-line comments
valentinpalkovic Nov 18, 2025
e618441
Remove comments
valentinpalkovic Nov 18, 2025
0cc0297
Adjust copy
valentinpalkovic Nov 18, 2025
5fb40e9
Sort supported frameworks
valentinpalkovic Nov 18, 2025
05b3522
Sort project type
valentinpalkovic Nov 18, 2025
ac3cb17
Sort third party frameworks
valentinpalkovic Nov 18, 2025
ede3808
Return error object key instead of an errors array for installPlaywri…
valentinpalkovic Nov 18, 2025
d239246
Change executor class from medium+ to small for test-init-features job
valentinpalkovic Nov 18, 2025
82c9739
Fix version of @clack/prompts
valentinpalkovic Nov 18, 2025
eb452b4
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Nov 18, 2025
b0a5168
Sort community frameworks
valentinpalkovic Nov 18, 2025
72a9017
FIx bug related to --skip-install being ignored in AddonConfiguration…
valentinpalkovic Nov 18, 2025
d484f05
Merge branch 'next' into valentin/cli-init-rework
valentinpalkovic Nov 19, 2025
23c335a
Cleanup
valentinpalkovic Nov 19, 2025
12e7055
Add tests for project type service and adjust error messaging
valentinpalkovic Nov 19, 2025
9349f71
Remove debug log for features in run.ts
valentinpalkovic Nov 19, 2025
7a16d82
Refactor telemetry notification logging to use info level and remove …
valentinpalkovic Nov 19, 2025
4b955ff
Update configuration messages to reflect file extension based on lang…
valentinpalkovic Nov 19, 2025
d9ca7b4
Merge remote-tracking branch 'origin/next' into valentin/cli-init-rework
valentinpalkovic Nov 19, 2025
07f890c
Update yarn lock
valentinpalkovic Nov 19, 2025
b01def1
Revert "Remove eslint-disable-next-line comments"
valentinpalkovic Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ jobs:
mkdir features-1
cd features-1
npm set registry http://localhost:6001
npx create-storybook --yes --package-manager npm --features dev docs test
npx create-storybook --yes --package-manager npm --features docs test a11y
npx vitest
environment:
IN_STORYBOOK_SANDBOX: true
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/test-init-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:
mkdir features-1
cd features-1
npm set registry http://localhost:6001
npx create-storybook --yes --package-manager npm --features dev docs test
npx create-storybook --yes --package-manager npm --features docs test a11y --loglevel=debug
npx vitest
environment:
IN_STORYBOOK_SANDBOX: true
Expand Down
29 changes: 13 additions & 16 deletions code/addons/a11y/src/postinstall.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
// eslint-disable-next-line depend/ban-dependencies
import { execa } from 'execa';
import { JsPackageManagerFactory } from 'storybook/internal/common';

import type { PostinstallOptions } from '../../../lib/cli-storybook/src/add';

const $ = execa({
preferLocal: true,
stdio: 'inherit',
// we stream the stderr to the console
reject: false,
});

export default async function postinstall(options: PostinstallOptions) {
const command = ['storybook', 'automigrate', 'addon-a11y-addon-test'];
const args = ['storybook', 'automigrate', 'addon-a11y-addon-test'];

command.push('--loglevel', 'silent');
command.push('--skip-doctor');
args.push('--loglevel', 'silent');
args.push('--skip-doctor');

if (options.yes) {
command.push('--yes');
args.push('--yes');
}

if (options.packageManager) {
command.push('--package-manager', options.packageManager);
args.push('--package-manager', options.packageManager);
}

if (options.configDir) {
command.push('--config-dir', `"${options.configDir}"`);
args.push('--config-dir', options.configDir);
}

await $`${command.join(' ')}`;
const jsPackageManager = JsPackageManagerFactory.getPackageManager({
force: options.packageManager,
configDir: options.configDir,
});

await jsPackageManager.runPackageCommand({ args });
}
8 changes: 4 additions & 4 deletions code/addons/themes/src/postinstall.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { spawn } from 'child_process';
import { spawnSync } from 'child_process';

const PACKAGE_MANAGER_TO_COMMAND = {
npm: 'npx',
Expand All @@ -12,11 +12,11 @@ const selectPackageManagerCommand = (packageManager: string) =>
PACKAGE_MANAGER_TO_COMMAND[packageManager as keyof typeof PACKAGE_MANAGER_TO_COMMAND];

export default async function postinstall({ packageManager = 'npm' }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Remove unnecessary async keyword.

The function body is entirely synchronous (spawnSync doesn't return a Promise), so the async declaration is misleading.

Apply this diff:

-export default async function postinstall({ packageManager = 'npm' }) {
+export default function postinstall({ packageManager = 'npm' }) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export default async function postinstall({ packageManager = 'npm' }) {
export default function postinstall({ packageManager = 'npm' }) {
🤖 Prompt for AI Agents
In code/addons/themes/src/postinstall.ts around line 14, the function is
declared async but its body is synchronous (uses spawnSync); remove the
unnecessary async keyword from the function declaration (change "export default
async function postinstall(...)" to "export default function postinstall(...)")
and verify there are no await expressions inside the function and the exported
behavior remains unchanged.

const command = selectPackageManagerCommand(packageManager);
const commandString = selectPackageManagerCommand(packageManager);
const [command, ...commandArgs] = commandString.split(' ');
Comment on lines +15 to +16
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: Handle undefined commandString to prevent runtime crash.

If an unrecognized packageManager is passed, selectPackageManagerCommand returns undefined, causing commandString.split(' ') to throw a TypeError at runtime.

Apply this diff to add defensive handling:

  const commandString = selectPackageManagerCommand(packageManager);
+  if (!commandString) {
+    console.error(`Unsupported package manager: ${packageManager}`);
+    return;
+  }
  const [command, ...commandArgs] = commandString.split(' ');
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const commandString = selectPackageManagerCommand(packageManager);
const [command, ...commandArgs] = commandString.split(' ');
const commandString = selectPackageManagerCommand(packageManager);
if (!commandString) {
console.error(`Unsupported package manager: ${packageManager}`);
return;
}
const [command, ...commandArgs] = commandString.split(' ');
🤖 Prompt for AI Agents
In code/addons/themes/src/postinstall.ts around lines 15 to 16, the code assumes
selectPackageManagerCommand(packageManager) returns a string and directly calls
split, which will throw if it returns undefined; guard against undefined by
checking commandString before splitting — if undefined, either throw a clear,
descriptive error (including the invalid packageManager) or default to a safe
command (e.g., 'npm install') and log a warning; only call commandString.split('
') when commandString is a string and handle the fallback path accordingly.


await spawn(`${command} @storybook/auto-config themes`, {
spawnSync(command, [...commandArgs, '@storybook/auto-config', 'themes'], {
stdio: 'inherit',
cwd: process.cwd(),
shell: true,
});
}
6 changes: 1 addition & 5 deletions code/addons/vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@
},
"dependencies": {
"@storybook/global": "^5.0.0",
"@storybook/icons": "^2.0.0",
"prompts": "^2.4.0",
"ts-dedent": "^2.2.0"
"@storybook/icons": "^2.0.0"
},
"devDependencies": {
"@types/istanbul-lib-report": "^3.0.3",
Expand All @@ -84,10 +82,8 @@
"@types/semver": "^7",
"@vitest/browser-playwright": "^4.0.1",
"@vitest/runner": "^4.0.1",
"boxen": "^8.0.1",
"empathic": "^2.0.0",
"es-toolkit": "^1.36.0",
"execa": "^8.0.1",
"istanbul-lib-report": "^3.0.1",
"micromatch": "^4.0.8",
"pathe": "^1.1.2",
Expand Down
13 changes: 0 additions & 13 deletions code/addons/vitest/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,6 @@ export const DOCUMENTATION_FATAL_ERROR_LINK = `${DOCUMENTATION_LINK}#what-happen

export const COVERAGE_DIRECTORY = 'coverage';

export const SUPPORTED_FRAMEWORKS = [
'@storybook/nextjs',
'@storybook/nextjs-vite',
'@storybook/react-vite',
'@storybook/preact-vite',
'@storybook/svelte-vite',
'@storybook/vue3-vite',
'@storybook/html-vite',
'@storybook/web-components-vite',
'@storybook/sveltekit',
'@storybook/react-native-web-vite',
];

export const storeOptions = {
id: ADDON_ID,
initialState: {
Expand Down
10 changes: 9 additions & 1 deletion code/addons/vitest/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import { logger } from 'storybook/internal/node-logger';

import picocolors from 'picocolors';

import { ADDON_ID } from './constants';

export const log = (message: any) => {
console.log(`${picocolors.magenta(ADDON_ID)}: ${message.toString().trim()}`);
logger.log(
`${picocolors.magenta(ADDON_ID)}: ${message
.toString()
// Counteracts the default logging behavior of the clack prompt library
.replaceAll(/(│\n|│ )/g, '')
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a comment to explain what this does.

.trim()}`
);
};
107 changes: 64 additions & 43 deletions code/addons/vitest/src/node/boot-test-runner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,55 @@ import { join } from 'node:path';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';

import { Channel, type ChannelTransport } from 'storybook/internal/channels';
import { executeNodeCommand } from 'storybook/internal/common';
import type { Options } from 'storybook/internal/types';

// eslint-disable-next-line depend/ban-dependencies
import { execaNode } from 'execa';

import { storeOptions } from '../constants';
import { log } from '../logger';
import type { StoreEvent } from '../types';
import type { StoreState } from '../types';
import { killTestRunner, runTestRunner } from './boot-test-runner';

let stdout: (chunk: any) => void;
let stderr: (chunk: any) => void;
let message: (event: any) => void;
let stdout: (chunk: Buffer | string) => void;
let stderr: (chunk: Buffer | string) => void;
let message: (event: { type: string; args?: unknown[]; payload?: unknown }) => void;

const child = vi.hoisted(() => ({
stdout: {
on: vi.fn((event, callback) => {
stdout = callback;
on: vi.fn((event: string, callback: (chunk: Buffer | string) => void) => {
if (event === 'data') {
stdout = callback;
}
}),
},
stderr: {
on: vi.fn((event, callback) => {
stderr = callback;
on: vi.fn((event: string, callback: (chunk: Buffer | string) => void) => {
if (event === 'data') {
stderr = callback;
}
}),
},
on: vi.fn((event, callback) => {
message = callback;
}),
on: vi.fn(
(
event: string,
callback: (event: { type: string; args?: unknown[]; payload?: unknown }) => void
) => {
if (event === 'message') {
message = callback;
}
}
),
send: vi.fn(),
kill: vi.fn(),
}));

vi.mock('execa', () => ({
execaNode: vi.fn().mockReturnValue(child),
}));
vi.mock('storybook/internal/common', async (importOriginal) => {
const actual = await importOriginal<typeof import('storybook/internal/common')>();
return {
...actual,
executeNodeCommand: vi.fn().mockReturnValue(child),
};
});

vi.mock('../logger', () => ({
log: vi.fn(),
Expand All @@ -47,27 +60,18 @@ vi.mock('../logger', () => ({
vi.mock('../../../../core/src/shared/utils/module', () => ({
importMetaResolve: vi
.fn()
.mockImplementation(
(a) => 'file://' + join(__dirname, '..', '..', 'dist', 'node', 'vitest.js')
),
.mockImplementation(() => 'file://' + join(__dirname, '..', '..', 'dist', 'node', 'vitest.js')),
}));

let statusStoreSubscriber = vi.hoisted(() => undefined);
let testProviderStoreSubscriber = vi.hoisted(() => undefined);

vi.mock('storybook/internal/core-server', async (importOriginal) => {
const actual = await importOriginal<typeof import('storybook/internal/core-server')>();
return {
...actual,
internal_universalStatusStore: {
subscribe: (listener: any) => {
statusStoreSubscriber = listener;
},
subscribe: vi.fn(() => () => {}),
},
internal_universalTestProviderStore: {
subscribe: (listener: any) => {
testProviderStoreSubscriber = listener;
},
subscribe: vi.fn(() => () => {}),
},
};
});
Expand All @@ -85,7 +89,12 @@ const transport = { setHandler: vi.fn(), send: vi.fn() } satisfies ChannelTransp
const mockChannel = new Channel({ transport });

describe('bootTestRunner', () => {
let mockStore: any;
let mockStore: InstanceType<
typeof import('storybook/internal/core-server').experimental_MockUniversalStore<
StoreState,
StoreEvent
>
>;
const mockOptions = {
configDir: '.storybook',
} as Options;
Expand All @@ -95,28 +104,38 @@ describe('bootTestRunner', () => {
'storybook/internal/core-server'
);
mockStore = new MockUniversalStore<StoreState, StoreEvent>(storeOptions);
vi.mocked(executeNodeCommand).mockClear();
vi.mocked(log).mockClear();
child.send.mockClear();
});

it('should execute vitest.js', async () => {
runTestRunner({ channel: mockChannel, store: mockStore, options: mockOptions });
expect(execaNode).toHaveBeenCalledWith(expect.stringMatching(/vitest\.js$/), {
env: {
NODE_ENV: 'test',
TEST: 'true',
VITEST: 'true',
VITEST_CHILD_PROCESS: 'true',
STORYBOOK_CONFIG_DIR: '.storybook',
const promise = runTestRunner({ channel: mockChannel, store: mockStore, options: mockOptions });
expect(vi.mocked(executeNodeCommand)).toHaveBeenCalledWith({
scriptPath: expect.stringMatching(/vitest\.js$/),
options: {
env: {
NODE_ENV: 'test',
TEST: 'true',
VITEST: 'true',
VITEST_CHILD_PROCESS: 'true',
STORYBOOK_CONFIG_DIR: '.storybook',
},
extendEnv: true,
},
extendEnv: true,
});
message({ type: 'ready' });
await promise;
});

it('should log stdout and stderr', async () => {
runTestRunner({ channel: mockChannel, store: mockStore, options: mockOptions });
const promise = runTestRunner({ channel: mockChannel, store: mockStore, options: mockOptions });
stdout('foo');
stderr('bar');
expect(log).toHaveBeenCalledWith('foo');
expect(log).toHaveBeenCalledWith('bar');
message({ type: 'ready' });
await promise;
expect(vi.mocked(log)).toHaveBeenCalledWith('foo');
expect(vi.mocked(log)).toHaveBeenCalledWith('bar');
});

it('should wait for vitest to be ready', async () => {
Expand Down Expand Up @@ -145,8 +164,9 @@ describe('bootTestRunner', () => {
});

it('should forward universal store events', async () => {
runTestRunner({ channel: mockChannel, store: mockStore, options: mockOptions });
const promise = runTestRunner({ channel: mockChannel, store: mockStore, options: mockOptions });
message({ type: 'ready' });
await promise;

mockStore.send({ type: 'TRIGGER_RUN', payload: { triggeredBy: 'global', storyIds: ['foo'] } });
expect(child.send).toHaveBeenCalledWith({
Expand Down Expand Up @@ -174,14 +194,15 @@ describe('bootTestRunner', () => {
});

it('should resend init event', async () => {
runTestRunner({
const promise = runTestRunner({
channel: mockChannel,
store: mockStore,
options: mockOptions,
initEvent: 'init',
initArgs: ['foo'],
});
message({ type: 'ready' });
await promise;
expect(child.send).toHaveBeenCalledWith({
args: ['foo'],
from: 'server',
Expand Down
22 changes: 12 additions & 10 deletions code/addons/vitest/src/node/boot-test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import { type ChildProcess } from 'node:child_process';
import { fileURLToPath } from 'node:url';

import type { Channel } from 'storybook/internal/channels';
import { executeNodeCommand } from 'storybook/internal/common';
import {
internal_universalStatusStore,
internal_universalTestProviderStore,
} from 'storybook/internal/core-server';
import type { EventInfo, Options } from 'storybook/internal/types';

// eslint-disable-next-line depend/ban-dependencies
import { execaNode } from 'execa';
import { normalize } from 'pathe';

import { importMetaResolve } from '../../../../core/src/shared/utils/module';
Expand Down Expand Up @@ -77,15 +76,18 @@ const bootTestRunner = async ({

const startChildProcess = () =>
new Promise<void>((resolve, reject) => {
child = execaNode(vitestModulePath, {
env: {
VITEST: 'true',
TEST: 'true',
VITEST_CHILD_PROCESS: 'true',
NODE_ENV: process.env.NODE_ENV ?? 'test',
STORYBOOK_CONFIG_DIR: normalize(options.configDir),
child = executeNodeCommand({
scriptPath: vitestModulePath,
options: {
env: {
VITEST: 'true',
TEST: 'true',
VITEST_CHILD_PROCESS: 'true',
NODE_ENV: process.env.NODE_ENV ?? 'test',
STORYBOOK_CONFIG_DIR: normalize(options.configDir),
},
extendEnv: true,
},
extendEnv: true,
});
stderr = [];

Expand Down
Loading
Loading