Unverified Commit 9fa6704e authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #1583 from hypothesis/replace-gulp-util

Replace deprecated gulp-util dependency
parents db7c1d72 337093f4
...@@ -8,8 +8,8 @@ const path = require('path'); ...@@ -8,8 +8,8 @@ const path = require('path');
const changed = require('gulp-changed'); const changed = require('gulp-changed');
const commander = require('commander'); const commander = require('commander');
const debounce = require('lodash.debounce'); const debounce = require('lodash.debounce');
const log = require('fancy-log');
const gulp = require('gulp'); const gulp = require('gulp');
const gulpUtil = require('gulp-util');
const replace = require('gulp-replace'); const replace = require('gulp-replace');
const rename = require('gulp-rename'); const rename = require('gulp-rename');
const through = require('through2'); const through = require('through2');
...@@ -301,8 +301,8 @@ function generateBootScript(manifest, { usingDevServer = false } = {}) { ...@@ -301,8 +301,8 @@ function generateBootScript(manifest, { usingDevServer = false } = {}) {
defaultAssetRoot = `${defaultAssetRoot}/${version}/`; defaultAssetRoot = `${defaultAssetRoot}/${version}/`;
if (isFirstBuild) { if (isFirstBuild) {
gulpUtil.log(`Sidebar app URL: ${defaultSidebarAppUrl}`); log(`Sidebar app URL: ${defaultSidebarAppUrl}`);
gulpUtil.log(`Client asset root URL: ${defaultAssetRoot}`); log(`Client asset root URL: ${defaultAssetRoot}`);
isFirstBuild = false; isFirstBuild = false;
} }
......
...@@ -56,13 +56,13 @@ ...@@ -56,13 +56,13 @@
"exorcist": "^1.0.1", "exorcist": "^1.0.1",
"express": "^4.14.1", "express": "^4.14.1",
"extend": "^3.0.2", "extend": "^3.0.2",
"fancy-log": "^1.3.3",
"fetch-mock": "8", "fetch-mock": "8",
"focus-visible": "^5.0.0", "focus-visible": "^5.0.0",
"gulp": "^4.0.0", "gulp": "^4.0.0",
"gulp-changed": "^4.0.0", "gulp-changed": "^4.0.0",
"gulp-rename": "^2.0.0", "gulp-rename": "^2.0.0",
"gulp-replace": "^1.0.0", "gulp-replace": "^1.0.0",
"gulp-util": "^3.0.7",
"hammerjs": "^2.0.4", "hammerjs": "^2.0.4",
"jquery": "^3.2.1", "jquery": "^3.2.1",
"js-polyfills": "^0.1.16", "js-polyfills": "^0.1.16",
......
...@@ -10,15 +10,13 @@ const babelify = require('babelify'); ...@@ -10,15 +10,13 @@ const babelify = require('babelify');
const browserify = require('browserify'); const browserify = require('browserify');
const coffeeify = require('coffeeify'); const coffeeify = require('coffeeify');
const exorcist = require('exorcist'); const exorcist = require('exorcist');
const log = require('fancy-log');
const envify = require('loose-envify/custom'); const envify = require('loose-envify/custom');
const gulpUtil = require('gulp-util');
const mkdirp = require('mkdirp'); const mkdirp = require('mkdirp');
const watchify = require('watchify'); const watchify = require('watchify');
const minifyStream = require('./minify-stream'); const minifyStream = require('./minify-stream');
const log = gulpUtil.log;
function streamFinished(stream) { function streamFinished(stream) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
stream.on('finish', resolve); stream.on('finish', resolve);
......
'use strict'; 'use strict';
const fs = require('fs'); const fs = require('fs');
const gulpUtil = require('gulp-util'); const log = require('fancy-log');
const WebSocketServer = require('websocket').server; const WebSocketServer = require('websocket').server;
const urlParser = require('url'); const urlParser = require('url');
...@@ -41,7 +41,6 @@ function LiveReloadServer(port, config) { ...@@ -41,7 +41,6 @@ function LiveReloadServer(port, config) {
let connections = []; let connections = [];
function listen() { function listen() {
const log = gulpUtil.log;
const app = function(req, response) { const app = function(req, response) {
const url = urlParser.parse(req.url); const url = urlParser.parse(req.url);
let content; let content;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
const { readFileSync } = require('fs'); const { readFileSync } = require('fs');
const express = require('express'); const express = require('express');
const { log } = require('gulp-util'); const log = require('fancy-log');
const { createServer, useSsl } = require('./create-server'); const { createServer, useSsl } = require('./create-server');
const { version } = require('../../package.json'); const { version } = require('../../package.json');
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
const gulpUtil = require('gulp-util');
const log = require('fancy-log');
const request = require('request'); const request = require('request');
const through = require('through2'); const through = require('through2');
...@@ -101,14 +102,14 @@ function uploadReleaseFile(opts, project, release, file) { ...@@ -101,14 +102,14 @@ function uploadReleaseFile(opts, project, release, file) {
module.exports = function uploadToSentry(opts, projects, release) { module.exports = function uploadToSentry(opts, projects, release) {
// Create releases in every project // Create releases in every project
const releases = projects.map(function(project) { const releases = projects.map(function(project) {
gulpUtil.log(`Creating release '${release}' in project '${project}'`); log(`Creating release '${release}' in project '${project}'`);
return createRelease(opts, project, release); return createRelease(opts, project, release);
}); });
return through.obj(function(file, enc, callback) { return through.obj(function(file, enc, callback) {
Promise.all(releases) Promise.all(releases)
.then(function() { .then(function() {
gulpUtil.log(`Uploading ${path.basename(file.path)}`); log(`Uploading ${path.basename(file.path)}`);
const uploads = projects.map(function(project) { const uploads = projects.map(function(project) {
return uploadReleaseFile(opts, project, release, file); return uploadReleaseFile(opts, project, release, file);
}); });
...@@ -119,7 +120,7 @@ module.exports = function uploadToSentry(opts, projects, release) { ...@@ -119,7 +120,7 @@ module.exports = function uploadToSentry(opts, projects, release) {
callback(); callback();
}) })
.catch(function(err) { .catch(function(err) {
gulpUtil.log('Sentry upload failed: ', err); log('Sentry upload failed: ', err);
callback(err); callback(err);
}); });
}); });
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment