@dwp/govuk-casa 6.9.0 → 6.9.5

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 CHANGED
@@ -1,3 +1,17 @@
1
+ # Changelog
2
+
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.5](https://github.com/dwp/govuk-casa/compare/6.9.4...6.9.5) (2022-12-16)
6
+
7
+ ### [6.9.4](https://github.com/dwp/govuk-casa/compare/6.9.3...6.9.4) (2022-12-15)
8
+
9
+ ### [6.9.3](https://github.com/dwp/govuk-casa/compare/6.9.2...6.9.3) (2022-11-28)
10
+
11
+ ### [6.9.2](https://github.com/dwp/govuk-casa/compare/6.9.1...6.9.2) (2022-11-24)
12
+
13
+ ### [6.9.1](https://github.com/dwp/govuk-casa/compare/6.9.0...6.9.1) (2022-11-23)
14
+
1
15
  # [6.9.0](https://github.com/dwp/govuk-casa/compare/6.8.6...6.9.0) (2022-04-08)
2
16
 
3
17
 
@@ -584,6 +598,3 @@ Signed-off-by: james.gauld <james.gauld@engineering.digital.dwp.gov.uk>
584
598
 
585
599
  <a name="2.1.1"></a>
586
600
  ## 2.1.1 (2018-10-27)
587
-
588
-
589
-
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # CASA
1
+ # CASA
2
2
 
3
3
  [![Build Status](https://travis-ci.org/dwp/govuk-casa.svg?branch=master)](https://travis-ci.org/dwp/govuk-casa)
4
4
 
@@ -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();
@@ -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(this.pois[sourceIndex].id,
116
+ this.setRoute(
117
+ this.pois[sourceIndex].id,
117
118
  road.getPOIs()[0].id,
118
- (r, c) => poi.test(choices,
119
- c.data), null);
119
+ (r, c) => poi.test(choices, c.data),
120
+ null,
121
+ );
120
122
  }
121
123
  const roadAlreadyFollowed = this.roadAlreadyFollowed(road);
122
124
  if (!roadAlreadyFollowed) {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable default-param-last */
1
2
  /**
2
3
  * An array of objects field. This is identical to the `typeObjectField`
3
4
  * function, but the data against which it is tested is expected to be an array
@@ -1,3 +1,4 @@
1
+ /* eslint-disable default-param-last */
1
2
  /**
2
3
  * An object field. The defined `obj` is an object of fieldName:Field mappings.
3
4
  * For example:
@@ -1,3 +1,4 @@
1
+ /* eslint-disable default-param-last */
1
2
  /**
2
3
  * A simple field.
3
4
  *
@@ -1,3 +1,3 @@
1
1
  # Validation Rules
2
2
 
3
- All core **CASA** rules are provided here.
3
+ All core **CASA** rules are provided here.
@@ -20,4 +20,4 @@
20
20
  }
21
21
  }
22
22
  }
23
- }
23
+ }
@@ -13,4 +13,4 @@
13
13
  "address4": "Sir",
14
14
  "postcode": "Cod post"
15
15
  }
16
- }
16
+ }
@@ -5,4 +5,4 @@
5
5
  "containsErrors": "Mae'r dudalen hon yn cynnwys gwallau",
6
6
  "changeLink": "Newid"
7
7
  }
8
- }
8
+ }
@@ -68,4 +68,4 @@
68
68
  }
69
69
  }
70
70
  }
71
- }
71
+ }
@@ -20,4 +20,4 @@
20
20
  }
21
21
  }
22
22
  }
23
- }
23
+ }
@@ -5,4 +5,4 @@
5
5
  "containsErrors": "This page contains errors",
6
6
  "changeLink": "Change"
7
7
  }
8
- }
8
+ }
@@ -68,4 +68,4 @@
68
68
  }
69
69
  }
70
70
  }
71
- }
71
+ }
@@ -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
 
@@ -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);
@@ -1,3 +1,4 @@
1
+ /* eslint-disable default-param-last */
1
2
  const { isObjectWithKeys, isObjectType, normalizeHtmlObjectPath } = require('../../lib/Util.js');
2
3
  const JourneyContext = require('../../lib/JourneyContext.js');
3
4
 
@@ -1,3 +1,4 @@
1
+ /* eslint-disable default-param-last */
1
2
  // If the store session has expired, clean up and let the user know. It's
2
3
  // important to clear the cookie, using the same options that were used when
3
4
  // the cookie was created by expressSession above - see
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dwp/govuk-casa",
3
- "version": "6.9.0",
3
+ "version": "6.9.5",
4
4
  "description": "Framework for creating basic GOVUK Collect-And-Submit-Applications",
5
5
  "main": "casa.js",
6
6
  "files": [
@@ -22,25 +22,26 @@
22
22
  "!/test/unit/testdata/**/*"
23
23
  ],
24
24
  "engines": {
25
- "node": ">=12.0.0 <15.0.0"
25
+ "node": "^12.0.0 || ^14.0.0",
26
+ "npm": "^6.0.0"
26
27
  },
27
28
  "repository": {
28
29
  "type": "git",
29
30
  "url": "git@github.com:dwp/govuk-casa.git"
30
31
  },
31
32
  "dependencies": {
32
- "body-parser": "1.20.0",
33
+ "body-parser": "1.20.1",
33
34
  "colors": "1.4.0",
34
35
  "csurf": "1.11.0",
35
36
  "debug": "4.3.4",
36
- "fast-copy": "2.1.2",
37
- "fs-extra": "10.0.1",
37
+ "fast-copy": "3.0.0",
38
+ "fs-extra": "10.1.0",
38
39
  "govuk-frontend": "3.14.0",
39
40
  "govuk_template_jinja": "0.26.0",
40
41
  "graphlib": "2.1.8",
41
42
  "klaw-sync": "6.0.0",
42
43
  "lodash.merge": "4.6.2",
43
- "moment": "2.29.2",
44
+ "moment": "2.29.4",
44
45
  "nunjucks": "3.2.3",
45
46
  "object-resolve-path": "1.1.1",
46
47
  "serve-favicon": "2.5.0",
@@ -48,43 +49,41 @@
48
49
  "validator": "13.7.0"
49
50
  },
50
51
  "devDependencies": {
51
- "@commitlint/cli": "16.2.3",
52
- "@commitlint/config-conventional": "16.2.1",
53
- "@commitlint/travis-cli": "16.2.3",
54
- "@dwp/commitlint-config-base": "1.2.0",
55
- "@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",
56
56
  "@stryker-mutator/core": "5.6.1",
57
57
  "@stryker-mutator/html-reporter": "3.1.0",
58
58
  "@stryker-mutator/javascript-mutator": "4.0.0",
59
59
  "@stryker-mutator/mocha-framework": "4.0.0",
60
60
  "@stryker-mutator/mocha-runner": "5.6.1",
61
- "autocannon": "7.8.1",
62
- "chai": "4.3.6",
61
+ "autocannon": "7.10.0",
62
+ "chai": "4.3.7",
63
63
  "chai-as-promised": "7.1.1",
64
64
  "chai-http": "4.3.0",
65
- "cheerio": "1.0.0-rc.10",
65
+ "cheerio": "1.0.0-rc.12",
66
66
  "conventional-changelog-cli": "2.2.2",
67
- "eslint": "7.32.0",
68
- "eslint-plugin-sonarjs": "0.13.0",
69
- "express": "4.17.3",
70
- "express-session": "1.17.2",
71
- "husky": "7.0.4",
67
+ "eslint": "8.29.0",
68
+ "eslint-plugin-sonarjs": "0.17.0",
69
+ "express": "4.18.2",
70
+ "express-session": "1.17.3",
72
71
  "jsdom": "19.0.0",
73
- "minimatch": "5.0.1",
74
- "mocha": "9.2.2",
72
+ "minimatch": "5.1.1",
73
+ "mocha": "10.2.0",
75
74
  "nyc": "15.1.0",
76
75
  "proxyquire": "2.1.3",
77
- "sass": "1.50.0",
78
- "sinon": "13.0.1",
76
+ "sass": "1.56.2",
77
+ "sinon": "15.0.0",
79
78
  "sinon-chai": "3.7.0",
80
- "supertest": "6.2.2",
81
- "uglify-js": "3.15.3",
82
- "uuid": "8.3.2",
83
- "yargs": "17.4.0"
79
+ "supertest": "6.3.3",
80
+ "uglify-js": "3.17.4",
81
+ "uuid": "9.0.0",
82
+ "yargs": "17.6.2"
84
83
  },
85
84
  "peerDependencies": {
86
- "express": "4.x",
87
- "express-session": "1.x"
85
+ "express": "4.18.2",
86
+ "express-session": "1.17.3"
88
87
  },
89
88
  "scripts": {
90
89
  "pipeline": "npm test && npm run compliance && npm run quality && npm run security:vulnerable-packages && (npm outdated || true)",
@@ -2,4 +2,4 @@
2
2
  <browserconfig>
3
3
  <msapplication>
4
4
  </msapplication>
5
- </browserconfig>
5
+ </browserconfig>
@@ -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.
@@ -99,4 +99,4 @@ You can also pass a locale:
99
99
  ```
100
100
  ```
101
101
  1 Ionawr 1980
102
- ```
102
+ ```
@@ -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
@@ -1,3 +1,3 @@
1
1
  <p>
2
2
  <!-- Override this template to set your own cookie message -->
3
- </p>
3
+ </p>
File without changes
File without changes