@barefootjs/test 0.33.1 → 0.33.2

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.
Files changed (2) hide show
  1. package/dist/index.js +30 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -195439,6 +195439,31 @@ function unwrapHoistedFragment(node) {
195439
195439
  return node;
195440
195440
  return { ...only, needsScope: true };
195441
195441
  }
195442
+ function markDataKeyCarrier(children) {
195443
+ for (let i2 = 0;i2 < children.length; i2++) {
195444
+ const marked = markCarrierIn(children[i2]);
195445
+ if (!marked)
195446
+ continue;
195447
+ const out = children.slice();
195448
+ out[i2] = marked;
195449
+ return out;
195450
+ }
195451
+ return children;
195452
+ }
195453
+ function markCarrierIn(node) {
195454
+ if (node.type === "element") {
195455
+ return { ...node, carriesDataKey: true };
195456
+ }
195457
+ if (node.type === "conditional") {
195458
+ const cond = node;
195459
+ const whenTrue = markCarrierIn(cond.whenTrue);
195460
+ const whenFalse = markCarrierIn(cond.whenFalse);
195461
+ if (!whenTrue && !whenFalse)
195462
+ return null;
195463
+ return { ...cond, whenTrue: whenTrue ?? cond.whenTrue, whenFalse: whenFalse ?? cond.whenFalse };
195464
+ }
195465
+ return null;
195466
+ }
195442
195467
  function transformFragment(node, ctx) {
195443
195468
  const isFragmentRoot = ctx.isRoot;
195444
195469
  const isTransparent = isFragmentRoot && isTransparentFragment(node, ctx);
@@ -195449,7 +195474,7 @@ function transformFragment(node, ctx) {
195449
195474
  const needsScopeComment = isFragmentRoot && !isTransparent || undefined;
195450
195475
  return {
195451
195476
  type: "fragment",
195452
- children,
195477
+ children: needsScopeComment ? markDataKeyCarrier(children) : children,
195453
195478
  transparent: isTransparent || undefined,
195454
195479
  needsScopeComment,
195455
195480
  loc: getSourceLocation(node, ctx.sourceFile, ctx.filePath)
@@ -198545,6 +198570,10 @@ function buildIfStatementChain(analyzer, ctx, opts) {
198545
198570
  return alternate;
198546
198571
  }
198547
198572
 
198573
+ // ../jsx/src/ir-to-client-js/prop-handling.ts
198574
+ var _localConstantValuesCache = new WeakMap;
198575
+ var _restSpreadNamesCache = new WeakMap;
198576
+
198548
198577
  // ../jsx/src/ir-to-client-js/control-flow/stringify/template-parse.ts
198549
198578
  var SVG_ROOT_TAGS = new Set([
198550
198579
  "svg",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/test",
3
- "version": "0.33.1",
3
+ "version": "0.33.2",
4
4
  "description": "Test utilities for BarefootJS - IR-based component testing without a browser",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -39,7 +39,7 @@
39
39
  "directory": "packages/test"
40
40
  },
41
41
  "dependencies": {
42
- "@barefootjs/jsx": "0.33.1"
42
+ "@barefootjs/jsx": "0.33.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "typescript": "^5.0.0"