@elliemae/pui-cli 6.0.0-beta.20 → 6.0.0-beta.24
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/lib/cli-commands/pack.js +1 -1
- package/lib/cli-commands/test.js +13 -15
- package/lib/lint/eslint/common.js +4 -6
- package/lib/pui-config/index.js +18 -0
- package/lib/testing/jest.config.js +14 -6
- package/lib/testing/mocks/matchMedia.js +2 -2
- package/lib/testing/mocks/pui-app-loader.js +1 -3
- package/lib/testing/mocks/pui-diagnostics.js +27 -35
- package/lib/testing/mocks/pui-user-monitoring.js +3 -5
- package/lib/testing/mocks/retry-axios.js +3 -5
- package/lib/testing/setup-tests.js +4 -4
- package/lib/{esbuild.js → transpile/esbuild.js} +13 -13
- package/lib/{react-shim.js → transpile/react-shim.js} +0 -0
- package/lib/webpack/webpack.base.babel.js +5 -4
- package/lib/webpack/webpack.dev.babel.js +0 -2
- package/lib/webpack/webpack.lib.base.babel.js +23 -9
- package/lib/webpack/webpack.lib.dev.babel.js +0 -2
- package/lib/webpack/webpack.lib.prod.babel.js +3 -2
- package/lib/webpack/webpack.prod.babel.js +3 -2
- package/lib/webpack/webpack.storybook.js +6 -1
- package/package.json +22 -20
package/lib/cli-commands/pack.js
CHANGED
|
@@ -4,7 +4,7 @@ const path = require('path');
|
|
|
4
4
|
const { writeFile, readFile } = require('fs/promises');
|
|
5
5
|
const { exec, logInfo, logError, logSuccess } = require('./utils');
|
|
6
6
|
const { isTypeScriptEnabled } = require('../typescript/util');
|
|
7
|
-
const { esBuild } = require('../esbuild');
|
|
7
|
+
const { esBuild } = require('../transpile/esbuild');
|
|
8
8
|
|
|
9
9
|
const { name } = require('../../package.json');
|
|
10
10
|
|
package/lib/cli-commands/test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { exit } = require('yargs');
|
|
2
2
|
const { exec, logError, logSuccess } = require('./utils');
|
|
3
|
-
const { lintCSS, lintJS } = require('./lint');
|
|
3
|
+
// const { lintCSS, lintJS } = require('./lint');
|
|
4
4
|
|
|
5
5
|
const { CI = false } = process.env;
|
|
6
6
|
|
|
@@ -21,20 +21,18 @@ async function handler(argv) {
|
|
|
21
21
|
if (argv.r) commandOptions += ' --bail --findRelatedTests';
|
|
22
22
|
if (argv.s) commandOptions += ' --silent';
|
|
23
23
|
try {
|
|
24
|
-
if (!CI) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
24
|
+
// if (!CI) {
|
|
25
|
+
// try {
|
|
26
|
+
// await lintJS();
|
|
27
|
+
// await lintCSS();
|
|
28
|
+
// logSuccess('Linting completed');
|
|
29
|
+
// } catch (err) {
|
|
30
|
+
// logError('Linting failed');
|
|
31
|
+
// exit(-1, err);
|
|
32
|
+
// return -1;
|
|
33
|
+
// }
|
|
34
|
+
// }
|
|
35
|
+
await exec('rimraf ./reports');
|
|
38
36
|
// eslint-disable-next-line jest/valid-title, jest/no-disabled-tests, jest/expect-expect
|
|
39
37
|
await test(commandOptions);
|
|
40
38
|
logSuccess('Unit test execution completed');
|
|
@@ -37,12 +37,10 @@ const baseRules = {
|
|
|
37
37
|
'import/prefer-default-export': 0,
|
|
38
38
|
'import/extensions': [
|
|
39
39
|
2,
|
|
40
|
-
'
|
|
40
|
+
'never',
|
|
41
41
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
ts: 'never',
|
|
45
|
-
tsx: 'never',
|
|
42
|
+
json: 'ignorePackages',
|
|
43
|
+
js: 'ignorePackages',
|
|
46
44
|
},
|
|
47
45
|
],
|
|
48
46
|
indent: [
|
|
@@ -105,7 +103,7 @@ const reactRules = {
|
|
|
105
103
|
'react/react-in-jsx-scope': 0,
|
|
106
104
|
'react/jsx-filename-extension': [
|
|
107
105
|
1,
|
|
108
|
-
{ extensions: ['.js', '.jsx', '.
|
|
106
|
+
{ extensions: ['.js', '.jsx', '.tsx', '.mdx'] },
|
|
109
107
|
],
|
|
110
108
|
'redux-saga/no-yield-in-race': 2,
|
|
111
109
|
'redux-saga/yield-effects': 2,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const { merge } = require('lodash');
|
|
4
|
+
|
|
5
|
+
const baseConfig = {
|
|
6
|
+
esBuild: {
|
|
7
|
+
target: 'es2020',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const getPUIConfig = () => {
|
|
12
|
+
const configPath = path.resolve(process.cwd(), './pui.config.js');
|
|
13
|
+
if (!fs.existsSync(configPath)) return baseConfig;
|
|
14
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
15
|
+
return merge(baseConfig, config);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.getPUIConfig = getPUIConfig;
|
|
@@ -42,8 +42,8 @@ const jestConfig = {
|
|
|
42
42
|
'!app/*/RbGenerated*/*.{js, ts, jsx, tsx}',
|
|
43
43
|
'!app/index.{js, ts, jsx, tsx}',
|
|
44
44
|
'!app/global-styles.{js, ts, jsx, tsx}',
|
|
45
|
-
'!app
|
|
46
|
-
'!lib
|
|
45
|
+
'!app/**/loadable.{js, ts, jsx, tsx}',
|
|
46
|
+
'!lib/**/loadable.{js, ts, jsx, tsx}',
|
|
47
47
|
],
|
|
48
48
|
coverageThreshold: {
|
|
49
49
|
// Todo: enable the coverage threshold later
|
|
@@ -71,12 +71,20 @@ const jestConfig = {
|
|
|
71
71
|
},
|
|
72
72
|
setupFilesAfterEnv: [`${getRootDir()}/lib/testing/setup-tests.js`],
|
|
73
73
|
setupFiles: ['raf/polyfill', 'whatwg-fetch'],
|
|
74
|
-
testRegex: '(app|lib).*/tests/.*\\.test\\.
|
|
74
|
+
testRegex: '(app|lib).*/tests/.*\\.test\\.[jt]sx?$',
|
|
75
75
|
snapshotSerializers: [],
|
|
76
76
|
testResultsProcessor: 'jest-sonar-reporter',
|
|
77
|
+
resolver: 'ts-jest-resolver',
|
|
78
|
+
transform: {
|
|
79
|
+
'^.+\\.[jt]sx?$': [
|
|
80
|
+
'esbuild-jest',
|
|
81
|
+
{
|
|
82
|
+
target: 'node14',
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
77
86
|
transformIgnorePatterns: [
|
|
78
|
-
'node_modules/(?!(@elliemae
|
|
79
|
-
'node_modules/@elliemae/em-platform-document-viewer',
|
|
87
|
+
'node_modules/(?!(@elliemae/pui-cli/lib/testing/*)/)',
|
|
80
88
|
],
|
|
81
89
|
globals: {
|
|
82
90
|
APP_CONFIG: getAppConfig(),
|
|
@@ -86,7 +94,7 @@ const jestConfig = {
|
|
|
86
94
|
testEnvironment: 'jsdom',
|
|
87
95
|
};
|
|
88
96
|
|
|
89
|
-
if (isReactModule)
|
|
97
|
+
if (isReactModule && jestConfig.setupFilesAfterEnv)
|
|
90
98
|
jestConfig.setupFilesAfterEnv.push(
|
|
91
99
|
`${getRootDir()}/lib/testing/setup-styled-components-tests.js`,
|
|
92
100
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
*/
|
|
4
|
-
export default
|
|
4
|
+
export default () => {
|
|
5
5
|
Object.defineProperty(window, 'matchMedia', {
|
|
6
6
|
value: () => ({
|
|
7
7
|
matches: false,
|
|
@@ -15,4 +15,4 @@ export default function () {
|
|
|
15
15
|
getPropertyValue: () => {},
|
|
16
16
|
}),
|
|
17
17
|
});
|
|
18
|
-
}
|
|
18
|
+
};
|
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
error: 'error',
|
|
21
|
-
audit: 'audit',
|
|
22
|
-
fatal: 'fatal',
|
|
23
|
-
},
|
|
24
|
-
Console() {
|
|
25
|
-
return {
|
|
26
|
-
log() {},
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
http() {
|
|
30
|
-
return {
|
|
31
|
-
log() {},
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
webvitals() {},
|
|
35
|
-
logUnhandledErrors() {},
|
|
1
|
+
export const logger = () => ({
|
|
2
|
+
setLogLevel() {},
|
|
3
|
+
setOptions() {},
|
|
4
|
+
info() {},
|
|
5
|
+
warn() {},
|
|
6
|
+
error() {},
|
|
7
|
+
trace() {},
|
|
8
|
+
debug() {},
|
|
9
|
+
audit() {},
|
|
10
|
+
fatal() {},
|
|
11
|
+
});
|
|
12
|
+
export const LogLevel = {
|
|
13
|
+
info: 'info',
|
|
14
|
+
debug: 'debug',
|
|
15
|
+
trace: 'trace',
|
|
16
|
+
warn: 'warn',
|
|
17
|
+
error: 'error',
|
|
18
|
+
audit: 'audit',
|
|
19
|
+
fatal: 'fatal',
|
|
36
20
|
};
|
|
21
|
+
export const Console = () => ({
|
|
22
|
+
log: () => {},
|
|
23
|
+
});
|
|
24
|
+
export const http = () => ({
|
|
25
|
+
log() {},
|
|
26
|
+
});
|
|
27
|
+
export const webvitals = () => {};
|
|
28
|
+
export const logUnhandledErrors = () => {};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
startVirtualPageMonitoringWithAutoEnd: () => {},
|
|
5
|
-
};
|
|
1
|
+
export const setCustomUserData = () => {};
|
|
2
|
+
export const setCustomVirtualPageName = () => {};
|
|
3
|
+
export const startVirtualPageMonitoringWithAutoEnd = () => {};
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import 'core-js/stable';
|
|
4
4
|
import 'regenerator-runtime/runtime';
|
|
5
5
|
import '@testing-library/jest-dom/extend-expect';
|
|
6
|
-
import
|
|
6
|
+
import jestAxe from 'jest-axe';
|
|
7
7
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
8
|
-
import addMatchMedia from './mocks/matchMedia';
|
|
9
|
-
import { logger } from './mocks/pui-diagnostics';
|
|
8
|
+
import addMatchMedia from './mocks/matchMedia.js';
|
|
9
|
+
import { logger } from './mocks/pui-diagnostics.js';
|
|
10
10
|
|
|
11
|
-
if (expect) expect.extend(toHaveNoViolations);
|
|
11
|
+
if (expect) expect.extend(jestAxe.toHaveNoViolations);
|
|
12
12
|
jest.setTimeout(60000);
|
|
13
13
|
|
|
14
14
|
const addElementToBody = (element) => {
|
|
@@ -2,12 +2,13 @@ const esbuild = require('esbuild');
|
|
|
2
2
|
const fg = require('fast-glob');
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
|
+
const { getPUIConfig } = require('../pui-config');
|
|
5
6
|
|
|
6
|
-
const
|
|
7
|
+
const { esBuild } = getPUIConfig();
|
|
7
8
|
|
|
8
9
|
const commonConfig = {
|
|
9
10
|
bundle: false,
|
|
10
|
-
target:
|
|
11
|
+
target: esBuild.target,
|
|
11
12
|
loader: { '.js': 'jsx' },
|
|
12
13
|
mainFields: ['module', 'browser', 'main'],
|
|
13
14
|
inject: [path.resolve(__dirname, './react-shim.js')],
|
|
@@ -33,30 +34,29 @@ const build = async ({ srcPath, commonJS }) => {
|
|
|
33
34
|
`!${srcPath}/**/*.stories.{js,jsx,ts,tsx}`,
|
|
34
35
|
`!${srcPath}/**/*.endpoint.{js,jsx,ts,tsx}`,
|
|
35
36
|
];
|
|
36
|
-
if (
|
|
37
|
-
const outdir = `${distFolder}/
|
|
38
|
-
const
|
|
37
|
+
if (commonJS) {
|
|
38
|
+
const outdir = `${distFolder}/cjs`;
|
|
39
|
+
const commonJSEntryPoints = await fg(inputFiles);
|
|
39
40
|
await esbuild.build({
|
|
40
|
-
entryPoints,
|
|
41
|
+
entryPoints: commonJSEntryPoints,
|
|
41
42
|
...commonConfig,
|
|
42
43
|
outdir,
|
|
43
|
-
format: '
|
|
44
|
+
format: 'cjs',
|
|
44
45
|
});
|
|
45
46
|
await copyFiles({ srcdir: srcPath, outdir });
|
|
46
47
|
} else {
|
|
47
|
-
const outdir = `${distFolder}/
|
|
48
|
-
const
|
|
49
|
-
inputFiles.concat([
|
|
48
|
+
const outdir = `${distFolder}/es`;
|
|
49
|
+
const entryPoints = await fg(
|
|
50
|
+
inputFiles.concat([`!${srcPath}/**/cjs/**/*.{js,jsx,ts,tsx}`]),
|
|
50
51
|
);
|
|
51
52
|
await esbuild.build({
|
|
52
|
-
entryPoints
|
|
53
|
+
entryPoints,
|
|
53
54
|
...commonConfig,
|
|
54
55
|
outdir,
|
|
55
|
-
format: '
|
|
56
|
+
format: 'esm',
|
|
56
57
|
});
|
|
57
58
|
await copyFiles({ srcdir: srcPath, outdir });
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
61
|
|
|
61
62
|
exports.esBuild = build;
|
|
62
|
-
exports.ESBUILD_TARGET = ESBUILD_TARGET;
|
|
File without changes
|
|
@@ -17,7 +17,8 @@ const {
|
|
|
17
17
|
getAlias,
|
|
18
18
|
getPaths,
|
|
19
19
|
} = require('./helpers');
|
|
20
|
-
const {
|
|
20
|
+
const { getPUIConfig } = require('../pui-config');
|
|
21
|
+
const { esBuild } = getPUIConfig();
|
|
21
22
|
|
|
22
23
|
const minicssLoader = {
|
|
23
24
|
loader: MiniCssExtractPlugin.loader,
|
|
@@ -152,7 +153,7 @@ module.exports = (options) => ({
|
|
|
152
153
|
loader: 'esbuild-loader',
|
|
153
154
|
options: {
|
|
154
155
|
loader: 'jsx',
|
|
155
|
-
target:
|
|
156
|
+
target: esBuild.target,
|
|
156
157
|
},
|
|
157
158
|
},
|
|
158
159
|
},
|
|
@@ -166,7 +167,7 @@ module.exports = (options) => ({
|
|
|
166
167
|
loader: 'esbuild-loader',
|
|
167
168
|
options: {
|
|
168
169
|
loader: 'tsx',
|
|
169
|
-
target:
|
|
170
|
+
target: esBuild.target,
|
|
170
171
|
},
|
|
171
172
|
},
|
|
172
173
|
},
|
|
@@ -240,6 +241,6 @@ module.exports = (options) => ({
|
|
|
240
241
|
'@elliemae/pui-diagnostics': 'emuiDiagnostics',
|
|
241
242
|
},
|
|
242
243
|
devtool: options.devtool || 'eval-source-map',
|
|
243
|
-
target: 'web',
|
|
244
|
+
target: 'web',
|
|
244
245
|
performance: options.performance || {},
|
|
245
246
|
});
|
|
@@ -19,7 +19,8 @@ const {
|
|
|
19
19
|
getAssetPath,
|
|
20
20
|
getAlias,
|
|
21
21
|
} = require('./helpers');
|
|
22
|
-
const {
|
|
22
|
+
const { getPUIConfig } = require('../pui-config');
|
|
23
|
+
const { esBuild } = getPUIConfig();
|
|
23
24
|
|
|
24
25
|
const minicssLoader = {
|
|
25
26
|
loader: MiniCssExtractPlugin.loader,
|
|
@@ -74,7 +75,7 @@ module.exports = (options) => ({
|
|
|
74
75
|
module: {
|
|
75
76
|
rules: [
|
|
76
77
|
{
|
|
77
|
-
test: /^(?!.*\.exec\.js$).*\.
|
|
78
|
+
test: /^(?!.*\.exec\.js$).*\.[jt]sx?$/,
|
|
78
79
|
enforce: 'pre',
|
|
79
80
|
exclude: /node_modules/,
|
|
80
81
|
resolve: {
|
|
@@ -91,7 +92,7 @@ module.exports = (options) => ({
|
|
|
91
92
|
],
|
|
92
93
|
},
|
|
93
94
|
{
|
|
94
|
-
test: /^(?!.*\.exec\.js$).*\.
|
|
95
|
+
test: /^(?!.*\.exec\.js$).*\.jsx?$/, // Transform all .js and .jsx files with Babel
|
|
95
96
|
exclude: excludeNodeModulesExcept(modulesToTranspile),
|
|
96
97
|
resolve: {
|
|
97
98
|
fullySpecified: false,
|
|
@@ -100,7 +101,21 @@ module.exports = (options) => ({
|
|
|
100
101
|
loader: 'esbuild-loader',
|
|
101
102
|
options: {
|
|
102
103
|
loader: 'jsx',
|
|
103
|
-
target:
|
|
104
|
+
target: esBuild.target,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
test: /^(?!.*\.exec\.js$).*\.tsx?$/, // Transform all .js and .jsx files with Babel
|
|
110
|
+
exclude: excludeNodeModulesExcept(modulesToTranspile),
|
|
111
|
+
resolve: {
|
|
112
|
+
fullySpecified: false,
|
|
113
|
+
},
|
|
114
|
+
use: {
|
|
115
|
+
loader: 'esbuild-loader',
|
|
116
|
+
options: {
|
|
117
|
+
loader: 'tsx',
|
|
118
|
+
target: esBuild.target,
|
|
104
119
|
},
|
|
105
120
|
},
|
|
106
121
|
},
|
|
@@ -155,10 +170,6 @@ module.exports = (options) => ({
|
|
|
155
170
|
exclude: excludeNodeModulesExcept(['@elliemae/*']),
|
|
156
171
|
type: 'asset/resource',
|
|
157
172
|
},
|
|
158
|
-
{
|
|
159
|
-
type: 'asset',
|
|
160
|
-
resourceQuery: /url/, // *.svg?react
|
|
161
|
-
},
|
|
162
173
|
{
|
|
163
174
|
test: /\.svg$/i,
|
|
164
175
|
issuer: /\.[jt]sx?$/,
|
|
@@ -183,6 +194,10 @@ module.exports = (options) => ({
|
|
|
183
194
|
resourceQuery: /resource/,
|
|
184
195
|
type: 'asset/resource',
|
|
185
196
|
},
|
|
197
|
+
{
|
|
198
|
+
type: 'asset',
|
|
199
|
+
resourceQuery: /url/,
|
|
200
|
+
},
|
|
186
201
|
],
|
|
187
202
|
},
|
|
188
203
|
plugins: plugins.concat(options.plugins || []),
|
|
@@ -191,7 +206,6 @@ module.exports = (options) => ({
|
|
|
191
206
|
extensions: ['.wasm', '.mjs', '.ts', '.tsx', '.js', '.jsx', '.json'],
|
|
192
207
|
mainFields: ['browser', 'module', 'main'],
|
|
193
208
|
alias: {
|
|
194
|
-
'lodash-es': 'lodash',
|
|
195
209
|
...getAlias(),
|
|
196
210
|
...((options.resolve || {}).alias || {}),
|
|
197
211
|
},
|
|
@@ -4,7 +4,8 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
4
4
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
5
5
|
const { ESBuildMinifyPlugin } = require('esbuild-loader');
|
|
6
6
|
const { getLibraryName, getCompressionPlugins } = require('./helpers');
|
|
7
|
-
const {
|
|
7
|
+
const { getPUIConfig } = require('../pui-config');
|
|
8
|
+
const { esBuild } = getPUIConfig();
|
|
8
9
|
|
|
9
10
|
const libraryName = getLibraryName();
|
|
10
11
|
|
|
@@ -23,7 +24,7 @@ module.exports = require('./webpack.lib.base.babel')({
|
|
|
23
24
|
minimize: true,
|
|
24
25
|
minimizer: [
|
|
25
26
|
new ESBuildMinifyPlugin({
|
|
26
|
-
target:
|
|
27
|
+
target: esBuild.target,
|
|
27
28
|
css: true,
|
|
28
29
|
}),
|
|
29
30
|
],
|
|
@@ -16,7 +16,8 @@ const {
|
|
|
16
16
|
isGoogleTagManagerEnabled,
|
|
17
17
|
getCompressionPlugins,
|
|
18
18
|
} = require('./helpers');
|
|
19
|
-
const {
|
|
19
|
+
const { getPUIConfig } = require('../pui-config');
|
|
20
|
+
const { esBuild } = getPUIConfig();
|
|
20
21
|
|
|
21
22
|
const getProdConfig = ({ latestVersion = true } = {}) => {
|
|
22
23
|
const { buildPath, publicPath } = getPaths(latestVersion);
|
|
@@ -41,7 +42,7 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
|
|
|
41
42
|
moduleIds: 'deterministic',
|
|
42
43
|
minimizer: [
|
|
43
44
|
new ESBuildMinifyPlugin({
|
|
44
|
-
target:
|
|
45
|
+
target: esBuild.target,
|
|
45
46
|
css: true,
|
|
46
47
|
}),
|
|
47
48
|
],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const webpack = require('webpack');
|
|
2
2
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
3
3
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
4
|
+
const ResolveTypeScriptPlugin = require('resolve-typescript-plugin').default;
|
|
4
5
|
const {
|
|
5
6
|
getAppConfig,
|
|
6
7
|
isApp,
|
|
@@ -45,7 +46,7 @@ const getAdditionalPlugins = () => [
|
|
|
45
46
|
|
|
46
47
|
const getModuleRules = () => [
|
|
47
48
|
{
|
|
48
|
-
test: /\.
|
|
49
|
+
test: /\.[jt]sx?$/,
|
|
49
50
|
enforce: 'pre',
|
|
50
51
|
exclude: /node_modules/,
|
|
51
52
|
resolve: {
|
|
@@ -87,6 +88,10 @@ exports.webpackFinal = async (config, { configType }) => {
|
|
|
87
88
|
config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
|
|
88
89
|
config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
|
|
89
90
|
config.resolve.extensions.push('.svg');
|
|
91
|
+
config.resolve.plugins = [
|
|
92
|
+
...(config.resolve.plugins || []),
|
|
93
|
+
new ResolveTypeScriptPlugin(),
|
|
94
|
+
];
|
|
90
95
|
config.externals = config.externals || {};
|
|
91
96
|
config.externals['@elliemae/pui-user-monitoring'] = 'emuiUserMonitoring';
|
|
92
97
|
config.externals['@elliemae/pui-app-loader'] = 'emuiAppLoader';
|
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.24",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "ICE MT UI Platform CLI",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -70,27 +70,27 @@
|
|
|
70
70
|
"@semantic-release/changelog": "~6.0.1",
|
|
71
71
|
"@semantic-release/exec": "~6.0.2",
|
|
72
72
|
"@semantic-release/git": "~10.0.1",
|
|
73
|
-
"@storybook/addon-a11y": "~6.4.
|
|
74
|
-
"@storybook/addon-essentials": "~6.4.
|
|
73
|
+
"@storybook/addon-a11y": "~6.4.8",
|
|
74
|
+
"@storybook/addon-essentials": "~6.4.8",
|
|
75
75
|
"@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.
|
|
76
|
+
"@storybook/addon-interactions": "~6.4.8",
|
|
77
|
+
"@storybook/addon-links": "~6.4.8",
|
|
78
|
+
"@storybook/addon-storysource": "~6.4.8",
|
|
79
|
+
"@storybook/builder-webpack5": "~6.4.8",
|
|
80
|
+
"@storybook/manager-webpack5": "~6.4.8",
|
|
81
|
+
"@storybook/react": "~6.4.8",
|
|
82
|
+
"@storybook/theming": "~6.4.8",
|
|
83
83
|
"@stylelint/postcss-css-in-js": "~0.37.2",
|
|
84
|
-
"@svgr/webpack": "~6.1.
|
|
85
|
-
"@testing-library/jest-dom": "~5.
|
|
84
|
+
"@svgr/webpack": "~6.1.1",
|
|
85
|
+
"@testing-library/jest-dom": "~5.16.1",
|
|
86
86
|
"@testing-library/react": "~12.1.2",
|
|
87
87
|
"@testing-library/react-hooks": "~7.0.2",
|
|
88
88
|
"@types/jest": "~27.0.3",
|
|
89
89
|
"@types/node": "~16.11.11",
|
|
90
90
|
"@types/rimraf": "~3.0.2",
|
|
91
91
|
"@types/testing-library__jest-dom": "~5.14.2",
|
|
92
|
-
"@typescript-eslint/eslint-plugin": "~5.
|
|
93
|
-
"@typescript-eslint/parser": "~5.
|
|
92
|
+
"@typescript-eslint/eslint-plugin": "~5.6.0",
|
|
93
|
+
"@typescript-eslint/parser": "~5.6.0",
|
|
94
94
|
"autoprefixer": "~10.4.0",
|
|
95
95
|
"axe-core": "~4.3.5",
|
|
96
96
|
"babel-loader": "~8.2.3",
|
|
@@ -125,11 +125,11 @@
|
|
|
125
125
|
"dotenv": "~10.0.0",
|
|
126
126
|
"dotenv-webpack": "~7.0.3",
|
|
127
127
|
"duplicate-package-checker-webpack-plugin": "~3.0.0",
|
|
128
|
-
"esbuild": "~0.14.
|
|
128
|
+
"esbuild": "~0.14.2",
|
|
129
129
|
"esbuild-jest": "~0.5.0",
|
|
130
130
|
"esbuild-loader": "~2.16.0",
|
|
131
131
|
"esbuild-plugin-svgr": "~0.0.3",
|
|
132
|
-
"eslint": "~8.
|
|
132
|
+
"eslint": "~8.4.0",
|
|
133
133
|
"eslint-config-airbnb": "~18.2.1",
|
|
134
134
|
"eslint-config-airbnb-base": "~15.0.0",
|
|
135
135
|
"eslint-config-airbnb-typescript": "~15.0.0",
|
|
@@ -179,10 +179,10 @@
|
|
|
179
179
|
"minimist": "~1.2.5",
|
|
180
180
|
"moment": "~2.29.1",
|
|
181
181
|
"moment-locales-webpack-plugin": "~1.2.0",
|
|
182
|
-
"msw": "~0.
|
|
182
|
+
"msw": "~0.36.0",
|
|
183
183
|
"node-plop": "~0.30.0",
|
|
184
184
|
"nodemon": "~2.0.15",
|
|
185
|
-
"npm-check-updates": "12.0.
|
|
185
|
+
"npm-check-updates": "12.0.3",
|
|
186
186
|
"null-loader": "~4.0.1",
|
|
187
187
|
"pino": "~7.5.1",
|
|
188
188
|
"pino-pretty": "~7.2.0",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"postcss-syntax": "~0.36.2",
|
|
196
196
|
"postcss-loader": "~6.2.1",
|
|
197
197
|
"postcss-preset-env": "~7.0.1",
|
|
198
|
-
"prettier": "~2.5.
|
|
198
|
+
"prettier": "~2.5.1",
|
|
199
199
|
"pug": "~3.0.2",
|
|
200
200
|
"pug-loader": "~2.4.0",
|
|
201
201
|
"raf": "~3.4.1",
|
|
@@ -205,6 +205,7 @@
|
|
|
205
205
|
"react-refresh": "~0.11.0",
|
|
206
206
|
"react-test-renderer": "~17.0.2",
|
|
207
207
|
"resize-observer-polyfill": "~1.5.1",
|
|
208
|
+
"resolve-typescript-plugin": "~1.1.1",
|
|
208
209
|
"rimraf": "~3.0.2",
|
|
209
210
|
"script-loader": "~0.7.2",
|
|
210
211
|
"semantic-release": "~18.0.1",
|
|
@@ -222,6 +223,7 @@
|
|
|
222
223
|
"svg-url-loader": "~7.1.1",
|
|
223
224
|
"svgo": "~2.8.0",
|
|
224
225
|
"terser-webpack-plugin": "~5.2.5",
|
|
226
|
+
"ts-jest-resolver": "~2.0.0",
|
|
225
227
|
"ts-node": "~10.4.0",
|
|
226
228
|
"tsc-alias": "~1.4.2",
|
|
227
229
|
"tsc-files": "~1.1.3",
|
|
@@ -233,7 +235,7 @@
|
|
|
233
235
|
"url-loader": "~4.1.1",
|
|
234
236
|
"uuid": "~8.3.2",
|
|
235
237
|
"vite": "~2.6.14",
|
|
236
|
-
"webpack": "~5.
|
|
238
|
+
"webpack": "~5.65.0",
|
|
237
239
|
"webpack-bundle-analyzer": "~4.5.0",
|
|
238
240
|
"webpack-cli": "~4.9.1",
|
|
239
241
|
"webpack-dev-middleware": "~5.2.2",
|