Repository navigation
chore: vitest 4 - #29032
chore: vitest 4#29032dulmandakh wants to merge 4 commits into
Conversation
WalkthroughRoot-level package manager and dependency upgrades: Changes
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (1)📚 Learning: 2026-01-05T16:15:18.374ZApplied to files:
🔇 Additional comments (2)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 44: Upgrading the "@size-limit/file" entry to 12.0.0 introduces breaking
changes; update CI and dev environments to Node 20+ (update Dockerfiles/CI
matrix), if you use a TypeScript size-limit config (.size-limit.ts) add "jiti"
as a devDependency, audit any watcher code that relied on chokidar to ensure
compatibility with fs.watch-based behavior, and run integration tests that
exercise size-limit with your current esbuild and open plugins to validate and
bump those plugin versions if needed before committing the "@size-limit/file":
"12.0.0" change.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (12)
package.jsonpackages/client-generator-js/package.jsonpackages/client-generator-registry/package.jsonpackages/client-generator-ts/package.jsonpackages/config/package.jsonpackages/credentials-store/package.jsonpackages/dmmf/package.jsonpackages/engines/package.jsonpackages/generator/package.jsonpackages/get-platform/package.jsonpackages/internals/package.jsonpackages/query-plan-executor/package.json
💤 Files with no reviewable changes (3)
- packages/query-plan-executor/package.json
- packages/client-generator-registry/package.json
- packages/dmmf/package.json
🔇 Additional comments (9)
packages/config/package.json (1)
20-29: LGTM - vitest hoisted to workspace root.Removing
vitestfrom this package's devDependencies is correct since it's now defined at the workspace root. The"test": "vitest run"script on line 29 will resolve vitest from the rootnode_modulesin pnpm workspaces.packages/client-generator-ts/package.json (1)
45-52: LGTM - vitest hoisted to workspace root.The removal is consistent with the monorepo-wide consolidation. The test script on line 52 will continue to work via pnpm workspace resolution.
packages/client-generator-js/package.json (1)
44-51: LGTM - consistent with monorepo vitest hoisting.packages/get-platform/package.json (1)
16-40: LGTM - vitest was unused in this package.This package uses Jest for testing (line 40:
"test": "jest"), as evidenced by the Jest-related dependencies (jest,@swc/jest,@types/jest,jest-junit). Removing the unusedvitestdevDependency is a cleanup.package.json (2)
55-55: Vitest 4 is a major upgrade with breaking changes."Vitest 4 has a few breaking changes that could affect you, so we advise reviewing the detailed Migration Guide before upgrading." Key changes include:
vi.fn().getMockName()now returnsvi.fn()by default instead ofspy. This can affect snapshots with mocks.vi.restoreAllMocks()no longer resets or restores mocks created withvi.fn()or automocks; it only restores mocks created withvi.spyOn().- Reporter APIs
onCollected,onSpecsCollected,onPathsCollected,onTaskUpdateandonFinishedwere removed.- Node 18 support was dropped. (Not an issue here since the project requires Node 20+.)
Please ensure tests pass and any affected configurations are updated accordingly.
Also applies to: 100-100
10-10: LGTM - pnpm patch version upgrade.The pnpm upgrade from 10.15.1 to 10.28.0 is a minor/patch version bump within the allowed range (
>=10.15 <11per line 8).packages/credentials-store/package.json (1)
29-36: LGTM - vitest hoisting pattern consistent with other packages.The removal of
vitestfrom devDependencies while retaining the test script reference is consistent with the workspace-level vitest configuration pattern seen across this PR.packages/engines/package.json (1)
14-31: LGTM - consistent with vitest hoisting pattern.The removal of
vitestfrom devDependencies aligns with the PR's approach of centralizing vitest at the workspace root level. The test script on line 31 will resolve vitest from the root.packages/generator/package.json (1)
26-34: The vitest hoisting pattern is properly configured at the workspace root.The
vitestdevDependency removal frompackages/generator/package.jsonis intentional. Vitest 4.0.17 is available at the workspace root and is hoisted to all packages, including this one, allowing the test script on line 33 to work correctly. This pattern is consistent across 29 packages in the monorepo.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 165: The dependency spec for "hono" currently uses an open-ended range
">=4.11.4" which can pull in future major versions; update the package.json
entry for the "hono" dependency to a bounded semver range such as "^4.11.4" (or
"~4.11.4" if you want patch-only) to ensure deterministic installs, i.e.,
replace the string ">=4.11.4" with the chosen bounded range in the dependencies
block.
In `@packages/cli/package.json`:
- Line 146: The devDependency "hono" currently uses an open-ended range
">=4.11.4" which can pull in future major versions; change the version specifier
for "hono" in package.json from ">=4.11.4" to a bounded semver range such as
"^4.11.4" (or a specific pinned version) to ensure deterministic installs and
avoid accidental breaking upgrades.
♻️ Duplicate comments (1)
package.json (1)
44-44: Re-verify size-limit v12 migration steps.At Line 44 and Line 91, size-limit v12 is a major bump; confirm any v12 breaking changes are addressed (e.g., optional
jitifor TS configs, watcher behavior changes).Also applies to: 91-91
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
package.jsonpackages/cli/package.json
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-12T16:26:09.447Z
Learnt from: igalklebanov
Repo: prisma/prisma PR: 28914
File: packages/cli/package.json:119-120
Timestamp: 2025-12-12T16:26:09.447Z
Learning: In packages/cli/package.json, verify that the build/bundling process includes devDependencies used at runtime and that you do not need to relocate them to dependencies. If the bundler includes runtime-used devDependencies, ensure the dependencies section only contains packages that are truly runtime, and document any exceptions. This guidance applies when reviewing changes to this package and its packaging setup to avoid unnecessary dependency moves and to maintain correct runtime packaging.
Applied to files:
packages/cli/package.json
🔇 Additional comments (2)
package.json (2)
10-10: Confirm pnpm 10.28.0 is enforced in CI/dev.At Line 10, the packageManager bump can cause install/lockfile drift if CI or dev machines don’t use Corepack or a pinned pnpm version. Please verify the toolchain is updated accordingly and that the lockfile (if present) was regenerated with pnpm 10.28.0.
55-55: Validate Vitest v4 upgrade against configs/plugins.At Line 55 and Line 100, Vitest v4 is a major upgrade—please re-run the test suite and verify
vitest.config.*options, reporters, and coverage provider integration still match v4 expectations.Also applies to: 100-100
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
|
@aqrln please approve the workflows |
|
closing in favor of #29142 |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.