broccoli-caching-writer
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -0,1 +1,10 @@ | ||
## 0.5.3 | ||
* Ensure that errors are not thrown if `_destDir` has not been setup yet. | ||
## 0.5.2 | ||
* Use `_destDir` for tracking the internal destination directory. This prevents collisions if inheritors use the common `destDir` | ||
name as a property. | ||
## 0.5.1 | ||
@@ -2,0 +11,0 @@ |
12
index.js
@@ -10,3 +10,3 @@ var fs = require('fs'); | ||
var generateRandomString = require('./lib/generate-random-string'); | ||
var CoreObject = require("core-object"); | ||
var CoreObject = require('core-object'); | ||
@@ -52,7 +52,7 @@ function CachingWriter (inputTrees, options) { | ||
if (!Array.isArray(this.filterFromCache.include)) { | ||
throw new Error("Invalid filterFromCache.include option, it must be an array or undefined.") | ||
throw new Error('Invalid filterFromCache.include option, it must be an array or undefined.') | ||
} | ||
if (!Array.isArray(this.filterFromCache.exclude)) { | ||
throw new Error("Invalid filterFromCache.exclude option, it must be an array or undefined.") | ||
throw new Error('Invalid filterFromCache.exclude option, it must be an array or undefined.') | ||
} | ||
@@ -116,3 +116,5 @@ }; | ||
// sadly we must use sync removal for now | ||
rimraf.sync(this._destDir); | ||
if (this._destDir) { | ||
rimraf.sync(this._destDir); | ||
} | ||
}; | ||
@@ -164,3 +166,3 @@ | ||
CachingWriter.prototype.keysForTree = function (fullPath, initialRelativePath) { | ||
var relativePath = initialRelativePath || '.' | ||
var relativePath = initialRelativePath || '.'; | ||
var stats; | ||
@@ -167,0 +169,0 @@ var statKeys; |
{ | ||
"name": "broccoli-caching-writer", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "Broccoli plugin that allows simple caching (while still allowing N:N) based on the input tree hash.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
27007
524