Skip to content

1.0.7

Choose a tag to compare

@dmealing dmealing released this 24 Sep 23:40
· 301 commits to main since this release

npm 1.0.7 (all 14 @metaobjectsdev/* packages in lockstep), Maven Central 8.0.7, PyPI
1.0.7 and NuGet 1.0.7. Every port has a product change. npm, PyPI and NuGet skip 1.0.6,
which only Maven Central took (8.0.6). metamodelVersion stays 1.0.

Upgrading: run gen. The C#, Java, Kotlin and Python route generators emit a new doc
comment, so adopters with committed generated code see a comment-only diff.

Added

  • meta migrate --rename-column and --rename-table declare a rename, so the column's
    data is kept.
    The diff offers a dropped and an added column as a possible rename only
    when their names are close, so origin_city → origin_port became DROP COLUMN +
    ADD COLUMN and lost every value; an adopter estate had to hand-edit the emitted SQL. A
    declared rename resolves the pair as a rename without --on-ambiguous or
    --allow drop-column, and is refused (exit 1) when there is nothing to rename. A column's
    type, nullability and default must not change in the same run.
  • meta migrate warns about changes that fail on a populated table. A new required
    column with no default, an optional column made required, and a new CHECK on an existing
    table (an enum narrowed to fewer values) all apply to an empty database and fail on one
    with rows. The diff reports them as hazards, the CLI prints a warning, and the Postgres
    migration file carries the preparation step (a backfill UPDATE or the SELECT that finds
    violating rows) as a comment above the statement. DiffResult gains a hazards field.
  • routesFile({ registerAll: true }) and routesFileHono({ registerAll: true }) emit one
    module that registers every generated entity's routes.
    routes.index.ts (or
    routes.index.hono.ts) at the target root exports registerAllRoutes(...), so adding an
    entity no longer means editing the host file. Off by default: a project that does not ask
    gets no new file. TypeScript only; in the other ports, eject the route generator.

Changed

  • Generated routes say they are unauthenticated in C#, Java, Kotlin and Python (#367).
    The TypeScript route generators already did. The others emitted open CRUD over every table
    with no warning. Each now puts a doc comment on the generated register method, controller or
    router: the endpoints are unauthenticated, how to guard them in that framework, and that a
    row-ownership rule needs the generator ejected (dotnet meta eject, mvn metaobjects:eject,
    metaobjects eject). Comment-only: adopters with committed generated code see a doc diff on
    the next gen, and no behaviour changes.

Fixed

  • XML extract no longer writes a map's text into a string field, and reads the right
    text from malformed replies, in every port.
    Three defects, one symptom: an adopter's
    end users were shown {details=}. The door opens. as generated prose.
    • An element holding prose AND a child element (<narrative>The door opens.<details/></narrative>) kept only the child and dropped the prose. It now
      keeps the element's own text too, so a string field reads the prose.
    • A string field that received an element with only child elements was filled with the
      stringified map ({details=}). It is now MALFORMED.
    • An unclosed element closed with the WRONG tag (<narrative>prose</mood><next/>)
      kept the stray </mood> in its text. The stray close now ends the element there.
      Three new extract-conformance cases pin this in all four engines (Kotlin runs the Java
      one).
  • extract no longer discards a fenced answer that follows an earlier object or a brace in
    prose (#363), in every port.
    The JSON locator took the first object that parsed, so a
    draft object in the model's reasoning, an echoed format example ({"topic": "<slug>"}) or
    plain prose with a brace ({a set}) won, and the complete answer in the following
    ```json fence was never read; with its @required fields missing, the reply
    was reported unusable. The locator now searches fenced blocks first, then the whole reply,
    and takes the first object that carries at least one declared field. A fenced object with
    none of them (a fenced example) falls through the same way. When no object carries a
    declared field, the old first-object rule decides, so every reply that parsed before parses
    the same. Five new extract-conformance cases pin the behaviour in all four engines
    (Kotlin runs the Java one).