Skip to content

Commit 34d9b84

Browse files
committed
Remove 'NodeJS.Require' type from shared package, closes #1308
1 parent d84f4c8 commit 34d9b84

File tree

6 files changed

+77
-83
lines changed

6 files changed

+77
-83
lines changed

apps/website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"fumadocs-twoslash": "3.1.9",
2121
"fumadocs-typescript": "4.0.12",
2222
"fumadocs-ui": "16.0.5",
23-
"lucide-react": "^0.552.0",
23+
"lucide-react": "^0.553.0",
2424
"next": "^16.0.1",
2525
"next-view-transitions": "^0.3.4",
2626
"react": "^19.2.0",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"typedoc-plugin-mdn-links": "^5.0.10",
9494
"typescript": "^5.9.3",
9595
"typescript-eslint": "^8.46.3",
96-
"vitest": "^4.0.7"
96+
"vitest": "^4.0.8"
9797
},
9898
"packageManager": "[email protected]",
9999
"engines": {

packages/shared/src/_require.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/shared/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from "./_id";
2-
export * from "./_require";
32
export * from "./config-adapters";
43
export * from "./constants";
54
export * from "./react-version";

packages/shared/src/react-version.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
import module from "node:module";
2+
import path from "node:path";
3+
14
import { identity } from "@eslint-react/eff";
25
import { P, match } from "ts-pattern";
3-
import { _require } from "./_require";
6+
7+
const _require = module.createRequire(process.cwd() + path.sep);
48

59
export function getReactVersion(fallback: string): string {
610
try {

0 commit comments

Comments
 (0)