All acceptance criteria verified: - npm run build produces correct ESM + CJS + declarations - npm run lint (tsc --noEmit) passes - package.json exports map correct for index and event-target-redis - tsup.config.ts lists all entry points - src/index.ts barrel re-exports all modules - Peer deps (ioredis optional) correct - No runtime dependencies
2.9 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level |
|---|---|---|---|---|---|---|---|
| build-and-exports-validation | Validate build, package.json exports, and tsup config for all adapters | completed | narrow | low | component | implementation |
Description
Verify that the build pipeline correctly produces dual ESM + CJS output with declarations for all entry points, and that package.json exports map and tsup.config.ts entries are consistent.
Currently only src/index.ts and src/event-target-redis.ts are entry points. As new adapters are added, each needs:
- An entry in
tsup.config.tsentry array - A sub-path export in
package.jsonexports map (ESM + CJS + declarations) - A barrel re-export in
src/index.ts
This task validates the current setup and serves as a checklist item for each adapter task. It can be done early and re-verified as adapters are added.
Acceptance Criteria
npm run buildproduces correct output for existing entry points (index, event-target-redis)npm run lint(tsc --noEmit) passespackage.jsonexports map has correct ESM/CJS/dts paths for each entry pointtsup.config.tslists all current entry pointssrc/index.tsre-exports everything from all modules- Peer dependencies and peerDependenciesMeta are correct
- No runtime dependencies (Repeater is inlined)
References
- docs/architecture/build-distribution.md
- package.json
- tsup.config.ts
Notes
Validated all acceptance criteria. No changes were needed — the existing configuration is correct.
Validation Results
-
npm run buildproduces correct output ✅src/index.ts→dist/index.js(ESM),dist/index.cjs(CJS),dist/index.d.ts+dist/index.d.cts(declarations)src/event-target-redis.ts→dist/event-target-redis.js(ESM),dist/event-target-redis.cjs(CJS),dist/event-target-redis.d.ts+dist/event-target-redis.d.cts(declarations)- Code splitting enabled: shared chunk between entries
- Verified both ESM dynamic import and CJS require work for both entry points
-
npm run lint(tsc --noEmit) passes ✅ -
package.jsonexports map has correct ESM/CJS/dts paths ✅ -
tsup.config.tslists all current entry points ✅ -
src/index.tsre-exports everything from all modules ✅ -
Peer dependencies and peerDependenciesMeta are correct ✅
-
No runtime dependencies ✅
Verified type resolution
- Sub-path and barrel imports resolve correctly with tsc
- Works with both skipLibCheck true and false
Verified package contents
npm pack --dry-runshows 19 files (all dist files + package.json)
Summary
Validated build pipeline, package.json exports map, and tsup config for all adapters. All acceptance criteria pass with no changes required.
- Created: none
- Modified: tasks/016-build-and-exports-validation.md (status update only)
- Tests: 0 (no test files exist yet)