Files
2026-05-27 23:29:53 +01:00

1.4 KiB

Tasks: testing-integration-build-fix

1. Build config

  • 1.1 Add src/setup/global-setup.ts as a second lib.entry in packages/dev/testing-integration/vite.config.ts (already present — confirm entryFileNames: "[name].js").
  • 1.2 Replace new URL("../setup/global-setup.js", import.meta.url).pathname in src/internal/create-integration-setup-internal.ts with a Vite-safe equivalent (Option A: path.join(fileURLToPath(import.meta.url), "..", "..", "setup", "global-setup.js")).
  • 1.3 Verify dist/internal/create-integration-setup-internal.js no longer contains data: URLs after build.

2. Regression test

  • 2.1 Add tests/dist-asserts.test.ts: build, then load dist/index.js, call createIntegrationSetup({ x: stubFixture }), assert existsSync(globalSetup) === true.
  • 2.2 Wire it into the test script (it must exercise the built output, so the test runs after build).

3. Downstream sweep

  • 3.1 Confirm testing-integration-redis|-postgres|-mailpit|-typesense|-surrealdb|-garage-s3|-step-ca have no broken consumers (currently none).
  • 3.2 Migrate packages/storage/storage-s3/tests/integration/setup.ts from the hand-rolled TestEnvironment driver back to createIntegrationSetup.

4. Verify

  • 4.1 bunx turbo lint typecheck test --filter=@suaveplan/testing-integration green.
  • 4.2 bun scripts/openspec-conformance.ts @suaveplan/testing-integration PASS.