Skip to content

Maintenance

Simon Warta edited this page Dec 24, 2025 · 36 revisions

This page is for maintainers of CosmJS only.

How to publish a new release

Login

  1. Create Granular Access Token at https://www.npmjs.com/settings/~/tokens
  2. Put it in ~/.yarnrc.yml like this
    npmRegistries:
      "https://registry.npmjs.org":
        npmAuthToken: npm_34gh0334jg034j
    

For every release

  1. Update CHANGELOG.md and ensure it is properly formatted (see fc676968ee). We will commit this in step 5.

  2. export NEW_COSMJS_VERSION="0.26.0-alpha.1"

  3. Run

    git clean -xdf ./packages && yarn install \
      && yarn format-text && yarn build \
      && yarn workspaces foreach --all exec 'yarn version --immediate "$NEW_COSMJS_VERSION"' \
      && git add CHANGELOG.md packages/ && git commit -m "Set version $NEW_COSMJS_VERSION" && git tag "v$NEW_COSMJS_VERSION"
    
  4. Publish to npm using one of

    Release type Command npm tag
    Latest stable yarn publish-latest latest
    Pre-release yarn publish-next next
    Backport yarn publish-backports backports-unsorted
  5. git push && git push --tags

Yarn

Upgrade yarn

  1. yarn set version latest
  2. Check: yarn --version
  3. Ensure lockfile and pnp files are up-to-date: yarn install

Remove npm tag

When no current pre-release exists, the next tag should be deleted:

$ ./node_modules/.bin/lerna exec --no-private -- npm dist-tag rm "\$LERNA_PACKAGE_NAME" next

TODO: Update. Lerne is not used anymore. I can't easily find a replacement for $LERNA_PACKAGE_NAME but we can probably get it with jq from package.json

Clone this wiki locally