filing-cabinet
Advanced tools
Comparing version 1.4.0 to 1.4.1
24
index.js
@@ -5,3 +5,2 @@ var path = require('path'); | ||
var getModuleType = require('module-definition'); | ||
var isRelative = require('is-relative-path'); | ||
var resolve = require('resolve'); | ||
@@ -12,6 +11,4 @@ | ||
var sassLookup = require('sass-lookup'); | ||
var resolveDependencyPath = require('resolve-dependency-path'); | ||
var appModulePath = require('app-module-path'); | ||
var fileExists = require('file-exists'); | ||
@@ -50,7 +47,2 @@ var webpackResolve = require('enhanced-resolve'); | ||
// TODO: Remove. All resolvers should provide a complete path | ||
if (result && !path.extname(result)) { | ||
result = result + ext; | ||
} | ||
debug('resolved path for ' + partial + ': ' + result); | ||
@@ -147,14 +139,4 @@ return result; | ||
default: | ||
debug('using generic resolver for es6'); | ||
var result = resolveDependencyPath(partial, filename, directory); | ||
debug('es6 resolver result: ' + result); | ||
// For codebases transpiling es6 to commonjs | ||
// es6 to amd transpilation would have picked up a require config | ||
if (!fileExists(result)) { | ||
debug('es6 result was not a real file'); | ||
debug('trying commonjs resolver'); | ||
result = commonJSLookup(partial, filename, directory); | ||
} | ||
return result; | ||
debug('using commonjs resolver for es6'); | ||
return commonJSLookup(partial, filename, directory); | ||
} | ||
@@ -182,3 +164,3 @@ } | ||
// 3rd party modules will not be relative | ||
if (isRelative(partial)) { | ||
if (partial[0] === '.') { | ||
partial = path.resolve(path.dirname(filename), partial); | ||
@@ -185,0 +167,0 @@ } |
{ | ||
"name": "filing-cabinet", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Find files based on partial paths", | ||
@@ -47,4 +47,2 @@ "main": "index.js", | ||
"enhanced-resolve": "~2.2.2", | ||
"file-exists": "~1.0.0", | ||
"is-relative-path": "~1.0.0", | ||
"module-definition": "^2.2.3", | ||
@@ -54,3 +52,2 @@ "module-lookup-amd": "^4.0.2", | ||
"resolve": "~1.1.7", | ||
"resolve-dependency-path": "^1.0.2", | ||
"sass-lookup": "^1.0.2", | ||
@@ -57,0 +54,0 @@ "stylus-lookup": "^1.0.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
10
10163
195
- Removedfile-exists@~1.0.0
- Removedis-relative-path@~1.0.0
- Removedresolve-dependency-path@^1.0.2
- Removedresolve-dependency-path@1.0.2(transitive)