Skip to content

Releases: metaobjectsdev/metaobjects

v0.17.1

Choose a tag to compare

@dmealing dmealing released this 18 Jul 18:40

npm-only patch (0.17.0 → 0.17.1). Fixes the write-through-entity generated REST routes to read through the replica view, so read-your-writes returns the derived origin.passthrough field (#214) — the routes layer had been left on vanilla table CRUD. readView on runtime-ts mountCrudRoutes + codegen-ts routes wiring; gated by a new cross-port api-contract write-through corpus (TS/C#/Kotlin). PyPI/NuGet/Maven unchanged. See CHANGELOG.md [0.17.1].

0.15.21 — migrate-engine + wrong-row-write bug fixes; PK types derived, not hardcoded

Choose a tag to compare

@dmealing dmealing released this 13 Jul 17:30

Coordinated release: npm 0.15.21 · PyPI 0.15.13 · Maven Central 7.7.11.
NuGet stays at 0.15.10 — the C# port needed no fix. It already derived the primary-key type correctly, and became the reference the other three ports were fixed against.

A bug-fix release, sourced from a downstream consumer's adoption report (TypeScript + Cloudflare D1 + uuid primary keys) and then widened by an adversarial review that hunted the same bug classes across the whole codebase. No metadata changes, no new vocabulary — existing metadata generates byte-identical output except where it was previously wrong.

Data loss and destructive migrations

  • Writable mounts performed a WRONG-ROW write/delete. On a TEXT/uuid primary key, DELETE /docs/0123 deleted row '123' (proven against real engines).
  • Every incremental meta migrate rebuilt every uuid-PK table — a false change-column-default that, on SQLite/D1, recreate-and-copies the whole table on every run, forever.
  • drop-view was auto-allowed — an extension's view or a hand-written view got an un-gated DROP VIEW.

Migrations that couldn't be applied, or silently did nothing

  • @autoSet emitted DEFAULT now() on SQLite/D1 — invalid SQL, so any entity with the standard createdAt @autoSet produced an un-appliable migration.
  • Changing field.enum @values never migrated on SQLite — meta migrate said "No schema changes" while production inserts kept violating the stale CHECK.
  • @kind: storedProc projections crashed meta migrate outright.
  • D1 introspection didn't exclude _cf_METADATA, aborting every second-and-later meta migrate --dialect d1.

Silently wrong SQL and types

  • The SQLite emitter dropped index @expr/@where/@orders — a partial UNIQUE index became a FULL UNIQUE constraint, silently rejecting valid inserts.
  • Boolean @default literals were quoted (DEFAULT 'false'), which SQLite stores as TEXT — so WHERE flag = 0 silently matched nothing.

Generated code hardcoded the primary-key type (Java, Kotlin, Python)

An entity declaring @generation: uuid got broken output while its own DTO correctly used UUID. Kotlin's generated code did not even compile. Java rejected uuid path vars with 400; Python's FastAPI router 422'd them before the handler ran. Not a metamodel gap — each port already had the type mapper and was using it a few lines away.

Note

Every migrate fix is now gated by an emit → apply to a real engine → introspect → re-diff must be EMPTY round-trip plus value-semantics probes. The absence of that gate — nothing ever ran the pipeline twice against a real database — is what let this whole class survive a large test suite. Two goldens were found to be encoding the bugs they pinned.

Full detail: CHANGELOG

v0.12.0

Choose a tag to compare

@dmealing dmealing released this 25 Jun 09:45

Lockstep npm release of the @metaobjectsdev/* packages (13 publish candidates).

Added — agent-friendly meta CLI: --format/TOON output, structured errors + next-step hints, deploy-all agent-context references (#71).

Fixed — meta init agent-context scaffold no longer guesses the migration binding; the injected AGENTS.md/CLAUDE.md now name the DB schema + migrations as metadata-derived so an agent won't hand-write SQL and reintroduce drift (#1, #73).

npm: npm i @metaobjectsdev/cli@0.12.0

v0.11.6

Choose a tag to compare

@dmealing dmealing released this 24 Jun 17:40

Full lockstep release of all 13 @metaobjectsdev/* packages.

Added

  • Typed projection (view-kind) read models — typed Drizzle .existing() view columns (honoring @dbColumnType).
  • Projection passthroughs resolve value-object refs (Zod schema + .$type<VO>() into the read model).
  • runtime flag on output targets (default true). runtime: false = contract-only output: Zod + inferred TS types, no drizzle-orm/runtime-ts — for a UI/wire-contract package with no DB.

Changed

  • Replaced the short-lived per-artifact includeViewDecl option with the target-level runtime flag; allowlists remains the finer Fastify-vs-Hono opt-out.

See CHANGELOG.md.