Skip to content

fix: derive Trolley-Source header from package.json version#72

Open
barnett wants to merge 6 commits into
masterfrom
agent/dynamic-js-version-header-45d4
Open

fix: derive Trolley-Source header from package.json version#72
barnett wants to merge 6 commits into
masterfrom
agent/dynamic-js-version-header-45d4

Conversation

@barnett

@barnett barnett commented Jun 7, 2026

Copy link
Copy Markdown
Member

Summary

The SDK was sending a hardcoded Trolley-Source header (javascript-sdk_1.1.0) even though package.json is at 1.2.0. This PR reads the version from package.json at runtime so the header stays in sync with releases.

Changes

SDK

  • lib/Client.ts: Replace hardcoded CURRENT_CLIENT_VERSION = "1.1.0" with require("../package.json").version
  • Trolley-Source header is now built as javascript-sdk_${packageVersion} automatically on each release

Tests

  • Add unit test in test/unit/releasePrepSpec.ts that asserts outgoing requests include the correct Trolley-Source header matching package.json

CI (Codecov)

  • Bump Codecov orb from 5.0.35.4.3
  • Install Codecov CLI via PyPI before upload and point the orb at the installed binary

cursoragent and others added 6 commits June 7, 2026 04:43
Co-authored-by: barnett <barnett@trolley.com>
Co-authored-by: barnett <barnett@trolley.com>
Co-authored-by: barnett <barnett@trolley.com>
Co-authored-by: barnett <barnett@trolley.com>
Co-authored-by: barnett <barnett@trolley.com>
Co-authored-by: barnett <barnett@trolley.com>
@barnett barnett requested a review from heyflowmo June 7, 2026 05:45
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