@elliemae/pui-cli 6.0.0-beta.8 → 6.0.2
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/README.md +8 -0
- package/lib/cli-commands/build.js +11 -5
- package/lib/cli-commands/pack.js +18 -78
- package/lib/cli-commands/test.js +1 -12
- package/lib/cli-commands/tsc.js +103 -0
- package/lib/cli-commands/utils.js +9 -4
- package/lib/cli-commands/vitest.js +66 -0
- package/lib/cli.js +2 -0
- package/lib/index.js +3 -1
- package/lib/lint/eslint/common.js +16 -8
- package/lib/lint/eslint/typescript/common.js +6 -1
- package/lib/lint/eslint/typescript/non-react.js +1 -1
- package/lib/lint/eslint/typescript/react.js +6 -1
- package/lib/lint/lint-staged.config.js +8 -1
- package/lib/lint/stylelint.config.js +0 -1
- package/lib/pui-config/index.js +18 -0
- package/lib/server/index.js +0 -7
- package/lib/server/middlewares/addDevMiddlewares.js +2 -2
- package/lib/server/middlewares/addProdMiddlewares.js +10 -3
- package/lib/testing/jest.config.js +18 -8
- package/lib/testing/jest.node.config.js +8 -0
- package/lib/testing/mocks/matchMedia.js +12 -6
- 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/mocks/svg.js +5 -3
- package/lib/testing/mocks/webpack-hmr.js +1 -0
- package/lib/testing/resolver.js +47 -0
- package/lib/testing/setup-react-env.js +3 -0
- package/lib/testing/setup-tests.js +28 -4
- package/lib/testing/vitest.config.ts +16 -0
- package/lib/testing/vitest.setup.ts +0 -0
- package/lib/transpile/.swcrc +11 -0
- package/lib/transpile/esbuild.js +116 -0
- package/lib/transpile/react-shim.js +2 -0
- package/lib/transpile/swcrc.config.js +13 -0
- package/lib/typescript/tsc-files/index.js +66 -0
- package/lib/typescript/tsc-files/utils.js +16 -0
- package/lib/webpack/helpers.js +44 -3
- package/lib/webpack/webpack.base.babel.js +47 -81
- package/lib/webpack/webpack.dev.babel.js +16 -10
- package/lib/webpack/webpack.lib.base.babel.js +33 -55
- package/lib/webpack/webpack.lib.dev.babel.js +2 -3
- package/lib/webpack/webpack.lib.prod.babel.js +5 -11
- package/lib/webpack/webpack.prod.babel.js +29 -24
- package/lib/webpack/webpack.storybook.js +19 -98
- package/package.json +116 -124
- package/lib/esbuild.js +0 -44
- package/lib/testing/setup-styled-components-tests.js +0 -1
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
/* eslint-disable max-lines */
|
|
2
1
|
const webpack = require('webpack');
|
|
3
2
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
4
3
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
5
|
-
const
|
|
4
|
+
const ResolveTypeScriptPlugin = require('resolve-typescript-plugin').default;
|
|
6
5
|
const {
|
|
7
6
|
getAppConfig,
|
|
8
7
|
isApp,
|
|
9
8
|
getAlias,
|
|
10
|
-
|
|
11
|
-
modulesToTranspile,
|
|
12
|
-
getMediaPath,
|
|
9
|
+
getCompressionPlugins,
|
|
13
10
|
} = require('./helpers');
|
|
14
|
-
const { ESBUILD_TARGET } = require('../esbuild');
|
|
15
11
|
|
|
16
12
|
const IS_APP = isApp();
|
|
17
13
|
const CWD = process.cwd();
|
|
@@ -41,120 +37,45 @@ const getAdditionalPlugins = () => [
|
|
|
41
37
|
noErrorOnMissing: true,
|
|
42
38
|
},
|
|
43
39
|
{
|
|
44
|
-
from: '
|
|
40
|
+
from: 'app/public',
|
|
45
41
|
noErrorOnMissing: true,
|
|
46
42
|
},
|
|
47
43
|
],
|
|
48
44
|
}),
|
|
49
45
|
];
|
|
50
46
|
|
|
51
|
-
const compressionPlugin = new CompressionPlugin({
|
|
52
|
-
filename: '[path][base].gz',
|
|
53
|
-
algorithm: 'gzip',
|
|
54
|
-
test: /\.js$|\.css$$/,
|
|
55
|
-
// we are compressing all files since in aws cloudfront edge lambda, we don't want to whitelist files that are not compressed due to below limits
|
|
56
|
-
minRatio: Number.MAX_SAFE_INTEGER,
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
const getModulePreRules = () => [
|
|
60
|
-
{
|
|
61
|
-
test: /\.(jpe?g|png|gif|svg|ico)$/,
|
|
62
|
-
use: [
|
|
63
|
-
'file-loader',
|
|
64
|
-
{
|
|
65
|
-
loader: 'image-webpack-loader',
|
|
66
|
-
options: {
|
|
67
|
-
gifsicle: {
|
|
68
|
-
enabled: false,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
enforce: 'pre',
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
test: /\.(js|ts|jsx|tsx)$/,
|
|
77
|
-
enforce: 'pre',
|
|
78
|
-
exclude: /node_modules/,
|
|
79
|
-
resolve: {
|
|
80
|
-
fullySpecified: false,
|
|
81
|
-
},
|
|
82
|
-
use: [
|
|
83
|
-
{
|
|
84
|
-
loader: 'webpack-strip-block',
|
|
85
|
-
options: {
|
|
86
|
-
start: 'TEST:START',
|
|
87
|
-
end: 'TEST:END',
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
},
|
|
92
|
-
];
|
|
93
|
-
|
|
94
47
|
const getModuleRules = () => [
|
|
95
48
|
{
|
|
96
|
-
test: /\.(js|ts|jsx|tsx)$/,
|
|
97
|
-
exclude: excludeNodeModulesExcept(modulesToTranspile),
|
|
98
|
-
resolve: {
|
|
99
|
-
fullySpecified: false,
|
|
100
|
-
},
|
|
101
|
-
use: {
|
|
102
|
-
loader: 'esbuild-loader',
|
|
103
|
-
options: {
|
|
104
|
-
loader: 'jsx',
|
|
105
|
-
target: ESBUILD_TARGET,
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
test: /\.(woff|woff2)$/,
|
|
111
|
-
exclude: excludeNodeModulesExcept(['@elliemae/*']),
|
|
112
|
-
type: 'asset/resource',
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
test: /\.svg$/,
|
|
116
|
-
exclude: excludeNodeModulesExcept(['@elliemae/*']),
|
|
117
|
-
use: [
|
|
118
|
-
{
|
|
119
|
-
loader: '@svgr/webpack',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
loader: 'file-loader',
|
|
123
|
-
options: {
|
|
124
|
-
name: getMediaPath(),
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
],
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
test: /\.(jpe?g|png|gif|ico)$/i,
|
|
131
|
-
exclude: excludeNodeModulesExcept(['@elliemae/*']),
|
|
132
49
|
type: 'asset',
|
|
50
|
+
resourceQuery: /url/,
|
|
133
51
|
},
|
|
134
52
|
{
|
|
135
|
-
test: /\.
|
|
136
|
-
|
|
137
|
-
|
|
53
|
+
test: /\.svg$/i,
|
|
54
|
+
issuer: /\.[jt]sx?$/,
|
|
55
|
+
resourceQuery: /^((?!url).)*$/,
|
|
56
|
+
use: ['@svgr/webpack'],
|
|
138
57
|
},
|
|
139
58
|
];
|
|
140
59
|
|
|
141
60
|
exports.webpackFinal = async (config, { configType }) => {
|
|
142
61
|
const isProd = configType === 'PRODUCTION';
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
({ type }) => type !== 'asset/resource',
|
|
62
|
+
const fileLoaderRule = config.module.rules.find((rule) =>
|
|
63
|
+
rule.test?.test?.('.svg'),
|
|
146
64
|
);
|
|
147
|
-
|
|
148
|
-
config.module.rules.unshift(...getModuleRules(
|
|
149
|
-
|
|
65
|
+
fileLoaderRule.exclude = /\.svg$/i;
|
|
66
|
+
config.module.rules.unshift(...getModuleRules());
|
|
150
67
|
config.plugins.push(...getAdditionalPlugins());
|
|
151
68
|
if (isProd) {
|
|
152
|
-
config.plugins.
|
|
69
|
+
config.plugins = config.plugins.concat(getCompressionPlugins());
|
|
153
70
|
}
|
|
154
71
|
|
|
155
72
|
config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
|
|
156
73
|
config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
|
|
157
|
-
|
|
74
|
+
config.resolve.extensions.push('.svg');
|
|
75
|
+
config.resolve.plugins = [
|
|
76
|
+
...(config.resolve.plugins || []),
|
|
77
|
+
new ResolveTypeScriptPlugin(),
|
|
78
|
+
];
|
|
158
79
|
config.externals = config.externals || {};
|
|
159
80
|
config.externals['@elliemae/pui-user-monitoring'] = 'emuiUserMonitoring';
|
|
160
81
|
config.externals['@elliemae/pui-app-loader'] = 'emuiAppLoader';
|
|
@@ -164,7 +85,7 @@ exports.webpackFinal = async (config, { configType }) => {
|
|
|
164
85
|
|
|
165
86
|
// storybook manager webpack
|
|
166
87
|
exports.managerWebpack = async (config) => {
|
|
167
|
-
config.plugins.
|
|
88
|
+
config.plugins = config.plugins.concat(getCompressionPlugins());
|
|
168
89
|
config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
|
|
169
90
|
return config;
|
|
170
91
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "
|
|
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
|
-
"
|
|
24
|
-
"node": ">=
|
|
23
|
+
"pnpm": ">=6",
|
|
24
|
+
"node": ">=16"
|
|
25
25
|
},
|
|
26
|
-
"author": "
|
|
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
|
|
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,57 +47,54 @@
|
|
|
47
47
|
"indent": 4
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@babel/cli": "~7.16.
|
|
51
|
-
"@babel/core": "~7.16.
|
|
52
|
-
"@babel/eslint-parser": "~7.16.
|
|
53
|
-
"@babel/node": "~7.16.
|
|
54
|
-
"@babel/plugin-proposal-class-properties": "~7.16.
|
|
55
|
-
"@babel/plugin-proposal-export-default-from": "~7.16.
|
|
50
|
+
"@babel/cli": "~7.16.8",
|
|
51
|
+
"@babel/core": "~7.16.10",
|
|
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.
|
|
58
|
-
"@babel/plugin-transform-react-constant-elements": "~7.16.
|
|
59
|
-
"@babel/plugin-transform-react-inline-elements": "~7.16.
|
|
60
|
-
"@babel/plugin-transform-react-jsx-source": "~7.16.
|
|
61
|
-
"@babel/plugin-transform-runtime": "~7.16.
|
|
62
|
-
"@babel/preset-env": "~7.16.
|
|
63
|
-
"@babel/preset-react": "~7.16.
|
|
64
|
-
"@babel/preset-typescript": "~7.16.
|
|
65
|
-
"@babel/runtime": "~7.16.
|
|
66
|
-
"@commitlint/cli": "~
|
|
67
|
-
"@commitlint/config-conventional": "~
|
|
68
|
-
"@elliemae/browserslist-config-elliemae": "~1.
|
|
69
|
-
"@pmmmwh/react-refresh-webpack-plugin": "~0.5.
|
|
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.10",
|
|
62
|
+
"@babel/preset-env": "~7.16.11",
|
|
63
|
+
"@babel/preset-react": "~7.16.7",
|
|
64
|
+
"@babel/preset-typescript": "~7.16.7",
|
|
65
|
+
"@babel/runtime": "~7.16.7",
|
|
66
|
+
"@commitlint/cli": "~16.1.0",
|
|
67
|
+
"@commitlint/config-conventional": "~16.0.0",
|
|
68
|
+
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.3.0",
|
|
69
|
+
"@pmmmwh/react-refresh-webpack-plugin": "~0.5.4",
|
|
70
70
|
"@semantic-release/changelog": "~6.0.1",
|
|
71
|
-
"@semantic-release/exec": "~6.0.
|
|
71
|
+
"@semantic-release/exec": "~6.0.3",
|
|
72
72
|
"@semantic-release/git": "~10.0.1",
|
|
73
|
-
"@storybook/addon-a11y": "~6.
|
|
74
|
-
"@storybook/addon-
|
|
75
|
-
"@storybook/addon-backgrounds": "~6.3.12",
|
|
76
|
-
"@storybook/addon-controls": "~6.3.12",
|
|
77
|
-
"@storybook/addon-docs": "~6.3.12",
|
|
73
|
+
"@storybook/addon-a11y": "~6.4.14",
|
|
74
|
+
"@storybook/addon-essentials": "~6.4.14",
|
|
78
75
|
"@storybook/addon-events": "~6.2.9",
|
|
79
|
-
"@storybook/addon-
|
|
80
|
-
"@storybook/addon-
|
|
81
|
-
"@storybook/addon-
|
|
82
|
-
"@storybook/
|
|
83
|
-
"@storybook/
|
|
84
|
-
"@storybook/
|
|
85
|
-
"@storybook/
|
|
86
|
-
"@storybook/react": "~6.3.12",
|
|
87
|
-
"@storybook/theming": "~6.3.12",
|
|
76
|
+
"@storybook/addon-interactions": "~6.4.14",
|
|
77
|
+
"@storybook/addon-links": "~6.4.14",
|
|
78
|
+
"@storybook/addon-storysource": "~6.4.14",
|
|
79
|
+
"@storybook/builder-webpack5": "~6.4.14",
|
|
80
|
+
"@storybook/manager-webpack5": "~6.4.14",
|
|
81
|
+
"@storybook/react": "~6.4.14",
|
|
82
|
+
"@storybook/theming": "~6.4.14",
|
|
88
83
|
"@stylelint/postcss-css-in-js": "~0.37.2",
|
|
89
|
-
"@svgr/webpack": "~
|
|
90
|
-
"@
|
|
84
|
+
"@svgr/webpack": "~6.2.0",
|
|
85
|
+
"@swc/cli": "~0.1.55",
|
|
86
|
+
"@swc/core": "~1.2.133",
|
|
87
|
+
"@swc/jest": "~0.2.17",
|
|
88
|
+
"@testing-library/jest-dom": "~5.16.1",
|
|
91
89
|
"@testing-library/react": "~12.1.2",
|
|
92
90
|
"@testing-library/react-hooks": "~7.0.2",
|
|
93
|
-
"@types/jest": "~27.0
|
|
94
|
-
"@types/node": "~
|
|
91
|
+
"@types/jest": "~27.4.0",
|
|
92
|
+
"@types/node": "~17.0.10",
|
|
95
93
|
"@types/rimraf": "~3.0.2",
|
|
96
|
-
"@types/testing-library__jest-dom": "~5.14.
|
|
97
|
-
"@typescript-eslint/eslint-plugin": "~5.
|
|
98
|
-
"@typescript-eslint/parser": "~5.
|
|
99
|
-
"
|
|
100
|
-
"autoprefixer": "~10.4.0",
|
|
94
|
+
"@types/testing-library__jest-dom": "~5.14.2",
|
|
95
|
+
"@typescript-eslint/eslint-plugin": "~5.10.0",
|
|
96
|
+
"@typescript-eslint/parser": "~5.10.0",
|
|
97
|
+
"autoprefixer": "~10.4.2",
|
|
101
98
|
"axe-core": "~4.3.5",
|
|
102
99
|
"babel-loader": "~8.2.3",
|
|
103
100
|
"babel-plugin-add-import-extension": "1.5.1",
|
|
@@ -107,148 +104,143 @@
|
|
|
107
104
|
"babel-plugin-lodash": "~3.3.4",
|
|
108
105
|
"babel-plugin-module-resolver": "~4.1.0",
|
|
109
106
|
"babel-plugin-source-map-support": "~2.1.3",
|
|
110
|
-
"babel-plugin-styled-components": "~2.0.
|
|
107
|
+
"babel-plugin-styled-components": "~2.0.2",
|
|
111
108
|
"babel-plugin-transform-react-remove-prop-types": "~0.4.24",
|
|
112
109
|
"babel-plugin-transform-remove-console": "~6.9.4",
|
|
113
|
-
"babel-plugin-transform-strip-block": "~0.0.
|
|
114
|
-
"body-parser": "~1.19.
|
|
115
|
-
"browserslist": "~4.
|
|
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",
|
|
116
114
|
"bundlesize": "~0.18.1",
|
|
117
|
-
"
|
|
115
|
+
"canvas": "~2.9.0",
|
|
118
116
|
"chalk": "~4.1.2",
|
|
119
117
|
"circular-dependency-plugin": "~5.2.2",
|
|
120
|
-
"classnames": "~2.3.1",
|
|
121
|
-
"compare-versions": "~4.1.1",
|
|
122
118
|
"compression": "~1.7.4",
|
|
123
|
-
"compression-webpack-plugin": "~9.0
|
|
124
|
-
"copy-webpack-plugin": "~10.
|
|
119
|
+
"compression-webpack-plugin": "~9.2.0",
|
|
120
|
+
"copy-webpack-plugin": "~10.2.1",
|
|
125
121
|
"cors": "~2.8.5",
|
|
126
122
|
"cross-env": "~7.0.3",
|
|
127
123
|
"css-loader": "~6.5.1",
|
|
128
|
-
"css-minimizer-webpack-plugin": "~3.
|
|
129
|
-
"depcheck": "~1.4.
|
|
124
|
+
"css-minimizer-webpack-plugin": "~3.4.1",
|
|
125
|
+
"depcheck": "~1.4.3",
|
|
130
126
|
"docdash": "~1.2.0",
|
|
131
|
-
"dotenv": "~
|
|
127
|
+
"dotenv": "~12.0.4",
|
|
132
128
|
"dotenv-webpack": "~7.0.3",
|
|
133
129
|
"duplicate-package-checker-webpack-plugin": "~3.0.0",
|
|
134
|
-
"
|
|
135
|
-
"esbuild
|
|
136
|
-
"esbuild-loader": "~2.
|
|
137
|
-
"
|
|
138
|
-
"eslint
|
|
130
|
+
"enhanced-resolve": "~5.8.3",
|
|
131
|
+
"esbuild": "~0.14.12",
|
|
132
|
+
"esbuild-loader": "~2.18.0",
|
|
133
|
+
"esbuild-plugin-svgr": "~1.0.0",
|
|
134
|
+
"eslint": "~8.7.0",
|
|
135
|
+
"eslint-config-airbnb": "~19.0.4",
|
|
139
136
|
"eslint-config-airbnb-base": "~15.0.0",
|
|
140
|
-
"eslint-config-airbnb-typescript": "~
|
|
137
|
+
"eslint-config-airbnb-typescript": "~16.1.0",
|
|
141
138
|
"eslint-config-prettier": "~8.3.0",
|
|
142
|
-
"eslint-config-react-app": "~
|
|
139
|
+
"eslint-config-react-app": "~7.0.0",
|
|
143
140
|
"eslint-import-resolver-babel-module": "~5.3.1",
|
|
144
141
|
"eslint-import-resolver-typescript": "~2.5.0",
|
|
145
142
|
"eslint-import-resolver-webpack": "~0.13.2",
|
|
146
|
-
"eslint-plugin-compat": "~
|
|
143
|
+
"eslint-plugin-compat": "~4.0.1",
|
|
147
144
|
"eslint-plugin-eslint-comments": "~3.2.0",
|
|
148
|
-
"eslint-plugin-import": "~2.25.
|
|
149
|
-
"eslint-plugin-jest": "~25.
|
|
150
|
-
"eslint-plugin-jsdoc": "~37.
|
|
145
|
+
"eslint-plugin-import": "~2.25.4",
|
|
146
|
+
"eslint-plugin-jest": "~25.7.0",
|
|
147
|
+
"eslint-plugin-jsdoc": "~37.6.3",
|
|
151
148
|
"eslint-plugin-jsx-a11y": "~6.5.1",
|
|
152
149
|
"eslint-plugin-mdx": "~1.16.0",
|
|
153
150
|
"eslint-plugin-prettier": "~4.0.0",
|
|
154
|
-
"eslint-plugin-react": "~7.
|
|
151
|
+
"eslint-plugin-react": "~7.28.0",
|
|
155
152
|
"eslint-plugin-react-hooks": "~4.3.0",
|
|
156
|
-
"eslint-plugin-redux-saga": "~1.2
|
|
157
|
-
"eslint-plugin-
|
|
153
|
+
"eslint-plugin-redux-saga": "~1.3.2",
|
|
154
|
+
"eslint-plugin-storybook": "~0.5.6",
|
|
155
|
+
"eslint-plugin-testing-library": "~5.0.4",
|
|
158
156
|
"eslint-plugin-wdio": "~7.4.2",
|
|
159
157
|
"execa": "~5.1.1",
|
|
160
|
-
"express": "~4.17.
|
|
158
|
+
"express": "~4.17.2",
|
|
161
159
|
"express-pino-logger": "~7.0.0",
|
|
162
|
-
"
|
|
163
|
-
"
|
|
160
|
+
"express-static-gzip": "~2.1.1",
|
|
161
|
+
"favicons": "~6.2.2",
|
|
162
|
+
"favicons-webpack-plugin": "~5.0.2",
|
|
163
|
+
"happy-dom": "~2.28.0",
|
|
164
164
|
"helmet-csp": "~3.4.0",
|
|
165
|
-
"html-loader": "~3.0.1",
|
|
166
165
|
"html-webpack-plugin": "~5.5.0",
|
|
167
|
-
"http-server": "~14.
|
|
166
|
+
"http-server": "~14.1.0",
|
|
168
167
|
"husky": "~7.0.4",
|
|
169
168
|
"husky-init": "~7.0.0",
|
|
170
|
-
"image-webpack-loader": "~8.0.1",
|
|
171
169
|
"imports-loader": "~3.1.1",
|
|
172
170
|
"ip": "~1.1.5",
|
|
173
171
|
"jest-axe": "~5.0.1",
|
|
174
|
-
"jest-cli": "~27.
|
|
172
|
+
"jest-cli": "~27.4.7",
|
|
175
173
|
"jest-sonar-reporter": "~2.0.0",
|
|
176
174
|
"jest-styled-components": "~7.0.8",
|
|
177
|
-
"jscodeshift": "~0.13.
|
|
175
|
+
"jscodeshift": "~0.13.1",
|
|
178
176
|
"jsdoc": "~3.6.7",
|
|
179
|
-
"lint-staged": "~12.
|
|
180
|
-
"mini-css-extract-plugin": "~2.
|
|
177
|
+
"lint-staged": "~12.2.2",
|
|
178
|
+
"mini-css-extract-plugin": "~2.5.2",
|
|
181
179
|
"minimist": "~1.2.5",
|
|
182
180
|
"moment": "~2.29.1",
|
|
183
181
|
"moment-locales-webpack-plugin": "~1.2.0",
|
|
184
|
-
"msw": "~0.
|
|
185
|
-
"node-
|
|
182
|
+
"msw": "~0.36.5",
|
|
183
|
+
"node-gyp": "~8.4.1",
|
|
184
|
+
"node-plop": "~0.30.0",
|
|
186
185
|
"nodemon": "~2.0.15",
|
|
187
|
-
"npm-check-updates": "12.
|
|
186
|
+
"npm-check-updates": "12.2.1",
|
|
188
187
|
"null-loader": "~4.0.1",
|
|
189
|
-
"pino": "~7.4
|
|
190
|
-
"pino-pretty": "~7.
|
|
188
|
+
"pino": "~7.6.4",
|
|
189
|
+
"pino-pretty": "~7.5.0",
|
|
191
190
|
"pinst": "~2.1.6",
|
|
192
|
-
"plop": "~
|
|
193
|
-
"postcss": "~8.4.
|
|
194
|
-
"postcss-jsx": "~0.36.4",
|
|
191
|
+
"plop": "~3.0.5",
|
|
192
|
+
"postcss": "~8.4.5",
|
|
195
193
|
"postcss-html": "~1.3.0",
|
|
194
|
+
"postcss-jsx": "~0.36.4",
|
|
195
|
+
"postcss-loader": "~6.2.1",
|
|
196
196
|
"postcss-markdown": "~1.2.0",
|
|
197
|
+
"postcss-preset-env": "~7.2.3",
|
|
197
198
|
"postcss-syntax": "~0.36.2",
|
|
198
|
-
"
|
|
199
|
-
"postcss-preset-env": "~7.0.1",
|
|
200
|
-
"prettier": "~2.5.0",
|
|
199
|
+
"prettier": "~2.5.1",
|
|
201
200
|
"pug": "~3.0.2",
|
|
202
201
|
"pug-loader": "~2.4.0",
|
|
203
202
|
"raf": "~3.4.1",
|
|
204
|
-
"raw-loader": "~4.0.2",
|
|
205
203
|
"react-axe": "~3.5.4",
|
|
206
204
|
"react-docgen": "~5.4.0",
|
|
207
205
|
"react-refresh": "~0.11.0",
|
|
208
206
|
"react-test-renderer": "~17.0.2",
|
|
209
207
|
"resize-observer-polyfill": "~1.5.1",
|
|
208
|
+
"resolve-typescript-plugin": "~1.1.4",
|
|
210
209
|
"rimraf": "~3.0.2",
|
|
211
|
-
"
|
|
212
|
-
"
|
|
213
|
-
"
|
|
214
|
-
"slackify-markdown": "~4.3.0",
|
|
215
|
-
"storybook-builder-vite": "~0.1.10",
|
|
216
|
-
"storybook-react-router": "~1.0.8",
|
|
210
|
+
"semantic-release": "~19.0.2",
|
|
211
|
+
"slackify-markdown": "~4.3.1",
|
|
212
|
+
"speed-measure-webpack-plugin": "~1.5.0",
|
|
217
213
|
"storybook-addon-turbo-build": "~1.0.1",
|
|
214
|
+
"storybook-builder-vite": "~0.1.13",
|
|
215
|
+
"storybook-react-router": "~1.0.8",
|
|
218
216
|
"style-loader": "~3.3.1",
|
|
219
|
-
"stylelint": "~14.
|
|
217
|
+
"stylelint": "~14.2.0",
|
|
220
218
|
"stylelint-config-recommended": "~6.0.0",
|
|
221
219
|
"stylelint-config-styled-components": "~0.1.1",
|
|
222
|
-
"
|
|
223
|
-
"
|
|
224
|
-
"svg-url-loader": "~7.1.1",
|
|
225
|
-
"svgo": "~2.8.0",
|
|
226
|
-
"terser-webpack-plugin": "~5.2.5",
|
|
220
|
+
"swc-loader": "~0.1.15",
|
|
221
|
+
"terser-webpack-plugin": "~5.3.0",
|
|
227
222
|
"ts-node": "~10.4.0",
|
|
228
|
-
"tsc-alias": "~1.
|
|
229
|
-
"
|
|
230
|
-
"tsconfig-paths": "~3.12.0",
|
|
231
|
-
"tsconfig-paths-webpack-plugin": "~3.5.2",
|
|
232
|
-
"type-fest": "~2.6.0",
|
|
233
|
-
"typescript": "~4.5.2",
|
|
223
|
+
"tsc-alias": "~1.5.0",
|
|
224
|
+
"typescript": "~4.5.5",
|
|
234
225
|
"update-notifier": "~5.1.0",
|
|
235
226
|
"url-loader": "~4.1.1",
|
|
236
227
|
"uuid": "~8.3.2",
|
|
237
|
-
"vite": "~2.
|
|
238
|
-
"
|
|
228
|
+
"vite": "~2.7.13",
|
|
229
|
+
"vitest": "~0.1.26",
|
|
230
|
+
"webpack": "~5.65.0",
|
|
239
231
|
"webpack-bundle-analyzer": "~4.5.0",
|
|
240
232
|
"webpack-cli": "~4.9.1",
|
|
241
|
-
"webpack-dev-middleware": "~5.
|
|
233
|
+
"webpack-dev-middleware": "~5.3.0",
|
|
242
234
|
"webpack-hot-middleware": "~2.25.1",
|
|
243
|
-
"webpack-manifest-plugin": "~4.
|
|
235
|
+
"webpack-manifest-plugin": "~4.1.1",
|
|
244
236
|
"webpack-merge": "~5.8.0",
|
|
245
|
-
"webpack-pwa-manifest": "~4.3.0",
|
|
246
|
-
"webpack-strip-block": "~0.3.0",
|
|
247
237
|
"whatwg-fetch": "~3.6.2",
|
|
248
|
-
"workbox-webpack-plugin": "~6.4.
|
|
249
|
-
"yargs": "~17.
|
|
238
|
+
"workbox-webpack-plugin": "~6.4.2",
|
|
239
|
+
"yargs": "~17.3.1"
|
|
250
240
|
},
|
|
251
241
|
"devDependencies": {
|
|
242
|
+
"react": "~17.0.2",
|
|
243
|
+
"react-dom": "~17.0.2",
|
|
252
244
|
"redux": "~4.1.2",
|
|
253
245
|
"redux-saga": "~1.1.3",
|
|
254
246
|
"styled-components": "~5.3.3"
|
package/lib/esbuild.js
DELETED
|
@@ -1,44 +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 inputFiles = [
|
|
17
|
-
`${srcPath}/**/*.{js,jsx,ts,tsx}`,
|
|
18
|
-
`!${srcPath}/**/*.test.{js,jsx,ts,tsx}`,
|
|
19
|
-
`!${srcPath}/**/*.stories.{js,jsx,ts,tsx}`,
|
|
20
|
-
`!${srcPath}/**/*.endpoint.{js,jsx,ts,tsx}`,
|
|
21
|
-
];
|
|
22
|
-
if (!commonJS) {
|
|
23
|
-
const entryPoints = await fg(inputFiles);
|
|
24
|
-
await esbuild.build({
|
|
25
|
-
entryPoints,
|
|
26
|
-
...commonConfig,
|
|
27
|
-
outdir: `${outDir}/es`,
|
|
28
|
-
format: 'esm',
|
|
29
|
-
});
|
|
30
|
-
} else {
|
|
31
|
-
const commonJSEntryPoints = await fg(
|
|
32
|
-
inputFiles.concat([`${srcPath}/**/*.cjs`]),
|
|
33
|
-
);
|
|
34
|
-
await esbuild.build({
|
|
35
|
-
entryPoints: commonJSEntryPoints,
|
|
36
|
-
...commonConfig,
|
|
37
|
-
outdir: `${outDir}/cjs`,
|
|
38
|
-
format: 'cjs',
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
exports.esBuild = build;
|
|
44
|
-
exports.ESBUILD_TARGET = ESBUILD_TARGET;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import 'jest-styled-components';
|