@elliemae/pui-cli 6.0.0-beta.5 → 6.0.0-beta.50

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.
Files changed (45) hide show
  1. package/lib/cli-commands/pack.js +1 -1
  2. package/lib/cli-commands/test.js +1 -12
  3. package/lib/cli-commands/tsc.js +103 -0
  4. package/lib/cli-commands/utils.js +9 -4
  5. package/lib/cli-commands/vitest.js +66 -0
  6. package/lib/cli.js +2 -0
  7. package/lib/lint/eslint/common.js +16 -8
  8. package/lib/lint/eslint/typescript/common.js +6 -1
  9. package/lib/lint/eslint/typescript/non-react.js +1 -1
  10. package/lib/lint/eslint/typescript/react.js +6 -1
  11. package/lib/lint/lint-staged.config.js +8 -1
  12. package/lib/lint/stylelint.config.js +0 -1
  13. package/lib/pui-config/index.js +18 -0
  14. package/lib/server/index.js +5 -9
  15. package/lib/server/middlewares/addDevMiddlewares.js +2 -2
  16. package/lib/server/middlewares/addProdMiddlewares.js +10 -3
  17. package/lib/testing/jest.config.js +26 -7
  18. package/lib/testing/mocks/matchMedia.js +12 -6
  19. package/lib/testing/mocks/pui-app-loader.js +1 -3
  20. package/lib/testing/mocks/pui-diagnostics.js +27 -35
  21. package/lib/testing/mocks/pui-user-monitoring.js +3 -5
  22. package/lib/testing/mocks/retry-axios.js +3 -5
  23. package/lib/testing/mocks/svg.js +5 -3
  24. package/lib/testing/resolver.js +47 -0
  25. package/lib/testing/setup-react-env.js +3 -0
  26. package/lib/testing/setup-tests.js +28 -4
  27. package/lib/testing/vitest.config.ts +16 -0
  28. package/lib/testing/vitest.setup.ts +0 -0
  29. package/lib/transpile/.swcrc +11 -0
  30. package/lib/transpile/esbuild.js +63 -0
  31. package/lib/transpile/react-shim.js +2 -0
  32. package/lib/transpile/swcrc.config.js +13 -0
  33. package/lib/typescript/tsc-files/index.js +66 -0
  34. package/lib/typescript/tsc-files/utils.js +16 -0
  35. package/lib/webpack/helpers.js +37 -3
  36. package/lib/webpack/webpack.base.babel.js +38 -93
  37. package/lib/webpack/webpack.dev.babel.js +6 -3
  38. package/lib/webpack/webpack.lib.base.babel.js +25 -64
  39. package/lib/webpack/webpack.lib.dev.babel.js +1 -2
  40. package/lib/webpack/webpack.lib.prod.babel.js +6 -11
  41. package/lib/webpack/webpack.prod.babel.js +30 -24
  42. package/lib/webpack/webpack.storybook.js +18 -103
  43. package/package.json +119 -108
  44. package/lib/esbuild.js +0 -39
  45. package/lib/testing/setup-styled-components-tests.js +0 -1
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.0.0-beta.5",
3
+ "version": "6.0.0-beta.50",
4
4
  "private": false,
5
- "description": "EllieMae Platform UI CLI",
5
+ "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
7
7
  "main": "./lib/index.js",
8
8
  "module": "./lib/index.js",
@@ -20,10 +20,10 @@
20
20
  "url": "https://git.elliemae.io/platform-ui/pui-cli.git"
21
21
  },
22
22
  "engines": {
23
- "npm": ">=7",
24
- "node": ">=14"
23
+ "pnpm": ">=6",
24
+ "node": ">=16"
25
25
  },
26
- "author": "Vinoth Kalyanasundaram",
26
+ "author": "ICE MT",
27
27
  "license": "MIT",
28
28
  "scripts": {
29
29
  "build": "exit 0",
@@ -34,11 +34,11 @@
34
34
  "release": "semantic-release",
35
35
  "test": "ts-node -r tsconfig-paths/register ./lib/cli test -p",
36
36
  "test:staged": "jest --coverage --passWithNoTests --bail --findRelatedTests",
37
- "setup": "rimraf -r node_modules && rimraf package-lock.json && npm i",
37
+ "setup": "rimraf -r node_modules && rimraf pnpm-lock.yaml && pnpm i",
38
38
  "storybook:build": "exit 0",
39
39
  "storybook:docs:build": "exit 0",
40
40
  "upgrade": "ncu -u && npm run setup",
41
- "prepare": "husky install"
41
+ "prepare": "[ -n \"$CI\" ] || husky install"
42
42
  },
43
43
  "jestSonar": {
44
44
  "sonar56x": true,
@@ -47,58 +47,54 @@
47
47
  "indent": 4
48
48
  },
49
49
  "dependencies": {
50
- "@babel/cli": "~7.16.0",
51
- "@babel/core": "~7.16.0",
52
- "@babel/eslint-parser": "~7.16.3",
53
- "@babel/node": "~7.16.0",
54
- "@babel/plugin-proposal-class-properties": "~7.16.0",
55
- "@babel/plugin-proposal-export-default-from": "~7.16.0",
50
+ "@babel/cli": "~7.16.8",
51
+ "@babel/core": "~7.16.7",
52
+ "@babel/eslint-parser": "~7.16.5",
53
+ "@babel/node": "~7.16.8",
54
+ "@babel/plugin-proposal-class-properties": "~7.16.7",
55
+ "@babel/plugin-proposal-export-default-from": "~7.16.7",
56
56
  "@babel/plugin-syntax-dynamic-import": "~7.8.3",
57
- "@babel/plugin-transform-modules-commonjs": "~7.16.0",
58
- "@babel/plugin-transform-react-constant-elements": "~7.16.0",
59
- "@babel/plugin-transform-react-inline-elements": "~7.16.0",
60
- "@babel/plugin-transform-react-jsx-source": "~7.16.0",
61
- "@babel/plugin-transform-runtime": "~7.16.4",
62
- "@babel/preset-env": "~7.16.4",
63
- "@babel/preset-react": "~7.16.0",
64
- "@babel/preset-typescript": "~7.16.0",
65
- "@babel/runtime": "~7.16.3",
66
- "@commitlint/cli": "~15.0.0",
67
- "@commitlint/config-conventional": "~15.0.0",
57
+ "@babel/plugin-transform-modules-commonjs": "~7.16.8",
58
+ "@babel/plugin-transform-react-constant-elements": "~7.16.7",
59
+ "@babel/plugin-transform-react-inline-elements": "~7.16.7",
60
+ "@babel/plugin-transform-react-jsx-source": "~7.16.7",
61
+ "@babel/plugin-transform-runtime": "~7.16.8",
62
+ "@babel/preset-env": "~7.16.8",
63
+ "@babel/preset-react": "~7.16.7",
64
+ "@babel/preset-typescript": "~7.16.7",
65
+ "@babel/runtime": "~7.16.7",
66
+ "@commitlint/cli": "~16.0.2",
67
+ "@commitlint/config-conventional": "~16.0.0",
68
68
  "@elliemae/browserslist-config-elliemae": "~1.2.1",
69
- "@pmmmwh/react-refresh-webpack-plugin": "~0.5.2",
69
+ "@pmmmwh/react-refresh-webpack-plugin": "~0.5.4",
70
70
  "@semantic-release/changelog": "~6.0.1",
71
- "@semantic-release/exec": "~6.0.2",
71
+ "@semantic-release/exec": "~6.0.3",
72
72
  "@semantic-release/git": "~10.0.1",
73
- "@storybook/addon-a11y": "~6.3.12",
74
- "@storybook/addon-actions": "~6.3.12",
75
- "@storybook/addon-backgrounds": "~6.3.12",
76
- "@storybook/addon-console": "~1.2.3",
77
- "@storybook/addon-controls": "~6.3.12",
78
- "@storybook/addon-docs": "~6.3.12",
73
+ "@storybook/addon-a11y": "~6.4.13",
74
+ "@storybook/addon-essentials": "~6.4.13",
79
75
  "@storybook/addon-events": "~6.2.9",
80
- "@storybook/addon-knobs": "~6.3.1",
81
- "@storybook/addon-links": "~6.3.12",
82
- "@storybook/addon-storysource": "~6.3.12",
83
- "@storybook/addon-toolbars": "~6.3.12",
84
- "@storybook/addon-viewport": "~6.3.12",
85
- "@storybook/addons": "~6.3.12",
86
- "@storybook/builder-webpack5": "~6.3.12",
87
- "@storybook/manager-webpack5": "~6.3.12",
88
- "@storybook/react": "~6.3.12",
89
- "@storybook/theming": "~6.3.12",
76
+ "@storybook/addon-interactions": "~6.4.13",
77
+ "@storybook/addon-links": "~6.4.13",
78
+ "@storybook/addon-storysource": "~6.4.13",
79
+ "@storybook/builder-webpack5": "~6.4.13",
80
+ "@storybook/manager-webpack5": "~6.4.13",
81
+ "@storybook/react": "~6.4.13",
82
+ "@storybook/theming": "~6.4.13",
90
83
  "@stylelint/postcss-css-in-js": "~0.37.2",
91
- "@svgr/webpack": "~5.5.0",
92
- "@testing-library/jest-dom": "~5.15.1",
84
+ "@svgr/webpack": "~6.2.0",
85
+ "@swc/cli": "~0.1.55",
86
+ "@swc/core": "~1.2.129",
87
+ "@swc/jest": "~0.2.17",
88
+ "@testing-library/jest-dom": "~5.16.1",
93
89
  "@testing-library/react": "~12.1.2",
94
90
  "@testing-library/react-hooks": "~7.0.2",
95
- "@types/jest": "~27.0.3",
96
- "@types/node": "~16.11.10",
91
+ "@types/jest": "~27.4.0",
92
+ "@types/node": "~17.0.8",
97
93
  "@types/rimraf": "~3.0.2",
98
- "@types/testing-library__jest-dom": "~5.14.1",
99
- "@typescript-eslint/eslint-plugin": "~5.4.0",
100
- "@typescript-eslint/parser": "~5.4.0",
101
- "autoprefixer": "~10.4.0",
94
+ "@types/testing-library__jest-dom": "~5.14.2",
95
+ "@typescript-eslint/eslint-plugin": "~5.9.1",
96
+ "@typescript-eslint/parser": "~5.9.1",
97
+ "autoprefixer": "~10.4.2",
102
98
  "axe-core": "~4.3.5",
103
99
  "babel-loader": "~8.2.3",
104
100
  "babel-plugin-add-import-extension": "1.5.1",
@@ -108,96 +104,105 @@
108
104
  "babel-plugin-lodash": "~3.3.4",
109
105
  "babel-plugin-module-resolver": "~4.1.0",
110
106
  "babel-plugin-source-map-support": "~2.1.3",
111
- "babel-plugin-styled-components": "~2.0.1",
107
+ "babel-plugin-styled-components": "~2.0.2",
112
108
  "babel-plugin-transform-react-remove-prop-types": "~0.4.24",
113
109
  "babel-plugin-transform-remove-console": "~6.9.4",
114
- "babel-plugin-transform-strip-block": "~0.0.4",
115
- "body-parser": "~1.19.0",
116
- "browserslist": "~4.18.1",
110
+ "babel-plugin-transform-strip-block": "~0.0.5",
111
+ "body-parser": "~1.19.1",
112
+ "browserslist": "~4.19.1",
113
+ "browserslist-to-esbuild": "~1.1.1",
117
114
  "bundlesize": "~0.18.1",
118
115
  "case-sensitive-paths-webpack-plugin": "~2.4.0",
119
116
  "chalk": "~4.1.2",
120
117
  "circular-dependency-plugin": "~5.2.2",
121
118
  "classnames": "~2.3.1",
122
- "compare-versions": "~4.1.1",
119
+ "compare-versions": "~4.1.3",
123
120
  "compression": "~1.7.4",
124
- "compression-webpack-plugin": "~9.0.1",
125
- "copy-webpack-plugin": "~10.0.0",
121
+ "compression-webpack-plugin": "~9.2.0",
122
+ "copy-webpack-plugin": "~10.2.0",
126
123
  "cors": "~2.8.5",
127
124
  "cross-env": "~7.0.3",
128
125
  "css-loader": "~6.5.1",
129
- "css-minimizer-webpack-plugin": "~3.2.0",
130
- "depcheck": "~1.4.2",
126
+ "css-minimizer-webpack-plugin": "~3.3.1",
127
+ "depcheck": "~1.4.3",
131
128
  "docdash": "~1.2.0",
132
- "dotenv": "~10.0.0",
129
+ "dotenv": "~12.0.4",
133
130
  "dotenv-webpack": "~7.0.3",
134
131
  "duplicate-package-checker-webpack-plugin": "~3.0.0",
135
- "esbuild": "~0.13.15",
136
- "esbuild-loader": "~2.16.0",
137
- "eslint": "~8.3.0",
138
- "eslint-config-airbnb": "~18.2.1",
132
+ "enhanced-resolve": "~5.8.3",
133
+ "esbuild": "~0.14.11",
134
+ "esbuild-jest": "~0.5.0",
135
+ "esbuild-loader": "~2.18.0",
136
+ "esbuild-plugin-svgr": "~1.0.0",
137
+ "eslint": "~8.7.0",
138
+ "eslint-config-airbnb": "~19.0.4",
139
139
  "eslint-config-airbnb-base": "~15.0.0",
140
- "eslint-config-airbnb-typescript": "~15.0.0",
140
+ "eslint-config-airbnb-typescript": "~16.1.0",
141
141
  "eslint-config-prettier": "~8.3.0",
142
- "eslint-config-react-app": "~6.0.0",
142
+ "eslint-config-react-app": "~7.0.0",
143
143
  "eslint-import-resolver-babel-module": "~5.3.1",
144
144
  "eslint-import-resolver-typescript": "~2.5.0",
145
145
  "eslint-import-resolver-webpack": "~0.13.2",
146
- "eslint-plugin-compat": "~3.13.0",
146
+ "eslint-plugin-compat": "~4.0.1",
147
147
  "eslint-plugin-eslint-comments": "~3.2.0",
148
- "eslint-plugin-import": "~2.25.3",
149
- "eslint-plugin-jest": "~25.3.0",
150
- "eslint-plugin-jsdoc": "~37.0.3",
148
+ "eslint-plugin-import": "~2.25.4",
149
+ "eslint-plugin-jest": "~25.7.0",
150
+ "eslint-plugin-jsdoc": "~37.6.1",
151
151
  "eslint-plugin-jsx-a11y": "~6.5.1",
152
152
  "eslint-plugin-mdx": "~1.16.0",
153
153
  "eslint-plugin-prettier": "~4.0.0",
154
- "eslint-plugin-react": "~7.27.1",
154
+ "eslint-plugin-react": "~7.28.0",
155
155
  "eslint-plugin-react-hooks": "~4.3.0",
156
- "eslint-plugin-redux-saga": "~1.2.1",
157
- "eslint-plugin-testing-library": "~5.0.0",
156
+ "eslint-plugin-redux-saga": "~1.3.2",
157
+ "eslint-plugin-storybook": "~0.5.5",
158
+ "eslint-plugin-testing-library": "~5.0.3",
158
159
  "eslint-plugin-wdio": "~7.4.2",
159
160
  "execa": "~5.1.1",
160
- "express": "~4.17.1",
161
+ "express": "~4.17.2",
161
162
  "express-pino-logger": "~7.0.0",
163
+ "express-static-gzip": "~2.1.1",
164
+ "favicons": "~6.2.2",
165
+ "favicons-webpack-plugin": "~5.0.2",
162
166
  "file-loader": "~6.2.0",
163
- "fork-ts-checker-webpack-plugin": "~6.4.2",
167
+ "fork-ts-checker-webpack-plugin": "~6.5.0",
168
+ "happy-dom": "~2.25.2",
164
169
  "helmet-csp": "~3.4.0",
165
- "html-loader": "~3.0.1",
170
+ "html-loader": "~3.1.0",
166
171
  "html-webpack-plugin": "~5.5.0",
167
- "http-server": "~14.0.0",
172
+ "http-server": "~14.1.0",
168
173
  "husky": "~7.0.4",
169
174
  "husky-init": "~7.0.0",
170
- "image-webpack-loader": "~8.0.1",
171
175
  "imports-loader": "~3.1.1",
172
176
  "ip": "~1.1.5",
173
177
  "jest-axe": "~5.0.1",
174
- "jest-cli": "~27.3.1",
178
+ "jest-cli": "~27.4.7",
175
179
  "jest-sonar-reporter": "~2.0.0",
176
180
  "jest-styled-components": "~7.0.8",
177
- "jscodeshift": "~0.13.0",
181
+ "jscodeshift": "~0.13.1",
178
182
  "jsdoc": "~3.6.7",
179
- "lint-staged": "~12.1.2",
180
- "mini-css-extract-plugin": "~2.4.5",
183
+ "lint-staged": "~12.1.7",
184
+ "mini-css-extract-plugin": "~2.4.7",
181
185
  "minimist": "~1.2.5",
182
186
  "moment": "~2.29.1",
183
187
  "moment-locales-webpack-plugin": "~1.2.0",
184
- "msw": "~0.35.0",
185
- "node-plop": "~0.26.3",
188
+ "msw": "~0.36.4",
189
+ "node-gyp": "~8.4.1",
190
+ "node-plop": "~0.30.0",
186
191
  "nodemon": "~2.0.15",
187
- "npm-check-updates": "12.0.2",
192
+ "npm-check-updates": "12.1.0",
188
193
  "null-loader": "~4.0.1",
189
- "pino": "~7.4.1",
190
- "pino-pretty": "~7.2.0",
194
+ "pino": "~7.6.3",
195
+ "pino-pretty": "~7.3.0",
191
196
  "pinst": "~2.1.6",
192
- "plop": "~2.7.6",
193
- "postcss": "~8.4.1",
194
- "postcss-jsx": "~0.36.4",
197
+ "plop": "~3.0.5",
198
+ "postcss": "~8.4.5",
195
199
  "postcss-html": "~1.3.0",
200
+ "postcss-jsx": "~0.36.4",
201
+ "postcss-loader": "~6.2.1",
196
202
  "postcss-markdown": "~1.2.0",
203
+ "postcss-preset-env": "~7.2.3",
197
204
  "postcss-syntax": "~0.36.2",
198
- "postcss-loader": "~6.2.0",
199
- "postcss-preset-env": "~7.0.1",
200
- "prettier": "~2.5.0",
205
+ "prettier": "~2.5.1",
201
206
  "pug": "~3.0.2",
202
207
  "pug-loader": "~2.4.0",
203
208
  "raf": "~3.4.1",
@@ -207,46 +212,52 @@
207
212
  "react-refresh": "~0.11.0",
208
213
  "react-test-renderer": "~17.0.2",
209
214
  "resize-observer-polyfill": "~1.5.1",
215
+ "resolve-typescript-plugin": "~1.1.4",
210
216
  "rimraf": "~3.0.2",
211
217
  "script-loader": "~0.7.2",
212
218
  "semantic-release": "~18.0.1",
213
- "shelljs": "~0.8.4",
214
- "slackify-markdown": "~4.3.0",
215
- "storybook-react-router": "~1.0.8",
219
+ "shelljs": "~0.8.5",
220
+ "slackify-markdown": "~4.3.1",
221
+ "speed-measure-webpack-plugin": "~1.5.0",
216
222
  "storybook-addon-turbo-build": "~1.0.1",
223
+ "storybook-builder-vite": "~0.1.13",
224
+ "storybook-react-router": "~1.0.8",
217
225
  "style-loader": "~3.3.1",
218
- "stylelint": "~14.1.0",
226
+ "stylelint": "~14.2.0",
219
227
  "stylelint-config-recommended": "~6.0.0",
220
228
  "stylelint-config-styled-components": "~0.1.1",
221
- "stylelint-custom-processor-loader": "~0.6.0",
222
- "stylelint-processor-styled-components": "~1.10.0",
223
229
  "svg-url-loader": "~7.1.1",
224
230
  "svgo": "~2.8.0",
225
- "terser-webpack-plugin": "~5.2.5",
231
+ "swc-loader": "~0.1.15",
232
+ "terser-webpack-plugin": "~5.3.0",
226
233
  "ts-node": "~10.4.0",
227
- "tsc-alias": "~1.4.1",
234
+ "tsc-alias": "~1.5.0",
228
235
  "tsc-files": "~1.1.3",
229
236
  "tsconfig-paths": "~3.12.0",
230
237
  "tsconfig-paths-webpack-plugin": "~3.5.2",
231
- "type-fest": "~2.6.0",
232
- "typescript": "~4.5.2",
238
+ "type-fest": "~2.9.0",
239
+ "typescript": "~4.5.4",
233
240
  "update-notifier": "~5.1.0",
234
241
  "url-loader": "~4.1.1",
235
242
  "uuid": "~8.3.2",
236
- "webpack": "~5.64.4",
243
+ "vite": "~2.7.12",
244
+ "vitest": "~0.1.17",
245
+ "webpack": "~5.66.0",
237
246
  "webpack-bundle-analyzer": "~4.5.0",
238
247
  "webpack-cli": "~4.9.1",
239
- "webpack-dev-middleware": "~5.2.2",
248
+ "webpack-dev-middleware": "~5.3.0",
240
249
  "webpack-hot-middleware": "~2.25.1",
241
- "webpack-manifest-plugin": "~4.0.2",
250
+ "webpack-manifest-plugin": "~4.1.1",
242
251
  "webpack-merge": "~5.8.0",
243
252
  "webpack-pwa-manifest": "~4.3.0",
244
253
  "webpack-strip-block": "~0.3.0",
245
254
  "whatwg-fetch": "~3.6.2",
246
- "workbox-webpack-plugin": "~6.4.1",
247
- "yargs": "~17.2.1"
255
+ "workbox-webpack-plugin": "~6.4.2",
256
+ "yargs": "~17.3.1"
248
257
  },
249
258
  "devDependencies": {
259
+ "react": "~17.0.2",
260
+ "react-dom": "~17.0.2",
250
261
  "redux": "~4.1.2",
251
262
  "redux-saga": "~1.1.3",
252
263
  "styled-components": "~5.3.3"
package/lib/esbuild.js DELETED
@@ -1,39 +0,0 @@
1
- const esbuild = require('esbuild');
2
- const fg = require('fast-glob');
3
-
4
- const ESBUILD_TARGET = 'es2020';
5
-
6
- const commonConfig = {
7
- bundle: false,
8
- target: ESBUILD_TARGET,
9
- loader: { '.js': 'jsx' },
10
- mainFields: ['module', 'browser', 'main'],
11
- };
12
-
13
- const outDir = 'dist';
14
-
15
- const build = async ({ srcPath, commonJS }) => {
16
- const entryPoints = await fg([
17
- `${srcPath}/**/*.{js,jsx,ts,tsx}`,
18
- `!${srcPath}/**/*.test.{js,jsx,ts,tsx}`,
19
- `!${srcPath}/**/*.stories.{js,jsx,ts,tsx}`,
20
- ]);
21
- if (!commonJS) {
22
- await esbuild.build({
23
- entryPoints,
24
- ...commonConfig,
25
- outdir: `${outDir}/es`,
26
- format: 'esm',
27
- });
28
- } else {
29
- await esbuild.build({
30
- entryPoints,
31
- ...commonConfig,
32
- outdir: `${outDir}/cjs`,
33
- format: 'cjs',
34
- });
35
- }
36
- };
37
-
38
- exports.esBuild = build;
39
- exports.ESBUILD_TARGET = ESBUILD_TARGET;
@@ -1 +0,0 @@
1
- import 'jest-styled-components';