Socket
Socket
Sign inDemoInstall

write-file-atomic

Package Overview
Dependencies
3
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.2 to 1.3.3

11

index.js

@@ -69,3 +69,6 @@ 'use strict'

if (err) return cb(err)
fs.write(fd, data, encoding, function (err) {
var write = Buffer.isBuffer(data)
? function (_cb) { fs.write(fd, data, 0, data.length, _cb) }
: function (_cb) { fs.write(fd, data, encoding, _cb) }
write(function (err) {
if (err) return cb(err)

@@ -109,3 +112,7 @@ fs.fsync(fd, function (err) {

var fd = fs.openSync(tmpfile, 'w', options.mode)
fs.writeSync(fd, data, 0, options.encoding || 'utf8')
if (Buffer.isBuffer(data)) {
fs.writeSync(fd, data, 0, data.length)
} else {
fs.writeSync(fd, data, options.encoding || 'utf8')
}
fs.fsyncSync(fd)

@@ -112,0 +119,0 @@ fs.closeSync(fd)

2

package.json
{
"name": "write-file-atomic",
"version": "1.3.2",
"version": "1.3.3",
"description": "Write files in an atomic fashion w/configurable ownership",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc