Browse Source

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

Charles Kerr 4 years ago
parent
commit
7f885bd266

+ 0 - 2
script/doc-only-change.js

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

+ 0 - 2
script/node-spec-runner.js

@@ -10,12 +10,10 @@ const args = require('minimist')(process.argv.slice(2), {
 const BASE = path.resolve(__dirname, '../..');
 const DISABLED_TESTS = require('./node-disabled-tests.json');
 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 TAP_FILE_NAME = 'test.tap';
 
 const utils = require('./lib/utils');
-const { YARN_VERSION } = require('./yarn');
 
 if (!process.mainModule) {
   throw new Error('Must call the node spec runner directly');

+ 0 - 1
script/release/ci-release-build.js

@@ -91,7 +91,6 @@ async function circleCIcall (targetBranch, job, options) {
   try {
     const circleResponse = await circleCIRequest(CIRCLECI_PIPELINE_URL, 'POST', buildRequest);
     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);
     if (workflowId === -1) {
       return;

+ 0 - 1
script/release/release-artifact-cleanup.js

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

+ 0 - 1
script/spec-runner.js

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

+ 1 - 1
spec/static/main.js

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