Skip to content

1.0.11

Choose a tag to compare

@dmealing dmealing released this 01 Oct 11:17
· 180 commits to main since this release

npm 1.0.11 (all 14 @metaobjectsdev/* packages in lockstep), PyPI 1.0.11, NuGet 1.0.11 and
Maven Central 8.0.11. metamodelVersion stays 1.0. Gated by a private 1.0.11-rc.1 build of the
release commit on the adopter estate (rc-gate.sh 7/7) and a full local CI run on that commit.

Docs

  • A 1.0.x → 1.0.x upgrade guide (docs/features/migrations/upgrading-within-1.0.md), written
    from nine adopter upgrades to 1.0.10: resync owned generators (meta eject --list; a plain
    meta gen keeps the logic you ejected), the monorepo runtimeImport case, the 1.0.5 projection
    URL and percent-encoded filter changes, 1.0.9 date validation, and the 1.0.4 view-join change.
    The always-on agent context links it, and now says a project that deliberately owns its schema
    outside MetaObjects follows its own migration rule.

Changed

  • meta verify warns about whitespace in a node's name. The loader accepts any
    string as a name, in every port. An adopter's metadata, copied from legacy XML, had a field
    named "defaultCurrencyId " (trailing space) and an identity named
    "account_defaultCurrencyId _fk", and both loaded with no error. A new advisory section,
    names, reports every object, field, identity, relationship, validator, view, template or
    other named node whose name contains whitespace (the ECMAScript \s class, so a pasted
    no-break space counts). Leading or trailing whitespace gets WARN_NAME_SURROUNDING_WHITESPACE,
    which says it is almost certainly unintended. Whitespace inside a name gets the plainer
    WARN_NAME_INTERNAL_WHITESPACE. A name inherited through extends is reported once, where
    it is declared. Requirement names are left to the requirement lint, which already reports
    leading or trailing whitespace and still does not report a short multi-word label such as
    "Order Recording". Like the other authoring lints it never fails the build. It appears
    in text output and as names in --format json|toon, and can be muted with
    --no-name-lint or META_NO_NAME_LINT=1.
    Why a warning and not a load error: refusing these names does not pass the correction
    bar in docs/compatibility-policy.md. They work on the core path: meta migrate quotes the
    column ("default_currency_id ") and the ObjectManager reads and writes the key. Multi-word
    requirement names are documented to load. So rejecting them would break metadata that does
    what its author declared. Upgrading: nothing stops loading. To clear a finding, rename
    the node. On a field whose physical column must keep its current name, pin @column when
    you rename it.

Fixed

  • Generated DELETE routes on Cloudflare D1 answer 204, not 404. The affected-row count
    read libsql, Postgres, bun:sqlite and mysql2 result shapes, but not D1's
    { meta: { changes } }, so every D1 delete counted 0 rows and the route answered 404 after
    deleting the row (an admin panel showed an error and kept the row on screen). The drizzle
    ObjectManager driver had its own copy of the same count and now shares the fixed one.
    Upgrading: a project with an ejected adapter copy under codegen/runtime/ takes it with
    meta eject routes-hono --force (or merges the one-line change by hand).
  • The missing-FK-index advisory suggests a name unique to the table. It suggested
    by<Field>, so two entities with the same FK field (Citation.auditEntryId,
    Approval.auditEntryId) were both told byAuditEntryId. Postgres index names are schema-wide,
    and applying the advice verbatim failed meta migrate with ERR_DUPLICATE_SQL_NAME. The
    suggestion is now <entity>By<Field> (citationByAuditEntryId).
  • Python verify --codegen no longer passes while checking nothing. With no
    --generators it printed a note and exited 0. Since 1.0.4 there is no default suite, so a CI
    step written before then regenerated nothing and passed over committed output (one adopter's
    gate covered 159 generated files this way). It now fails when --out holds generated files
    and nothing is selected, and still passes when there is no generated output. The config
    schema and the C# verify help no longer mention a default suite.
  • TypeScript meta gen regenerates output written outside the project root. Since 1.0.5 such
    files (a monorepo target at ../shared/src/generated, say) are not recorded, and the next run
    REFUSED every one whose content had changed, as "no record of generating this file", though
    its own warning said a later run overwrites them unchecked. They are now overwritten
    unchecked, as the warning says; --baseline=adopt keeps its meaning.
  • A generated form with a blank optional date submits again. 1.0.9 made field.date and
    field.timestamp schemas reject "", and react-hook-form validates the RAW values before the
    submit callback, where the blank-field normalizer ran. A create form with a blank optional
    date therefore showed must be an ISO date (YYYY-MM-DD) and never called onSubmit: Create
    did nothing. The form's schema is now preprocessed by the same create/edit rule (a blank is
    omitted on create, null on edit) before validation. Upgrading: run meta gen; an owned
    copy of the form generator takes it from meta eject form.
  • The "agent context is out of date" hint no longer strips a mixed stack. Python, C# and
    Java gen / verify told you to run npx meta agent-docs --server <lang>. An explicit
    --server replaces the stack recorded in .metaobjects/, so on a project that is also
    TypeScript (or Kotlin, or has a React client) following the hint dropped those references.
    The hint is now npx meta agent-docs, which keeps the recorded stack.
  • meta eject no longer copies the HTTP adapter beside an owned generator that predates it.
    Since 1.0.9, ejecting entity / routes / routes-hono also copies the adapter source into
    codegen/runtime/, and re-running it fills in a missing copy. Over an owned copy from before
    1.0.9, which has no runtimeImport option and whose output imports the published package,
    that copy was dead code, and could be a Drizzle adapter in a project with no database. It is
    now skipped for such a copy.
  • meta gen warns when generated code reaches the owned adapter from outside its workspace
    package.
    In a monorepo whose output sits in apps/api/…, the relative import of
    codegen/runtime/ leaves that package and its build fails (TS6059 … is not under 'rootDir'). The warning names the package and the two fixes: pass
    runtimeImport: "@metaobjectsdev/runtime-ts", or move the copy inside the package.
  • meta migrate --slug reports the down.sql it writes. It printed only the up.sql path.
  • TanStack hooks and grid hooks import <Entity>.meta from beside themselves. The UI
    generators write the DB-free <Entity>.meta.ts into their own target, but the generated
    import { Program } from … pointed at the entity module's path plus .meta. On a
    multi-target project that is another package's importBase
    (@acme/db/generated/…/Program.meta), where no such file exists, so the web target only
    compiled with a hand-written tsconfig alias. It is now a sibling import
    (./Program.meta). Upgrading: run meta gen; an alias added to work around it can be
    removed.