Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-persistent-filter

Package Overview
Dependencies
Maintainers
3
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-persistent-filter - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

52

lib/strategies/persistent.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc