marko 6.0.35 → 6.0.37
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/translator/index.js +19 -13
- package/package.json +2 -2
package/dist/translator/index.js
CHANGED
@@ -797,7 +797,6 @@ function getExprRoot(path5) {
|
|
797
797
|
function getFnRoot(path5) {
|
798
798
|
let curPath = path5;
|
799
799
|
let fnPath;
|
800
|
-
if (curPath.isProgram()) return;
|
801
800
|
while (!isMarko(curPath)) {
|
802
801
|
if (isFunction(curPath)) {
|
803
802
|
fnPath = curPath;
|
@@ -809,7 +808,12 @@ function getFnRoot(path5) {
|
|
809
808
|
break;
|
810
809
|
}
|
811
810
|
}
|
812
|
-
|
811
|
+
const parentPath = curPath.parentPath;
|
812
|
+
if (parentPath) {
|
813
|
+
curPath = parentPath;
|
814
|
+
} else {
|
815
|
+
break;
|
816
|
+
}
|
813
817
|
}
|
814
818
|
return fnPath;
|
815
819
|
}
|
@@ -4534,7 +4538,7 @@ function trackParamsReferences(body, type, upstreamAlias) {
|
|
4534
4538
|
void 0,
|
4535
4539
|
addNumericPropertiesUntil(void 0, i - 1)
|
4536
4540
|
);
|
4537
|
-
} else {
|
4541
|
+
} else if (import_compiler24.types.isLVal(param)) {
|
4538
4542
|
createBindingsAndTrackReferences(
|
4539
4543
|
param,
|
4540
4544
|
type,
|
@@ -4702,15 +4706,17 @@ function createBindingsAndTrackReferences(lVal, type, scope, section, upstreamAl
|
|
4702
4706
|
if (hasRest) {
|
4703
4707
|
excludeProperties = propsUtil.add(excludeProperties, key);
|
4704
4708
|
}
|
4705
|
-
|
4706
|
-
|
4707
|
-
|
4708
|
-
|
4709
|
-
|
4710
|
-
|
4711
|
-
|
4712
|
-
|
4713
|
-
|
4709
|
+
if (import_compiler24.types.isLVal(prop.value)) {
|
4710
|
+
createBindingsAndTrackReferences(
|
4711
|
+
prop.value,
|
4712
|
+
type,
|
4713
|
+
scope,
|
4714
|
+
section,
|
4715
|
+
patternBinding,
|
4716
|
+
key,
|
4717
|
+
void 0
|
4718
|
+
);
|
4719
|
+
}
|
4714
4720
|
}
|
4715
4721
|
}
|
4716
4722
|
break;
|
@@ -4743,7 +4749,7 @@ function createBindingsAndTrackReferences(lVal, type, scope, section, upstreamAl
|
|
4743
4749
|
property,
|
4744
4750
|
excludeProperties
|
4745
4751
|
);
|
4746
|
-
} else {
|
4752
|
+
} else if (import_compiler24.types.isLVal(element)) {
|
4747
4753
|
createBindingsAndTrackReferences(
|
4748
4754
|
element,
|
4749
4755
|
type,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "marko",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.37",
|
4
4
|
"description": "Optimized runtime for Marko templates.",
|
5
5
|
"keywords": [
|
6
6
|
"api",
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"build": "node -r ~ts ./scripts/bundle.ts"
|
49
49
|
},
|
50
50
|
"dependencies": {
|
51
|
-
"@marko/compiler": "^5.39.
|
51
|
+
"@marko/compiler": "^5.39.29",
|
52
52
|
"csstype": "^3.1.3",
|
53
53
|
"magic-string": "^0.30.17"
|
54
54
|
},
|