@elliemae/pui-cli 6.0.0-beta.44 → 6.0.0-beta.48

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.
@@ -34,7 +34,10 @@ const baseRules = {
34
34
  'import/no-dynamic-require': 0,
35
35
  'import/no-extraneous-dependencies': 0,
36
36
  'import/no-named-as-default': 0,
37
- 'import/no-unresolved': 0, // ToDo: set this to error once this issue is resolved https://github.com/import-js/eslint-plugin-import/issues/1868
37
+ 'import/no-unresolved': [
38
+ 2,
39
+ { caseSensitive: true, caseSensitiveStrict: true },
40
+ ], // Tip: https://github.com/import-js/eslint-plugin-import/issues/1868
38
41
  'import/no-webpack-loader-syntax': 0,
39
42
  'import/prefer-default-export': 0,
40
43
  'import/extensions': [
@@ -25,7 +25,7 @@ console.error = (...args) => {
25
25
  ];
26
26
  if (
27
27
  ignoreList.find(
28
- (ignoreMsg) => !!args.find((arg) => arg.includes?.(ignoreMsg)),
28
+ (ignoreMsg) => !!args.find((arg) => arg?.includes?.(ignoreMsg)),
29
29
  )
30
30
  )
31
31
  return false;
@@ -3,12 +3,13 @@ const fg = require('fast-glob');
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { getPUIConfig } = require('../pui-config');
6
+ // const browserslistToEsbuild = require('browserslist-to-esbuild');
6
7
 
7
8
  const { esBuild } = getPUIConfig();
8
9
 
9
10
  const commonConfig = {
10
11
  bundle: false,
11
- target: esBuild.target,
12
+ target: esBuild.target, // browserslistToEsbuild(),
12
13
  loader: { '.js': 'jsx' },
13
14
  mainFields: ['module', 'browser', 'main'],
14
15
  inject: [path.resolve(__dirname, './react-shim.js')],
@@ -4,11 +4,11 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
4
  const PostcssPresetEnv = require('postcss-preset-env');
5
5
  const CopyWebpackPlugin = require('copy-webpack-plugin');
6
6
  const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
7
- const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
8
7
  const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
9
8
  const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
10
9
  const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
11
10
  const { ProvidePlugin } = require('webpack');
11
+ const browserslistToEsbuild = require('browserslist-to-esbuild');
12
12
 
13
13
  const {
14
14
  excludeNodeModulesExcept,
@@ -17,8 +17,6 @@ const {
17
17
  getAlias,
18
18
  getPaths,
19
19
  } = require('./helpers');
20
- const { getPUIConfig } = require('../pui-config');
21
- const { esBuild } = getPUIConfig();
22
20
 
23
21
  const minicssLoader = {
24
22
  loader: MiniCssExtractPlugin.loader,
@@ -41,7 +39,6 @@ const plugins = [
41
39
  new webpack.DefinePlugin({
42
40
  APP_CONFIG: getAppConfig(),
43
41
  }),
44
- new CaseSensitivePathsPlugin(),
45
42
  new ProvidePlugin({
46
43
  React: 'react',
47
44
  }),
@@ -99,7 +96,7 @@ const plugins = [
99
96
  ],
100
97
  }),
101
98
  new DuplicatePackageCheckerPlugin(),
102
- new MomentLocalesPlugin(),
99
+ new MomentLocalesPlugin({ localesToKeep: ['es-us'] }),
103
100
  new WebpackManifestPlugin(),
104
101
  new FaviconsWebpackPlugin({
105
102
  logo: './app/view/images/favicon.png',
@@ -153,7 +150,7 @@ module.exports = (options) => ({
153
150
  loader: 'esbuild-loader',
154
151
  options: {
155
152
  loader: 'jsx',
156
- target: esBuild.target,
153
+ target: browserslistToEsbuild(),
157
154
  },
158
155
  },
159
156
  },
@@ -167,7 +164,7 @@ module.exports = (options) => ({
167
164
  loader: 'esbuild-loader',
168
165
  options: {
169
166
  loader: 'tsx',
170
- target: esBuild.target,
167
+ target: browserslistToEsbuild(),
171
168
  },
172
169
  },
173
170
  },
@@ -229,7 +226,7 @@ module.exports = (options) => ({
229
226
  plugins: plugins.concat(options.plugins),
230
227
  resolve: {
231
228
  modules: ['node_modules', 'app', 'lib'],
232
- extensions: ['.wasm', '.mjs', '.ts', '.tsx', '.js', '.jsx', '.json'],
229
+ extensions: ['.js', '.jsx', '.ts', '.tsx', '.json', '.wasm', '.mjs'],
233
230
  mainFields: ['browser', 'module', 'main'],
234
231
  alias: {
235
232
  ...getAlias(),
@@ -4,6 +4,9 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
4
4
  const CircularDependencyPlugin = require('circular-dependency-plugin');
5
5
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
6
6
  const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
7
+ const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
8
+
9
+ const smp = new SpeedMeasurePlugin({ disable: !process.env.MEASURE });
7
10
 
8
11
  const {
9
12
  getAssetPath,
@@ -114,4 +117,4 @@ const devConfig = {
114
117
  },
115
118
  };
116
119
 
117
- module.exports = baseConfigFactory(devConfig);
120
+ module.exports = smp.wrap(baseConfigFactory(devConfig));
@@ -8,7 +8,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
8
8
  const CopyWebpackPlugin = require('copy-webpack-plugin');
9
9
  const PostcssPresetEnv = require('postcss-preset-env');
10
10
  const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
11
- const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
12
11
  const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
13
12
 
14
13
  const {
@@ -39,7 +38,6 @@ const plugins = [
39
38
  new webpack.DefinePlugin({
40
39
  APP_CONFIG: getAppConfig(true),
41
40
  }),
42
- new CaseSensitivePathsPlugin(),
43
41
  new CopyWebpackPlugin({
44
42
  patterns: [
45
43
  {
@@ -57,7 +55,7 @@ const plugins = [
57
55
  new LimitChunkCountPlugin({
58
56
  maxChunks: 1,
59
57
  }),
60
- new MomentLocalesPlugin(),
58
+ new MomentLocalesPlugin({ localesToKeep: ['es-us'] }),
61
59
  ];
62
60
 
63
61
  module.exports = (options) => ({
@@ -204,7 +202,7 @@ module.exports = (options) => ({
204
202
  plugins: plugins.concat(options.plugins || []),
205
203
  resolve: {
206
204
  modules: ['node_modules', 'app', 'lib'],
207
- extensions: ['.wasm', '.mjs', '.ts', '.tsx', '.js', '.jsx', '.json'],
205
+ extensions: ['.js', '.jsx', '.ts', '.tsx', '.json', '.wasm', '.mjs'],
208
206
  mainFields: ['browser', 'module', 'main'],
209
207
  alias: {
210
208
  ...getAlias(),
@@ -5,6 +5,7 @@ const { GenerateSW } = require('workbox-webpack-plugin');
5
5
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
6
6
  const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
7
7
  const { ESBuildMinifyPlugin } = require('esbuild-loader');
8
+ const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
8
9
 
9
10
  const baseConfigFactory = require('./webpack.base.babel');
10
11
  const {
@@ -64,10 +65,10 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
64
65
  },
65
66
 
66
67
  plugins: [
67
- new MiniCssExtractPlugin({
68
- filename: 'css/[name].[contenthash].css',
69
- chunkFilename: 'css/[name].[contenthash].chunk.css',
70
- }),
68
+ // new MiniCssExtractPlugin({
69
+ // filename: 'css/[name].[contenthash].css',
70
+ // chunkFilename: 'css/[name].[contenthash].chunk.css',
71
+ // }),
71
72
 
72
73
  ...getCompressionPlugins(),
73
74
 
@@ -144,6 +145,22 @@ const appVersionConfig = baseConfigFactory(
144
145
  getProdConfig({ latestVersion: false }),
145
146
  );
146
147
 
147
- module.exports = isVersionedApp
148
- ? [latestVersionConfig, appVersionConfig]
149
- : latestVersionConfig;
148
+ const addSMPPlugin = (config) => {
149
+ const smpConfig = new SpeedMeasurePlugin({
150
+ disable: !process.env.MEASURE,
151
+ }).wrap(config);
152
+ // mini css extract plugin is not working fine with smp
153
+ smpConfig.plugins.push(
154
+ new MiniCssExtractPlugin({
155
+ filename: 'css/[name].[contenthash].css',
156
+ chunkFilename: 'css/[name].[contenthash].chunk.css',
157
+ }),
158
+ );
159
+ return smpConfig;
160
+ };
161
+
162
+ const config = isVersionedApp
163
+ ? [latestVersionConfig, appVersionConfig].map(addSMPPlugin)
164
+ : addSMPPlugin(latestVersionConfig);
165
+
166
+ module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.0.0-beta.44",
3
+ "version": "6.0.0-beta.48",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
@@ -20,7 +20,7 @@
20
20
  "url": "https://git.elliemae.io/platform-ui/pui-cli.git"
21
21
  },
22
22
  "engines": {
23
- "npm": ">=8",
23
+ "pnpm": ">=6",
24
24
  "node": ">=16"
25
25
  },
26
26
  "author": "ICE MT",
@@ -38,8 +38,7 @@
38
38
  "storybook:build": "exit 0",
39
39
  "storybook:docs:build": "exit 0",
40
40
  "upgrade": "ncu -u && npm run setup",
41
- "prepare": "[ -n \"$CI\" ] || husky install",
42
- "preinstall": "npx only-allow pnpm"
41
+ "prepare": "[ -n \"$CI\" ] || husky install"
43
42
  },
44
43
  "jestSonar": {
45
44
  "sonar56x": true,
@@ -71,16 +70,16 @@
71
70
  "@semantic-release/changelog": "~6.0.1",
72
71
  "@semantic-release/exec": "~6.0.3",
73
72
  "@semantic-release/git": "~10.0.1",
74
- "@storybook/addon-a11y": "~6.4.12",
75
- "@storybook/addon-essentials": "~6.4.12",
73
+ "@storybook/addon-a11y": "~6.4.13",
74
+ "@storybook/addon-essentials": "~6.4.13",
76
75
  "@storybook/addon-events": "~6.2.9",
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",
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",
84
83
  "@stylelint/postcss-css-in-js": "~0.37.2",
85
84
  "@svgr/webpack": "~6.2.0",
86
85
  "@swc/cli": "~0.1.55",
@@ -111,6 +110,7 @@
111
110
  "babel-plugin-transform-strip-block": "~0.0.5",
112
111
  "body-parser": "~1.19.1",
113
112
  "browserslist": "~4.19.1",
113
+ "browserslist-to-esbuild": "~1.1.1",
114
114
  "bundlesize": "~0.18.1",
115
115
  "case-sensitive-paths-webpack-plugin": "~2.4.0",
116
116
  "chalk": "~4.1.2",
@@ -126,7 +126,7 @@
126
126
  "css-minimizer-webpack-plugin": "~3.3.1",
127
127
  "depcheck": "~1.4.3",
128
128
  "docdash": "~1.2.0",
129
- "dotenv": "~11.0.0",
129
+ "dotenv": "~12.0.4",
130
130
  "dotenv-webpack": "~7.0.3",
131
131
  "duplicate-package-checker-webpack-plugin": "~3.0.0",
132
132
  "enhanced-resolve": "~5.8.3",
@@ -134,7 +134,7 @@
134
134
  "esbuild-jest": "~0.5.0",
135
135
  "esbuild-loader": "~2.18.0",
136
136
  "esbuild-plugin-svgr": "~1.0.0",
137
- "eslint": "~8.6.0",
137
+ "eslint": "~8.7.0",
138
138
  "eslint-config-airbnb": "~19.0.4",
139
139
  "eslint-config-airbnb-base": "~15.0.0",
140
140
  "eslint-config-airbnb-typescript": "~16.1.0",
@@ -146,7 +146,7 @@
146
146
  "eslint-plugin-compat": "~4.0.1",
147
147
  "eslint-plugin-eslint-comments": "~3.2.0",
148
148
  "eslint-plugin-import": "~2.25.4",
149
- "eslint-plugin-jest": "~25.3.4",
149
+ "eslint-plugin-jest": "~25.7.0",
150
150
  "eslint-plugin-jsdoc": "~37.6.1",
151
151
  "eslint-plugin-jsx-a11y": "~6.5.1",
152
152
  "eslint-plugin-mdx": "~1.16.0",
@@ -218,6 +218,7 @@
218
218
  "semantic-release": "~18.0.1",
219
219
  "shelljs": "~0.8.5",
220
220
  "slackify-markdown": "~4.3.1",
221
+ "speed-measure-webpack-plugin": "~1.5.0",
221
222
  "storybook-addon-turbo-build": "~1.0.1",
222
223
  "storybook-builder-vite": "~0.1.13",
223
224
  "storybook-react-router": "~1.0.8",
@@ -240,7 +241,7 @@
240
241
  "url-loader": "~4.1.1",
241
242
  "uuid": "~8.3.2",
242
243
  "vite": "~2.7.12",
243
- "vitest": "~0.1.12",
244
+ "vitest": "~0.1.17",
244
245
  "webpack": "~5.66.0",
245
246
  "webpack-bundle-analyzer": "~4.5.0",
246
247
  "webpack-cli": "~4.9.1",
@@ -255,6 +256,8 @@
255
256
  "yargs": "~17.3.1"
256
257
  },
257
258
  "devDependencies": {
259
+ "react": "~17.0.2",
260
+ "react-dom": "~17.0.2",
258
261
  "redux": "~4.1.2",
259
262
  "redux-saga": "~1.1.3",
260
263
  "styled-components": "~5.3.3"