@barefootjs/test 0.18.1 → 0.18.3
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 +15 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -192445,6 +192445,9 @@ function resolveFreeRefsInternal(node, env, visited) {
|
|
|
192445
192445
|
}
|
|
192446
192446
|
return out;
|
|
192447
192447
|
}
|
|
192448
|
+
function isNameBound(name, env) {
|
|
192449
|
+
return buildBindingMap(env).has(name);
|
|
192450
|
+
}
|
|
192448
192451
|
function resolveFreeRefs(node, env) {
|
|
192449
192452
|
return resolveFreeRefsInternal(node, env, new Set);
|
|
192450
192453
|
}
|
|
@@ -192887,7 +192890,7 @@ function clientBuiltinTags(ctx) {
|
|
|
192887
192890
|
ctx._clientBuiltinTags = map;
|
|
192888
192891
|
return map;
|
|
192889
192892
|
}
|
|
192890
|
-
function
|
|
192893
|
+
function isNameBound2(ctx, name) {
|
|
192891
192894
|
const a = ctx.analyzer;
|
|
192892
192895
|
if (a.ambientGlobals.has(name))
|
|
192893
192896
|
return true;
|
|
@@ -192922,7 +192925,7 @@ function dispatchClientBuiltin(tagName, ctx, diagNode, transformAsync, transform
|
|
|
192922
192925
|
return transformAsync();
|
|
192923
192926
|
if (builtin === "Region")
|
|
192924
192927
|
return transformRegion();
|
|
192925
|
-
if (isClientBuiltinName(tagName) && !
|
|
192928
|
+
if (isClientBuiltinName(tagName) && !isNameBound2(ctx, tagName)) {
|
|
192926
192929
|
reportBuiltinNotImported(ctx, diagNode, tagName);
|
|
192927
192930
|
}
|
|
192928
192931
|
return null;
|
|
@@ -193237,6 +193240,13 @@ function transformChildren(children, ctx) {
|
|
|
193237
193240
|
}
|
|
193238
193241
|
return result;
|
|
193239
193242
|
}
|
|
193243
|
+
function isRenderNothingLiteral(expr, ctx) {
|
|
193244
|
+
let e = expr;
|
|
193245
|
+
while (import_typescript11.default.isParenthesizedExpression(e) || import_typescript11.default.isAsExpression(e) || import_typescript11.default.isSatisfiesExpression(e) || import_typescript11.default.isNonNullExpression(e)) {
|
|
193246
|
+
e = e.expression;
|
|
193247
|
+
}
|
|
193248
|
+
return e.kind === import_typescript11.default.SyntaxKind.NullKeyword || e.kind === import_typescript11.default.SyntaxKind.TrueKeyword || e.kind === import_typescript11.default.SyntaxKind.FalseKeyword || import_typescript11.default.isIdentifier(e) && e.text === "undefined" && !isNameBound("undefined", makeBindingEnv(ctx));
|
|
193249
|
+
}
|
|
193240
193250
|
function transformText(node, ctx) {
|
|
193241
193251
|
const text = node.text.replace(/\s+/g, " ");
|
|
193242
193252
|
if (text.trim() === "") {
|
|
@@ -193257,6 +193267,9 @@ function transformExpression(node, ctx) {
|
|
|
193257
193267
|
}
|
|
193258
193268
|
function transformExpressionInner(expr, ctx, node, isClientOnly) {
|
|
193259
193269
|
expr = tryDesugarInterleaveTaggedTemplate(expr, ctx);
|
|
193270
|
+
if (isRenderNothingLiteral(expr, ctx)) {
|
|
193271
|
+
return null;
|
|
193272
|
+
}
|
|
193260
193273
|
checkBareSignalOrMemoIdentifier(expr, ctx);
|
|
193261
193274
|
if (import_typescript11.default.isIdentifier(expr)) {
|
|
193262
193275
|
const jsxNode = ctx.analyzer.jsxConstants.get(expr.text);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barefootjs/test",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
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.18.
|
|
42
|
+
"@barefootjs/jsx": "0.18.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"typescript": "^5.0.0"
|