@barefootjs/hono 0.32.0 → 0.33.1
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/conformance-pins.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/vite.js +6 -0
- package/package.json +2 -2
- package/src/conformance-pins.ts +7 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conformance-pins.d.ts","sourceRoot":"","sources":["../src/conformance-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"conformance-pins.d.ts","sourceRoot":"","sources":["../src/conformance-pins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,eAU7B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -669,7 +669,9 @@ var honoAdapter = new HonoAdapter;
|
|
|
669
669
|
// src/conformance-pins.ts
|
|
670
670
|
var conformancePins = {
|
|
671
671
|
"date-method-uncatalogued": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2356" }],
|
|
672
|
-
"rich-prop-client-read": [{ code: "BF049", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2648" }]
|
|
672
|
+
"rich-prop-client-read": [{ code: "BF049", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2648" }],
|
|
673
|
+
"jsx-element-prop-ternary": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2667" }],
|
|
674
|
+
"jsx-element-prop-array": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2667" }]
|
|
673
675
|
};
|
|
674
676
|
export {
|
|
675
677
|
honoAdapter,
|
package/dist/vite.js
CHANGED
|
@@ -427,6 +427,7 @@ var ErrorCodes = {
|
|
|
427
427
|
MISSING_KEY_IN_LIST: "BF023",
|
|
428
428
|
MISSING_KEY_IN_NESTED_LIST: "BF024",
|
|
429
429
|
UNSUPPORTED_DESTRUCTURE_REST: "BF025",
|
|
430
|
+
RETURN_VALUE_NOT_JSX: "BF027",
|
|
430
431
|
PROPS_DESTRUCTURING: "BF043",
|
|
431
432
|
SIGNAL_GETTER_NOT_CALLED: "BF044",
|
|
432
433
|
JSX_IN_LOCAL_FUNCTION: "BF045",
|
|
@@ -458,6 +459,7 @@ var errorMessages = {
|
|
|
458
459
|
[ErrorCodes.MISSING_KEY_IN_LIST]: "Missing key attribute in list rendering. Add a key prop for efficient updates",
|
|
459
460
|
[ErrorCodes.MISSING_KEY_IN_NESTED_LIST]: "Nested .map() loop requires key attribute for event delegation. Add a key prop to elements in the inner loop",
|
|
460
461
|
[ErrorCodes.UNSUPPORTED_DESTRUCTURE_REST]: "Computed property key in .map() callback destructure is not supported. Rewrite the callback to destructure explicit bindings (e.g., `({ a, b }) => ...`) so the compiler can rewrite references to per-item signal accessors.",
|
|
462
|
+
[ErrorCodes.RETURN_VALUE_NOT_JSX]: "Component's return value is not recognized as JSX — return the JSX expression directly instead of binding it to a local variable first.",
|
|
461
463
|
[ErrorCodes.PROPS_DESTRUCTURING]: "Props destructuring in function parameters breaks reactivity. Use props object directly.",
|
|
462
464
|
[ErrorCodes.SIGNAL_GETTER_NOT_CALLED]: "Signal/memo getter passed without calling it. Use getter() to read the value.",
|
|
463
465
|
[ErrorCodes.JSX_IN_LOCAL_FUNCTION]: "Local function returns JSX but cannot be inlined. Extract it as a top-level PascalCase component or use a single return statement.",
|
|
@@ -1076,6 +1078,8 @@ function matchToLocaleDateStringCall(callee, args, metadata) {
|
|
|
1076
1078
|
let tz = null;
|
|
1077
1079
|
const probeOptions = {};
|
|
1078
1080
|
for (const prop of options.properties) {
|
|
1081
|
+
if (prop.kind === "spread")
|
|
1082
|
+
return null;
|
|
1079
1083
|
if (prop.value.kind !== "literal" || prop.value.literalType !== "string")
|
|
1080
1084
|
return null;
|
|
1081
1085
|
const value = String(prop.value.value);
|
|
@@ -2256,6 +2260,8 @@ function matchQueryHrefCall(callee, args, localNames) {
|
|
|
2256
2260
|
return null;
|
|
2257
2261
|
const triples = [];
|
|
2258
2262
|
for (const p of obj.properties) {
|
|
2263
|
+
if (p.kind === "spread")
|
|
2264
|
+
return null;
|
|
2259
2265
|
const v = p.value;
|
|
2260
2266
|
if (v.kind === "conditional" && isOmitBranch(v.alternate)) {
|
|
2261
2267
|
triples.push({ guard: v.test, key: p.key, value: v.consequent });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barefootjs/hono",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.1",
|
|
4
4
|
"description": "Hono integration for BarefootJS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@barefootjs/adapter-tests": "0.1.0",
|
|
125
|
-
"@barefootjs/vite": "0.
|
|
125
|
+
"@barefootjs/vite": "0.33.1",
|
|
126
126
|
"@types/jsdom": "^27.0.0",
|
|
127
127
|
"hono": "^4.6.0",
|
|
128
128
|
"jsdom": "^27.3.0",
|
package/src/conformance-pins.ts
CHANGED
|
@@ -14,4 +14,11 @@ import type { ConformancePins } from '@barefootjs/jsx'
|
|
|
14
14
|
export const conformancePins: ConformancePins = {
|
|
15
15
|
'date-method-uncatalogued': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2356' }],
|
|
16
16
|
'rich-prop-client-read': [{ code: 'BF049', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2648' }],
|
|
17
|
+
// #2667: a ternary/array LITERALLY WRAPPING JSX at a non-children prop
|
|
18
|
+
// position (e.g. `header={cond ? <a/> : <b/>}`) is refused ahead of
|
|
19
|
+
// `adapter.generate()` in the shared jsx-to-ir.ts phase, so it is pinned
|
|
20
|
+
// identically on every adapter (including Hono) — same reasoning as
|
|
21
|
+
// `rich-prop-client-read` above.
|
|
22
|
+
'jsx-element-prop-ternary': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2667' }],
|
|
23
|
+
'jsx-element-prop-array': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2667' }],
|
|
17
24
|
}
|