Skip to content

Commit b392615

Browse files
dmealingclaude
andcommitted
chore(release): 0.7.0-rc.12
Twelve TS packages bumped 0.7.0-rc.11 → 0.7.0-rc.12. Highlights (per CHANGELOG): Changed - Three-way merge overwrite policy replacing the rc.11 marker-based clobber-or- refuse. Hand-edits in generated files now survive regen via git-merge-file against `.metaobjects/.gen-state/` snapshots; conflicts surface as standard git-conflict markers. Per spike 002 strategy (b). Added - templateGenerator() stock generator — walks MetaRoot, renders shared Mustache templates via the existing render engine, emits any format. - docsFile() refactored to use it (~85 LOC + Mustache template; conformance fixture byte-identical). - EntityDocData public-API contract + docs/features/codegen-data-shapes.md. Removed - The marker-based decideAndWrite() path. @generated HTML-comment retained as human-readable annotation; no longer load-bearing. Per the design at metaforge/docs/private/strategy/2026-05-28-template-driven- codegen-design.md (option 1 chosen — combined policy fix + factory refactor). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 10a60c8 commit b392615

14 files changed

Lines changed: 76 additions & 32 deletions

File tree

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,56 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
77

88
## [Unreleased]
99

10+
## [0.7.0-rc.12] — 2026-05-28
11+
12+
### Changed
13+
- **Three-way merge overwrite policy.** `decideAndWrite()` switched from
14+
marker-based (clobber if `@generated` is present, refuse otherwise — the
15+
rc.11-era strategy that silently lost hand-edits) to three-way merge
16+
against a canonical snapshot stored under `.metaobjects/.gen-state/`.
17+
Hand-edits in generated files now survive regen automatically (the spike
18+
002 "HARD" case); same-line edits surface as standard git-conflict
19+
markers (the "CONFLICT" case). The `@generated` marker becomes
20+
informational, no longer load-bearing.
21+
22+
Restated in adopter terms:
23+
- **Easy case** (you add a comment): clean merge integrates it
24+
- **Hard case** (you tweak a generated value): your edit survives
25+
- **Conflict case** (both sides edit the same line): standard
26+
`<<<<<<<` / `|||||||` / `=======` / `>>>>>>>` markers — resolve like
27+
any git conflict; rerun `meta gen` to advance the snapshot
28+
- **First-time-on-existing-file**: write-if-different baseline (no merge,
29+
no clobber). `meta gen --baseline=fresh` opts into "overwrite from
30+
fresh and re-baseline"
31+
32+
Add `.metaobjects/.gen-state/` to your `.gitignore`. `meta init`
33+
scaffolding handles this automatically. Integrity is sha-256 hashed at
34+
`.gen-state/.hashes.json`; tampered snapshots fall back to first-time
35+
semantics with a warning.
36+
37+
### Added
38+
- **`templateGenerator()` stock generator** — a factory that walks
39+
`MetaRoot` → renders shared Mustache templates via the existing
40+
`@metaobjectsdev/render` engine → emits files in any format (Markdown /
41+
HTML / JSON / YAML / text). Establishes the framework line: **code →
42+
hand-coded generators (ts-poet, idiomatic per-port); documents →
43+
templateGenerator (shared Mustache templates, port-agnostic)**.
44+
- **`docsFile()` refactored to use `templateGenerator()`.** Markdown
45+
structure now lives in
46+
`codegen-ts/templates/docs/entity-page.md.mustache`; adopters can
47+
override by placing same-named templates in their project's
48+
`templates/` directory. Net: ~85 LOC + a template file replaces ~250
49+
LOC of hand-coded string emit. Conformance fixture
50+
`docs-file-basic/expected/Author.md` stays byte-identical.
51+
- **`EntityDocData` exported as a public-API contract.** Template authors
52+
consuming the data dict get TypeScript type-checking. Versioning policy
53+
spelled out in the new `docs/features/codegen-data-shapes.md`.
54+
55+
### Removed
56+
- The marker-based `decideAndWrite()` path. The `<!-- @generated -->`
57+
HTML-comment marker that rc.11 added to docsFile output is retained as
58+
human-readable annotation, but the policy no longer checks for it.
59+
1060
## [0.7.0-rc.11] — 2026-05-28
1161

1262
### Fixed

bun.lock

Lines changed: 14 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/web/packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metaobjectsdev/react",
3-
"version": "0.7.0-rc.11",
3+
"version": "0.7.0-rc.12",
44
"description": "React runtime for metaobjects: useEntityForm hook and CurrencyInput component.",
55
"type": "module",
66
"main": "./dist/index.js",

client/web/packages/runtime-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metaobjectsdev/runtime-web",
3-
"version": "0.7.0-rc.11",
3+
"version": "0.7.0-rc.12",
44
"description": "Pure framework-agnostic browser core for metaobjects: currency, filter URL serialization, fetcher contract types.",
55
"type": "module",
66
"main": "./dist/index.js",

client/web/packages/tanstack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metaobjectsdev/tanstack",
3-
"version": "0.7.0-rc.11",
3+
"version": "0.7.0-rc.12",
44
"description": "TanStack runtime for metaobjects: EntityFetcherProvider, EntityGrid, default cell renderers.",
55
"type": "module",
66
"main": "./dist/index.js",

server/typescript/packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metaobjectsdev/cli",
3-
"version": "0.7.0-rc.11",
3+
"version": "0.7.0-rc.12",
44
"description": "CLI for MetaObjects: scaffold, codegen, migrate, and drift-detection commands.",
55
"type": "module",
66
"main": "./dist/src/index.js",

server/typescript/packages/codegen-ts-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metaobjectsdev/codegen-ts-react",
3-
"version": "0.7.0-rc.11",
3+
"version": "0.7.0-rc.12",
44
"description": "React codegen for metaobjects — emits <Entity>.form.tsx files using react-hook-form and @metaobjectsdev/react helpers.",
55
"type": "module",
66
"main": "./dist/index.js",

server/typescript/packages/codegen-ts-tanstack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metaobjectsdev/codegen-ts-tanstack",
3-
"version": "0.7.0-rc.11",
3+
"version": "0.7.0-rc.12",
44
"description": "TanStack codegen for metaobjects — emits hooks and column definitions for TanStack Query and Table.",
55
"type": "module",
66
"main": "./dist/index.js",

server/typescript/packages/codegen-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metaobjectsdev/codegen-ts",
3-
"version": "0.7.0-rc.11",
3+
"version": "0.7.0-rc.12",
44
"description": "TypeScript codegen engine for MetaObjects — emits Drizzle, Zod, and Fastify artifacts.",
55
"type": "module",
66
"main": "./dist/index.js",

server/typescript/packages/metadata/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metaobjectsdev/metadata",
3-
"version": "0.7.0-rc.11",
3+
"version": "0.7.0-rc.12",
44
"description": "Metamodel loader, types, and constants for the MetaObjects standard.",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)