@ai-matrx/records 0.83.1 → 0.83.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records
|
|
2
2
|
|
|
3
|
+
## 0.83.2
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/records/v0.83.1..npm/records/v0.83.2 -- apps/shared/records`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.83.1
|
|
4
10
|
|
|
5
11
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
@@ -20,7 +26,7 @@ Consumer action: `parseFormula` / `FORMULA_FUNCTIONS` from `@ai-matrx/records`
|
|
|
20
26
|
## 0.82.1
|
|
21
27
|
### lane DESCRIBE-BENCH2 (sweep): the mechanical wrong shapes are read, not refused
|
|
22
28
|
|
|
23
|
-
- `autofixDescribeSpec` also rewrites, each with an auto-fix note and only when unambiguous: view `filters` written as a list of `{field, op, value}` (→ the store's map; several values → `anyOf`; a condition the store cannot express is dropped and SAID), `sort`/`orderBy` → `sorts`, `group_by`/`date_field`/… → `groupBy`/`dateField`/…, an exact duplicate view dropped; a field typed with `kind`/`type` (or by a plain label) → `parityType`; a formula over bare field names → `{Label}`; a relationship `inverseKey` that is already a field of the target (the store then read the rollup's link as a plain formula) renamed; a rollup named for a status with no filter → the filter when exactly one far-side choice/tick box is that word; a real-looking phone → a fictional one; a copy of the shared team_member block → an ordinary table (name, role, notes) — never a table whose fields are exactly one the person already has (a link-only reuse is not changed).
|
|
29
|
+
- `autofixDescribeSpec` also rewrites, each with an auto-fix note and only when unambiguous: view `filters` written as a list of `{field, op, value}` (→ the store's map; several values → `anyOf`; a condition the store cannot express is dropped and SAID), `sort`/`orderBy` → `sorts`, `group_by`/`date_field`/… → `groupBy`/`dateField`/…, an exact duplicate view dropped; a field typed with `kind`/`type` (or by a plain label) → `parityType`; a formula over bare field names → `{Label}`; a relationship `inverseKey` that is already a field of the target (the store then read the rollup's link as a plain formula) renamed; a rollup named for a status with no filter → the filter when exactly one far-side choice/tick box is that word; a real-looking phone → a fictional one; a copy of the shared team_member block → an ordinary table (name, role, notes) — never a table whose fields are exactly one the person already has (a link-only reuse is not changed, and `describeCheck` no longer calls it a copy of the shared block).
|
|
24
30
|
- `describeVocabulary()` gains `view_filters_shape`, `field_shape`, `formula_shape`, `relationship_shape`, `phone_rule`, `team_rule`.
|
|
25
31
|
|
|
26
32
|
## Earlier in this release — a rollup or lookup in the wrong shape is read, not refused
|
package/dist/templates/index.cjs
CHANGED
|
@@ -7557,7 +7557,10 @@ function autofixDescribeSpec(input, ctx = {}) {
|
|
|
7557
7557
|
function describeCheck(spec, ctx = {}) {
|
|
7558
7558
|
const fixed = autofixDescribeSpec(spec, ctx);
|
|
7559
7559
|
const v = validateTemplate(fixed.spec, { profile: "describe" });
|
|
7560
|
-
|
|
7560
|
+
const sameFields = (t) => (ctx.existingTables ?? []).some((e) => e.fields.map((f) => f.key).sort().join("|") === t.fields.map((f) => f.key).sort().join("|"));
|
|
7561
|
+
const reused = new Set(fixed.spec.tables.filter(sameFields).map((t) => t.token));
|
|
7562
|
+
const problems = v.problems.filter((p) => !(/^This table copies the shared /.test(p.says) && reused.has(/\((\w+)\)/.exec(p.at)?.[1] ?? "")));
|
|
7563
|
+
return { ...fixed, problems: problems.map((p) => ({ at: p.at, says: p.says })) };
|
|
7561
7564
|
}
|
|
7562
7565
|
|
|
7563
7566
|
// src/templates/describe/repair.ts
|