hof 20.3.11 → 20.4.0-beta-new-crown

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/.nyc_output/594bd7df-0d9b-4e59-9b57-90c46c8350ec.json +1 -0
  2. package/.nyc_output/processinfo/594bd7df-0d9b-4e59-9b57-90c46c8350ec.json +1 -0
  3. package/.nyc_output/processinfo/index.json +1 -1
  4. package/.vscode/settings.json +6 -0
  5. package/components/date/templates/date.html +1 -1
  6. package/config/hof-defaults.js +10 -5
  7. package/frontend/govuk-template/build/govuk_template.html +20 -22
  8. package/frontend/govuk-template/govuk_template_generated.html +21 -23
  9. package/frontend/template-mixins/partials/forms/checkbox-group.html +1 -1
  10. package/frontend/template-mixins/partials/forms/option-group.html +1 -1
  11. package/frontend/template-mixins/partials/forms/textarea-group.html +3 -1
  12. package/frontend/template-partials/views/layout.html +1 -1
  13. package/frontend/template-partials/views/partials/cookie-banner.html +2 -2
  14. package/frontend/template-partials/views/partials/gatag.html +0 -1
  15. package/frontend/template-partials/views/partials/head.html +23 -0
  16. package/lib/ga-tag.js +33 -7
  17. package/lib/health.js +1 -1
  18. package/lib/sessions.js +0 -2
  19. package/middleware/cookies.js +2 -0
  20. package/middleware/rate-limiter.js +1 -3
  21. package/package.json +6 -6
  22. package/sandbox/.env +1 -0
  23. package/sandbox/apps/sandbox/fields.js +0 -6
  24. package/sandbox/apps/sandbox/translations/src/en/fields.json +5 -5
  25. package/sandbox/apps/sandbox/translations/src/en/pages.json +1 -1
  26. package/sandbox/config.js +1 -2
  27. package/sandbox/public/css/app.css +10 -0
  28. package/sandbox/server.js +1 -4
  29. package/sandbox/yarn.lock +3 -3
  30. package/.nyc_output/b924df42-9cb6-4618-9a07-4f58f67ae28a.json +0 -1
  31. package/.nyc_output/processinfo/b924df42-9cb6-4618-9a07-4f58f67ae28a.json +0 -1
  32. package/sandbox/dump.rdb +0 -0
@@ -25,11 +25,9 @@ module.exports = (options, rateLimitType) => {
25
25
  }
26
26
 
27
27
  const closeConnection = async err => {
28
- await redisClient.v4.QUIT();
28
+ await redisClient.quit();
29
29
  return next(err);
30
30
  };
31
- redisClient.on('error', err => logger.log('error', err));
32
- await redisClient.connect();
33
31
 
34
32
  try {
35
33
  // fetch records of current user using IP address, returns null when no record is found
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "20.3.11",
4
+ "version": "20.4.0-beta-new-crown",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",
@@ -57,7 +57,7 @@
57
57
  "findup": "^0.1.5",
58
58
  "glob": "^7.2.0",
59
59
  "govuk-elements-sass": "^3.1.3",
60
- "govuk-frontend": "3.14",
60
+ "govuk-frontend": "3.15",
61
61
  "govuk_template_mustache": "^0.26.0",
62
62
  "helmet": "^3.22.0",
63
63
  "hogan-express-strict": "^0.5.4",
@@ -80,7 +80,7 @@
80
80
  "nodemailer-smtp-transport": "^2.7.4",
81
81
  "nodemailer-stub-transport": "^1.1.0",
82
82
  "notifications-node-client": "^6.0.0",
83
- "redis": "^4.6.6",
83
+ "redis": "^3.1.2",
84
84
  "reqres": "^3.0.1",
85
85
  "request": "^2.79.0",
86
86
  "rimraf": "^3.0.2",
@@ -96,6 +96,7 @@
96
96
  "@cucumber/cucumber": "^7.3.0",
97
97
  "@cucumber/pretty-formatter": "^1.0.0-alpha.1",
98
98
  "@types/jest": "^26.0.14",
99
+ "@xmldom/xmldom": "~0.8.4",
99
100
  "chai": "^3.5.0",
100
101
  "chai-as-promised": "^7.1.1",
101
102
  "chai-subset": "^1.6.0",
@@ -122,14 +123,13 @@
122
123
  "playwright": "^1.16.3",
123
124
  "postcode": "0.2.2",
124
125
  "proxyquire": "^1.7.11",
125
- "release-it": "^14.10.0",
126
+ "release-it": "^16.2.1",
126
127
  "sinon": "^11.1.1",
127
128
  "sinon-chai": "^3.7.0",
128
129
  "supertest": "^3.0.0",
129
130
  "travis-conditions": "0.0.0",
130
131
  "watchify": "^4.0.0",
131
- "webdriverio": "^4.14.4",
132
- "xmldom": "^0.6.0"
132
+ "webdriverio": "^4.14.4"
133
133
  },
134
134
  "mocha": {
135
135
  "reporter": "spec",
package/sandbox/.env ADDED
@@ -0,0 +1 @@
1
+ // GA_TAG=UA-215558609-1
@@ -16,9 +16,6 @@ module.exports = {
16
16
  },
17
17
  name: {
18
18
  validate: ['required', 'notUrl', { type: 'maxlength', arguments: 200 }],
19
- // need to remove this for the heading to go
20
- labelClassName: ['govuk-label--l'],
21
- isPageHeading: 'true'
22
19
  },
23
20
  'dateOfBirth': dateComponent('dateOfBirth', {
24
21
  mixin: 'input-date',
@@ -70,8 +67,6 @@ module.exports = {
70
67
  ]
71
68
  },
72
69
  email: {
73
- isPageHeading: 'true',
74
- labelClassName: ['govuk-label--l'],
75
70
  validate: ['required', 'email']
76
71
  },
77
72
  phone: {
@@ -114,7 +109,6 @@ module.exports = {
114
109
  // apply the other default formatters
115
110
  formatter: ['trim', 'hyphens'],
116
111
  isPageHeading: 'true',
117
- labelClassName: ['govuk-label--l'],
118
112
  // attributes here are passed to the field element
119
113
  validate: ['required', { type: 'maxword', arguments: 10 }],
120
114
  attributes: [{
@@ -18,7 +18,7 @@
18
18
  "label": "Full name"
19
19
  },
20
20
  "dateOfBirth": {
21
- "legend": "Date of birth",
21
+ "legend": "What is your date of birth?",
22
22
  "hint": "For example, 31 10 1990"
23
23
  },
24
24
  "building": {
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "townOrCity": {
31
31
  "label": "Town or city"
32
- },
33
- "postcode": {
32
+ },
33
+ "postcode": {
34
34
  "label": "Postcode"
35
35
  },
36
36
  "incomeTypes" : {
@@ -66,8 +66,8 @@
66
66
  },
67
67
  "northernIreland": {
68
68
  "label": "Northern Ireland"
69
- }
70
- }
69
+ }
70
+ }
71
71
  },
72
72
  "email" : {
73
73
  "label": "Email address"
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "confirmation": {
52
52
  "title": "Application sent",
53
- "alert": "Application sent",
53
+ "alert": "Application sent",
54
54
  "subheader": "What happens next",
55
55
  "content": "We’ll contact you with the decision of your application or if we need more information from you."
56
56
  }
package/sandbox/config.js CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  /* eslint no-process-env: 0 */
4
4
  module.exports = {
5
- port: 8082,
6
5
  email: {
7
6
  caseworker: process.env.CASEWORKER_EMAIL || '',
8
7
  from: process.env.FROM_ADDRESS || '',
@@ -13,6 +12,6 @@ module.exports = {
13
12
  region: process.env.EMAIL_REGION || ''
14
13
  },
15
14
  hosts: {
16
- acceptanceTests: process.env.ACCEPTANCE_HOST_NAME || `http://localhost:${process.env.PORT || 8082}`
15
+ acceptanceTests: process.env.ACCEPTANCE_HOST_NAME || `http://localhost:${process.env.PORT || 8080}`
17
16
  }
18
17
  };
@@ -5627,6 +5627,11 @@ input[type=number] {
5627
5627
  vertical-align: top;
5628
5628
  }
5629
5629
 
5630
+ .govuk-header__logotype-crown[width="32"] {
5631
+ top: -3px;
5632
+ margin-right: 2px;
5633
+ }
5634
+
5630
5635
  .govuk-header__logotype-crown-fallback-image {
5631
5636
  width: 36px;
5632
5637
  height: 32px;
@@ -5634,6 +5639,11 @@ input[type=number] {
5634
5639
  vertical-align: bottom;
5635
5640
  }
5636
5641
 
5642
+ .govuk-header__logotype-crown-fallback-image[width="32"] {
5643
+ width: 32px;
5644
+ height: 30px;
5645
+ }
5646
+
5637
5647
  .govuk-header__product-name {
5638
5648
  font-family: "GDS Transport", arial, sans-serif;
5639
5649
  -webkit-font-smoothing: antialiased;
package/sandbox/server.js CHANGED
@@ -2,7 +2,6 @@
2
2
  'use strict';
3
3
 
4
4
  const bootstrap = require('../');
5
- const config = require('./config')
6
5
 
7
6
  bootstrap({
8
7
  translations: './apps/sandbox/translations',
@@ -15,7 +14,5 @@ bootstrap({
15
14
  }
16
15
  },
17
16
  getAccessibility: true,
18
- "port": config.port
17
+ "port": 8082
19
18
  });
20
-
21
- console.log(`Running on port ${config.port}`);
package/sandbox/yarn.lock CHANGED
@@ -202,9 +202,9 @@ sass@^1.53.0:
202
202
  source-map-js ">=0.6.2 <2.0.0"
203
203
 
204
204
  semver@^5.7.1:
205
- version "5.7.1"
206
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
207
- integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
205
+ version "5.7.2"
206
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
207
+ integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
208
208
 
209
209
  semver@~7.0.0:
210
210
  version "7.0.0"