@eslint-react/core 5.2.4-beta.0 → 5.2.4-beta.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/dist/index.js +4 -4
  2. package/package.json +6 -7
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { Check, Extract, Traverse, is, isOneOf } from "@eslint-react/ast";
2
2
  import { resolveImportSource } from "@eslint-react/var";
3
3
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
4
4
  import "@eslint-react/eslint";
5
- import { ulid } from "ulid";
5
+ import { randomBytes } from "node:crypto";
6
6
  import { JsxDetectionHint, isJsxLike } from "@eslint-react/jsx";
7
7
  import { RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE } from "@eslint-react/shared";
8
8
  import { AST_NODE_TYPES as AST_NODE_TYPES$1 } from "@typescript-eslint/utils";
@@ -393,7 +393,7 @@ function getClassComponentCollector(context) {
393
393
  const collect = (node) => {
394
394
  if (!isClassComponent(node)) return;
395
395
  const id = getClassId(node);
396
- const key = ulid();
396
+ const key = randomBytes(8).toString("hex");
397
397
  const name = id == null ? null : Extract.getFullyQualifiedName(id, getText);
398
398
  components.set(key, {
399
399
  id,
@@ -850,7 +850,7 @@ function getFunctionComponentCollector(context, options = {}) {
850
850
  const getText = (n) => context.sourceCode.getText(n);
851
851
  const getCurrentEntry = () => functionEntries.at(-1) ?? null;
852
852
  const onFunctionEnter = (node) => {
853
- const key = ulid();
853
+ const key = randomBytes(8).toString("hex");
854
854
  const exp = Traverse.findParent(node, (n) => n.type === AST_NODE_TYPES.ExportDefaultDeclaration);
855
855
  const isExportDefault = exp != null;
856
856
  const isExportDefaultDeclaration = exp != null && Extract.unwrap(exp.declaration) === node;
@@ -942,7 +942,7 @@ function getHookCollector(context) {
942
942
  const getCurrentEntry = () => functionEntries.at(-1) ?? null;
943
943
  const onFunctionEnter = (node) => {
944
944
  const id = getFunctionId(node);
945
- const key = ulid();
945
+ const key = randomBytes(8).toString("hex");
946
946
  const entry = {
947
947
  id,
948
948
  key,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "5.2.4-beta.0",
3
+ "version": "5.2.4-beta.1",
4
4
  "description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -34,12 +34,11 @@
34
34
  "@typescript-eslint/types": "^8.58.2",
35
35
  "@typescript-eslint/utils": "^8.58.2",
36
36
  "ts-pattern": "^5.9.0",
37
- "ulid": "^3.0.2",
38
- "@eslint-react/eslint": "5.2.4-beta.0",
39
- "@eslint-react/ast": "5.2.4-beta.0",
40
- "@eslint-react/jsx": "5.2.4-beta.0",
41
- "@eslint-react/shared": "5.2.4-beta.0",
42
- "@eslint-react/var": "5.2.4-beta.0"
37
+ "@eslint-react/ast": "5.2.4-beta.1",
38
+ "@eslint-react/jsx": "5.2.4-beta.1",
39
+ "@eslint-react/eslint": "5.2.4-beta.1",
40
+ "@eslint-react/var": "5.2.4-beta.1",
41
+ "@eslint-react/shared": "5.2.4-beta.1"
43
42
  },
44
43
  "devDependencies": {
45
44
  "@typescript-eslint/typescript-estree": "^8.58.2",