Skip to content

refactor!: stop exporting the drizzle tables from the package entry - #26

Open
TheGreatAxios wants to merge 4 commits into
cl-9092-artifacts-fix-readme-passing-createartifactdb-result-tofrom
cl-9065-artifacts-stop-exporting-drizzle-tables-from-the-barrel
Open

TheGreatAxios wants to merge 4 commits into
cl-9092-artifacts-fix-readme-passing-createartifactdb-result-tofrom
cl-9065-artifacts-stop-exporting-drizzle-tables-from-the-barrel

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The package entry no longer exports the drizzle tables (artifact, artifactVersion, upload, mailAttachmentRef). ARTIFACTS_SCHEMA and the *Row types are still exported. This is a breaking change and is recorded under Breaking in the CHANGELOG.
  • @intx/agent is an optional peer (peerDependenciesMeta). Only ./sidecar-bundle imports it, and the root entry's JS and .d.ts do not reference it.
  • arktype is a ^2.2.3 dependency, not a peer. The reference host drops its unused arktype pin. hono-openapi is still a caret peer with a 1.2.0 dev pin.
  • scripts/check-deps.ts, pretest and test:package are removed, along with the CI step that ran the script. test runs bun test src with nothing chained in front of it. The @workbench/* rule is still in CONTRIBUTING.
  • The embedded @corbits/artifacts snapshot in examples/reference-host/bun.lock is left as on main (CL-9332); test: add a real-Postgres harness for end-to-end suites in tests/ #29 removes that lockfile.
  • Stacked on docs(readme): rewrite around what an artifact is and how to boot it #25.

Verification

  • bun install --frozen-lockfile, bun run typecheck: clean
  • bun run test:coverage against Postgres 16: 344 pass, 0 fail, coverage floor met
  • bun run build, then reference-host acceptance: 42 pass, 0 fail
  • npm pack installed into a fresh Node 24 ESM project: mountArtifacts and runArtifactMigrations import, and the table exports are absent

Closes CL-9065
Closes CL-9071
Closes CL-9073
Closes CL-9076

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all four commits. The only change to the root entry is the table exports, and internal code still imports the tables from ./schema.js. @intx/agent appears only in src/sidecar-bundle.ts and its dist output. arktype resolves to 2.2.5, with the nested 2.1.29 copies deduped out of the root lock. No references to check-deps, pretest or test:package remain. The CHANGELOG records the breaking export removal and both dependency changes. No blocking findings.

The tables are internal to the package's queries; hosts reach artifacts
through the routes and functions instead. ARTIFACTS_SCHEMA stays public
so a host can see which Postgres schema the package owns.
Only the ./sidecar-bundle entry imports it, so hosts that mount the
routes alone no longer have to install the agent runtime.
Corbits packages treat arktype as internal validation, so hosts should
not have to install it. The exported query schemas stay arktype types;
a host on another arktype version gets its own copy alongside.
hono-openapi stays a peer because its route descriptions merge into the
host's OpenAPI document.
The @workbench/* grep ran before every test run and in CI to catch an
import nobody writes; the rule stays in CONTRIBUTING. test:package was
only an alias of test.
@TheGreatAxios
TheGreatAxios force-pushed the cl-9065-artifacts-stop-exporting-drizzle-tables-from-the-barrel branch from 7b44feb to 98045dc Compare September 26, 2026 01:29
@TheGreatAxios TheGreatAxios changed the title Tighten the package surface and dependencies refactor!: stop exporting the drizzle tables from the package entry Sep 26, 2026
@TheGreatAxios
TheGreatAxios added this pull request to stack #32 September 26, 2026 01:57
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