@elliemae/pui-cli 6.0.0-beta.43 → 6.0.0-beta.47

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.
@@ -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;
@@ -2,13 +2,14 @@ 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
+ // const { getPUIConfig } = require('../pui-config');
6
+ const browserslistToEsbuild = require('browserslist-to-esbuild');
6
7
 
7
- const { esBuild } = getPUIConfig();
8
+ // const { esBuild } = getPUIConfig();
8
9
 
9
10
  const commonConfig = {
10
11
  bundle: false,
11
- target: esBuild.target,
12
+ target: browserslistToEsbuild(),
12
13
  loader: { '.js': 'jsx' },
13
14
  mainFields: ['module', 'browser', 'main'],
14
15
  inject: [path.resolve(__dirname, './react-shim.js')],
@@ -9,6 +9,7 @@ const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
9
9
  const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
10
10
  const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
11
11
  const { ProvidePlugin } = require('webpack');
12
+ const browserslistToEsbuild = require('browserslist-to-esbuild');
12
13
 
13
14
  const {
14
15
  excludeNodeModulesExcept,
@@ -17,8 +18,8 @@ const {
17
18
  getAlias,
18
19
  getPaths,
19
20
  } = require('./helpers');
20
- const { getPUIConfig } = require('../pui-config');
21
- const { esBuild } = getPUIConfig();
21
+ // const { getPUIConfig } = require('../pui-config');
22
+ // const { esBuild } = getPUIConfig();
22
23
 
23
24
  const minicssLoader = {
24
25
  loader: MiniCssExtractPlugin.loader,
@@ -153,7 +154,7 @@ module.exports = (options) => ({
153
154
  loader: 'esbuild-loader',
154
155
  options: {
155
156
  loader: 'jsx',
156
- target: esBuild.target,
157
+ target: browserslistToEsbuild(),
157
158
  },
158
159
  },
159
160
  },
@@ -167,7 +168,7 @@ module.exports = (options) => ({
167
168
  loader: 'esbuild-loader',
168
169
  options: {
169
170
  loader: 'tsx',
170
- target: esBuild.target,
171
+ target: browserslistToEsbuild(),
171
172
  },
172
173
  },
173
174
  },
@@ -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));
@@ -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.43",
3
+ "version": "6.0.0-beta.47",
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,21 +70,21 @@
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",
87
- "@swc/core": "~1.2.128",
88
- "@swc/jest": "~0.2.16",
86
+ "@swc/core": "~1.2.129",
87
+ "@swc/jest": "~0.2.17",
89
88
  "@testing-library/jest-dom": "~5.16.1",
90
89
  "@testing-library/react": "~12.1.2",
91
90
  "@testing-library/react-hooks": "~7.0.2",
@@ -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.3",
130
130
  "dotenv-webpack": "~7.0.3",
131
131
  "duplicate-package-checker-webpack-plugin": "~3.0.0",
132
132
  "enhanced-resolve": "~5.8.3",
@@ -165,7 +165,7 @@
165
165
  "favicons-webpack-plugin": "~5.0.2",
166
166
  "file-loader": "~6.2.0",
167
167
  "fork-ts-checker-webpack-plugin": "~6.5.0",
168
- "happy-dom": "~2.25.1",
168
+ "happy-dom": "~2.25.2",
169
169
  "helmet-csp": "~3.4.0",
170
170
  "html-loader": "~3.1.0",
171
171
  "html-webpack-plugin": "~5.5.0",
@@ -181,7 +181,7 @@
181
181
  "jscodeshift": "~0.13.1",
182
182
  "jsdoc": "~3.6.7",
183
183
  "lint-staged": "~12.1.7",
184
- "mini-css-extract-plugin": "~2.4.6",
184
+ "mini-css-extract-plugin": "~2.4.7",
185
185
  "minimist": "~1.2.5",
186
186
  "moment": "~2.29.1",
187
187
  "moment-locales-webpack-plugin": "~1.2.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",
@@ -239,8 +240,8 @@
239
240
  "update-notifier": "~5.1.0",
240
241
  "url-loader": "~4.1.1",
241
242
  "uuid": "~8.3.2",
242
- "vite": "~2.7.10",
243
- "vitest": "~0.0.141",
243
+ "vite": "~2.7.12",
244
+ "vitest": "~0.1.16",
244
245
  "webpack": "~5.66.0",
245
246
  "webpack-bundle-analyzer": "~4.5.0",
246
247
  "webpack-cli": "~4.9.1",