diff --git a/CHANGELOG.md b/CHANGELOG.md index f87521a43e..457481ee4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Unreleased +New features: + +- [#557 Bump outdated dependencies](https://github.com/alphagov/govuk-prototype-kit/pull/557): + - Update standard from 10.0.2 to 11.0.1 and fix violations + - Update run-sequence from 1.2.2 to 2.2.1 + - Update require-dir from 0.3.2 to 1.0.0 + - Update notifications-node-client from 3.0.0 to 4.1.0 + - Update marked from 0.3.6 to 0.4.0 + - Update gulp-sass from 3.1.0 to 4.0.1 + - Update gulp-mocha from v4.3.1 to v6.0.0 + - Update gulp-clean from 0.3.2 to 0.4.0 + - Update express from 4.15.2 to 4.16.3 + - Update dotenv from 4.0.0 to 6.0.0 + - Update cross-spawn from 5.0.0 to 6.0.5 + - Update basic-auth from 1.0.3 to 2.0.0 +- [#557 Remove unused readdir dependency](https://github.com/alphagov/govuk-prototype-kit/pull/557) +- [#557 Fix a broken link in an error message](https://github.com/alphagov/govuk-prototype-kit/pull/557) + Bug fixes: - [#556 Update branching example](https://github.com/alphagov/govuk-prototype-kit/pull/556) - [#536 Import missing component macros](https://github.com/alphagov/govuk_prototype_kit/pull/536) diff --git a/gulp/clean.js b/gulp/clean.js index 7d5cf1d983..6587689497 100644 --- a/gulp/clean.js +++ b/gulp/clean.js @@ -13,5 +13,5 @@ const config = require('./config.json') gulp.task('clean', function () { return gulp.src([config.paths.public + '/*', '.port.tmp'], {read: false}) - .pipe(clean()) + .pipe(clean()) }) diff --git a/gulp/copy-assets.js b/gulp/copy-assets.js index c855ea1232..aae7f58f80 100644 --- a/gulp/copy-assets.js +++ b/gulp/copy-assets.js @@ -10,11 +10,11 @@ const config = require('./config.json') gulp.task('copy-assets', function () { return gulp.src(['!' + config.paths.assets + 'sass{,/**/*}', config.paths.assets + '/**']) - .pipe(gulp.dest(config.paths.public)) + .pipe(gulp.dest(config.paths.public)) }) gulp.task('copy-documentation-assets', function () { return gulp.src(['!' + config.paths.docsAssets + 'sass{,/**/*}', config.paths.docsAssets + '/**']) - .pipe(gulp.dest(config.paths.public)) + .pipe(gulp.dest(config.paths.public)) }) diff --git a/gulp/sass.js b/gulp/sass.js index 33c2972e7e..934d3be3a5 100644 --- a/gulp/sass.js +++ b/gulp/sass.js @@ -13,16 +13,16 @@ const config = require('./config.json') gulp.task('sass', function () { return gulp.src(config.paths.assets + '/sass/*.scss') - .pipe(sourcemaps.init()) - .pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError)) - .pipe(sourcemaps.write()) - .pipe(gulp.dest(config.paths.public + '/stylesheets/')) + .pipe(sourcemaps.init()) + .pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError)) + .pipe(sourcemaps.write()) + .pipe(gulp.dest(config.paths.public + '/stylesheets/')) }) gulp.task('sass-documentation', function () { return gulp.src(config.paths.docsAssets + '/sass/*.scss') - .pipe(sourcemaps.init()) - .pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError)) - .pipe(sourcemaps.write()) - .pipe(gulp.dest(config.paths.public + '/stylesheets/')) + .pipe(sourcemaps.init()) + .pipe(sass({outputStyle: 'expanded'}).on('error', sass.logError)) + .pipe(sourcemaps.write()) + .pipe(gulp.dest(config.paths.public + '/stylesheets/')) }) diff --git a/gulp/tasks.js b/gulp/tasks.js index 49905cde6e..a912d99062 100644 --- a/gulp/tasks.js +++ b/gulp/tasks.js @@ -10,35 +10,30 @@ const runSequence = require('run-sequence') gulp.task('default', function (done) { runSequence('generate-assets', - 'watch', - 'server', done) + 'watch', + 'server', done) }) gulp.task('generate-assets', function (done) { runSequence('clean', - 'sass', - 'sass-documentation', - 'copy-assets', - 'copy-documentation-assets', done) + 'sass', + 'sass-documentation', + 'copy-assets', + 'copy-documentation-assets', done) }) gulp.task('watch', function (done) { runSequence('watch-sass', - 'watch-assets', done) + 'watch-assets', done) }) gulp.task('test', function () { runSequence('generate-assets', - 'mocha') + 'mocha') }) gulp.task('mocha', function () { return gulp.src(['test/**/*.js'], { read: false }) - .pipe(mocha({ reporter: 'spec' })) - .once('error', () => { - process.exit(1) - }) - .once('end', () => { - process.exit() - }) + .pipe(mocha({ reporter: 'spec', exit: true })) + .on('error', console.error) }) diff --git a/lib/utils.js b/lib/utils.js index 2f78e5f8ec..1eeaabb817 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -75,7 +75,7 @@ exports.basicAuth = function (username, password) { return function (req, res, next) { if (!username || !password) { console.log('Username or password is not set.') - return res.send('
Username or password not set. See guidance for setting these.
') + return res.send('Username or password not set. See guidance for setting these.
') } var user = basicAuth(req) diff --git a/package.json b/package.json index 9bbd58a868..72f7a7d21f 100644 --- a/package.json +++ b/package.json @@ -12,36 +12,35 @@ "test": "gulp test && npm run lint" }, "dependencies": { - "basic-auth": "^1.0.3", + "basic-auth": "^2.0.0", "basic-auth-connect": "^1.0.0", "body-parser": "^1.14.1", "browser-sync": "^2.11.1", "cookie-parser": "^1.4.3", - "cross-spawn": "^5.0.0", - "dotenv": "^4.0.0", - "express": "4.15.2", + "cross-spawn": "^6.0.5", + "dotenv": "^6.0.0", + "express": "4.16.3", "express-session": "^1.13.0", "express-writer": "0.0.4", "govuk-frontend": "^1.0.0", "gulp": "^3.9.1", - "gulp-clean": "^0.3.2", - "gulp-mocha": "^4.3.1", + "gulp-clean": "^0.4.0", + "gulp-mocha": "^6.0.0", "gulp-nodemon": "^2.1.0", - "gulp-sass": "3.1.0", + "gulp-sass": "^4.0.1", "gulp-sourcemaps": "^2.6.0", "gulp-util": "^3.0.7", - "marked": "^0.3.6", + "marked": "^0.4.0", "minimist": "1.2.0", - "notifications-node-client": "^3.0.0", + "notifications-node-client": "^4.1.0", "nunjucks": "^3.1.3", "portscanner": "^2.1.1", "prompt": "^1.0.0", - "readdir": "0.0.13", - "require-dir": "^0.3.0", - "run-sequence": "^1.2.2", - "standard": "^10.0.2", + "require-dir": "^1.0.0", + "run-sequence": "^2.2.1", + "standard": "^11.0.1", "supertest": "^3.0.0", - "sync-request": "^4.0.3", + "sync-request": "^6.0.0", "universal-analytics": "^0.4.16", "uuid": "^3.2.1" }, diff --git a/start.js b/start.js index cbe009c677..75093f2711 100644 --- a/start.js +++ b/start.js @@ -47,7 +47,7 @@ function checkFiles () { const envExists = fs.existsSync(path.join(__dirname, '/.env')) if (!envExists) { fs.createReadStream(path.join(__dirname, '/lib/template.env')) - .pipe(fs.createWriteStream(path.join(__dirname, '/.env'))) + .pipe(fs.createWriteStream(path.join(__dirname, '/.env'))) } } @@ -63,7 +63,7 @@ if (!sessionDataDefaultsFileExists) { } fs.createReadStream(path.join(__dirname, '/lib/template.session-data-defaults.js')) - .pipe(fs.createWriteStream(sessionDataDefaultsFile)) + .pipe(fs.createWriteStream(sessionDataDefaultsFile)) } // Run gulp