Files
suaveplan/openspec/archive/2026-05-02-testing-integration-vite-entry-fix/tasks.md
2026-05-27 23:29:53 +01:00

49 lines
3.6 KiB
Markdown

# Tasks — testing-integration-vite-entry-fix
## 1. Patch the six broken vite configs
For each package, add `output.entryFileNames: "[name].js"` to `build.rollupOptions.output`. The block already contains `preserveModules: true` and `preserveModulesRoot: "src"`; only the new line is added. Then rebuild and verify `dist/index.js` exists.
- [x] 1.1 `packages/dev/testing-integration-mailpit/vite.config.ts`
- [x] 1.2 `packages/dev/testing-integration-postgres/vite.config.ts`
- [x] 1.3 `packages/dev/testing-integration-redis/vite.config.ts`
- [x] 1.4 `packages/dev/testing-integration-step-ca/vite.config.ts`
- [x] 1.5 `packages/dev/testing-integration-surrealdb/vite.config.ts`
- [x] 1.6 `packages/dev/testing-integration-typesense/vite.config.ts`
- [x] 1.7 Run `bunx turbo build --filter=@suaveplan/testing-integration-*` and verify `dist/index.js` is present in all six.
## 2. Repo-level resolve smoke test
- [x] 2.1 Create `scripts/check-fixture-resolves.ts` — for each of the seven `testing-integration-*` package names, dynamic-`import()` the package; collect failures; exit non-zero if any failed; print a summary table.
- [x] 2.2 Add the script invocation to the root `package.json` as `"check:fixture-resolves": "bun scripts/check-fixture-resolves.ts"`.
- [x] 2.3 Add a `check:fixture-resolves` task to `turbo.json` with `dependsOn: ["^build"]`, `cache: false`, `outputs: []`.
## 3. Verify each fixture's own unit suite still passes
Coverage and behavioural tests of the fixtures themselves rely on relative imports inside `src/` and should be unaffected. Re-run them as a regression check.
- [x] 3.1 `bunx turbo test:coverage --filter=@suaveplan/testing-integration-mailpit`
- [x] 3.2 `bunx turbo test:coverage --filter=@suaveplan/testing-integration-postgres`
- [x] 3.3 `bunx turbo test:coverage --filter=@suaveplan/testing-integration-redis`
- [x] 3.4 `bunx turbo test:coverage --filter=@suaveplan/testing-integration-step-ca`
- [x] 3.5 `bunx turbo test:coverage --filter=@suaveplan/testing-integration-surrealdb`
- [x] 3.6 `bunx turbo test:coverage --filter=@suaveplan/testing-integration-typesense`
## 4. Cross-package resolve from a real consumer
- [x] 4.1 In `packages/database/surrealdb` (already wired with the `surrealdb-integration-tests` scaffolding), run `bunx turbo typecheck --filter=@suaveplan/surrealdb` — must stay green.
- [x] 4.2 In `packages/database/surrealdb`, attempt `bun run test:integration` with docker down. The expectation here is NOT a green pass; it is that the runner reaches the global-setup phase rather than failing on `Failed to resolve entry for package`. (Subsequent skip-when-unavailable behaviour is owned by the surrealdb-integration-tests change, not this one.)
## 5. CI integration
- [x] 5.1 Add `bun run check:fixture-resolves` as an early step in CI, before any integration suite invocation. Failure exits the job with a clear message naming the offending package.
## 6. Documentation
- [x] 6.1 Add a short paragraph to `docker/README.md` (or `packages/dev/testing-integration/README.md`) noting that adding a new `testing-integration-<service>` package requires `output.entryFileNames: "[name].js"` in its vite.config.ts. Cross-reference the resolve check.
## 7. OpenSpec gate
- [x] 7.1 Run `openspec validate testing-integration-vite-entry-fix --strict`; resolve any errors.
- [x] 7.2 On ship: fold each MODIFIED Requirements delta into `openspec/specs/testing-integration-<name>/spec.md`, fold the new `testing-integration-resolve-check` spec into `openspec/specs/testing-integration-resolve-check/spec.md`, and move the change folder to `openspec/archive/<yyyy-mm-dd>-testing-integration-vite-entry-fix/`.