hmpo-form-wizard 12.0.0 → 12.0.3

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.
@@ -0,0 +1,27 @@
1
+ name: Node.js CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ matrix:
16
+ node-version: [12.x, 14.x, 15.x]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - name: Use Node.js ${{ matrix.node-version }}
21
+ uses: actions/setup-node@v2
22
+ with:
23
+ node-version: ${{ matrix.node-version }}
24
+ - name: Install dependencies
25
+ run: npm ci
26
+ - name: Run tests
27
+ run: npm test
package/README.md CHANGED
@@ -172,14 +172,14 @@ The next step for each step can be a relative path, an external URL, or an array
172
172
  // next can be an array of conditions
173
173
  next: [
174
174
  // field, op and value. op defaults to '==='
175
- { field: 'field1', op: '===', 'foobar', next: 'conditional-next' },
175
+ { field: 'field1', op: '===', value: 'foobar', next: 'conditional-next' },
176
176
 
177
177
  // an operator can be a function
178
178
  { field: 'field1', op: (fieldValue, req, res, con) => fieldValue === con.value, value: true, next: 'next-step' },
179
179
 
180
180
  // next can be an array of conditions
181
181
  { field: 'field1', value: 'boobaz', next: [
182
- { field: 'field2', op: '=', 'foobar', next: 'sub-condition-next' },
182
+ { field: 'field2', op: '=', value: 'foobar', next: 'sub-condition-next' },
183
183
  'sub-condition-default-next'
184
184
  ] },
185
185
 
@@ -235,7 +235,7 @@ module.exports = CustomController
235
235
  Examples of custom controllers can be found in the [example app](./example/controllers)
236
236
 
237
237
  ## Controller lifecycle
238
- These controllers can be overridden in a custom controller to provide additional behaviour to a standard controller.
238
+ These controllers can be overridden in a custom controller to provide additional behaviour to a standard controller.
239
239
 
240
240
  [This diagram](https://github.com/UKHomeOffice/passports-form-wizard/wiki/HMPO%20Forms%20Flow.pdf) shows the interaction and sequence of these lifecycle events.
241
241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hmpo-form-wizard",
3
- "version": "12.0.0",
3
+ "version": "12.0.3",
4
4
  "description": "Routing and request handling for a multi-step form processes",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,27 +23,27 @@
23
23
  },
24
24
  "homepage": "https://github.com/UKHomeOffice/passports-form-wizard",
25
25
  "dependencies": {
26
- "body-parser": "^1.19.0",
26
+ "body-parser": "^1.20.0",
27
27
  "csrf": "^3.1.0",
28
- "debug": "^4.3.3",
29
- "deep-clone-merge": "^1.5.3",
30
- "hmpo-model": "^4.0.1",
31
- "json5": "^2.2.0",
32
- "moment": "^2.29.1",
33
- "underscore": "^1.13.1"
28
+ "debug": "^4.3.4",
29
+ "deep-clone-merge": "^1.5.4",
30
+ "hmpo-model": "^4.1.1",
31
+ "json5": "^2.2.1",
32
+ "moment": "^2.29.2",
33
+ "underscore": "^1.13.2"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "express": ">=4"
37
37
  },
38
38
  "devDependencies": {
39
- "chai": "^4.3.4",
40
- "eslint": "^8.3.0",
41
- "express": "^4.17.1",
42
- "mocha": "^9.1.3",
39
+ "chai": "^4.3.6",
40
+ "eslint": "^8.13.0",
41
+ "express": "^4.17.3",
42
+ "mocha": "^9.2.2",
43
43
  "nyc": "^15.1.0",
44
44
  "proxyquire": "^2.1.3",
45
45
  "reqres": "^3.0.1",
46
- "sinon": "^12.0.1",
46
+ "sinon": "^13.0.1",
47
47
  "sinon-chai": "^3.7.0"
48
48
  },
49
49
  "mocha": {
package/.travis.yml DELETED
@@ -1,8 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - "10"
4
- - "12"
5
- - "14"
6
- notifications:
7
- email: false
8
- sudo: false