Skip to content

Commit 5af591c

Browse files
authored
chore: upgrade vitest and @vitest/ui to 4.1.2 (#16154)
## Summary - Bump `vitest` from 4.0.15 to 4.1.2 (root + test/) - Bump `@vitest/ui` from 4.0.15 to 4.1.2 (root) - Fix `graphql` module alias in `vitest.config.ts` for compatibility with Vitest 4.1's new module runner ### graphql 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 `graphql` package to be loaded twice (two separate module instances), breaking all `instanceof` checks (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 hoist `graphql` to root `node_modules/`. Fix: use `createRequire` to resolve the actual `graphql` location from `packages/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-filter` CLI) which will be used in a follow-up PR to tag tests by feature category (GIS, transactions, migrations, etc.). ## Test plan - [ ] CI passes (all existing integration tests should continue to work unchanged) - Verified locally: `auth`, `collections-graphql`, `collections-rest`, `fields`, `database` suites all pass --------- Co-authored-by: German Jablonski <GermanJablo@users.noreply.github.com>
1 parent b13c5c9 commit 5af591c

4 files changed

Lines changed: 1804 additions & 1968 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
"@types/react": "19.2.9",
198198
"@types/react-dom": "19.2.3",
199199
"@types/shelljs": "0.8.15",
200-
"@vitest/ui": "4.0.15",
200+
"@vitest/ui": "4.1.2",
201201
"ai": "6.0.95",
202202
"axe-core": "4.11.0",
203203
"chalk": "^4.1.2",
@@ -240,7 +240,7 @@
240240
"tsx": "4.21.0",
241241
"turbo": "^2.5.4",
242242
"typescript": "5.7.3",
243-
"vitest": "4.0.15",
243+
"vitest": "4.1.2",
244244
"wrangler": "~4.61.1",
245245
"zod": "4.3.6"
246246
},

0 commit comments

Comments
 (0)