fortune-fs
Advanced tools
Comparing version 1.0.5 to 1.0.6
28
index.js
@@ -82,6 +82,6 @@ 'use strict' | ||
var self = this | ||
return writeRecords(path.join(self.options.path, type), records) | ||
.then(function () { | ||
return DefaultAdapter.prototype.create.call(self, type, records) | ||
return DefaultAdapter.prototype.create.call(self, type, records) | ||
.then(function (records) { | ||
return writeRecords(path.join(self.options.path, type), records) | ||
.then(function () { return records }) | ||
}) | ||
@@ -99,2 +99,3 @@ } | ||
var typeDir = path.join(self.options.path, type) | ||
var count | ||
@@ -111,2 +112,6 @@ return Promise.all(map(updates, function (update) { | ||
.then(function () { | ||
return DefaultAdapter.prototype.update.call(self, type, updates) | ||
}) | ||
.then(function (result) { | ||
count = result | ||
return writeRecords(typeDir, map(updates, function (update) { | ||
@@ -127,5 +132,3 @@ return self.db[type][update[primaryKey]] | ||
}) | ||
.then(function () { | ||
return DefaultAdapter.prototype.update.call(self, type, updates) | ||
}) | ||
.then(function () { return count }) | ||
} | ||
@@ -138,7 +141,8 @@ | ||
return writeRecords( | ||
path.join(self.options.path, type), | ||
memoizedIds) | ||
.then(function () { | ||
return DefaultAdapter.prototype.delete.call(self, type, ids) | ||
return DefaultAdapter.prototype.delete.call(self, type, ids) | ||
.then(function (count) { | ||
return writeRecords( | ||
path.join(self.options.path, type), | ||
memoizedIds) | ||
.then(function () { return count }) | ||
}) | ||
@@ -145,0 +149,0 @@ } |
{ | ||
"name": "fortune-fs", | ||
"description": "File system adapter for Fortune.", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"license": "MIT", | ||
@@ -22,5 +22,5 @@ "repository": { | ||
"devDependencies": { | ||
"eslint": "^4.1.1", | ||
"eslint": "^4.2.0", | ||
"eslint-config-boss": "^1.0.6", | ||
"fortune": "^5.2.7", | ||
"fortune": "^5.2.8", | ||
"tapdance": "^5.0.4" | ||
@@ -27,0 +27,0 @@ }, |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18689
141
0