@barefootjs/go-template 0.31.6 → 0.31.7

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.
@@ -1,11 +1,10 @@
1
1
  /**
2
- * Per-fixture build-time contracts for shapes the Go template adapter
3
- * intentionally refuses to lower. Lives here (not on the shared fixtures)
4
- * so adding a new adapter doesn't require touching any cross-adapter
5
- * file every adapter declares its own refusal set against the
6
- * canonical fixture corpus. Consumed by this package's own conformance
7
- * test (as `expectedDiagnostics`) and by `bf compat` (issue-URL
8
- * attribution).
2
+ * Per-fixture build-time contracts for shapes this adapter intentionally
3
+ * refuses to lower. Declared per adapter, not on the shared fixtures, so
4
+ * adding a new adapter never touches a cross-adapter file. Per-fixture
5
+ * rationale lives on each fixture's docstring
6
+ * (`packages/adapter-tests/fixtures/<id>.ts`) and spec/callback-fidelity.md;
7
+ * comments below only mark where this adapter's set diverges from siblings.
9
8
  */
10
9
  import type { ConformancePins } from '@barefootjs/jsx';
11
10
  export declare const conformancePins: ConformancePins;
@@ -1 +1 @@
1
- {"version":3,"file":"conformance-pins.d.ts","sourceRoot":"","sources":["../src/conformance-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,eAgM7B,CAAA"}
1
+ {"version":3,"file":"conformance-pins.d.ts","sourceRoot":"","sources":["../src/conformance-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,eA2C7B,CAAA"}
package/dist/index.js CHANGED
@@ -6671,7 +6671,8 @@ var conformancePins = {
6671
6671
  { code: "BF101", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2320" }
6672
6672
  ],
6673
6673
  "filter-nested-find-predicate": [{ code: "BF101", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2320" }],
6674
- "date-method-uncatalogued": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2356" }]
6674
+ "date-method-uncatalogued": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2356" }],
6675
+ "rich-prop-client-read": [{ code: "BF049", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2648" }]
6675
6676
  };
6676
6677
  // src/render-divergences.ts
6677
6678
  var renderDivergences = {
@@ -1,29 +1,10 @@
1
1
  /**
2
- * Render-level divergences against the shared conformance corpus
3
- * (Priority-12 edge-case sweep, #2168): fixtures that COMPILE clean on
4
- * this adapter but whose rendered output diverges from the Hono
5
- * reference on real Go or whose generated Go fails `go run` outright
6
- * (marked "exit 1" below; those should eventually become loud BF101
7
- * refusals instead of broken codegen).
8
- *
9
- * Consumed by this package's conformance test (its `skipJsx` set is
10
- * derived from these keys, so the skip list and this declaration can't
11
- * drift) and by `packages/compat`, which publishes the entries in the
12
- * fixture-divergences section of `ui/compat.lock.json` — surfaced on
13
- * the docs compatibility-matrix page. Graduating an entry means fixing
14
- * the adapter (or the shared compiler layer) and deleting the line.
15
- *
16
- * Empty — the file's last live entry (`static-array-from-props-with-
17
- * component-client`, #2627) graduated: a clientOnly child-component loop
18
- * whose array is neither a signal/memo nor a direct prop reference (e.g.
19
- * `Object.entries(props.tags).filter(...)` feeding a `<Tag>` loop) is now
20
- * excluded entirely from the Input/Props/NewProps codegen instead of
21
- * colliding with the driving prop's own field — see
22
- * `GoTemplateAdapter.isOrphanedClientOnlyNested`. The caller-side composite
23
- * literal for the `tags` prop now type-checks against its own `interface{}`
24
- * field and `go run`s clean.
25
- * Keep the file (and this header) when the set is empty — the next
26
- * divergence lands here, not in a re-created file.
2
+ * Fixtures that compile clean on this adapter but render divergent from the
3
+ * Hono reference on real Go. The conformance `skipJsx` set and
4
+ * `packages/compat`'s published fixture-divergences both derive from this
5
+ * one object, so the skip list and the declaration can't drift. Keep the
6
+ * file even when the set is empty the next divergence lands here, not in
7
+ * a re-created file.
27
8
  */
28
9
  import type { RenderDivergences } from '@barefootjs/jsx';
29
10
  export declare const renderDivergences: RenderDivergences;
@@ -1 +1 @@
1
- {"version":3,"file":"render-divergences.d.ts","sourceRoot":"","sources":["../src/render-divergences.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD,eAAO,MAAM,iBAAiB,EAAE,iBAiC/B,CAAA"}
1
+ {"version":3,"file":"render-divergences.d.ts","sourceRoot":"","sources":["../src/render-divergences.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD,eAAO,MAAM,iBAAiB,EAAE,iBAM/B,CAAA"}
package/dist/vite.js CHANGED
@@ -2328,6 +2328,7 @@ var ErrorCodes = {
2328
2328
  COMPONENT_REQUIRED_PROP_MISSING: "BF046",
2329
2329
  JSX_BRANCH_LOCAL_IN_CALLBACK: "BF047",
2330
2330
  SIBLING_COMPONENT_NOT_COMPILED: "BF048",
2331
+ RICH_TYPE_PROP_NOT_HYDRATABLE: "BF049",
2331
2332
  SHARED_PROGRAM_REQUIRED: "BF050",
2332
2333
  WRONG_PACKAGE_IMPORT: "BF051",
2333
2334
  BUILTIN_REQUIRES_IMPORT: "BF054",
@@ -2358,6 +2359,7 @@ var errorMessages = {
2358
2359
  [ErrorCodes.COMPONENT_REQUIRED_PROP_MISSING]: "Built-in component is missing a required prop.",
2359
2360
  [ErrorCodes.JSX_BRANCH_LOCAL_IN_CALLBACK]: "JSX-typed local declared inside an `if`-block cannot be referenced from a callback body (ref / event handler). " + "Render it as a child instead: `<div ref={...}>{local}</div>`.",
2360
2361
  [ErrorCodes.SIBLING_COMPONENT_NOT_COMPILED]: "Referenced component did not compile to a template, so this reference would throw " + "`ReferenceError` at render time. Multi-return JSX dispatch (a `switch` or `if`/`else` " + "chain across multiple JSX-returning branches) cannot compile as a component in a " + `'use client' file. Extract it to a separate non-"use client" file (where it is preserved ` + "verbatim, see #932), or rewrite it as a single-return ternary/conditional chain so the " + "component pipeline can compile it.",
2362
+ [ErrorCodes.RICH_TYPE_PROP_NOT_HYDRATABLE]: "Rich-typed prop cannot cross the bf-p hydration boundary as JSON.",
2361
2363
  [ErrorCodes.SHARED_PROGRAM_REQUIRED]: "Shared ts.Program required for type-based reactivity classification. This source imports a Reactive<T>-branded library (e.g. @barefootjs/form) whose getters cannot be classified by regex alone. Pass `options.program` (built via `createProgramForCorpus`) so the analyzer can resolve the brand through the TypeChecker.",
2362
2364
  [ErrorCodes.WRONG_PACKAGE_IMPORT]: "Import from wrong package.",
2363
2365
  [ErrorCodes.BUILTIN_REQUIRES_IMPORT]: "Built-in <Async> / <Region> must be imported from '@barefootjs/client'. " + "The compiler recognises these tags by their import (not by tag name), " + "so an unimported tag with this name is treated as an undeclared component.",
@@ -2391,6 +2393,8 @@ var HOST_RICH_TYPE_NAMES = new Set([
2391
2393
  "BigInt",
2392
2394
  "Function"
2393
2395
  ]);
2396
+ var JSON_REVIVABLE_RICH_TYPE_NAMES = new Set(["Date", "URL"]);
2397
+ var JSON_UNSAFE_RICH_TYPE_NAMES = new Set([...HOST_RICH_TYPE_NAMES].filter((n) => !JSON_REVIVABLE_RICH_TYPE_NAMES.has(n)));
2394
2398
  function baseTypeName(raw) {
2395
2399
  const idx = raw.indexOf("<");
2396
2400
  return (idx === -1 ? raw : raw.slice(0, idx)).trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/go-template",
3
- "version": "0.31.6",
3
+ "version": "0.31.7",
4
4
  "description": "Go html/template adapter for BarefootJS - generates Go template files from IR",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,7 +49,7 @@
49
49
  "directory": "packages/adapter-go-template"
50
50
  },
51
51
  "dependencies": {
52
- "@barefootjs/shared": "0.31.6"
52
+ "@barefootjs/shared": "0.31.7"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@barefootjs/jsx": ">=0.2.0",
@@ -67,9 +67,9 @@
67
67
  },
68
68
  "devDependencies": {
69
69
  "@barefootjs/adapter-tests": "0.1.0",
70
- "@barefootjs/client": "0.31.6",
71
- "@barefootjs/jsx": "0.31.6",
72
- "@barefootjs/vite": "0.31.6",
70
+ "@barefootjs/client": "0.31.7",
71
+ "@barefootjs/jsx": "0.31.7",
72
+ "@barefootjs/vite": "0.31.7",
73
73
  "vite": "^6.0.0"
74
74
  }
75
75
  }
@@ -1,87 +1,33 @@
1
1
  /**
2
- * Per-fixture build-time contracts for shapes the Go template adapter
3
- * intentionally refuses to lower. Lives here (not on the shared fixtures)
4
- * so adding a new adapter doesn't require touching any cross-adapter
5
- * file every adapter declares its own refusal set against the
6
- * canonical fixture corpus. Consumed by this package's own conformance
7
- * test (as `expectedDiagnostics`) and by `bf compat` (issue-URL
8
- * attribution).
2
+ * Per-fixture build-time contracts for shapes this adapter intentionally
3
+ * refuses to lower. Declared per adapter, not on the shared fixtures, so
4
+ * adding a new adapter never touches a cross-adapter file. Per-fixture
5
+ * rationale lives on each fixture's docstring
6
+ * (`packages/adapter-tests/fixtures/<id>.ts`) and spec/callback-fidelity.md;
7
+ * comments below only mark where this adapter's set diverges from siblings.
9
8
  */
10
9
 
11
10
  import type { ConformancePins } from '@barefootjs/jsx'
12
11
 
13
12
  export const conformancePins: ConformancePins = {
14
- // Off-subset filter predicate (`typeof`) the compiler can't lower; a
15
- // JS-runtime target runs it, a DSL adapter surfaces BF021 + `/* @client */`.
16
- // See spec/callback-fidelity.md.
17
13
  'filter-typeof-predicate': [{ code: 'BF021', severity: 'error' }],
18
- // Array-builder `.map()` body (imperative `push`-into-array preamble):
19
- // BF021, with a verified `/* @client */` escape — `map-array-builder-
20
- // body-client` (#2613). See that fixture's docstring.
21
14
  'map-array-builder-body': [{ code: 'BF021', severity: 'error' }],
22
15
  'map-array-builder-escaping': [{ code: 'BF021', severity: 'error' }],
23
- // `.fill(value)` mutates the receiver in place — no template lowering
24
- // on any DSL adapter; a JS-runtime target runs it, a DSL adapter
25
- // surfaces BF101 + `/* @client */`. See spec/callback-fidelity.md.
26
16
  'fill-unsupported': [{ code: 'BF101', severity: 'error' }],
27
- // Off-subset `.find()` / `.some()` / `.every()` predicate (`typeof`) the
28
- // compiler can't lower; a JS-runtime target runs it, a DSL adapter
29
- // surfaces BF101 + `/* @client */`. See spec/callback-fidelity.md.
30
17
  'find-typeof-predicate': [{ code: 'BF101', severity: 'error' }],
31
18
  'some-typeof-predicate': [{ code: 'BF101', severity: 'error' }],
32
19
  'every-typeof-predicate': [{ code: 'BF101', severity: 'error' }],
33
- // Off-subset `.reduce()` / `.reduceRight()` body / `.flatMap()`
34
- // projection (`typeof`) the compiler can't lower; a JS-runtime target
35
- // runs it, a DSL adapter surfaces BF101 + `/* @client */`.
36
- // See spec/callback-fidelity.md.
37
20
  'reduce-typeof-body': [{ code: 'BF101', severity: 'error' }],
38
21
  'reduce-right-typeof-body': [{ code: 'BF101', severity: 'error' }],
39
22
  'flatmap-typeof-projection': [{ code: 'BF101', severity: 'error' }],
40
- // JSX-returning `.flatMap()` body carried as structured segments i.e.
41
- // one with STATEMENTS (early returns, consts): a JS runtime executes it
42
- // verbatim; a DSL template runtime can't, so it refuses with BF021 +
43
- // `/* @client */` (pre-gate this emitted an empty loop body — silent
44
- // divergence). A pure PROJECTION body (`flatMap(it => it.tags.map(...))`,
45
- // e.g. the `flatmap-expression-body` fixture) is NOT pinned: it lowers to
46
- // neutral nested-loop IR this adapter templatizes natively.
47
- // See spec/callback-fidelity.md.
23
+ // A pure PROJECTION flatMap body (`flatmap-expression-body`) is NOT pinned
24
+ // it lowers to neutral nested-loop IR this adapter templatizes natively;
25
+ // only the statement-carrying body refuses.
48
26
  'tag-cloud': [{ code: 'BF021', severity: 'error' }],
49
- // A keyed `.map()` row body whose preamble builds a JSX leaf from item
50
- // state (`cells.push(<td>{stateLabel}</td>)`) embedded as `{cells}` — the
51
- // Stage 3 array-builder carrier, jsRuntime-only: a JS runtime runs it
52
- // verbatim (and patches the region on same-key updates, #2389), a DSL
53
- // adapter refuses with BF021 + `/* @client */`. See spec/callback-fidelity.md.
54
27
  'preamble-cells': [{ code: 'BF021', severity: 'error' }],
55
- // `style-object-dynamic` / `style-3-signals` no longer pinned a
56
- // `style={{ }}` object literal now lowers to a CSS string with dynamic
57
- // values interpolated (`background-color:{{.Color}};padding:8px`) via
58
- // `tryLowerStyleObject` (#1322).
59
- // `todo-app` / `todo-app-ssr` no longer pinned (#2205) — the conformance
60
- // harness now passes `siblingTemplatesRegistered: true` for fixtures with
61
- // sibling `components`, matching `bf build`'s real semantics, so the
62
- // BF103 loop-body cross-template check no longer fires spuriously.
63
- // (`todo-app-ssr` is still skipped on this adapter via
64
- // `render-divergences.ts` — #2209 — for an unrelated signal-seeding gap;
65
- // `todo-app`'s pre-hydration empty render is unaffected.)
66
- // `static-array-children` no longer pinned (#2208) — `items`'s
67
- // array-literal initializer is now recognized as fully-static and its
68
- // per-item ListItem props/data-key are baked directly into
69
- // `NewStaticListProps`'s constructor (`analyzeBakeableStaticChildLoop`),
70
- // since the loop body is a single child component with a plain-value
71
- // prop set. See #2224 for the narrower remaining gap (a plain-ELEMENT
72
- // loop body over a static array, or an inline/unnamed array literal —
73
- // still refused).
74
- // `([emoji, users]) => ...` is an array-index tuple destructure — #2087
75
- // Phase B's widened gate now admits this shape (`destructure-array-index-in-map`
76
- // exercises the same `segments`-based lowering). The remaining refusal here
77
- // is orthogonal: `entries` is a function-scope local const with a computed
78
- // initializer (`Object.entries(props.reactions ?? {}).filter(...)`) that
79
- // the Go adapter has no binding for (only a STRING-derived local resolves
80
- // to a generated struct field, via `computeDerivedConstFields`/`isStringExpr`)
81
- // — left unchecked this would silently execute-time-fail instead of
82
- // building loud, so `renderLoop` raises BF101 for a bare-identifier loop
83
- // array bound to such a const. See the `renderLoop` comment at the check
84
- // site; Jinja / ERB apply the same narrow check for the same reason.
28
+ // Refused for the COMPUTED loop array (`const entries = Object.entries(...)
29
+ // .filter(...)`), not the destructure param (that lowers, #2087) loud
30
+ // BF101 instead of silently iterating an unbound name zero times.
85
31
  'static-array-from-props': [
86
32
  {
87
33
  code: 'BF101',
@@ -89,17 +35,7 @@ export const conformancePins: ConformancePins = {
89
35
  issue: 'https://github.com/piconic-ai/barefootjs/issues/2321',
90
36
  },
91
37
  ],
92
- // Same computed-const array as above the destructure param itself no
93
- // longer contributes a diagnostic, and BF103 (sibling-imported child
94
- // component in the loop body) no longer fires either now that the
95
- // conformance harness passes `siblingTemplatesRegistered: true` (#2205).
96
- // #2627 graduated: the `/* @client */` twin
97
- // (`static-array-from-props-with-component-client`) now renders clean on
98
- // real Go (its clientOnly nested `<Tag>` loop is excluded from the
99
- // Input/Props/NewProps codegen instead of colliding with the `tags` prop's
100
- // own field — see `GoTemplateAdapter.isOrphanedClientOnlyNested`), so this
101
- // adapter has a verified escape for this fixture like every other one —
102
- // no more `unescapable` line.
38
+ // No BF103 pin: the harness registers sibling templates (#2205).
103
39
  'static-array-from-props-with-component': [
104
40
  {
105
41
  code: 'BF101',
@@ -107,99 +43,13 @@ export const conformancePins: ConformancePins = {
107
43
  issue: 'https://github.com/piconic-ai/barefootjs/issues/2321',
108
44
  },
109
45
  ],
110
- // (`style-3-signals` graduated alongside `style-object-dynamic` see note
111
- // above; the `style={{ }}` object now lowers to a CSS string.)
112
- // (`tagged-template-classname` graduated by #2092 — the tag resolves
113
- // through the interleave-tag catalogue and desugars to an untagged
114
- // template literal, so it lowers like any other className template.)
115
- // #2038: a filter predicate whose body contains a NESTED callback call
116
- // (`t => !picked().some(p => …)` / `t => picked().find(p => …)`). The
117
- // evaluator refuses nested arrows and `renderFilterExpr` has no faithful
118
- // Go form for the inner call (its `call` arm used to silently drop the
119
- // arrow argument and render only the callee) — the compiler is loud
120
- // instead of lossy. The `/* @client */` twin
121
- // (`filter-nested-callback-predicate-client`) has no pin here: it must
122
- // render clean on every adapter, which asserts the suppression contract.
123
- // Faithful lowering tracked: https://github.com/piconic-ai/barefootjs/issues/2320 (successor to #2038)
46
+ // #2038: `renderFilterExpr`'s `call` arm has no faithful Go form for a
47
+ // nested arrow loud BF101 instead of the old silent drop of the arrow
48
+ // argument.
124
49
  'filter-nested-callback-predicate': [
125
50
  { code: 'BF101', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2320' },
126
51
  ],
127
52
  'filter-nested-find-predicate': [{ code: 'BF101', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2320' }],
128
- // #1310 / #2087: rest destructure in .map() callback. `isLowerableLoopDestructure`
129
- // now admits every shape this fixture family exercises — each fixed/rest
130
- // binding resolves via `buildSegmentAccessor`/`buildDestructureBindingMap`
131
- // against a synthetic `$__bf_item0` range var (the reserved `__bf_item`
132
- // name, depth-suffixed): a plain field → `$__bf_item0.Id`, an array-index
133
- // step → `(index $__bf_item0 0)`, an array-rest → `(bf_slice $__bf_item0
134
- // 1)` (composes under `.length` via `member()`'s generic `len <obj>` arm),
135
- // and an object-rest member read (`rest.flag`) → `$__bf_item0.Flag`. A
136
- // `{...rest}` SPREAD (`rest-destructure-object-spread-in-map`) routes
137
- // through the new `bf_omit` runtime helper instead, so the residual omits
138
- // exactly the sibling keys the pattern destructured out. No fixture in
139
- // this family is pinned anymore — all six render to real Go / byte-exact
140
- // HTML (`rest-destructure-object-in-map`, `rest-destructure-object-spread-in-map`,
141
- // `rest-destructure-array-in-map`, `rest-destructure-nested-in-map`,
142
- // `destructure-array-index-in-map`, `destructure-nested-object-in-map`).
143
- // #1443: `[a, b].filter(Boolean).join(' ')` (registry Slot) now
144
- // lowers to `bf_join (bf_filter_truthy (bf_arr ...)) " "`. No
145
- // BF101 expected — pinned positively by the
146
- // `branch-local-filter-join-go` template-output test below.
147
- //
148
- // #1448 Tier A — JS Array / String methods that the Go template
149
- // adapter hasn't lowered yet. Each row drops once the
150
- // corresponding method PR lands. Hono / CSR pass these out of
151
- // the box (they evaluate JS at runtime) so the pin only applies
152
- // here.
153
- //
154
- // `array-includes` / `string-includes` no longer pinned — both
155
- // shapes lower via the shared `array-method` IR + the polymorphic
156
- // `bf_includes` runtime helper that dispatches on
157
- // `reflect.Kind()` (slice/array → element search, string →
158
- // substring search). The condition-position lowering picks up
159
- // the same emit through the `array-method` arm of
160
- // `renderConditionExpr` (#1448 Tier A first PR).
161
- //
162
- // Remaining fixtures land at expression position and surface BF101
163
- // via `convertExpressionToGo`. Distinct codes for the two paths is
164
- // pre-existing adapter behaviour, not something this catalog
165
- // should paper over — pinned literally here.
166
- // `array-indexOf` / `array-lastIndexOf` no longer pinned —
167
- // value-equality `bf_index_of` / `bf_last_index_of` Go runtime
168
- // helpers handle the shape (#1448 Tier A second PR).
169
- // `array-at` no longer pinned — the pre-existing `bf_at` runtime
170
- // helper now lowers `.at(i)` (#1448 Tier A third PR).
171
- // `array-concat` no longer pinned — the new `bf_concat` runtime
172
- // helper merges two arrays into a single `[]any` (#1448 Tier A
173
- // fourth PR).
174
- // `array-slice` no longer pinned — the new `bf_slice` runtime
175
- // helper carves out a sub-range with JS-compat clamping
176
- // (#1448 Tier A fifth PR).
177
- // `array-reverse` / `array-toReversed` no longer pinned —
178
- // both share the `bf_reverse` helper since SSR templates
179
- // render a snapshot and the JS mutate-vs-new distinction has
180
- // no template-level meaning (#1448 Tier A sixth PR).
181
- // `string-toLowerCase` / `string-toUpperCase` no longer pinned —
182
- // pre-existing `bf_lower` / `bf_upper` runtime helpers wire to
183
- // the JS method names at the adapter layer (#1448 Tier A
184
- // seventh + eighth PRs).
185
- // `string-trim` no longer pinned — pre-existing `bf_trim`
186
- // (wraps `strings.TrimSpace`) handles the strip (#1448 Tier A
187
- // ninth PR, closing out Tier A).
188
- // `array-map-function-reference` no longer pinned — a bare-identifier
189
- // `.map(format)` callback now resolves one hop to its declaration
190
- // (`resolveCallbackMethodFunctionReferences`, #2206), the same mechanism
191
- // #2090 established for `.sort(fnref)`.
192
- // `dangerous-inner-html` no longer pinned — a compile-time string-literal
193
- // `dangerouslySetInnerHTML={{ __html: '...' }}` is spliced directly into
194
- // the template as trusted raw text (`resolveDangerousInnerHtml`, #2207).
195
- // A dynamic/signal-derived value now lowers through the `bf_raw_html`
196
- // runtime helper (a `template.HTML`-typed escape bypass, #2319) —
197
- // `dangerous-inner-html-dynamic` is no longer pinned and renders to Hono
198
- // parity, same as the static case.
199
- // #2273: a method call on a prop typed as a built-in host rich type
200
- // (Date, Map, …) has no catalogued lowering in any adapter — this is a
201
- // compiler-level refusal (`checkRichTypeMethodCalls`, wired ahead of
202
- // `adapter.generate()`), not an adapter-specific gap, so it is pinned
203
- // identically across every adapter package including Hono.
204
53
  'date-method-uncatalogued': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2356' }],
54
+ 'rich-prop-client-read': [{ code: 'BF049', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2648' }],
205
55
  }
@@ -1,64 +1,18 @@
1
1
  /**
2
- * Render-level divergences against the shared conformance corpus
3
- * (Priority-12 edge-case sweep, #2168): fixtures that COMPILE clean on
4
- * this adapter but whose rendered output diverges from the Hono
5
- * reference on real Go or whose generated Go fails `go run` outright
6
- * (marked "exit 1" below; those should eventually become loud BF101
7
- * refusals instead of broken codegen).
8
- *
9
- * Consumed by this package's conformance test (its `skipJsx` set is
10
- * derived from these keys, so the skip list and this declaration can't
11
- * drift) and by `packages/compat`, which publishes the entries in the
12
- * fixture-divergences section of `ui/compat.lock.json` — surfaced on
13
- * the docs compatibility-matrix page. Graduating an entry means fixing
14
- * the adapter (or the shared compiler layer) and deleting the line.
15
- *
16
- * Empty — the file's last live entry (`static-array-from-props-with-
17
- * component-client`, #2627) graduated: a clientOnly child-component loop
18
- * whose array is neither a signal/memo nor a direct prop reference (e.g.
19
- * `Object.entries(props.tags).filter(...)` feeding a `<Tag>` loop) is now
20
- * excluded entirely from the Input/Props/NewProps codegen instead of
21
- * colliding with the driving prop's own field — see
22
- * `GoTemplateAdapter.isOrphanedClientOnlyNested`. The caller-side composite
23
- * literal for the `tags` prop now type-checks against its own `interface{}`
24
- * field and `go run`s clean.
25
- * Keep the file (and this header) when the set is empty — the next
26
- * divergence lands here, not in a re-created file.
2
+ * Fixtures that compile clean on this adapter but render divergent from the
3
+ * Hono reference on real Go. The conformance `skipJsx` set and
4
+ * `packages/compat`'s published fixture-divergences both derive from this
5
+ * one object, so the skip list and the declaration can't drift. Keep the
6
+ * file even when the set is empty the next divergence lands here, not in
7
+ * a re-created file.
27
8
  */
28
9
 
29
10
  import type { RenderDivergences } from '@barefootjs/jsx'
30
11
 
31
12
  export const renderDivergences: RenderDivergences = {
32
- // #2630: a prop-backed loop whose BODY is a child component renders the
33
- // loop host empty — compiles clean, `go run`s clean, emits no children.
34
- // Its sibling `static-array-from-props-precomputed` (same fixture,
35
- // inline element body instead of a `<Tag>` child) renders correctly on
36
- // every adapter, so this is specific to child-component bodies over a
37
- // prop-backed array — plausibly the same missing server-side population
38
- // path the `todo-app-ssr` note below describes, where
39
- // `buildDynamicChildLoopSeeding` covers only the SIGNAL-backed dynamic
40
- // case and a prop-backed static child loop has no analogue.
41
- //
42
- // This one costs a user something concrete: the BF101 diagnostic for
43
- // #2321 lists pass-as-prop FIRST because it is the escape that keeps
44
- // full server output, so a go-template user following that advice for a
45
- // child-component loop gets an empty container at SSR with nothing
46
- // reporting it. The fixture asserts the CORRECT (reference) output, so
47
- // deleting this entry once the gap is fixed turns it into the
48
- // regression test.
13
+ // #2630: the exact shape BF101's pass-as-prop suggestion (#2321) steers
14
+ // go-template users into — compiles clean, runs clean, silently renders the
15
+ // loop host empty. Full analysis in the issue.
49
16
  'static-array-from-props-with-component-precomputed':
50
17
  'prop-backed child-component loop renders the loop host empty at SSR (https://github.com/piconic-ai/barefootjs/issues/2630)',
51
-
52
- // `todo-app-ssr` no longer diverges (#2209). Two parts: (1) `.Todos`
53
- // (the loop's DATUM slice) is already seeded straight from the caller's
54
- // Input — the constructor derives it from `initialTodos`, and `[]Todo`
55
- // zero-fills `Editing: false`, so the `.map(t => ({ ...t, editing:
56
- // false }))` transform in the signal initializer was never actually the
57
- // gap on Go, unlike the 7 template-string adapters. (2) The real gap was
58
- // `.TodoItems []TodoItemProps` — the loop-body CHILD COMPONENT slice the
59
- // template actually ranges over — which has no server-side population
60
- // path in this harness (documented as route-handler-populated in
61
- // production). `buildDynamicChildLoopSeeding` (this package's
62
- // `test-render.ts`) now replicates that documented contract for a
63
- // signal-backed dynamic child-component loop.
64
18
  }