Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@github.com>2022-08-17 22:28:19 +0300
committerNathan Fritz <fritzy@github.com>2022-08-17 22:44:30 +0300
commit1f6daf5b9df054952a47df01780039bd5da8f024 (patch)
treebaebcadecc60fbcb24bd9f6958598c088435731a
parentcbee6385a3231ea9ba02aa23d9dd110ba369217b (diff)
deps: write-file-atomic@4.0.2
-rw-r--r--node_modules/write-file-atomic/lib/index.js13
-rw-r--r--node_modules/write-file-atomic/package.json24
-rw-r--r--package-lock.json7
3 files changed, 27 insertions, 17 deletions
diff --git a/node_modules/write-file-atomic/lib/index.js b/node_modules/write-file-atomic/lib/index.js
index 118666d2c..9d79d797a 100644
--- a/node_modules/write-file-atomic/lib/index.js
+++ b/node_modules/write-file-atomic/lib/index.js
@@ -39,7 +39,9 @@ function cleanupOnExit (tmpfile) {
return () => {
try {
fs.unlinkSync(typeof tmpfile === 'function' ? tmpfile() : tmpfile)
- } catch (_) {}
+ } catch {
+ // ignore errors
+ }
}
}
@@ -156,7 +158,7 @@ async function writeFileAsync (filename, data, options = {}) {
}
}
-function writeFile (filename, data, options, callback) {
+async function writeFile (filename, data, options, callback) {
if (options instanceof Function) {
callback = options
options = {}
@@ -164,7 +166,12 @@ function writeFile (filename, data, options, callback) {
const promise = writeFileAsync(filename, data, options)
if (callback) {
- promise.then(callback, callback)
+ try {
+ const result = await promise
+ return callback(result)
+ } catch (err) {
+ return callback(err)
+ }
}
return promise
diff --git a/node_modules/write-file-atomic/package.json b/node_modules/write-file-atomic/package.json
index 7219f90b9..86e2a0fba 100644
--- a/node_modules/write-file-atomic/package.json
+++ b/node_modules/write-file-atomic/package.json
@@ -1,23 +1,23 @@
{
"name": "write-file-atomic",
- "version": "4.0.1",
+ "version": "4.0.2",
"description": "Write files in an atomic fashion w/configurable ownership",
"main": "./lib/index.js",
"scripts": {
"test": "tap",
"posttest": "npm run lint",
- "lint": "eslint '**/*.js'",
- "postlint": "npm-template-check",
+ "lint": "eslint \"**/*.js\"",
+ "postlint": "template-oss-check",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"lintfix": "npm run lint -- --fix",
"snap": "tap",
- "template-copy": "npm-template-copy --force"
+ "template-oss-apply": "template-oss-apply --force"
},
"repository": {
"type": "git",
- "url": "git://github.com/npm/write-file-atomic.git"
+ "url": "https://github.com/npm/write-file-atomic.git"
},
"keywords": [
"writeFile",
@@ -34,20 +34,22 @@
"signal-exit": "^3.0.7"
},
"devDependencies": {
- "@npmcli/template-oss": "^2.7.1",
+ "@npmcli/eslint-config": "^3.0.1",
+ "@npmcli/template-oss": "3.5.0",
"mkdirp": "^1.0.4",
"rimraf": "^3.0.2",
- "tap": "^15.1.6"
+ "tap": "^16.0.1"
},
"files": [
- "bin",
- "lib"
+ "bin/",
+ "lib/"
],
"engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16"
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
},
"templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
- "version": "2.7.1"
+ "version": "3.5.0"
}
}
diff --git a/package-lock.json b/package-lock.json
index 66e80b12d..299e95514 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9824,15 +9824,16 @@
"license": "ISC"
},
"node_modules/write-file-atomic": {
- "version": "4.0.1",
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz",
+ "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==",
"inBundle": true,
- "license": "ISC",
"dependencies": {
"imurmurhash": "^0.1.4",
"signal-exit": "^3.0.7"
},
"engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16"
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
"node_modules/ws": {