@govuk-pay/pay-js-commons 3.3.8 → 3.4.0

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.
@@ -16,13 +16,16 @@ jobs:
16
16
 
17
17
  steps:
18
18
  - name: Checkout
19
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
19
+ uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
20
+ - name: Parse Node version
21
+ run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
22
+ id: parse-node-version
20
23
  - name: Setup
21
24
  uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a
22
25
  with:
23
- node-version: 12.22.10
26
+ node-version: "${{ steps.parse-node-version.outputs.NVMRC }}"
24
27
  - name: Cache NPM packages
25
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
28
+ uses: actions/cache@136d96b4aee02b1f0de3ba493b1d47135042d9c0
26
29
  with:
27
30
  path: ~/.npm
28
31
  key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -22,7 +22,7 @@ module.exports = function (string) {
22
22
  Ÿ: 'Y'
23
23
  });
24
24
  return slugify(string, {
25
- remove: /[$*_+~.()'"!:@?%=£]/g,
25
+ remove: /[^A-Za-z0-9\s-]/g,
26
26
  lower: true
27
27
  });
28
28
  };
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@govuk-pay/pay-js-commons",
3
- "version": "3.3.8",
3
+ "version": "3.4.0",
4
4
  "description": "Reusable js scripts for GOV.UK Pay Node.js projects",
5
+ "engines": {
6
+ "node": "^16.14.0"
7
+ },
5
8
  "main": "lib/index.js",
6
9
  "scripts": {
7
10
  "compile": "npm run transpile",
@@ -33,7 +36,6 @@
33
36
  "Google Analytics",
34
37
  "Event Tracking"
35
38
  ],
36
- "author": "Jon Heslop (Government Digital Service)",
37
39
  "license": "MIT",
38
40
  "bugs": {
39
41
  "url": "https://github.com/alphagov/pay-js-commons/issues"
@@ -114,11 +116,12 @@
114
116
  "chai": "^4.2.0",
115
117
  "eslint-plugin-import": "^2.18.0",
116
118
  "eslint-plugin-promise": "^5.1.0",
117
- "husky": "^7.0.0",
119
+ "husky": "^8.0.1",
118
120
  "jest": "^27.0.1",
119
121
  "js-cookie": "^3.0.0",
120
122
  "jsdom": "^19.0.0",
121
123
  "jsdom-global": "^3.0.2",
124
+ "jest-environment-jsdom": "^27.0.1",
122
125
  "karma": "^6.0.0",
123
126
  "karma-browserify": "^8.0.0",
124
127
  "karma-chrome-launcher": "^3.1.0",
@@ -127,11 +130,11 @@
127
130
  "karma-source-map-support": "^1.2.0",
128
131
  "lint-staged": "^12.0.2",
129
132
  "mocha": "^9.1.0",
130
- "sinon": "^13.0.0",
133
+ "sinon": "^14.0.0",
131
134
  "standard": "^16.0.3",
132
135
  "uglify-js": "^3.6.0",
133
136
  "watchify": "^4.0.0",
134
- "xo": "^0.48.0"
137
+ "xo": "^0.49.0"
135
138
  },
136
139
  "directories": {
137
140
  "lib": "lib"
@@ -141,6 +144,6 @@
141
144
  "moment-timezone": "0.5.34",
142
145
  "rfc822-validate": "1.0.0",
143
146
  "slugify": "1.6.5",
144
- "winston": "3.6.0"
147
+ "winston": "3.7.2"
145
148
  }
146
149
  }