refactor: use node scheme imports in scripts (#38846)
* refactor: use node scheme imports in script * refactor: use node scheme imports in build
This commit is contained in:
parent
395b608dd5
commit
abec9ead06
40 changed files with 105 additions and 89 deletions
|
@ -1,6 +1,6 @@
|
|||
if (!process.env.CI) require('dotenv-safe').load();
|
||||
|
||||
const assert = require('assert');
|
||||
const assert = require('node:assert');
|
||||
const got = require('got');
|
||||
const { Octokit } = require('@octokit/rest');
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const got = require('got');
|
||||
const url = require('url');
|
||||
const url = require('node:url');
|
||||
|
||||
module.exports = async function getUrlHash (targetUrl, algorithm = 'sha256', attempts = 3) {
|
||||
const options = {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const { GitProcess } = require('dugite');
|
||||
const minimist = require('minimist');
|
||||
const path = require('path');
|
||||
const path = require('node:path');
|
||||
const semver = require('semver');
|
||||
|
||||
const { ELECTRON_DIR } = require('../../lib/utils');
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const { GitProcess } = require('dugite');
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ const args = require('minimist')(process.argv.slice(2), {
|
|||
});
|
||||
const ciReleaseBuild = require('./ci-release-build');
|
||||
const { Octokit } = require('@octokit/rest');
|
||||
const { execSync } = require('child_process');
|
||||
const { execSync } = require('node:child_process');
|
||||
const { GitProcess } = require('dugite');
|
||||
|
||||
const path = require('path');
|
||||
const readline = require('readline');
|
||||
const path = require('node:path');
|
||||
const readline = require('node:readline');
|
||||
const releaseNotesGenerator = require('./notes/index.js');
|
||||
const { getCurrentBranch, ELECTRON_DIR } = require('../lib/utils.js');
|
||||
const bumpType = args._[0];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const temp = require('temp');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const childProcess = require('child_process');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const childProcess = require('node:child_process');
|
||||
const got = require('got');
|
||||
const semver = require('semver');
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ const args = require('minimist')(process.argv.slice(2), {
|
|||
string: ['tag', 'releaseID'],
|
||||
default: { releaseID: '' }
|
||||
});
|
||||
const { execSync } = require('child_process');
|
||||
const { execSync } = require('node:child_process');
|
||||
const { GitProcess } = require('dugite');
|
||||
const { getCurrentBranch, ELECTRON_DIR } = require('../lib/utils.js');
|
||||
const { Octokit } = require('@octokit/rest');
|
||||
|
|
|
@ -9,13 +9,13 @@ const args = require('minimist')(process.argv.slice(2), {
|
|||
],
|
||||
default: { verboseNugget: false }
|
||||
});
|
||||
const fs = require('fs');
|
||||
const { execSync } = require('child_process');
|
||||
const fs = require('node:fs');
|
||||
const { execSync } = require('node:child_process');
|
||||
const got = require('got');
|
||||
const path = require('path');
|
||||
const path = require('node:path');
|
||||
const semver = require('semver');
|
||||
const temp = require('temp').track();
|
||||
const { URL } = require('url');
|
||||
const { URL } = require('node:url');
|
||||
const { BlobServiceClient } = require('@azure/storage-blob');
|
||||
const { Octokit } = require('@octokit/rest');
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Octokit } from '@octokit/rest';
|
||||
import * as fs from 'fs';
|
||||
import * as fs from 'node:fs';
|
||||
|
||||
const octokit = new Octokit({
|
||||
auth: process.env.ELECTRON_GITHUB_TOKEN
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const path = require('node:path');
|
||||
const fs = require('node:fs');
|
||||
const semver = require('semver');
|
||||
const { GitProcess } = require('dugite');
|
||||
const { promisify } = require('util');
|
||||
const { promisify } = require('node:util');
|
||||
|
||||
const { ELECTRON_DIR } = require('../lib/utils');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue