Skip to content

Commit e262564

Browse files
dmealingclaude
andcommitted
chore(release): 0.7.0-rc.2
Twelve @metaobjectsdev/* packages bumped from 0.7.0-rc.1 to 0.7.0-rc.2: Tier 0 metadata, render Tier 1 codegen-ts, runtime-ts, migrate-ts, sdk, runtime-web Tier 2 codegen-ts-react, codegen-ts-tanstack, react Tier 3 tanstack Tier 4 cli The [Unreleased] CHANGELOG section is cut into [0.7.0-rc.2] — 2026-05-27. Highlights since rc.1: Added - entityFile({ allowlists: false }) opt-in for Worker/Lambda consumers - Loader error envelope + source-on-node (ADR-0009) — metadata.ParseError + LoadResult.warnings shape change is BREAKING - outputParser() stock generator for template.output → typed Zod parser (ADR-0010) - meta verify extension for template.output drift - source.rdb discriminator filters entity-file emission — metaobjects without a writable source.rdb child now skip the Drizzle table + Insert/Update + filter allowlists + constants and emit only the structural interface + InsertSchema. Eliminates dead generated tables for value objects, prompt payloads, and any other in-memory shape Changed - BREAKING (codegen-ts): queries.ts CRUD helpers take db as first parameter (ADR-0008) - BREAKING (metadata): ParseError + LoadResult.warnings envelope shape Fixed - cli now pulls runtime-ts transitively (resolved a first-Worker-consumer friction) - meta migrate --dialect d1 no longer fails against wrangler's local D1 sandbox - field.enum columns emit text({ enum: [...] as const }) — Drizzle row-type narrowing - field.object isArray:true objectRef:RefName emits text({mode:"json"}).$type<RefName[]>() via ts-poet imp() cross-module hoist Also migrates 3 legacy cli test fixtures (trainer-website-meta, multi-package-meta, unresolved-super) to declare source.rdb children on every object.entity — needed for the new source-discriminator filter to recognize them as table-backed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f592d90 commit e262564

17 files changed

Lines changed: 129 additions & 64 deletions

File tree

CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [0.7.0-rc.2] — 2026-05-27
11+
1012
### Added
1113
- **`entityFile({ allowlists: false })` opt-in flag** (`@metaobjectsdev/codegen-ts`) —
1214
Worker/Lambda consumers can disable the Fastify-flavored
@@ -50,8 +52,22 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
5052
corpus gains `input/meta.npc.json`, `expected.json`, and
5153
`expected/NpcResponseOutput.output.ts` byte-exact codegen artifact. TS
5254
conformance runner verifies `outputParser()`'s output matches.
53-
54-
### Changed
55+
- **`source.rdb` discriminator filters entity-file emission**
56+
(`@metaobjectsdev/codegen-ts`) — metaobjects without a writable
57+
`source.rdb` child now route through a streamlined value-only path
58+
emitting only the structural TS interface + `<Name>InsertSchema` Zod
59+
schema. The Drizzle table, `InferSelectModel`/`InferInsertModel`
60+
aliases, `<Entity>FilterAllowlist`/`<Entity>SortAllowlist`,
61+
`<Entity>Filter` type, and `$entity`/`$table`/`$path` constants object
62+
are skipped entirely. Pure metadata-driven discriminator (type=`source`,
63+
subtype=`rdb`, `MetaSource.isWritable()`) — not an `object.value`
64+
vs `object.entity` type-ID gate, so the same filter also covers
65+
transient / in-memory shapes that declare no source. Closes the
66+
"dead generated tables" smell in consumers that model nested response
67+
payloads as value objects. Branch slots between `isProjection` and
68+
the existing vanilla-entity path; both pre-existing paths are
69+
unchanged. New helper `hasWritableRdbSource(entity)` from
70+
`@metaobjectsdev/codegen-ts/source-detect`.
5571
- `meta verify` log line format adds `(<subtype>)` after the template name
5672
(e.g., `[npcTurn] (prompt) ERR_*`). A pre-FR6 log scraper that matched
5773
on the bare `[name]` prefix needs to update its regex.
@@ -103,6 +119,23 @@ for the cross-port design.
103119
SQLite) on failure. Remote `wrangler d1 execute` paths still answer the
104120
function and use the live value. (Reported from the same 0.7.0-rc.1
105121
consumer.)
122+
- **`field.enum` columns emit Drizzle `text({ enum: [...] as const })`**
123+
(`@metaobjectsdev/codegen-ts`) — CHECK-constrained enum columns now
124+
carry an `enum` option on the `text()` call, narrowing Drizzle's
125+
inferred select-model type from bare `string` to a literal union
126+
(e.g. `"supports" | "opposes" | ...`). The `as const` suffix is what
127+
Drizzle's type signature requires to lift the values into the type
128+
position. Affects every non-array `field.enum`; isArray enum columns
129+
remain `text({ mode: "json" })` (Zod still validates element membership).
130+
- **`field.object isArray:true objectRef:RefName` emits
131+
`text({ mode: "json" }).$type<RefName[]>()`**
132+
(`@metaobjectsdev/codegen-ts`) — SQLite JSON columns storing arrays
133+
of nested objects now carry a typed element annotation via ts-poet
134+
`imp()` cross-module hoisting (e.g. `citations: text("citations", {
135+
mode: "json" }).$type<SourceLens[]>()`). Sibling fix to the scalar
136+
`.$type<E[]>()` patch from 0.7.0-rc.1; closes the last row-type
137+
widening case that forced consumers to `as unknown as z.ZodType<>`
138+
cast the codegen'd `<Name>InsertSchema` at the LLM-tool-use boundary.
106139

107140
## [0.6.0] — 2026-05-25
108141

bun.lock

Lines changed: 51 additions & 49 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.1",
3+
"version": "0.7.0-rc.2",
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.1",
3+
"version": "0.7.0-rc.2",
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.1",
3+
"version": "0.7.0-rc.2",
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.1",
3+
"version": "0.7.0-rc.2",
44
"description": "CLI for MetaObjects: scaffold, codegen, migrate, and drift-detection commands.",
55
"type": "module",
66
"main": "./dist/src/index.js",

server/typescript/packages/cli/test/fixtures/multi-package-meta/metaobjects/domain.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"name": "Widget",
88
"@dbTable": "widgets",
99
"children": [
10+
{
11+
"source.rdb": {
12+
"@table": "widgets"
13+
}
14+
},
1015
{
1116
"field": {
1217
"name": "id",

server/typescript/packages/cli/test/fixtures/trainer-website-meta/metaobjects/myapp.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
"@forgeSource": "human",
1111
"@forgePrimaryLocation": "src/db/users.schema.ts",
1212
"children": [
13+
{
14+
"source.rdb": {
15+
"@table": "users"
16+
}
17+
},
1318
{
1419
"field.long": {
1520
"name": "id",
@@ -69,6 +74,11 @@
6974
"@forgeSource": "human",
7075
"@forgePrimaryLocation": "src/db/posts.schema.ts",
7176
"children": [
77+
{
78+
"source.rdb": {
79+
"@table": "posts"
80+
}
81+
},
7282
{
7383
"field.long": {
7484
"name": "id",
@@ -140,6 +150,11 @@
140150
"@forgeConfidence": 0.9,
141151
"@forgeSource": "human",
142152
"children": [
153+
{
154+
"source.rdb": {
155+
"@table": "tags"
156+
}
157+
},
143158
{
144159
"field.long": {
145160
"name": "id",

server/typescript/packages/cli/test/fixtures/unresolved-super/metaobjects/orphan.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,17 @@
66
"object.entity": {
77
"name": "Lonely",
88
"children": [
9-
{"field": {"name": "id", "extends": "..::nonexistent::id"}}
9+
{
10+
"source.rdb": {
11+
"@table": "lonelys"
12+
}
13+
},
14+
{
15+
"field": {
16+
"name": "id",
17+
"extends": "..::nonexistent::id"
18+
}
19+
}
1020
]
1121
}
1222
}

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.1",
3+
"version": "0.7.0-rc.2",
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",

0 commit comments

Comments
 (0)