fix: ship @chkit/clickhouse/e2e-testkit from dist, not unshipped src#146
Merged
Merged
Conversation
#28 — the `/e2e-testkit` subpath export pointed at `./src/e2e-testkit.ts` under both conditions, but `files: ["dist"]` excludes src, so importing `@chkit/clickhouse/e2e-testkit` from the published package was a hard module-not-found. Build it to dist (drop the tsconfig exclude) and point the export at dist, keeping a `source` condition for in-repo type resolution. #27 (codegen hard-pinning @chkit/core) was already resolved upstream: codegen now declares `@chkit/core: workspace:*`. #42 (dropping the `source` export condition) was investigated and dropped: the repo relies on `source` so `tsc` can type-check sibling packages from source without a build (the `typecheck` task depends on `^typecheck`, not `^build`), and a plugin-backfill test asserts its presence. Removing it broke CI. Correctly handling #42 needs publish-time stripping — deferred. Verified: typecheck passes with no dist present (CI's condition); full build/lint/test green; e2e-testkit resolves to dist under Node and Bun. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c3584b0 to
dccbacb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the broken
@chkit/clickhouse/e2e-testkitpublished export (#28). Scoped down from the original three-finding PR after CI surfaced that one of them was load-bearing.@chkit/clickhouse/e2e-testkitexported./src/e2e-testkit.tsunder both conditions, butsrcis excluded from the published tarball (files: ["dist"]) — a hard module-not-found from the published package. Built it todist(dropped the tsconfig exclude) and pointed the export atdist, keeping asourcecondition for in-repo type resolution.bun publishand remove workspace version resolution #27 — already resolved upstream;@chkit/codegennow declares@chkit/core: workspace:*. No change.sourceexport condition) — investigated and deferred. The repo relies onsourcesotsccan type-check sibling packages from source without a build (typecheckdepends on^typecheck, not^build), and a plugin-backfill test asserts its presence. Removing it broke CI. Doing fix: resolve all fixable lint warnings #42 correctly requires strippingsourceat publish time — a separate change.Test plan
bun run typecheckwith alldist/wiped (CI's exact condition) — passes viasourceresolution.turbo run build lint testgreen; plugin-backfill exports test passes.@chkit/clickhouse/e2e-testkitresolves todist/e2e-testkit.jsunder Node (require.resolve) and Bun.patchchangeset for@chkit/clickhouse.🤖 Generated with Claude Code