Skip to content

Commit

Permalink
deps: write-file-atomic@4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Mar 2, 2022
1 parent e9b69c4 commit cf27ca8
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 168 deletions.
6 changes: 4 additions & 2 deletions node_modules/signal-exit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ const processOk = function (process) {
// some kind of non-node environment, just no-op
/* istanbul ignore if */
if (!processOk(process)) {
module.exports = function () {}
module.exports = function () {
return function () {}
}
} else {
var assert = require('assert')
var signals = require('./signals.js')
Expand Down Expand Up @@ -52,7 +54,7 @@ if (!processOk(process)) {
module.exports = function (cb, opts) {
/* istanbul ignore if */
if (!processOk(global.process)) {
return
return function () {}
}
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')

Expand Down
2 changes: 1 addition & 1 deletion node_modules/signal-exit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "signal-exit",
"version": "3.0.6",
"version": "3.0.7",
"description": "when you want to fire an event no matter how a process exits.",
"main": "index.js",
"scripts": {
Expand Down
21 changes: 0 additions & 21 deletions node_modules/typedarray-to-buffer/LICENSE

This file was deleted.

18 changes: 0 additions & 18 deletions node_modules/typedarray-to-buffer/index.js

This file was deleted.

62 changes: 0 additions & 62 deletions node_modules/typedarray-to-buffer/package.json

This file was deleted.

12 changes: 2 additions & 10 deletions node_modules/write-file-atomic/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ const fs = require('fs')
const MurmurHash3 = require('imurmurhash')
const onExit = require('signal-exit')
const path = require('path')
const isTypedArray = require('is-typedarray')
const typedArrayToBuffer = require('typedarray-to-buffer')
const { promisify } = require('util')
const activeFiles = {}

Expand Down Expand Up @@ -110,10 +108,7 @@ async function writeFileAsync (filename, data, options = {}) {
if (options.tmpfileCreated) {
await options.tmpfileCreated(tmpfile)
}
if (isTypedArray(data)) {
data = typedArrayToBuffer(data)
}
if (Buffer.isBuffer(data)) {
if (ArrayBuffer.isView(data)) {
await promisify(fs.write)(fd, data, 0, data.length, 0)
} else if (data != null) {
await promisify(fs.write)(fd, String(data), 0, String(options.encoding || 'utf8'))
Expand Down Expand Up @@ -215,10 +210,7 @@ function writeFileSync (filename, data, options) {
if (options.tmpfileCreated) {
options.tmpfileCreated(tmpfile)
}
if (isTypedArray(data)) {
data = typedArrayToBuffer(data)
}
if (Buffer.isBuffer(data)) {
if (ArrayBuffer.isView(data)) {
fs.writeSync(fd, data, 0, data.length, 0)
} else if (data != null) {
fs.writeSync(fd, String(data), 0, String(options.encoding || 'utf8'))
Expand Down
13 changes: 6 additions & 7 deletions node_modules/write-file-atomic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "write-file-atomic",
"version": "4.0.0",
"version": "4.0.1",
"description": "Write files in an atomic fashion w/configurable ownership",
"main": "./lib/index.js",
"scripts": {
Expand All @@ -12,7 +12,8 @@
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"lintfix": "npm run lint -- --fix",
"snap": "tap"
"snap": "tap",
"template-copy": "npm-template-copy --force"
},
"repository": {
"type": "git",
Expand All @@ -30,12 +31,10 @@
"homepage": "https://github.com/npm/write-file-atomic",
"dependencies": {
"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",
"rimraf": "^3.0.2",
"tap": "^15.1.6"
Expand All @@ -49,6 +48,6 @@
},
"templateOSS": {
"windowsCI": false,
"version": "2.5.1"
"version": "2.7.1"
}
}
64 changes: 18 additions & 46 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"treeverse": "^1.0.4",
"validate-npm-package-name": "~3.0.0",
"which": "^2.0.2",
"write-file-atomic": "^4.0.0"
"write-file-atomic": "^4.0.1"
},
"bin": {
"npm": "bin/npm-cli.js",
Expand Down Expand Up @@ -4356,7 +4356,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"inBundle": true
"dev": true
},
"node_modules/is-weakref": {
"version": "1.0.1",
Expand Down Expand Up @@ -6909,9 +6909,9 @@
}
},
"node_modules/signal-exit": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==",
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"inBundle": true
},
"node_modules/simple-concat": {
Expand Down Expand Up @@ -9570,26 +9570,6 @@
"node": ">=8"
}
},
"node_modules/typedarray-to-buffer": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz",
"integrity": "sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"inBundle": true
},
"node_modules/typescript": {
"version": "3.9.10",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
Expand Down Expand Up @@ -10107,15 +10087,13 @@
"inBundle": true
},
"node_modules/write-file-atomic": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.0.tgz",
"integrity": "sha512-JhcWoKffJNF7ivO9yflBhc7tn3wKnokMUfWpBriM9yCXj4ePQnRPcWglBkkg1AHC8nsW/EfxwwhqsLtOy59djA==",
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz",
"integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==",
"inBundle": true,
"dependencies": {
"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"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16"
Expand Down Expand Up @@ -13951,7 +13929,8 @@
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
"is-weakref": {
"version": "1.0.1",
Expand Down Expand Up @@ -16103,9 +16082,9 @@
}
},
"signal-exit": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
},
"simple-concat": {
"version": "1.0.1",
Expand Down Expand Up @@ -17936,11 +17915,6 @@
"integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
"dev": true
},
"typedarray-to-buffer": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz",
"integrity": "sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ=="
},
"typescript": {
"version": "3.9.10",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
Expand Down Expand Up @@ -18331,14 +18305,12 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"write-file-atomic": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.0.tgz",
"integrity": "sha512-JhcWoKffJNF7ivO9yflBhc7tn3wKnokMUfWpBriM9yCXj4ePQnRPcWglBkkg1AHC8nsW/EfxwwhqsLtOy59djA==",
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz",
"integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==",
"requires": {
"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"
}
},
"ws": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"treeverse": "^1.0.4",
"validate-npm-package-name": "~3.0.0",
"which": "^2.0.2",
"write-file-atomic": "^4.0.0"
"write-file-atomic": "^4.0.1"
},
"bundleDependencies": [
"@isaacs/string-locale-compare",
Expand Down

0 comments on commit cf27ca8

Please sign in to comment.