Skip to content

Commit cf27ca8

Browse files
committed
1 parent e9b69c4 commit cf27ca8

File tree

9 files changed

+32
-168
lines changed

9 files changed

+32
-168
lines changed

node_modules/signal-exit/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ const processOk = function (process) {
1919
// some kind of non-node environment, just no-op
2020
/* istanbul ignore if */
2121
if (!processOk(process)) {
22-
module.exports = function () {}
22+
module.exports = function () {
23+
return function () {}
24+
}
2325
} else {
2426
var assert = require('assert')
2527
var signals = require('./signals.js')
@@ -52,7 +54,7 @@ if (!processOk(process)) {
5254
module.exports = function (cb, opts) {
5355
/* istanbul ignore if */
5456
if (!processOk(global.process)) {
55-
return
57+
return function () {}
5658
}
5759
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
5860

node_modules/signal-exit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "signal-exit",
3-
"version": "3.0.6",
3+
"version": "3.0.7",
44
"description": "when you want to fire an event no matter how a process exits.",
55
"main": "index.js",
66
"scripts": {

node_modules/typedarray-to-buffer/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

node_modules/typedarray-to-buffer/index.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

node_modules/typedarray-to-buffer/package.json

Lines changed: 0 additions & 62 deletions
This file was deleted.

node_modules/write-file-atomic/lib/index.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ const fs = require('fs')
88
const MurmurHash3 = require('imurmurhash')
99
const onExit = require('signal-exit')
1010
const path = require('path')
11-
const isTypedArray = require('is-typedarray')
12-
const typedArrayToBuffer = require('typedarray-to-buffer')
1311
const { promisify } = require('util')
1412
const activeFiles = {}
1513

@@ -110,10 +108,7 @@ async function writeFileAsync (filename, data, options = {}) {
110108
if (options.tmpfileCreated) {
111109
await options.tmpfileCreated(tmpfile)
112110
}
113-
if (isTypedArray(data)) {
114-
data = typedArrayToBuffer(data)
115-
}
116-
if (Buffer.isBuffer(data)) {
111+
if (ArrayBuffer.isView(data)) {
117112
await promisify(fs.write)(fd, data, 0, data.length, 0)
118113
} else if (data != null) {
119114
await promisify(fs.write)(fd, String(data), 0, String(options.encoding || 'utf8'))
@@ -215,10 +210,7 @@ function writeFileSync (filename, data, options) {
215210
if (options.tmpfileCreated) {
216211
options.tmpfileCreated(tmpfile)
217212
}
218-
if (isTypedArray(data)) {
219-
data = typedArrayToBuffer(data)
220-
}
221-
if (Buffer.isBuffer(data)) {
213+
if (ArrayBuffer.isView(data)) {
222214
fs.writeSync(fd, data, 0, data.length, 0)
223215
} else if (data != null) {
224216
fs.writeSync(fd, String(data), 0, String(options.encoding || 'utf8'))

node_modules/write-file-atomic/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "write-file-atomic",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "Write files in an atomic fashion w/configurable ownership",
55
"main": "./lib/index.js",
66
"scripts": {
@@ -12,7 +12,8 @@
1212
"postversion": "npm publish",
1313
"prepublishOnly": "git push origin --follow-tags",
1414
"lintfix": "npm run lint -- --fix",
15-
"snap": "tap"
15+
"snap": "tap",
16+
"template-copy": "npm-template-copy --force"
1617
},
1718
"repository": {
1819
"type": "git",
@@ -30,12 +31,10 @@
3031
"homepage": "https://github.com/npm/write-file-atomic",
3132
"dependencies": {
3233
"imurmurhash": "^0.1.4",
33-
"is-typedarray": "^1.0.0",
34-
"signal-exit": "^3.0.2",
35-
"typedarray-to-buffer": "^4.0.0"
34+
"signal-exit": "^3.0.7"
3635
},
3736
"devDependencies": {
38-
"@npmcli/template-oss": "^2.5.1",
37+
"@npmcli/template-oss": "^2.7.1",
3938
"mkdirp": "^1.0.4",
4039
"rimraf": "^3.0.2",
4140
"tap": "^15.1.6"
@@ -49,6 +48,6 @@
4948
},
5049
"templateOSS": {
5150
"windowsCI": false,
52-
"version": "2.5.1"
51+
"version": "2.7.1"
5352
}
5453
}

package-lock.json

Lines changed: 18 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
"treeverse": "^1.0.4",
157157
"validate-npm-package-name": "~3.0.0",
158158
"which": "^2.0.2",
159-
"write-file-atomic": "^4.0.0"
159+
"write-file-atomic": "^4.0.1"
160160
},
161161
"bin": {
162162
"npm": "bin/npm-cli.js",
@@ -4356,7 +4356,7 @@
43564356
"version": "1.0.0",
43574357
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
43584358
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
4359-
"inBundle": true
4359+
"dev": true
43604360
},
43614361
"node_modules/is-weakref": {
43624362
"version": "1.0.1",
@@ -6909,9 +6909,9 @@
69096909
}
69106910
},
69116911
"node_modules/signal-exit": {
6912-
"version": "3.0.6",
6913-
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
6914-
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==",
6912+
"version": "3.0.7",
6913+
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
6914+
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
69156915
"inBundle": true
69166916
},
69176917
"node_modules/simple-concat": {
@@ -9570,26 +9570,6 @@
95709570
"node": ">=8"
95719571
}
95729572
},
9573-
"node_modules/typedarray-to-buffer": {
9574-
"version": "4.0.0",
9575-
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz",
9576-
"integrity": "sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ==",
9577-
"funding": [
9578-
{
9579-
"type": "github",
9580-
"url": "https://github.com/sponsors/feross"
9581-
},
9582-
{
9583-
"type": "patreon",
9584-
"url": "https://www.patreon.com/feross"
9585-
},
9586-
{
9587-
"type": "consulting",
9588-
"url": "https://feross.org/support"
9589-
}
9590-
],
9591-
"inBundle": true
9592-
},
95939573
"node_modules/typescript": {
95949574
"version": "3.9.10",
95959575
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
@@ -10107,15 +10087,13 @@
1010710087
"inBundle": true
1010810088
},
1010910089
"node_modules/write-file-atomic": {
10110-
"version": "4.0.0",
10111-
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.0.tgz",
10112-
"integrity": "sha512-JhcWoKffJNF7ivO9yflBhc7tn3wKnokMUfWpBriM9yCXj4ePQnRPcWglBkkg1AHC8nsW/EfxwwhqsLtOy59djA==",
10090+
"version": "4.0.1",
10091+
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz",
10092+
"integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==",
1011310093
"inBundle": true,
1011410094
"dependencies": {
1011510095
"imurmurhash": "^0.1.4",
10116-
"is-typedarray": "^1.0.0",
10117-
"signal-exit": "^3.0.2",
10118-
"typedarray-to-buffer": "^4.0.0"
10096+
"signal-exit": "^3.0.7"
1011910097
},
1012010098
"engines": {
1012110099
"node": "^12.13.0 || ^14.15.0 || >=16"
@@ -13951,7 +13929,8 @@
1395113929
"is-typedarray": {
1395213930
"version": "1.0.0",
1395313931
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
13954-
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
13932+
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
13933+
"dev": true
1395513934
},
1395613935
"is-weakref": {
1395713936
"version": "1.0.1",
@@ -16103,9 +16082,9 @@
1610316082
}
1610416083
},
1610516084
"signal-exit": {
16106-
"version": "3.0.6",
16107-
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz",
16108-
"integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ=="
16085+
"version": "3.0.7",
16086+
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
16087+
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
1610916088
},
1611016089
"simple-concat": {
1611116090
"version": "1.0.1",
@@ -17936,11 +17915,6 @@
1793617915
"integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
1793717916
"dev": true
1793817917
},
17939-
"typedarray-to-buffer": {
17940-
"version": "4.0.0",
17941-
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz",
17942-
"integrity": "sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ=="
17943-
},
1794417918
"typescript": {
1794517919
"version": "3.9.10",
1794617920
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
@@ -18331,14 +18305,12 @@
1833118305
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
1833218306
},
1833318307
"write-file-atomic": {
18334-
"version": "4.0.0",
18335-
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.0.tgz",
18336-
"integrity": "sha512-JhcWoKffJNF7ivO9yflBhc7tn3wKnokMUfWpBriM9yCXj4ePQnRPcWglBkkg1AHC8nsW/EfxwwhqsLtOy59djA==",
18308+
"version": "4.0.1",
18309+
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.1.tgz",
18310+
"integrity": "sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==",
1833718311
"requires": {
1833818312
"imurmurhash": "^0.1.4",
18339-
"is-typedarray": "^1.0.0",
18340-
"signal-exit": "^3.0.2",
18341-
"typedarray-to-buffer": "^4.0.0"
18313+
"signal-exit": "^3.0.7"
1834218314
}
1834318315
},
1834418316
"ws": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"treeverse": "^1.0.4",
125125
"validate-npm-package-name": "~3.0.0",
126126
"which": "^2.0.2",
127-
"write-file-atomic": "^4.0.0"
127+
"write-file-atomic": "^4.0.1"
128128
},
129129
"bundleDependencies": [
130130
"@isaacs/string-locale-compare",

0 commit comments

Comments
 (0)