Release: Prerelease 10.0.0-beta.3#32473
Conversation
…empathic Replace: Use `empathic` over `find-up`
| cwd: process.cwd(), | ||
| stopAt: getProjectRoot(), | ||
| }); | ||
| const tsconfigPath = find.up('tsconfig.json', { cwd: process.cwd(), last: getProjectRoot() }); |
There was a problem hiding this comment.
logic: Critical issue: find.up is synchronous but the original findUp was async. This could block the webpack loader thread and cause performance issues.
| const mockContext: any = { | ||
| ...liveContext, | ||
| findUp: async ([name]: string[]) => name, | ||
| empathic: { any: ([name]: string[]) => name }, |
There was a problem hiding this comment.
logic: Mock uses any method but real usage throughout tests uses up method - verify API consistency
| empathic: { any: ([name]: string[]) => name }, | |
| empathic: { up: ([name]: string[]) => name }, |
| vi.mocked(find.up).mockImplementation((name) => | ||
| name === ('.svn' as any) ? '/path/to/root' : undefined | ||
| ); |
There was a problem hiding this comment.
style: Type casting to any should be removed since empathic API likely accepts string directly
| vi.mocked(find.up).mockImplementation((name) => | |
| name === ('.svn' as any) ? '/path/to/root' : undefined | |
| ); | |
| vi.mocked(find.up).mockImplementation((name) => | |
| name === '.svn' ? '/path/to/root' : undefined | |
| ); |
| vi.mocked(find.up).mockImplementation((name) => | ||
| name === ('.yarn' as any) ? '/path/to/root' : undefined | ||
| ); |
There was a problem hiding this comment.
style: Type casting to any should be removed since empathic API likely accepts string directly
| vi.mocked(find.up).mockImplementation((name) => | |
| name === ('.yarn' as any) ? '/path/to/root' : undefined | |
| ); | |
| vi.mocked(find.up).mockImplementation((name) => | |
| name === '.yarn' ? '/path/to/root' : undefined | |
| ); |
| import type { StoryId, StoryIndex, StoryIndexEntry } from 'storybook/internal/types'; | ||
|
|
||
| import { findUp } from 'find-up'; | ||
| import * as find from 'empathic/find'; |
There was a problem hiding this comment.
logic: This import should use find-up instead of empathic/find since PR #32470 reverted the empathic changes. The current import will cause runtime errors.
| import * as find from 'empathic/find'; | |
| import { findUp } from 'find-up'; |
| const vitestWorkspaceConfig = find.any( | ||
| [ | ||
| ...VITEST_WORKSPACE_FILE_EXTENSION.map((ext) => `vitest.workspace.${ext}`), | ||
| ...VITEST_CONFIG_FILE_EXTENSIONS.map((ext) => `vitest.config.${ext}`), | ||
| ], | ||
| { stopAt: getProjectRoot() } | ||
| { last: getProjectRoot() } | ||
| ); |
There was a problem hiding this comment.
logic: This API usage is incorrect - should use findUp() with stopAt parameter instead of find.any() with last parameter to match the reverted state.
| const vitestWorkspaceConfig = find.any( | |
| [ | |
| ...VITEST_WORKSPACE_FILE_EXTENSION.map((ext) => `vitest.workspace.${ext}`), | |
| ...VITEST_CONFIG_FILE_EXTENSIONS.map((ext) => `vitest.config.${ext}`), | |
| ], | |
| { stopAt: getProjectRoot() } | |
| { last: getProjectRoot() } | |
| ); | |
| const vitestWorkspaceConfig = await findUp( | |
| [ | |
| ...VITEST_WORKSPACE_FILE_EXTENSION.map((ext) => `vitest.workspace.${ext}`), | |
| ...VITEST_CONFIG_FILE_EXTENSIONS.map((ext) => `vitest.config.${ext}`), | |
| ], | |
| { stopAt: getProjectRoot() } | |
| ); |
| const docTSConfig = find.up('tsconfig.doc.json', { | ||
| cwd: options.configDir, | ||
| stopAt: getProjectRoot(), | ||
| last: getProjectRoot(), | ||
| }); |
There was a problem hiding this comment.
style: Parameter name changed from stopAt to last - verify this provides equivalent functionality for finding tsconfig.doc.json
| } | ||
|
|
||
| const foundGitIgnoreFile = await findUp('.gitignore'); | ||
| const foundGitIgnoreFile = find.up('.gitignore'); |
There was a problem hiding this comment.
logic: API mismatch: find.up('.gitignore') is likely synchronous but original findUp was async. This could cause runtime errors if empathic returns a Promise that's being used as a string.
| const foundGitIgnoreFile = find.up('.gitignore'); | |
| const foundGitIgnoreFile = await find.up('.gitignore'); |
This is an automated pull request that bumps the version from
10.0.0-beta.2to10.0.0-beta.3.Once this pull request is merged, it will trigger a new release of version
10.0.0-beta.3.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:empathicoverfind-up#32472devwhen it should fixed #32457empathicoverfind-up#31338ts-expect-errorin preview #32442mllytoexsolve#32383create-storybook#32344 (will also be patched)satisfies x as ysyntax #32169 (will also be patched)fs-extrawith native APIs #32296empathicoverfind-up" #32470If 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.0.0-beta.3
create-storybook- #32344, thanks shilman!devwhen it should fixed - #32457, thanks ndelangen!satisfies x as ysyntax - #32169, thanks diagramatics!mllytoexsolve- #32383, thanks mrginglymus!fs-extrawith native APIs - #32296, thanks y-hsgw!ts-expect-errorin preview - #32442, thanks mrginglymus!empathicoverfind-up- #31338, thanks beeequeue!empathicoverfind-up- #32472, thanks ndelangen!Greptile Summary
Updated On: 2025-09-16 11:28:35 UTC
This PR represents the automated version bump from Storybook 10.0.0-beta.2 to 10.0.0-beta.3, incorporating 21 changes across bug fixes, new features, dependency updates, and build improvements. The most significant changes include:
Key Changes:
find-up,find-cache-dir,resolve-from,fd-package-json) to the consolidatedempathicpackage (v2.0.0) for improved performance and reduced bundle sizedevwhen it should #32457)satisfies x as ypatterns (CSF: Supportsatisfies x as ysyntax #32169) and preservedts-expect-errorcomments in React preview (React: Preserve@ts-expect-errorin preview #32442)fs-extrawith native Node.js APIs (Modernize: Replacefs-extrawith native APIs #32296) and switched frommllytoexsolve(Core: Switch frommllytoexsolve#32383)The empathic migration touches 40+ files across the codebase, updating imports and API calls throughout core utilities, framework integrations, CLI tools, and builders. The changes maintain functional equivalence while consolidating file system operations under a single, more efficient package.
Confidence score: 4/5