+1
-0
@@ -26,2 +26,3 @@ version: 1.0.{build} | ||
| allow_failures: | ||
| - nodejs_version: "5" # due to windows npm bug, registry-side | ||
| - nodejs_version: "0.8" | ||
@@ -28,0 +29,0 @@ - nodejs_version: "0.6" |
+1
-1
@@ -90,3 +90,3 @@ var fs = require('fs'); | ||
| res = path.resolve(basedir, x); | ||
| if (x === '..' || x.slice(-1) === '/') res += '/'; | ||
| if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; | ||
| if ((/\/$/).test(x) && res === basedir) { | ||
@@ -93,0 +93,0 @@ loadAsDirectory(res, opts.package, onfile); |
+1
-1
@@ -71,3 +71,3 @@ var isCore = require('./is-core'); | ||
| var res = path.resolve(absoluteStart, x); | ||
| if (x === '..' || x.slice(-1) === '/') res += '/'; | ||
| if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/'; | ||
| var m = loadAsFileSync(res) || loadAsDirectorySync(res); | ||
@@ -74,0 +74,0 @@ if (m) return maybeUnwrapSymlink(m, opts); |
+2
-2
| { | ||
| "name": "resolve", | ||
| "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", | ||
| "version": "1.15.0", | ||
| "version": "1.15.1", | ||
| "repository": { | ||
@@ -27,3 +27,3 @@ "type": "git", | ||
| "devDependencies": { | ||
| "@ljharb/eslint-config": "^15.1.0", | ||
| "@ljharb/eslint-config": "^16.0.0", | ||
| "array.prototype.map": "^1.0.2", | ||
@@ -30,0 +30,0 @@ "eslint": "^6.8.0", |
@@ -241,2 +241,16 @@ var path = require('path'); | ||
| test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { | ||
| var dir = path.join(__dirname, 'resolver'); | ||
| t.equal( | ||
| resolve.sync('./', { basedir: path.join(dir, 'same_names/foo') }), | ||
| path.join(dir, 'same_names/foo/index.js') | ||
| ); | ||
| t.equal( | ||
| resolve.sync('.', { basedir: path.join(dir, 'same_names/foo') }), | ||
| path.join(dir, 'same_names/foo/index.js') | ||
| ); | ||
| t.end(); | ||
| }); | ||
| test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { | ||
@@ -243,0 +257,0 @@ var testFile = path.basename(__filename); |
+16
-0
@@ -318,2 +318,18 @@ var path = require('path'); | ||
| test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) { | ||
| t.plan(2); | ||
| var dir = path.join(__dirname, 'resolver'); | ||
| resolve('./', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { | ||
| if (err) t.fail(err); | ||
| t.equal(res, path.join(dir, 'same_names/foo/index.js')); | ||
| }); | ||
| resolve('.', { basedir: path.join(dir, 'same_names/foo') }, function (err, res, pkg) { | ||
| if (err) t.fail(err); | ||
| t.equal(res, path.join(dir, 'same_names/foo/index.js')); | ||
| }); | ||
| }); | ||
| test('async: #121 - treating an existing file as a dir when no basedir', function (t) { | ||
@@ -320,0 +336,0 @@ var testFile = path.basename(__filename); |
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
99301
1.2%2260
1.07%