@elliemae/pui-cli 6.0.0-beta.50 → 6.0.0-beta.54

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.
@@ -59,6 +59,7 @@ const jestConfig = {
59
59
  coverageReporters: ['lcov', 'html', 'text-summary'],
60
60
  moduleDirectories: ['node_modules', 'app', 'lib'],
61
61
  moduleNameMapper: {
62
+ '.*\\webpack-hmr(.[t|j]s)?$': `${getRootDir()}/lib/testing/mocks/webpack-hmr.js`,
62
63
  '.*\\.(css|scss)$': `${getRootDir()}/lib/testing/mocks/cssModule.js`,
63
64
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$': `${getRootDir()}/lib/testing/mocks/image.js`,
64
65
  '.*\\.svg$': `${getRootDir()}/lib/testing/mocks/svg.js`,
@@ -0,0 +1 @@
1
+ exports.enableHotReloading = () => {};
@@ -218,6 +218,12 @@ const getCompressionPlugins = (isLibrary = false) => {
218
218
  ];
219
219
  };
220
220
 
221
+ const filterByFilePresence = (patterns) =>
222
+ patterns.filter(
223
+ ({ from, noErrorOnMissing }) =>
224
+ !noErrorOnMissing || fs.existsSync(path.resolve(process.cwd(), from)),
225
+ );
226
+
221
227
  exports.excludeNodeModulesExcept = excludeNodeModulesExcept;
222
228
  exports.getLibraryName = getLibraryName;
223
229
  exports.getAppConfig = getAppConfig;
@@ -243,3 +249,4 @@ exports.resolveExtensions = [
243
249
  exports.mainFields = ['browser', 'module', 'main'];
244
250
  exports.isGoogleTagManagerEnabled = isGoogleTagManagerEnabled;
245
251
  exports.getCompressionPlugins = getCompressionPlugins;
252
+ exports.filterByFilePresence = filterByFilePresence;
@@ -16,6 +16,7 @@ const {
16
16
  modulesToTranspile,
17
17
  getAlias,
18
18
  getPaths,
19
+ filterByFilePresence,
19
20
  } = require('./helpers');
20
21
 
21
22
  const minicssLoader = {
@@ -43,7 +44,7 @@ const plugins = [
43
44
  React: 'react',
44
45
  }),
45
46
  new CopyWebpackPlugin({
46
- patterns: [
47
+ patterns: filterByFilePresence([
47
48
  {
48
49
  from: 'app/app.config.json',
49
50
  to: 'app.config.json',
@@ -87,13 +88,19 @@ const plugins = [
87
88
  {
88
89
  from: 'public',
89
90
  noErrorOnMissing: true,
91
+ globOptions: {
92
+ ignore: ['readme.md'],
93
+ },
90
94
  },
91
95
  {
92
96
  from: 'webroot',
93
97
  to: '../',
94
98
  noErrorOnMissing: true,
99
+ globOptions: {
100
+ ignore: ['readme.md'],
101
+ },
95
102
  },
96
- ],
103
+ ]),
97
104
  }),
98
105
  new DuplicatePackageCheckerPlugin(),
99
106
  new MomentLocalesPlugin({ localesToKeep: ['es-us'] }),
@@ -1,5 +1,5 @@
1
1
  const path = require('path');
2
- const webpack = require('webpack');
2
+ const { HotModuleReplacementPlugin } = require('webpack');
3
3
  const HtmlWebpackPlugin = require('html-webpack-plugin');
4
4
  const CircularDependencyPlugin = require('circular-dependency-plugin');
5
5
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
@@ -75,13 +75,6 @@ const devConfig = {
75
75
 
76
76
  // Add development plugins
77
77
  plugins: [
78
- new webpack.ProgressPlugin(),
79
- new webpack.HotModuleReplacementPlugin(), // Tell webpack we want hot reloading
80
- new ReactRefreshWebpackPlugin({
81
- overlay: {
82
- sockIntegration: 'whm',
83
- },
84
- }),
85
78
  new HtmlWebpackPlugin({
86
79
  scriptLoading: 'module',
87
80
  inject: !isAppLoaderEnabled(), // Inject all files that are generated by webpack, e.g. bundle.js
@@ -117,4 +110,14 @@ const devConfig = {
117
110
  },
118
111
  };
119
112
 
120
- module.exports = smp.wrap(baseConfigFactory(devConfig));
113
+ const config = smp.wrap(baseConfigFactory(devConfig));
114
+ config.plugins = config.plugins.concat([
115
+ new HotModuleReplacementPlugin(),
116
+ new ReactRefreshWebpackPlugin({
117
+ overlay: {
118
+ sockIntegration: 'whm',
119
+ },
120
+ }),
121
+ ]);
122
+
123
+ module.exports = config;
@@ -47,7 +47,7 @@ const plugins = [
47
47
  noErrorOnMissing: true,
48
48
  },
49
49
  {
50
- from: './public',
50
+ from: 'lib/public',
51
51
  noErrorOnMissing: true,
52
52
  },
53
53
  ],
@@ -37,7 +37,7 @@ const getAdditionalPlugins = () => [
37
37
  noErrorOnMissing: true,
38
38
  },
39
39
  {
40
- from: './public',
40
+ from: 'app/public',
41
41
  noErrorOnMissing: true,
42
42
  },
43
43
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.0.0-beta.50",
3
+ "version": "6.0.0-beta.54",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
@@ -83,17 +83,17 @@
83
83
  "@stylelint/postcss-css-in-js": "~0.37.2",
84
84
  "@svgr/webpack": "~6.2.0",
85
85
  "@swc/cli": "~0.1.55",
86
- "@swc/core": "~1.2.129",
86
+ "@swc/core": "~1.2.130",
87
87
  "@swc/jest": "~0.2.17",
88
88
  "@testing-library/jest-dom": "~5.16.1",
89
89
  "@testing-library/react": "~12.1.2",
90
90
  "@testing-library/react-hooks": "~7.0.2",
91
91
  "@types/jest": "~27.4.0",
92
- "@types/node": "~17.0.8",
92
+ "@types/node": "~17.0.10",
93
93
  "@types/rimraf": "~3.0.2",
94
94
  "@types/testing-library__jest-dom": "~5.14.2",
95
- "@typescript-eslint/eslint-plugin": "~5.9.1",
96
- "@typescript-eslint/parser": "~5.9.1",
95
+ "@typescript-eslint/eslint-plugin": "~5.10.0",
96
+ "@typescript-eslint/parser": "~5.10.0",
97
97
  "autoprefixer": "~10.4.2",
98
98
  "axe-core": "~4.3.5",
99
99
  "babel-loader": "~8.2.3",
@@ -123,7 +123,7 @@
123
123
  "cors": "~2.8.5",
124
124
  "cross-env": "~7.0.3",
125
125
  "css-loader": "~6.5.1",
126
- "css-minimizer-webpack-plugin": "~3.3.1",
126
+ "css-minimizer-webpack-plugin": "~3.4.1",
127
127
  "depcheck": "~1.4.3",
128
128
  "docdash": "~1.2.0",
129
129
  "dotenv": "~12.0.4",
@@ -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.2",
168
+ "happy-dom": "~2.27.0",
169
169
  "helmet-csp": "~3.4.0",
170
170
  "html-loader": "~3.1.0",
171
171
  "html-webpack-plugin": "~5.5.0",
@@ -180,8 +180,8 @@
180
180
  "jest-styled-components": "~7.0.8",
181
181
  "jscodeshift": "~0.13.1",
182
182
  "jsdoc": "~3.6.7",
183
- "lint-staged": "~12.1.7",
184
- "mini-css-extract-plugin": "~2.4.7",
183
+ "lint-staged": "~12.2.0",
184
+ "mini-css-extract-plugin": "~2.5.2",
185
185
  "minimist": "~1.2.5",
186
186
  "moment": "~2.29.1",
187
187
  "moment-locales-webpack-plugin": "~1.2.0",
@@ -215,7 +215,7 @@
215
215
  "resolve-typescript-plugin": "~1.1.4",
216
216
  "rimraf": "~3.0.2",
217
217
  "script-loader": "~0.7.2",
218
- "semantic-release": "~18.0.1",
218
+ "semantic-release": "~19.0.2",
219
219
  "shelljs": "~0.8.5",
220
220
  "slackify-markdown": "~4.3.1",
221
221
  "speed-measure-webpack-plugin": "~1.5.0",
@@ -241,8 +241,8 @@
241
241
  "url-loader": "~4.1.1",
242
242
  "uuid": "~8.3.2",
243
243
  "vite": "~2.7.12",
244
- "vitest": "~0.1.17",
245
- "webpack": "~5.66.0",
244
+ "vitest": "~0.1.20",
245
+ "webpack": "~5.65.0",
246
246
  "webpack-bundle-analyzer": "~4.5.0",
247
247
  "webpack-cli": "~4.9.1",
248
248
  "webpack-dev-middleware": "~5.3.0",