fix(ci): ship src/data/*.json in published tarball#148
Merged
Conversation
PR #128 split the release into separate build/publish jobs; the build job's upload-artifact step omitted src/, so src/data/*.json was absent on disk when the publish job ran pnpm publish. npm silently drops files entries that don't exist, leaving the ./data/* exports dead in 0.2.5+. Add src/data/ to the artifact path so the keyword JSON files reach the publish job. Add a vitest guard that runs npm pack and asserts every src/-based exports target is in the tarball, so this can't recur silently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Fixes the release workflow so src/data/*.json files referenced by package.json exports are actually present in the published npm tarball, restoring the ./data/* consumer exports that regressed after the release workflow was split in #128. Adds a Vitest regression test that validates the packed tarball includes every src/-based export target.
Changes:
- Include
src/data/in the build job’s uploaded artifact so the publish job has those files on disk at publish time. - Add
src/__tests__/package-exports.test.tsto runnpm pack --dry-run --jsonand assert everysrc/export target is present in the tarball.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/__tests__/package-exports.test.ts |
Adds a packaging regression test to ensure src/-based exports targets are included in the npm tarball. |
.github/workflows/release.yml |
Uploads src/data/ as part of the build artifact so publish has the JSON keyword files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mscolnick
approved these changes
Jun 8, 2026
Light2Dark
commented
Jun 8, 2026
Comment on lines
+30
to
+31
| // not the source tree. Regression guard for the `./data/*` exports that | ||
| // shipped dead in 0.2.5–0.2.7 because `src/data/` was missing at publish time. |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| // not the source tree. Regression guard for the `./data/*` exports that | |
| // shipped dead in 0.2.5–0.2.7 because `src/data/` was missing at publish time. | |
| // not the source tree. |
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.
Since v0.2.5 the published npm tarball has been missing
src/data/common-keywords.jsonandsrc/data/duckdb-keywords.json, leaving the./data/*exports dead (404 / unresolved module for consumers). PR #128 split the release into separatebuild/publishjobs, but the build job'supload-artifactstep omittedsrc/, so those files weren't on disk when the publish job ranpnpm publish— and npm silently dropsfilesentries that don't exist. This addssrc/data/to the artifact path so the keyword JSON files reach the publish job. It also adds a vitest guard (src/__tests__/package-exports.test.ts) that runsnpm packand asserts everysrc/-basedexportstarget is present in the tarball, so the regression can't recur silently.Verified:
npm pack --dry-runnow lists both JSON files; the new test passes against the current package and fails ifsrc/data/*.jsonis dropped fromfiles.🤖 Generated with Claude Code