@barefootjs/mojolicious 0.19.1 → 0.21.0

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 +1 @@
1
- {"version":3,"file":"array-method.d.ts","sourceRoot":"","sources":["../../../src/adapter/expr/array-method.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,SAAS,EACV,MAAM,iBAAiB,CAAA;AAExB;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,UAAU,EAAE,EAClB,IAAI,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,MAAM,GAC9B,MAAM,CAgOR;AA6BD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EAAE,EAChB,IAAI,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,MAAM,GAC9B,MAAM,GAAG,IAAI,CAOf;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EAAE,EAChB,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,MAAM,GAAG,OAAO,EAC3B,IAAI,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,MAAM,GAC9B,MAAM,GAAG,IAAI,CAmBf;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,MAAM,EAC/B,OAAO,CAAC,EAAE,OAAO,GAChB,MAAM,GAAG,IAA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C,EAAE,UAAU,KAAK,MAAM,GAC9B,MAAM,CAoBR"}
@@ -149,7 +149,7 @@ function renderArrayMethod(method, object, args, emit) {
149
149
  case "join": {
150
150
  const obj = emit(object);
151
151
  const sep = args.length >= 1 ? emit(args[0]) : `','`;
152
- return `join(${sep}, @{${obj}})`;
152
+ return `bf->join(${obj}, ${sep})`;
153
153
  }
154
154
  case "includes": {
155
155
  const obj = emit(object);
@@ -1614,7 +1614,7 @@ ${alternate}
1614
1614
  renderFragment(fragment) {
1615
1615
  const children = this.renderChildren(fragment.children);
1616
1616
  if (fragment.needsScopeComment) {
1617
- return `<%== bf->scope_comment %>${children}`;
1617
+ return `<%== bf->scope_comment %>${children}<%== bf->scope_comment_end %>`;
1618
1618
  }
1619
1619
  return children;
1620
1620
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mojo-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/mojo-adapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EACV,WAAW,EAEX,MAAM,EACN,SAAS,EACT,MAAM,EACN,YAAY,EACZ,aAAa,EACb,MAAM,EACN,WAAW,EACX,UAAU,EACV,MAAM,EACN,aAAa,EACb,UAAU,EACV,OAAO,EAMP,yBAAyB,EAE1B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAE3B,KAAK,aAAa,EAClB,KAAK,UAAU,EA8BhB,MAAM,iBAAiB,CAAA;AAKxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AA8BnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAuCxD,qBAAa,WAAY,SAAQ,WAAY,YAAW,aAAa,CAAC,aAAa,CAAC;IAClF,IAAI,SAAgB;IACpB,SAAS,SAAa;IACtB,qBAAqB,UAAO;IAG5B,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BAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvC;IAED,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvC;IAMD;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAkC5B,OAAO,CAAC,iCAAiC;IAmCzC;;;;;;;OAOG;IACH,OAAO,CAAC,gCAAgC;IAmBxC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,+BAA+B;IA8BvC;;;;;;;OAOG;IACH,OAAO,KAAK,OAAO,GAUlB;IAED;;;;;OAKG;IACH,OAAO,KAAK,SAAS,GAQpB;IAED,sEAAsE;IACtE,OAAO,KAAK,OAAO,GAElB;IAED,OAAO,CAAC,uBAAuB;IAgF/B;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAI9B;;;;OAIG;IACH;4EACwE;IACxE,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,gBAAgB;IAcxB,iFAAiF;IACjF,OAAO,CAAC,2BAA2B;CAGpC;AAED,eAAO,MAAM,WAAW,aAAoB,CAAA"}
package/dist/build.js CHANGED
@@ -149,7 +149,7 @@ function renderArrayMethod(method, object, args, emit) {
149
149
  case "join": {
150
150
  const obj = emit(object);
151
151
  const sep = args.length >= 1 ? emit(args[0]) : `','`;
152
- return `join(${sep}, @{${obj}})`;
152
+ return `bf->join(${obj}, ${sep})`;
153
153
  }
154
154
  case "includes": {
155
155
  const obj = emit(object);
@@ -1614,7 +1614,7 @@ ${alternate}
1614
1614
  renderFragment(fragment) {
1615
1615
  const children = this.renderChildren(fragment.children);
1616
1616
  if (fragment.needsScopeComment) {
1617
- return `<%== bf->scope_comment %>${children}`;
1617
+ return `<%== bf->scope_comment %>${children}<%== bf->scope_comment_end %>`;
1618
1618
  }
1619
1619
  return children;
1620
1620
  }
@@ -1 +1 @@
1
- {"version":3,"file":"conformance-pins.d.ts","sourceRoot":"","sources":["../src/conformance-pins.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,eAmI7B,CAAA"}
1
+ {"version":3,"file":"conformance-pins.d.ts","sourceRoot":"","sources":["../src/conformance-pins.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,eAyI7B,CAAA"}
package/dist/index.js CHANGED
@@ -149,7 +149,7 @@ function renderArrayMethod(method, object, args, emit) {
149
149
  case "join": {
150
150
  const obj = emit(object);
151
151
  const sep = args.length >= 1 ? emit(args[0]) : `','`;
152
- return `join(${sep}, @{${obj}})`;
152
+ return `bf->join(${obj}, ${sep})`;
153
153
  }
154
154
  case "includes": {
155
155
  const obj = emit(object);
@@ -1614,7 +1614,7 @@ ${alternate}
1614
1614
  renderFragment(fragment) {
1615
1615
  const children = this.renderChildren(fragment.children);
1616
1616
  if (fragment.needsScopeComment) {
1617
- return `<%== bf->scope_comment %>${children}`;
1617
+ return `<%== bf->scope_comment %>${children}<%== bf->scope_comment_end %>`;
1618
1618
  }
1619
1619
  return children;
1620
1620
  }
@@ -1912,7 +1912,8 @@ var conformancePins = {
1912
1912
  "filter-nested-find-predicate": [
1913
1913
  { code: "BF101", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2038" }
1914
1914
  ],
1915
- "dangerous-inner-html-dynamic": [{ code: "BF101", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2215" }]
1915
+ "dangerous-inner-html-dynamic": [{ code: "BF101", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2215" }],
1916
+ "date-method-uncatalogued": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2274" }]
1916
1917
  };
1917
1918
  // src/render-divergences.ts
1918
1919
  var renderDivergences = {};
@@ -1,5 +1,5 @@
1
1
  package BarefootJS::Backend::Mojo;
2
- our $VERSION = "0.19.0";
2
+ our $VERSION = "0.20.0";
3
3
  use Mojo::Base -base, -signatures;
4
4
 
5
5
  use Mojo::ByteStream qw(b);
@@ -1,5 +1,5 @@
1
1
  package Mojolicious::Plugin::BarefootJS::DevReload;
2
- our $VERSION = "0.19.0";
2
+ our $VERSION = "0.20.0";
3
3
  use Mojo::Base 'Mojolicious::Plugin', -signatures;
4
4
 
5
5
  =head1 NAME
@@ -1,5 +1,5 @@
1
1
  package Mojolicious::Plugin::BarefootJS;
2
- our $VERSION = "0.19.0";
2
+ our $VERSION = "0.20.0";
3
3
  use Mojo::Base 'Mojolicious::Plugin', -signatures;
4
4
 
5
5
  use Mojo::File qw(path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/mojolicious",
3
- "version": "0.19.1",
3
+ "version": "0.21.0",
4
4
  "description": "Mojolicious EP template adapter for BarefootJS - generates .html.ep files from IR",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "directory": "packages/adapter-mojolicious"
53
53
  },
54
54
  "dependencies": {
55
- "@barefootjs/shared": "0.19.1"
55
+ "@barefootjs/shared": "0.21.0"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@barefootjs/jsx": ">=0.2.0",
@@ -60,6 +60,6 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@barefootjs/adapter-tests": "0.1.0",
63
- "@barefootjs/jsx": "0.19.1"
63
+ "@barefootjs/jsx": "0.21.0"
64
64
  }
65
65
  }
@@ -59,17 +59,7 @@ runAdapterConformanceTests({
59
59
  // #1467 Phase 2e: same `/* @client */` keyed-map elision (data-table).
60
60
  'data-table',
61
61
  ]),
62
- skipDataPoints: new Set<string>([
63
- // #2260 — controlled boolean props: the SSR seed evaluates only the
64
- // static fallback of `props.X ?? internal()` chains.
65
- 'toggle:gen:pressed:true',
66
- 'switch:gen:checked:true',
67
- 'checkbox:gen:checked:true',
68
- // #2262 — dynamic `.flat` depth 0/negative violates the documented
69
- // shallow-copy contract.
70
- 'array-flat-dynamic-depth:gen:depth:zero',
71
- 'array-flat-dynamic-depth:gen:depth:negative',
72
- ]),
62
+ skipDataPoints: new Set<string>(),
73
63
  onRenderError: (err, id) => {
74
64
  if (err instanceof PerlNotAvailableError) {
75
65
  console.log(`Skipping [${id}]: ${err.message}`)
@@ -103,6 +93,37 @@ function compileAndGenerate(source: string, adapter?: MojoAdapter) {
103
93
  // Mojo-Specific Tests
104
94
  // =============================================================================
105
95
 
96
+ describe('MojoAdapter - fragment scope comment begin/end pairing (#2289)', () => {
97
+ // A fragment-rooted component's scope comment needs a paired END marker
98
+ // immediately after its last top-level node — without it, client-side
99
+ // queries from the fragment scope leak onto later siblings owned by the
100
+ // parent. `wrapWithScopeComment`'s Hono shape is the reference; this
101
+ // pins the Mojo `renderFragment` mirror.
102
+ test('emits bf->scope_comment before and bf->scope_comment_end after the fragment children', () => {
103
+ const { template } = compileAndGenerate(`
104
+ export function FragmentDemo() {
105
+ return <><span>A</span><span>B</span></>
106
+ }
107
+ `)
108
+ expect(template).toContain('<%== bf->scope_comment %>')
109
+ expect(template).toContain('<%== bf->scope_comment_end %>')
110
+ expect(template.indexOf('bf->scope_comment %')).toBeLessThan(template.indexOf('bf->scope_comment_end %'))
111
+ // The end marker directly follows the fragment's rendered children —
112
+ // no other node interposes between the last child and the end marker.
113
+ const endIdx = template.indexOf('bf->scope_comment_end')
114
+ expect(template.slice(endIdx - 40, endIdx)).toContain('<span>B</span>')
115
+ })
116
+
117
+ test('does not emit the end marker for a non-fragment (single-root) component', () => {
118
+ const { template } = compileAndGenerate(`
119
+ export function Single() {
120
+ return <div>A</div>
121
+ }
122
+ `)
123
+ expect(template).not.toContain('scope_comment')
124
+ })
125
+ })
126
+
106
127
  describe('MojoAdapter - conditional inline-object spread (textarea aria-describedby)', () => {
107
128
  // `{...(cond ? { 'aria-describedby': cond } : {})}` lowers to a Perl
108
129
  // inline ternary of hashrefs so the falsy `{}` branch OMITS the key
@@ -915,7 +936,7 @@ export function C() {
915
936
  // filter, `.join`) hit a separate refusal gate and the chain
916
937
  // emitted BF101 — making the scaffold `<Button>` / `<Card>`
917
938
  // unusable on Mojo. The fix lowers all three to Embedded Perl
918
- // (`join(' ', @{[grep { $_ } @{[...]}]})`), unblocking the
939
+ // (`bf->join([grep { $_ } @{[...]}], ' ')`), unblocking the
919
940
  // registry surface. The #1421 recursion guard stays in place
920
941
  // as defence in depth for other unsupported shapes, but this
921
942
  // specific chain no longer reaches the loop because the parser
@@ -938,7 +959,7 @@ export { Slot }
938
959
  )
939
960
  expect(result.errors?.filter(e => e.code === 'BF101') ?? []).toEqual([])
940
961
  const template = result.files.find(f => f.path.endsWith('.html.ep'))?.content ?? ''
941
- expect(template).toContain(`join(' ', @{[grep { $_ } @{[$className]}]})`)
962
+ expect(template).toContain(`bf->join([grep { $_ } @{[$className]}], ' ')`)
942
963
  })
943
964
 
944
965
  test('lowers .includes(x) on an array prop via bf->includes(...) (#1448 Tier A)', () => {
@@ -1168,7 +1189,7 @@ export { A }`, 'A.tsx', { adapter })
1168
1189
  export { A }`, 'A.tsx', { adapter })
1169
1190
  expect(result.errors?.filter(e => e.code === 'BF101') ?? []).toEqual([])
1170
1191
  const template = result.files.find(f => f.path.endsWith('.html.ep'))?.content ?? ''
1171
- expect(template).toContain("join(' ', @{bf->reverse($items)})")
1192
+ expect(template).toContain("bf->join(bf->reverse($items), ' ')")
1172
1193
  expect(template).not.toContain('$bf->reverse')
1173
1194
  })
1174
1195
 
@@ -1180,7 +1201,7 @@ export { A }`, 'A.tsx', { adapter })
1180
1201
  export { A }`, 'A.tsx', { adapter })
1181
1202
  expect(result.errors?.filter(e => e.code === 'BF101') ?? []).toEqual([])
1182
1203
  const template = result.files.find(f => f.path.endsWith('.html.ep'))?.content ?? ''
1183
- expect(template).toContain("join(' ', @{bf->reverse($items)})")
1204
+ expect(template).toContain("bf->join(bf->reverse($items), ' ')")
1184
1205
  })
1185
1206
 
1186
1207
  test('lowers .slice(start, end).join(\' \') via bf->slice + join (#1448 Tier A)', () => {
@@ -1192,7 +1213,7 @@ export { A }`, 'A.tsx', { adapter })
1192
1213
  export { A }`, 'A.tsx', { adapter })
1193
1214
  expect(result.errors?.filter(e => e.code === 'BF101') ?? []).toEqual([])
1194
1215
  const template = result.files.find(f => f.path.endsWith('.html.ep'))?.content ?? ''
1195
- expect(template).toContain("join(' ', @{bf->slice($items, 1, 3)})")
1216
+ expect(template).toContain("bf->join(bf->slice($items, 1, 3), ' ')")
1196
1217
  expect(template).not.toContain('$bf->slice')
1197
1218
  })
1198
1219
 
@@ -1206,7 +1227,7 @@ export { A }`, 'A.tsx', { adapter })
1206
1227
  export { A }`, 'A.tsx', { adapter })
1207
1228
  expect(result.errors?.filter(e => e.code === 'BF101') ?? []).toEqual([])
1208
1229
  const template = result.files.find(f => f.path.endsWith('.html.ep'))?.content ?? ''
1209
- expect(template).toContain("join(' ', @{bf->slice($items, 2, undef)})")
1230
+ expect(template).toContain("bf->join(bf->slice($items, 2, undef), ' ')")
1210
1231
  })
1211
1232
 
1212
1233
  test('lowers .concat(other).join(\' \') via bf->concat + join (#1448 Tier A)', () => {
@@ -1222,7 +1243,7 @@ export { A }`, 'A.tsx', { adapter })
1222
1243
  export { A }`, 'A.tsx', { adapter })
1223
1244
  expect(result.errors?.filter(e => e.code === 'BF101') ?? []).toEqual([])
1224
1245
  const template = result.files.find(f => f.path.endsWith('.html.ep'))?.content ?? ''
1225
- expect(template).toContain("join(' ', @{bf->concat($left, $right)})")
1246
+ expect(template).toContain("bf->join(bf->concat($left, $right), ' ')")
1226
1247
  expect(template).not.toContain('$bf->concat')
1227
1248
  })
1228
1249
 
@@ -1484,10 +1505,10 @@ describe('MojoAdapter - #1448 Tier A/B fixture-driven lowering pins', () => {
1484
1505
  { fixture: arraySliceFixture, expect: 'bf->slice($items, 1, 3)' },
1485
1506
  // #1448 full-arity — zero-arg defaults.
1486
1507
  { fixture: arraySliceCopyFixture, expect: 'bf->slice($items, 0, undef)' },
1487
- { fixture: arrayJoinDefaultFixture, expect: `join(',', @{$items})` },
1508
+ { fixture: arrayJoinDefaultFixture, expect: `bf->join($items, ',')` },
1488
1509
  // `.at()` → index 0; `.concat()` → the receiver (shallow copy).
1489
1510
  { fixture: arrayAtDefaultFixture, expect: 'bf->at($items, 0)' },
1490
- { fixture: arrayConcatCopyFixture, expect: `join('|', @{$items})` },
1511
+ { fixture: arrayConcatCopyFixture, expect: `bf->join($items, '|')` },
1491
1512
  { fixture: arrayReverseFixture, expect: 'bf->reverse($items)' },
1492
1513
  // .toReversed shares the helper with .reverse — pinning both
1493
1514
  // routings catches a future divergence between them.
@@ -1497,7 +1518,7 @@ describe('MojoAdapter - #1448 Tier A/B fixture-driven lowering pins', () => {
1497
1518
  { fixture: stringTrimFixture, expect: 'bf->trim($value)' },
1498
1519
  // #1448 Tier B — string → array. `.split(',')` lowers to
1499
1520
  // `bf->split`, here chained into `.join('|')` so the array ref is
1500
- // observable (`join('|', @{bf->split($value, ',')})`).
1521
+ // observable (`bf->join(bf->split($value, ','), '|')`).
1501
1522
  { fixture: stringSplitFixture, expect: `bf->split($value, ',')` },
1502
1523
  { fixture: stringSplitLimitFixture, expect: `bf->split($value, ',', 2)` },
1503
1524
  // #1448 Tier B — string → boolean at condition position (`% if`).
@@ -1687,7 +1708,7 @@ export { C }
1687
1708
  // projects each element (no flatten) and composes through `.join`.
1688
1709
  test('.map(t => `#${t}`).join(" ") emits bf->map_eval composed into join', () => {
1689
1710
  const t = emitMap("tags.map(t => `#${t}`).join(' ')")
1690
- expect(t).toContain(`join(' ', @{bf->map_eval($tags,`)
1711
+ expect(t).toContain(`bf->join(bf->map_eval($tags,`)
1691
1712
  expect(t).toContain(`"kind":"template-literal"`)
1692
1713
  })
1693
1714
 
@@ -35,14 +35,20 @@ export function renderArrayMethod(
35
35
  ): string {
36
36
  switch (method) {
37
37
  case 'join': {
38
- // arr.join(sep) → join(sep, @{arr}). The default `${obj}->{join}`
39
- // hash-lookup fallback would emit invalid Perl, which is why the
40
- // IR carves out a dedicated method node instead of routing
41
- // through the generic call dispatcher. `.join()` defaults the
42
- // separator to `,` (JS) and ignores any extra argument.
38
+ // arr.join(sep) → bf->join(arr, sep), NOT Perl's native `join`
39
+ // builtin directly on `@{arr}` a nested-array element (e.g.
40
+ // `.flat(0)`'s shallow copy) would stringify to its Perl memory
41
+ // address ("ARRAY(0x...)") under native `join`'s scalar coercion
42
+ // instead of JS's recursive comma-join (#2262/#2272). `bf->join`
43
+ // (BarefootJS.pm) routes each element through `string()` first.
44
+ // The default `${obj}->{join}` hash-lookup fallback would emit
45
+ // invalid Perl, which is why the IR carves out a dedicated method
46
+ // node instead of routing through the generic call dispatcher.
47
+ // `.join()` defaults the separator to `,` (JS) and ignores any
48
+ // extra argument.
43
49
  const obj = emit(object)
44
50
  const sep = args.length >= 1 ? emit(args[0]) : `','`
45
- return `join(${sep}, @{${obj}})`
51
+ return `bf->join(${obj}, ${sep})`
46
52
  }
47
53
  case 'includes': {
48
54
  // Both `arr.includes(x)` and `str.includes(sub)` route here —
@@ -1257,7 +1257,10 @@ export class MojoAdapter extends BaseAdapter implements IRNodeEmitter<MojoRender
1257
1257
  private renderFragment(fragment: IRFragment): string {
1258
1258
  const children = this.renderChildren(fragment.children)
1259
1259
  if (fragment.needsScopeComment) {
1260
- return `<%== bf->scope_comment %>${children}`
1260
+ // End marker bounds the scope's sibling range — without it, queries
1261
+ // from the fragment scope leak onto later siblings owned by the
1262
+ // parent (#2289).
1263
+ return `<%== bf->scope_comment %>${children}<%== bf->scope_comment_end %>`
1261
1264
  }
1262
1265
  return children
1263
1266
  }
@@ -88,7 +88,7 @@ export const conformancePins: ConformancePins = {
88
88
  // below for the shared `/* @client */` keyed-map slot-id elision
89
89
  // contract (same as `todo-app`), not a render or BF101 gap.
90
90
  // #1443: `[a, b].filter(Boolean).join(' ')` (the registry Slot's
91
- // shape) now lowers to `join(' ', @{[grep { $_ } @{[$a, $b]}]})`.
91
+ // shape) now lowers to `bf->join([grep { $_ } @{[$a, $b]}], ' ')`.
92
92
  // No BF101 expected — pinned positively via the
93
93
  // `branch-local-filter-join` template-output test below.
94
94
  //
@@ -139,4 +139,10 @@ export const conformancePins: ConformancePins = {
139
139
  // A dynamic/signal-derived value still refuses with BF101 — see the
140
140
  // `dangerous-inner-html-dynamic` fixture/pin below (tracked: #2215).
141
141
  'dangerous-inner-html-dynamic': [{ code: 'BF101', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2215' }],
142
+ // #2273: a method call on a prop typed as a built-in host rich type
143
+ // (Date, Map, …) has no catalogued lowering in any adapter — this is a
144
+ // compiler-level refusal (`checkRichTypeMethodCalls`, wired ahead of
145
+ // `adapter.generate()`), not an adapter-specific gap, so it is pinned
146
+ // identically across every adapter package including Hono.
147
+ 'date-method-uncatalogued': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2274' }],
142
148
  }
@@ -711,6 +711,15 @@ function toPerlLiteral(value: unknown): string {
711
711
  // 0/1 would conflate genuine numeric values with booleans and
712
712
  // turn `disabled: false` into `disabled="0"` (#1413 review).
713
713
  if (typeof value === 'boolean') return value ? 'Mojo::JSON::true' : 'Mojo::JSON::false'
714
+ if (value instanceof Date) {
715
+ // A Date prop crosses the language boundary as its ISO-8601 string —
716
+ // the shared `date()` runtime helper (#2274/#2288) accepts an ISO
717
+ // string as well as a native Perl date type. MUST come before the
718
+ // generic `value && typeof value === 'object'` branch below, which
719
+ // would otherwise `Object.entries()` a Date's (non-enumerable)
720
+ // internals into an empty hashref literal, silently erasing the value.
721
+ return perlSingleQuote(value.toISOString())
722
+ }
714
723
  // Array → Perl arrayref literal, recursing so element types are
715
724
  // serialised correctly. Previously this returned the literal `[]`
716
725
  // — fine when the only caller was the spread-bag initial-value