You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(internal): bump IR to 67.2.0 for SseStreamChunk.resumable (#15812)
PR #15795 added an optional `resumable` field to `SseStreamChunk` in
`ir-types-latest/definition/http.yml` but did not bump the IR version,
so no new `@fern-fern/ir-sdk` package was published. Bump VERSION
67.1.0 -> 67.2.0 and append a corresponding CHANGELOG entry so the
field becomes visible to downstream consumers.
Also document the per-PR IR-version-bump requirement in
packages/ir-sdk/CLAUDE.md (Adding New IR Features step 4 + revised
Version Release Process) and the root CLAUDE.md (Feature Addition
Workflow), so this is not missed in future feature PRs.
3.**Versioning**: Update `CHANGELOG.md`, `VERSION`, and `/packages/cli/cli/versions.yml`
193
-
4.**Compile**: `pnpm compile` and fix breaking changes (common: `switch` statements need new cases)
194
-
5.**Generator Updates**: One PR for CLI/IR updates (merge first), then separate PR(s) for generator changes
195
-
6.**IR Migrations**: Update `/packages/cli/generation/ir-migrations/` for backward compatibility
196
-
197
-
**Key Points**: Multiple PRs required, automatic publishing via `versions.yml`, generators use published (not workspace) IR versions
192
+
3.**IR Versioning (REQUIRED for any change to `ir-types-latest`)**:
193
+
- Bump `packages/ir-sdk/fern/apis/ir-types-latest/VERSION` (minor for additive/optional fields, patch for non-schema, major only as a separate batched PR)
194
+
- Add an entry to `packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md` (hand-edited; no `changes/unreleased/` for IR)
195
+
- Do **not** edit `packages/cli/cli/versions.yml``irVersion` for minor/patch — that field tracks the IR major and only changes during major bumps
196
+
- See `packages/ir-sdk/CLAUDE.md` for the full checklist
197
+
4.**CLI Versioning**: Add a CLI changelog entry under `packages/cli/cli/changes/unreleased/` (drives CLI semver only — see `packages/cli/CLAUDE.md`)
198
+
5.**Compile**: `pnpm compile` and fix breaking changes (common: `switch` statements need new cases)
199
+
6.**Generator Updates**: One PR for CLI/IR updates (merge first), then separate PR(s) for generator changes
200
+
7.**IR Migrations**: Only required for major IR bumps — add under `/packages/cli/generation/ir-migrations/`
201
+
202
+
**Key Points**: Multiple PRs required, automatic publishing via `versions.yml`, generators use published (not workspace) IR versions. Forgetting to bump `ir-types-latest/VERSION` means no new `@fern-fern/ir-sdk` is published and the new field is invisible to downstream consumers.
Copy file name to clipboardExpand all lines: packages/ir-sdk/CLAUDE.md
+35-15Lines changed: 35 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,27 +112,47 @@ pnpm generate
112
112
- Update switch statements for new union cases
113
113
- Test generator compatibility
114
114
115
-
### 4. Add Migrations (if breaking)
115
+
### 4. Bump the IR version (REQUIRED)
116
+
**Every PR that modifies `ir-types-latest/definition/` must bump the IR version, otherwise no new IR package is published and consumers can't pick up the change.**
117
+
118
+
The IR carries its own semver in `packages/ir-sdk/fern/apis/ir-types-latest/VERSION` (currently `MAJOR.MINOR.PATCH`, e.g. `67.2.0`). Pick the bump based on the change:
119
+
120
+
-**Minor bump** (`67.1.0` → `67.2.0`): additive, backward-compatible changes — new optional fields, new union variants on forward-compatible enums, additive type declarations. This is the common case.
121
+
-**Patch bump** (`67.1.0` → `67.1.1`): non-schema fixes (doc-string edits, comment-only changes, internal refactors that don't alter the public type surface).
122
+
-**Major bump** (`67.x.x` → `68.0.0`): breaking changes — required-field additions, field removals/renames, type changes, removed enum values. **Major bumps are batched and done as a separate "Update IR to N+1" PR**, not per-feature; they require freezing the previous latest into `ir-types-vN/`, adding a `vN+1-to-vN` migration under `packages/cli/generation/ir-migrations/`, and re-aliasing `IrVersions.ts`.
2. Run `pnpm ir:generate` from the repo root to regenerate `packages/ir-sdk/src/sdk/...` artifacts.
128
+
3.**Bump `packages/ir-sdk/fern/apis/ir-types-latest/VERSION`** (minor for additive, patch for non-schema).
129
+
4.**Add an entry to `packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md`** describing the new field/feature, dated today, under a new `## [vMAJ.MIN.PATCH] - YYYY-MM-DD` heading at the top.
130
+
5. Run `pnpm --filter @fern-api/ir-sdk compile` to confirm the workspace types still build.
131
+
6. Do **not** edit `packages/cli/cli/versions.yml`'s `irVersion` — that field tracks the IR *major* and is only updated during major-version bumps.
132
+
7. Do **not** edit `generators.yml` coordinates (`irV66`, `fern_fern_ir_v66`) — those reference the published external IR major and are stable across minor bumps.
133
+
134
+
The IR changelog is **hand-edited**, not driven by a `changes/unreleased/` directory like the CLI.
135
+
136
+
### 5. Add Migrations (only on major bump)
116
137
```bash
117
-
#Add migration in CLI package
138
+
#Required only when freezing latest into a new numbered version
118
139
vim packages/cli/generation/ir-migrations/src/migrations/
119
140
```
120
141
121
142
## Version Release Process
122
143
123
-
### 1. Prepare Release
124
-
- Ensure `ir-types-latest` is stable
125
-
- Update `CHANGELOG.md` with changes
126
-
- Update `VERSION` file
127
-
128
-
### 2. Create New Version
129
-
- Copy `ir-types-latest` to `ir-types-v{n+1}`
130
-
- Update `packages/cli/cli/versions.yml`
131
-
132
-
### 3. Test Compatibility
133
-
- Run full test suite (`pnpm test:ete`)
134
-
- Test seed across all generators
135
-
- Validate migration logic
144
+
### Per-PR (minor / patch) — see "Adding New IR Features" above
- Append entry to `packages/ir-sdk/fern/apis/ir-types-latest/changelog/CHANGELOG.md`
147
+
- Release automation publishes a new `@fern-fern/ir-sdk` minor on merge to main
148
+
149
+
### Major-version bump (batched, separate PR)
150
+
1. Freeze current `ir-types-latest` contents into `packages/ir-sdk/fern/apis/ir-types-v{N}/`
151
+
2. Set `ir-types-latest/VERSION` to `{N+1}.0.0`
152
+
3. Add `packages/cli/generation/ir-migrations/src/migrations/v{N+1}-to-v{N}/` with backward migration logic
153
+
4. Re-alias `packages/cli/generation/ir-migrations/src/ir-versions/IrVersions.ts` so `V{N+1} = @fern-api/ir-sdk` and add a frozen `@fern-fern/ir-v{N}-sdk` import
154
+
5. Update `packages/cli/cli/versions.yml``irVersion: {N}` → `{N+1}` for the next CLI release
155
+
6. Run full test suite (`pnpm test:ete`) and seed across all generators
0 commit comments