@elliemae/pui-cli 6.0.0-beta.38 → 6.0.0-beta.41
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.
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const { exit } = require('yargs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { exec, logError, logSuccess } = require('./utils');
|
|
4
|
+
|
|
5
|
+
const { CI = false } = process.env;
|
|
6
|
+
|
|
7
|
+
const configPath = path.resolve(__dirname, '../testing/vitest.config.ts');
|
|
8
|
+
|
|
9
|
+
async function test(commandOptions) {
|
|
10
|
+
await exec(
|
|
11
|
+
`cross-env FORCE_COLOR=true vitest --config ${configPath} ${commandOptions}`,
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line max-statements
|
|
16
|
+
async function handler(argv) {
|
|
17
|
+
let commandOptions = '--coverage';
|
|
18
|
+
if (argv.fix) commandOptions = '-u';
|
|
19
|
+
else if (argv.watch) commandOptions = '--watch';
|
|
20
|
+
if (argv.p) commandOptions += ' --passWithNoTests';
|
|
21
|
+
if (argv.r) commandOptions += ' --related';
|
|
22
|
+
if (argv.s) commandOptions += ' --silent';
|
|
23
|
+
try {
|
|
24
|
+
if (CI) {
|
|
25
|
+
await exec('rimraf ./reports');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line jest/valid-title, jest/no-disabled-tests, jest/expect-expect
|
|
29
|
+
await test(commandOptions);
|
|
30
|
+
logSuccess('Unit test execution completed');
|
|
31
|
+
} catch (err) {
|
|
32
|
+
logError('Unit test execution failed', err);
|
|
33
|
+
exit(-1, err);
|
|
34
|
+
return -1;
|
|
35
|
+
}
|
|
36
|
+
return 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
exports.command = 'vitest [options]';
|
|
40
|
+
|
|
41
|
+
exports.describe = 'unit tests application code using vitest';
|
|
42
|
+
|
|
43
|
+
exports.builder = {
|
|
44
|
+
fix: {
|
|
45
|
+
alias: 'f',
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
},
|
|
48
|
+
watch: {
|
|
49
|
+
alias: 'w',
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
},
|
|
52
|
+
passWithNoTests: {
|
|
53
|
+
alias: 'p',
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
},
|
|
56
|
+
related: {
|
|
57
|
+
alias: 'r',
|
|
58
|
+
type: 'boolean',
|
|
59
|
+
},
|
|
60
|
+
silent: {
|
|
61
|
+
alias: 's',
|
|
62
|
+
type: 'boolean',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
exports.handler = handler;
|
package/lib/cli.js
CHANGED
|
@@ -12,6 +12,7 @@ const lintCmd = require('./cli-commands/lint');
|
|
|
12
12
|
const gendocCmd = require('./cli-commands/gendoc');
|
|
13
13
|
const codemodCmd = require('./cli-commands/codemod');
|
|
14
14
|
const storybookCmd = require('./cli-commands/storybook');
|
|
15
|
+
const vitestCmd = require('./cli-commands/vitest');
|
|
15
16
|
|
|
16
17
|
envConfig();
|
|
17
18
|
process.env.PATH +=
|
|
@@ -25,5 +26,6 @@ yargs.command(lintCmd).help().argv;
|
|
|
25
26
|
yargs.command(gendocCmd).help().argv;
|
|
26
27
|
yargs.command(codemodCmd).help().argv;
|
|
27
28
|
yargs.command(storybookCmd).help().argv;
|
|
29
|
+
yargs.command(vitestCmd).help().argv;
|
|
28
30
|
|
|
29
31
|
notifyUpdates();
|
|
@@ -21,6 +21,7 @@ console.error = (...args) => {
|
|
|
21
21
|
'Warning: Received `%s` for a non-boolean attribute',
|
|
22
22
|
'Warning: <%s /> is using incorrect casing.',
|
|
23
23
|
'Warning: The tag <%s> is unrecognized in this browser',
|
|
24
|
+
'Warning: Invalid arguments supplied to oneOf',
|
|
24
25
|
];
|
|
25
26
|
if (
|
|
26
27
|
ignoreList.find(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.41",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "ICE MT UI Platform CLI",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,7 +38,8 @@
|
|
|
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
|
+
"preinstall": "npx only-allow pnpm"
|
|
42
43
|
},
|
|
43
44
|
"jestSonar": {
|
|
44
45
|
"sonar56x": true,
|
|
@@ -47,44 +48,44 @@
|
|
|
47
48
|
"indent": 4
|
|
48
49
|
},
|
|
49
50
|
"dependencies": {
|
|
50
|
-
"@babel/cli": "~7.16.
|
|
51
|
+
"@babel/cli": "~7.16.8",
|
|
51
52
|
"@babel/core": "~7.16.7",
|
|
52
53
|
"@babel/eslint-parser": "~7.16.5",
|
|
53
|
-
"@babel/node": "~7.16.
|
|
54
|
+
"@babel/node": "~7.16.8",
|
|
54
55
|
"@babel/plugin-proposal-class-properties": "~7.16.7",
|
|
55
56
|
"@babel/plugin-proposal-export-default-from": "~7.16.7",
|
|
56
57
|
"@babel/plugin-syntax-dynamic-import": "~7.8.3",
|
|
57
|
-
"@babel/plugin-transform-modules-commonjs": "~7.16.
|
|
58
|
+
"@babel/plugin-transform-modules-commonjs": "~7.16.8",
|
|
58
59
|
"@babel/plugin-transform-react-constant-elements": "~7.16.7",
|
|
59
60
|
"@babel/plugin-transform-react-inline-elements": "~7.16.7",
|
|
60
61
|
"@babel/plugin-transform-react-jsx-source": "~7.16.7",
|
|
61
|
-
"@babel/plugin-transform-runtime": "~7.16.
|
|
62
|
-
"@babel/preset-env": "~7.16.
|
|
62
|
+
"@babel/plugin-transform-runtime": "~7.16.8",
|
|
63
|
+
"@babel/preset-env": "~7.16.8",
|
|
63
64
|
"@babel/preset-react": "~7.16.7",
|
|
64
65
|
"@babel/preset-typescript": "~7.16.7",
|
|
65
66
|
"@babel/runtime": "~7.16.7",
|
|
66
|
-
"@commitlint/cli": "~16.0.
|
|
67
|
+
"@commitlint/cli": "~16.0.2",
|
|
67
68
|
"@commitlint/config-conventional": "~16.0.0",
|
|
68
69
|
"@elliemae/browserslist-config-elliemae": "~1.2.1",
|
|
69
70
|
"@pmmmwh/react-refresh-webpack-plugin": "~0.5.4",
|
|
70
71
|
"@semantic-release/changelog": "~6.0.1",
|
|
71
72
|
"@semantic-release/exec": "~6.0.3",
|
|
72
73
|
"@semantic-release/git": "~10.0.1",
|
|
73
|
-
"@storybook/addon-a11y": "~6.4.
|
|
74
|
-
"@storybook/addon-essentials": "~6.4.
|
|
74
|
+
"@storybook/addon-a11y": "~6.4.12",
|
|
75
|
+
"@storybook/addon-essentials": "~6.4.12",
|
|
75
76
|
"@storybook/addon-events": "~6.2.9",
|
|
76
|
-
"@storybook/addon-interactions": "~6.4.
|
|
77
|
-
"@storybook/addon-links": "~6.4.
|
|
78
|
-
"@storybook/addon-storysource": "~6.4.
|
|
79
|
-
"@storybook/builder-webpack5": "~6.4.
|
|
80
|
-
"@storybook/manager-webpack5": "~6.4.
|
|
81
|
-
"@storybook/react": "~6.4.
|
|
82
|
-
"@storybook/theming": "~6.4.
|
|
77
|
+
"@storybook/addon-interactions": "~6.4.12",
|
|
78
|
+
"@storybook/addon-links": "~6.4.12",
|
|
79
|
+
"@storybook/addon-storysource": "~6.4.12",
|
|
80
|
+
"@storybook/builder-webpack5": "~6.4.12",
|
|
81
|
+
"@storybook/manager-webpack5": "~6.4.12",
|
|
82
|
+
"@storybook/react": "~6.4.12",
|
|
83
|
+
"@storybook/theming": "~6.4.12",
|
|
83
84
|
"@stylelint/postcss-css-in-js": "~0.37.2",
|
|
84
|
-
"@svgr/webpack": "~6.
|
|
85
|
+
"@svgr/webpack": "~6.2.0",
|
|
85
86
|
"@swc/cli": "~0.1.55",
|
|
86
|
-
"@swc/core": "~1.2.
|
|
87
|
-
"@swc/jest": "~0.2.
|
|
87
|
+
"@swc/core": "~1.2.128",
|
|
88
|
+
"@swc/jest": "~0.2.16",
|
|
88
89
|
"@testing-library/jest-dom": "~5.16.1",
|
|
89
90
|
"@testing-library/react": "~12.1.2",
|
|
90
91
|
"@testing-library/react-hooks": "~7.0.2",
|
|
@@ -92,9 +93,9 @@
|
|
|
92
93
|
"@types/node": "~17.0.8",
|
|
93
94
|
"@types/rimraf": "~3.0.2",
|
|
94
95
|
"@types/testing-library__jest-dom": "~5.14.2",
|
|
95
|
-
"@typescript-eslint/eslint-plugin": "~5.9.
|
|
96
|
-
"@typescript-eslint/parser": "~5.9.
|
|
97
|
-
"autoprefixer": "~10.4.
|
|
96
|
+
"@typescript-eslint/eslint-plugin": "~5.9.1",
|
|
97
|
+
"@typescript-eslint/parser": "~5.9.1",
|
|
98
|
+
"autoprefixer": "~10.4.2",
|
|
98
99
|
"axe-core": "~4.3.5",
|
|
99
100
|
"babel-loader": "~8.2.3",
|
|
100
101
|
"babel-plugin-add-import-extension": "1.5.1",
|
|
@@ -115,7 +116,7 @@
|
|
|
115
116
|
"chalk": "~4.1.2",
|
|
116
117
|
"circular-dependency-plugin": "~5.2.2",
|
|
117
118
|
"classnames": "~2.3.1",
|
|
118
|
-
"compare-versions": "~4.1.
|
|
119
|
+
"compare-versions": "~4.1.3",
|
|
119
120
|
"compression": "~1.7.4",
|
|
120
121
|
"compression-webpack-plugin": "~9.2.0",
|
|
121
122
|
"copy-webpack-plugin": "~10.2.0",
|
|
@@ -123,13 +124,13 @@
|
|
|
123
124
|
"cross-env": "~7.0.3",
|
|
124
125
|
"css-loader": "~6.5.1",
|
|
125
126
|
"css-minimizer-webpack-plugin": "~3.3.1",
|
|
126
|
-
"depcheck": "~1.4.
|
|
127
|
+
"depcheck": "~1.4.3",
|
|
127
128
|
"docdash": "~1.2.0",
|
|
128
|
-
"dotenv": "~
|
|
129
|
+
"dotenv": "~11.0.0",
|
|
129
130
|
"dotenv-webpack": "~7.0.3",
|
|
130
131
|
"duplicate-package-checker-webpack-plugin": "~3.0.0",
|
|
131
132
|
"enhanced-resolve": "~5.8.3",
|
|
132
|
-
"esbuild": "~0.14.
|
|
133
|
+
"esbuild": "~0.14.11",
|
|
133
134
|
"esbuild-jest": "~0.5.0",
|
|
134
135
|
"esbuild-loader": "~2.18.0",
|
|
135
136
|
"esbuild-plugin-svgr": "~1.0.0",
|
|
@@ -142,11 +143,11 @@
|
|
|
142
143
|
"eslint-import-resolver-babel-module": "~5.3.1",
|
|
143
144
|
"eslint-import-resolver-typescript": "~2.5.0",
|
|
144
145
|
"eslint-import-resolver-webpack": "~0.13.2",
|
|
145
|
-
"eslint-plugin-compat": "~4.0.
|
|
146
|
+
"eslint-plugin-compat": "~4.0.1",
|
|
146
147
|
"eslint-plugin-eslint-comments": "~3.2.0",
|
|
147
148
|
"eslint-plugin-import": "~2.25.4",
|
|
148
149
|
"eslint-plugin-jest": "~25.3.4",
|
|
149
|
-
"eslint-plugin-jsdoc": "~37.
|
|
150
|
+
"eslint-plugin-jsdoc": "~37.6.1",
|
|
150
151
|
"eslint-plugin-jsx-a11y": "~6.5.1",
|
|
151
152
|
"eslint-plugin-mdx": "~1.16.0",
|
|
152
153
|
"eslint-plugin-prettier": "~4.0.0",
|
|
@@ -154,52 +155,52 @@
|
|
|
154
155
|
"eslint-plugin-react-hooks": "~4.3.0",
|
|
155
156
|
"eslint-plugin-redux-saga": "~1.3.2",
|
|
156
157
|
"eslint-plugin-storybook": "~0.5.5",
|
|
157
|
-
"eslint-plugin-testing-library": "~5.0.
|
|
158
|
+
"eslint-plugin-testing-library": "~5.0.3",
|
|
158
159
|
"eslint-plugin-wdio": "~7.4.2",
|
|
159
|
-
"express-static-gzip": "~2.1.1",
|
|
160
160
|
"execa": "~5.1.1",
|
|
161
161
|
"express": "~4.17.2",
|
|
162
162
|
"express-pino-logger": "~7.0.0",
|
|
163
|
+
"express-static-gzip": "~2.1.1",
|
|
163
164
|
"favicons": "~6.2.2",
|
|
164
165
|
"favicons-webpack-plugin": "~5.0.2",
|
|
165
166
|
"file-loader": "~6.2.0",
|
|
166
167
|
"fork-ts-checker-webpack-plugin": "~6.5.0",
|
|
167
168
|
"helmet-csp": "~3.4.0",
|
|
168
|
-
"html-loader": "~3.0
|
|
169
|
+
"html-loader": "~3.1.0",
|
|
169
170
|
"html-webpack-plugin": "~5.5.0",
|
|
170
|
-
"http-server": "~14.
|
|
171
|
+
"http-server": "~14.1.0",
|
|
171
172
|
"husky": "~7.0.4",
|
|
172
173
|
"husky-init": "~7.0.0",
|
|
173
174
|
"imports-loader": "~3.1.1",
|
|
174
175
|
"ip": "~1.1.5",
|
|
175
176
|
"jest-axe": "~5.0.1",
|
|
176
|
-
"jest-cli": "~27.4.
|
|
177
|
+
"jest-cli": "~27.4.7",
|
|
177
178
|
"jest-sonar-reporter": "~2.0.0",
|
|
178
179
|
"jest-styled-components": "~7.0.8",
|
|
179
|
-
"jscodeshift": "~0.13.
|
|
180
|
+
"jscodeshift": "~0.13.1",
|
|
180
181
|
"jsdoc": "~3.6.7",
|
|
181
|
-
"lint-staged": "~12.1.
|
|
182
|
-
"mini-css-extract-plugin": "~2.4.
|
|
182
|
+
"lint-staged": "~12.1.7",
|
|
183
|
+
"mini-css-extract-plugin": "~2.4.6",
|
|
183
184
|
"minimist": "~1.2.5",
|
|
184
185
|
"moment": "~2.29.1",
|
|
185
186
|
"moment-locales-webpack-plugin": "~1.2.0",
|
|
186
|
-
"msw": "~0.36.
|
|
187
|
+
"msw": "~0.36.4",
|
|
187
188
|
"node-gyp": "~8.4.1",
|
|
188
189
|
"node-plop": "~0.30.0",
|
|
189
190
|
"nodemon": "~2.0.15",
|
|
190
191
|
"npm-check-updates": "12.1.0",
|
|
191
192
|
"null-loader": "~4.0.1",
|
|
192
|
-
"pino": "~7.6.
|
|
193
|
+
"pino": "~7.6.3",
|
|
193
194
|
"pino-pretty": "~7.3.0",
|
|
194
195
|
"pinst": "~2.1.6",
|
|
195
196
|
"plop": "~3.0.5",
|
|
196
197
|
"postcss": "~8.4.5",
|
|
197
|
-
"postcss-jsx": "~0.36.4",
|
|
198
198
|
"postcss-html": "~1.3.0",
|
|
199
|
+
"postcss-jsx": "~0.36.4",
|
|
200
|
+
"postcss-loader": "~6.2.1",
|
|
199
201
|
"postcss-markdown": "~1.2.0",
|
|
202
|
+
"postcss-preset-env": "~7.2.3",
|
|
200
203
|
"postcss-syntax": "~0.36.2",
|
|
201
|
-
"postcss-loader": "~6.2.1",
|
|
202
|
-
"postcss-preset-env": "~7.2.0",
|
|
203
204
|
"prettier": "~2.5.1",
|
|
204
205
|
"pug": "~3.0.2",
|
|
205
206
|
"pug-loader": "~2.4.0",
|
|
@@ -214,17 +215,15 @@
|
|
|
214
215
|
"rimraf": "~3.0.2",
|
|
215
216
|
"script-loader": "~0.7.2",
|
|
216
217
|
"semantic-release": "~18.0.1",
|
|
217
|
-
"shelljs": "~0.8.
|
|
218
|
+
"shelljs": "~0.8.5",
|
|
218
219
|
"slackify-markdown": "~4.3.1",
|
|
219
|
-
"storybook-builder-vite": "~0.1.13",
|
|
220
220
|
"storybook-addon-turbo-build": "~1.0.1",
|
|
221
|
+
"storybook-builder-vite": "~0.1.13",
|
|
221
222
|
"storybook-react-router": "~1.0.8",
|
|
222
223
|
"style-loader": "~3.3.1",
|
|
223
224
|
"stylelint": "~14.2.0",
|
|
224
225
|
"stylelint-config-recommended": "~6.0.0",
|
|
225
226
|
"stylelint-config-styled-components": "~0.1.1",
|
|
226
|
-
"stylelint-custom-processor-loader": "~0.6.0",
|
|
227
|
-
"stylelint-processor-styled-components": "~1.10.0",
|
|
228
227
|
"svg-url-loader": "~7.1.1",
|
|
229
228
|
"svgo": "~2.8.0",
|
|
230
229
|
"swc-loader": "~0.1.15",
|
|
@@ -234,18 +233,19 @@
|
|
|
234
233
|
"tsc-files": "~1.1.3",
|
|
235
234
|
"tsconfig-paths": "~3.12.0",
|
|
236
235
|
"tsconfig-paths-webpack-plugin": "~3.5.2",
|
|
237
|
-
"type-fest": "~2.
|
|
236
|
+
"type-fest": "~2.9.0",
|
|
238
237
|
"typescript": "~4.5.4",
|
|
239
238
|
"update-notifier": "~5.1.0",
|
|
240
239
|
"url-loader": "~4.1.1",
|
|
241
240
|
"uuid": "~8.3.2",
|
|
242
241
|
"vite": "~2.7.10",
|
|
243
|
-
"
|
|
242
|
+
"vitest": "~0.0.141",
|
|
243
|
+
"webpack": "~5.66.0",
|
|
244
244
|
"webpack-bundle-analyzer": "~4.5.0",
|
|
245
245
|
"webpack-cli": "~4.9.1",
|
|
246
246
|
"webpack-dev-middleware": "~5.3.0",
|
|
247
247
|
"webpack-hot-middleware": "~2.25.1",
|
|
248
|
-
"webpack-manifest-plugin": "~4.
|
|
248
|
+
"webpack-manifest-plugin": "~4.1.1",
|
|
249
249
|
"webpack-merge": "~5.8.0",
|
|
250
250
|
"webpack-pwa-manifest": "~4.3.0",
|
|
251
251
|
"webpack-strip-block": "~0.3.0",
|