From cf27ca8884387f2b82f8f6900a29e4e41693e774 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 2 Mar 2022 10:53:29 -0800 Subject: [PATCH] deps: write-file-atomic@4.0.1 --- node_modules/signal-exit/index.js | 6 +- node_modules/signal-exit/package.json | 2 +- node_modules/typedarray-to-buffer/LICENSE | 21 ------ node_modules/typedarray-to-buffer/index.js | 18 ------ .../typedarray-to-buffer/package.json | 62 ------------------ node_modules/write-file-atomic/lib/index.js | 12 +--- node_modules/write-file-atomic/package.json | 13 ++-- package-lock.json | 64 ++++++------------- package.json | 2 +- 9 files changed, 32 insertions(+), 168 deletions(-) delete mode 100644 node_modules/typedarray-to-buffer/LICENSE delete mode 100644 node_modules/typedarray-to-buffer/index.js delete mode 100644 node_modules/typedarray-to-buffer/package.json diff --git a/node_modules/signal-exit/index.js b/node_modules/signal-exit/index.js index a79b1d2fedee4..93703f369265c 100644 --- a/node_modules/signal-exit/index.js +++ b/node_modules/signal-exit/index.js @@ -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') @@ -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') diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json index 3e6ee68c1bf63..e1a00311f9fbe 100644 --- a/node_modules/signal-exit/package.json +++ b/node_modules/signal-exit/package.json @@ -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": { diff --git a/node_modules/typedarray-to-buffer/LICENSE b/node_modules/typedarray-to-buffer/LICENSE deleted file mode 100644 index 0c068ceecbd48..0000000000000 --- a/node_modules/typedarray-to-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/typedarray-to-buffer/index.js b/node_modules/typedarray-to-buffer/index.js deleted file mode 100644 index fd1e192b2656b..0000000000000 --- a/node_modules/typedarray-to-buffer/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! typedarray-to-buffer. MIT License. Feross Aboukhadijeh */ -/** - * Convert a typed array to a Buffer without a copy - * - * Author: Feross Aboukhadijeh - * License: MIT - * - * `npm install typedarray-to-buffer` - */ - -module.exports = function typedarrayToBuffer (arr) { - return ArrayBuffer.isView(arr) - // To avoid a copy, use the typed array's underlying ArrayBuffer to back - // new Buffer, respecting the "view", i.e. byteOffset and byteLength - ? Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength) - // Pass through all other types to `Buffer.from` - : Buffer.from(arr) -} diff --git a/node_modules/typedarray-to-buffer/package.json b/node_modules/typedarray-to-buffer/package.json deleted file mode 100644 index 502a322c6d746..0000000000000 --- a/node_modules/typedarray-to-buffer/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "typedarray-to-buffer", - "description": "Convert a typed array to a Buffer without a copy", - "version": "4.0.0", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/typedarray-to-buffer/issues" - }, - "dependencies": {}, - "devDependencies": { - "airtap": "^3.0.0", - "standard": "*", - "tape": "^5.0.1" - }, - "homepage": "http://feross.org", - "keywords": [ - "buffer", - "typed array", - "convert", - "no copy", - "uint8array", - "uint16array", - "uint32array", - "int16array", - "int32array", - "float32array", - "float64array", - "browser", - "arraybuffer", - "dataview" - ], - "license": "MIT", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/feross/typedarray-to-buffer.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "airtap -- test/*.js", - "test-browser-local": "airtap --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/node_modules/write-file-atomic/lib/index.js b/node_modules/write-file-atomic/lib/index.js index 9a7d183aecb4c..118666d2ce6d8 100644 --- a/node_modules/write-file-atomic/lib/index.js +++ b/node_modules/write-file-atomic/lib/index.js @@ -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 = {} @@ -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')) @@ -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')) diff --git a/node_modules/write-file-atomic/package.json b/node_modules/write-file-atomic/package.json index 031eccdba8707..7219f90b97be0 100644 --- a/node_modules/write-file-atomic/package.json +++ b/node_modules/write-file-atomic/package.json @@ -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": { @@ -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", @@ -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" @@ -49,6 +48,6 @@ }, "templateOSS": { "windowsCI": false, - "version": "2.5.1" + "version": "2.7.1" } } diff --git a/package-lock.json b/package-lock.json index 1ec8d793053a5..12eb3ad93b3f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", @@ -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", @@ -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": { @@ -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", @@ -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" @@ -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", @@ -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", @@ -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", @@ -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": { diff --git a/package.json b/package.json index d566570eb3330..f6fe8da802a49 100644 --- a/package.json +++ b/package.json @@ -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",