🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@eslint-react/shared

Package Overview
Dependencies
Maintainers
0
Versions
1479
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eslint-react/shared - npm Package Compare versions

Comparing version

to
1.20.1-beta.2

26

dist/index.js

@@ -5,8 +5,10 @@ 'use strict';

var tools = require('@eslint-react/tools');
var localPkg = require('local-pkg');
var tsPattern = require('ts-pattern');
var module$1 = require('module');
var pm = require('picomatch');
var tsPattern = require('ts-pattern');
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var module__default = /*#__PURE__*/_interopDefault(module$1);
var pm__default = /*#__PURE__*/_interopDefault(pm);

@@ -221,3 +223,20 @@

var createRuleForPlugin = (pluginName) => utils.ESLintUtils.RuleCreator(getDocsUrl(pluginName));
function tryRequire(id, at = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href))) {
const _require = module__default.default.createRequire(at);
try {
return tools.E.right(_require(id));
} catch {
return tools.E.left(new Error(`Module '${id}' not found`));
}
}
// src/get-react-version.ts
function getReactVersion(at = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.js', document.baseURI).href))) {
return tools.F.pipe(
tryRequire("react", at),
tools.E.filterOrLeft(tsPattern.isMatching({ version: tsPattern.P.string }), tools.F.identity),
tools.E.map((mod) => mod.version)
);
}
// ../../node_modules/.pnpm/valibot@1.0.0-beta.9_typescript@5.7.2/node_modules/valibot/dist/index.js

@@ -1366,3 +1385,3 @@ var store;

}, /* @__PURE__ */ new Map()),
version: tsPattern.match(settings.version).with(tsPattern.P.union(tsPattern.P.nullish, "", "detect"), () => localPkg.getPackageInfoSync("react")?.version ?? "19.0.0").otherwise(tools.F.identity)
version: tsPattern.match(settings.version).with(tsPattern.P.union(tsPattern.P.nullish, "", "detect"), () => tools.E.getOrElse(getReactVersion(), tools.F.constant("19.0.0"))).otherwise(tools.F.identity)
};

@@ -1394,3 +1413,4 @@ }, { isEqual: shallowEqual });

exports.defineSettings = defineSettings;
exports.getReactVersion = getReactVersion;
exports.normalizeSettings = normalizeSettings;
exports.unsafeReadSettings = unsafeReadSettings;

9

package.json
{
"name": "@eslint-react/shared",
"version": "1.20.0",
"version": "1.20.1-beta.2",
"description": "ESLint React's Shared constants and functions.",

@@ -38,7 +38,6 @@ "homepage": "https://github.com/rel1cx/eslint-react",

"dependencies": {
"@typescript-eslint/utils": "^8.18.0",
"local-pkg": "^0.5.1",
"@typescript-eslint/utils": "^8.18.1",
"picomatch": "^4.0.2",
"ts-pattern": "^5.6.0",
"@eslint-react/tools": "1.20.0"
"@eslint-react/tools": "1.20.1-beta.2"
},

@@ -50,3 +49,3 @@ "devDependencies": {

"tsup": "^8.3.5",
"type-fest": "^4.30.1",
"type-fest": "^4.30.2",
"valibot": "^1.0.0-beta.9",

@@ -53,0 +52,0 @@ "@workspace/configs": "0.0.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet