build: update some build dependencies (#43882)

* build: update some build dependencies

* build: fix eslint issues after updating

* build: disable ts check on busted js example

* build: update internal types for stricter event handling

* restore url.parse behavior

* fix typing issues

* sigh

* build: update easy deps

* build: skip woa engines check
This commit is contained in:
Samuel Attard 2024-09-26 00:12:11 -07:00 committed by GitHub
parent 15db63e26d
commit 74af96da16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
49 changed files with 1797 additions and 1276 deletions

View file

@ -26,6 +26,7 @@ async function checkIfDocOnlyChange () {
const nonDocChange = filesChanged.length === 0 || filesChanged.find(({ filename }) => {
const fileDirs = filename.split('/');
if (fileDirs[0] !== 'docs') return true;
return false;
});
process.exit(nonDocChange ? 1 : 0);

View file

@ -15,7 +15,7 @@ module.exports.getElectronVersion = () => {
if (match) {
return match[1];
}
} catch (error) {
} catch {
// Error may happen when trying to get version before running gn, which is a
// valid case and error will be ignored.
}

View file

@ -1,3 +1,4 @@
const chalk = require('chalk');
const { GitProcess } = require('dugite');
const fs = require('node:fs');
const os = require('node:os');
@ -6,10 +7,9 @@ const path = require('node:path');
const ELECTRON_DIR = path.resolve(__dirname, '..', '..');
const SRC_DIR = path.resolve(ELECTRON_DIR, '..');
require('colors');
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const pass = '✓'.green;
const fail = '✗'.red;
const pass = chalk.green('✓');
const fail = chalk.red('✗');
function getElectronExec () {
const OUT_DIR = getOutDir();

View file

@ -144,7 +144,6 @@ const LINTERS = [{
cacheLocation: `node_modules/.eslintcache.${crypto.createHash('md5').update(fs.readFileSync(__filename)).digest('hex')}`,
extensions: ['.js', '.ts'],
fix: opts.fix,
overrideConfigFile: path.join(ELECTRON_ROOT, '.eslintrc.json'),
resolvePluginsRelativeTo: ELECTRON_ROOT
});
const formatter = await eslint.loadFormatter();

View file

@ -8,6 +8,7 @@ const ciReleaseBuild = require('./ci-release-build');
const { Octokit } = require('@octokit/rest');
const { execSync } = require('node:child_process');
const { GitProcess } = require('dugite');
const chalk = require('chalk');
const path = require('node:path');
const readline = require('node:readline');
@ -25,9 +26,8 @@ const octokit = new Octokit({
authStrategy: createGitHubTokenStrategy(getRepo())
});
require('colors');
const pass = '✓'.green;
const fail = '✗'.red;
const pass = chalk.green('✓');
const fail = chalk.red('✗');
if (!bumpType && !args.notesOnly) {
console.log('Usage: prepare-release [stable | minor | beta | alpha | nightly]' +

View file

@ -6,11 +6,12 @@ const args = require('minimist')(process.argv.slice(2), {
default: { releaseID: '' }
});
const { Octokit } = require('@octokit/rest');
const chalk = require('chalk');
const { createGitHubTokenStrategy } = require('./github-token');
require('colors');
const pass = '✓'.green;
const fail = '✗'.red;
const pass = chalk.green('✓');
const fail = chalk.red('✗');
async function deleteDraft (releaseId, targetRepo) {
const octokit = new Octokit({

View file

@ -2,6 +2,7 @@
if (!process.env.CI) require('dotenv-safe').load();
const chalk = require('chalk');
const args = require('minimist')(process.argv.slice(2), {
boolean: [
'validateRelease',
@ -18,9 +19,8 @@ const temp = require('temp').track();
const { BlobServiceClient } = require('@azure/storage-blob');
const { Octokit } = require('@octokit/rest');
require('colors');
const pass = '✓'.green;
const fail = '✗'.red;
const pass = chalk.green('✓');
const fail = chalk.red('✗');
const { ELECTRON_DIR } = require('../lib/utils');
const { getElectronVersion } = require('../lib/get-version');

View file

@ -1,6 +1,7 @@
#!/usr/bin/env node
const { ElectronVersions, Installer } = require('@electron/fiddle-core');
const chalk = require('chalk');
const childProcess = require('node:child_process');
const crypto = require('node:crypto');
const fs = require('node:fs');
@ -9,9 +10,8 @@ const os = require('node:os');
const path = require('node:path');
const unknownFlags = [];
require('colors');
const pass = '✓'.green;
const fail = '✗'.red;
const pass = chalk.green('✓');
const fail = chalk.red('✗');
const args = require('minimist')(process.argv, {
string: ['runners', 'target', 'electronVersion'],