Bump async dependency to 3.2.0 in atom/script

Update lockfileVersion to *2*, but that's a side affect from npm

https://github.com/caolan/async/blob/master/CHANGELOG.md#v200
v2.0.0 allows importing functions modularily.
So I changed the code to only import the functions needed
instead of the whole thing.
This commit is contained in:
icecream17 2021-06-25 16:51:14 -05:00
parent 978843584a
commit 4774c56d9e
5 changed files with 16832 additions and 60 deletions

16868
script/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
"7zip-bin": "^4.0.2",
"@atom/electron-winstaller": "0.0.1",
"@octokit/request": "^5.4.5",
"async": "2.0.1",
"async": "^3.2.0",
"babel-core": "5.8.38",
"babel-eslint": "^10.0.1",
"cheerio": "1.0.0-rc.2",

View File

@ -34,7 +34,7 @@ const argv = require('yargs')
.help().argv;
const assert = require('assert');
const async = require('async');
const asyncSeries = require('async/series');
const childProcess = require('child_process');
const fs = require('fs-extra');
const glob = require('glob');
@ -476,7 +476,7 @@ function requestedTestSuites(platform) {
return suites;
}
async.series(testSuitesToRun, function(err, results) {
asyncSeries(testSuitesToRun, function(err, results) {
if (err) {
console.error(err);
process.exit(1);

View File

@ -5,7 +5,7 @@ const { Disposable, Emitter } = require('event-kit');
const { watchPath } = require('./path-watcher');
const CSON = require('season');
const Path = require('path');
const async = require('async');
const asyncQueue = require('async/queue');
const EVENT_TYPES = new Set(['created', 'modified', 'renamed']);
@ -32,16 +32,16 @@ module.exports = class ConfigFile {
this.reloadCallbacks = [];
// Use a queue to prevent multiple concurrent write to the same file.
const writeQueue = async.queue((data, callback) =>
const writeQueue = asyncQueue((data, callback) =>
CSON.writeFile(this.path, data, error => {
if (error) {
this.emitter.emit(
'did-error',
dedent`
Failed to write \`${Path.basename(this.path)}\`.
Failed to write \`${Path.basename(this.path)}\`.
${error.message}
`
${error.message}
`
);
}
callback();

View File

@ -1,5 +1,5 @@
const path = require('path');
const async = require('async');
const asyncEach = require('async/each');
const CSON = require('season');
const fs = require('fs-plus');
const { Emitter, CompositeDisposable } = require('event-kit');
@ -726,14 +726,14 @@ module.exports = class Package {
this.packageManager.packagesCache[this.name]
) {
const { grammarPaths } = this.packageManager.packagesCache[this.name];
return async.each(grammarPaths, loadGrammar, () => resolve());
return asyncEach(grammarPaths, loadGrammar, () => resolve());
} else {
const grammarsDirPath = path.join(this.path, 'grammars');
fs.exists(grammarsDirPath, grammarsDirExists => {
if (!grammarsDirExists) return resolve();
fs.list(grammarsDirPath, ['json', 'cson'], (error, grammarPaths) => {
if (error || !grammarPaths) return resolve();
async.each(grammarPaths, loadGrammar, () => resolve());
asyncEach(grammarPaths, loadGrammar, () => resolve());
});
});
}
@ -779,7 +779,7 @@ module.exports = class Package {
if (!settingsDirExists) return resolve();
fs.list(settingsDirPath, ['json', 'cson'], (error, settingsPaths) => {
if (error || !settingsPaths) return resolve();
async.each(settingsPaths, loadSettingsFile, () => resolve());
asyncEach(settingsPaths, loadSettingsFile, () => resolve());
});
});
});