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

write-file-atomic

Package Overview
Dependencies
Maintainers
4
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

write-file-atomic - npm Package Compare versions

Comparing version 2.4.2 to 2.4.3

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# 2.4.3
* Ignore errors raised by `fs.closeSync` when cleaning up after a write
error.
# 2.4.2

@@ -2,0 +7,0 @@

9

index.js

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

try {
fd = fs.openSync(tmpfile, 'w', options.mode)

@@ -229,3 +228,9 @@ if (Buffer.isBuffer(data)) {

} catch (err) {
if (fd) fs.closeSync(fd)
if (fd) {
try {
fs.closeSync(fd)
} catch (ex) {
// ignore close errors at this stage, error may have closed fd already.
}
}
removeOnExitHandler()

@@ -232,0 +237,0 @@ cleanup()

{
"name": "write-file-atomic",
"version": "2.4.2",
"version": "2.4.3",
"description": "Write files in an atomic fashion w/configurable ownership",
"main": "index.js",
"scripts": {
"test": "standard && tap --100 test/*.js"
"test": "standard && tap --100 test/*.js",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --follow-tags"
},

@@ -9,0 +12,0 @@ "repository": {

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