@barefootjs/erb 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;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,eAAO,MAAM,eAAe,EAAE,eA0D7B,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,eAgE7B,CAAA"}
package/dist/index.js CHANGED
@@ -189257,9 +189257,9 @@ var conformancePins = {
189257
189257
  "filter-nested-find-predicate": [{ code: "BF101", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2320" }],
189258
189258
  "date-method-uncatalogued": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2356" }],
189259
189259
  "rich-prop-client-read": [{ code: "BF049", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2648" }],
189260
- "jsx-element-prop-ternary": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2667" }],
189261
- "jsx-element-prop-array": [{ code: "BF021", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2667" }],
189262
- "namespace-import-primitive": [{ code: "BF013", severity: "error", issue: "https://github.com/piconic-ai/barefootjs/issues/2771" }]
189260
+ "jsx-element-prop-ternary": [{ code: "BF021", severity: "error" }],
189261
+ "jsx-element-prop-array": [{ code: "BF021", severity: "error" }],
189262
+ "namespace-import-primitive": [{ code: "BF013", severity: "error" }]
189263
189263
  };
189264
189264
  // src/render-divergences.ts
189265
189265
  var renderDivergences = {};
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";
@@ -2337,14 +2337,17 @@ function freshCounters() {
2337
2337
  }
2338
2338
 
2339
2339
  // ../jsx/src/analyzer-context.ts
2340
- import ts9 from "typescript";
2340
+ import ts10 from "typescript";
2341
2341
 
2342
2342
  // ../jsx/src/strip-types.ts
2343
2343
  import ts8 from "typescript";
2344
2344
 
2345
+ // ../jsx/src/reactivity-checker.ts
2346
+ import ts9 from "typescript";
2347
+
2345
2348
  // ../jsx/src/analyzer-context.ts
2346
- var _typePrinter = ts9.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
2347
- var _blankTypeSourceFile = ts9.createSourceFile("__bf_types__.ts", "", ts9.ScriptTarget.Latest);
2349
+ var _typePrinter = ts10.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
2350
+ var _blankTypeSourceFile = ts10.createSourceFile("__bf_types__.ts", "", ts10.ScriptTarget.Latest);
2348
2351
 
2349
2352
  // ../jsx/src/errors.ts
2350
2353
  var ErrorCodes = {
@@ -2577,46 +2580,46 @@ function extractFreeIdentifiersFromNode(node) {
2577
2580
  const ids = new Set;
2578
2581
  const boundNames = new Set;
2579
2582
  function addBindingNames(name, out) {
2580
- if (ts10.isIdentifier(name))
2583
+ if (ts11.isIdentifier(name))
2581
2584
  out.push(name.text);
2582
- else if (ts10.isObjectBindingPattern(name))
2585
+ else if (ts11.isObjectBindingPattern(name))
2583
2586
  name.elements.forEach((e) => addBindingNames(e.name, out));
2584
- else if (ts10.isArrayBindingPattern(name))
2587
+ else if (ts11.isArrayBindingPattern(name))
2585
2588
  name.elements.forEach((e) => {
2586
- if (!ts10.isOmittedExpression(e))
2589
+ if (!ts11.isOmittedExpression(e))
2587
2590
  addBindingNames(e.name, out);
2588
2591
  });
2589
2592
  }
2590
2593
  function visit(n) {
2591
- if (ts10.isTypeNode(n))
2594
+ if (ts11.isTypeNode(n))
2592
2595
  return;
2593
- if (ts10.isIdentifier(n)) {
2596
+ if (ts11.isIdentifier(n)) {
2594
2597
  const parent = n.parent;
2595
- if (parent && ts10.isPropertyAccessExpression(parent) && parent.name === n)
2598
+ if (parent && ts11.isPropertyAccessExpression(parent) && parent.name === n)
2596
2599
  return;
2597
- if (parent && ts10.isPropertyAssignment(parent) && parent.name === n)
2600
+ if (parent && ts11.isPropertyAssignment(parent) && parent.name === n)
2598
2601
  return;
2599
- if (parent && ts10.isParameter(parent) && parent.name === n)
2602
+ if (parent && ts11.isParameter(parent) && parent.name === n)
2600
2603
  return;
2601
- if (parent && ts10.isVariableDeclaration(parent) && parent.name === n)
2604
+ if (parent && ts11.isVariableDeclaration(parent) && parent.name === n)
2602
2605
  return;
2603
2606
  if (boundNames.has(n.text))
2604
2607
  return;
2605
2608
  ids.add(n.text);
2606
2609
  return;
2607
2610
  }
2608
- if (ts10.isArrowFunction(n)) {
2611
+ if (ts11.isArrowFunction(n)) {
2609
2612
  const params = [];
2610
2613
  for (const p of n.parameters)
2611
2614
  addBindingNames(p.name, params);
2612
2615
  for (const name of params)
2613
2616
  boundNames.add(name);
2614
- ts10.forEachChild(n, visit);
2617
+ ts11.forEachChild(n, visit);
2615
2618
  for (const name of params)
2616
2619
  boundNames.delete(name);
2617
2620
  return;
2618
2621
  }
2619
- ts10.forEachChild(n, visit);
2622
+ ts11.forEachChild(n, visit);
2620
2623
  }
2621
2624
  visit(node);
2622
2625
  return ids;
@@ -2690,7 +2693,7 @@ function preambleAnalysisTemplateText(p) {
2690
2693
  }
2691
2694
 
2692
2695
  // ../jsx/src/module-exports.ts
2693
- import ts11 from "typescript";
2696
+ import ts12 from "typescript";
2694
2697
  function formatParamWithType(p) {
2695
2698
  const rest = p.isRest ? "..." : "";
2696
2699
  const optional = p.optional ? "?" : "";
@@ -2725,21 +2728,21 @@ function findAssignedNames(bodyText, candidates) {
2725
2728
  const assigned = new Set;
2726
2729
  if (candidates.size === 0)
2727
2730
  return assigned;
2728
- const sf = ts11.createSourceFile("bf-assignment-scan.tsx", bodyText, ts11.ScriptTarget.Latest, false, ts11.ScriptKind.TSX);
2731
+ const sf = ts12.createSourceFile("bf-assignment-scan.tsx", bodyText, ts12.ScriptTarget.Latest, false, ts12.ScriptKind.TSX);
2729
2732
  const record = (target) => {
2730
- if (ts11.isIdentifier(target) && candidates.has(target.text)) {
2733
+ if (ts12.isIdentifier(target) && candidates.has(target.text)) {
2731
2734
  assigned.add(target.text);
2732
2735
  }
2733
2736
  };
2734
2737
  const visit = (node) => {
2735
- if (ts11.isBinaryExpression(node) && isAssignmentOperator(node.operatorToken.kind)) {
2738
+ if (ts12.isBinaryExpression(node) && isAssignmentOperator(node.operatorToken.kind)) {
2736
2739
  record(node.left);
2737
- } else if ((ts11.isPrefixUnaryExpression(node) || ts11.isPostfixUnaryExpression(node)) && (node.operator === ts11.SyntaxKind.PlusPlusToken || node.operator === ts11.SyntaxKind.MinusMinusToken)) {
2740
+ } else if ((ts12.isPrefixUnaryExpression(node) || ts12.isPostfixUnaryExpression(node)) && (node.operator === ts12.SyntaxKind.PlusPlusToken || node.operator === ts12.SyntaxKind.MinusMinusToken)) {
2738
2741
  record(node.operand);
2739
2742
  }
2740
- ts11.forEachChild(node, visit);
2743
+ ts12.forEachChild(node, visit);
2741
2744
  };
2742
- ts11.forEachChild(sf, visit);
2745
+ ts12.forEachChild(sf, visit);
2743
2746
  return assigned;
2744
2747
  }
2745
2748
  function closeOverWritersOfMutableBindings(primaryRefs, declarations, mutableNames) {
@@ -2762,12 +2765,9 @@ function closeOverWritersOfMutableBindings(primaryRefs, declarations, mutableNam
2762
2765
  return reachable;
2763
2766
  }
2764
2767
  function isAssignmentOperator(kind) {
2765
- return kind >= ts11.SyntaxKind.FirstAssignment && kind <= ts11.SyntaxKind.LastAssignment;
2768
+ return kind >= ts12.SyntaxKind.FirstAssignment && kind <= ts12.SyntaxKind.LastAssignment;
2766
2769
  }
2767
2770
 
2768
- // ../jsx/src/reactivity-checker.ts
2769
- import ts12 from "typescript";
2770
-
2771
2771
  // ../jsx/src/free-refs.ts
2772
2772
  import ts13 from "typescript";
2773
2773
  var _bindingMapCache = new WeakMap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/erb",
3
- "version": "0.35.0",
3
+ "version": "0.35.1",
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.35.0"
57
+ "@barefootjs/shared": "0.35.1"
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.35.0",
75
- "@barefootjs/vite": "0.35.0",
76
- "@barefootjs/client": "0.35.0",
74
+ "@barefootjs/jsx": "0.35.1",
75
+ "@barefootjs/vite": "0.35.1",
76
+ "@barefootjs/client": "0.35.1",
77
77
  "typescript": "^5.0.0",
78
78
  "vite": "^6.0.0"
79
79
  }
@@ -53,18 +53,24 @@ export const conformancePins: ConformancePins = {
53
53
  'filter-nested-find-predicate': [{ code: 'BF101', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2320' }],
54
54
  'date-method-uncatalogued': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2356' }],
55
55
  'rich-prop-client-read': [{ code: 'BF049', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2648' }],
56
- // #2667: a ternary/array LITERALLY WRAPPING JSX at a non-children prop
56
+ // A ternary or array literal LITERALLY WRAPPING JSX at a non-children prop
57
57
  // position (e.g. `header={cond ? <a/> : <b/>}`) is refused ahead of
58
58
  // `adapter.generate()` in the shared jsx-to-ir.ts phase, so it is pinned
59
59
  // identically on every adapter (including Hono) — same reasoning as
60
- // `rich-prop-client-read` above.
61
- 'jsx-element-prop-ternary': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2667' }],
62
- 'jsx-element-prop-array': [{ code: 'BF021', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2667' }],
63
- // #2771: a reactive primitive invoked through a namespace import
60
+ // `rich-prop-client-read` above. This is the permanent, intended behavior
61
+ // (formerly tracked as #2667, closed): the issue's own acceptance criteria
62
+ // treated a loud refusal as fully resolving the silent-divergence bug, so
63
+ // no open issue tracks further work here.
64
+ 'jsx-element-prop-ternary': [{ code: 'BF021', severity: 'error' }],
65
+ 'jsx-element-prop-array': [{ code: 'BF021', severity: 'error' }],
66
+ // A reactive primitive invoked through a namespace import
64
67
  // (`import * as bf from '@barefootjs/client'`, `bf.createSignal(...)`)
65
68
  // that the analyzer's checker-less fast path cannot recognize refuses
66
69
  // loudly (BF013) instead of silently dropping the declaration — fired
67
70
  // in the shared analyzer pass ahead of any adapter's `adapter.generate()`,
68
- // so all nine adapters (including Hono) pin this identically.
69
- 'namespace-import-primitive': [{ code: 'BF013', severity: 'error', issue: 'https://github.com/piconic-ai/barefootjs/issues/2771' }],
71
+ // so all nine adapters (including Hono) pin this identically. A compile
72
+ // that supplies a shared `ts.Program` (e.g. via `@barefootjs/vite`)
73
+ // resolves the primitive normally and never reaches this refusal (formerly
74
+ // tracked as #2771, closed) — no open issue tracks further work.
75
+ 'namespace-import-primitive': [{ code: 'BF013', severity: 'error' }],
70
76
  }