hof 20.4.1-minimatch-vulnerability-beta → 20.4.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +13 -0
- package/config/hof-defaults.js +8 -1
- package/frontend/govuk-template/build/govuk_template.html +3 -4
- package/frontend/template-partials/views/partials/head.html +5 -10
- package/lib/ga-tag.js +22 -13
- package/package.json +4 -6
- package/pull_request.md +16 -0
- package/.nyc_output/b17a72ab-43b9-4b04-87d3-4757aec739ab.json +0 -1
- package/.nyc_output/processinfo/b17a72ab-43b9-4b04-87d3-4757aec739ab.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/frontend/govuk-template/govuk_template_generated.html +0 -103
- package/sandbox/apps/sandbox/translations/en/default.json +0 -224
- package/sandbox/public/css/app.css +0 -2793
- package/sandbox/public/images/icons/icon-caret-left.png +0 -0
- package/sandbox/public/images/icons/icon-complete.png +0 -0
- package/sandbox/public/images/icons/icon-cross-remove-sign.png +0 -0
- package/sandbox/public/js/bundle.js +0 -32888
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## 2024-02-29, Version 20.4.0 (Stable), @sulthan-ahmed
|
2
|
+
* Update version of govuk-frontend to 3.15
|
3
|
+
- this adds the new crown for the King
|
4
|
+
- this supports a lot of changes from the govuk design system
|
5
|
+
* Adds support for Google tag manager
|
6
|
+
* Fixes accessibility issues
|
7
|
+
* Sandbox area for testing hof changes
|
8
|
+
* Updates patch and minor versions including
|
9
|
+
- libphonenumber to 1.9.44
|
10
|
+
- nodemailer to 6.9.9
|
11
|
+
- ip to 1.1.9
|
12
|
+
- es5-ext to 0.10.63
|
13
|
+
|
1
14
|
## 2020-06-02, Version 16.0.0 (Stable), @andymoody
|
2
15
|
* Update version of helmet to 3.22.0
|
3
16
|
* Update version of i18n-future to 2.0.0
|
package/config/hof-defaults.js
CHANGED
@@ -22,7 +22,14 @@ const defaults = {
|
|
22
22
|
env: process.env.NODE_ENV || 'development',
|
23
23
|
gaTagId: process.env.GA_TAG || 'Test-GA-Tag',
|
24
24
|
ga4TagId: process.env.GA_4_TAG,
|
25
|
-
|
25
|
+
// added to allow support for multiple HOF forms using GTM to customize how they track page views
|
26
|
+
gtm: {
|
27
|
+
tagId: process.env.GTM_TAG || false,
|
28
|
+
config: {},
|
29
|
+
composePageName: function (page, convertPage) {
|
30
|
+
return convertPage(page);
|
31
|
+
}
|
32
|
+
},
|
26
33
|
gaCrossDomainTrackingTagId: process.env.GDS_CROSS_DOMAIN_GA_TAG,
|
27
34
|
loglevel: process.env.LOG_LEVEL || 'info',
|
28
35
|
ignoreMiddlewareLogs: ['/healthz'],
|
@@ -41,13 +41,12 @@
|
|
41
41
|
<a href="{{{ homepageUrl }}}" title="{{ logoLinkTitle }}" id="logo" class="govuk-header__link govuk-header__link--homepage" target="_blank" data-module="track-click" data-track-category="homeLinkClicked" data-track-action="homeHeader">
|
42
42
|
<span class="govuk-header__logotype">
|
43
43
|
<!--[if gt IE 8]><!-->
|
44
|
-
<svg aria-hidden="true" focusable="false" class="govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
45
|
-
<path fill="currentColor" fill-rule="evenodd"
|
44
|
+
<svg aria-hidden="true" focusable="false" class="govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg\" viewBox="0 0 32 30" height="30" width="32">
|
45
|
+
<path fill="currentColor" fill-rule="evenodd" d="M22.6 10.4c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m-5.9 6.7c-.9.4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m10.8-3.7c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s0 2-1 2.4m3.3 4.8c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4M17 4.7l2.3 1.2V2.5l-2.3.7-.2-.2.9-3h-3.4l.9 3-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-3.5-3 .6 0 1.2.3 2 .9l-1.2-4c-.3 1.1-.7 1.9-1.1 2.3-.3-.8-.2-1.4 0-2.7l-2.9.9C1.3 23 2.6 25.5 3.7 30c3.7-.5 7.9-.8 12.3-.8\"></path>
|
46
46
|
</svg>
|
47
47
|
<!--<![endif]-->
|
48
|
-
<!--<![endif]-->
|
49
48
|
<!--[if IE 8]>
|
50
|
-
<img src="{{ assetPath }}images/govuk-logotype-crown.png" class="govuk-header__logotype-crown-fallback-image" width="
|
49
|
+
<img src="{{ assetPath }}images/govuk-logotype-tudor-crown.png" class="govuk-header__logotype-crown-fallback-image" width="32" height="30" alt="">
|
51
50
|
<![endif]-->
|
52
51
|
</span>
|
53
52
|
<span class="govuk-header__logotype-text">
|
@@ -1,18 +1,13 @@
|
|
1
1
|
{{#gtmTagId}}
|
2
2
|
{{#cookiesAccepted}}
|
3
|
-
|
4
|
-
<!-- Google Tag Manager Data Layer for ETA -->
|
3
|
+
<!-- Google Tag Manager Data Layer -->
|
5
4
|
<script {{#nonce}}nonce="{{nonce}}"{{/nonce}}>
|
6
5
|
var dataLayer = window.dataLayer || [];
|
7
|
-
dataLayer.push(
|
8
|
-
|
9
|
-
|
10
|
-
'applicationType': 'ETA | Customer Contact',
|
11
|
-
'environmentType': '{{environmentType}}'
|
12
|
-
});
|
6
|
+
dataLayer.push(
|
7
|
+
{{{gtmConfig}}}
|
8
|
+
);
|
13
9
|
</script>
|
14
|
-
<!-- End Google Tag Manager Data Layer
|
15
|
-
{{/isETA}}
|
10
|
+
<!-- End Google Tag Manager Data Layer -->
|
16
11
|
|
17
12
|
<!-- Google Tag Manager -->
|
18
13
|
<script {{#nonce}}nonce="{{nonce}}"{{/nonce}}>
|
package/lib/ga-tag.js
CHANGED
@@ -52,26 +52,35 @@ const setupPageMap = routes => {
|
|
52
52
|
module.exports = (app, config) => {
|
53
53
|
const gaTagId = config.gaTagId;
|
54
54
|
const ga4TagId = config.ga4TagId;
|
55
|
-
const
|
56
|
-
const environmentType = config.environmentType ? config.environmentType : 'dev';
|
55
|
+
const gtm = config.gtm;
|
57
56
|
const gaCrossDomainTrackingTagId = config.gaCrossDomainTrackingTagId;
|
58
57
|
const routes = config.routes;
|
59
58
|
|
60
|
-
if (gaTagId || ga4TagId) {
|
59
|
+
if (gaTagId || ga4TagId || gtm.tagId) {
|
61
60
|
const pageMap = setupPageMap(routes);
|
62
61
|
|
63
62
|
app.use((req, res, next) => {
|
64
63
|
const page = pageView(req.path, pageMap);
|
65
|
-
|
66
|
-
res.locals
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
64
|
+
|
65
|
+
// Preparing common res.locals properties
|
66
|
+
const properties = {
|
67
|
+
gaAllowDebug: config.env === 'development',
|
68
|
+
gaTagId: gaTagId,
|
69
|
+
ga4TagId: ga4TagId,
|
70
|
+
gaCrossDomainTrackingTagId: gaCrossDomainTrackingTagId,
|
71
|
+
'ga-id': gaTagId,
|
72
|
+
'ga-page': page
|
73
|
+
};
|
74
|
+
|
75
|
+
// Adding extra properties if a GTM TAG is available
|
76
|
+
if (gtm.tagId) {
|
77
|
+
gtm.config.pageName = gtm.composePageName(page, convertToGTMPage);
|
78
|
+
Object.assign(properties, {
|
79
|
+
gtmConfig: JSON.stringify(gtm.config),
|
80
|
+
gtmTagId: gtm.tagId
|
81
|
+
});
|
82
|
+
}
|
83
|
+
res.locals = Object.assign(res.locals, properties);
|
75
84
|
next();
|
76
85
|
});
|
77
86
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hof",
|
3
3
|
"description": "A bootstrap for HOF projects",
|
4
|
-
"version": "20.4.
|
4
|
+
"version": "20.4.2",
|
5
5
|
"license": "MIT",
|
6
6
|
"main": "index.js",
|
7
7
|
"author": "HomeOffice",
|
@@ -57,7 +57,7 @@
|
|
57
57
|
"findup": "^0.1.5",
|
58
58
|
"glob": "^7.2.0",
|
59
59
|
"govuk-elements-sass": "^3.1.3",
|
60
|
-
"govuk-frontend": "3.
|
60
|
+
"govuk-frontend": "3.15",
|
61
61
|
"govuk_template_mustache": "^0.26.0",
|
62
62
|
"helmet": "^3.22.0",
|
63
63
|
"hogan-express-strict": "^0.5.4",
|
@@ -66,7 +66,7 @@
|
|
66
66
|
"i18n-future": "^2.0.0",
|
67
67
|
"i18n-lookup": "^0.1.0",
|
68
68
|
"is-pdf": "^1.0.0",
|
69
|
-
"libphonenumber-js": "^1.9.
|
69
|
+
"libphonenumber-js": "^1.9.44",
|
70
70
|
"lodash": "^4.17.21",
|
71
71
|
"markdown-it": "^12.3.2",
|
72
72
|
"minimatch": "^3.0.7",
|
@@ -141,8 +141,6 @@
|
|
141
141
|
"resolutions": {
|
142
142
|
"underscore": "^1.12.1",
|
143
143
|
"cached-path-relative": "^1.1.0",
|
144
|
-
"shell-quote": "^1.7.3"
|
145
|
-
"**/glob": "8.0.1",
|
146
|
-
"**/minimatch": "5.0.1"
|
144
|
+
"shell-quote": "^1.7.3"
|
147
145
|
}
|
148
146
|
}
|
package/pull_request.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
## What?
|
2
|
+
## Why?
|
3
|
+
## How?
|
4
|
+
## Testing?
|
5
|
+
## Screenshots (optional)
|
6
|
+
## Anything Else? (optional)
|
7
|
+
## Check list
|
8
|
+
|
9
|
+
- [ ] I have reviewed my own pull request for linting issues (e.g. adding new lines)
|
10
|
+
- [ ] I have written tests (if relevant)
|
11
|
+
- [ ] I have created a JIRA number for my branch
|
12
|
+
- [ ] I have created a JIRA number for my commit
|
13
|
+
- [ ] I have followed the chris beams method for my commit https://cbea.ms/git-commit/
|
14
|
+
here is an [example commit](https://github.com/UKHomeOfficeForms/hof/commit/810959f391187c7c4af6db262bcd143b50093a6e)
|
15
|
+
- [ ] Ensure drone builds are green especially tests
|
16
|
+
- [ ] I will squash the commits before merging
|