Release: Minor 10.3.0#34196
Merged
Merged
Conversation
Consolidate the two separate vitest setups (code/ and scripts/) into a single root-level vitest workspace config. This allows running all tests with a single `yarn test` from the repo root. Changes: - Add root vitest.config.ts that includes all projects from code/ and scripts/ - Remove code/vitest.config.ts (replaced by root config) - Add explicit configDir to storybook vitest plugin (needed for root context) - Update package.json scripts to run vitest from root - Merge NX test targets into a single target on the code project - Add ignoreSourceErrors to pseudo-states typecheck config
- Replace redundant scripts/**/* input with vitest.config.ts (root config was missing from NX cache inputs; scripts already covered by sharedGlobals) - Restore storybook:vitest scripts to reference yarn test:watch/test instead of duplicating the full command
The CI jobs previously ran `yarn test` from `code/` working directory, passing test file paths relative to `code/`. After the vitest root migration, `yarn test` changes CWD to root, so file paths and output paths need to be relative to root. - Remove `working_directory: 'code'` from test jobs - Prefix glob patterns with `code/` (and add `scripts/` for unit tests) - Update test result persist paths from `code/test-results` to `test-results`
- Upgrade vitest and @vitest/* packages to ^4.1.0 - Add vite resolution to pin ^7.0.4 (vitest 4.1.0 pulls in vite 8.0.0 which breaks JSX transforms) - Update EXISTING_RESOLUTIONS for ecosystem-ci Note: test-manager.test.ts has 14 new failures due to vitest 4.1.0's module mocking changes (#9774: manual mocks no longer load/transform original modules). This test mocks vitest/node internals and needs a separate fix.
Vitest 4.1.0 changed module mocking behavior: importOriginal() in manual mocks no longer loads/transforms original modules (#9774). Remove the importOriginal() spread since the test only needs the createVitest mock — no other exports from vitest/node are used at runtime.
- Remove ignoreSourceErrors from pseudo-states vitest config - Use yarn test in code/project.json NX target - Replace __dirname with import.meta.dirname in vitest.config.storybook.ts - Move vite from resolutions to devDependencies - Fix BrowserCommands type augmentation for vitest 4.1.0 compatibility
The addon had vitest ^4.0.14 while root had ^4.1.0, causing two separate copies with distinct BrowserCommands interfaces. Bump addon devDeps to ^4.1.0 and use the docs-recommended `declare module 'vitest/browser'` augmentation path.
Vitest now runs from root, so these were just delegating with `cd ..`. Updated storybook:vitest and ci-tests to call vitest directly, and updated AGENTS.md to reflect root-level commands.
Vitest runs from root, so these scripts belong there too.
Remove await-serve-storybooks, build, changelog, changelog:next, danger, github-release, and i scripts that are not referenced in any CI config or workflow.
This reverts commit e9cc2d3.
- eslint-plugin: derive rootDir from process.cwd() instead of hardcoding 'code' - react-docgen: mock process.cwd() to renderer directory so tsconfig resolution works from any vitest root
Build: Move vitest to repo root and upgrade to 4.1.0
Contributor
Author
|
View your CI Pipeline Execution ↗ for commit 4ea51ad
☁️ Nx Cloud last updated this comment at |
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.3.0-beta.3to10.3.0.Once this pull request is merged, it will trigger a new release of version
10.3.0.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: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.3.0