module-lookup-amd
Advanced tools
Comparing version
@@ -97,3 +97,3 @@ 'use strict'; | ||
// Need to guard against jquery.min being treated as a real file | ||
if (path.extname(resolved) && fileExists(resolved)) { | ||
if (path.extname(resolved) && fileExists(resolved, fileSystem)) { | ||
debug(`${resolved} already has an extension and is a real file`); | ||
@@ -133,5 +133,5 @@ return resolved; | ||
function fileExists(filepath = '') { | ||
function fileExists(filepath = '', fileSystem = fs) { | ||
try { | ||
return fs.statSync(filepath).isFile(); | ||
return fileSystem.statSync(filepath).isFile(); | ||
} catch (error) { | ||
@@ -138,0 +138,0 @@ // Check exception. If ENOENT - no such file or directory ok, file doesn't exist. |
{ | ||
"name": "module-lookup-amd", | ||
"version": "9.0.3", | ||
"version": "9.0.4", | ||
"description": "Resolve aliased dependency paths using a RequireJS config", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
11259
0.33%