Skip to content

Auto ts client versioning from git tag on publish#1195

Merged
jealous merged 1 commit into
MemMachine:mainfrom
yaleMemVerge:mem-ts-client
Mar 6, 2026
Merged

Auto ts client versioning from git tag on publish#1195
jealous merged 1 commit into
MemMachine:mainfrom
yaleMemVerge:mem-ts-client

Conversation

@yaleMemVerge

Copy link
Copy Markdown
Contributor

Purpose of the change

Fix TypeScript client failing to publish to npm on release because the version was hardcoded in package.json. Now the version is automatically derived from the git release tag, consistent with how Python packages work via setuptools-scm.

Description

  • package.json / package-lock.json: version set to 0.0.0-development as a placeholder; CI always overrides it at publish time.
  • ts-client-publish.yml: added a step to inject version from the git tag (GITHUB_REF_NAME) before npm publish. Also added workflow_dispatch trigger for manual testing after merge.

Fixes/Closes

Fixes #1184

Type of change

  • Project Maintenance (updates to build scripts, CI, etc., that do not affect the main project)

How Has This Been Tested?

  • Manual verification (list step-by-step instructions)

Triggered manually via Actions → Publish TypeScript Client Package to npm → Run workflow, with a test version input (e.g. 0.3.0). Confirmed version was correctly set and the build and publish steps completed successfully.

Test Results: To be verified after merge via workflow_dispatch.

Checklist

  • I have signed the commit(s) within this pull request
  • My code follows the style guidelines of this project (See STYLE_GUIDE.md)
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Confirmed all checks passed
  • Contributor has signed the commit(s)
  • Reviewed the code
  • Run, Tested, and Verified the change(s) work as expected

Screenshots/Gifs

N/A

Signed-off-by: yaleMemVerge <yale.sun@memverge.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the TypeScript client npm publish failure (issue #1184) by replacing the hardcoded version in package.json with a 0.0.0-development placeholder and adding a CI step to automatically derive the version from the git release tag at publish time, consistent with how the Python packages already work via setuptools-scm.

Changes:

  • Set package.json and package-lock.json version to 0.0.0-development as a CI-overridden placeholder.
  • Added a workflow step in ts-client-publish.yml to inject the version from the git tag (GITHUB_REF_NAME) for release events, or from a manual input for workflow_dispatch events.
  • Added workflow_dispatch trigger with a version input to enable manual testing of the publish workflow.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
packages/ts-client/package.json Version changed from 0.2.5 to 0.0.0-development placeholder
packages/ts-client/package-lock.json Version updated to match the placeholder in package.json
.github/workflows/ts-client-publish.yml Added workflow_dispatch trigger and version-setting step that derives version from git tag or manual input
Files not reviewed (1)
  • packages/ts-client/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sscargal sscargal requested review from jealous and sscargal March 5, 2026 19:58
sscargal

This comment was marked as outdated.

@sscargal sscargal mentioned this pull request Mar 5, 2026
22 tasks

@sscargal sscargal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@jealous jealous merged commit 27b5704 into MemMachine:main Mar 6, 2026
48 of 49 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.

[Bug]: Typescript Client Package should use the Release tag version

4 participants