Skip to content

fix: read the exported version from package.json - #15

Merged
NikolaiKushner merged 1 commit into
mainfrom
fix/version-export
Aug 2, 2026
Merged

fix: read the exported version from package.json#15
NikolaiKushner merged 1 commit into
mainfrom
fix/version-export

Conversation

@NikolaiKushner

@NikolaiKushner NikolaiKushner commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Both packages exported a hand-written version literal that a test pinned against the manifest. Changesets bumps the manifest and nothing updated the literal, so the first release failed its own test — and had it passed, a 0.1.0 package would have reported 0.0.0 to anyone who asked.

Reading it from package.json makes drift impossible by construction. Rollup tree-shakes the import to the single string: dist/package.js is 114 bytes and the bundle sizes are unchanged.

The test stays. It no longer catches drift, but it catches the import breaking, which would leave the export undefined while the manifest keeps its version.

Both packages exported a hand-written `version` literal that a test pinned
against the manifest. Changesets bumps the manifest and nothing updated the
literal, so the first release failed its own test — and had it passed, a
0.1.0 package would have reported 0.0.0 to anyone who asked.

Reading it from package.json makes drift impossible by construction. Rollup
tree-shakes the import to the single string: dist/package.js is 114 bytes and
the bundle sizes are unchanged.

The test stays. It no longer catches drift, but it catches the import
breaking, which would leave the export undefined while the manifest keeps
its version.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013soegYUZNQL5hURYURypVw
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rowkit-docs Ready Ready Preview Aug 2, 2026 10:21am
rowkit-storybook Ready Ready Preview Aug 2, 2026 10:21am

@NikolaiKushner
NikolaiKushner merged commit 677df88 into main Aug 2, 2026
4 checks passed
@NikolaiKushner
NikolaiKushner deleted the fix/version-export branch August 2, 2026 10:25
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