Publish your packages
Publish generated packages to npm, PyPI, and as a Go module under your own name. The packages are yours. typeship maintains them; you own the registry.
Publishing the generated packages under your organization is supported and expected. It is your code: readable source, zero runtime dependencies, and nothing that depends on typeship at runtime. typeship's job is to keep the packages current through pull requests. Releasing them is your normal release process.
Every generated package carries a header comment and README credit naming typeship as the generator, on every plan.
Set the names first
typeship projects update <project_id> --package-names '{"typescript":"@acme/sdk","python":"acme","go":"github.com/acme/acme-go"}'.Set package names per language in project settings under package names, or with package_names on the API, so pull requests arrive publish-ready:
- npm:
@acme/sdkoracme - PyPI:
acme - Go:
github.com/acme/acme-go(derived from the Go destination repository)
Version
The package version follows info.version in your spec. Bump the version in the spec and the next pull request carries it. When info.version is not semver, the version is 0.1.0, and you set it yourself before publishing.
The regeneration pull request checks the version against what changed: its typeship/semver status fails when the diff has breaking changes and the major did not bump, and the body names the version to set. See Breaking changes.
cd packages/acme
npm run build # prepublishOnly runs this too
npm publish --access public # --access public for a scoped packageThe files field ships dist/ and src/, so consumers get compiled output and readable source. When the CLI platform is on, npm install -g @acme/sdk puts the acme bin on the PATH, and the CLI's upgrade command starts working against your registry.
Release from the pull request
A tidy loop for a dedicated SDK repository:
- typeship opens a pull request with the regenerated package and the API changes in the body.
- Review, merge.
- A release workflow in that repository publishes on merge to the default branch, or on tag.
Because CHANGELOG.md is maintained in the destination, release notes are already written.
Registry publishing by typeship
typeship does not hold registry tokens or publish on your behalf. Packages reach registries through your pull requests and your release workflow.
Add a package to your repo
Where a generated package goes in your repository, how to depend on it, and how to build it. For projects with a destination configured, the pull request already did this.
Extend the client
The generated package is replaced whole on every regeneration. Put your configuration, logging, and domain logic in modules you own that wrap the client.