module-lookup-amd
Advanced tools
Comparing version 6.2.0 to 7.0.0
18
index.js
@@ -8,3 +8,2 @@ 'use strict'; | ||
const find = require('find'); | ||
const fileExists = require('file-exists-dazinatorfork'); | ||
const requirejs = require('requirejs'); | ||
@@ -95,3 +94,3 @@ | ||
if (path.extname(resolved) && fileExists.sync(resolved, {fileSystem: fileSystem})) { | ||
if (path.extname(resolved) && fileExists(resolved, fileSystem)) { | ||
debug(resolved + ' already has an extension and is a real file'); | ||
@@ -135,2 +134,17 @@ return resolved; | ||
function fileExists(filepath = '', fileSystem = fs) { | ||
try { | ||
return fileSystem.statSync(filepath).isFile(); | ||
} | ||
catch (e) { | ||
// Check exception. If ENOENT - no such file or directory ok, file doesn't exist. | ||
// Otherwise something else went wrong, we don't have rights to access the file, ... | ||
if (e.code != 'ENOENT') { | ||
throw e; | ||
} | ||
return false; | ||
} | ||
} | ||
function stripLoader(partial) { | ||
@@ -137,0 +151,0 @@ const exclamationLocation = partial.indexOf('!'); |
{ | ||
"name": "module-lookup-amd", | ||
"version": "6.2.0", | ||
"version": "7.0.0", | ||
"description": "Resolve aliased dependency paths using a RequireJS config", | ||
@@ -29,3 +29,3 @@ "main": "index.js", | ||
"engines": { | ||
"node": ">=6.0.0" | ||
"node": ">=10.13.0" | ||
}, | ||
@@ -35,14 +35,12 @@ "dependencies": { | ||
"debug": "^4.1.0", | ||
"file-exists-dazinatorfork": "^1.0.2", | ||
"find": "^0.3.0", | ||
"requirejs": "^2.3.5", | ||
"requirejs-config-file": "^3.1.1" | ||
"requirejs-config-file": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"jscs": "~2.11.0", | ||
"jscs-preset-mrjoelkemp": "~1.0.0", | ||
"mocha": "^5.2.0", | ||
"rewire": "^4.0.1", | ||
"sinon": "^7.2.0" | ||
"jscs": "^3.0.7", | ||
"jscs-preset-mrjoelkemp": "^2.0.0", | ||
"mocha": "^8.2.1", | ||
"sinon": "^9.2.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8956
5
4
156
+ Addedrequirejs-config-file@4.0.0(transitive)
- Removedfile-exists-dazinatorfork@^1.0.2
- Removedfile-exists-dazinatorfork@1.0.2(transitive)
- Removedmake-dir@2.1.0(transitive)
- Removedpify@4.0.1(transitive)
- Removedrequirejs-config-file@3.1.2(transitive)
- Removedsemver@5.7.2(transitive)
Updatedrequirejs-config-file@^4.0.0