> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elata.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# Releasing

> Release, changeset, and recovery workflow for published Elata SDK packages.

## Published Packages

This repository currently publishes:

* `@elata-biosciences/eeg-web`
* `@elata-biosciences/eeg-web-ble`
* `@elata-biosciences/rppg-web`
* `@elata-biosciences/ppg-web`
* `@elata-biosciences/create-elata-demo`

## Quick Reference

| Step                                   | Command                                                |
| -------------------------------------- | ------------------------------------------------------ |
| Add a changeset                        | `./run.sh changeset`                                   |
| Apply changesets and update changelogs | `./run.sh bump`                                        |
| Run the release preflight              | `./run.sh release-check all`                           |
| Build, publish, tag, and push          | `./run.sh release` (defaults to npm dist-tag `latest`) |
| Semver bump all packages, then publish | `./run.sh release patch`, `minor`, or `major`          |
| Publish on the `next` dist-tag         | `./run.sh release next` or `./run.sh release all next` |

## Maintainer Workflow

1. Apply changesets with `./run.sh bump`.
2. Review the version and changelog diff, then commit it.
3. Run `./run.sh release-check all`.
4. Publish with `./run.sh release` (defaults to npm dist-tag `latest`), or `./run.sh release next` for `next`.

Optional: `./run.sh release patch`, `minor`, or `major` bumps every publishable package with `pnpm version` before publishing. Prefer `./run.sh bump` when cutting a Changesets release so changelogs stay accurate.

Release order is fixed in `run.sh`:

`eeg-web` -> `eeg-web-ble` -> `rppg-web` -> `ppg-web` -> `create-elata-demo`

## Contributor Expectation

If a user-facing package change should ship, include a changeset in the PR.

## Safe Publish Flow

Publish to a non-`latest` channel first:

```bash theme={null}
./run.sh release next
```

After verification, promote or publish as `latest`.

## If A Bad Version Is Published

You cannot overwrite an existing version number. Instead:

1. Deprecate the bad version.
2. Publish a fixed patch version.
3. Move the `latest` dist-tag to the fixed version.

`npm unpublish` is restricted and should not be part of normal recovery.
