@barefootjs/test 0.19.0 → 0.19.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/index.js +8 -0
- 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,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barefootjs/test",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1",
|
|
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.19.
|
|
42
|
+
"@barefootjs/jsx": "0.19.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "^5.0.0"
|