@eslint-react/shared 5.0.2-beta.4 → 5.0.2-beta.5
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 +1 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -267,7 +267,6 @@ function isRegExp(string) {
|
|
|
267
267
|
|
|
268
268
|
//#endregion
|
|
269
269
|
//#region src/settings.ts
|
|
270
|
-
const _require = module.createRequire(process.cwd() + path.sep);
|
|
271
270
|
/**
|
|
272
271
|
* @internal
|
|
273
272
|
*/
|
|
@@ -327,7 +326,7 @@ const cache = /* @__PURE__ */ new Map();
|
|
|
327
326
|
*/
|
|
328
327
|
function getReactVersion(fallback) {
|
|
329
328
|
try {
|
|
330
|
-
return match(
|
|
329
|
+
return match(module.createRequire(process.cwd() + path.sep)("react")).with({ version: P.select(P.string) }, identity).otherwise(() => fallback);
|
|
331
330
|
} catch {
|
|
332
331
|
return fallback;
|
|
333
332
|
}
|