@barefootjs/hono 0.35.0 → 0.35.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.
@@ -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,eAiB7B,CAAA"}
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,eAuB7B,CAAA"}
package/dist/index.js CHANGED
@@ -666,9 +666,9 @@ var honoAdapter = new HonoAdapter;
666
666
  var conformancePins = {
667
667
  "date-method-uncatalogued": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2356" }],
668
668
  "rich-prop-client-read": [{ code: "BF049", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2648" }],
669
- "jsx-element-prop-ternary": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2667" }],
670
- "jsx-element-prop-array": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2667" }],
671
- "namespace-import-primitive": [{ code: "BF013", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2771" }]
669
+ "jsx-element-prop-ternary": [{ code: "BF021", severity: "error" }],
670
+ "jsx-element-prop-array": [{ code: "BF021", severity: "error" }],
671
+ "namespace-import-primitive": [{ code: "BF013", severity: "error" }]
672
672
  };
673
673
  export {
674
674
  honoAdapter,
package/dist/vite.js CHANGED
@@ -8,7 +8,7 @@ import { devModuleUrl, loadManifest, resolveDevOrigin, resolveScriptAssets, toPo
8
8
  import ts25 from "typescript";
9
9
 
10
10
  // ../jsx/src/analyzer.ts
11
- import ts10 from "typescript";
11
+ import ts11 from "typescript";
12
12
 
13
13
  // ../jsx/src/expression-parser.ts
14
14
  import ts from "typescript";
@@ -433,14 +433,17 @@ function freshCounters() {
433
433
  }
434
434
 
435
435
  // ../jsx/src/analyzer-context.ts
436
- import ts9 from "typescript";
436
+ import ts10 from "typescript";
437
437
 
438
438
  // ../jsx/src/strip-types.ts
439
439
  import ts8 from "typescript";
440
440
 
441
+ // ../jsx/src/reactivity-checker.ts
442
+ import ts9 from "typescript";
443
+
441
444
  // ../jsx/src/analyzer-context.ts
442
- var _typePrinter = ts9.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
443
- var _blankTypeSourceFile = ts9.createSourceFile("__bf_types__.ts", "", ts9.ScriptTarget.Latest);
445
+ var _typePrinter = ts10.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
446
+ var _blankTypeSourceFile = ts10.createSourceFile("__bf_types__.ts", "", ts10.ScriptTarget.Latest);
444
447
 
445
448
  // ../jsx/src/errors.ts
446
449
  var ErrorCodes = {
@@ -673,46 +676,46 @@ function extractFreeIdentifiersFromNode(node) {
673
676
  const ids = new Set;
674
677
  const boundNames = new Set;
675
678
  function addBindingNames(name, out) {
676
- if (ts10.isIdentifier(name))
679
+ if (ts11.isIdentifier(name))
677
680
  out.push(name.text);
678
- else if (ts10.isObjectBindingPattern(name))
681
+ else if (ts11.isObjectBindingPattern(name))
679
682
  name.elements.forEach((e) => addBindingNames(e.name, out));
680
- else if (ts10.isArrayBindingPattern(name))
683
+ else if (ts11.isArrayBindingPattern(name))
681
684
  name.elements.forEach((e) => {
682
- if (!ts10.isOmittedExpression(e))
685
+ if (!ts11.isOmittedExpression(e))
683
686
  addBindingNames(e.name, out);
684
687
  });
685
688
  }
686
689
  function visit(n) {
687
- if (ts10.isTypeNode(n))
690
+ if (ts11.isTypeNode(n))
688
691
  return;
689
- if (ts10.isIdentifier(n)) {
692
+ if (ts11.isIdentifier(n)) {
690
693
  const parent = n.parent;
691
- if (parent && ts10.isPropertyAccessExpression(parent) && parent.name === n)
694
+ if (parent && ts11.isPropertyAccessExpression(parent) && parent.name === n)
692
695
  return;
693
- if (parent && ts10.isPropertyAssignment(parent) && parent.name === n)
696
+ if (parent && ts11.isPropertyAssignment(parent) && parent.name === n)
694
697
  return;
695
- if (parent && ts10.isParameter(parent) && parent.name === n)
698
+ if (parent && ts11.isParameter(parent) && parent.name === n)
696
699
  return;
697
- if (parent && ts10.isVariableDeclaration(parent) && parent.name === n)
700
+ if (parent && ts11.isVariableDeclaration(parent) && parent.name === n)
698
701
  return;
699
702
  if (boundNames.has(n.text))
700
703
  return;
701
704
  ids.add(n.text);
702
705
  return;
703
706
  }
704
- if (ts10.isArrowFunction(n)) {
707
+ if (ts11.isArrowFunction(n)) {
705
708
  const params = [];
706
709
  for (const p of n.parameters)
707
710
  addBindingNames(p.name, params);
708
711
  for (const name of params)
709
712
  boundNames.add(name);
710
- ts10.forEachChild(n, visit);
713
+ ts11.forEachChild(n, visit);
711
714
  for (const name of params)
712
715
  boundNames.delete(name);
713
716
  return;
714
717
  }
715
- ts10.forEachChild(n, visit);
718
+ ts11.forEachChild(n, visit);
716
719
  }
717
720
  visit(node);
718
721
  return ids;
@@ -772,7 +775,7 @@ var REACTIVE_BINDING_KINDS = new Set([
772
775
  ]);
773
776
 
774
777
  // ../jsx/src/module-exports.ts
775
- import ts11 from "typescript";
778
+ import ts12 from "typescript";
776
779
  function formatParamWithType(p) {
777
780
  const rest = p.isRest ? "..." : "";
778
781
  const optional = p.optional ? "?" : "";
@@ -807,21 +810,21 @@ function findAssignedNames(bodyText, candidates) {
807
810
  const assigned = new Set;
808
811
  if (candidates.size === 0)
809
812
  return assigned;
810
- const sf = ts11.createSourceFile("bf-assignment-scan.tsx", bodyText, ts11.ScriptTarget.Latest, false, ts11.ScriptKind.TSX);
813
+ const sf = ts12.createSourceFile("bf-assignment-scan.tsx", bodyText, ts12.ScriptTarget.Latest, false, ts12.ScriptKind.TSX);
811
814
  const record = (target) => {
812
- if (ts11.isIdentifier(target) && candidates.has(target.text)) {
815
+ if (ts12.isIdentifier(target) && candidates.has(target.text)) {
813
816
  assigned.add(target.text);
814
817
  }
815
818
  };
816
819
  const visit = (node) => {
817
- if (ts11.isBinaryExpression(node) && isAssignmentOperator(node.operatorToken.kind)) {
820
+ if (ts12.isBinaryExpression(node) && isAssignmentOperator(node.operatorToken.kind)) {
818
821
  record(node.left);
819
- } else if ((ts11.isPrefixUnaryExpression(node) || ts11.isPostfixUnaryExpression(node)) && (node.operator === ts11.SyntaxKind.PlusPlusToken || node.operator === ts11.SyntaxKind.MinusMinusToken)) {
822
+ } else if ((ts12.isPrefixUnaryExpression(node) || ts12.isPostfixUnaryExpression(node)) && (node.operator === ts12.SyntaxKind.PlusPlusToken || node.operator === ts12.SyntaxKind.MinusMinusToken)) {
820
823
  record(node.operand);
821
824
  }
822
- ts11.forEachChild(node, visit);
825
+ ts12.forEachChild(node, visit);
823
826
  };
824
- ts11.forEachChild(sf, visit);
827
+ ts12.forEachChild(sf, visit);
825
828
  return assigned;
826
829
  }
827
830
  function closeOverWritersOfMutableBindings(primaryRefs, declarations, mutableNames) {
@@ -844,12 +847,9 @@ function closeOverWritersOfMutableBindings(primaryRefs, declarations, mutableNam
844
847
  return reachable;
845
848
  }
846
849
  function isAssignmentOperator(kind) {
847
- return kind >= ts11.SyntaxKind.FirstAssignment && kind <= ts11.SyntaxKind.LastAssignment;
850
+ return kind >= ts12.SyntaxKind.FirstAssignment && kind <= ts12.SyntaxKind.LastAssignment;
848
851
  }
849
852
 
850
- // ../jsx/src/reactivity-checker.ts
851
- import ts12 from "typescript";
852
-
853
853
  // ../jsx/src/free-refs.ts
854
854
  import ts13 from "typescript";
855
855
  var _bindingMapCache = new WeakMap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/hono",
3
- "version": "0.35.0",
3
+ "version": "0.35.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.35.0",
125
+ "@barefootjs/vite": "0.35.1",
126
126
  "@types/jsdom": "^27.0.0",
127
127
  "hono": "^4.6.0",
128
128
  "jsdom": "^27.3.0",
@@ -14,18 +14,24 @@ 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
17
+ // A ternary or array literal LITERALLY WRAPPING JSX at a non-children prop
18
18
  // position (e.g. `header={cond ? <a/> : <b/>}`) is refused ahead of
19
19
  // `adapter.generate()` in the shared jsx-to-ir.ts phase, so it is pinned
20
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' }],
24
- // #2771: a reactive primitive invoked through a namespace import
21
+ // `rich-prop-client-read` above. This is the permanent, intended behavior
22
+ // (formerly tracked as #2667, closed): the issue's own acceptance criteria
23
+ // treated a loud refusal as fully resolving the silent-divergence bug, so
24
+ // no open issue tracks further work here.
25
+ 'jsx-element-prop-ternary': [{ code: 'BF021', severity: 'error' }],
26
+ 'jsx-element-prop-array': [{ code: 'BF021', severity: 'error' }],
27
+ // A reactive primitive invoked through a namespace import
25
28
  // (`import * as bf from '@barefootjs/client'`, `bf.createSignal(...)`)
26
29
  // that the analyzer's checker-less fast path cannot recognize refuses
27
30
  // loudly (BF013) instead of silently dropping the declaration — fired
28
31
  // in the shared analyzer pass ahead of any adapter's `adapter.generate()`,
29
- // so all nine adapters (including Hono) pin this identically.
30
- 'namespace-import-primitive': [{ code: 'BF013', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2771' }],
32
+ // so all nine adapters (including Hono) pin this identically. A compile
33
+ // that supplies a shared `ts.Program` (e.g. via `@barefootjs/vite`)
34
+ // resolves the primitive normally and never reaches this refusal (formerly
35
+ // tracked as #2771, closed) — no open issue tracks further work.
36
+ 'namespace-import-primitive': [{ code: 'BF013', severity: 'error' }],
31
37
  }