@eslint-react/ast 5.24.3 → 5.24.4

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.js CHANGED
@@ -1,7 +1,6 @@
1
- import { t as __exportAll } from "./rolldown-runtime-w6R9maHv.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
3
3
  import * as ASTUtils from "@typescript-eslint/utils/ast-utils";
4
-
5
4
  //#region src/check.ts
6
5
  var check_exports = /* @__PURE__ */ __exportAll({
7
6
  is: () => is,
@@ -141,7 +140,6 @@ const isConditional = isOneOf([
141
140
  AST_NODE_TYPES.LogicalExpression,
142
141
  AST_NODE_TYPES.ConditionalExpression
143
142
  ]);
144
-
145
143
  //#endregion
146
144
  //#region ../../.pkgs/eff/dist/index.js
147
145
  const pipeArguments = (self, args) => {
@@ -166,7 +164,7 @@ const pipeArguments = (self, args) => {
166
164
  const Prototype = { pipe() {
167
165
  return pipeArguments(this, arguments);
168
166
  } };
169
- const Class = (function() {
167
+ (function() {
170
168
  function PipeableBase() {}
171
169
  PipeableBase.prototype = Prototype;
172
170
  return PipeableBase;
@@ -201,23 +199,18 @@ const dual = function(arity, body) {
201
199
  };
202
200
  const identity = (a) => a;
203
201
  const cast = identity;
204
- const constant = (value) => () => value;
205
- const constTrue = constant(true);
206
- const constFalse = constant(false);
207
- const constNull = constant(null);
208
- const constUndefined = constant(void 0);
209
- const compose = dual(2, (ab, bc) => (a) => bc(ab(a)));
202
+ dual(2, (ab, bc) => (a) => bc(ab(a)));
210
203
  const absurd = (_) => {
211
204
  throw new Error("Called `absurd` function which should be uncallable");
212
205
  };
213
- const hole = cast(absurd);
214
- const and = dual(2, (a, b) => (data) => a(data) && b(data));
215
- const or = dual(2, (a, b) => (data) => a(data) || b(data));
216
- const xor = dual(2, (a, b) => (data) => a(data) !== b(data));
217
- const eqv = dual(2, (a, b) => (data) => a(data) === b(data));
218
- const implies = dual(2, (antecedent, consequent) => (data) => !antecedent(data) || consequent(data));
219
- const nor = dual(2, (a, b) => (data) => !a(data) && !b(data));
220
- const nand = dual(2, (a, b) => (data) => !a(data) || !b(data));
206
+ cast(absurd);
207
+ dual(2, (a, b) => (data) => a(data) && b(data));
208
+ dual(2, (a, b) => (data) => a(data) || b(data));
209
+ dual(2, (a, b) => (data) => a(data) !== b(data));
210
+ dual(2, (a, b) => (data) => a(data) === b(data));
211
+ dual(2, (antecedent, consequent) => (data) => !antecedent(data) || consequent(data));
212
+ dual(2, (a, b) => (data) => !a(data) && !b(data));
213
+ dual(2, (a, b) => (data) => !a(data) || !b(data));
221
214
  function isString(input) {
222
215
  return typeof input === "string";
223
216
  }
@@ -227,22 +220,21 @@ function isFunction(input) {
227
220
  function isObjectKeyword(input) {
228
221
  return typeof input === "object" && input !== null || isFunction(input);
229
222
  }
230
- const hasProperty = dual(2, (data, property) => isObjectKeyword(data) && property in data);
231
- const dropWhile = dual(2, (self, predicate) => {
223
+ dual(2, (data, property) => isObjectKeyword(data) && property in data);
224
+ dual(2, (self, predicate) => {
232
225
  const input = Array.isArray(self) ? self : Array.from(self);
233
226
  const len = input.length;
234
227
  let idx = 0;
235
228
  while (idx < len && predicate(input[idx], idx)) idx++;
236
229
  return input.slice(idx);
237
230
  });
238
- const takeWhile = dual(2, (self, predicate) => {
231
+ dual(2, (self, predicate) => {
239
232
  const input = Array.isArray(self) ? self : Array.from(self);
240
233
  const len = input.length;
241
234
  let idx = 0;
242
235
  while (idx < len && predicate(input[idx], idx)) idx++;
243
236
  return input.slice(0, idx);
244
237
  });
245
-
246
238
  //#endregion
247
239
  //#region src/extract.ts
248
240
  var extract_exports = /* @__PURE__ */ __exportAll({
@@ -324,7 +316,6 @@ function getFullyQualifiedName(node, getText) {
324
316
  default: return getText(expr);
325
317
  }
326
318
  }
327
-
328
319
  //#endregion
329
320
  //#region src/compare.ts
330
321
  var compare_exports = /* @__PURE__ */ __exportAll({ isEqual: () => isEqual });
@@ -376,7 +367,6 @@ const isEqual = dual(2, (a, b) => {
376
367
  default: return false;
377
368
  }
378
369
  });
379
-
380
370
  //#endregion
381
371
  //#region src/traverse.ts
382
372
  var traverse_exports = /* @__PURE__ */ __exportAll({
@@ -400,6 +390,5 @@ function findEnclosingTryBlock(node) {
400
390
  if (parent.type === AST_NODE_TYPES.TryStatement && node === parent.block) return parent;
401
391
  return findEnclosingTryBlock(parent);
402
392
  }
403
-
404
393
  //#endregion
405
- export { check_exports as Check, compare_exports as Compare, extract_exports as Extract, traverse_exports as Traverse };
394
+ export { check_exports as Check, compare_exports as Compare, extract_exports as Extract, traverse_exports as Traverse };
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/ast",
3
- "version": "5.24.3",
3
+ "version": "5.24.4",
4
4
  "description": "ESLint React's TSESTree AST utility module.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -1,18 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __defProp = Object.defineProperty;
3
- var __exportAll = (all, no_symbols) => {
4
- let target = {};
5
- for (var name in all) {
6
- __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- }
11
- if (!no_symbols) {
12
- __defProp(target, Symbol.toStringTag, { value: "Module" });
13
- }
14
- return target;
15
- };
16
-
17
- //#endregion
18
- export { __exportAll as t };