Run `npm run install-deps` on NPM 7.4.5
This CL contains the output of running `npm run install-deps` on
NPM 7.4.5. This includes a version bump of the package-lock.json,
which means all DevTools engineers who run `npm run install-deps`
should use NPM 7+. Additionally, this allows `npm run dedupe` to
produce a better output and remove more duplicate packages.
For more information, see https://github.com/eslint/eslint/issues/14098
DISABLE_THIRD_PARTY_CHECK=NPM update
[email protected]
Bug: none
Change-Id: Id1ca2f33f3bb7d555dca1c0737d38bc1c7f5221c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2705386
Commit-Queue: Tim van der Lippe <[email protected]>
Reviewed-by: Jack Franklin <[email protected]>
diff --git a/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js
index 8c75ee2..e15042d 100644
--- a/node_modules/graceful-fs/graceful-fs.js
+++ b/node_modules/graceful-fs/graceful-fs.js
@@ -21,6 +21,14 @@
function noop () {}
+function publishQueue(context, queue) {
+ Object.defineProperty(context, gracefulQueue, {
+ get: function() {
+ return queue
+ }
+ })
+}
+
var debug = noop
if (util.debuglog)
debug = util.debuglog('gfs4')
@@ -32,14 +40,10 @@
}
// Once time initialization
-if (!global[gracefulQueue]) {
+if (!fs[gracefulQueue]) {
// This queue can be shared by multiple loaded instances
- var queue = []
- Object.defineProperty(global, gracefulQueue, {
- get: function() {
- return queue
- }
- })
+ var queue = global[gracefulQueue] || []
+ publishQueue(fs, queue)
// Patch fs.close/closeSync to shared queue version, because we need
// to retry() whenever a close happens *anywhere* in the program.
@@ -79,12 +83,16 @@
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
process.on('exit', function() {
- debug(global[gracefulQueue])
- require('assert').equal(global[gracefulQueue].length, 0)
+ debug(fs[gracefulQueue])
+ require('assert').equal(fs[gracefulQueue].length, 0)
})
}
}
+if (!global[gracefulQueue]) {
+ publishQueue(global, fs[gracefulQueue]);
+}
+
module.exports = patch(clone(fs))
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
module.exports = patch(fs)
@@ -162,6 +170,25 @@
}
}
+ var fs$copyFile = fs.copyFile
+ if (fs$copyFile)
+ fs.copyFile = copyFile
+ function copyFile (src, dest, flags, cb) {
+ if (typeof flags === 'function') {
+ cb = flags
+ flags = 0
+ }
+ return fs$copyFile(src, dest, flags, function (err) {
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
+ enqueue([fs$copyFile, [src, dest, flags, cb]])
+ else {
+ if (typeof cb === 'function')
+ cb.apply(this, arguments)
+ retry()
+ }
+ })
+ }
+
var fs$readdir = fs.readdir
fs.readdir = readdir
function readdir (path, options, cb) {
@@ -334,11 +361,11 @@
function enqueue (elem) {
debug('ENQUEUE', elem[0].name, elem[1])
- global[gracefulQueue].push(elem)
+ fs[gracefulQueue].push(elem)
}
function retry () {
- var elem = global[gracefulQueue].shift()
+ var elem = fs[gracefulQueue].shift()
if (elem) {
debug('RETRY', elem[0].name, elem[1])
elem[0].apply(null, elem[1])