Initial Commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Capability Spec Delta: testing-integration-mailpit (testing-integration-vite-entry-fix)
|
||||
|
||||
**Package**: `@suaveplan/testing-integration-mailpit`
|
||||
**Status**: PROPOSED
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Main entry resolves for cross-package consumers
|
||||
|
||||
After `bun run build`, the file `dist/index.js` MUST exist at the path declared by `package.json`'s `exports."." → import.default`. A consumer importing `@suaveplan/testing-integration-mailpit` from any other workspace package MUST receive a working module without `Failed to resolve entry for package` errors. Enforced by `output.entryFileNames: "[name].js"` in `vite.config.ts`'s `build.rollupOptions.output` block.
|
||||
|
||||
#### Scenario: dist/index.js is present after build
|
||||
|
||||
- **WHEN** `bunx turbo build --filter=@suaveplan/testing-integration-mailpit` completes
|
||||
- **THEN** `packages/dev/testing-integration-mailpit/dist/index.js` exists on disk
|
||||
|
||||
#### Scenario: external consumer can import the package
|
||||
|
||||
- **WHEN** a sibling workspace package imports from `@suaveplan/testing-integration-mailpit`
|
||||
- **THEN** the import resolves and the public exports are callable
|
||||
|
||||
**Verified by:** `scripts/check-fixture-resolves.ts` (this change).
|
||||
@@ -0,0 +1,22 @@
|
||||
# Capability Spec Delta: testing-integration-postgres (testing-integration-vite-entry-fix)
|
||||
|
||||
**Package**: `@suaveplan/testing-integration-postgres`
|
||||
**Status**: PROPOSED
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Main entry resolves for cross-package consumers
|
||||
|
||||
After `bun run build`, the file `dist/index.js` MUST exist at the path declared by `package.json`'s `exports."." → import.default`. A consumer importing `@suaveplan/testing-integration-postgres` from any other workspace package MUST receive a working module without `Failed to resolve entry for package` errors. Enforced by `output.entryFileNames: "[name].js"` in `vite.config.ts`'s `build.rollupOptions.output` block.
|
||||
|
||||
#### Scenario: dist/index.js is present after build
|
||||
|
||||
- **WHEN** `bunx turbo build --filter=@suaveplan/testing-integration-postgres` completes
|
||||
- **THEN** `packages/dev/testing-integration-postgres/dist/index.js` exists on disk
|
||||
|
||||
#### Scenario: external consumer can import the package
|
||||
|
||||
- **WHEN** a sibling workspace package imports from `@suaveplan/testing-integration-postgres`
|
||||
- **THEN** the import resolves and the public exports are callable
|
||||
|
||||
**Verified by:** `scripts/check-fixture-resolves.ts` (this change).
|
||||
@@ -0,0 +1,22 @@
|
||||
# Capability Spec Delta: testing-integration-redis (testing-integration-vite-entry-fix)
|
||||
|
||||
**Package**: `@suaveplan/testing-integration-redis`
|
||||
**Status**: PROPOSED
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Main entry resolves for cross-package consumers
|
||||
|
||||
After `bun run build`, the file `dist/index.js` MUST exist at the path declared by `package.json`'s `exports."." → import.default`. A consumer importing `@suaveplan/testing-integration-redis` from any other workspace package MUST receive a working module without `Failed to resolve entry for package` errors. Enforced by `output.entryFileNames: "[name].js"` in `vite.config.ts`'s `build.rollupOptions.output` block.
|
||||
|
||||
#### Scenario: dist/index.js is present after build
|
||||
|
||||
- **WHEN** `bunx turbo build --filter=@suaveplan/testing-integration-redis` completes
|
||||
- **THEN** `packages/dev/testing-integration-redis/dist/index.js` exists on disk
|
||||
|
||||
#### Scenario: external consumer can import the package
|
||||
|
||||
- **WHEN** a sibling workspace package imports from `@suaveplan/testing-integration-redis`
|
||||
- **THEN** the import resolves and the public exports are callable
|
||||
|
||||
**Verified by:** `scripts/check-fixture-resolves.ts` (this change).
|
||||
@@ -0,0 +1,48 @@
|
||||
# Capability Spec Delta: testing-integration-resolve-check (testing-integration-vite-entry-fix)
|
||||
|
||||
**Capability**: `testing-integration-resolve-check`
|
||||
**Status**: PROPOSED
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Repo-level resolve check exists
|
||||
|
||||
The repository SHALL ship a script at `scripts/check-fixture-resolves.ts` that, when executed, performs a programmatic dynamic `import()` for every `@suaveplan/testing-integration-*` package by its public name and asserts each import succeeds. The script MUST exit with code 0 when all imports succeed and a non-zero code with a clear per-package error message otherwise.
|
||||
|
||||
#### Scenario: passes when every fixture resolves
|
||||
|
||||
- **WHEN** `bun scripts/check-fixture-resolves.ts` runs after a clean repo build
|
||||
- **THEN** the process prints a PASS row for each of the seven packages and exits with code 0
|
||||
|
||||
#### Scenario: fails with a clear per-package error
|
||||
|
||||
- **WHEN** any `testing-integration-*` package's `dist/index.js` is missing or unreachable
|
||||
- **THEN** the process prints `FAIL: @suaveplan/testing-integration-<name> — <error>` and exits with non-zero code
|
||||
|
||||
**Verified by:** `scripts/check-fixture-resolves.ts` itself; runtime execution in CI gate.
|
||||
|
||||
---
|
||||
|
||||
### Requirement: Turbo task wires the check into the dependency graph
|
||||
|
||||
`turbo.json` SHALL declare a `check:fixture-resolves` task that depends on `^build` and is invoked by `bun run check:fixture-resolves` at the repo root.
|
||||
|
||||
#### Scenario: turbo runs the check after dependent builds
|
||||
|
||||
- **WHEN** `bunx turbo check:fixture-resolves` runs
|
||||
- **THEN** turbo first executes `build` for every `testing-integration-*` package and then invokes the script
|
||||
|
||||
**Verified by:** `turbo.json`, `package.json` (root) script entry.
|
||||
|
||||
---
|
||||
|
||||
### Requirement: CI gate runs the check before any integration suite
|
||||
|
||||
CI SHALL invoke `bun run check:fixture-resolves` before any consumer integration suite (`bunx turbo test:integration --filter=*`). Failure of the resolve check MUST short-circuit the job before docker-compose is brought up — the bug is structural and a successful container would not change the outcome.
|
||||
|
||||
#### Scenario: integration job aborts when fixtures are unresolvable
|
||||
|
||||
- **WHEN** the resolve check fails in CI
|
||||
- **THEN** the job exits before any `docker compose up` step runs and the failure log names the offending package
|
||||
|
||||
**Verified by:** the CI workflow file added in this change.
|
||||
@@ -0,0 +1,22 @@
|
||||
# Capability Spec Delta: testing-integration-step-ca (testing-integration-vite-entry-fix)
|
||||
|
||||
**Package**: `@suaveplan/testing-integration-step-ca`
|
||||
**Status**: PROPOSED
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Main entry resolves for cross-package consumers
|
||||
|
||||
After `bun run build`, the file `dist/index.js` MUST exist at the path declared by `package.json`'s `exports."." → import.default`. A consumer importing `@suaveplan/testing-integration-step-ca` from any other workspace package MUST receive a working module without `Failed to resolve entry for package` errors. Enforced by `output.entryFileNames: "[name].js"` in `vite.config.ts`'s `build.rollupOptions.output` block.
|
||||
|
||||
#### Scenario: dist/index.js is present after build
|
||||
|
||||
- **WHEN** `bunx turbo build --filter=@suaveplan/testing-integration-step-ca` completes
|
||||
- **THEN** `packages/dev/testing-integration-step-ca/dist/index.js` exists on disk
|
||||
|
||||
#### Scenario: external consumer can import the package
|
||||
|
||||
- **WHEN** a sibling workspace package imports from `@suaveplan/testing-integration-step-ca`
|
||||
- **THEN** the import resolves and the public exports are callable
|
||||
|
||||
**Verified by:** `scripts/check-fixture-resolves.ts` (this change).
|
||||
@@ -0,0 +1,24 @@
|
||||
# Capability Spec Delta: testing-integration-surrealdb (testing-integration-vite-entry-fix)
|
||||
|
||||
**Package**: `@suaveplan/testing-integration-surrealdb`
|
||||
**Status**: PROPOSED
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Main entry resolves for cross-package consumers
|
||||
|
||||
After `bun run build`, the file `dist/index.js` MUST exist at the path declared by `package.json`'s `exports."." → import.default`. A consumer importing `@suaveplan/testing-integration-surrealdb` from any other workspace package MUST receive a working module without `Failed to resolve entry for package` errors from esbuild, vite, or Bun.
|
||||
|
||||
This is enforced by setting `output.entryFileNames: "[name].js"` in `vite.config.ts`'s `build.rollupOptions.output` block. Without that line, Vite's lib mode derives the entry filename from the package name and `dist/index.js` is never written.
|
||||
|
||||
#### Scenario: dist/index.js is present after build
|
||||
|
||||
- **WHEN** `bunx turbo build --filter=@suaveplan/testing-integration-surrealdb` completes
|
||||
- **THEN** `packages/dev/testing-integration-surrealdb/dist/index.js` exists on disk
|
||||
|
||||
#### Scenario: external consumer can import the package
|
||||
|
||||
- **WHEN** a sibling workspace package contains `import { SurrealDBFixture } from "@suaveplan/testing-integration-surrealdb"`
|
||||
- **THEN** vite/esbuild/Bun resolve the import and `SurrealDBFixture` is a callable class
|
||||
|
||||
**Verified by:** `scripts/check-fixture-resolves.ts` (this change), regression coverage in any consumer integration suite (e.g. `surrealdb-integration-tests`).
|
||||
@@ -0,0 +1,22 @@
|
||||
# Capability Spec Delta: testing-integration-typesense (testing-integration-vite-entry-fix)
|
||||
|
||||
**Package**: `@suaveplan/testing-integration-typesense`
|
||||
**Status**: PROPOSED
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Main entry resolves for cross-package consumers
|
||||
|
||||
After `bun run build`, the file `dist/index.js` MUST exist at the path declared by `package.json`'s `exports."." → import.default`. A consumer importing `@suaveplan/testing-integration-typesense` from any other workspace package MUST receive a working module without `Failed to resolve entry for package` errors. Enforced by `output.entryFileNames: "[name].js"` in `vite.config.ts`'s `build.rollupOptions.output` block.
|
||||
|
||||
#### Scenario: dist/index.js is present after build
|
||||
|
||||
- **WHEN** `bunx turbo build --filter=@suaveplan/testing-integration-typesense` completes
|
||||
- **THEN** `packages/dev/testing-integration-typesense/dist/index.js` exists on disk
|
||||
|
||||
#### Scenario: external consumer can import the package
|
||||
|
||||
- **WHEN** a sibling workspace package imports from `@suaveplan/testing-integration-typesense`
|
||||
- **THEN** the import resolves and the public exports are callable
|
||||
|
||||
**Verified by:** `scripts/check-fixture-resolves.ts` (this change).
|
||||
Reference in New Issue
Block a user