* Upgrade to gulp 4.0.0

* Fixes

* Try adding gulp-api

* Fix Linux tests

* work

* Remove gulp-api
This commit is contained in:
Stephen Weatherford (MSFT) 2018-12-05 22:38:17 +00:00 коммит произвёл GitHub
Родитель eb416f02f5
Коммит f149e027cd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 789 добавлений и 356 удалений

Просмотреть файл

@ -7,10 +7,10 @@ steps:
displayName: 'Start X Virtual Frame Buffer'
- script: |
export DISPLAY=:10
gulp test
npm test
displayName: 'Test'
env:
DISPLAY: :10
SERVICE_PRINCIPAL_CLIENT_ID: $(SERVICE_PRINCIPAL_CLIENT_ID)
SERVICE_PRINCIPAL_SECRET: $(SERVICE_PRINCIPAL_SECRET)
SERVICE_PRINCIPAL_DOMAIN: $(SERVICE_PRINCIPAL_DOMAIN)

Просмотреть файл

@ -14,31 +14,21 @@ const glob = require('glob');
const env = process.env;
gulp.task('webpack-dev', (cb) => {
gulp.task('webpack-dev', async () => {
preWebpack();
spawn(path.join(__dirname, './node_modules/.bin/webpack'), ['--mode', 'development'], { stdio: 'inherit', env }, cb);
return spawn(path.join(__dirname, './node_modules/.bin/webpack'), ['--mode', 'development'], { stdio: 'inherit', env });
});
gulp.task('webpack-prod', (cb) => {
gulp.task('webpack-prod', async () => {
preWebpack();
spawn(path.join(__dirname, './node_modules/.bin/webpack'), ['--mode', 'production'], { stdio: 'inherit', env }, cb);
});
gulp.task('test', ['install-azure-account'], (cb) => {
env.DEBUGTELEMETRY = 1;
env.CODE_TESTS_WORKSPACE = path.join(__dirname, 'test/test.code-workspace');
env.CODE_TESTS_PATH = path.join(__dirname, 'dist/test');
const cmd = cp.spawn('node', ['./node_modules/vscode/bin/test'], { stdio: 'inherit', env });
cmd.on('close', (code) => {
cb(code);
});
return spawn(path.join(__dirname, './node_modules/.bin/webpack'), ['--mode', 'production'], { stdio: 'inherit', env });
});
/**
* Installs the azure account extension before running tests (otherwise our extension would fail to activate)
* NOTE: The version isn't super important since we don't actually use the account extension in tests
*/
gulp.task('install-azure-account', () => {
gulp.task('install-azure-account', async () => {
const version = '0.4.3';
const extensionPath = path.join(os.homedir(), `.vscode/extensions/ms-vscode.azure-account-${version}`);
const existingExtensions = glob.sync(extensionPath.replace(version, '*'));
@ -57,7 +47,14 @@ gulp.task('install-azure-account', () => {
}
});
function spawn(command, args, options, cb) {
gulp.task('test', gulp.series('install-azure-account', async () => {
env.DEBUGTELEMETRY = 1;
env.CODE_TESTS_WORKSPACE = path.join(__dirname, 'test/test.code-workspace');
env.CODE_TESTS_PATH = path.join(__dirname, 'dist/test');
return spawn('node', ['./node_modules/vscode/bin/test'], { stdio: 'inherit', env });
}));
function spawn(command, args, options) {
if (process.platform === 'win32') {
if (fse.pathExistsSync(command + '.exe')) {
command = command + '.exe';
@ -67,15 +64,7 @@ function spawn(command, args, options, cb) {
}
const cmd = cp.spawn(command, args, options);
cmd.on('close', (code) => {
cb(code);
});
cmd.on('error', (err) => {
console.error(`Error spawning '${command}': ${err}`)
cb(err);
});
return cp.spawn(command, args, options);
}
function preWebpack() {

1098
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -898,13 +898,13 @@
"adm-zip": "^0.4.11",
"clean-webpack-plugin": "^0.1.19",
"copy-webpack-plugin": "^4.5.4",
"gulp": "^3.9.1",
"gulp": "^4.0.0",
"gulp-decompress": "^2.0.2",
"gulp-download": "^0.0.1",
"mocha": "^5.2.0",
"mocha-junit-reporter": "^1.18.0",
"string-replace-webpack-plugin": "^0.1.3",
"mocha-multi-reporters": "^1.1.7",
"string-replace-webpack-plugin": "^0.1.3",
"ts-loader": "^5.3.0",
"tslint": "^5.11.0",
"tslint-microsoft-contrib": "^5.2.1",