build: update some build dependencies (#44071)
* 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 * build: s/colors/chalk * build: node 20 on windows
This commit is contained in:
parent
9222396159
commit
5bdaa42b01
49 changed files with 2359 additions and 1325 deletions
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import * as chalk from 'chalk';
|
||||
import { GitProcess } from 'dugite';
|
||||
import { execSync } from 'node:child_process';
|
||||
import { join } from 'node:path';
|
||||
|
@ -45,9 +46,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 && !notesOnly) {
|
||||
console.log('Usage: prepare-release [stable | minor | beta | alpha | nightly]' +
|
||||
|
@ -218,7 +218,7 @@ async function promptForVersion (version: string) {
|
|||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
rl.question(`Do you want to create the release ${version.green} (y/N)? `, (answer) => {
|
||||
rl.question(`Do you want to create the release ${chalk.green(version)} (y/N)? `, (answer) => {
|
||||
rl.close();
|
||||
resolve(answer);
|
||||
});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import * as chalk from 'chalk';
|
||||
import { parseArgs } from 'node:util';
|
||||
|
||||
import { createGitHubTokenStrategy } from './github-token';
|
||||
|
@ -25,9 +26,8 @@ if (!_tag) {
|
|||
|
||||
const tag = _tag;
|
||||
|
||||
require('colors');
|
||||
const pass = '✓'.green;
|
||||
const fail = '✗'.red;
|
||||
const pass = chalk.green('✓');
|
||||
const fail = chalk.red('✗');
|
||||
|
||||
async function deleteDraft (releaseId: string, targetRepo: ElectronReleaseRepo) {
|
||||
const octokit = new Octokit({
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
import { BlobServiceClient } from '@azure/storage-blob';
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import * as chalk from 'chalk';
|
||||
import got from 'got';
|
||||
import { execSync, ExecSyncOptions } from 'node:child_process';
|
||||
import { statSync, createReadStream, writeFileSync, close } from 'node:fs';
|
||||
|
@ -18,9 +19,8 @@ import { parseArgs } from 'node:util';
|
|||
|
||||
const temp = trackTemp();
|
||||
|
||||
require('colors');
|
||||
const pass = '✓'.green;
|
||||
const fail = '✗'.red;
|
||||
const pass = chalk.green('✓');
|
||||
const fail = chalk.red('✗');
|
||||
|
||||
const pkgVersion = `v${getElectronVersion()}`;
|
||||
|
||||
|
|
|
@ -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'],
|
||||
|
@ -80,7 +80,7 @@ async function main () {
|
|||
}
|
||||
|
||||
const versionString = `v${args.electronVersion}`;
|
||||
console.log(`Running against Electron ${versionString.green}`);
|
||||
console.log(`Running against Electron ${chalk.green(versionString)}`);
|
||||
}
|
||||
|
||||
const [lastSpecHash, lastSpecInstallHash] = loadLastSpecHash();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue