···11+# Changesets
22+33+Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
44+with multi-package repos, or single-package repos to help you version and publish your code. You can
55+find the full documentation for it [in our repository](https://github.com/changesets/changesets).
66+77+We have a quick list of common questions to get you started engaging with this project in
88+[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
···11+---
22+name: publish
33+description: Publish @lure-hooks packages to npm. Use when the user wants to release a new version.
44+---
55+66+Publish updated `@lure-hooks` packages to npm using changesets.
77+88+## Before you start
99+1010+Check for pending changesets:
1111+1212+```bash
1313+ls .changeset/*.md | grep -v README.md
1414+```
1515+1616+If none exist, stop and tell the user to run `pnpm changeset` first to document
1717+what changed. Do not proceed without at least one changeset file.
1818+1919+## Steps
2020+2121+1. **Verify clean working copy.** Run `jj status`. If there are uncommitted
2222+ changes, stop and ask the user to commit or shelve them first.
2323+2424+2. **Preflight checks.** Run each of the following and stop immediately if any
2525+ fails — do not skip ahead:
2626+2727+ ```bash
2828+ pnpm fmt:check
2929+ pnpm lint
3030+ pnpm -r test
3131+ ```
3232+3333+3. **Bump versions.** Run `pnpm version-packages`. This consumes the changeset
3434+ files, bumps `package.json` versions across affected packages, updates
3535+ internal dependency ranges, and writes `CHANGELOG.md` entries.
3636+3737+4. **Review changes.** Show the user the diff with `jj diff`. Ask them to
3838+ confirm the version bumps and changelog entries before continuing.
3939+4040+5. **Commit the version bump.** Use the `/jj-commit` skill.
4141+4242+6. **Dry run.** Run the following and show the full output to the user:
4343+4444+ ```bash
4545+ pnpm -r publish --dry-run --access public --no-git-checks
4646+ ```
4747+4848+ The `prepublishOnly` script in each package runs `tsc --build`
4949+ automatically, so the output will include a build step per package. Ask the
5050+ user to confirm before publishing.
5151+5252+7. **Publish.** Run:
5353+5454+ ```bash
5555+ pnpm changeset publish
5656+ ```
5757+5858+ This publishes all packages whose current version is not yet on npm and
5959+ creates git tags (e.g. `@lure-hooks/core@1.1.0`) visible to jj via its git
6060+ backend.
6161+6262+## Notes
6363+6464+- If `pnpm changeset publish` fails with a git-related error, retry with
6565+ `pnpm -r publish --access public --no-git-checks` and create the tags
6666+ manually with `jj tag create <tag>`.
6767+- Do not skip any step, even if the user asks. The dry run and preflight exist
6868+ to prevent broken or incomplete releases.