mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
60 lines
485 KiB
Diff
60 lines
485 KiB
Diff
|
diff --git a/dist/eslintrc.cjs b/dist/eslintrc.cjs
|
||
|
index 753117b3244df70d4305a599b9d97c346ddfac44..a47016aac3aed284c57b471fa0fb068a258e7b72 100644
|
||
|
--- a/dist/eslintrc.cjs
|
||
|
+++ b/dist/eslintrc.cjs
|
||
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
||
|
|
||
|
var debugOrig = require('debug');
|
||
|
var fs = require('fs');
|
||
|
-var importFresh = require('import-fresh');
|
||
|
var Module = require('module');
|
||
|
var path = require('path');
|
||
|
var stripComments = require('strip-json-comments');
|
||
|
@@ -20,7 +19,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
||
|
|
||
|
var debugOrig__default = /*#__PURE__*/_interopDefaultLegacy(debugOrig);
|
||
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
||
|
-var importFresh__default = /*#__PURE__*/_interopDefaultLegacy(importFresh);
|
||
|
var Module__default = /*#__PURE__*/_interopDefaultLegacy(Module);
|
||
|
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
||
|
var stripComments__default = /*#__PURE__*/_interopDefaultLegacy(stripComments);
|
||
|
@@ -2559,7 +2557,7 @@ function loadLegacyConfigFile(filePath) {
|
||
|
function loadJSConfigFile(filePath) {
|
||
|
debug$2(`Loading JS config file: ${filePath}`);
|
||
|
try {
|
||
|
- return importFresh__default["default"](filePath);
|
||
|
+ return require$1(filePath);
|
||
|
} catch (e) {
|
||
|
debug$2(`Error reading JavaScript file: ${filePath}`);
|
||
|
e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
|
||
|
diff --git a/dist/eslintrc.cjs.map b/dist/eslintrc.cjs.map
|
||
|
index 58d9dbbcdea817cbf660935c6d1272f3313d0835..9e6ba45f7a045b6fb7ffa2f2f6c966ecaf0a6a55 100644
|
||
|
--- a/dist/eslintrc.cjs.map
|
||
|
+++ b/dist/eslintrc.cjs.map
|
||
|
@@ -1 +1 @@
|
||
|
-{"version":3,"file":"eslintrc.cjs","sources":["../lib/config-array/ignore-pattern.js","../lib/config-array/extracted-config.js","../lib/config-array/config-array.js","../lib/config-array/config-dependency.js","../lib/config-array/override-tester.js","../lib/config-array/index.js","../lib/shared/config-ops.js","../lib/shared/deprecation-warnings.js","../lib/shared/ajv.js","../conf/config-schema.js","../conf/environments.js","../lib/shared/config-validator.js","../lib/shared/naming.js","../lib/shared/relative-module-resolver.js","../lib/config-array-factory.js","../lib/cascading-config-array-factory.js","../lib/flat-compat.js","../lib/index.js"],"sourcesContent":["/**\n * @fileoverview `IgnorePattern` class.\n *\n * `IgnorePattern` class has the set of glob patterns and the base path.\n *\n * It provides two static methods.\n *\n * - `IgnorePattern.createDefaultIgnore(cwd)`\n * Create the default predicate function.\n * - `IgnorePattern.createIgnore(ignorePatterns)`\n * Create the predicate function from multiple `IgnorePattern` objects.\n *\n * It provides two properties and a method.\n *\n * - `patterns`\n * The glob patterns that ignore to lint.\n * - `basePath`\n * The base path of the glob patterns. If absolute paths existed in the\n * glob patterns, those are handled as relative paths to the base path.\n * - `getPatternsRelativeTo(basePath)`\n * Get `patterns` as modified for a given base path. It modifies the\n * absolute paths in the patterns as prepending the difference of two base\n * paths.\n *\n * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes\n * `ignorePatterns` properties.\n *\n * @author Toru Nagashima <https://github.com/mysticatea>\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport assert from \"assert\";\nimport path from \"path\";\nimport ignore from \"ignore\";\nimport debugOrig from \"debug\";\n\nconst debug = debugOrig(\"eslintrc:ignore-pattern\");\n\n/** @typedef {ReturnType<import(\"ignore\").default>} Ignore */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the path to the common ancestor directory of given paths.\n * @param {string[]} sourcePaths The paths to calculate the common ancestor.\n * @returns {string} The path to the common ancestor directory.\n */\nfunction getCommonAncestorPath(sourcePaths) {\n let result = sourcePaths[0];\n\n for (let i = 1; i < sourcePaths.length; ++i) {\n const a = result;\n const b = sourcePaths[i];\n\n // Set the shorter one (it's the common ancestor if one includes the other).\n result = a.length < b.length ? a : b;\n\n // Set the common ancestor.\n for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) {\n if (a[j] !== b[j]) {\n result = a.slice(0, lastSepPos);\n break;\n }\n if (a[j] === path.sep) {\n lastSepPos = j;\n }\n }\n }\n\n let resolvedResult = result || path.sep;\n\n // if Windows common ancestor is root of drive must have trailing slash to be absolute.\n if (resolvedResult && resolvedResult.endsWith(\":\") && process.platform === \"win32\") {\n resolvedResult += path.sep;\n }\n return resolvedResult;\n}\n\n/**\n * Make relative path.\n * @param {string} from The source path to get relative path.\n * @param {string} to The destination path to get relative path.\n * @returns {string} The relative path.\n */\nfunction relative(from, to) {\n const relPath = path.relative(from, to);\n\n if (path.sep === \"/\") {\n return relPath;\n }\n return relPath.split(path.sep).join(\"/\");\n}\n\n/**\n * Get the trailing slash if existed.\n * @param {string} filePath The path to check.\n * @returns {string} The traili
|
||
|
\ No newline at end of file
|
||
|
+{"version":3,"file":"eslintrc.cjs","sources":["../lib/config-array/ignore-pattern.js","../lib/config-array/extracted-config.js","../lib/config-array/config-array.js","../lib/config-array/config-dependency.js","../lib/config-array/override-tester.js","../lib/config-array/index.js","../lib/shared/config-ops.js","../lib/shared/deprecation-warnings.js","../lib/shared/ajv.js","../conf/config-schema.js","../conf/environments.js","../lib/shared/config-validator.js","../lib/shared/naming.js","../lib/shared/relative-module-resolver.js","../lib/config-array-factory.js","../lib/cascading-config-array-factory.js","../lib/flat-compat.js","../lib/index.js"],"sourcesContent":["/**\n * @fileoverview `IgnorePattern` class.\n *\n * `IgnorePattern` class has the set of glob patterns and the base path.\n *\n * It provides two static methods.\n *\n * - `IgnorePattern.createDefaultIgnore(cwd)`\n * Create the default predicate function.\n * - `IgnorePattern.createIgnore(ignorePatterns)`\n * Create the predicate function from multiple `IgnorePattern` objects.\n *\n * It provides two properties and a method.\n *\n * - `patterns`\n * The glob patterns that ignore to lint.\n * - `basePath`\n * The base path of the glob patterns. If absolute paths existed in the\n * glob patterns, those are handled as relative paths to the base path.\n * - `getPatternsRelativeTo(basePath)`\n * Get `patterns` as modified for a given base path. It modifies the\n * absolute paths in the patterns as prepending the difference of two base\n * paths.\n *\n * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes\n * `ignorePatterns` properties.\n *\n * @author Toru Nagashima <https://github.com/mysticatea>\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport assert from \"assert\";\nimport path from \"path\";\nimport ignore from \"ignore\";\nimport debugOrig from \"debug\";\n\nconst debug = debugOrig(\"eslintrc:ignore-pattern\");\n\n/** @typedef {ReturnType<import(\"ignore\").default>} Ignore */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the path to the common ancestor directory of given paths.\n * @param {string[]} sourcePaths The paths to calculate the common ancestor.\n * @returns {string} The path to the common ancestor directory.\n */\nfunction getCommonAncestorPath(sourcePaths) {\n let result = sourcePaths[0];\n\n for (let i = 1; i < sourcePaths.length; ++i) {\n const a = result;\n const b = sourcePaths[i];\n\n // Set the shorter one (it's the common ancestor if one includes the other).\n result = a.length < b.length ? a : b;\n\n // Set the common ancestor.\n for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) {\n if (a[j] !== b[j]) {\n result = a.slice(0, lastSepPos);\n break;\n }\n if (a[j] === path.sep) {\n lastSepPos = j;\n }\n }\n }\n\n let resolvedResult = result || path.sep;\n\n // if Windows common ancestor is root of drive must have trailing slash to be absolute.\n if (resolvedResult && resolvedResult.endsWith(\":\") && process.platform === \"win32\") {\n resolvedResult += path.sep;\n }\n return resolvedResult;\n}\n\n/**\n * Make relative path.\n * @param {string} from The source path to get relative path.\n * @param {string} to The destination path to get relative path.\n * @returns {string} The relative path.\n */\nfunction relative(from, to) {\n const relPath = path.relative(from, to);\n\n if (path.sep === \"/\") {\n return relPath;\n }\n return relPath.split(path.sep).join(\"/\");\n}\n\n/**\n * Get the trailing slash if existed.\n * @param {string} filePath The path to check.\n * @returns {string} The traili
|
||
|
\ No newline at end of file
|
||
|
diff --git a/lib/config-array-factory.js b/lib/config-array-factory.js
|
||
|
index 99851e15f9d79154e47cf6595c9b761ad1683401..bd6748c96eaa2d43ca05a6730486c726d47b0618 100644
|
||
|
--- a/lib/config-array-factory.js
|
||
|
+++ b/lib/config-array-factory.js
|
||
|
@@ -40,7 +40,6 @@
|
||
|
|
||
|
import debugOrig from "debug";
|
||
|
import fs from "fs";
|
||
|
-import importFresh from "import-fresh";
|
||
|
import { createRequire } from "module";
|
||
|
import path from "path";
|
||
|
import stripComments from "strip-json-comments";
|
||
|
@@ -234,7 +233,7 @@ function loadLegacyConfigFile(filePath) {
|
||
|
function loadJSConfigFile(filePath) {
|
||
|
debug(`Loading JS config file: ${filePath}`);
|
||
|
try {
|
||
|
- return importFresh(filePath);
|
||
|
+ return require(filePath);
|
||
|
} catch (e) {
|
||
|
debug(`Error reading JavaScript file: ${filePath}`);
|
||
|
e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
|