@elliemae/pui-cli 9.0.0-next.27 → 9.0.0-next.29
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/dist/cjs/testing/ExtendedJSDomEnv.cjs +0 -11
- package/dist/cjs/testing/jest.config.cjs +2 -1
- package/dist/cjs/testing/jest.polyfills.cjs +28 -0
- package/dist/esm/testing/ExtendedJSDomEnv.cjs +0 -11
- package/dist/esm/testing/jest.config.cjs +2 -1
- package/dist/esm/testing/jest.polyfills.cjs +28 -0
- package/dist/types/testing/jest.config.d.cts +1 -0
- package/dist/types/testing/jest.node.config.d.cts +1 -0
- package/dist/types/testing/jest.polyfills.d.cts +1 -0
- package/package.json +29 -28
|
@@ -22,17 +22,6 @@ class FixJSDOMEnvironment extends TestEnvironment {
|
|
|
22
22
|
|
|
23
23
|
// FIXME https://github.com/jsdom/jsdom/issues/3363
|
|
24
24
|
if (structuredClone) this.global.structuredClone = structuredClone;
|
|
25
|
-
|
|
26
|
-
// fix: 'TypeError: Failed to parse URL from latest/app.config.json' relative urls not supported in nodejs native fetch, using whatwg-fetch instead
|
|
27
|
-
// // FIXME https://github.com/jsdom/jsdom/issues/1724
|
|
28
|
-
// if (fetch) this.global.fetch = fetch;
|
|
29
|
-
// if (Headers) this.global.Headers = Headers;
|
|
30
|
-
// if (Request) this.global.Request = Request;
|
|
31
|
-
// if (Response) this.global.Response = Response;
|
|
32
|
-
|
|
33
|
-
// // FIXME https://github.com/jsdom/jsdom/issues/1721
|
|
34
|
-
// if (URL) this.global.URL = URL;
|
|
35
|
-
// if (Blob) this.global.Blob = Blob;
|
|
36
25
|
}
|
|
37
26
|
}
|
|
38
27
|
module.exports = FixJSDOMEnvironment;
|
|
@@ -75,7 +75,7 @@ const jestConfig = {
|
|
|
75
75
|
},
|
|
76
76
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
77
77
|
setupFilesAfterEnv: [path.resolve(__dirname, './setup-tests.js')],
|
|
78
|
-
setupFiles: ['raf/polyfill', '
|
|
78
|
+
setupFiles: ['raf/polyfill', './jest.polyfills.cjs'],
|
|
79
79
|
testRegex: '(app|lib).*/tests/.*\\.test\\.[jt]sx?$',
|
|
80
80
|
snapshotSerializers: [],
|
|
81
81
|
testResultsProcessor: 'jest-sonar-reporter',
|
|
@@ -93,6 +93,7 @@ const jestConfig = {
|
|
|
93
93
|
testEnvironmentOptions: {
|
|
94
94
|
url: `http://localhost:3111${basePath}`,
|
|
95
95
|
resources: 'usable',
|
|
96
|
+
customExportConditions: [''],
|
|
96
97
|
},
|
|
97
98
|
testEnvironment: path.resolve(__dirname, './ExtendedJSDomEnv.cjs'),
|
|
98
99
|
watchPlugins: [
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @note The block below contains polyfills for Node.js globals
|
|
3
|
+
* required for Jest to function when running JSDOM tests.
|
|
4
|
+
* These HAVE to be require's and HAVE to be in this exact
|
|
5
|
+
* order, since "undici" depends on the "TextEncoder" global API.
|
|
6
|
+
*
|
|
7
|
+
* Consider migrating to a more modern test runner if
|
|
8
|
+
* you don't want to deal with this.
|
|
9
|
+
*/
|
|
10
|
+
const { TextDecoder, TextEncoder } = require('node:util');
|
|
11
|
+
|
|
12
|
+
Object.defineProperties(globalThis, {
|
|
13
|
+
TextDecoder: { value: TextDecoder },
|
|
14
|
+
TextEncoder: { value: TextEncoder },
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const { Blob, File } = require('node:buffer');
|
|
18
|
+
const { fetch, Headers, FormData, Request, Response } = require('undici');
|
|
19
|
+
|
|
20
|
+
Object.defineProperties(globalThis, {
|
|
21
|
+
fetch: { value: fetch, writable: true },
|
|
22
|
+
Blob: { value: Blob },
|
|
23
|
+
File: { value: File },
|
|
24
|
+
Headers: { value: Headers },
|
|
25
|
+
FormData: { value: FormData },
|
|
26
|
+
Request: { value: Request },
|
|
27
|
+
Response: { value: Response },
|
|
28
|
+
});
|
|
@@ -22,17 +22,6 @@ class FixJSDOMEnvironment extends TestEnvironment {
|
|
|
22
22
|
|
|
23
23
|
// FIXME https://github.com/jsdom/jsdom/issues/3363
|
|
24
24
|
if (structuredClone) this.global.structuredClone = structuredClone;
|
|
25
|
-
|
|
26
|
-
// fix: 'TypeError: Failed to parse URL from latest/app.config.json' relative urls not supported in nodejs native fetch, using whatwg-fetch instead
|
|
27
|
-
// // FIXME https://github.com/jsdom/jsdom/issues/1724
|
|
28
|
-
// if (fetch) this.global.fetch = fetch;
|
|
29
|
-
// if (Headers) this.global.Headers = Headers;
|
|
30
|
-
// if (Request) this.global.Request = Request;
|
|
31
|
-
// if (Response) this.global.Response = Response;
|
|
32
|
-
|
|
33
|
-
// // FIXME https://github.com/jsdom/jsdom/issues/1721
|
|
34
|
-
// if (URL) this.global.URL = URL;
|
|
35
|
-
// if (Blob) this.global.Blob = Blob;
|
|
36
25
|
}
|
|
37
26
|
}
|
|
38
27
|
module.exports = FixJSDOMEnvironment;
|
|
@@ -75,7 +75,7 @@ const jestConfig = {
|
|
|
75
75
|
},
|
|
76
76
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
77
77
|
setupFilesAfterEnv: [path.resolve(__dirname, './setup-tests.js')],
|
|
78
|
-
setupFiles: ['raf/polyfill', '
|
|
78
|
+
setupFiles: ['raf/polyfill', './jest.polyfills.cjs'],
|
|
79
79
|
testRegex: '(app|lib).*/tests/.*\\.test\\.[jt]sx?$',
|
|
80
80
|
snapshotSerializers: [],
|
|
81
81
|
testResultsProcessor: 'jest-sonar-reporter',
|
|
@@ -93,6 +93,7 @@ const jestConfig = {
|
|
|
93
93
|
testEnvironmentOptions: {
|
|
94
94
|
url: `http://localhost:3111${basePath}`,
|
|
95
95
|
resources: 'usable',
|
|
96
|
+
customExportConditions: [''],
|
|
96
97
|
},
|
|
97
98
|
testEnvironment: path.resolve(__dirname, './ExtendedJSDomEnv.cjs'),
|
|
98
99
|
watchPlugins: [
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @note The block below contains polyfills for Node.js globals
|
|
3
|
+
* required for Jest to function when running JSDOM tests.
|
|
4
|
+
* These HAVE to be require's and HAVE to be in this exact
|
|
5
|
+
* order, since "undici" depends on the "TextEncoder" global API.
|
|
6
|
+
*
|
|
7
|
+
* Consider migrating to a more modern test runner if
|
|
8
|
+
* you don't want to deal with this.
|
|
9
|
+
*/
|
|
10
|
+
const { TextDecoder, TextEncoder } = require('node:util');
|
|
11
|
+
|
|
12
|
+
Object.defineProperties(globalThis, {
|
|
13
|
+
TextDecoder: { value: TextDecoder },
|
|
14
|
+
TextEncoder: { value: TextEncoder },
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const { Blob, File } = require('node:buffer');
|
|
18
|
+
const { fetch, Headers, FormData, Request, Response } = require('undici');
|
|
19
|
+
|
|
20
|
+
Object.defineProperties(globalThis, {
|
|
21
|
+
fetch: { value: fetch, writable: true },
|
|
22
|
+
Blob: { value: Blob },
|
|
23
|
+
File: { value: File },
|
|
24
|
+
Headers: { value: Headers },
|
|
25
|
+
FormData: { value: FormData },
|
|
26
|
+
Request: { value: Request },
|
|
27
|
+
Response: { value: Response },
|
|
28
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.29",
|
|
4
4
|
"description": "ICE MT UI Platform CLI",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -81,27 +81,27 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@axe-core/react": "~4.8.1",
|
|
83
83
|
"@babel/cli": "~7.23.0",
|
|
84
|
-
"@babel/core": "~7.23.
|
|
85
|
-
"@babel/eslint-parser": "~7.
|
|
84
|
+
"@babel/core": "~7.23.3",
|
|
85
|
+
"@babel/eslint-parser": "~7.23.3",
|
|
86
86
|
"@babel/node": "~7.22.19",
|
|
87
87
|
"@babel/plugin-proposal-class-properties": "~7.18.6",
|
|
88
|
-
"@babel/plugin-proposal-export-default-from": "~7.
|
|
88
|
+
"@babel/plugin-proposal-export-default-from": "~7.23.3",
|
|
89
89
|
"@babel/plugin-syntax-dynamic-import": "~7.8.3",
|
|
90
|
-
"@babel/plugin-syntax-import-assertions": "~7.
|
|
91
|
-
"@babel/plugin-transform-modules-commonjs": "~7.23.
|
|
92
|
-
"@babel/plugin-transform-react-constant-elements": "~7.
|
|
93
|
-
"@babel/plugin-transform-react-inline-elements": "~7.
|
|
94
|
-
"@babel/plugin-transform-react-jsx-source": "~7.
|
|
95
|
-
"@babel/plugin-transform-runtime": "~7.23.
|
|
96
|
-
"@babel/preset-env": "~7.23.
|
|
97
|
-
"@babel/preset-react": "~7.
|
|
98
|
-
"@babel/preset-typescript": "~7.23.
|
|
90
|
+
"@babel/plugin-syntax-import-assertions": "~7.23.3",
|
|
91
|
+
"@babel/plugin-transform-modules-commonjs": "~7.23.3",
|
|
92
|
+
"@babel/plugin-transform-react-constant-elements": "~7.23.3",
|
|
93
|
+
"@babel/plugin-transform-react-inline-elements": "~7.23.3",
|
|
94
|
+
"@babel/plugin-transform-react-jsx-source": "~7.23.3",
|
|
95
|
+
"@babel/plugin-transform-runtime": "~7.23.3",
|
|
96
|
+
"@babel/preset-env": "~7.23.3",
|
|
97
|
+
"@babel/preset-react": "~7.23.3",
|
|
98
|
+
"@babel/preset-typescript": "~7.23.3",
|
|
99
99
|
"@babel/runtime": "~7.23.2",
|
|
100
|
-
"@commitlint/cli": "~18.
|
|
101
|
-
"@commitlint/config-conventional": "~18.
|
|
100
|
+
"@commitlint/cli": "~18.4.1",
|
|
101
|
+
"@commitlint/config-conventional": "~18.4.0",
|
|
102
102
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.8.0",
|
|
103
103
|
"@faker-js/faker": "8.2.0",
|
|
104
|
-
"@nx/workspace": "17.
|
|
104
|
+
"@nx/workspace": "17.1.2",
|
|
105
105
|
"@pmmmwh/react-refresh-webpack-plugin": "~0.5.11",
|
|
106
106
|
"@semantic-release/changelog": "~6.0.3",
|
|
107
107
|
"@semantic-release/exec": "~6.0.3",
|
|
@@ -148,8 +148,8 @@
|
|
|
148
148
|
"@types/uuid": "~9.0.7",
|
|
149
149
|
"@types/testing-library__jest-dom": "~5.14.9",
|
|
150
150
|
"@types/webpack-bundle-analyzer": "~4.6.3",
|
|
151
|
-
"@typescript-eslint/eslint-plugin": "~6.
|
|
152
|
-
"@typescript-eslint/parser": "~6.
|
|
151
|
+
"@typescript-eslint/eslint-plugin": "~6.11.0",
|
|
152
|
+
"@typescript-eslint/parser": "~6.11.0",
|
|
153
153
|
"@vitejs/plugin-react": "~4.1.1",
|
|
154
154
|
"@vitest/coverage-c8": "~0.33.0",
|
|
155
155
|
"autoprefixer": "~10.4.16",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"eslint-plugin-eslint-comments": "~3.2.0",
|
|
200
200
|
"eslint-plugin-import": "~2.29.0",
|
|
201
201
|
"eslint-plugin-jest": "~27.6.0",
|
|
202
|
-
"eslint-plugin-jsdoc": "~46.
|
|
202
|
+
"eslint-plugin-jsdoc": "~46.9.0",
|
|
203
203
|
"eslint-plugin-jsx-a11y": "~6.8.0",
|
|
204
204
|
"eslint-plugin-mdx": "~2.2.0",
|
|
205
205
|
"eslint-plugin-prettier": "~5.0.1",
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"eslint-plugin-react-hooks": "~4.6.0",
|
|
208
208
|
"eslint-plugin-redux-saga": "~1.3.2",
|
|
209
209
|
"eslint-plugin-storybook": "~0.6.15",
|
|
210
|
-
"eslint-plugin-testing-library": "~6.1.
|
|
210
|
+
"eslint-plugin-testing-library": "~6.1.2",
|
|
211
211
|
"eslint-plugin-wdio": "~8.20.0",
|
|
212
212
|
"execa": "~8.0.1",
|
|
213
213
|
"express": "~4.18.2",
|
|
@@ -235,19 +235,19 @@
|
|
|
235
235
|
"jscodeshift": "~0.15.1",
|
|
236
236
|
"jsdoc": "~4.0.2",
|
|
237
237
|
"lerna": "~7.4.2",
|
|
238
|
-
"lint-staged": "~15.0
|
|
238
|
+
"lint-staged": "~15.1.0",
|
|
239
239
|
"mini-css-extract-plugin": "~2.7.6",
|
|
240
240
|
"minimist": "~1.2.8",
|
|
241
241
|
"moment": "~2.29.4",
|
|
242
242
|
"moment-locales-webpack-plugin": "~1.2.0",
|
|
243
|
-
"msw": "~2.0.
|
|
243
|
+
"msw": "~2.0.6",
|
|
244
244
|
"npm-run-all": "~4.1.5",
|
|
245
245
|
"node-gyp": "~10.0.1",
|
|
246
246
|
"node-plop": "~0.32.0",
|
|
247
247
|
"nodemon": "~3.0.1",
|
|
248
248
|
"normalize-path": "~3.0.0",
|
|
249
249
|
"npm-check-updates": "16.14.6",
|
|
250
|
-
"nx": "~17.
|
|
250
|
+
"nx": "~17.1.2",
|
|
251
251
|
"pino": "~8.16.1",
|
|
252
252
|
"pino-http": "~8.5.1",
|
|
253
253
|
"pino-pretty": "~10.2.3",
|
|
@@ -259,12 +259,12 @@
|
|
|
259
259
|
"postcss-markdown": "~1.2.0",
|
|
260
260
|
"postcss-preset-env": "~9.3.0",
|
|
261
261
|
"postcss-syntax": "~0.36.2",
|
|
262
|
-
"prettier": "~3.0
|
|
263
|
-
"prisma": "~5.
|
|
262
|
+
"prettier": "~3.1.0",
|
|
263
|
+
"prisma": "~5.6.0",
|
|
264
264
|
"pug": "~3.0.2",
|
|
265
265
|
"pug-loader": "~2.4.0",
|
|
266
266
|
"raf": "~3.4.1",
|
|
267
|
-
"react-docgen": "~7.0.
|
|
267
|
+
"react-docgen": "~7.0.1",
|
|
268
268
|
"react-refresh": "~0.14.0",
|
|
269
269
|
"react-test-renderer": "~18.2.0",
|
|
270
270
|
"resize-observer-polyfill": "~1.5.1",
|
|
@@ -285,9 +285,10 @@
|
|
|
285
285
|
"tsconfig-paths-webpack-plugin": "~4.1.0",
|
|
286
286
|
"ts-node": "~10.9.1",
|
|
287
287
|
"tsc-alias": "~1.8.8",
|
|
288
|
-
"tsx": "~
|
|
288
|
+
"tsx": "~4.1.2",
|
|
289
289
|
"typedoc": "~0.25.3",
|
|
290
290
|
"typescript": "~5.2.2",
|
|
291
|
+
"undici": "~5.27.2",
|
|
291
292
|
"update-notifier": "~7.0.0",
|
|
292
293
|
"url-loader": "~4.1.1",
|
|
293
294
|
"uuid": "~9.0.1",
|
|
@@ -295,7 +296,7 @@
|
|
|
295
296
|
"vitest": "~0.34.6",
|
|
296
297
|
"vite-tsconfig-paths": "~4.2.1",
|
|
297
298
|
"webpack": "~5.89.0",
|
|
298
|
-
"webpack-bundle-analyzer": "~4.
|
|
299
|
+
"webpack-bundle-analyzer": "~4.10.0",
|
|
299
300
|
"webpack-cli": "~5.1.4",
|
|
300
301
|
"webpack-dev-server": "~4.15.1",
|
|
301
302
|
"webpack-manifest-plugin": "~5.0.0",
|