Skip to content

Commit

Permalink
Merge pull request #84 from hmrc/PLATUI-450_fix_vulns
Browse files Browse the repository at this point in the history
PLATUI-450: Resolve security vulnerabilities
  • Loading branch information
matthewmascord authored Jul 1, 2020
2 parents 6eb4036 + 1ec6853 commit a2b6f59
Show file tree
Hide file tree
Showing 35 changed files with 9,975 additions and 9,660 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.16.3
12.13.1
10 changes: 10 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "stylelint-config-standard",
"plugins": [
"stylelint-scss"
],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true
}
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.14.1] - 2020-06-30

### Fixed

- Security vulnerabilities in dev dependencies

## [1.14.0] - 2020-06-19

### Fixed
Expand Down
2 changes: 0 additions & 2 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ module.exports = (options) => {

app.use('/govuk-frontend', express.static(configPaths.govukFrontend))

app.use('/docs', express.static(configPaths.sassdoc))

// serve html5-shiv from node modules
app.use('/vendor/html5-shiv/', express.static('node_modules/html5shiv/dist/'))
app.use(
Expand Down
8 changes: 0 additions & 8 deletions app/views/layouts/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,5 @@
{% endfor %}
</ul>
</div>

<div class="govuk-grid-column-one-half">
<h2 class="govuk-heading-m">Misc</h2>

<ul class="govuk-list">
<li><a href="/docs" class="govuk-link">Sass Documentation</a></li>
</ul>
</div>
</div>
{% endblock %}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion config/paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"dist": "dist/",
"package": "package/",
"public": "public/",
"sassdoc": "sassdoc/",
"src": "src/",
"components": "src/components/",
"govukFrontend": "node_modules/govuk-frontend",
Expand Down
92 changes: 30 additions & 62 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,18 @@

const paths = require('./config/paths.json')
const gulp = require('gulp')
const runsequence = require('run-sequence')
const taskArguments = require('./tasks/gulp/task-arguments')
const nodemon = require('nodemon')

// Gulp sub-tasks
require('./tasks/gulp/clean.js')
require('./tasks/gulp/lint.js')
require('./tasks/gulp/compile-assets.js')
require('./tasks/gulp/watch.js')
// new tasks
require('./tasks/gulp/copy-to-destination.js')
require('./tasks/gulp/asset-version.js')
require('./tasks/gulp/sassdoc.js')
require('./tasks/gulp/backstop.js')

// Umbrella scripts tasks for preview ---
// Runs js lint and compilation
// --------------------------------------
gulp.task('scripts', cb => {
runsequence('js:compile', cb)
})

// Umbrella styles tasks for preview ----
// Runs js lint and compilation
// --------------------------------------
gulp.task('styles', cb => {
runsequence('scss:lint', 'scss:compile', cb)
})

// Copy assets task ----------------------
// Copies assets to taskArguments.destination (public)
// --------------------------------------
Expand Down Expand Up @@ -87,62 +70,47 @@ gulp.task('copy:packageJson', (done) => {
done()
})

// All test combined --------------------
// Runs js, scss and accessibility tests
// Compile scss and js assets
// --------------------------------------
gulp.task('test', cb => {
runsequence('scss:lint', 'scss:compile', 'copy-assets', 'copy-dist-files', cb)
})
gulp.task('compile-assets', gulp.series('scss:compile', 'js:compile'))

// Copy assets task for local & heroku --
// Copies files to
// taskArguments.destination (public)
// Compile and copy assets
// --------------------------------------
gulp.task('copy-assets', cb => {
runsequence('styles', 'scripts', cb)
})
gulp.task('compile-and-copy-assets', gulp.series('compile-assets', 'copy-dist-files'))

// Dev task -----------------------------
// Runs a sequence of task on start
// --------------------------------------
gulp.task('dev', cb => {
runsequence('clean', 'copy-assets', 'copy-dist-files', 'sassdoc', 'serve', cb)
})
gulp.task('nodemon', () => nodemon({
script: 'app/start.js'
}))

// Serve task ---------------------------
// Restarts node app when there is changed
// affecting js, css or njk files
// --------------------------------------
gulp.task('serve', gulp.parallel('nodemon', 'watch'))

gulp.task('serve', ['watch'], () => {
return nodemon({
script: 'app/start.js'
})
})
// Dev task -----------------------------
// Runs a sequence of task on start
// --------------------------------------
gulp.task('dev', gulp.series('clean', 'compile-and-copy-assets', 'serve'))

// Build package task -----------------
// Prepare package folder for publishing
// -------------------------------------
gulp.task('build:package', cb => {
runsequence(
'clean',
'copy-files',
'copy-govuk-config',
'copy-check-compatibility',
'js:compile',
'copy:README',
'copy:packageJson',
cb
)
})

gulp.task('build:dist', cb => {
runsequence(
'clean',
'copy-assets',
'copy-dist-files',
'copy:assets',
'update-assets-version',
cb
)
})
gulp.task('build:package', gulp.series(
'clean',
'copy-files',
'copy-govuk-config',
'copy-check-compatibility',
'js:compile',
'copy:README',
'copy:packageJson'
))

gulp.task('build:dist', gulp.series(
'clean',
'compile-and-copy-assets',
'copy:assets',
'update-assets-version'
))

gulp.task('backstop:test', gulp.series('compile-and-copy-assets', 'backstop-test'))
1 change: 1 addition & 0 deletions lib/jest-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function render (componentName, params, children = false) {
}

const output = nunjucks.renderString(macroString)

return cheerio.load(output)
}

Expand Down
Loading

0 comments on commit a2b6f59

Please sign in to comment.