From 5d658336b23dab27a7d2d05b84a32b5965484598 Mon Sep 17 00:00:00 2001 From: Jamy Timmermans Date: Mon, 26 Aug 2019 10:48:44 -0700 Subject: [PATCH 1/8] fix(jenkins): try to install beam-common --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 91815d7..fde15ab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,6 +10,7 @@ node { } stage("Install") { sh 'npm install' + sh 'npm install @mcph/beam-common@^5.0.7' } stage("Lint") { sh 'npm run lint -s' From 743638e42dc6b821801640ede7aac6b1ce4242fa Mon Sep 17 00:00:00 2001 From: Jamy Timmermans Date: Mon, 26 Aug 2019 10:52:02 -0700 Subject: [PATCH 2/8] fixup! maybe this'll work --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index fde15ab..72f2e66 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ node { } stage("Install") { sh 'npm install' - sh 'npm install @mcph/beam-common@^5.0.7' + sh 'npm install @mcph/beam-common@5.0.7' } stage("Lint") { sh 'npm run lint -s' From fb5d3313c805bd1e24f6ee69b56a4643c27e3157 Mon Sep 17 00:00:00 2001 From: Jamy Timmermans Date: Mon, 26 Aug 2019 13:35:33 -0700 Subject: [PATCH 3/8] fixup! update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 520d8a0..6bb7fd3 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,6 @@ "sticky-kit": "^1.1.3" }, "optionalDependencies": { - "@mcph/beam-common": "^5.0.7" + "@mixer/beam-common": "^6.9.7" } } From 52eaaf4cf4b66089b6270915af7b10646bc4f9b2 Mon Sep 17 00:00:00 2001 From: Jamy Timmermans Date: Mon, 26 Aug 2019 13:35:56 -0700 Subject: [PATCH 4/8] fixuyp! remove install --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 72f2e66..91815d7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,6 @@ node { } stage("Install") { sh 'npm install' - sh 'npm install @mcph/beam-common@5.0.7' } stage("Lint") { sh 'npm run lint -s' From fbf621e8a6436853db5a2790fb638dcf7c762fb4 Mon Sep 17 00:00:00 2001 From: Jamy Timmermans Date: Mon, 26 Aug 2019 13:37:04 -0700 Subject: [PATCH 5/8] fixup! add @mixer --- build/misc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/misc.js b/build/misc.js index 1e9055b..3dd9577 100644 --- a/build/misc.js +++ b/build/misc.js @@ -43,7 +43,7 @@ function wrappedRequire (filePath) { */ function getPermissions () { try { - return require('@mcph/beam-common').permissions; + return require('@mixer/beam-common').permissions; } catch (err) { if (err.code === 'MODULE_NOT_FOUND') { // eslint-disable-next-line no-console From b460a62fffd4a548145a2adc19f873a98a46d630 Mon Sep 17 00:00:00 2001 From: Jamy Timmermans Date: Mon, 26 Aug 2019 13:56:50 -0700 Subject: [PATCH 6/8] chore(npm): bump gulp --- build/css.js | 4 ++-- build/docs.js | 4 ++-- build/misc.js | 8 ++++---- gulpfile.js | 16 ++++++++-------- package.json | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/build/css.js b/build/css.js index d09452e..2a811b2 100644 --- a/build/css.js +++ b/build/css.js @@ -46,11 +46,11 @@ module.exports = (gulp, $) => { * - minify in production * - output */ - gulp.task('css', ['iconfont'], () => { + gulp.task('css', gulp.series(['iconfont'], () => { return gulp.src(config.src.css) .pipe($.less()) .pipe($.autoprefixer()) .pipe($.if(config.minify, $.cleanCss())) .pipe(gulp.dest(config.dist.css)); - }); + })); }; diff --git a/build/docs.js b/build/docs.js index 18700e9..05071ce 100644 --- a/build/docs.js +++ b/build/docs.js @@ -235,7 +235,7 @@ function enhanceRamlObj (ramlObj, internal = false) { module.exports = (gulp, $, flags) => { gulp.task('backend-clone', () => getRepo('git@github.com:mixer/raml.git', 'master')); - gulp.task('backend-doc', ['backend-clone'], () => { + gulp.task('backend-doc', gulp.series(['backend-clone'], () => { let docPath; if (config.backendRamlPath) { docPath = path.join(config.backendRamlPath, 'index.raml'); @@ -264,7 +264,7 @@ module.exports = (gulp, $, flags) => { JSON.stringify(tree) ); }); - }); + })); gulp.task('pull-client-repos', () => { const todo = require('./libraries') diff --git a/build/misc.js b/build/misc.js index 3dd9577..2f0acae 100644 --- a/build/misc.js +++ b/build/misc.js @@ -228,15 +228,15 @@ module.exports = (gulp, $, flags) => { }; }); - gulp.task('html', ['html-raml']); - - gulp.task('html-raml', ['backend-doc', 'pull-client-repos'], () => { + gulp.task('html-raml', gulp.series(['backend-doc', 'pull-client-repos'], () => { return gulp.src(config.src.html) .pipe(dataPipe()) .pipe($.pug(getPugOpts())) .pipe($.if(config.minify, $.minifyHtml())) .pipe(gulp.dest(config.dist.html)); - }); + })); + + gulp.task('html', gulp.series(['html-raml'])); gulp.task('html-quick', () => { return gulp.src(config.src.html) diff --git a/gulpfile.js b/gulpfile.js index 42bba81..9f917b1 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -16,16 +16,16 @@ require('./build/css')(gulp, $, flags); const defaultTasks = ['html', 'js', 'css', 'images']; -gulp.task('default', defaultTasks); -gulp.task('internal', ['set-internal', ...defaultTasks]); -gulp.task('recompile', ['html-quick', 'js', 'css', 'images']); +gulp.task('default', gulp.series(defaultTasks)); +gulp.task('internal', gulp.series(['set-internal', ...defaultTasks])); +gulp.task('recompile', gulp.series(['html-quick', 'js', 'css', 'images'])); gulp.task('watch', () => { - gulp.watch('src/css/**/*.less', ['css']); - gulp.watch(config.src.html, ['html-quick']); - gulp.watch(config.src.snippets, ['html-quick']); - gulp.watch(config.src.js, ['js']); + gulp.watch('src/css/**/*.less', gulp.series(['css'])); + gulp.watch(config.src.html, gulp.series(['html-quick'])); + gulp.watch(config.src.snippets, gulp.series(['html-quick'])); + gulp.watch(config.src.js, gulp.series(['js'])); if (config.repos && config.repos.backend) { - gulp.watch(path.join(config.repos.backend, '**/*.raml'), ['html-raml']); + gulp.watch(path.join(config.repos.backend, '**/*.raml'), gulp.series(['html-raml'])); } }); diff --git a/package.json b/package.json index 6bb7fd3..3c8834e 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "eslint-plugin-import": "^1.9.2", "eslint-plugin-jsx-a11y": "^1.5.3", "eslint-plugin-react": "^5.2.2", - "gulp": "^3.9.1", + "gulp": "^4.0.2", "gulp-autoprefixer": "^3.1.0", "gulp-clean-css": "^2.0.10", "gulp-concat": "^2.6.0", @@ -43,17 +43,17 @@ "gulp-data": "^1.2.1", "gulp-iconfont": "^8.0.0", "gulp-if": "^2.0.1", - "gulp-imagemin": "^3.0.1", + "gulp-imagemin": "^6.1.0", "gulp-less": "^3.1.0", "gulp-load-plugins": "^1.2.4", "gulp-minify-html": "^1.0.6", "gulp-pug": "^3.3.0", "gulp-uglify": "^3.0.0", "highlight.js": "^9.5.0", - "http-server": "^0.9.0", + "http-server": "^0.11.1", "js-yaml": "^3.11.0", "lodash": "^4.13.1", - "marked": "^0.3.5", + "marked": "^0.7.0", "node-fetch": "^1.5.3", "npm-run-all": "^4.0.2", "pug-lint": "^2.2.2", From cd3ce81764dff03fae2662eebe3f4fc52d8789de Mon Sep 17 00:00:00 2001 From: Jamy Timmermans Date: Mon, 26 Aug 2019 14:06:39 -0700 Subject: [PATCH 7/8] fixup! gulp --- build/misc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/misc.js b/build/misc.js index 2f0acae..15ba63f 100644 --- a/build/misc.js +++ b/build/misc.js @@ -267,7 +267,7 @@ module.exports = (gulp, $, flags) => { .pipe(gulp.dest(config.dist.js)); }); - gulp.task('lint-json', () => { + gulp.task('lint-json', (done) => { const files = [ 'src/reference/chat/data.json', 'src/reference/interactive/cplusplus/data.json', @@ -282,6 +282,9 @@ module.exports = (gulp, $, flags) => { } fs.writeFileSync(file, `${transformed}\n`); }); + + // Have to do this for some gulp 4 reason + done(); }); gulp.task('set-internal', () => { From cc0cb78f54bfc1b4d8dd7f5bc34fa0cc6b9b44e6 Mon Sep 17 00:00:00 2001 From: Jamy Timmermans Date: Mon, 26 Aug 2019 14:13:47 -0700 Subject: [PATCH 8/8] fixup! gulp 4 has a very explicit api --- build/misc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/misc.js b/build/misc.js index 15ba63f..54e6fe3 100644 --- a/build/misc.js +++ b/build/misc.js @@ -287,7 +287,10 @@ module.exports = (gulp, $, flags) => { done(); }); - gulp.task('set-internal', () => { + gulp.task('set-internal', (done) => { flags.internal = true; + + // Have to do this for some gulp 4 reason + done(); }); };