@dwp/govuk-casa 6.9.2 → 6.9.6
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.
- package/CHANGELOG.md +9 -1
- package/README.md +1 -1
- package/lib/JourneyContext.js +1 -1
- package/lib/RoadConverter.js +5 -3
- package/lib/validation/ArrayObjectField.js +1 -0
- package/lib/validation/ObjectField.js +1 -0
- package/lib/validation/SimpleField.js +1 -0
- package/lib/validation/rules/README.md +1 -1
- package/locales/cy/common.json +1 -1
- package/locales/cy/macros.json +1 -1
- package/locales/cy/review.json +1 -1
- package/locales/cy/validation.json +1 -1
- package/locales/en/common.json +1 -1
- package/locales/en/review.json +1 -1
- package/locales/en/validation.json +1 -1
- package/middleware/i18n/i18n.js +1 -0
- package/middleware/i18n/index.js +1 -0
- package/middleware/page/journey-rails.js +1 -0
- package/middleware/page/utils.js +1 -0
- package/middleware/session/expiry.js +1 -0
- package/package.json +14 -16
- package/src/browserconfig.xml +1 -1
- package/test/unit/templates/README.md +1 -1
- package/views/casa/components/date-input/README.md +1 -1
- package/views/casa/errors/403.njk +1 -1
- package/views/casa/errors/404.njk +1 -1
- package/views/casa/errors/500.njk +1 -1
- package/views/casa/partials/cookie_message.njk +1 -1
- package/views/casa/partials/phase_banner_alpha.njk +0 -0
- package/views/casa/partials/phase_banner_beta.njk +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to this project will be documented in this file. See [
|
|
3
|
+
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
### [6.9.6](https://github.com/dwp/govuk-casa/compare/6.9.5...6.9.6) (2022-12-20)
|
|
6
|
+
|
|
7
|
+
### [6.9.5](https://github.com/dwp/govuk-casa/compare/6.9.4...6.9.5) (2022-12-16)
|
|
8
|
+
|
|
9
|
+
### [6.9.4](https://github.com/dwp/govuk-casa/compare/6.9.3...6.9.4) (2022-12-15)
|
|
10
|
+
|
|
11
|
+
### [6.9.3](https://github.com/dwp/govuk-casa/compare/6.9.2...6.9.3) (2022-11-28)
|
|
4
12
|
|
|
5
13
|
### [6.9.2](https://github.com/dwp/govuk-casa/compare/6.9.1...6.9.2) (2022-11-24)
|
|
6
14
|
|
package/README.md
CHANGED
package/lib/JourneyContext.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Validation errors on that data
|
|
7
7
|
* - Navigation information about how the user got where they are.
|
|
8
8
|
*/
|
|
9
|
-
const clonedeep = require('fast-copy');
|
|
9
|
+
const clonedeep = require('fast-copy').default;
|
|
10
10
|
const { isObjectType } = require('./Util.js');
|
|
11
11
|
|
|
12
12
|
const privates = new WeakMap();
|
package/lib/RoadConverter.js
CHANGED
|
@@ -113,10 +113,12 @@ class RoadConverter {
|
|
|
113
113
|
if (sourceIndex > -1) {
|
|
114
114
|
const choices = Array(numOfChoices).fill(false);
|
|
115
115
|
choices[roadIndex] = true;
|
|
116
|
-
this.setRoute(
|
|
116
|
+
this.setRoute(
|
|
117
|
+
this.pois[sourceIndex].id,
|
|
117
118
|
road.getPOIs()[0].id,
|
|
118
|
-
(r, c) => poi.test(choices,
|
|
119
|
-
|
|
119
|
+
(r, c) => poi.test(choices, c.data),
|
|
120
|
+
null,
|
|
121
|
+
);
|
|
120
122
|
}
|
|
121
123
|
const roadAlreadyFollowed = this.roadAlreadyFollowed(road);
|
|
122
124
|
if (!roadAlreadyFollowed) {
|
package/locales/cy/common.json
CHANGED
package/locales/cy/macros.json
CHANGED
package/locales/cy/review.json
CHANGED
package/locales/en/common.json
CHANGED
package/locales/en/review.json
CHANGED
package/middleware/i18n/i18n.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* string language = The language code to use (ISO 639-1).
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
/* eslint-disable-next-line default-param-last */
|
|
18
19
|
module.exports = (logger, supportedLocales = [], translatorFactory) => (req, res, next) => {
|
|
19
20
|
const currentSessionLanguage = (req.session || Object.create(null)).language;
|
|
20
21
|
|
package/middleware/i18n/index.js
CHANGED
|
@@ -2,6 +2,7 @@ const logger = require('../../lib/Logger.js')('i18n');
|
|
|
2
2
|
|
|
3
3
|
const mwI18n = require('./i18n.js');
|
|
4
4
|
|
|
5
|
+
/* eslint-disable-next-line default-param-last */
|
|
5
6
|
module.exports = (app, supportedLocales = [], I18nUtility) => {
|
|
6
7
|
if (!Array.isArray(supportedLocales) || !supportedLocales.length) {
|
|
7
8
|
throw new TypeError('At least one supported locale is required');
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
const createLogger = require('../../lib/Logger.js');
|
|
12
12
|
const JourneyContext = require('../../lib/JourneyContext.js');
|
|
13
13
|
|
|
14
|
+
/* eslint-disable-next-line default-param-last */
|
|
14
15
|
module.exports = (mountUrl = '/', plan) => (req, res, next) => {
|
|
15
16
|
const logger = createLogger('page.journey-rails');
|
|
16
17
|
logger.setSessionId(req.session.id);
|
package/middleware/page/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dwp/govuk-casa",
|
|
3
|
-
"version": "6.9.
|
|
3
|
+
"version": "6.9.6",
|
|
4
4
|
"description": "Framework for creating basic GOVUK Collect-And-Submit-Applications",
|
|
5
5
|
"main": "casa.js",
|
|
6
6
|
"files": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"colors": "1.4.0",
|
|
35
35
|
"csurf": "1.11.0",
|
|
36
36
|
"debug": "4.3.4",
|
|
37
|
-
"fast-copy": "
|
|
37
|
+
"fast-copy": "3.0.0",
|
|
38
38
|
"fs-extra": "10.1.0",
|
|
39
39
|
"govuk-frontend": "3.14.0",
|
|
40
40
|
"govuk_template_jinja": "0.26.0",
|
|
@@ -49,11 +49,10 @@
|
|
|
49
49
|
"validator": "13.7.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@commitlint/cli": "
|
|
53
|
-
"@commitlint/config-conventional": "
|
|
54
|
-
"@commitlint
|
|
55
|
-
"@dwp/
|
|
56
|
-
"@dwp/eslint-config-base": "5.0.1",
|
|
52
|
+
"@commitlint/cli": "17.3.0",
|
|
53
|
+
"@commitlint/config-conventional": "17.3.0",
|
|
54
|
+
"@dwp/commitlint-config-base": "4.0.0",
|
|
55
|
+
"@dwp/eslint-config-base": "6.0.0",
|
|
57
56
|
"@stryker-mutator/core": "5.6.1",
|
|
58
57
|
"@stryker-mutator/html-reporter": "3.1.0",
|
|
59
58
|
"@stryker-mutator/javascript-mutator": "4.0.0",
|
|
@@ -65,22 +64,21 @@
|
|
|
65
64
|
"chai-http": "4.3.0",
|
|
66
65
|
"cheerio": "1.0.0-rc.12",
|
|
67
66
|
"conventional-changelog-cli": "2.2.2",
|
|
68
|
-
"eslint": "
|
|
69
|
-
"eslint-plugin-sonarjs": "0.
|
|
67
|
+
"eslint": "8.30.0",
|
|
68
|
+
"eslint-plugin-sonarjs": "0.17.0",
|
|
70
69
|
"express": "4.18.2",
|
|
71
70
|
"express-session": "1.17.3",
|
|
72
|
-
"husky": "7.0.4",
|
|
73
71
|
"jsdom": "19.0.0",
|
|
74
|
-
"minimatch": "5.1.
|
|
75
|
-
"mocha": "
|
|
72
|
+
"minimatch": "5.1.1",
|
|
73
|
+
"mocha": "10.2.0",
|
|
76
74
|
"nyc": "15.1.0",
|
|
77
75
|
"proxyquire": "2.1.3",
|
|
78
|
-
"sass": "1.
|
|
79
|
-
"sinon": "
|
|
76
|
+
"sass": "1.57.0",
|
|
77
|
+
"sinon": "15.0.1",
|
|
80
78
|
"sinon-chai": "3.7.0",
|
|
81
|
-
"supertest": "6.3.
|
|
79
|
+
"supertest": "6.3.3",
|
|
82
80
|
"uglify-js": "3.17.4",
|
|
83
|
-
"uuid": "
|
|
81
|
+
"uuid": "9.0.0",
|
|
84
82
|
"yargs": "17.6.2"
|
|
85
83
|
},
|
|
86
84
|
"peerDependencies": {
|
package/src/browserconfig.xml
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
## Component macros
|
|
4
4
|
|
|
5
|
-
These are mostly wrappers around the GOVUK Design System's macros, which are thoroughly tested, so our tests are relatively lightweight to ensure that the CASA customisations are applied.
|
|
5
|
+
These are mostly wrappers around the GOVUK Design System's macros, which are thoroughly tested, so our tests are relatively lightweight to ensure that the CASA customisations are applied.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
403 - Forbidden
|
|
1
|
+
403 - Forbidden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
404 - Page Not Found
|
|
1
|
+
404 - Page Not Found
|
|
@@ -1 +1 @@
|
|
|
1
|
-
500 - Internal Server Error
|
|
1
|
+
500 - Internal Server Error
|
|
File without changes
|
|
File without changes
|