chore: remove unused code from our js scripts (#25419)

This commit is contained in:
Charles Kerr 2020-09-14 12:22:13 -05:00 committed by GitHub
parent bc9816b206
commit 7f885bd266
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1 additions and 8 deletions

View file

@ -3,8 +3,6 @@ const { Octokit } = require('@octokit/rest');
const octokit = new Octokit(); const octokit = new Octokit();
const path = require('path'); const path = require('path');
const SOURCE_ROOT = path.normalize(path.dirname(__dirname));
async function checkIfDocOnlyChange () { async function checkIfDocOnlyChange () {
if (args.prNumber || args.prBranch || args.prURL) { if (args.prNumber || args.prBranch || args.prURL) {
try { try {

View file

@ -10,12 +10,10 @@ const args = require('minimist')(process.argv.slice(2), {
const BASE = path.resolve(__dirname, '../..'); const BASE = path.resolve(__dirname, '../..');
const DISABLED_TESTS = require('./node-disabled-tests.json'); const DISABLED_TESTS = require('./node-disabled-tests.json');
const NODE_DIR = path.resolve(BASE, 'third_party', 'electron_node'); const NODE_DIR = path.resolve(BASE, 'third_party', 'electron_node');
const NPX_CMD = process.platform === 'win32' ? 'npx.cmd' : 'npx';
const JUNIT_DIR = args.jUnitDir ? path.resolve(args.jUnitDir) : null; const JUNIT_DIR = args.jUnitDir ? path.resolve(args.jUnitDir) : null;
const TAP_FILE_NAME = 'test.tap'; const TAP_FILE_NAME = 'test.tap';
const utils = require('./lib/utils'); const utils = require('./lib/utils');
const { YARN_VERSION } = require('./yarn');
if (!process.mainModule) { if (!process.mainModule) {
throw new Error('Must call the node spec runner directly'); throw new Error('Must call the node spec runner directly');

View file

@ -91,7 +91,6 @@ async function circleCIcall (targetBranch, job, options) {
try { try {
const circleResponse = await circleCIRequest(CIRCLECI_PIPELINE_URL, 'POST', buildRequest); const circleResponse = await circleCIRequest(CIRCLECI_PIPELINE_URL, 'POST', buildRequest);
console.log(`CircleCI release build pipeline ${circleResponse.id} for ${job} triggered.`); console.log(`CircleCI release build pipeline ${circleResponse.id} for ${job} triggered.`);
const pipelineInfoUrl = `https://circleci.com/api/v2/pipeline/${circleResponse.id}`;
const workflowId = await getCircleCIWorkflowId(circleResponse.id); const workflowId = await getCircleCIWorkflowId(circleResponse.id);
if (workflowId === -1) { if (workflowId === -1) {
return; return;

View file

@ -5,7 +5,6 @@ const args = require('minimist')(process.argv.slice(2), {
string: ['tag', 'releaseID'], string: ['tag', 'releaseID'],
default: { releaseID: '' } default: { releaseID: '' }
}); });
const path = require('path');
const { execSync } = require('child_process'); const { execSync } = require('child_process');
const { GitProcess } = require('dugite'); const { GitProcess } = require('dugite');
const { getCurrentBranch, ELECTRON_DIR } = require('../lib/utils.js'); const { getCurrentBranch, ELECTRON_DIR } = require('../lib/utils.js');

View file

@ -30,7 +30,6 @@ const utils = require('./lib/utils');
const { YARN_VERSION } = require('./yarn'); const { YARN_VERSION } = require('./yarn');
const BASE = path.resolve(__dirname, '../..'); const BASE = path.resolve(__dirname, '../..');
const NPM_CMD = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const NPX_CMD = process.platform === 'win32' ? 'npx.cmd' : 'npx'; const NPX_CMD = process.platform === 'win32' ? 'npx.cmd' : 'npx';
const runners = new Map([ const runners = new Map([

View file

@ -2,7 +2,7 @@
process.throwDeprecation = false; process.throwDeprecation = false;
const electron = require('electron'); const electron = require('electron');
const { app, BrowserWindow, crashReporter, dialog, ipcMain, protocol, webContents, session } = electron; const { app, BrowserWindow, dialog, ipcMain, protocol, webContents, session } = electron;
try { try {
require('fs').rmdirSync(app.getPath('userData'), { recursive: true }); require('fs').rmdirSync(app.getPath('userData'), { recursive: true });