diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-04-20 03:09:25 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-04-24 16:14:29 +0200 |
commit | 82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8 (patch) | |
tree | 965f6eb89b84d65a62b49008fd972c004832ccd1 /node_modules/rimraf | |
parent | e6e0cbc387c2a77b48e4065c229daa65bf1aa0fa (diff) | |
download | wallet-core-82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8.tar.xz |
Reorganize module loading.
We now use webpack instead of SystemJS, effectively bundling modules
into one file (plus commons chunks) for every entry point. This results
in a much smaller extension size (almost half). Furthermore we use
yarn/npm even for extension run-time dependencies. This relieves us
from manually vendoring and building dependencies. It's also easier to
understand for new developers familiar with node.
Diffstat (limited to 'node_modules/rimraf')
-rwxr-xr-x | node_modules/rimraf/bin.js | 16 | ||||
-rw-r--r-- | node_modules/rimraf/package.json | 4 | ||||
-rw-r--r-- | node_modules/rimraf/rimraf.js | 24 |
3 files changed, 37 insertions, 7 deletions
diff --git a/node_modules/rimraf/bin.js b/node_modules/rimraf/bin.js index 1bd5a0d16..0d1e17be7 100755 --- a/node_modules/rimraf/bin.js +++ b/node_modules/rimraf/bin.js @@ -4,16 +4,21 @@ var rimraf = require('./') var help = false var dashdash = false +var noglob = false var args = process.argv.slice(2).filter(function(arg) { if (dashdash) return !!arg else if (arg === '--') dashdash = true + else if (arg === '--no-glob' || arg === '-G') + noglob = true + else if (arg === '--glob' || arg === '-g') + noglob = false else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) help = true else return !!arg -}); +}) if (help || args.length === 0) { // If they didn't ask for help, then this is not a "success" @@ -24,7 +29,9 @@ if (help || args.length === 0) { log('') log('Options:') log('') - log(' -h, --help Display this usage info') + log(' -h, --help Display this usage info') + log(' -G, --no-glob Do not expand glob patterns in arguments') + log(' -g, --glob Expand glob patterns in arguments (default)') process.exit(help ? 0 : 1) } else go(0) @@ -32,7 +39,10 @@ if (help || args.length === 0) { function go (n) { if (n >= args.length) return - rimraf(args[n], function (er) { + var options = {} + if (noglob) + options = { glob: false } + rimraf(args[n], options, function (er) { if (er) throw er go(n+1) diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json index c2cc0458b..069a4371d 100644 --- a/node_modules/rimraf/package.json +++ b/node_modules/rimraf/package.json @@ -1,6 +1,6 @@ { "name": "rimraf", - "version": "2.5.4", + "version": "2.6.1", "main": "rimraf.js", "description": "A deep deletion module for node (like `rm -rf`)", "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", @@ -21,6 +21,6 @@ ], "devDependencies": { "mkdirp": "^0.5.1", - "tap": "^6.1.1" + "tap": "^10.1.2" } } diff --git a/node_modules/rimraf/rimraf.js b/node_modules/rimraf/rimraf.js index 5d9a5768a..c26331265 100644 --- a/node_modules/rimraf/rimraf.js +++ b/node_modules/rimraf/rimraf.js @@ -85,7 +85,7 @@ function rimraf (p, options, cb) { results.forEach(function (p) { rimraf_(p, options, function CB (er) { if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && + if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) { busyTries ++ var time = busyTries * 100 @@ -310,6 +310,7 @@ function rimrafSync (p, options) { return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) if (er.code !== "EISDIR") throw er + rmdirSync(p, options, er) } } @@ -339,5 +340,24 @@ function rmkidsSync (p, options) { options.readdirSync(p).forEach(function (f) { rimrafSync(path.join(p, f), options) }) - options.rmdirSync(p, options) + + // We only end up here once we got ENOTEMPTY at least once, and + // at this point, we are guaranteed to have removed all the kids. + // So, we know that it won't be ENOENT or ENOTDIR or anything else. + // try really hard to delete stuff on windows, because it has a + // PROFOUNDLY annoying habit of not closing handles promptly when + // files are deleted, resulting in spurious ENOTEMPTY errors. + var retries = isWindows ? 100 : 1 + var i = 0 + do { + var threw = true + try { + var ret = options.rmdirSync(p, options) + threw = false + return ret + } finally { + if (++i < retries && threw) + continue + } + } while (true) } |