@delance/builder 0.3.8 → 0.3.9

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/dist/index.js +10 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2860,7 +2860,7 @@ var entry = capture(numericLiteral());
2860
2860
  var requireEntry = callExpression(identifier("require"), [entry]);
2861
2861
  var main = callExpression(memberExpression(or(requireEntry, identifier()), identifier("main"), false), [booleanLiteral(true)]);
2862
2862
  var verifyClient = assignmentExpression("=", memberExpression(identifier("exports"), identifier("verifyClient")), or(functionExpression(null, [identifier()]), identifier()));
2863
- var invalidClient = ifStatement(anything(), containerOf(memberExpression(memberExpression(identifier(), identifier("EventName")), identifier("LANGUAGE_SERVER_INVALID_CLIENT"))));
2863
+ var invalidClient = memberExpression(memberExpression(identifier(), identifier("EventName")), identifier("LANGUAGE_SERVER_INVALID_CLIENT"));
2864
2864
  var antifeature_default = {
2865
2865
  name: "anti-feature",
2866
2866
  tags: ["unsafe"],
@@ -2890,7 +2890,7 @@ var antifeature_default = {
2890
2890
  });
2891
2891
  }
2892
2892
  t22.assertNumericLiteral(entry.current);
2893
- const _target = $.find((p) => chunk_default.match(p.node));
2893
+ const _target = $.findParent((p) => chunk_default.match(p.node));
2894
2894
  if (!_target) {
2895
2895
  throw new Error("Could not find module chunk");
2896
2896
  }
@@ -2941,12 +2941,18 @@ var antifeature_default = {
2941
2941
  this.changes++;
2942
2942
  }
2943
2943
  },
2944
- IfStatement: {
2944
+ MemberExpression: {
2945
2945
  exit($) {
2946
2946
  if (!invalidClient.match($.node)) {
2947
2947
  return;
2948
2948
  }
2949
- $.remove();
2949
+ const _target = $.findParent((p) => p.isIfStatement());
2950
+ if (!_target) {
2951
+ throw new Error("Could not find parent if");
2952
+ }
2953
+ const $target = _target;
2954
+ $target.assertIfStatement();
2955
+ $target.remove();
2950
2956
  this.changes++;
2951
2957
  }
2952
2958
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@delance/builder",
3
3
  "type": "module",
4
- "version": "0.3.8",
5
- "packageManager": "pnpm@10.20.0+sha512.cf9998222162dd85864d0a8102e7892e7ba4ceadebbf5a31f9c2fce48dfce317a9c53b9f6464d1ef9042cba2e02ae02a9f7c143a2b438cd93c91840f0192b9dd",
4
+ "version": "0.3.9",
5
+ "packageManager": "pnpm@10.28.1+sha512.7d7dbbca9e99447b7c3bf7a73286afaaf6be99251eb9498baefa7d406892f67b879adb3a1d7e687fc4ccc1a388c7175fbaae567a26ab44d1067b54fcb0d6a316",
6
6
  "description": "A spear to the Python language server built with black magic",
7
7
  "author": "mochaaP <npm@mochaa.ws>",
8
8
  "license": "0BSD",