test(generators): strip new compliance-core deps in optional-package e2e

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
2026-07-13 06:23:14 +02:00
parent 9b8c5f7416
commit 3d52f2de85
3 changed files with 9 additions and 2 deletions

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",