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

fortune-fs

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fortune-fs - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

.gitignore~

33

index.js

@@ -7,2 +7,3 @@ 'use strict'

var mkdirp = require('mkdirp')
var lockFile = require('lockfile')

@@ -129,14 +130,26 @@

return new Promise(function (resolve, reject) {
var lockPath
if (record === void 0) return resolve()
return typeof record === 'object' ?
fs.writeFile(
path.join(typeDir, '' + record[primaryKey]),
msgpack.encode(record),
function handle (error) {
return error ? reject(error) : resolve()
}) :
fs.unlink(
path.join(typeDir, '' + record),
resolve)
if (typeof record === 'object') {
lockPath = path.join(typeDir, record[primaryKey] + '.lock')
return lockFile.lock(lockPath, function (error) {
if (error) return reject(error)
fs.writeFile(
path.join(typeDir, '' + record[primaryKey]),
msgpack.encode(record),
function (error) {
if (error) return reject(error)
lockFile.unlock(lockPath, function (error) {
return error ? reject(error) : resolve()
})
})
})
}
fs.unlink(path.join(typeDir, '' + record), resolve)
})

@@ -143,0 +156,0 @@ }))

{
"name": "fortune-fs",
"description": "File system adapter for Fortune.",
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",

@@ -17,2 +17,3 @@ "repository": {

"dependencies": {
"lockfile": "^1.0.2",
"mkdirp": "^0.5.1",

@@ -19,0 +20,0 @@ "msgpack-lite": "^0.1.26"

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