From e4c6168c7be13497b3e6973ec370140514f31c57 Mon Sep 17 00:00:00 2001 From: Rafal Proszowski Date: Thu, 11 Oct 2018 15:09:36 +0100 Subject: [PATCH 1/4] Bump the GOV.UK Frontend version --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0f7cbf3f0..6fe4d0479 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4496,9 +4496,9 @@ } }, "govuk-frontend": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-1.3.0.tgz", - "integrity": "sha512-NROJGh4wZgOSWhEzJOkcijIMR7GeFBOinG45wouVwK7ne6ihR4uyS/LQBkG/GGEkNkLZYuOG8cb+6fMVwP2W7Q==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-2.2.0.tgz", + "integrity": "sha512-vNiUIp8EQACARNTyOwmE110HcQd+zJvkgbKv+gmY28QxqQGGd2DEJ35nblnjElsRJpSgbxwa85iqlNtbR3Q5tA==" }, "graceful-fs": { "version": "4.1.11", diff --git a/package.json b/package.json index 323138ece..8c44c95de 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "express": "4.16.3", "express-pino-logger": "4.0.0", "express-static-gzip": "1.1.1", - "govuk-frontend": "^1.3.0", + "govuk-frontend": "^2.2.0", "helmet": "3.13.0", "jmespath": "0.15.0", "jsonwebtoken": "8.3.0", From a96fc48b4ad11597c25234b8db286503ec2d12a0 Mon Sep 17 00:00:00 2001 From: Rafal Proszowski Date: Thu, 11 Oct 2018 15:44:33 +0100 Subject: [PATCH 2/4] Make the select boxes full size One of the changes the new Frontend version introduces[1] is the lack of the full size select boxes by default. In order to keep up with the design as much as possible, we're adding the extra class to force these expand as they use to. [1]: https://github.com/alphagov/govuk-frontend/pull/960 --- src/components/calculator/calculator.njk | 3 +++ src/components/statements/statements.njk | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/calculator/calculator.njk b/src/components/calculator/calculator.njk index cbee56765..31cdb20e6 100644 --- a/src/components/calculator/calculator.njk +++ b/src/components/calculator/calculator.njk @@ -53,6 +53,7 @@ {{ govukSelect({ id: "service-" + serviceName + "-" + version, name: "items[" + state.items.length + "][planGUID]", + classes: "govuk-!-width-full", items: plans | map({ text: "variant", value: "planGUID" @@ -67,6 +68,7 @@ {{ govukSelect({ id: "nodes-" + serviceName + "-" + version, name: "items[" + state.items.length + "][numberOfNodes]", + classes: "govuk-!-width-full", items: [ {text: "1 Instance", value: "1"}, {text: "2 Instances", value: "2"}, @@ -84,6 +86,7 @@ {{ govukSelect({ id: "mem-" + serviceName + "-" + version, name: "items[" + state.items.length + "][memoryInMB]", + classes: "govuk-!-width-full", items: [ {text: "64 MB", value: "64"}, {text: "128 MB", value: "128"}, diff --git a/src/components/statements/statements.njk b/src/components/statements/statements.njk index 234ca65d2..6dfa7e138 100644 --- a/src/components/statements/statements.njk +++ b/src/components/statements/statements.njk @@ -42,21 +42,21 @@ - {% for rangeStart, rangeTitle in listOfPastYearMonths %} {% endfor %} - {% for space in spaces %} {% endfor %} - {% for plan in plans %} {% endfor %} From acb4967ca50c51ed3e8f06592b84f5ea840a6847 Mon Sep 17 00:00:00 2001 From: Rafal Proszowski Date: Thu, 11 Oct 2018 15:12:00 +0100 Subject: [PATCH 3/4] Run NPM audit fix --- package-lock.json | 288 ++++++++++++++++++---------------------------- package.json | 2 +- 2 files changed, 111 insertions(+), 179 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6fe4d0479..2b4aba328 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7855,12 +7855,12 @@ } }, "npm": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/npm/-/npm-6.3.0.tgz", - "integrity": "sha512-oDtLFo3wXue/xe3pU/oks9VHS5501OAWlYrZrApZkFv7l2LXk+9CfPMbjbfZWK7Jqlc1jbNcJMkB6KZC7K/vEA==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/npm/-/npm-6.4.1.tgz", + "integrity": "sha512-mXJL1NTVU136PtuopXCUQaNWuHlXCTp4McwlSW8S9/Aj8OEPAlSBgo8og7kJ01MjCDrkmqFQTvN5tTEhBMhXQg==", "dev": true, "requires": { - "JSONStream": "^1.3.3", + "JSONStream": "^1.3.4", "abbrev": "~1.1.1", "ansicolors": "~0.3.2", "ansistyles": "~0.1.3", @@ -7869,9 +7869,10 @@ "bin-links": "^1.1.2", "bluebird": "~3.5.1", "byte-size": "^4.0.3", - "cacache": "^11.1.0", + "cacache": "^11.2.0", "call-limit": "~1.1.0", "chownr": "~1.0.1", + "ci-info": "^1.4.0", "cli-columns": "^3.1.2", "cli-table3": "^0.5.0", "cmd-shim": "~2.0.2", @@ -7882,7 +7883,7 @@ "detect-newline": "^2.1.0", "dezalgo": "~1.0.3", "editor": "~1.0.0", - "figgy-pudding": "^3.2.0", + "figgy-pudding": "^3.4.1", "find-npm-prefix": "^1.0.2", "fs-vacuum": "~1.2.10", "fs-write-stream-atomic": "~1.0.10", @@ -7890,8 +7891,8 @@ "glob": "~7.1.2", "graceful-fs": "~4.1.11", "has-unicode": "~2.0.1", - "hosted-git-info": "^2.6.0", - "iferr": "^1.0.0", + "hosted-git-info": "^2.7.1", + "iferr": "^1.0.2", "imurmurhash": "*", "inflight": "~1.0.6", "inherits": "~2.0.3", @@ -7900,7 +7901,7 @@ "is-cidr": "^2.0.6", "json-parse-better-errors": "^1.0.2", "lazy-property": "~1.0.0", - "libcipm": "^2.0.0", + "libcipm": "^2.0.2", "libnpmhook": "^4.0.1", "libnpx": "^10.2.0", "lock-verify": "^2.0.2", @@ -7921,23 +7922,23 @@ "mississippi": "^3.0.0", "mkdirp": "~0.5.1", "move-concurrently": "^1.0.1", - "node-gyp": "^3.7.0", + "node-gyp": "^3.8.0", "nopt": "~4.0.1", "normalize-package-data": "~2.4.0", "npm-audit-report": "^1.3.1", "npm-cache-filename": "~1.0.2", "npm-install-checks": "~3.0.0", - "npm-lifecycle": "^2.0.3", + "npm-lifecycle": "^2.1.0", "npm-package-arg": "^6.1.0", - "npm-packlist": "~1.1.10", + "npm-packlist": "^1.1.11", "npm-pick-manifest": "^2.1.0", "npm-profile": "^3.0.2", - "npm-registry-client": "^8.5.1", + "npm-registry-client": "^8.6.0", "npm-registry-fetch": "^1.1.0", "npm-user-validate": "~1.0.0", "npmlog": "~4.1.2", "once": "~1.4.0", - "opener": "~1.4.3", + "opener": "^1.5.0", "osenv": "^0.1.5", "pacote": "^8.1.6", "path-is-inside": "~1.0.2", @@ -7952,7 +7953,7 @@ "read-package-tree": "^5.2.1", "readable-stream": "^2.3.6", "readdir-scoped-modules": "*", - "request": "^2.81.0", + "request": "^2.88.0", "retry": "^0.12.0", "rimraf": "~2.6.2", "safe-buffer": "^5.1.2", @@ -7963,7 +7964,7 @@ "sorted-union-stream": "~2.1.3", "ssri": "^6.0.0", "stringify-package": "^1.0.0", - "tar": "^4.4.4", + "tar": "^4.4.6", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "uid-number": "0.0.6", @@ -7972,7 +7973,7 @@ "unpipe": "~1.0.0", "update-notifier": "^2.5.0", "uuid": "^3.3.2", - "validate-npm-package-license": "^3.0.3", + "validate-npm-package-license": "^3.0.4", "validate-npm-package-name": "~3.0.0", "which": "^1.3.1", "worker-farm": "^1.6.0", @@ -7980,7 +7981,7 @@ }, "dependencies": { "JSONStream": { - "version": "1.3.3", + "version": "1.3.4", "bundled": true, "dev": true, "requires": { @@ -8009,6 +8010,17 @@ "humanize-ms": "^1.2.1" } }, + "ajv": { + "version": "5.5.2", + "bundled": true, + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, "ansi-align": { "version": "2.0.0", "bundled": true, @@ -8065,12 +8077,15 @@ "dev": true }, "asn1": { - "version": "0.2.3", + "version": "0.2.4", "bundled": true, - "dev": true + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } }, "assert-plus": { - "version": "0.2.0", + "version": "1.0.0", "bundled": true, "dev": true }, @@ -8080,12 +8095,12 @@ "dev": true }, "aws-sign2": { - "version": "0.6.0", + "version": "0.7.0", "bundled": true, "dev": true }, "aws4": { - "version": "1.7.0", + "version": "1.8.0", "bundled": true, "dev": true }, @@ -8128,14 +8143,6 @@ "bundled": true, "dev": true }, - "boom": { - "version": "2.10.1", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, "boxen": { "version": "1.3.0", "bundled": true, @@ -8185,7 +8192,7 @@ "dev": true }, "cacache": { - "version": "11.1.0", + "version": "11.2.0", "bundled": true, "dev": true, "requires": { @@ -8241,7 +8248,7 @@ "dev": true }, "ci-info": { - "version": "1.1.3", + "version": "1.4.0", "bundled": true, "dev": true }, @@ -8340,7 +8347,7 @@ "dev": true }, "colors": { - "version": "1.3.0", + "version": "1.1.2", "bundled": true, "dev": true, "optional": true @@ -8448,14 +8455,6 @@ "which": "^1.2.9" } }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.x.x" - } - }, "crypto-random-string": { "version": "1.0.0", "bundled": true, @@ -8472,13 +8471,6 @@ "dev": true, "requires": { "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true - } } }, "debug": { @@ -8583,12 +8575,13 @@ } }, "ecc-jsbn": { - "version": "0.1.1", + "version": "0.1.2", "bundled": true, "dev": true, "optional": true, "requires": { - "jsbn": "~0.1.0" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "editor": { @@ -8658,7 +8651,7 @@ } }, "extend": { - "version": "3.0.1", + "version": "3.0.2", "bundled": true, "dev": true }, @@ -8667,8 +8660,18 @@ "bundled": true, "dev": true }, + "fast-deep-equal": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, "figgy-pudding": { - "version": "3.2.0", + "version": "3.4.1", "bundled": true, "dev": true }, @@ -8700,12 +8703,12 @@ "dev": true }, "form-data": { - "version": "2.1.4", + "version": "2.3.2", "bundled": true, "dev": true, "requires": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", + "combined-stream": "1.0.6", "mime-types": "^2.1.12" } }, @@ -8840,13 +8843,6 @@ "dev": true, "requires": { "assert-plus": "^1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true - } } }, "glob": { @@ -8894,28 +8890,17 @@ "dev": true }, "har-schema": { - "version": "1.0.5", + "version": "2.0.0", "bundled": true, "dev": true }, "har-validator": { - "version": "4.2.1", + "version": "5.1.0", "bundled": true, "dev": true, "requires": { - "ajv": "^4.9.1", - "har-schema": "^1.0.5" - }, - "dependencies": { - "ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "requires": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - } + "ajv": "^5.3.0", + "har-schema": "^2.0.0" } }, "has-flag": { @@ -8928,24 +8913,8 @@ "bundled": true, "dev": true }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "dev": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true, - "dev": true - }, "hosted-git-info": { - "version": "2.6.0", + "version": "2.7.1", "bundled": true, "dev": true }, @@ -8964,11 +8933,11 @@ } }, "http-signature": { - "version": "1.1.1", + "version": "1.2.0", "bundled": true, "dev": true, "requires": { - "assert-plus": "^0.2.0", + "assert-plus": "^1.0.0", "jsprim": "^1.2.2", "sshpk": "^1.7.0" } @@ -8999,7 +8968,7 @@ } }, "iferr": { - "version": "1.0.0", + "version": "1.0.2", "bundled": true, "dev": true }, @@ -9180,24 +9149,16 @@ "bundled": true, "dev": true }, - "json-stable-stringify": { - "version": "1.0.1", + "json-schema-traverse": { + "version": "0.3.1", "bundled": true, - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } + "dev": true }, "json-stringify-safe": { "version": "5.0.1", "bundled": true, "dev": true }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "dev": true - }, "jsonparse": { "version": "1.3.1", "bundled": true, @@ -9212,13 +9173,6 @@ "extsprintf": "1.3.0", "json-schema": "0.2.3", "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true - } } }, "latest-version": { @@ -9243,7 +9197,7 @@ } }, "libcipm": { - "version": "2.0.0", + "version": "2.0.2", "bundled": true, "dev": true, "requires": { @@ -9252,6 +9206,7 @@ "find-npm-prefix": "^1.0.2", "graceful-fs": "^4.1.11", "lock-verify": "^2.0.2", + "mkdirp": "^0.5.1", "npm-lifecycle": "^2.0.3", "npm-logical-tree": "^1.2.1", "npm-package-arg": "^6.1.0", @@ -9452,16 +9407,16 @@ } }, "mime-db": { - "version": "1.33.0", + "version": "1.35.0", "bundled": true, "dev": true }, "mime-types": { - "version": "2.1.18", + "version": "2.1.19", "bundled": true, "dev": true, "requires": { - "mime-db": "~1.33.0" + "mime-db": "~1.35.0" } }, "mimic-fn": { @@ -9565,7 +9520,7 @@ } }, "node-gyp": { - "version": "3.7.0", + "version": "3.8.0", "bundled": true, "dev": true, "requires": { @@ -9576,7 +9531,7 @@ "nopt": "2 || 3", "npmlog": "0 || 1 || 2 || 3 || 4", "osenv": "0", - "request": ">=2.9.0 <2.82.0", + "request": "^2.87.0", "rimraf": "2", "semver": "~5.3.0", "tar": "^2.0.0", @@ -9638,7 +9593,7 @@ } }, "npm-bundled": { - "version": "1.0.3", + "version": "1.0.5", "bundled": true, "dev": true }, @@ -9656,18 +9611,18 @@ } }, "npm-lifecycle": { - "version": "2.0.3", + "version": "2.1.0", "bundled": true, "dev": true, "requires": { "byline": "^5.0.0", "graceful-fs": "^4.1.11", - "node-gyp": "^3.6.2", + "node-gyp": "^3.8.0", "resolve-from": "^4.0.0", "slide": "^1.1.6", "uid-number": "0.0.6", "umask": "^1.1.0", - "which": "^1.3.0" + "which": "^1.3.1" } }, "npm-logical-tree": { @@ -9687,7 +9642,7 @@ } }, "npm-packlist": { - "version": "1.1.10", + "version": "1.1.11", "bundled": true, "dev": true, "requires": { @@ -9714,7 +9669,7 @@ } }, "npm-registry-client": { - "version": "8.5.1", + "version": "8.6.0", "bundled": true, "dev": true, "requires": { @@ -9894,7 +9849,7 @@ "dev": true }, "oauth-sign": { - "version": "0.8.2", + "version": "0.9.0", "bundled": true, "dev": true }, @@ -9912,7 +9867,7 @@ } }, "opener": { - "version": "1.4.3", + "version": "1.5.0", "bundled": true, "dev": true }, @@ -10045,7 +10000,7 @@ "dev": true }, "performance-now": { - "version": "0.2.0", + "version": "2.1.0", "bundled": true, "dev": true }, @@ -10116,6 +10071,11 @@ "bundled": true, "dev": true }, + "psl": { + "version": "1.1.29", + "bundled": true, + "dev": true + }, "pump": { "version": "3.0.0", "bundled": true, @@ -10157,7 +10117,7 @@ "dev": true }, "qs": { - "version": "6.4.0", + "version": "6.5.2", "bundled": true, "dev": true }, @@ -10290,32 +10250,30 @@ } }, "request": { - "version": "2.81.0", + "version": "2.88.0", "bundled": true, "dev": true, "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~4.2.1", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "performance-now": "^0.2.0", - "qs": "~6.4.0", - "safe-buffer": "^5.0.1", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", - "uuid": "^3.0.0" + "uuid": "^3.3.2" } }, "require-directory": { @@ -10424,14 +10382,6 @@ "bundled": true, "dev": true }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, "socks": { "version": "2.2.0", "bundled": true, @@ -10538,13 +10488,6 @@ "jsbn": "~0.1.0", "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true - } } }, "ssri": { @@ -10622,11 +10565,6 @@ "bundled": true, "dev": true }, - "stringstream": { - "version": "0.0.6", - "bundled": true, - "dev": true - }, "strip-ansi": { "version": "3.0.1", "bundled": true, @@ -10654,7 +10592,7 @@ } }, "tar": { - "version": "4.4.4", + "version": "4.4.6", "bundled": true, "dev": true, "requires": { @@ -10712,10 +10650,11 @@ "dev": true }, "tough-cookie": { - "version": "2.3.4", + "version": "2.4.3", "bundled": true, "dev": true, "requires": { + "psl": "^1.1.24", "punycode": "^1.4.1" } }, @@ -10823,7 +10762,7 @@ "dev": true }, "validate-npm-package-license": { - "version": "3.0.3", + "version": "3.0.4", "bundled": true, "dev": true, "requires": { @@ -10847,13 +10786,6 @@ "assert-plus": "^1.0.0", "core-util-is": "1.0.2", "extsprintf": "^1.2.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true - } } }, "wcwidth": { diff --git a/package.json b/package.json index 8c44c95de..ef5a222ba 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "nock": "9.6.1", "node-sass": "^4.9.3", "nodemon-webpack-plugin": "^4.0.3", - "npm": "^6.3.0", + "npm": "^6.4.1", "nyc": "12.0.2", "postcss-loader": "3.0.0", "postcss-url": "8.0.0", From a152640e663d776eee37301653a2a144adcd0017 Mon Sep 17 00:00:00 2001 From: Rafal Proszowski Date: Thu, 11 Oct 2018 15:29:28 +0100 Subject: [PATCH 4/4] Revert "Fix contrast issue" This reverts commit 6a007a7c272b9d0eb97151b89d6267b2c284cf17. The issue in question has been beautifully handled by the Design System Team[1] and no longer needs to exist in our codebase. Going back to the standard GOV.UK Frontend for consistency and easier upgrades. [1]: https://github.com/alphagov/govuk-frontend/pull/982 --- src/layouts/_contrast-fix.scss | 22 ---------------------- src/layouts/govuk.screen.scss | 2 -- 2 files changed, 24 deletions(-) delete mode 100644 src/layouts/_contrast-fix.scss diff --git a/src/layouts/_contrast-fix.scss b/src/layouts/_contrast-fix.scss deleted file mode 100644 index 232b2f840..000000000 --- a/src/layouts/_contrast-fix.scss +++ /dev/null @@ -1,22 +0,0 @@ -// There is an issue, where all elements provided by the govuk-frontend will -// have a yellow background set on :focus. It's particularly affecting links, -// buttons and summary boxes. These elements also have a blue text in them, -// which could cause difficulty to our users when it comes to reading the -// content. It means we don't meet the required WCAG 2 AA standard [1]. - -// Design system team thinks the roll out may take a long time, due to the -// nature of it being used in the wide government and have no issues with -// us overriding it with the provided black colour. - -// This is only a temporary solution and should be reverted back once the -// issue upstream is resolved. [2] - -// [1]: https://snook.ca/technical/colour_contrast/colour.html#fg=005EA5,bg=FFBF47 -// [2]: https://github.com/alphagov/govuk-frontend/issues/944 -$darkBlue: #003A66; - -:focus { - &, &:hover, &:link, &:visited, &:active { - color: $darkBlue; - } -} diff --git a/src/layouts/govuk.screen.scss b/src/layouts/govuk.screen.scss index 79c64f86d..71c37fd22 100644 --- a/src/layouts/govuk.screen.scss +++ b/src/layouts/govuk.screen.scss @@ -19,8 +19,6 @@ $govuk-global-styles: true; @import '../components/statements/statements'; -@import './contrast-fix'; - .text-right { text-align: right; }