Skip to content

fix(metadata): keep RowFields as a deprecated alias of StoredRow - #131

Merged
Upd4ting merged 1 commit into
mainfrom
fix/row-fields-alias
Nov 13, 2026
Merged

Upd4ting merged 1 commit into
mainfrom
fix/row-fields-alias

Conversation

@Upd4ting

Copy link
Copy Markdown
Member

Why

interface-dms 0.12 and 0.13 name RowFields from @antelopejs/interface-data-api/metadata in their published declarations, as the result type of their get and edit routes. 0.7.0 removed that name in favour of StoredRow (#126). Every consumer type-checking interface-dms against data-api 0.7.x then fails with TS2694. This PR brings the name back as a deprecated alias, so interface-dms 0.13.3 type-checks as it is until ANT-2384 moves it to StoredRow. It is the alias commit that reached #129's branch after that PR merged, cherry-picked onto main.

What

  • src/internal/field-types.ts: export type RowFields = StoredRow, documented @deprecated Use StoredRow. It is a real type, not unknown.
  • src/metadata.ts exports it next to StoredRow.
  • src/tests/index/consumer_declarations.test.ts: the consumer module also imports RowFields, assigns a StoredRow to it, and checks that DefaultRoutes.Get answers a RowFields.

Attention

One addition to the published declarations, no removal: RowFields in metadata (and in its @internal source module). Runtime exports are unchanged. antelopejs-api-diff reports the addition as a difference; the output is below.

Proof

Both ways, against interface-dms 0.13.3. A scratch project with this head packed, @antelopejs/interface-dms 0.13.3, decorators 0.5.2 and interface-core 0.5.1, one copy of each. It runs tsc with skipLibCheck: false over every interface-dms module that names RowFields: the index, data-controllers/roles, data-controllers/members, base/table-view/routes and base/table-view/internal/guards.

With the alias: no diagnostics, exit 0.

With RowFields removed from the packed dist/metadata.d.ts:

node_modules/@antelopejs/interface-dms/dist/base/table-view/internal/guards.d.ts(15,138): error TS2694: Namespace '"node_modules/@antelopejs/interface-data-api/dist/metadata"' has no exported member '
node_modules/@antelopejs/interface-dms/dist/base/table-view/routes.d.ts(12,115): error TS2694: Namespace '"node_modules/@antelopejs/interface-data-api/dist/metadata"' has no exported member 'RowFields
node_modules/@antelopejs/interface-dms/dist/base/table-view/routes.d.ts(44,117): error TS2694: Namespace '"node_modules/@antelopejs/interface-data-api/dist/metadata"' has no exported member 'RowFields
node_modules/@antelopejs/interface-dms/dist/base/table-view/routes.d.ts(77,122): error TS2694: Namespace '"node_modules/@antelopejs/interface-data-api/dist/metadata"' has no exported member 'RowFields
node_modules/@antelopejs/interface-dms/dist/base/table-view/routes.d.ts(86,124): error TS2694: Namespace '"node_modules/@antelopejs/interface-data-api/dist/metadata"' has no exported member 'RowFields

In-repo consumer test, with RowFields removed from the built dist/metadata.d.ts:

  Published declarations
    1) type-check in a consumer module with library checks on
  0 passing (6s)
  1 failing
  1) Published declarations
       type-check in a consumer module with library checks on:
      AssertionError: expected [ Array(1) ] to deeply equal []
      + expected - actual
      -[
      -  "TS2305 consumer-check/consumer.ts: Module '\"@antelopejs/interface-data-api/metadata\"' has no exported member 'RowFields'."
      -]
      +[]

On this head it passes, inside pnpm run checks: 11 passed, 0 failed.

API: differences against origin/main (committed HEAD).
diff --git a/base/_root/exports/subpath/internal%2Ffield-types.d.ts b/head/_root/exports/subpath/internal%2Ffield-types.d.ts
index d897d49..24e6da8 100644
--- a/base/_root/exports/subpath/internal%2Ffield-types.d.ts
+++ b/head/_root/exports/subpath/internal%2Ffield-types.d.ts
@@ -159,6 +159,7 @@ export interface ReadableAccessFields {
         FieldData
     ][];
 }
+export type RowFields = StoredRow;
 export interface StoredRow {
     [field: string]: StoredValue;
 }
diff --git a/base/_root/exports/subpath/metadata.d.ts b/head/_root/exports/subpath/metadata.d.ts
index 05e8c4f..844ba45 100644
--- a/base/_root/exports/subpath/metadata.d.ts
+++ b/head/_root/exports/subpath/metadata.d.ts
@@ -185,6 +185,7 @@ export interface ReadableAccessFields {
         FieldData
     ][];
 }
+export type RowFields = StoredRow;
 export declare const Sortable: (options?: undefined | {
     noIndex?: boolean;
 }) => import("@antelopejs/interface-core/decorators").PropertyDecorator & import("@antelopejs/interface-core/decorators").MethodDecorator;
diff --git a/base/_root/typesVersions/%2A/metadata/0.d.ts b/head/_root/typesVersions/%2A/metadata/0.d.ts
index 05e8c4f..844ba45 100644
--- a/base/_root/typesVersions/%2A/metadata/0.d.ts
+++ b/head/_root/typesVersions/%2A/metadata/0.d.ts
@@ -185,6 +185,7 @@ export interface ReadableAccessFields {
         FieldData
     ][];
 }
+export type RowFields = StoredRow;
 export declare const Sortable: (options?: undefined | {
     noIndex?: boolean;
 }) => import("@antelopejs/interface-core/decorators").PropertyDecorator & import("@antelopejs/interface-core/decorators").MethodDecorator;
API: skipped .agents/skills/formal-field-access, private.
API: skipped .agents/skills/verify-interface, private.
API: skipped test-helper entry ./dist/*.d.ts in .; test helpers need a test runner and are outside both proof halves.
Runtime API: 1 packages, 24 entries unchanged against origin/main (committed HEAD).
Runtime API: skipped test-helper entry ./dist/*.js in .; test helpers need a test runner and are outside both proof halves.
No behavioural probe ran.

Suppressions in authored code files (origin/main and committed HEAD). A lint directive counts once per rule it names; `*` is a directive naming none.
| Suppressions | base | HEAD |
| --- | ---: | ---: |
| Lint suppressions, all rules | 0 | 0 |
| `@ts-expect-error` | 0 | 0 |
| `@ts-ignore` | 0 | 0 |
| `SAFETY:` comments | 3 | 3 |
| Lint config rule-offs, all rules | 0 | 0 |
<!-- antelopejs-proof base=f781ade226fe1f97d9db1c11ed751834625d8dca head=4a391aeb5e616aaf2db89e7f1d9e4221e7eecb36 lines=51 digest=f771e836cce49b4e command: antelopejs-api-diff origin/main -->

@Upd4ting
Upd4ting merged commit 8d17f48 into main Nov 13, 2026
8 checks passed
@Upd4ting
Upd4ting deleted the fix/row-fields-alias branch November 13, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant