cosmiconfig
Advanced tools
Comparing version 2.0.0 to 2.0.1
# Changelog | ||
## 2.0.1 | ||
- Fixed: no more infinite loop in Windows. | ||
## 2.0.0 | ||
@@ -4,0 +8,0 @@ |
@@ -50,5 +50,2 @@ 'use strict'; | ||
: path.dirname(absoluteSearchPath); | ||
if (directoryCache && directoryCache.has(directory)) { | ||
return directoryCache.get(directory); | ||
} | ||
return searchDirectory(directory); | ||
@@ -79,3 +76,7 @@ }); | ||
const nextDirectory = joinPath(splitPath(directory).slice(0, -1)); | ||
const splitPath = directory.split(path.sep); | ||
const nextDirectory = (splitPath.length > 1) | ||
? splitPath.slice(0, -1).join(path.sep) | ||
: null; | ||
if (!nextDirectory || directory === options.stopDir) return null; | ||
@@ -108,13 +109,4 @@ | ||
function splitPath(x) { | ||
return path.resolve(x || '').split(path.sep); | ||
} | ||
function joinPath(parts) { | ||
if (!parts) return parts; | ||
return parts.join(path.sep); | ||
} | ||
function identityPromise(x) { | ||
return Promise.resolve(x); | ||
} |
{ | ||
"name": "cosmiconfig", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Find and load configuration from a package.json property, rc file, or CommonJS module", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
21240
292