Update checked-in dependencies
This commit is contained in:
parent
79817eb679
commit
9c3b394d7f
402 changed files with 12598 additions and 2912 deletions
15
node_modules/eslint-import-resolver-node/index.js
generated
vendored
15
node_modules/eslint-import-resolver-node/index.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const resolve = require('resolve');
|
||||
const resolve = require('resolve/sync');
|
||||
const isCoreModule = require('is-core-module');
|
||||
const path = require('path');
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ exports.resolve = function (source, file, config) {
|
|||
|
||||
try {
|
||||
const cachedFilter = function (pkg, dir) { return packageFilter(pkg, dir, config); };
|
||||
resolvedPath = resolve.sync(source, opts(file, config, cachedFilter));
|
||||
resolvedPath = resolve(source, opts(file, config, cachedFilter));
|
||||
log('Resolved to:', resolvedPath);
|
||||
return { found: true, path: resolvedPath };
|
||||
} catch (err) {
|
||||
|
|
@ -29,13 +29,10 @@ exports.resolve = function (source, file, config) {
|
|||
};
|
||||
|
||||
function opts(file, config, packageFilter) {
|
||||
return Object.assign({
|
||||
// more closely matches Node (#333)
|
||||
return Object.assign({ // more closely matches Node (#333)
|
||||
// plus 'mjs' for native modules! (#939)
|
||||
extensions: ['.mjs', '.js', '.json', '.node'],
|
||||
},
|
||||
config,
|
||||
{
|
||||
}, config, {
|
||||
// path.resolve will handle paths relative to CWD
|
||||
basedir: path.dirname(path.resolve(file)),
|
||||
packageFilter,
|
||||
|
|
@ -49,7 +46,7 @@ function packageFilter(pkg, dir, config) {
|
|||
const file = path.join(dir, 'dummy.js');
|
||||
if (pkg.module) {
|
||||
try {
|
||||
resolve.sync(String(pkg.module).replace(/^(?:\.\/)?/, './'), opts(file, config, identity));
|
||||
resolve(String(pkg.module).replace(/^(?:\.\/)?/, './'), opts(file, config, identity));
|
||||
pkg.main = pkg.module;
|
||||
found = true;
|
||||
} catch (err) {
|
||||
|
|
@ -58,7 +55,7 @@ function packageFilter(pkg, dir, config) {
|
|||
}
|
||||
if (!found && pkg['jsnext:main']) {
|
||||
try {
|
||||
resolve.sync(String(pkg['jsnext:main']).replace(/^(?:\.\/)?/, './'), opts(file, config, identity));
|
||||
resolve(String(pkg['jsnext:main']).replace(/^(?:\.\/)?/, './'), opts(file, config, identity));
|
||||
pkg.main = pkg['jsnext:main'];
|
||||
found = true;
|
||||
} catch (err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue