@ministryofjustice/hmpps-connect-dps-shared-items 5.3.1 → 5.3.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.
@@ -1,5 +1,5 @@
1
- // Based on ONSDigital's https://github.com/ONSdigital/design-system/blob/main/src/js/abortable-fetch.js
2
1
  /* eslint-disable max-classes-per-file, @stylistic/lines-between-class-members */
2
+ // Based on ONSDigital's https://github.com/ONSdigital/design-system/blob/main/src/js/abortable-fetch.js
3
3
  const FetchStatus = {
4
4
  unsent: 'UNSENT',
5
5
  loading: 'LOADING',
@@ -1,5 +1,5 @@
1
- // Based on ONSDigital's https://github.com/ONSdigital/design-system/blob/main/src/js/abortable-fetch.js
2
1
  /* eslint-disable max-classes-per-file, @stylistic/lines-between-class-members */
2
+ // Based on ONSDigital's https://github.com/ONSdigital/design-system/blob/main/src/js/abortable-fetch.js
3
3
 
4
4
  export const FetchStatus = {
5
5
  unsent: 'UNSENT',
@@ -56,8 +56,7 @@ function hmppsWebcamCapture(component) {
56
56
  photoCaptureContainer.style.display = 'none';
57
57
  photoCaptureErrorContainer.style.display = 'block';
58
58
  if (enableReporting) {
59
- // @ts-expect-error error type is not known
60
- const error = 'name' in e ? e.name : e.message;
59
+ const error = (e && typeof e === 'object' && (('name' in e && e.name) || ('message' in e && e.message))) ?? 'Unknown';
61
60
  // eslint-disable-next-line no-restricted-globals
62
61
  await fetch(`/api/report-error?pageUrl=${encodeURIComponent(location.href)}&error=${error}`, {
63
62
  method: 'GET',
@@ -66,8 +66,8 @@ function hmppsWebcamCapture(component: HTMLElement): Promise<void> {
66
66
  photoCaptureContainer.style.display = 'none'
67
67
  photoCaptureErrorContainer.style.display = 'block'
68
68
  if (enableReporting) {
69
- // @ts-expect-error error type is not known
70
- const error = 'name' in e ? e.name : e.message
69
+ const error =
70
+ (e && typeof e === 'object' && (('name' in e && e.name) || ('message' in e && e.message))) ?? 'Unknown'
71
71
  // eslint-disable-next-line no-restricted-globals
72
72
  await fetch(`/api/report-error?pageUrl=${encodeURIComponent(location.href)}&error=${error}`, {
73
73
  method: 'GET',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ministryofjustice/hmpps-connect-dps-shared-items",
3
- "version": "5.3.1",
3
+ "version": "5.3.3",
4
4
  "description": "A package to share Connect DPS functionality across applications",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.esm.js",
@@ -49,30 +49,30 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "@ministryofjustice/eslint-config-hmpps": "2.0.0-alpha.2",
52
- "@ministryofjustice/frontend": "11.1.0",
53
- "@ministryofjustice/frontend-types": "2.0.2",
52
+ "@ministryofjustice/frontend": "12.0.0",
53
+ "@ministryofjustice/frontend-types": "2.0.3",
54
54
  "@ministryofjustice/hmpps-precommit-hooks": "3.0.2",
55
55
  "@rollup/plugin-commonjs": "^29.0.3",
56
56
  "@rollup/plugin-multi-entry": "^7.1.0",
57
57
  "@rollup/plugin-node-resolve": "^16.0.3",
58
58
  "@rollup/plugin-typescript": "^12.3.0",
59
- "@tsconfig/node24": "24.0.5",
59
+ "@tsconfig/node26": "26.0.1",
60
60
  "@types/jest": "^30.0.0",
61
61
  "@types/nunjucks": "3.2.6",
62
62
  "@types/superagent": "^8.1.11",
63
- "govuk-frontend": "6.5.1",
63
+ "govuk-frontend": "6.6.0",
64
64
  "jest": "^30.4.2",
65
65
  "jest-html-reporter": "^4.4.0",
66
66
  "jest-junit": "^17.0.0",
67
67
  "lint-staged": "^17.2.0",
68
68
  "nock": "14.0.17",
69
69
  "nunjucks": "3.2.4",
70
- "rollup": "4.63.5",
70
+ "rollup": "4.65.1",
71
71
  "rollup-plugin-copy": "3.5.0",
72
72
  "rollup-plugin-dts": "6.5.1",
73
73
  "rollup-plugin-scss": "4.0.1",
74
- "sass": "1.105.0",
75
- "ts-jest": "29.4.14",
74
+ "sass": "1.106.1",
75
+ "ts-jest": "29.4.15",
76
76
  "tslib": "^2.8.1",
77
77
  "typescript": "6.0.3"
78
78
  },