Got rid of `simple-git` warning (#3405)
This commit is contained in:
parent
feee38f08f
commit
76050e6fc4
|
@ -6,7 +6,7 @@ const crypto = require('crypto');
|
||||||
const { argv } = require('yargs');
|
const { argv } = require('yargs');
|
||||||
const fetch = require('node-fetch').default;
|
const fetch = require('node-fetch').default;
|
||||||
const Benchmark = require('benchmark');
|
const Benchmark = require('benchmark');
|
||||||
const simpleGit = require('simple-git/promise');
|
const simpleGit = require('simple-git');
|
||||||
const { parseLanguageNames } = require('../tests/helper/test-case');
|
const { parseLanguageNames } = require('../tests/helper/test-case');
|
||||||
|
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@ async function getCandidates(config) {
|
||||||
const remoteBaseDir = path.join(__dirname, 'remotes');
|
const remoteBaseDir = path.join(__dirname, 'remotes');
|
||||||
await fs.promises.mkdir(remoteBaseDir, { recursive: true });
|
await fs.promises.mkdir(remoteBaseDir, { recursive: true });
|
||||||
|
|
||||||
const baseGit = simpleGit(remoteBaseDir);
|
const baseGit = simpleGit.gitP(remoteBaseDir);
|
||||||
|
|
||||||
for (const remote of config.remotes) {
|
for (const remote of config.remotes) {
|
||||||
const user = /[^/]+(?=\/prism.git)/.exec(remote.repo);
|
const user = /[^/]+(?=\/prism.git)/.exec(remote.repo);
|
||||||
|
@ -413,9 +413,9 @@ async function getCandidates(config) {
|
||||||
if (!fs.existsSync(remoteDir)) {
|
if (!fs.existsSync(remoteDir)) {
|
||||||
console.log(`Cloning ${remote.repo}`);
|
console.log(`Cloning ${remote.repo}`);
|
||||||
await baseGit.clone(remote.repo, remoteName);
|
await baseGit.clone(remote.repo, remoteName);
|
||||||
remoteGit = simpleGit(remoteDir);
|
remoteGit = simpleGit.gitP(remoteDir);
|
||||||
} else {
|
} else {
|
||||||
remoteGit = simpleGit(remoteDir);
|
remoteGit = simpleGit.gitP(remoteDir);
|
||||||
await remoteGit.fetch('origin', branch); // get latest version of branch
|
await remoteGit.fetch('origin', branch); // get latest version of branch
|
||||||
}
|
}
|
||||||
await remoteGit.checkout(branch); // switch to branch
|
await remoteGit.checkout(branch); // switch to branch
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const { markdown } = require('danger');
|
const { markdown } = require('danger');
|
||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
const gzipSize = require('gzip-size');
|
const gzipSize = require('gzip-size');
|
||||||
const git = require('simple-git/promise')(__dirname).silent(true);
|
const git = require('simple-git').gitP(__dirname);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the contents of a text file in the base of the PR.
|
* Returns the contents of a text file in the base of the PR.
|
||||||
|
|
|
@ -4,7 +4,7 @@ const { src, dest } = require('gulp');
|
||||||
|
|
||||||
const replace = require('gulp-replace');
|
const replace = require('gulp-replace');
|
||||||
const pump = require('pump');
|
const pump = require('pump');
|
||||||
const git = require('simple-git/promise')(__dirname);
|
const git = require('simple-git').gitP(__dirname);
|
||||||
|
|
||||||
const { changelog } = require('./paths');
|
const { changelog } = require('./paths');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue