babel-plugin-jsx-dom-expressions 0.37.11 → 0.37.13
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/index.js +13 -13
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -531,7 +531,7 @@ function transformCondition(path, inline, deep) {
|
|
|
531
531
|
}
|
|
532
532
|
if (dTest && !inline) {
|
|
533
533
|
const statements = [
|
|
534
|
-
t__namespace.variableDeclaration("
|
|
534
|
+
t__namespace.variableDeclaration("var", [
|
|
535
535
|
t__namespace.variableDeclarator(
|
|
536
536
|
id,
|
|
537
537
|
config.memoWrapper
|
|
@@ -1173,7 +1173,7 @@ function transformAttributes$2(path, results) {
|
|
|
1173
1173
|
if (!isFunction && t__namespace.isLVal(value.expression)) {
|
|
1174
1174
|
const refIdentifier = path.scope.generateUidIdentifier("_ref$");
|
|
1175
1175
|
results.exprs.unshift(
|
|
1176
|
-
t__namespace.variableDeclaration("
|
|
1176
|
+
t__namespace.variableDeclaration("var", [
|
|
1177
1177
|
t__namespace.variableDeclarator(refIdentifier, value.expression)
|
|
1178
1178
|
]),
|
|
1179
1179
|
t__namespace.expressionStatement(
|
|
@@ -1203,7 +1203,7 @@ function transformAttributes$2(path, results) {
|
|
|
1203
1203
|
} else if (t__namespace.isCallExpression(value.expression)) {
|
|
1204
1204
|
const refIdentifier = path.scope.generateUidIdentifier("_ref$");
|
|
1205
1205
|
results.exprs.unshift(
|
|
1206
|
-
t__namespace.variableDeclaration("
|
|
1206
|
+
t__namespace.variableDeclaration("var", [
|
|
1207
1207
|
t__namespace.variableDeclarator(refIdentifier, value.expression)
|
|
1208
1208
|
]),
|
|
1209
1209
|
t__namespace.expressionStatement(
|
|
@@ -1863,7 +1863,7 @@ function appendTemplates$1(path, templates) {
|
|
|
1863
1863
|
)
|
|
1864
1864
|
);
|
|
1865
1865
|
});
|
|
1866
|
-
path.node.body.unshift(t__namespace.variableDeclaration("
|
|
1866
|
+
path.node.body.unshift(t__namespace.variableDeclaration("var", declarators));
|
|
1867
1867
|
}
|
|
1868
1868
|
|
|
1869
1869
|
function registerTemplate(path, results) {
|
|
@@ -1899,7 +1899,7 @@ function registerTemplate(path, results) {
|
|
|
1899
1899
|
);
|
|
1900
1900
|
}
|
|
1901
1901
|
results.declarations.unshift(decl);
|
|
1902
|
-
results.decl = t__namespace.variableDeclaration("
|
|
1902
|
+
results.decl = t__namespace.variableDeclaration("var", results.declarations);
|
|
1903
1903
|
}
|
|
1904
1904
|
|
|
1905
1905
|
function wrapDynamics$1(path, dynamics) {
|
|
@@ -2004,7 +2004,7 @@ function wrapDynamics$1(path, dynamics) {
|
|
|
2004
2004
|
t__namespace.arrowFunctionExpression(
|
|
2005
2005
|
[prevId],
|
|
2006
2006
|
t__namespace.blockStatement([
|
|
2007
|
-
t__namespace.variableDeclaration("
|
|
2007
|
+
t__namespace.variableDeclaration("var", declarations),
|
|
2008
2008
|
...statements,
|
|
2009
2009
|
t__namespace.returnStatement(prevId),
|
|
2010
2010
|
]),
|
|
@@ -2084,7 +2084,7 @@ function appendTemplates(path, templates) {
|
|
|
2084
2084
|
const declarators = templates.map(template => {
|
|
2085
2085
|
return t__namespace.variableDeclarator(template.id, template.template);
|
|
2086
2086
|
});
|
|
2087
|
-
path.node.body.unshift(t__namespace.variableDeclaration("
|
|
2087
|
+
path.node.body.unshift(t__namespace.variableDeclaration("var", declarators));
|
|
2088
2088
|
}
|
|
2089
2089
|
|
|
2090
2090
|
function appendToTemplate(template, value) {
|
|
@@ -2745,7 +2745,7 @@ function transformAttributes(path, results) {
|
|
|
2745
2745
|
if (t__namespace.isLVal(value.expression)) {
|
|
2746
2746
|
const refIdentifier = path.scope.generateUidIdentifier("_ref$");
|
|
2747
2747
|
results.exprs.unshift(
|
|
2748
|
-
t__namespace.variableDeclaration("
|
|
2748
|
+
t__namespace.variableDeclaration("var", [
|
|
2749
2749
|
t__namespace.variableDeclarator(refIdentifier, value.expression)
|
|
2750
2750
|
]),
|
|
2751
2751
|
t__namespace.expressionStatement(
|
|
@@ -2783,7 +2783,7 @@ function transformAttributes(path, results) {
|
|
|
2783
2783
|
} else if (t__namespace.isCallExpression(value.expression)) {
|
|
2784
2784
|
const refIdentifier = path.scope.generateUidIdentifier("_ref$");
|
|
2785
2785
|
results.exprs.unshift(
|
|
2786
|
-
t__namespace.variableDeclaration("
|
|
2786
|
+
t__namespace.variableDeclaration("var", [
|
|
2787
2787
|
t__namespace.variableDeclarator(refIdentifier, value.expression)
|
|
2788
2788
|
]),
|
|
2789
2789
|
t__namespace.expressionStatement(
|
|
@@ -3030,7 +3030,7 @@ function processSpreads(path, attributes, { elem, hasChildren, wrapConditionals
|
|
|
3030
3030
|
function createTemplate(path, result, wrap) {
|
|
3031
3031
|
const config = getConfig(path);
|
|
3032
3032
|
if (result.id) {
|
|
3033
|
-
result.decl = t__namespace.variableDeclaration("
|
|
3033
|
+
result.decl = t__namespace.variableDeclaration("var", result.declarations);
|
|
3034
3034
|
if (
|
|
3035
3035
|
!(result.exprs.length || result.dynamics.length || result.postExprs.length) &&
|
|
3036
3036
|
result.decl.declarations.length === 1
|
|
@@ -3119,7 +3119,7 @@ function wrapDynamics(path, dynamics) {
|
|
|
3119
3119
|
t__namespace.arrowFunctionExpression(
|
|
3120
3120
|
[prevId],
|
|
3121
3121
|
t__namespace.blockStatement([
|
|
3122
|
-
t__namespace.variableDeclaration("
|
|
3122
|
+
t__namespace.variableDeclaration("var", declarations),
|
|
3123
3123
|
...statements,
|
|
3124
3124
|
t__namespace.returnStatement(prevId),
|
|
3125
3125
|
]),
|
|
@@ -3211,7 +3211,7 @@ function transformComponent(path) {
|
|
|
3211
3211
|
t__namespace.identifier("ref"),
|
|
3212
3212
|
[t__namespace.identifier("r$")],
|
|
3213
3213
|
t__namespace.blockStatement([
|
|
3214
|
-
t__namespace.variableDeclaration("
|
|
3214
|
+
t__namespace.variableDeclaration("var", [
|
|
3215
3215
|
t__namespace.variableDeclarator(refIdentifier, value.expression)
|
|
3216
3216
|
]),
|
|
3217
3217
|
t__namespace.expressionStatement(
|
|
@@ -3238,7 +3238,7 @@ function transformComponent(path) {
|
|
|
3238
3238
|
t__namespace.identifier("ref"),
|
|
3239
3239
|
[t__namespace.identifier("r$")],
|
|
3240
3240
|
t__namespace.blockStatement([
|
|
3241
|
-
t__namespace.variableDeclaration("
|
|
3241
|
+
t__namespace.variableDeclaration("var", [
|
|
3242
3242
|
t__namespace.variableDeclarator(refIdentifier, value.expression)
|
|
3243
3243
|
]),
|
|
3244
3244
|
t__namespace.expressionStatement(
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-plugin-jsx-dom-expressions",
|
|
3
3
|
"description": "A JSX to DOM plugin that wraps expressions for fine grained change detection",
|
|
4
|
-
"version": "0.37.
|
|
4
|
+
"version": "0.37.13",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@babel/core": "^7.20.12"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "ae2bc5ecd4f8dd61df0b2eb5c4ed0ae7589b6a6b"
|
|
35
35
|
}
|