Skip to content

docs: design for publishing @pod-network/trade-sdk to npm - #257

Closed
poszu wants to merge 1 commit into
mainfrom
spec-publish-ts-sdk
Closed

docs: design for publishing @pod-network/trade-sdk to npm#257
poszu wants to merge 1 commit into
mainfrom
spec-publish-ts-sdk

Conversation

@poszu

@poszu poszu commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Design doc only — no code, no workflow, nothing published. Opened as the review surface for the plan before any of it is built.

Records the four decisions taken: public npm under @pod-network; publish driven by a ts-sdk-v* tag so TypeScript releases stay decoupled from the shared v* tag that release.yml already uses to zip all three SDKs; first version 0.1.0; and npm link for cross-repo iteration.

Why this is worth doing rather than leaving the commit pin in place: file:../pod-sdk/ts-sdk carries no version, and the frontend's workflow checked pod-sdk out with no ref, so a build compiled against whatever the default branch happened to be. That is how the IOC fix reached the deployed app with no frontend commit — and the same mechanism would have delivered a regression just as silently.

Details the doc pins down that aren't obvious:

  • ts-sdk/dist is gitignored, so it must be built in the job; a prepublishOnly script also stops a laptop publish shipping a stale or missing dist/
  • Scoped packages default to restricted, so publishConfig.access: public is required or the first publish fails or lands private
  • npm publish applies latest even to a prerelease, so the job passes --tag rc for hyphenated versions, keeping latest for real releases
  • The frontend switchover is a forced follow-up, not part of this — it cannot depend on ^0.1.0 until 0.1.0 exists on npm
  • No CI anywhere currently touches the TypeScript (test.yml/lint.yml/format.yml are Rust and Solidity only), so a ts-sdk job gets added to test.yml and doubles as the release gate

Prerequisites that need a human: the @pod-network npm org must exist with an owner holding 2FA, and a granular publish token stored as the NPM_TOKEN secret.

Explicitly out of scope: publishing rust-sdk/types/solidity-sdk, pod's stale submodule pointer, changelog automation, and adding a test runner to ts-sdk.

Records the decisions: public npm under @Pod-Network, publish driven by a
ts-sdk-scoped tag so TS releases stay decoupled from the shared v* release that
zips all three SDKs, first version 0.1.0, and npm link for cross-repo iteration.

Also covers the two guards the workflow needs (tag/manifest agreement, and
building the gitignored dist), prerelease dist-tag handling, the frontend
switchover as a forced follow-up once 0.1.0 exists, and closing the gap that no
CI anywhere currently touches the TypeScript.
@poszu poszu closed this Jul 30, 2026
@poszu
poszu deleted the spec-publish-ts-sdk branch July 30, 2026 07:23
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