@barefootjs/test 0.19.0 → 0.20.0
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/index.js +30 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -190420,11 +190420,19 @@ function collectSignal(node, ctx) {
|
|
|
190420
190420
|
}
|
|
190421
190421
|
const envReader = resolveEnvSignalKey(callExpr, ctx) ?? undefined;
|
|
190422
190422
|
const envFactory = envReader ? callExpr.expression.getText(ctx.sourceFile) : undefined;
|
|
190423
|
+
let templateInitialValue;
|
|
190424
|
+
if (!ctx.propsObjectName && callExpr.arguments[0]) {
|
|
190425
|
+
const propNames = new Set(ctx.propsParams.map((p) => p.name));
|
|
190426
|
+
if (propNames.size > 0) {
|
|
190427
|
+
templateInitialValue = rewriteBarePropRefs(initialValue, callExpr.arguments[0], propNames);
|
|
190428
|
+
}
|
|
190429
|
+
}
|
|
190423
190430
|
ctx.signals.push({
|
|
190424
190431
|
getter,
|
|
190425
190432
|
setter,
|
|
190426
190433
|
initialValue,
|
|
190427
190434
|
typedInitialValue: typedInitialValue !== initialValue ? typedInitialValue : undefined,
|
|
190435
|
+
templateInitialValue,
|
|
190428
190436
|
type: type2,
|
|
190429
190437
|
loc: getSourceLocation(node, ctx.sourceFile, ctx.filePath),
|
|
190430
190438
|
initialFreeIdentifiers: callExpr.arguments[0] ? extractFreeIdentifiersFromNode(callExpr.arguments[0]) : new Set,
|
|
@@ -191573,7 +191581,8 @@ function extractProps(param, ctx) {
|
|
|
191573
191581
|
type: resolvedType,
|
|
191574
191582
|
optional: !!member?.optional || !!element.initializer,
|
|
191575
191583
|
defaultValue,
|
|
191576
|
-
defaultContainsArrow: defaultContainsArrow || undefined
|
|
191584
|
+
defaultContainsArrow: defaultContainsArrow || undefined,
|
|
191585
|
+
...sourcePropName !== localName && { sourceName: sourcePropName }
|
|
191577
191586
|
});
|
|
191578
191587
|
}
|
|
191579
191588
|
}
|
|
@@ -196275,6 +196284,26 @@ var NO_RETURN = Symbol("no-return");
|
|
|
196275
196284
|
|
|
196276
196285
|
// ../jsx/src/augment-inherited-props.ts
|
|
196277
196286
|
var import_typescript17 = __toESM(require_typescript(), 1);
|
|
196287
|
+
|
|
196288
|
+
// ../jsx/src/rich-type-evidence.ts
|
|
196289
|
+
var HOST_RICH_TYPE_NAMES = new Set([
|
|
196290
|
+
"Date",
|
|
196291
|
+
"Map",
|
|
196292
|
+
"Set",
|
|
196293
|
+
"WeakMap",
|
|
196294
|
+
"WeakSet",
|
|
196295
|
+
"URL",
|
|
196296
|
+
"URLSearchParams",
|
|
196297
|
+
"RegExp",
|
|
196298
|
+
"Promise",
|
|
196299
|
+
"Error",
|
|
196300
|
+
"Symbol",
|
|
196301
|
+
"BigInt",
|
|
196302
|
+
"Function"
|
|
196303
|
+
]);
|
|
196304
|
+
|
|
196305
|
+
// ../jsx/src/rich-type-refusal.ts
|
|
196306
|
+
var EMPTY_BINDINGS = new Map;
|
|
196278
196307
|
// ../jsx/src/shared-program.ts
|
|
196279
196308
|
init_path();
|
|
196280
196309
|
var import_typescript18 = __toESM(require_typescript(), 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barefootjs/test",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
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.
|
|
42
|
+
"@barefootjs/jsx": "0.20.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "^5.0.0"
|