Skip to content

fix: derive observability-cloud SDK_VERSION from package.json at build time - #1070

Open
abhithesys wants to merge 2 commits into
abhishek/release-mgmt-2-changesetsfrom
abhishek/release-mgmt-3-sdk-version
Open

fix: derive observability-cloud SDK_VERSION from package.json at build time#1070
abhithesys wants to merge 2 commits into
abhishek/release-mgmt-2-changesetsfrom
abhishek/release-mgmt-3-sdk-version

Conversation

@abhithesys

Copy link
Copy Markdown
Contributor

The hardcoded SDK_VERSION = "0.0.1" in src/core/wire.ts had drifted from the manifest (0.0.2), failing the package's own version-match test on main — and once release automation bumps versions on every train, a hardcoded constant would re-break after every release.

  • wire.ts now uses an injected __SDK_VERSION__; tsdown.config.ts defines it from package.json at build time.
  • New vitest.config.ts mirrors the define so tests importing from src resolve it.
  • The existing test stays as the guard: it verifies the define wiring delivers the manifest version. 47/47 tests pass (previously 46+1 failing); dist verified to contain the real version with no unreplaced token.
  • Includes a patch changeset (wire envelopes previously reported 0.0.1 regardless of release), which changeset status confirms joins the release train.

Depends on the changesets PR only for the .changeset/ config the changeset file needs.

…d time

The hardcoded constant had already drifted (0.0.1 vs manifest 0.0.2), failing
the package's own version-match test — and changesets-automated bumps would
re-break it on every release. tsdown now injects the manifest version via
define, with vitest.config.ts mirroring it for tests; the existing test stays
as the guard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
openui-docs Ready Ready Preview Aug 25, 2026 11:11am

Request Review

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