Repository navigation
fix(integration-tests): build the published @prisma/orm-* packages before typechecking the CLI journeys - #30418
Conversation
…egration-tests typecheck test/integration/tsconfig.json typechecks test/cli-journeys/**, but the journeys import @prisma/orm-postgres, @prisma/orm-mongo and @prisma/orm-extension-pgvector, which only the nested cli-journeys manifest declares. Turbo builds task edges from each package's own manifest, so integration-tests#typecheck never waited for those builds and a cold parallel `pnpm typecheck:packages` could read a dist mid-rewrite and fail with TS2307. integration-tests now declares cli-journeys as a workspace devDependency. Turbo creates a no-op cli-journeys#build node whose dependencies are the published packages' builds, which orders them before the typecheck. The two manifests keep their separate dependency shapes. The format journey also imported @prisma/orm-family-sql, which no manifest declared and which resolved only through hoisting. cli-journeys now declares it. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: prisma/orm/.coderabbit.yml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe integration workspace adds ChangesCLI journey typecheck setup
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The dependency ordering covers the journey packages before integration typechecking; no actionable merge-blocking risk remains. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
@prisma/orm-extension-arktype-json
@prisma/orm-extension-middleware-cache
@prisma/orm-extension-paradedb
@prisma/orm-extension-pgvector
@prisma/orm-extension-postgis
@prisma/orm-extension-supabase
@prisma/orm-family-mongo
@prisma/orm-family-sql
@prisma/orm-framework
@prisma/orm-mongo
@prisma/orm-postgres
@prisma/orm-sqlite
@prisma/orm-target-mongo
@prisma/orm-target-postgres
@prisma/orm-target-sqlite
@prisma/orm-toolchain
commit: |
size-limit report 📦
|
Main's squash of #30405 duplicates the slice 5 head this branch already merged, so its conflicts resolve to this branch's side. The merge brings in only #30418 and #30435 (integration-test package scripts, journey teardown timeout, and their lockfile entries). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: willbot <[email protected]> Signed-off-by: Will Madden <[email protected]>
At a glance
Turbo's task graph for the
integration-teststypecheck, before and after, frompnpm turbo run typecheck --filter=integration-tests --dry=json:A cold parallel
pnpm typecheck:packages --forcewith the published packages'distfolders deleted failed before this PR with 18 errors like:The same run passes twice in a row after this PR.
What this PR changes
test/integration/package.jsondeclarescli-journeysas a workspace devDependency.test/integration/test/cli-journeys/package.jsondeclares@prisma/orm-family-sql, which the format journey already imported.Why the typecheck raced the builds
test/integrationis theintegration-testspackage. Itstsconfig.jsonincludestest/**/*, so itstypechecktask also typecheckstest/cli-journeys/. Those journey files import the published packages a user's project installs:@prisma/orm-postgres,@prisma/orm-mongoand@prisma/orm-extension-pgvector.Those packages are declared in a separate manifest,
test/integration/test/cli-journeys/package.json(package namecli-journeys), not intest/integration/package.json. The split is deliberate: the journeys depend on the published packages, while the rest oftest/integrationdepends on the internal workspace packages it tests directly.Turbo derives task ordering from each package's own manifest.
typecheckdepends on^build, the builds of the package's declared dependencies. Sinceintegration-testsdid not declare the published packages, Turbo never ordered their builds beforeintegration-tests#typecheck. In a parallel run TypeScript could read@prisma/orm-postgres/distwhile tsdown was rewriting it and report the declaration files as missing. Rerunning, running serially, or running the package alone all passed, which is why it looked like a flake.The fix
integration-testsnow declarescli-journeysas a workspace devDependency.cli-journeyshas nobuildscript, but Turbo still creates acli-journeys#buildnode for it with no command, and that node depends on the builds of the packagescli-journeysdeclares.integration-tests#typechecktherefore waits for the published packages' builds through that node. The dependency is real: the typecheck ofintegration-testsreally does need the journeys' dependencies, and this states it in the manifest instead of in a Turbo override. Thecli-journeysmanifest description records why the dependency exists.The format journey also imported
@prisma/orm-family-sql, which no manifest declared. It resolved only because pnpm hoists it as a transitive dependency of@prisma/orm-postgres.cli-journeysnow declares it, so it gets the same build ordering.Tests
No test files change. Verification was done by hand:
pnpm turbo run typecheck --filter=integration-tests --dry=jsonshowscli-journeys#buildwith the four@prisma/orm-*builds as its dependencies.distfolders deleted,pnpm typecheck:packages --forcefailed on the base commit and passed twice after the change.pnpm lint:depspasses.Alternatives considered
test/integration/package.json. Undoes the manifest split described above.cli-journeysits own tsconfig andtypecheckscript. The journeys import shared helpers fromtest/integration/test/utils/, which pull in a dozen@internal/*packages.cli-journeyswould have to declare all of them, which contradicts the reason its manifest exists.🤖 Generated with Claude Code
Summary by CodeRabbit