broccoli-persistent-filter
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -34,6 +34,5 @@ 'use strict'; | ||
string = Promise.resolve(entry.value) | ||
.then(function(value) { | ||
return JSON.parse(value); | ||
}); | ||
string = Promise.resolve(entry.value).then(function(value) { | ||
return JSON.parse(value); | ||
}); | ||
} else { | ||
@@ -43,35 +42,30 @@ ctx._debug('persistent cache prime: %s', relativePath); | ||
resolve(ctx.processString(contents, relativePath)); | ||
}) | ||
.then(function(result) { | ||
if (typeof result === 'string') { | ||
return { output: result }; | ||
} else { | ||
return result; | ||
} | ||
}) | ||
.then(function(value) { | ||
var stringValue = JSON.stringify(value); | ||
}).then(function(result) { | ||
if (typeof result === 'string') { | ||
return { output: result }; | ||
} else { | ||
return result; | ||
} | ||
}).then(function(value) { | ||
var stringValue = JSON.stringify(value); | ||
return cache.set(key, stringValue).then(function() { | ||
return value; | ||
}); | ||
return cache.set(key, stringValue).then(function() { | ||
return value; | ||
}); | ||
}); | ||
} | ||
return string | ||
.then(function(object) { | ||
return new Promise(function(resolve) { | ||
resolve(ctx.postProcess(object, relativePath)); | ||
}) | ||
.then(function(result) { | ||
if (result === undefined) { | ||
throw new Error('You must return an object from `Filter.prototype.postProcess`.'); | ||
} | ||
return string.then(function(object) { | ||
return new Promise(function(resolve) { | ||
resolve(ctx.postProcess(object, relativePath)); | ||
}).then(function(result) { | ||
if (result === undefined) { | ||
throw new Error('You must return an object from `Filter.prototype.postProcess`.'); | ||
} | ||
return result.output; | ||
}); | ||
return result.output; | ||
}); | ||
}); | ||
}); | ||
} | ||
}; |
{ | ||
"name": "broccoli-persistent-filter", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "broccoli filter but with a persistent cache", | ||
@@ -33,7 +33,5 @@ "author": "Stefan Penner <stefan.penner@gmail.com>", | ||
"blank-object": "^1.0.1", | ||
"broccoli-kitchen-sink-helpers": "^0.3.1", | ||
"broccoli-plugin": "^1.0.0", | ||
"copy-dereference": "^1.0.0", | ||
"debug": "^2.2.0", | ||
"fs-tree-diff": "^0.4.4", | ||
"fs-tree-diff": "^0.5.0", | ||
"hash-for-dep": "^1.0.2", | ||
@@ -48,6 +46,6 @@ "md5-hex": "^1.0.2", | ||
"devDependencies": { | ||
"broccoli": "^0.16.3", | ||
"broccoli-test-helpers": "^0.0.9", | ||
"chai": "^3.0.0", | ||
"chai-as-promised": "^5.1.0", | ||
"chai-files": "^1.2.0", | ||
"coveralls": "^2.11.4", | ||
@@ -54,0 +52,0 @@ "istanbul": "^0.4.2", |
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
12
20869
304
+ Addedfs-tree-diff@0.5.9(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedpath-posix@1.0.0(transitive)
- Removedbroccoli-kitchen-sink-helpers@^0.3.1
- Removedcopy-dereference@^1.0.0
- Removedcopy-dereference@1.0.0(transitive)
- Removedfast-ordered-set@1.0.3(transitive)
- Removedfs-tree-diff@0.4.4(transitive)
Updatedfs-tree-diff@^0.5.0