Skip to content

fix(core): keep DASHCOMMERCE_VERSION in sync with package.json - #35

Merged
cavewebs merged 1 commit into
mainfrom
cursor/sync-dashcommerce-version-efa2
Oct 6, 2026
Merged

cavewebs merged 1 commit into
mainfrom
cursor/sync-dashcommerce-version-efa2

Conversation

@cavewebs

@cavewebs cavewebs commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

After Version Packages (#27), @dashcommerce/core is 0.2.1 in package.json but DASHCOMMERCE_VERSION in packages/core/src/index.ts was still "0.2.0". That fails packages/core/test/version-constant.test.ts on main.

Changesets only bumps package.json. The hardcoded constant did not move with it.

Fix

Source DASHCOMMERCE_VERSION from package.json (import pkg from "../package.json"). tsdown inlines version into dist/index.js at build time, so the published descriptor matches the package and future Version Packages PRs cannot drift.

The existing version-constant CI step remains as the backstop.

No changeset, no publish, no EmDash peer / PaymentProvider / advisory changes.

Test

  • bun test packages/core/test/version-constant.test.ts — pass (0.2.1)
  • Simulated package.json bump to 9.9.9 — test still passed without touching the constant
  • bun run --cwd packages/core test — 123 pass
  • bun run typecheck — pass
Open in Web Open in Cursor 

Changesets version PRs bump package.json but left the hardcoded
plugin descriptor constant behind, so the version-constant CI check
failed on main after #27 (0.2.1 vs 0.2.0).

Import the version from package.json so tsdown inlines it at build
time and future Version Packages bumps cannot drift.

Co-authored-by: Timchosen Uzua <timchosen@gmail.com>
@cavewebs
cavewebs marked this pull request as ready for review October 6, 2026 11:29
@cavewebs
cavewebs merged commit edf8d42 into main Oct 6, 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.

2 participants