@dwp/govuk-casa 7.2.5 → 7.2.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.
@@ -3,7 +3,6 @@
3
3
  */
4
4
 
5
5
  const isStaticAsset = /.*\.(js|jpe?g|css|png|svg|woff2?|eot|ttf|otf)/;
6
- const isIE8 = /MSIE\s*8/i;
7
6
  const oneDay = 86400000;
8
7
 
9
8
  module.exports = (logger, defaultHeaders = {}, disabledHeaders = []) => (req, res, next) => {
@@ -14,12 +13,10 @@ module.exports = (logger, defaultHeaders = {}, disabledHeaders = []) => (req, re
14
13
  // Caching policy
15
14
  // Cache static assets more aggressively
16
15
  if (isStaticAsset.test(req.url)) {
17
- headers['Cache-Control'] = 'public';
18
- headers.Pragma = 'cache';
16
+ headers['Cache-Control'] = 'no-cache, private';
19
17
  headers.Expires = new Date(Date.now() + oneDay).toUTCString();
20
18
  } else {
21
- headers['Cache-Control'] = 'no-cache, no-store, must-revalidate, private';
22
- headers.Pragma = 'no-cache';
19
+ headers['Cache-Control'] = 'no-store';
23
20
  headers.Expires = 0;
24
21
  }
25
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dwp/govuk-casa",
3
- "version": "7.2.5",
3
+ "version": "7.2.6",
4
4
  "description": "Framework for creating basic GOVUK Collect-And-Submit-Applications",
5
5
  "main": "casa.js",
6
6
  "files": [
@@ -46,14 +46,14 @@
46
46
  "nunjucks": "3.2.4",
47
47
  "serve-favicon": "2.5.0",
48
48
  "uid-safe": "2.1.5",
49
- "uuid": "9.0.1",
49
+ "uuid": "11.1.0",
50
50
  "validator": "13.12.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@commitlint/cli": "17.8.1",
54
54
  "@commitlint/config-conventional": "17.8.1",
55
55
  "@commitlint/travis-cli": "18.6.1",
56
- "@dwp/commitlint-config-base": "4.0.6",
56
+ "@dwp/commitlint-config-base": "4.0.8",
57
57
  "@dwp/eslint-config-base": "7.0.0",
58
58
  "@stryker-mutator/core": "6.4.2",
59
59
  "@stryker-mutator/html-reporter": "3.1.0",
@@ -70,15 +70,14 @@
70
70
  "eslint-plugin-sonarjs": "0.25.1",
71
71
  "express": "4.21.2",
72
72
  "express-session": "1.18.1",
73
- "husky": "8.0.3",
74
73
  "jsdom": "22.1.0",
75
74
  "mocha": "10.6.0",
76
75
  "nyc": "15.1.0",
77
76
  "proxyquire": "2.1.3",
78
- "sass": "1.83.4",
77
+ "sass": "1.85.1",
79
78
  "sinon": "15.2.0",
80
79
  "sinon-chai": "3.7.0",
81
- "supertest": "6.3.4",
80
+ "supertest": "7.0.0",
82
81
  "uglify-js": "3.19.3",
83
82
  "yargs": "17.7.2"
84
83
  },
@@ -101,7 +100,7 @@
101
100
  "security:vulnerable-packages": "npm audit --production --registry=https://registry.npmjs.org --json | node -e 'a=JSON.parse(fs.readFileSync(\"/dev/stdin\",\"utf-8\")).metadata.vulnerabilities;process.exit(a.high+a.critical);'",
102
101
  "package:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
103
102
  "compile-static-assets": "node ./scripts/compile-sass.js && node ./scripts/compile-js.js",
104
- "prepare": "npm run compile-static-assets --silent; husky install",
103
+ "prepare": "npm run compile-static-assets --silent",
105
104
  "upgrade-deps": "OD=$(npm outdated --long --parseable); echo \"$OD\" | grep ':devDependencies:' | awk -F: '{ print $4 }' | xargs npm i -DE; echo \"$OD\" | grep ':dependencies:' | awk -F: '{ print $4 }' | xargs npm i -E"
106
105
  },
107
106
  "author": "DWP <open-source@engineering.digital.dwp.gov.uk>",