eslint-plugin-react-x 1.26.1-next.1 → 1.26.1-next.2

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
@@ -42,7 +42,7 @@ var ts__default = /*#__PURE__*/_interopDefault(ts);
42
42
 
43
43
  // package.json
44
44
  var name = "eslint-plugin-react-x";
45
- var version = "1.26.1-next.1";
45
+ var version = "1.26.1-next.2";
46
46
  var createRule = shared.createRuleForPlugin("x");
47
47
 
48
48
  // src/utils/get-associated-tokens.ts
@@ -2441,7 +2441,7 @@ var no_unstable_default_props_default = createRule({
2441
2441
  name: RULE_NAME41,
2442
2442
  create(context) {
2443
2443
  const { ctx, listeners } = core.useComponentCollector(context);
2444
- const declarators = /* @__PURE__ */ new WeakMap();
2444
+ const declarators = /* @__PURE__ */ new Map();
2445
2445
  return {
2446
2446
  ...listeners,
2447
2447
  "Program:exit"(node) {
@@ -2487,8 +2487,11 @@ var no_unstable_default_props_default = createRule({
2487
2487
  "VariableDeclarator[id.type='ObjectPattern'][init.type='Identifier']"(node) {
2488
2488
  const functionEntry = ctx.getCurrentEntry();
2489
2489
  if (functionEntry == null) return;
2490
- const prevs = declarators.get(functionEntry.node) ?? [];
2491
- declarators.set(functionEntry.node, [...prevs, node]);
2490
+ eff.getOrUpdate(
2491
+ declarators,
2492
+ functionEntry.node,
2493
+ () => []
2494
+ ).push(node);
2492
2495
  }
2493
2496
  };
2494
2497
  },
package/dist/index.mjs CHANGED
@@ -15,7 +15,7 @@ import { getTypeImmutability, isUnknown, isImmutable, isReadonlyShallow, isReado
15
15
 
16
16
  // package.json
17
17
  var name = "eslint-plugin-react-x";
18
- var version = "1.26.1-next.1";
18
+ var version = "1.26.1-next.2";
19
19
  var createRule = createRuleForPlugin("x");
20
20
 
21
21
  // src/utils/get-associated-tokens.ts
@@ -2414,7 +2414,7 @@ var no_unstable_default_props_default = createRule({
2414
2414
  name: RULE_NAME41,
2415
2415
  create(context) {
2416
2416
  const { ctx, listeners } = useComponentCollector(context);
2417
- const declarators = /* @__PURE__ */ new WeakMap();
2417
+ const declarators = /* @__PURE__ */ new Map();
2418
2418
  return {
2419
2419
  ...listeners,
2420
2420
  "Program:exit"(node) {
@@ -2460,8 +2460,11 @@ var no_unstable_default_props_default = createRule({
2460
2460
  "VariableDeclarator[id.type='ObjectPattern'][init.type='Identifier']"(node) {
2461
2461
  const functionEntry = ctx.getCurrentEntry();
2462
2462
  if (functionEntry == null) return;
2463
- const prevs = declarators.get(functionEntry.node) ?? [];
2464
- declarators.set(functionEntry.node, [...prevs, node]);
2463
+ getOrUpdate(
2464
+ declarators,
2465
+ functionEntry.node,
2466
+ () => []
2467
+ ).push(node);
2465
2468
  }
2466
2469
  };
2467
2470
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "1.26.1-next.1",
3
+ "version": "1.26.1-next.2",
4
4
  "description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
5
5
  "keywords": [
6
6
  "react",
@@ -48,17 +48,17 @@
48
48
  "is-immutable-type": "^5.0.1",
49
49
  "string-ts": "^2.2.0",
50
50
  "ts-pattern": "^5.6.2",
51
- "@eslint-react/core": "1.26.1-next.1",
52
- "@eslint-react/ast": "1.26.1-next.1",
53
- "@eslint-react/jsx": "1.26.1-next.1",
54
- "@eslint-react/eff": "1.26.1-next.1",
55
- "@eslint-react/var": "1.26.1-next.1",
56
- "@eslint-react/shared": "1.26.1-next.1"
51
+ "@eslint-react/ast": "1.26.1-next.2",
52
+ "@eslint-react/core": "1.26.1-next.2",
53
+ "@eslint-react/eff": "1.26.1-next.2",
54
+ "@eslint-react/jsx": "1.26.1-next.2",
55
+ "@eslint-react/shared": "1.26.1-next.2",
56
+ "@eslint-react/var": "1.26.1-next.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/react": "^19.0.8",
60
60
  "@types/react-dom": "^19.0.3",
61
- "ts-api-utils": "^2.0.0",
61
+ "ts-api-utils": "^2.0.1",
62
62
  "tsup": "^8.3.6",
63
63
  "@workspace/configs": "0.0.0"
64
64
  },