Comparing version 1.7.3 to 1.7.4
@@ -207,5 +207,13 @@ // Generated by CoffeeScript 1.6.3 | ||
} | ||
this.exclude(directory); | ||
if (this.up === true) { | ||
depth = directory.match(/\//g).length; | ||
} else if (typeof this.up === 'string') { | ||
if (this.up === directory) { | ||
if (this.findFirst === true) { | ||
return null; | ||
} else { | ||
return paths; | ||
} | ||
} | ||
match = _path.relative(this.up, directory).match(/\//g); | ||
@@ -216,3 +224,2 @@ depth = match === null ? 2 : match.length + 2; | ||
} | ||
this.exclude(directory); | ||
for (i = _i = 0, _ref = depth - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) { | ||
@@ -219,0 +226,0 @@ directory = _path.dirname(directory); |
{ | ||
"name": "fs-finder", | ||
"description": "File system recursive finder", | ||
"version": "1.7.3", | ||
"version": "1.7.4", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "David Kudera", |
@@ -144,2 +144,5 @@ # fs-finder | ||
* 1.7.4 | ||
+ Bug in `lookUp` method | ||
* 1.7.3 | ||
@@ -146,0 +149,0 @@ + Bug in `lookUp` method |
@@ -83,2 +83,5 @@ // Generated by CoffeeScript 1.6.3 | ||
}); | ||
it('should return null when limit parent is the same like searched directory and file is not there', function() { | ||
return Finder["in"](dir).lookUp(dir).findFiles('package.json').should.be.eql([]); | ||
}); | ||
it('should return path to file in parent directory recursively', function() { | ||
@@ -85,0 +88,0 @@ return Finder.from("" + dir + "/eight/3/4").lookUp(4).findFiles('twelve').should.be.eql(["" + dir + "/seven/twelve"]); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
38883
467
202