1.5 KiB
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-surrealdbcompletes - THEN
packages/dev/testing-integration-surrealdb/dist/index.jsexists 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
SurrealDBFixtureis a callable class
Verified by: scripts/check-fixture-resolves.ts (this change), regression coverage in any consumer integration suite (e.g. surrealdb-integration-tests).