3.6 KiB
3.6 KiB
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.
- 1.1
packages/dev/testing-integration-mailpit/vite.config.ts - 1.2
packages/dev/testing-integration-postgres/vite.config.ts - 1.3
packages/dev/testing-integration-redis/vite.config.ts - 1.4
packages/dev/testing-integration-step-ca/vite.config.ts - 1.5
packages/dev/testing-integration-surrealdb/vite.config.ts - 1.6
packages/dev/testing-integration-typesense/vite.config.ts - 1.7 Run
bunx turbo build --filter=@suaveplan/testing-integration-*and verifydist/index.jsis present in all six.
2. Repo-level resolve smoke test
- 2.1 Create
scripts/check-fixture-resolves.ts— for each of the seventesting-integration-*package names, dynamic-import()the package; collect failures; exit non-zero if any failed; print a summary table. - 2.2 Add the script invocation to the root
package.jsonas"check:fixture-resolves": "bun scripts/check-fixture-resolves.ts". - 2.3 Add a
check:fixture-resolvestask toturbo.jsonwithdependsOn: ["^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.
- 3.1
bunx turbo test:coverage --filter=@suaveplan/testing-integration-mailpit - 3.2
bunx turbo test:coverage --filter=@suaveplan/testing-integration-postgres - 3.3
bunx turbo test:coverage --filter=@suaveplan/testing-integration-redis - 3.4
bunx turbo test:coverage --filter=@suaveplan/testing-integration-step-ca - 3.5
bunx turbo test:coverage --filter=@suaveplan/testing-integration-surrealdb - 3.6
bunx turbo test:coverage --filter=@suaveplan/testing-integration-typesense
4. Cross-package resolve from a real consumer
- 4.1 In
packages/database/surrealdb(already wired with thesurrealdb-integration-testsscaffolding), runbunx turbo typecheck --filter=@suaveplan/surrealdb— must stay green. - 4.2 In
packages/database/surrealdb, attemptbun run test:integrationwith docker down. The expectation here is NOT a green pass; it is that the runner reaches the global-setup phase rather than failing onFailed to resolve entry for package. (Subsequent skip-when-unavailable behaviour is owned by the surrealdb-integration-tests change, not this one.)
5. CI integration
- 5.1 Add
bun run check:fixture-resolvesas an early step in CI, before any integration suite invocation. Failure exits the job with a clear message naming the offending package.
6. Documentation
- 6.1 Add a short paragraph to
docker/README.md(orpackages/dev/testing-integration/README.md) noting that adding a newtesting-integration-<service>package requiresoutput.entryFileNames: "[name].js"in its vite.config.ts. Cross-reference the resolve check.
7. OpenSpec gate
- 7.1 Run
openspec validate testing-integration-vite-entry-fix --strict; resolve any errors. - 7.2 On ship: fold each MODIFIED Requirements delta into
openspec/specs/testing-integration-<name>/spec.md, fold the newtesting-integration-resolve-checkspec intoopenspec/specs/testing-integration-resolve-check/spec.md, and move the change folder toopenspec/archive/<yyyy-mm-dd>-testing-integration-vite-entry-fix/.