@barefootjs/erb 0.31.5 → 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.
- package/dist/adapter/erb-adapter.d.ts +9 -0
- package/dist/adapter/erb-adapter.d.ts.map +1 -1
- package/dist/adapter/index.js +4 -3
- package/dist/conformance-pins.d.ts +6 -8
- package/dist/conformance-pins.d.ts.map +1 -1
- package/dist/index.js +17 -9
- package/dist/render-divergences.d.ts +6 -11
- package/dist/render-divergences.d.ts.map +1 -1
- package/dist/vite.js +8 -3
- package/package.json +5 -5
- package/src/adapter/erb-adapter.ts +13 -2
- package/src/conformance-pins.ts +28 -127
- package/src/render-divergences.ts +6 -16
|
@@ -385,6 +385,15 @@ export declare class ErbAdapter extends BaseAdapter implements IRNodeEmitter<Erb
|
|
|
385
385
|
/** Whether `name` (a signal getter or prop) holds a string value — gates
|
|
386
386
|
* index-access Hash-vs-Array lowering (see `expr/operand.ts`). */
|
|
387
387
|
private _isStringValueName;
|
|
388
|
+
/**
|
|
389
|
+
* `escape` is the structured claim (#2613) — populate it only with kinds
|
|
390
|
+
* a conformance twin actually demonstrates for this shape, since
|
|
391
|
+
* `escape-coverage.test.ts` checks claims against the twins. The prose
|
|
392
|
+
* in `reason` may legitimately offer more than the structured field
|
|
393
|
+
* (ERB's numbered list opens with an inline-rewrite option that no twin
|
|
394
|
+
* proves); prose stays authoritative for humans, this field for
|
|
395
|
+
* machines.
|
|
396
|
+
*/
|
|
388
397
|
private _recordExprBF101;
|
|
389
398
|
/** Internal hook for higher-order: predicate body re-uses the filter emitter. */
|
|
390
399
|
private _renderRubyFilterExprPublic;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"erb-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/erb-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,EACV,WAAW,EAEX,MAAM,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A+E/B;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAI9B;uEACmE;IACnE,OAAO,CAAC,kBAAkB;IAI1B;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAexB,iFAAiF;IACjF,OAAO,CAAC,2BAA2B;CAGpC;AAED,eAAO,MAAM,UAAU,YAAmB,CAAA"}
|
package/dist/adapter/index.js
CHANGED
|
@@ -188768,7 +188768,7 @@ ${whenTrue}
|
|
|
188768
188768
|
this._recordExprBF101(`Loop array \`${arrayName}\` is a component-scope const computed from a runtime expression the ERB adapter cannot evaluate at SSR render time.`, `Options:
|
|
188769
188769
|
1. Inline the array expression directly in the .map() call instead of a preceding const.
|
|
188770
188770
|
2. Mark the loop position as @client-only so the array materialises on the client.
|
|
188771
|
-
3. Precompute the value server-side and pass it in as a prop
|
|
188771
|
+
3. Precompute the value server-side and pass it in as a prop.`, [{ kind: "prop-precompute" }, { kind: "client-directive" }]);
|
|
188772
188772
|
}
|
|
188773
188773
|
}
|
|
188774
188774
|
const rawArray = staticArray ?? this.convertExpressionToRuby(loop.array);
|
|
@@ -189217,7 +189217,7 @@ Options:
|
|
|
189217
189217
|
_isStringValueName(name) {
|
|
189218
189218
|
return this.stringValueNames.has(name);
|
|
189219
189219
|
}
|
|
189220
|
-
_recordExprBF101(message, reason) {
|
|
189220
|
+
_recordExprBF101(message, reason, escape) {
|
|
189221
189221
|
this.errors.push({
|
|
189222
189222
|
code: "BF101",
|
|
189223
189223
|
severity: "error",
|
|
@@ -189230,7 +189230,8 @@ Options:
|
|
|
189230
189230
|
1. Use /* @client */ for client-side evaluation
|
|
189231
189231
|
2. Pre-compute the value in Ruby` : `Options:
|
|
189232
189232
|
1. Use /* @client */ for client-side evaluation
|
|
189233
|
-
2. Pre-compute the value in Ruby
|
|
189233
|
+
2. Pre-compute the value in Ruby`,
|
|
189234
|
+
...escape ? { escape } : {}
|
|
189234
189235
|
}
|
|
189235
189236
|
});
|
|
189236
189237
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Per-fixture build-time contracts for shapes
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* package's own conformance test (as `expectedDiagnostics`) and by
|
|
9
|
-
* `bf compat` (issue-URL 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.
|
|
10
8
|
*/
|
|
11
9
|
import type { ConformancePins } from '@barefootjs/jsx';
|
|
12
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
|
|
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,eAwC7B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -188768,7 +188768,7 @@ ${whenTrue}
|
|
|
188768
188768
|
this._recordExprBF101(`Loop array \`${arrayName}\` is a component-scope const computed from a runtime expression the ERB adapter cannot evaluate at SSR render time.`, `Options:
|
|
188769
188769
|
1. Inline the array expression directly in the .map() call instead of a preceding const.
|
|
188770
188770
|
2. Mark the loop position as @client-only so the array materialises on the client.
|
|
188771
|
-
3. Precompute the value server-side and pass it in as a prop
|
|
188771
|
+
3. Precompute the value server-side and pass it in as a prop.`, [{ kind: "prop-precompute" }, { kind: "client-directive" }]);
|
|
188772
188772
|
}
|
|
188773
188773
|
}
|
|
188774
188774
|
const rawArray = staticArray ?? this.convertExpressionToRuby(loop.array);
|
|
@@ -189217,7 +189217,7 @@ Options:
|
|
|
189217
189217
|
_isStringValueName(name) {
|
|
189218
189218
|
return this.stringValueNames.has(name);
|
|
189219
189219
|
}
|
|
189220
|
-
_recordExprBF101(message, reason) {
|
|
189220
|
+
_recordExprBF101(message, reason, escape) {
|
|
189221
189221
|
this.errors.push({
|
|
189222
189222
|
code: "BF101",
|
|
189223
189223
|
severity: "error",
|
|
@@ -189230,7 +189230,8 @@ Options:
|
|
|
189230
189230
|
1. Use /* @client */ for client-side evaluation
|
|
189231
189231
|
2. Pre-compute the value in Ruby` : `Options:
|
|
189232
189232
|
1. Use /* @client */ for client-side evaluation
|
|
189233
|
-
2. Pre-compute the value in Ruby
|
|
189233
|
+
2. Pre-compute the value in Ruby`,
|
|
189234
|
+
...escape ? { escape } : {}
|
|
189234
189235
|
}
|
|
189235
189236
|
});
|
|
189236
189237
|
}
|
|
@@ -189254,15 +189255,22 @@ var conformancePins = {
|
|
|
189254
189255
|
"tag-cloud": [{ code: "BF021", severity: "error" }],
|
|
189255
189256
|
"preamble-cells": [{ code: "BF021", severity: "error" }],
|
|
189256
189257
|
"static-array-from-props": [
|
|
189257
|
-
{
|
|
189258
|
+
{
|
|
189259
|
+
code: "BF101",
|
|
189260
|
+
severity: "error",
|
|
189261
|
+
issue: "https://github.com/piconic-ai/barefootjs/issues/2321"
|
|
189262
|
+
}
|
|
189258
189263
|
],
|
|
189259
189264
|
"static-array-from-props-with-component": [
|
|
189260
|
-
{
|
|
189261
|
-
|
|
189262
|
-
|
|
189263
|
-
|
|
189265
|
+
{
|
|
189266
|
+
code: "BF101",
|
|
189267
|
+
severity: "error",
|
|
189268
|
+
issue: "https://github.com/piconic-ai/barefootjs/issues/2321"
|
|
189269
|
+
}
|
|
189264
189270
|
],
|
|
189265
|
-
"
|
|
189271
|
+
"filter-nested-find-predicate": [{ code: "BF101", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2320" }],
|
|
189272
|
+
"date-method-uncatalogued": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2356" }],
|
|
189273
|
+
"rich-prop-client-read": [{ code: "BF049", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2648" }]
|
|
189266
189274
|
};
|
|
189267
189275
|
// src/render-divergences.ts
|
|
189268
189276
|
var renderDivergences = {};
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* derived from these keys, so the skip list and this declaration can't
|
|
9
|
-
* drift) and by `packages/compat`, which publishes the entries in the
|
|
10
|
-
* fixture-divergences section of `ui/compat.lock.json` — surfaced on
|
|
11
|
-
* the docs compatibility-matrix page. Graduating an entry means fixing
|
|
12
|
-
* the adapter (or the shared compiler layer) and deleting the line.
|
|
2
|
+
* Fixtures that compile clean on this adapter but render divergent from the
|
|
3
|
+
* Hono reference on real Ruby erb. 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.
|
|
13
8
|
*/
|
|
14
9
|
import type { RenderDivergences } from '@barefootjs/jsx';
|
|
15
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
|
|
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,iBAC/B,CAAA"}
|
package/dist/vite.js
CHANGED
|
@@ -2258,6 +2258,7 @@ var ErrorCodes = {
|
|
|
2258
2258
|
COMPONENT_REQUIRED_PROP_MISSING: "BF046",
|
|
2259
2259
|
JSX_BRANCH_LOCAL_IN_CALLBACK: "BF047",
|
|
2260
2260
|
SIBLING_COMPONENT_NOT_COMPILED: "BF048",
|
|
2261
|
+
RICH_TYPE_PROP_NOT_HYDRATABLE: "BF049",
|
|
2261
2262
|
SHARED_PROGRAM_REQUIRED: "BF050",
|
|
2262
2263
|
WRONG_PACKAGE_IMPORT: "BF051",
|
|
2263
2264
|
BUILTIN_REQUIRES_IMPORT: "BF054",
|
|
@@ -2288,6 +2289,7 @@ var errorMessages = {
|
|
|
2288
2289
|
[ErrorCodes.COMPONENT_REQUIRED_PROP_MISSING]: "Built-in component is missing a required prop.",
|
|
2289
2290
|
[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>`.",
|
|
2290
2291
|
[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.",
|
|
2292
|
+
[ErrorCodes.RICH_TYPE_PROP_NOT_HYDRATABLE]: "Rich-typed prop cannot cross the bf-p hydration boundary as JSON.",
|
|
2291
2293
|
[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.",
|
|
2292
2294
|
[ErrorCodes.WRONG_PACKAGE_IMPORT]: "Import from wrong package.",
|
|
2293
2295
|
[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.",
|
|
@@ -2321,6 +2323,8 @@ var HOST_RICH_TYPE_NAMES = new Set([
|
|
|
2321
2323
|
"BigInt",
|
|
2322
2324
|
"Function"
|
|
2323
2325
|
]);
|
|
2326
|
+
var JSON_REVIVABLE_RICH_TYPE_NAMES = new Set(["Date", "URL"]);
|
|
2327
|
+
var JSON_UNSAFE_RICH_TYPE_NAMES = new Set([...HOST_RICH_TYPE_NAMES].filter((n) => !JSON_REVIVABLE_RICH_TYPE_NAMES.has(n)));
|
|
2324
2328
|
function baseTypeName(raw) {
|
|
2325
2329
|
const idx = raw.indexOf("<");
|
|
2326
2330
|
return (idx === -1 ? raw : raw.slice(0, idx)).trim();
|
|
@@ -6451,7 +6455,7 @@ ${whenTrue}
|
|
|
6451
6455
|
this._recordExprBF101(`Loop array \`${arrayName}\` is a component-scope const computed from a runtime expression the ERB adapter cannot evaluate at SSR render time.`, `Options:
|
|
6452
6456
|
1. Inline the array expression directly in the .map() call instead of a preceding const.
|
|
6453
6457
|
2. Mark the loop position as @client-only so the array materialises on the client.
|
|
6454
|
-
3. Precompute the value server-side and pass it in as a prop
|
|
6458
|
+
3. Precompute the value server-side and pass it in as a prop.`, [{ kind: "prop-precompute" }, { kind: "client-directive" }]);
|
|
6455
6459
|
}
|
|
6456
6460
|
}
|
|
6457
6461
|
const rawArray = staticArray ?? this.convertExpressionToRuby(loop.array);
|
|
@@ -6900,7 +6904,7 @@ Options:
|
|
|
6900
6904
|
_isStringValueName(name) {
|
|
6901
6905
|
return this.stringValueNames.has(name);
|
|
6902
6906
|
}
|
|
6903
|
-
_recordExprBF101(message, reason) {
|
|
6907
|
+
_recordExprBF101(message, reason, escape) {
|
|
6904
6908
|
this.errors.push({
|
|
6905
6909
|
code: "BF101",
|
|
6906
6910
|
severity: "error",
|
|
@@ -6913,7 +6917,8 @@ Options:
|
|
|
6913
6917
|
1. Use /* @client */ for client-side evaluation
|
|
6914
6918
|
2. Pre-compute the value in Ruby` : `Options:
|
|
6915
6919
|
1. Use /* @client */ for client-side evaluation
|
|
6916
|
-
2. Pre-compute the value in Ruby
|
|
6920
|
+
2. Pre-compute the value in Ruby`,
|
|
6921
|
+
...escape ? { escape } : {}
|
|
6917
6922
|
}
|
|
6918
6923
|
});
|
|
6919
6924
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barefootjs/erb",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.7",
|
|
4
4
|
"description": "ERB (Embedded Ruby) adapter for BarefootJS — compiles IR to .erb templates and ships the Ruby rendering backend; runs under any Rack app (Sinatra, Rails)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"directory": "packages/adapter-erb"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@barefootjs/shared": "0.31.
|
|
57
|
+
"@barefootjs/shared": "0.31.7"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@barefootjs/jsx": ">=0.2.0",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@barefootjs/adapter-tests": "0.1.0",
|
|
74
|
-
"@barefootjs/jsx": "0.31.
|
|
75
|
-
"@barefootjs/vite": "0.31.
|
|
76
|
-
"@barefootjs/client": "0.31.
|
|
74
|
+
"@barefootjs/jsx": "0.31.7",
|
|
75
|
+
"@barefootjs/vite": "0.31.7",
|
|
76
|
+
"@barefootjs/client": "0.31.7",
|
|
77
77
|
"typescript": "^5.0.0",
|
|
78
78
|
"vite": "^6.0.0"
|
|
79
79
|
}
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
BindingScope,
|
|
98
98
|
} from '@barefootjs/jsx'
|
|
99
99
|
import { isAriaBooleanAttr, isBooleanResultExpr, isExplicitStringCall } from './boolean-result.ts'
|
|
100
|
-
import type { ParsedExpr, LoweringMatcher, LoopBindingPathSegment } from '@barefootjs/jsx'
|
|
100
|
+
import type { ParsedExpr, LoweringMatcher, LoopBindingPathSegment, EscapeKind } from '@barefootjs/jsx'
|
|
101
101
|
import { BF_SLOT, BF_COND, BF_REGION, escapeHtml } from '@barefootjs/shared'
|
|
102
102
|
|
|
103
103
|
import type { ErbRenderCtx } from './lib/types.ts'
|
|
@@ -981,6 +981,7 @@ export class ErbAdapter extends BaseAdapter implements IRNodeEmitter<ErbRenderCt
|
|
|
981
981
|
this._recordExprBF101(
|
|
982
982
|
`Loop array \`${arrayName}\` is a component-scope const computed from a runtime expression the ERB adapter cannot evaluate at SSR render time.`,
|
|
983
983
|
`Options:\n1. Inline the array expression directly in the .map() call instead of a preceding const.\n2. Mark the loop position as @client-only so the array materialises on the client.\n3. Precompute the value server-side and pass it in as a prop.`,
|
|
984
|
+
[{ kind: 'prop-precompute' }, { kind: 'client-directive' }],
|
|
984
985
|
)
|
|
985
986
|
}
|
|
986
987
|
}
|
|
@@ -1961,7 +1962,16 @@ export class ErbAdapter extends BaseAdapter implements IRNodeEmitter<ErbRenderCt
|
|
|
1961
1962
|
return this.stringValueNames.has(name)
|
|
1962
1963
|
}
|
|
1963
1964
|
|
|
1964
|
-
|
|
1965
|
+
/**
|
|
1966
|
+
* `escape` is the structured claim (#2613) — populate it only with kinds
|
|
1967
|
+
* a conformance twin actually demonstrates for this shape, since
|
|
1968
|
+
* `escape-coverage.test.ts` checks claims against the twins. The prose
|
|
1969
|
+
* in `reason` may legitimately offer more than the structured field
|
|
1970
|
+
* (ERB's numbered list opens with an inline-rewrite option that no twin
|
|
1971
|
+
* proves); prose stays authoritative for humans, this field for
|
|
1972
|
+
* machines.
|
|
1973
|
+
*/
|
|
1974
|
+
private _recordExprBF101(message: string, reason?: string, escape?: ReadonlyArray<{ kind: EscapeKind }>): void {
|
|
1965
1975
|
this.errors.push({
|
|
1966
1976
|
code: 'BF101',
|
|
1967
1977
|
severity: 'error',
|
|
@@ -1971,6 +1981,7 @@ export class ErbAdapter extends BaseAdapter implements IRNodeEmitter<ErbRenderCt
|
|
|
1971
1981
|
message: reason
|
|
1972
1982
|
? `${reason}\n\nOptions:\n1. Use /* @client */ for client-side evaluation\n2. Pre-compute the value in Ruby`
|
|
1973
1983
|
: 'Options:\n1. Use /* @client */ for client-side evaluation\n2. Pre-compute the value in Ruby',
|
|
1984
|
+
...(escape ? { escape } : {}),
|
|
1974
1985
|
},
|
|
1975
1986
|
})
|
|
1976
1987
|
}
|
package/src/conformance-pins.ts
CHANGED
|
@@ -1,151 +1,52 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Per-fixture build-time contracts for shapes
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* package's own conformance test (as `expectedDiagnostics`) and by
|
|
9
|
-
* `bf compat` (issue-URL 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.
|
|
10
8
|
*/
|
|
11
9
|
|
|
12
10
|
import type { ConformancePins } from '@barefootjs/jsx'
|
|
13
11
|
|
|
14
12
|
export const conformancePins: ConformancePins = {
|
|
15
|
-
// Off-subset filter predicate (`typeof`) the compiler can't lower; a
|
|
16
|
-
// JS-runtime target runs it, a DSL adapter surfaces BF021 + `/* @client */`.
|
|
17
|
-
// See spec/callback-fidelity.md.
|
|
18
13
|
'filter-typeof-predicate': [{ code: 'BF021', severity: 'error' }],
|
|
19
14
|
'map-array-builder-body': [{ code: 'BF021', severity: 'error' }],
|
|
20
15
|
'map-array-builder-escaping': [{ code: 'BF021', severity: 'error' }],
|
|
21
|
-
// `.fill(value)` mutates the receiver in place — no template lowering
|
|
22
|
-
// on any DSL adapter; a JS-runtime target runs it, a DSL adapter
|
|
23
|
-
// surfaces BF101 + `/* @client */`. See spec/callback-fidelity.md.
|
|
24
16
|
'fill-unsupported': [{ code: 'BF101', severity: 'error' }],
|
|
25
|
-
// Off-subset `.find()` / `.some()` / `.every()` predicate (`typeof`) the
|
|
26
|
-
// compiler can't lower; a JS-runtime target runs it, a DSL adapter
|
|
27
|
-
// surfaces BF101 + `/* @client */`. See spec/callback-fidelity.md.
|
|
28
17
|
'find-typeof-predicate': [{ code: 'BF101', severity: 'error' }],
|
|
29
18
|
'some-typeof-predicate': [{ code: 'BF101', severity: 'error' }],
|
|
30
19
|
'every-typeof-predicate': [{ code: 'BF101', severity: 'error' }],
|
|
31
|
-
// Off-subset `.reduce()` / `.reduceRight()` body / `.flatMap()`
|
|
32
|
-
// projection (`typeof`) the compiler can't lower; a JS-runtime target
|
|
33
|
-
// runs it, a DSL adapter surfaces BF101 + `/* @client */`.
|
|
34
|
-
// See spec/callback-fidelity.md.
|
|
35
20
|
'reduce-typeof-body': [{ code: 'BF101', severity: 'error' }],
|
|
36
21
|
'reduce-right-typeof-body': [{ code: 'BF101', severity: 'error' }],
|
|
37
22
|
'flatmap-typeof-projection': [{ code: 'BF101', severity: 'error' }],
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
// `/* @client */` (pre-gate this emitted an empty loop body — silent
|
|
42
|
-
// divergence). A pure PROJECTION body (`flatMap(it => it.tags.map(...))`,
|
|
43
|
-
// e.g. the `flatmap-expression-body` fixture) is NOT pinned: it lowers to
|
|
44
|
-
// neutral nested-loop IR this adapter templatizes natively.
|
|
45
|
-
// 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.
|
|
46
26
|
'tag-cloud': [{ code: 'BF021', severity: 'error' }],
|
|
47
|
-
// A keyed `.map()` row body whose preamble builds a JSX leaf from item
|
|
48
|
-
// state (`cells.push(<td>{stateLabel}</td>)`) embedded as `{cells}` — the
|
|
49
|
-
// Stage 3 array-builder carrier, jsRuntime-only: a JS runtime runs it
|
|
50
|
-
// verbatim (and patches the region on same-key updates, #2389), a DSL
|
|
51
|
-
// adapter refuses with BF021 + `/* @client */`. See spec/callback-fidelity.md.
|
|
52
27
|
'preamble-cells': [{ code: 'BF021', severity: 'error' }],
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
// BF103 loop-body cross-template check no longer fires spuriously. (Both
|
|
57
|
-
// fixtures are still skipped on this adapter via `render-divergences.ts`
|
|
58
|
-
// — #2209 — for an unrelated signal-seeding gap.)
|
|
59
|
-
// `static-array-children` no longer pinned (#2208) — `items`'s
|
|
60
|
-
// array-literal initializer is now recognized as fully-static
|
|
61
|
-
// (`resolveStaticLoopSource`) and inlined as a native Ruby array/hash
|
|
62
|
-
// literal in the loop-bound expression, the same way a module-scope
|
|
63
|
-
// const's value is already seeded.
|
|
64
|
-
// `static-array-from-props` / `static-array-from-props-with-component`:
|
|
65
|
-
// the `.map(([emoji, users]) => …)` / `.map(([id, t]) => …)` callback is
|
|
66
|
-
// a plain array-index destructure (the `.filter(...)` runs on a
|
|
67
|
-
// separate `const entries = …` statement, so `loop.filterPredicate` is
|
|
68
|
-
// unset — this is not the `.filter().map(destructure)` chain
|
|
69
|
-
// `isLowerableLoopDestructure` still refuses), and #2087 Phase B's
|
|
70
|
-
// segments-walking accessor DOES lower it natively. But both fixtures'
|
|
71
|
-
// loop array is that same `entries` — a component-scope `const`
|
|
72
|
-
// computed from `Object.entries(props.x).filter(...)`, a runtime
|
|
73
|
-
// expression the ERB adapter has no mechanism to evaluate at SSR
|
|
74
|
-
// render time (only a pure-literal or module-string const is ever
|
|
75
|
-
// inlined; a computed const falls through to an unseeded `v[:entries]`
|
|
76
|
-
// and crashes). This is a pre-existing, orthogonal gap the widened
|
|
77
|
-
// destructure gate merely exposes — it reproduces identically with a
|
|
78
|
-
// non-destructured param (verified) — not a destructure-lowering
|
|
79
|
-
// limitation, so it is NOT part of #2087's scope. Tracked as its own
|
|
80
|
-
// gap under https://github.com/piconic-ai/barefootjs/issues/2321;
|
|
81
|
-
// pinned honestly as BF101 (the adapter's own check, see `renderLoop`'s
|
|
82
|
-
// "Loop array is a bare identifier..." comment) rather than faked as
|
|
83
|
-
// BF104 or silently producing broken Ruby.
|
|
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.
|
|
84
31
|
'static-array-from-props': [
|
|
85
|
-
{
|
|
32
|
+
{
|
|
33
|
+
code: 'BF101',
|
|
34
|
+
severity: 'error',
|
|
35
|
+
issue: 'https://github.com/piconic-ai/barefootjs/issues/2321',
|
|
36
|
+
},
|
|
86
37
|
],
|
|
87
|
-
// BF103
|
|
88
|
-
// conformance harness passes `siblingTemplatesRegistered: true` (#2205).
|
|
38
|
+
// No BF103 pin: the harness registers sibling templates (#2205).
|
|
89
39
|
'static-array-from-props-with-component': [
|
|
90
|
-
{
|
|
40
|
+
{
|
|
41
|
+
code: 'BF101',
|
|
42
|
+
severity: 'error',
|
|
43
|
+
issue: 'https://github.com/piconic-ai/barefootjs/issues/2321',
|
|
44
|
+
},
|
|
91
45
|
],
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
//
|
|
95
|
-
|
|
96
|
-
// member read or a `{...rest}` spread onto an intrinsic element
|
|
97
|
-
// (`rest-destructure-object-in-map`, `rest-destructure-object-spread-in-
|
|
98
|
-
// map`, `rest-destructure-nested-in-map` — native `Hash#except` builds a
|
|
99
|
-
// true residual Hash). None of the six destructure-in-map fixtures are
|
|
100
|
-
// pinned here any more; all render to Hono parity. See
|
|
101
|
-
// `rubyAccessorFromSegments` / the object-rest-in-loop branch in
|
|
102
|
-
// `erb-adapter.ts`'s `renderLoop`.
|
|
103
|
-
// #2038: a filter predicate containing a nested `.find(...)` callback.
|
|
104
|
-
// `find*` returns an element, not a boolean — there is no inline
|
|
105
|
-
// predicate form, and the emitter used to silently degrade the call to
|
|
106
|
-
// its receiver. The nested `.some` sibling
|
|
107
|
-
// (`filter-nested-callback-predicate`) is NOT pinned: like mojo, ERB
|
|
108
|
-
// lowers it to a real inline Ruby block predicate and must render to
|
|
109
|
-
// Hono parity instead.
|
|
110
|
-
// Faithful lowering tracked: https://github.com/piconic-ai/barefootjs/issues/2320 (successor to #2038)
|
|
111
|
-
'filter-nested-find-predicate': [
|
|
112
|
-
{ code: 'BF101', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2320' },
|
|
113
|
-
],
|
|
114
|
-
// #1467 demo-corpus context providers (`radio-group`, `accordion`,
|
|
115
|
-
// `dialog`, `popover`, `select`, `dropdown-menu`, `combobox`,
|
|
116
|
-
// `command`) are NOT pinned — an object-literal provider value lowers
|
|
117
|
-
// to a Ruby Hash via `parseProviderObjectLiteral` (#1897): getter
|
|
118
|
-
// members snapshot their body's SSR value, handler / function-shaped
|
|
119
|
-
// members lower to `nil`.
|
|
120
|
-
//
|
|
121
|
-
// `button` / `kbd` are NOT pinned (unlike xslate): the auto-inferred
|
|
122
|
-
// `<Slot>` sibling's `{...props}` / `{...children.props}` spread onto
|
|
123
|
-
// its root element lowers via Ruby's native `**hash` double-splat in
|
|
124
|
-
// the component-invocation Hash literal — the same shape mojo's EP
|
|
125
|
-
// `%{$props}` flatten already handles.
|
|
126
|
-
//
|
|
127
|
-
// `data-table` is NOT pinned here either — it compiles clean
|
|
128
|
-
// (`selected()[index]` → `index-access`, `.toFixed(2)` →
|
|
129
|
-
// `bf.to_fixed`, `/* @client */` memo SSR-folded) and renders to Hono
|
|
130
|
-
// parity. It stays in `skipMarkerConformance` below for the shared
|
|
131
|
-
// `/* @client */` keyed-map slot-id elision contract only (same as
|
|
132
|
-
// `todo-app`), not a render or BF101 gap.
|
|
133
|
-
//
|
|
134
|
-
// `array-map-function-reference` no longer pinned — a bare-identifier
|
|
135
|
-
// `.map(format)` callback now resolves one hop to its declaration
|
|
136
|
-
// (`resolveCallbackMethodFunctionReferences`, #2206), the same mechanism
|
|
137
|
-
// #2090 established for `.sort(fnref)`.
|
|
138
|
-
// `dangerous-inner-html` no longer pinned — a compile-time string-literal
|
|
139
|
-
// `dangerouslySetInnerHTML={{ __html: '...' }}` is spliced directly into
|
|
140
|
-
// the template as trusted raw text (`resolveDangerousInnerHtml`, #2207).
|
|
141
|
-
// A dynamic/signal-derived value now lowers through ERB's unescaped
|
|
142
|
-
// `<%= %>` (dropping the `bf.h(...)` escape wrap, #2319) — `dangerous-inner-
|
|
143
|
-
// html-dynamic` is no longer pinned and renders to Hono parity, same as the
|
|
144
|
-
// static case.
|
|
145
|
-
// #2273: a method call on a prop typed as a built-in host rich type
|
|
146
|
-
// (Date, Map, …) has no catalogued lowering in any adapter — this is a
|
|
147
|
-
// compiler-level refusal (`checkRichTypeMethodCalls`, wired ahead of
|
|
148
|
-
// `adapter.generate()`), not an adapter-specific gap, so it is pinned
|
|
149
|
-
// identically across every adapter package including Hono.
|
|
46
|
+
// Only the `.find` variant is pinned — `find*` returns an element, not a
|
|
47
|
+
// boolean, so there is no inline predicate form; the nested-`.some` sibling
|
|
48
|
+
// lowers to a real inline Ruby block and must render to Hono parity instead.
|
|
49
|
+
'filter-nested-find-predicate': [{ code: 'BF101', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2320' }],
|
|
150
50
|
'date-method-uncatalogued': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2356' }],
|
|
51
|
+
'rich-prop-client-read': [{ code: 'BF049', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2648' }],
|
|
151
52
|
}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* derived from these keys, so the skip list and this declaration can't
|
|
9
|
-
* drift) and by `packages/compat`, which publishes the entries in the
|
|
10
|
-
* fixture-divergences section of `ui/compat.lock.json` — surfaced on
|
|
11
|
-
* the docs compatibility-matrix page. Graduating an entry means fixing
|
|
12
|
-
* the adapter (or the shared compiler layer) and deleting the line.
|
|
2
|
+
* Fixtures that compile clean on this adapter but render divergent from the
|
|
3
|
+
* Hono reference on real Ruby erb. 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.
|
|
13
8
|
*/
|
|
14
9
|
|
|
15
10
|
import type { RenderDivergences } from '@barefootjs/jsx'
|
|
16
11
|
|
|
17
12
|
export const renderDivergences: RenderDivergences = {
|
|
18
|
-
// `todo-app` / `todo-app-ssr` no longer diverge (#2209) — the shared
|
|
19
|
-
// `evaluateSignalInit` (`@barefootjs/jsx`, sandboxed real-JS evaluation
|
|
20
|
-
// instead of a fixed regex-shape catalogue) now correctly seeds `todos`
|
|
21
|
-
// from `(props.initialTodos ?? []).map(t => ({ ...t, editing: false }))`.
|
|
22
|
-
|
|
23
13
|
}
|