From d8a3250c12e442992adaef638c0e8a60f3e25334 Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Wed, 3 Jun 2026 13:27:53 +0200 Subject: [PATCH] test(generators): strip core-trpc dep from feature packages in e2e The core-package trpc removal e2e was only stripping @repo/core-trpc from the two app package.json files. blog, marketing-pages, and navigation also depend on core-trpc for their ./ui hooks, so pnpm install in the simulated post-removal state failed to resolve the workspace dep. Strip the dep from every package that references it. --- .../__tests__/core-package-trpc.e2e.test.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/turbo/generators/__tests__/core-package-trpc.e2e.test.ts b/turbo/generators/__tests__/core-package-trpc.e2e.test.ts index 183dd6d..257481b 100644 --- a/turbo/generators/__tests__/core-package-trpc.e2e.test.ts +++ b/turbo/generators/__tests__/core-package-trpc.e2e.test.ts @@ -61,10 +61,19 @@ describe("e2e: core-package trpc", () => { !src.includes("packages/core-trpc"), }); - // Strip @repo/core-trpc from app package.json files so pnpm install - // succeeds without the package being present (simulating the post-removal state). - stripCoreTrpcDep(join(tmp, "apps", "web-next", "package.json")); - stripCoreTrpcDep(join(tmp, "apps", "web-tanstack", "package.json")); + // Strip @repo/core-trpc from every package that references it so pnpm + // install succeeds without the package being present (simulating the + // post-removal state). Apps list it directly; the blog, marketing-pages, + // and navigation features depend on it for their ./ui tRPC hooks. + for (const pkgDir of [ + ["apps", "web-next"], + ["apps", "web-tanstack"], + ["packages", "blog"], + ["packages", "marketing-pages"], + ["packages", "navigation"], + ]) { + stripCoreTrpcDep(join(tmp, ...pkgDir, "package.json")); + } execSync(`cd ${tmp} && pnpm install --frozen-lockfile=false`, { stdio: "ignore",