@companieshouse/ch-node-utils 2.1.8 → 2.1.10

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/README.md CHANGED
@@ -3,6 +3,10 @@
3
3
  set of node utils which can be used across repos/projects.
4
4
  Available as a normal npm dependency([here on npmjs](https://www.npmjs.com/package/@companieshouse/ch-node-utils))
5
5
 
6
+ ## Compatible Node.js Versions
7
+
8
+ This package has been upgraded to be compatible with Node v24. Presently, it's backward compatible with v20 and v18 but compatibility is primarily required for v24 as all CH Node services are in the process of being upgraded to v24.
9
+
6
10
  ## Areas for the different utilities stored in this repo:
7
11
 
8
12
  ### Page template layout
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companieshouse/ch-node-utils",
3
- "version": "2.1.8",
3
+ "version": "2.1.10",
4
4
  "author": "companieshouse",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -31,12 +31,12 @@
31
31
  {# Run JavaScript at end of the <body>, to avoid blocking the initial render. #}
32
32
  {# Starting in GOV.UK Frontend version 5, JavaScript is only loaded in modern browsers using ES6 Module imports. #}
33
33
  {% if govukFrontendVersion | first >= "5" %}
34
- <script type="module">
34
+ <script type="module"{% if nonce %} nonce="{{ nonce }}"{% endif %}>
35
35
  import { initAll } from '{{ cdnHost }}/javascripts/govuk-frontend/v{{ govukFrontendVersion }}/govuk-frontend-{{ govukFrontendVersion }}.min.js'
36
36
  initAll()
37
37
  </script>
38
38
  {% else %}
39
39
  <script src="{{ cdnHost }}/javascripts/govuk-frontend/v{{ govukFrontendVersion }}/govuk-frontend-{{ govukFrontendVersion }}.min.js"></script>
40
- <script>window.GOVUKFrontend.initAll()</script>
40
+ <script{% if nonce %} nonce="{{ nonce }}"{% endif %}>window.GOVUKFrontend.initAll()</script>
41
41
  {% endif %}
42
42
  {% endblock %}