Socket
Socket
Sign inDemoInstall

write-file-atomic

Package Overview
Dependencies
2
Maintainers
6
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 4.0.1

12

lib/index.js

@@ -11,4 +11,2 @@ 'use strict'

const path = require('path')
const isTypedArray = require('is-typedarray')
const typedArrayToBuffer = require('typedarray-to-buffer')
const { promisify } = require('util')

@@ -114,6 +112,3 @@ const activeFiles = {}

}
if (isTypedArray(data)) {
data = typedArrayToBuffer(data)
}
if (Buffer.isBuffer(data)) {
if (ArrayBuffer.isView(data)) {
await promisify(fs.write)(fd, data, 0, data.length, 0)

@@ -220,6 +215,3 @@ } else if (data != null) {

}
if (isTypedArray(data)) {
data = typedArrayToBuffer(data)
}
if (Buffer.isBuffer(data)) {
if (ArrayBuffer.isView(data)) {
fs.writeSync(fd, data, 0, data.length, 0)

@@ -226,0 +218,0 @@ } else if (data != null) {

13

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

@@ -15,3 +15,4 @@ "main": "./lib/index.js",

"lintfix": "npm run lint -- --fix",
"snap": "tap"
"snap": "tap",
"template-copy": "npm-template-copy --force"
},

@@ -34,8 +35,6 @@ "repository": {

"imurmurhash": "^0.1.4",
"is-typedarray": "^1.0.0",
"signal-exit": "^3.0.2",
"typedarray-to-buffer": "^4.0.0"
"signal-exit": "^3.0.7"
},
"devDependencies": {
"@npmcli/template-oss": "^2.5.1",
"@npmcli/template-oss": "^2.7.1",
"mkdirp": "^1.0.4",

@@ -54,4 +53,4 @@ "rimraf": "^3.0.2",

"windowsCI": false,
"version": "2.5.1"
"version": "2.7.1"
}
}
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