Skip to content

[@corbits/memory] publish-prep: dist build + .ts specifiers - #50

Merged
TheGreatAxios merged 4 commits into
mainfrom
cl-8952-corbitsmemory-publish-prep-dist-build-ts-specifiers
Sep 25, 2026
Merged

TheGreatAxios merged 4 commits into
mainfrom
cl-8952-corbitsmemory-publish-prep-dist-build-ts-specifiers

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

Publish-prep for @corbits/memory: emit a dist/ build and normalize module specifiers so the packed tarball resolves under Node.

  • src/** (plus scripts/): explicit .ts specifiers (incl. mock.module and dynamic import()) normalized to .js suffixes; no logic changes. tsc/bundler/NodeNext/Bun all resolve .js->.ts.
  • New tsconfig.build.json (NodeNext, declarations + sourcemaps, tests excluded) with build/prepack scripts.
  • All 5 exports (., ./migrations, ./config, ./sidecar-bundle, ./distiller) -> intx-src/types/default triples (intx convention).
  • files -> ["dist","migrations","README.md","LICENSE"]; dropped stale module: src/index.ts (src no longer ships).
  • One runtime-compat line: src/migrations.ts uses import.meta.dirname instead of Bun-only import.meta.dir (identical under Bun; fixes Node import-time crash). SQL migrations untouched.

Verification

  • bun run typecheck (tsc --noEmit): exit 0
  • bun run build (tsc -p tsconfig.build.json): exit 0
  • npm pack: 279 files, dist/ + migrations/ + README.md + LICENSE, zero src/ entries
  • Executing Node (v24.4.1) import of the packed-tarball layout: all 5 subpaths import and expose expected exports (createMemory, runMemoryMigrations, loadMemoryConfig, sidecar bundle, createResidentDistiller)
  • bun test ./src: 457 pass, 0 fail

Fixes CL-8952

Drop intx-src conditions from all 5 exports subpaths (types+default
only), add top-level main/types pointing at dist, and disable
declarationMap/sourceMap in tsconfig.build.json (NodeNext kept).

Also annotate src/log.ts logger with ReturnType<typeof getLogger>:
the unannotated inference is not portable under declaration emit
(TS2742), which broke bun run build on this branch.
@TheGreatAxios
TheGreatAxios merged commit d025087 into main Sep 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant