write-file-atomic
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -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) { |
{ | ||
"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" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
2
0
1
11920
228
- Removedis-typedarray@^1.0.0
- Removedtypedarray-to-buffer@^4.0.0
- Removedis-typedarray@1.0.0(transitive)
- Removedtypedarray-to-buffer@4.0.0(transitive)
Updatedsignal-exit@^3.0.7