> ## Documentation Index
> Fetch the complete documentation index at: https://polar-handbook-psincraian-elastic-greider-765c1a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Releasing @polar-sh/checkout

> Step-by-step guide for releasing a new version of the @polar-sh/checkout npm package

The `@polar-sh/checkout` package lives in `clients/packages/checkout/` inside the main `polarsource/polar` monorepo and is published to npm via [Changesets](https://github.com/changesets/changesets).

## Prerequisites

* Access to the `polarsource/polar` repository
* `pnpm` installed (check the version in `clients/package.json`)
* Your changes to `clients/packages/checkout/` are ready on a branch

## Steps

<Steps>
  ### Create a changeset

  From the `clients/` directory, run:

  ```bash theme={null}
  pnpm changeset
  ```

  The CLI will prompt you to:

  1. **Select the package** — choose `@polar-sh/checkout`
  2. **Choose the bump type** — `patch` for bug fixes, `minor` for new features, `major` for breaking changes
  3. **Write a summary** — describe the change in one sentence (this ends up in the CHANGELOG)

  This creates a new Markdown file under `clients/.changeset/`. Commit it together with your code changes.

  ### Open a PR to `main`

  Push your branch and open a pull request as normal. The changeset file must be included in the PR.

  ### Merge to `main`

  Once the PR is reviewed and merged, the [Changesets GitHub Action](https://github.com/changesets/action) runs automatically. It opens (or updates) a **"Version Packages"** PR that:

  * Bumps the version in `package.json`
  * Updates `CHANGELOG.md`
  * Removes the consumed changeset file(s)

  ### Merge the "Version Packages" PR

  Review and merge the "Version Packages" PR. On merge, the action runs the publish pipeline:

  ```bash theme={null}
  turbo run build lint test --filter='./packages/*' && changeset publish
  ```

  This builds, lints, and tests all packages, then publishes `@polar-sh/checkout` to npm with provenance.
</Steps>

## Notes

* The changeset config lives at `clients/.changeset/config.json`. The default access is `restricted`, but `@polar-sh/checkout` overrides this via `publishConfig.access: "public"` in its own `package.json` — so it publishes publicly to npm.
* You do **not** need to manually run `npm publish` or bump the version yourself.
* If multiple changesets accumulate before the "Version Packages" PR is merged, they are all batched into a single release.
