Skip to content

Commit a228723

Browse files
committed
Update AGENTS.md to include new versioning guidelines and bump package version to 0.19.4 in package.json.
1 parent 113c696 commit a228723

3 files changed

Lines changed: 76 additions & 1 deletion

File tree

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
2+
You are an expert release manager for a Yarn 4 monorepo who uses the npm CLI for quick version bumps and patch releases.
3+
4+
# Versioning With npm CLI
5+
6+
## Policy
7+
- Prefer small, fast patch releases for incremental work.
8+
- Treat new components and minor fixes as patch releases when they are additive and low-risk.
9+
- Reserve minor/major only for notable feature waves or breaking changes.
10+
11+
Note: While the repo supports Changesets for broader release coordination, this rule documents the npm CLI flow for quick iterations.
12+
13+
## What Counts As “Small”
14+
- Additive components (new UI or form wrappers) without breaking changes
15+
- Bug fixes, perf tweaks, a11y refinements, copy/docs updates
16+
- Internal refactors that don’t change public APIs
17+
18+
## Pre-flight
19+
- Clean working tree: no uncommitted changes
20+
- On a release-worthy branch (e.g., `main`)
21+
- Build and tests pass: `yarn build && yarn test`
22+
23+
## Patch Bump (Single Workspace)
24+
For the published package `@lambdacurry/forms`:
25+
26+
```bash
27+
# Bump version with custom message
28+
npm version patch -w @lambdacurry/forms -m "Add DateField component and fix TextField accessibility"
29+
30+
# The -m flag creates the git commit automatically with your message
31+
# No need for separate git add/commit steps
32+
33+
## Post-version Steps
34+
After running `npm version patch`, you'll need to:
35+
36+
1. **Return to top level**: `cd ../..` (if you're in the package directory)
37+
2. **Update lockfile**: `yarn install` to update `yarn.lock` with the new version
38+
3. **Commit lockfile**: `git add yarn.lock && git commit -m "Update yarn.lock for @lambdacurry/forms vX.Y.Z"`
39+
40+
This ensures the lockfile reflects the new package version and maintains consistency across the monorepo.
41+
```
42+
43+
Guidelines:
44+
- Keep the summary one line and human-readable.
45+
- Examples: "Add DateField; fix TextField aria; smaller bundle".
46+
- This updates `packages/components/package.json` and creates a normal commit without tags.
47+
48+
## Open PR and Merge
49+
- Push your branch and open a PR.
50+
- When the PR merges into `main`, GitHub CI publishes the package. No manual tagging or `npm publish` needed.
51+
52+
## Minor / Major (When Needed)
53+
- Minor: larger feature sets or notable additions across multiple components
54+
```bash
55+
npm version minor -w @lambdacurry/forms -m "Add comprehensive form validation and new field types"
56+
```
57+
- Major: any breaking change (API removals/renames, behavior changes)
58+
```bash
59+
npm version major -w @lambdacurry/forms -m "Breaking: rename onSubmit to handleSubmit; remove deprecated props"
60+
```
61+
62+
## Summary Message Tips
63+
- Keep it under ~100 chars; list 2–3 highlights separated by semicolons
64+
- Focus on user-visible changes first; include critical fixes
65+
- Avoid noisy implementation detail; link to PR/issue in the PR body
66+
67+
## Coordination With Changesets
68+
- Use this npm CLI flow for quick, low-risk patches.
69+
- For multi-package changes, coordinated releases, or richer changelogs, prefer Changesets (`yarn changeset`) and follow the existing repo workflow.
70+
71+
72+
## Coordination With Changesets
73+
- Use this npm CLI flow for quick, low-risk patches.
74+
- For multi-package changes, coordinated releases, or richer changelogs, prefer Changesets (`yarn changeset`) and follow the existing repo workflow.

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
- `.cursor/rules/form-component-patterns.mdc`: Remix Hook Form + Zod wrappers, errors, server actions.
4949
- `.cursor/rules/storybook-testing.mdc`: Storybook play tests, router stub decorator, local/CI flows.
5050
- `.cursor/rules/monorepo-organization.mdc`: Imports/exports, package boundaries, Turbo/Vite/TS paths.
51+
- `.cursor/rules/versioning-with-npm.mdc`: npm CLI version bumps (patch-first), CI publishes on merge.
5152

5253
When to review before starting work
5354
- Building/refactoring UI components: react-typescript-patterns + ui-component-patterns.

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lambdacurry/forms",
3-
"version": "0.19.3",
3+
"version": "0.19.4",
44
"type": "module",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

0 commit comments

Comments
 (0)