Auto ts client versioning from git tag on publish by yaleMemVerge · Pull Request #1195 · MemMachine/MemMachine

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