@constela/compiler 0.15.5 → 0.15.6
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.d.ts +1 -1
- package/dist/index.js +11 -5
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -243,7 +243,9 @@ function validateExpression(expr, path, context, scope, paramScope) {
|
|
|
243
243
|
break;
|
|
244
244
|
case "call": {
|
|
245
245
|
const callExpr = expr;
|
|
246
|
-
|
|
246
|
+
if (callExpr.target !== null) {
|
|
247
|
+
errors.push(...validateExpression(callExpr.target, buildPath(path, "target"), context, scope, paramScope));
|
|
248
|
+
}
|
|
247
249
|
if (callExpr.args) {
|
|
248
250
|
for (let i = 0; i < callExpr.args.length; i++) {
|
|
249
251
|
const arg = callExpr.args[i];
|
|
@@ -626,7 +628,9 @@ function validateExpressionStateOnly(expr, path, context) {
|
|
|
626
628
|
break;
|
|
627
629
|
case "call": {
|
|
628
630
|
const callExpr = expr;
|
|
629
|
-
|
|
631
|
+
if (callExpr.target !== null) {
|
|
632
|
+
errors.push(...validateExpressionStateOnly(callExpr.target, buildPath(path, "target"), context));
|
|
633
|
+
}
|
|
630
634
|
if (callExpr.args) {
|
|
631
635
|
for (let i = 0; i < callExpr.args.length; i++) {
|
|
632
636
|
const arg = callExpr.args[i];
|
|
@@ -777,7 +781,9 @@ function validateExpressionInEventPayload(expr, path, context, scope) {
|
|
|
777
781
|
break;
|
|
778
782
|
case "call": {
|
|
779
783
|
const callExpr = expr;
|
|
780
|
-
|
|
784
|
+
if (callExpr.target !== null) {
|
|
785
|
+
errors.push(...validateExpressionInEventPayload(callExpr.target, buildPath(path, "target"), context, scope));
|
|
786
|
+
}
|
|
781
787
|
if (callExpr.args) {
|
|
782
788
|
for (let i = 0; i < callExpr.args.length; i++) {
|
|
783
789
|
const arg = callExpr.args[i];
|
|
@@ -1463,7 +1469,7 @@ function transformExpression(expr, ctx) {
|
|
|
1463
1469
|
const callExpr = expr;
|
|
1464
1470
|
const result = {
|
|
1465
1471
|
expr: "call",
|
|
1466
|
-
target: transformExpression(callExpr.target, ctx),
|
|
1472
|
+
target: callExpr.target === null ? null : transformExpression(callExpr.target, ctx),
|
|
1467
1473
|
method: callExpr.method
|
|
1468
1474
|
};
|
|
1469
1475
|
if (callExpr.args && callExpr.args.length > 0) {
|
|
@@ -2545,7 +2551,7 @@ function transformExpression2(expr, ctx) {
|
|
|
2545
2551
|
const callExpr = expr;
|
|
2546
2552
|
const result = {
|
|
2547
2553
|
expr: "call",
|
|
2548
|
-
target: transformExpression2(callExpr.target, ctx),
|
|
2554
|
+
target: callExpr.target === null ? null : transformExpression2(callExpr.target, ctx),
|
|
2549
2555
|
method: callExpr.method
|
|
2550
2556
|
};
|
|
2551
2557
|
if (callExpr.args && callExpr.args.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constela/compiler",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.6",
|
|
4
4
|
"description": "Compiler for Constela UI framework - AST to Program transformation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@constela/core": "0.
|
|
18
|
+
"@constela/core": "0.18.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^20.10.0",
|