broccoli-persistent-filter
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -0,1 +1,9 @@ | ||
## v3.1.2 (2020-10-22) | ||
#### :bug: Bug Fix | ||
* [#207](https://github.com/broccolijs/broccoli-persistent-filter/pull/207) getDestFilePath: handle non-existent (deleted/moved) files ([@jamescdavis](https://github.com/jamescdavis)) | ||
#### Committers: 1 | ||
- James C. Davis ([@jamescdavis](https://github.com/jamescdavis)) | ||
## v3.1.1 (2020-08-28) | ||
@@ -2,0 +10,0 @@ |
@@ -328,3 +328,19 @@ "use strict"; | ||
} | ||
return (entry || this.input.lstatSync(relativePath)).isDirectory(); | ||
if (entry !== undefined) { | ||
return entry.isDirectory(); | ||
} | ||
else { | ||
try { | ||
// wrap this in try/catch in case `relativePath` doesn't exist | ||
const stat = this.input.lstatSync(relativePath); | ||
return stat.isDirectory(); | ||
} | ||
catch (error) { | ||
// if we get any other error, we really don't know what is going on so we need to rethrow | ||
if (error.code === 'ENOENT') { | ||
return false; | ||
} | ||
throw error; | ||
} | ||
} | ||
} | ||
@@ -331,0 +347,0 @@ getDestFilePath(relativePath, entry) { |
{ | ||
"name": "broccoli-persistent-filter", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "broccoli filter but with a persistent cache", | ||
@@ -5,0 +5,0 @@ "author": "Stefan Penner <stefan.penner@gmail.com>", |
@@ -419,3 +419,17 @@ import type { InputNode } from 'broccoli-node-api'; | ||
return (entry || this.input.lstatSync(relativePath)).isDirectory(); | ||
if (entry !== undefined) { | ||
return entry.isDirectory(); | ||
} else { | ||
try { | ||
// wrap this in try/catch in case `relativePath` doesn't exist | ||
const stat = this.input.lstatSync(relativePath); | ||
return stat.isDirectory(); | ||
} catch (error) { | ||
// if we get any other error, we really don't know what is going on so we need to rethrow | ||
if (error.code === 'ENOENT') { | ||
return false; | ||
} | ||
throw error; | ||
} | ||
} | ||
} | ||
@@ -422,0 +436,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
173655
2896