chore: upgrade vitest and @vitest/ui to 4.1.2#16154
Merged
GermanJablo merged 3 commits intomainfrom Apr 7, 2026
Merged
Conversation
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖 |
paulpopus
previously approved these changes
Apr 7, 2026
Bump from 4.0.15 to 4.1.2. No breaking changes. Unlocks native test tags support (--tags-filter) for future use.
Vitest 4.1 changed how relative alias paths are resolved. Use path.resolve to produce an absolute path.
Vitest 4.1's new module runner loads inlined and external modules in separate contexts, causing duplicate graphql instances and failing instanceof checks. The previous alias `node_modules/graphql/index.js` no longer works because pnpm doesn't hoist graphql to root node_modules. Fix: use createRequire to locate graphql from packages/graphql (where it is a direct dependency), then set regex-based aliases that handle both the main import and subpath imports (e.g. graphql/execution/values.js), pointing all to the CJS entry to ensure a single module identity.
ce92145 to
fc1345f
Compare
paulpopus
approved these changes
Apr 7, 2026
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.
Summary
vitestfrom 4.0.15 to 4.1.2 (root + test/)@vitest/uifrom 4.0.15 to 4.1.2 (root)graphqlmodule alias invitest.config.tsfor compatibility with Vitest 4.1's new module runnergraphql alias fix
Vitest 4.1 replaced the default SSR environment runner with a new Vite module runner that loads "inlined" modules in its own context and "external" modules via Node's native import. This caused the
graphqlpackage to be loaded twice (two separate module instances), breaking allinstanceofchecks (e.g.isScalarType,new GraphQLList).The previous alias (
graphql: 'node_modules/graphql/index.js') also no longer worked because pnpm's isolated linker doesn't hoistgraphqlto rootnode_modules/.Fix: use
createRequireto resolve the actualgraphqllocation frompackages/graphql/(where it's a direct dependency), then use regex-based aliases to handle both the main import and subpath imports (e.g.graphql/execution/values.js), pointing the main import to the CJS entry (index.js) to ensure a single module identity.This unlocks native test tags support (
--tags-filterCLI) which will be used in a follow-up PR to tag tests by feature category (GIS, transactions, migrations, etc.).Test plan
auth,collections-graphql,collections-rest,fields,databasesuites all pass