xonecas.io
70160
Ce

cel-tui / commit 3bf5fdf

docs: update publish docs with lockfile regeneration requirement

Add critical warning about bun.lock stale workspace versions.
Update pre-publish checklist with prepublish-check script step
and post-publish npm verification step.

xonecas2026-04-05 3bf5fdfd1c9403b562289d6c9490e3ba06b5b4c3 parent f7e716e

1 file changed

AGENTS.md+13−3
@@ -247,6 +247,14 @@ All three packages share the same version. Bump all together:
247247
248248 Follow [semver](https://semver.org/): patch for fixes, minor for features, major for breaking changes. While `0.x`, minor = breaking is acceptable.
249249
250+**⚠️ Critical: After bumping versions, regenerate the lockfile:**
251+
252+```bash
253+rm bun.lock && bun install
254+```
255+
256+`bun publish` resolves `workspace:*` from `bun.lock`, **not** from `package.json`. If you skip this step, the published packages will depend on the old version. `bun install` alone does NOT update workspace versions in an existing lockfile — you must delete and regenerate it.
257+
250258 ### Publish order
251259
252260 Must publish in dependency order — types first, then core, then components:
@@ -265,14 +273,16 @@ If 2FA is enabled, add `--otp <code>` to each command.
265273 2. Types clean: `bun run typecheck`
266274 3. Lint/format clean: `bun run check && bun run format`
267275 4. Version bumped in all three `package.json` files
268-5. Changes committed and pushed
269-6. Dry run looks correct: `cd packages/core && bun publish --dry-run --access public`
276+5. Lockfile regenerated: `rm bun.lock && bun install`
277+6. **Pre-publish check passes: `bun run prepublish-check`** (verifies lockfile versions match package.json)
278+7. Changes committed and pushed
279+8. After publishing, **verify on npm**: `npm view @cel-tui/core@<version> dependencies --json`
270280
271281 ### How it works
272282
273283 - `"files"` in each `package.json` whitelists what ships (source only, no tests)
274284 - `"exports"` map provides proper module resolution for Bun and bundlers
275-- `workspace:*` dependencies are resolved to actual versions by `bun publish`
285+- `workspace:*` dependencies are resolved to actual versions by `bun publish` **using versions from `bun.lock`** (not package.json — the lockfile must be regenerated after version bumps)
276286 - `get-east-asian-width` is a real dependency of `@cel-tui/core` (installs for consumers)
277287 - `typescript` is a peer dependency (consumers bring their own)