Publish TypeScript SDK
This guide documents the exact maintainer flow for the TypeScript SDK line:
@authx-rs/sdk@authx-rs/sdk-web@authx-rs/sdk-react@authx-rs/sdk-vue
The repository now uses a two-stage process:
- Changesets creates a version PR for the JavaScript packages.
- A release tag triggers the existing release workflow, which publishes the npm packages.
Prerequisites
Section titled “Prerequisites”Before the first publish, confirm:
- the npm organization/package names are available
NPM_TOKENis configured in GitHub repository secrets- the release workflow on
mainhas permission to publish with provenance - package metadata is correct in each
packages/authx-sdk-*/package.json
Day-to-day release flow
Section titled “Day-to-day release flow”1. Create a changeset
Section titled “1. Create a changeset”From the repository root:
npm installnpx changesetChoose the four TypeScript packages when the public SDK line changes. They are linked and should version together.
Commit the generated file in .changeset/.
2. Merge the version PR
Section titled “2. Merge the version PR”The JS Versioning GitHub workflow opens or updates a PR on main that:
- bumps package versions
- updates internal dependency ranges
- prepares the package metadata for release
Merge that PR once CI is green.
3. Verify release readiness on main
Section titled “3. Verify release readiness on main”Optional local verification:
cd packages/authx-sdk-ts && npm run pack:checkcd ../authx-sdk-web && npm run pack:checkcd ../authx-sdk-react && npm run pack:checkcd ../authx-sdk-vue && npm run pack:checkcd ../../docs && npm run build4. Create the release tag
Section titled “4. Create the release tag”Use the shared linked package version from the merged version PR:
git checkout maingit pull --ff-onlygit tag v0.1.0git push origin v0.1.0Replace 0.1.0 with the version prepared by Changesets.
5. Watch the release workflow
Section titled “5. Watch the release workflow”Release now does all of the following:
- runs the Rust release gates
- runs JS package tests and
npm pack --dry-run - verifies generated TypeScript API docs
- publishes each npm package if that exact version is not already on npm
- publishes the Rust crates
- creates the GitHub release
First npm publish checklist
Section titled “First npm publish checklist”For the first publish specifically:
- Confirm the four package names on npm.
- Confirm
publishConfig.accessispublicfor scoped packages. - Confirm
repository,homepage, andbugsfields point at this repo. - Confirm
npm view @authx-rs/sdk versionand the other three names do not already contain the target version. - Merge the Changesets version PR.
- Push the matching
vX.Y.Ztag. - Confirm the workflow publishes:
@authx-rs/sdk@authx-rs/sdk-web@authx-rs/sdk-react@authx-rs/sdk-vue
- The docs API reference is generated from emitted
.d.tsfiles viascripts/generate-ts-api-docs.mjs. docs/package.jsonruns that generator as part ofnpm run build.- The npm release remains tag-driven on purpose so JS package publication stays aligned with the repo-wide release event.