babel-plugin-vasille 4.2.0 → 4.2.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.
Files changed (2) hide show
  1. package/lib/mesh.js +6 -4
  2. package/package.json +1 -1
package/lib/mesh.js CHANGED
@@ -533,18 +533,20 @@ function procedureProcessObjectExpression(path, internal, state, prefix) {
533
533
  if (valuePath.isObjectExpression()) {
534
534
  procedureProcessObjectExpression(valuePath, internal, state, `${prefix}${name}.`);
535
535
  }
536
- else {
537
- meshExpression(valuePath, internal);
538
- }
539
536
  if (name.startsWith("$")) {
540
537
  if (internal.isComposing && !internal.isFunctionParsing) {
538
+ meshExpression(valuePath, internal);
541
539
  valuePath.replaceWith(internal.ref(valuePath.node));
542
540
  state[name] = 1;
543
541
  }
544
- else {
542
+ else if (!((valuePath.isIdentifier() && (0, expression_js_1.idIsIValue)(valuePath)) ||
543
+ (valuePath.isMemberExpression() && (0, expression_js_1.memberIsIValue)(valuePath.node)))) {
545
544
  (0, lib_js_1.err)(lib_js_1.Errors.RulesOfVasille, prop.get("key"), "This property is not a reactive", internal);
546
545
  }
547
546
  }
547
+ else {
548
+ meshExpression(valuePath, internal);
549
+ }
548
550
  }
549
551
  }
550
552
  // the property name is unknown in compile time
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-plugin-vasille",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "Convert Vasille Meta Language code to pure JavaScript",
5
5
  "main": "lib/index.js",
6
6
  "type": "commonjs",