Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

View File

@@ -5,28 +5,66 @@ Object.defineProperty(exports, '__esModule', {
});
exports.default = nodeModulesPaths;
function _path() {
const data = _interopRequireDefault(require('path'));
function path() {
const data = _interopRequireWildcard(require('path'));
_path = function _path() {
path = function () {
return data;
};
return data;
}
function _realpathNative() {
const data = require('realpath-native');
function _jestUtil() {
const data = require('jest-util');
_realpathNative = function _realpathNative() {
_jestUtil = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
function _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function () {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
return {default: obj};
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
/**
@@ -44,8 +82,7 @@ function nodeModulesPaths(basedir, options) {
: ['node_modules']; // ensure that `basedir` is an absolute path at this point,
// resolving against the process' current working directory
const basedirAbs = _path().default.resolve(basedir);
const basedirAbs = path().resolve(basedir);
let prefix = '/';
if (/^([A-Za-z]:)/.test(basedirAbs)) {
@@ -58,19 +95,18 @@ function nodeModulesPaths(basedir, options) {
let physicalBasedir;
try {
physicalBasedir = (0, _realpathNative().sync)(basedirAbs);
} catch (err) {
physicalBasedir = (0, _jestUtil().tryRealpath)(basedirAbs);
} catch {
// realpath can throw, e.g. on mapped drives
physicalBasedir = basedirAbs;
}
const paths = [physicalBasedir];
let parsed = _path().default.parse(physicalBasedir);
let parsed = path().parse(physicalBasedir);
while (parsed.dir !== paths[paths.length - 1]) {
paths.push(parsed.dir);
parsed = _path().default.parse(parsed.dir);
parsed = path().parse(parsed.dir);
}
const dirs = paths
@@ -78,11 +114,11 @@ function nodeModulesPaths(basedir, options) {
(dirs, aPath) =>
dirs.concat(
modules.map(moduleDir =>
_path().default.isAbsolute(moduleDir)
path().isAbsolute(moduleDir)
? aPath === basedirAbs
? moduleDir
: ''
: _path().default.join(prefix, aPath, moduleDir)
: path().join(prefix, aPath, moduleDir)
)
),
[]