@ukhomeoffice/cop-react-form-renderer 7.0.0-charlie → 7.0.0-echo

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.
@@ -183,7 +183,7 @@ describe('components.CollectionPage', () => {
183
183
  expect(outerWrapper.classList).toContain('hods-autocomplete__outer-wrapper');
184
184
  const autocomplete = outerWrapper.childNodes[0];
185
185
  expect(autocomplete.classList).toContain('hods-autocomplete__wrapper');
186
- const input = [].concat(autocomplete.childNodes).filter(e => e.tagName === 'INPUT')[0];
186
+ const input = autocomplete.querySelector('input');
187
187
  expect(input.classList).toContain('hods-autocomplete__input');
188
188
  expect(input.tagName).toEqual('INPUT');
189
189
  expect(input.id).toEqual(fieldId);
@@ -183,7 +183,7 @@ describe('components.FormPage', () => {
183
183
  expect(outerWrapper.classList).toContain('hods-autocomplete__outer-wrapper');
184
184
  const autocomplete = outerWrapper.childNodes[0];
185
185
  expect(autocomplete.classList).toContain('hods-autocomplete__wrapper');
186
- const input = [].concat(autocomplete.childNodes).filter(e => e.tagName === 'INPUT')[0];
186
+ const input = autocomplete.querySelector('input');
187
187
  expect(input.classList).toContain('hods-autocomplete__input');
188
188
  expect(input.tagName).toEqual('INPUT');
189
189
  expect(input.id).toEqual(fieldId);
package/package.json CHANGED
@@ -1,39 +1,38 @@
1
1
  {
2
2
  "name": "@ukhomeoffice/cop-react-form-renderer",
3
- "version": "7.0.0-charlie",
3
+ "version": "7.0.0-echo",
4
4
  "private": false,
5
5
  "scripts": {
6
- "dev": "vite",
7
- "build": "vite build",
8
- "preview": "vite preview",
9
6
  "clean": "rimraf dist",
10
- "test": "vitest",
11
- "test:coverage": "yarn test --coverage --watchAll=false",
12
- "lint": "eslint --ext .js,.jsx src",
13
- "lint:fix": "eslint --ext .js,.jsx src --fix",
14
- "storybook:start": "NODE_OPTIONS=--openssl-legacy-provider start-storybook --docs src/assets --no-manager-cache -p 6007",
15
- "storybook:build": "NODE_OPTIONS=--openssl-legacy-provider build-storybook --docs src/assets",
16
- "storybook": "yarn storybook:start",
17
7
  "compile": "yarn clean && cross-env NODE_ENV=production babel src --out-dir dist --copy-files && yarn post-compile",
18
- "post-compile": "rimraf dist/*.test.* dist/**/*.test.* dist/**/*.stories.* dist/docs dist/assets",
19
8
  "compile-with-maps": "yarn clean && cross-env NODE_ENV=production babel src --out-dir dist --source-maps true --copy-files && yarn post-compile",
9
+ "dev": "vite",
10
+ "lint": "eslint --ext .js,.jsx src",
11
+ "lint-fix": "eslint --ext .js,.jsx src --fix",
12
+ "post-compile": "rimraf dist/*.test.* dist/**/*.test.* dist/**/*.stories.* dist/docs dist/assets",
13
+ "storybook": "yarn storybook:start",
14
+ "storybook:build": "build-storybook --docs -s src/assets",
15
+ "storybook:start": "start-storybook --docs -s src/assets --no-manager-cache -p 6007",
16
+ "test": "jest --silent=false --noStackTrace",
17
+ "test-coverage": "jest --coverage --watchAll=false",
18
+ "test-coverage-watch": "jest --coverage --watchAll=true",
20
19
  "yalc-publish": "yarn compile-with-maps && cp -r src dist/src && yalc publish --push"
21
20
  },
22
21
  "dependencies": {
23
22
  "@ukhomeoffice/cop-react-components": "5.0.0-foxtrot",
24
23
  "axios": "^0.23.0",
25
24
  "dayjs": "^1.11.0",
26
- "govuk-frontend": "^5.0.0",
27
- "uuid": "^8.1.0",
25
+ "govuk-frontend": "5.10.2",
26
+ "uuid": "11.1.0",
28
27
  "web-vitals": "^1.0.1"
29
28
  },
30
29
  "devDependencies": {
31
- "@babel/cli": "^7.15.4",
32
- "@babel/core": "^7.27.4",
33
- "@babel/eslint-parser": "^7.19.1",
34
- "@babel/preset-env": "^7.27.2",
35
- "@babel/preset-react": "^7.27.1",
36
- "@monaco-editor/react": "4.4.6",
30
+ "@babel/cli": "7.27.2",
31
+ "@babel/core": "7.27.4",
32
+ "@babel/eslint-parser": "7.19.1",
33
+ "@babel/preset-env": "7.27.2",
34
+ "@babel/preset-react": "7.27.1",
35
+ "@monaco-editor/react": "4.7.0",
37
36
  "@storybook/addon-a11y": "^6.3.8",
38
37
  "@storybook/addon-actions": "^6.3.8",
39
38
  "@storybook/addon-docs": "^6.3.8",
@@ -41,26 +40,32 @@
41
40
  "@storybook/addon-knobs": "^6.3.1",
42
41
  "@storybook/addon-links": "^6.3.8",
43
42
  "@storybook/node-logger": "^6.3.8",
44
- "@storybook/preset-create-react-app": "^3.2.0",
45
43
  "@storybook/react": "^6.3.8",
46
- "@storybook/storybook-deployer": "^2.8.10",
44
+ "@storybook/storybook-deployer": "2.8.16",
47
45
  "@storybook/theming": "^6.3.8",
48
46
  "@testing-library/jest-dom": "^5.11.4",
49
47
  "@testing-library/react": "^11.1.0",
50
48
  "@testing-library/react-hooks": "^7.0.2",
51
49
  "@testing-library/user-event": "^12.1.10",
52
- "@vitejs/plugin-react": "4.4.1",
50
+ "@vitejs/plugin-react": "4.5.1",
53
51
  "axios-mock-adapter": "^1.18.1",
54
- "cross-env": "^7.0.3",
55
- "eslint-config-airbnb": "^19.0.4",
52
+ "babel-jest": "29.7.0",
53
+ "cross-env": "7.0.3",
54
+ "eslint-config-airbnb": "19.0.4",
56
55
  "eslint-config-prettier": "^8.6.0",
57
- "html-react-parser": "^4.0.0",
56
+ "html-react-parser": "^0.10.5",
57
+ "identity-obj-proxy": "3.0.0",
58
+ "jest": "29.7.0",
59
+ "jest-environment-jsdom": "29.7.0",
60
+ "jest-localstorage-mock": "2.4.26",
61
+ "jest-styled-components": "7.2.0",
62
+ "jest-svg": "1.0.0",
58
63
  "prop-types": "^15.8.1",
59
64
  "react": "^16.13.1",
60
65
  "react-dom": "^16.13.1",
61
- "sass": "^1.69.5",
66
+ "sass": "1.89.1",
62
67
  "storybook-addon-mock": "^2.0.1",
63
- "vite": "6.3.3",
68
+ "vite": "6.3.5",
64
69
  "vite-plugin-static-copy": "^2.3.1",
65
70
  "vite-plugin-svgr": "4.3.0"
66
71
  },
@@ -81,6 +86,33 @@
81
86
  "type": "git",
82
87
  "url": "https://github.com/UKHomeOffice/cop-react-form-renderer"
83
88
  },
89
+ "jest": {
90
+ "coverageReporters": [
91
+ "lcov",
92
+ "json",
93
+ "text"
94
+ ],
95
+ "coveragePathIgnorePatterns": [
96
+ "/node_modules/",
97
+ "src/index.js"
98
+ ],
99
+ "testPathIgnorePatterns": [
100
+ "/node_modules/",
101
+ "/dist/"
102
+ ],
103
+ "transform": {
104
+ "^.+\\.jsx?$": "babel-jest",
105
+ "^.+\\.svg$": "jest-svg"
106
+ },
107
+ "testEnvironment": "jest-environment-jsdom",
108
+ "moduleNameMapper": {
109
+ "\\.(css|less|scss|sss|styl)$": "identity-obj-proxy",
110
+ "^@/(.*)$": "<rootDir>/src/$1"
111
+ },
112
+ "setupFilesAfterEnv": [
113
+ "<rootDir>/src/setupTests.js"
114
+ ]
115
+ },
84
116
  "babel": {
85
117
  "presets": [
86
118
  [