From 6e4e325bb34d67ededad6f8b219286b2d4792df4 Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Mon, 13 Jul 2026 00:13:05 +0200 Subject: [PATCH] test(generators): strip new compliance-core deps in optional-package e2e MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The core-package audit/consent/dsr reconstruction e2e tests remove the target package and strip its references so pnpm install succeeds in the simulated post-removal tree. The ported compliance wiring adds new references the strip lists missed — core-cms now depends on core-audit (audit-logs collection + erasure hook), and web-next depends on core-consent + core-dsr (tRPC compliance context) — so strip those too. The generated snapshots are unchanged. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK --- turbo/generators/__tests__/core-package-audit.e2e.test.ts | 7 +++++-- .../generators/__tests__/core-package-consent.e2e.test.ts | 2 ++ turbo/generators/__tests__/core-package-dsr.e2e.test.ts | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/turbo/generators/__tests__/core-package-audit.e2e.test.ts b/turbo/generators/__tests__/core-package-audit.e2e.test.ts index 18af1b1..a3f12a1 100644 --- a/turbo/generators/__tests__/core-package-audit.e2e.test.ts +++ b/turbo/generators/__tests__/core-package-audit.e2e.test.ts @@ -61,9 +61,12 @@ describe("e2e: core-package audit", () => { !src.includes("packages/core-audit"), }); - // Strip @repo/core-audit from apps/web-next/package.json so pnpm install - // succeeds without the package being present (simulating the post-removal state). + // Strip @repo/core-audit from every package that references it so pnpm + // install succeeds without the package present (simulating the + // post-removal state). core-cms wires the audit-logs collection + erasure + // hook, so it depends on core-audit too. stripCoreAuditDep(join(tmp, "apps", "web-next", "package.json")); + stripCoreAuditDep(join(tmp, "packages", "core-cms", "package.json")); execSync(`cd ${tmp} && pnpm install --frozen-lockfile=false`, { stdio: "ignore", diff --git a/turbo/generators/__tests__/core-package-consent.e2e.test.ts b/turbo/generators/__tests__/core-package-consent.e2e.test.ts index cb51790..5eee946 100644 --- a/turbo/generators/__tests__/core-package-consent.e2e.test.ts +++ b/turbo/generators/__tests__/core-package-consent.e2e.test.ts @@ -65,6 +65,8 @@ describe("e2e: core-package consent", () => { // succeeds without the package being present (simulating the post-removal state). stripCoreConsentDep(join(tmp, "packages", "core-api", "package.json")); stripCoreConsentDep(join(tmp, "packages", "core-ui", "package.json")); + // web-next threads the consent factory into the tRPC context. + stripCoreConsentDep(join(tmp, "apps", "web-next", "package.json")); execSync(`cd ${tmp} && pnpm install --frozen-lockfile=false`, { stdio: "ignore", diff --git a/turbo/generators/__tests__/core-package-dsr.e2e.test.ts b/turbo/generators/__tests__/core-package-dsr.e2e.test.ts index 75084c4..6e187b6 100644 --- a/turbo/generators/__tests__/core-package-dsr.e2e.test.ts +++ b/turbo/generators/__tests__/core-package-dsr.e2e.test.ts @@ -64,6 +64,8 @@ describe("e2e: core-package dsr", () => { // Strip @repo/core-dsr from package.json files so pnpm install // succeeds without the package being present (simulating the post-removal state). stripCoreDsrDep(join(tmp, "packages", "core-api", "package.json")); + // web-next threads the DSR binding into the tRPC context. + stripCoreDsrDep(join(tmp, "apps", "web-next", "package.json")); execSync(`cd ${tmp} && pnpm install --frozen-lockfile=false`, { stdio: "ignore",