js-makedepend
Advanced tools
Comparing version 0.4.0 to 1.0.0
{ | ||
"name": "js-makedepend", | ||
"version": "0.4.0", | ||
"version": "1.0.0", | ||
"description": "Determines dependencies of javascript modules and saves them in a Makefile. A bit like makedepend does for C.", | ||
@@ -43,9 +43,9 @@ "bin": { | ||
"chai": "3.5.0", | ||
"codeclimate-test-reporter": "0.3.2", | ||
"eslint": "2.12.0", | ||
"codeclimate-test-reporter": "0.3.3", | ||
"eslint": "3.1.1", | ||
"intercept-stdout": "0.1.2", | ||
"istanbul": "0.4.3", | ||
"istanbul": "0.4.4", | ||
"mocha": "2.5.3", | ||
"npm-check-updates": "2.6.7", | ||
"nsp": "2.4.0" | ||
"npm-check-updates": "2.7.2", | ||
"nsp": "2.6.1" | ||
}, | ||
@@ -57,4 +57,4 @@ "dependencies": { | ||
"resolve": "1.1.7", | ||
"semver": "5.1.0" | ||
"semver": "5.3.0" | ||
} | ||
} |
@@ -12,3 +12,3 @@ "use strict"; | ||
const notInCache = pFileName => !gScanned.has(pFileName); | ||
const isIncludable = pDep => pDep.followable || pDep.resolved.endsWith('.json'); | ||
const isIncludable = pDep => pDep.followable || path.extname(pDep.resolved) === '.json'; | ||
const ignore = (pString, pExcludeREString) => | ||
@@ -24,3 +24,3 @@ Boolean(pExcludeREString) ? !(RegExp(pExcludeREString, "g").test(pString)) : true; | ||
} | ||
if (pFileName.endsWith(".js")){ | ||
if (path.extname(pFileName) === ".js"){ | ||
return pSum.concat(path.join(pDirName, pFileName)); | ||
@@ -27,0 +27,0 @@ } |
@@ -65,6 +65,3 @@ const fs = require("fs"); | ||
function determineTransformerToUse(pOptions) { | ||
if (pOptions.dot){ | ||
return transformToDot; | ||
} | ||
return transformToMake; | ||
return pOptions.dot ? transformToDot : transformToMake; | ||
} | ||
@@ -84,7 +81,11 @@ | ||
if ("-" === pOptions.outputTo) { | ||
process.stdout.write(determineTransformerToUse(pOptions).getDependencyStrings(pDirOrFile, pOptions)); | ||
process.stdout.write( | ||
determineTransformerToUse(pOptions) | ||
.getDependencyStrings(pDirOrFile, pOptions) | ||
); | ||
} else { | ||
appendToOrReplaceInFile( | ||
pOptions.outputTo, | ||
determineTransformerToUse(pOptions).getDependencyStrings(pDirOrFile, pOptions), | ||
determineTransformerToUse(pOptions) | ||
.getDependencyStrings(pDirOrFile, pOptions), | ||
pOptions.delimiter, | ||
@@ -91,0 +92,0 @@ pOptions.append |
@@ -10,2 +10,5 @@ "use strict"; | ||
/* | ||
* resolves both CommonJS and ES6 | ||
*/ | ||
function resolveCJSModule(pModuleName, pBaseDir, pFileDir) { | ||
@@ -26,3 +29,3 @@ let lRetval = { | ||
); | ||
lRetval.followable = !(lRetval.resolved.endsWith(".json")); | ||
lRetval.followable = (path.extname(lRetval.resolved) !== ".json"); | ||
} catch (e) { | ||
@@ -29,0 +32,0 @@ // intentionally left blank |
@@ -6,7 +6,3 @@ "use strict"; | ||
function dep2linecolor(pDep) { | ||
if (pDep.coreModule){ | ||
return "\"#999999\""; | ||
} | ||
return "black"; | ||
return pDep.coreModule ? "\"#999999\"" : "black"; | ||
} | ||
@@ -13,0 +9,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
164753
2494
0
+ Addedsemver@5.3.0(transitive)
- Removedsemver@5.1.0(transitive)
Updatedsemver@5.3.0