Updated to v1.9.9

This commit is contained in:
Henry Whitaker
2020-11-07 15:27:50 +00:00
parent 15d3583423
commit 8d811862a0
6349 changed files with 338454 additions and 213438 deletions

View File

@@ -1,20 +1,34 @@
root = true
[*]
indent_style = tab
indent_size = 4
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 150
max_line_length = 200
[*.js]
block_comment_start = /*
block_comment = *
block_comment_end = */
[*.yml]
indent_size = 1
[package.json]
indent_style = tab
[CHANGELOG.md]
indent_style = space
indent_size = 2
[*.json]
[{*.json,Makefile}]
max_line_length = off
[Makefile]
[test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*]
indent_style = off
indent_size = off
max_line_length = off
insert_final_newline = off

View File

@@ -1,9 +1,9 @@
var fs = require('fs');
var path = require('path');
var caller = require('./caller.js');
var nodeModulesPaths = require('./node-modules-paths.js');
var normalizeOptions = require('./normalize-options.js');
var isCore = require('./is-core');
var caller = require('./caller');
var nodeModulesPaths = require('./node-modules-paths');
var normalizeOptions = require('./normalize-options');
var isCore = require('is-core-module');
var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;

View File

@@ -6,8 +6,8 @@ function specifierIncluded(specifier) {
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
for (var i = 0; i < 3; ++i) {
var cur = Number(current[i] || 0);
var ver = Number(versionParts[i] || 0);
var cur = parseInt(current[i] || 0, 10);
var ver = parseInt(versionParts[i] || 0, 10);
if (cur === ver) {
continue; // eslint-disable-line no-restricted-syntax, no-continue
}

View File

@@ -1,5 +1,6 @@
{
"assert": true,
"assert/strict": ">= 15",
"async_hooks": ">= 8",
"buffer_ieee754": "< 0.9.7",
"buffer": true,
@@ -12,7 +13,8 @@
"_debugger": "< 8",
"dgram": true,
"dns": true,
"domain": true,
"dns/promises": ">= 15",
"domain": ">= 0.7.12",
"events": true,
"freelist": "< 6",
"fs": true,
@@ -49,9 +51,11 @@
"_stream_readable": ">= 0.9.4",
"_stream_writable": ">= 0.9.4",
"stream": true,
"stream/promises": ">= 15",
"string_decoder": true,
"sys": true,
"sys": [">= 0.6 && < 0.7", ">= 0.8"],
"timers": true,
"timers/promises": ">= 15",
"_tls_common": ">= 0.11.13",
"_tls_legacy": ">= 0.11.3 && < 10",
"_tls_wrap": ">= 0.11.3",

View File

@@ -1,5 +1,5 @@
var core = require('./core');
var isCoreModule = require('is-core-module');
module.exports = function isCore(x) {
return Object.prototype.hasOwnProperty.call(core, x);
return isCoreModule(x);
};

View File

@@ -1,9 +1,9 @@
var isCore = require('./is-core');
var isCore = require('is-core-module');
var fs = require('fs');
var path = require('path');
var caller = require('./caller.js');
var nodeModulesPaths = require('./node-modules-paths.js');
var normalizeOptions = require('./normalize-options.js');
var caller = require('./caller');
var nodeModulesPaths = require('./node-modules-paths');
var normalizeOptions = require('./normalize-options');
var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;

View File

@@ -1,33 +1,33 @@
{
"_args": [
[
"resolve@1.17.0",
"resolve@1.18.1",
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
]
],
"_development": true,
"_from": "resolve@1.17.0",
"_id": "resolve@1.17.0",
"_from": "resolve@1.18.1",
"_id": "resolve@1.18.1",
"_inBundle": false,
"_integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
"_integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==",
"_location": "/resolve",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "resolve@1.17.0",
"raw": "resolve@1.18.1",
"name": "resolve",
"escapedName": "resolve",
"rawSpec": "1.17.0",
"rawSpec": "1.18.1",
"saveSpec": null,
"fetchSpec": "1.17.0"
"fetchSpec": "1.18.1"
},
"_requiredBy": [
"/@babel/core",
"/@babel/plugin-transform-runtime"
],
"_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
"_spec": "1.17.0",
"_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz",
"_spec": "1.18.1",
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
"author": {
"name": "James Halliday",
@@ -38,17 +38,20 @@
"url": "https://github.com/browserify/resolve/issues"
},
"dependencies": {
"is-core-module": "^2.0.0",
"path-parse": "^1.0.6"
},
"description": "resolve like require.resolve() on behalf of files asynchronously and synchronously",
"devDependencies": {
"@ljharb/eslint-config": "^16.0.0",
"@ljharb/eslint-config": "^17.2.0",
"array.prototype.map": "^1.0.2",
"eslint": "^6.8.0",
"aud": "^1.1.2",
"eclint": "^2.8.1",
"eslint": "^7.11.0",
"object-keys": "^1.1.1",
"safe-publish-latest": "^1.1.4",
"tap": "0.4.13",
"tape": "^5.0.0-next.5"
"tape": "^5.0.1"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -68,14 +71,15 @@
"url": "git://github.com/browserify/resolve.git"
},
"scripts": {
"lint": "eslint .",
"posttest": "npm run test:multirepo",
"prepublish": "safe-publish-latest",
"lint": "eslint --ext=js,mjs .",
"posttest": "npm run test:multirepo && aud --production",
"prelint": "eclint check '**/*'",
"prepublish": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/",
"pretest": "npm run lint",
"pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async",
"test": "npm run --silent tests-only",
"test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test",
"tests-only": "tape test/*.js"
},
"version": "1.17.0"
"version": "1.18.1"
}

View File

@@ -122,12 +122,12 @@ default `opts` values:
});
},
realpath: function realpath(file, cb) {
var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
realpath(file, function (realPathErr, realPath) {
if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);
else cb(null, realPathErr ? file : realPath);
});
},
var realpath = typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
realpath(file, function (realPathErr, realPath) {
if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);
else cb(null, realPathErr ? file : realPath);
});
},
moduleDirectory: 'node_modules',
preserveSymlinks: true
}
@@ -225,10 +225,6 @@ default `opts` values:
}
```
## resolve.isCore(pkg)
Return whether a package is in core.
# install
With [npm](https://npmjs.org) do:

View File

@@ -22,16 +22,12 @@ test('core modules', function (t) {
for (var i = 0; i < cores.length; ++i) {
var mod = cores[i];
var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func
console.log(mod, resolve.core, resolve.core[mod]);
if (resolve.core[mod]) {
st.doesNotThrow(
function () { require(mod); }, // eslint-disable-line no-loop-func
mod + ' supported; requiring does not throw'
);
st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw');
} else {
st.throws(
function () { require(mod); }, // eslint-disable-line no-loop-func
mod + ' not supported; requiring throws'
);
st.throws(requireFunc, mod + ' not supported; requiring throws');
}
}

View File

@@ -68,7 +68,10 @@ test('sync symlink when preserveSymlinks = true', function (t) {
test('sync symlink', function (t) {
var start = new Date();
t.doesNotThrow(function () {
t.equal(resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }), path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js'));
t.equal(
resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }),
path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')
);
});
t.ok(new Date() - start < 50, 'resolve.sync timedout');
t.end();