@elliemae/pui-cli 6.3.0 → 6.5.1

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.
@@ -1,6 +1,7 @@
1
1
  const path = require('path');
2
2
 
3
3
  module.exports = {
4
+ '*.{js,ts,jsx,tsx,md,mdx,html,css,json}': ['prettier --write'],
4
5
  '*.{ts,tsx}': [
5
6
  `node ${path.resolve(
6
7
  __dirname,
@@ -12,5 +13,4 @@ module.exports = {
12
13
  'npm run test:staged',
13
14
  'npm run gendoc',
14
15
  ],
15
- '*.{js,ts,jsx,tsx,md,mdx,html,css,json}': ['prettier --write'],
16
16
  };
@@ -91,7 +91,6 @@ const getAlias = () =>
91
91
  const modulesToTranspile = [
92
92
  '@elliemae/pui-*',
93
93
  '@elliemae/ds-*',
94
- '@elliemae/vanilla-ui',
95
94
  '@dnd-kit/*',
96
95
  '@elliemae/em-platform-document-viewer',
97
96
  ];
@@ -198,7 +197,7 @@ const getCompressionPlugins = (isLibrary = false) => {
198
197
  test: /\.(js|css)$/,
199
198
  exclude: !isLibrary ? excludeList : [],
200
199
  // 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
201
- minRatio: Number.MAX_SAFE_INTEGER,
200
+ minRatio: Infinity,
202
201
  };
203
202
  return [
204
203
  new CompressionPlugin({
@@ -161,9 +161,7 @@ module.exports = (options) => ({
161
161
  },
162
162
  {
163
163
  test: /\.css$/,
164
- exclude: excludeNodeModulesExcept(
165
- modulesToTranspile.concat(['sanitize.css']),
166
- ),
164
+ exclude: excludeNodeModulesExcept(modulesToTranspile),
167
165
  use: [
168
166
  finalCSSLoader(options.mode),
169
167
  {
@@ -1,6 +1,10 @@
1
1
  /* eslint-disable max-lines */
2
2
  const path = require('path');
3
- const { EnvironmentPlugin, DefinePlugin } = require('webpack');
3
+ const {
4
+ EnvironmentPlugin,
5
+ DefinePlugin,
6
+ NormalModuleReplacementPlugin,
7
+ } = require('webpack');
4
8
  const {
5
9
  optimize: { LimitChunkCountPlugin },
6
10
  ProgressPlugin,
@@ -30,33 +34,43 @@ const minicssLoader = {
30
34
  const finalCSSLoader = (mode) =>
31
35
  mode !== 'production' ? { loader: 'style-loader' } : minicssLoader;
32
36
 
37
+ const copyPluginPatterns = filterByFilePresence([
38
+ {
39
+ from: 'lib/app.config.json',
40
+ to: 'app.config.json',
41
+ noErrorOnMissing: true,
42
+ },
43
+ {
44
+ from: 'public',
45
+ noErrorOnMissing: true,
46
+ },
47
+ ]);
48
+
33
49
  const plugins = [
34
50
  new EnvironmentPlugin({
35
- NODE_ENV: 'development',
36
51
  ASSET_PATH: '/',
37
52
  CI: 'false',
38
53
  }),
39
54
  new DefinePlugin({
40
55
  APP_CONFIG: getAppConfig(true),
41
56
  }),
42
- new CopyWebpackPlugin({
43
- patterns: filterByFilePresence([
44
- {
45
- from: 'lib/app.config.json',
46
- to: 'app.config.json',
47
- noErrorOnMissing: true,
48
- },
49
- {
50
- from: 'lib/public',
51
- noErrorOnMissing: true,
52
- },
53
- ]),
54
- }),
57
+ /* eslint-disable indent */
58
+ ...(copyPluginPatterns.length > 0
59
+ ? [
60
+ new CopyWebpackPlugin({
61
+ patterns: copyPluginPatterns,
62
+ }),
63
+ ]
64
+ : []),
65
+ /* eslint-enable indent */
55
66
  new DuplicatePackageCheckerPlugin(),
56
67
  new LimitChunkCountPlugin({
57
68
  maxChunks: 1,
58
69
  }),
59
70
  new MomentLocalesPlugin({ localesToKeep: ['es-us'] }),
71
+ new NormalModuleReplacementPlugin(/\.js$/, function (resource) {
72
+ resource.request = resource.request.replace('.js', '');
73
+ }),
60
74
  new ProgressPlugin(),
61
75
  ];
62
76
 
@@ -102,27 +116,9 @@ module.exports = (options) => ({
102
116
  },
103
117
  },
104
118
  },
105
- {
106
- test: /\.exec\.js$/,
107
- exclude: /node_modules/,
108
- use: [
109
- {
110
- loader: 'imports-loader',
111
- options: {
112
- wrapper: {
113
- thisArg: 'window',
114
- args: {
115
- module: false,
116
- exports: false,
117
- define: false,
118
- },
119
- },
120
- },
121
- },
122
- ],
123
- },
124
119
  {
125
120
  test: /\.css$/,
121
+ exclude: excludeNodeModulesExcept(modulesToTranspile),
126
122
  use: [
127
123
  finalCSSLoader(options.mode),
128
124
  {
@@ -190,7 +186,7 @@ module.exports = (options) => ({
190
186
  plugins: plugins.concat(options.plugins || []),
191
187
  resolve: {
192
188
  modules: ['node_modules', 'app', 'lib'],
193
- extensions: ['.js', '.jsx', '.ts', '.tsx', '.json', '.wasm', '.mjs'],
189
+ extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.wasm', '.mjs'],
194
190
  mainFields: ['browser', 'module', 'main'],
195
191
  alias: {
196
192
  ...getAlias(),
@@ -8,7 +8,6 @@ const libraryName = getLibraryName();
8
8
  module.exports = require('./webpack.lib.base.babel')({
9
9
  mode: 'development',
10
10
 
11
- // Don't use hashes in dev mode for better performance
12
11
  output: {
13
12
  filename: `js/${libraryName}.js`,
14
13
  chunkFilename: `js/${libraryName}.chunk.js`,
@@ -25,7 +24,6 @@ module.exports = require('./webpack.lib.base.babel')({
25
24
  alias: {},
26
25
  },
27
26
 
28
- // Add development plugins
29
27
  plugins: [
30
28
  new HtmlWebpackPlugin({
31
29
  scriptLoading: 'module',
@@ -11,7 +11,6 @@ const libraryName = getLibraryName();
11
11
  module.exports = require('./webpack.lib.base.babel')({
12
12
  mode: 'production',
13
13
 
14
- // Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
15
14
  output: {
16
15
  filename: `js/${libraryName}.[chunkhash].js`,
17
16
  chunkFilename: `js/${libraryName}.[chunkhash].chunk.js`,
@@ -36,7 +35,6 @@ module.exports = require('./webpack.lib.base.babel')({
36
35
  },
37
36
 
38
37
  plugins: [
39
- // Minify and optimize the index.html
40
38
  new HtmlWebpackPlugin({
41
39
  scriptLoading: 'module',
42
40
  template: 'lib/index.pug',
@@ -1,7 +1,10 @@
1
- const webpack = require('webpack');
1
+ const {
2
+ DefinePlugin,
3
+ EnvironmentPlugin,
4
+ NormalModuleReplacementPlugin,
5
+ } = require('webpack');
2
6
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3
7
  const CopyWebpackPlugin = require('copy-webpack-plugin');
4
- const ResolveTypeScriptPlugin = require('resolve-typescript-plugin').default;
5
8
  const {
6
9
  getAppConfig,
7
10
  isApp,
@@ -13,10 +16,10 @@ const IS_APP = isApp();
13
16
  const CWD = process.cwd();
14
17
 
15
18
  const getAdditionalPlugins = () => [
16
- new webpack.DefinePlugin({
19
+ new DefinePlugin({
17
20
  APP_CONFIG: getAppConfig(),
18
21
  }),
19
- new webpack.EnvironmentPlugin({
22
+ new EnvironmentPlugin({
20
23
  IS_APP,
21
24
  CWD,
22
25
  }),
@@ -37,11 +40,14 @@ const getAdditionalPlugins = () => [
37
40
  noErrorOnMissing: true,
38
41
  },
39
42
  {
40
- from: 'app/public',
43
+ from: 'public',
41
44
  noErrorOnMissing: true,
42
45
  },
43
46
  ],
44
47
  }),
48
+ new NormalModuleReplacementPlugin(/\.js$/, function (resource) {
49
+ resource.request = resource.request.replace('.js', '');
50
+ }),
45
51
  ];
46
52
 
47
53
  const getModuleRules = () => [
@@ -72,10 +78,6 @@ exports.webpackFinal = async (config, { configType }) => {
72
78
  config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
73
79
  config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
74
80
  config.resolve.extensions.push('.svg');
75
- config.resolve.plugins = [
76
- ...(config.resolve.plugins || []),
77
- new ResolveTypeScriptPlugin(),
78
- ];
79
81
  config.externals = config.externals || {};
80
82
  config.externals['@elliemae/pui-user-monitoring'] = 'emuiUserMonitoring';
81
83
  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.3.0",
3
+ "version": "6.5.1",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@babel/cli": "~7.17.0",
51
- "@babel/core": "~7.17.0",
51
+ "@babel/core": "~7.17.2",
52
52
  "@babel/eslint-parser": "~7.17.0",
53
53
  "@babel/node": "~7.16.8",
54
54
  "@babel/plugin-proposal-class-properties": "~7.16.7",
@@ -62,11 +62,11 @@
62
62
  "@babel/preset-env": "~7.16.11",
63
63
  "@babel/preset-react": "~7.16.7",
64
64
  "@babel/preset-typescript": "~7.16.7",
65
- "@babel/runtime": "~7.17.0",
65
+ "@babel/runtime": "~7.17.2",
66
66
  "@commitlint/cli": "~16.1.0",
67
67
  "@commitlint/config-conventional": "~16.0.0",
68
68
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.3.0",
69
- "@faker-js/faker": "6.0.0-alpha.5",
69
+ "@faker-js/faker": "6.0.0-alpha.6",
70
70
  "@pmmmwh/react-refresh-webpack-plugin": "~0.5.4",
71
71
  "@semantic-release/changelog": "~6.0.1",
72
72
  "@semantic-release/exec": "~6.0.3",
@@ -84,17 +84,17 @@
84
84
  "@stylelint/postcss-css-in-js": "~0.37.2",
85
85
  "@svgr/webpack": "~6.2.1",
86
86
  "@swc/cli": "~0.1.55",
87
- "@swc/core": "~1.2.136",
87
+ "@swc/core": "~1.2.138",
88
88
  "@swc/jest": "~0.2.17",
89
89
  "@testing-library/jest-dom": "~5.16.2",
90
90
  "@testing-library/react": "~12.1.2",
91
91
  "@testing-library/react-hooks": "~7.0.2",
92
92
  "@types/jest": "~27.4.0",
93
- "@types/node": "~17.0.14",
93
+ "@types/node": "~17.0.17",
94
94
  "@types/rimraf": "~3.0.2",
95
95
  "@types/testing-library__jest-dom": "~5.14.2",
96
- "@typescript-eslint/eslint-plugin": "~5.10.2",
97
- "@typescript-eslint/parser": "~5.10.2",
96
+ "@typescript-eslint/eslint-plugin": "~5.11.0",
97
+ "@typescript-eslint/parser": "~5.11.0",
98
98
  "autoprefixer": "~10.4.2",
99
99
  "axe-core": "~4.4.1",
100
100
  "babel-loader": "~8.2.3",
@@ -128,8 +128,8 @@
128
128
  "dotenv": "~16.0.0",
129
129
  "dotenv-webpack": "~7.1.0",
130
130
  "duplicate-package-checker-webpack-plugin": "~3.0.0",
131
- "enhanced-resolve": "~5.8.3",
132
- "esbuild": "~0.14.18",
131
+ "enhanced-resolve": "~5.9.0",
132
+ "esbuild": "~0.14.21",
133
133
  "esbuild-loader": "~2.18.0",
134
134
  "esbuild-plugin-svgr": "~1.0.0",
135
135
  "eslint": "~8.8.0",
@@ -144,8 +144,8 @@
144
144
  "eslint-plugin-compat": "~4.0.2",
145
145
  "eslint-plugin-eslint-comments": "~3.2.0",
146
146
  "eslint-plugin-import": "~2.25.4",
147
- "eslint-plugin-jest": "~26.0.0",
148
- "eslint-plugin-jsdoc": "~37.7.1",
147
+ "eslint-plugin-jest": "~26.1.0",
148
+ "eslint-plugin-jsdoc": "~37.8.2",
149
149
  "eslint-plugin-jsx-a11y": "~6.5.1",
150
150
  "eslint-plugin-mdx": "~1.16.0",
151
151
  "eslint-plugin-prettier": "~4.0.0",
@@ -158,7 +158,7 @@
158
158
  "execa": "~5.1.1",
159
159
  "express": "~4.17.2",
160
160
  "express-pino-logger": "~7.0.0",
161
- "express-static-gzip": "~2.1.2",
161
+ "express-static-gzip": "~2.1.4",
162
162
  "favicons": "~6.2.2",
163
163
  "favicons-webpack-plugin": "~5.0.2",
164
164
  "happy-dom": "~2.31.1",
@@ -170,7 +170,7 @@
170
170
  "imports-loader": "~3.1.1",
171
171
  "ip": "~1.1.5",
172
172
  "jest-axe": "~5.0.1",
173
- "jest-cli": "~27.4.7",
173
+ "jest-cli": "~27.5.1",
174
174
  "jest-sonar-reporter": "~2.0.0",
175
175
  "jest-styled-components": "~7.0.8",
176
176
  "jscodeshift": "~0.13.1",
@@ -184,7 +184,7 @@
184
184
  "node-gyp": "~8.4.1",
185
185
  "node-plop": "~0.30.0",
186
186
  "nodemon": "~2.0.15",
187
- "npm-check-updates": "12.2.1",
187
+ "npm-check-updates": "12.3.0",
188
188
  "null-loader": "~4.0.1",
189
189
  "pino": "~7.6.5",
190
190
  "pino-pretty": "~7.5.1",
@@ -215,19 +215,19 @@
215
215
  "storybook-builder-vite": "~0.1.15",
216
216
  "storybook-react-router": "~1.0.8",
217
217
  "style-loader": "~3.3.1",
218
- "stylelint": "~14.3.0",
219
- "stylelint-config-recommended": "~6.0.0",
218
+ "stylelint": "~14.5.0",
219
+ "stylelint-config-recommended": "~7.0.0",
220
220
  "stylelint-config-styled-components": "~0.1.1",
221
221
  "swc-loader": "~0.1.15",
222
222
  "terser-webpack-plugin": "~5.3.1",
223
- "ts-node": "~10.4.0",
224
- "tsc-alias": "~1.5.0",
223
+ "ts-node": "~10.5.0",
224
+ "tsc-alias": "~1.6.0",
225
225
  "typescript": "~4.5.5",
226
226
  "update-notifier": "~5.1.0",
227
227
  "url-loader": "~4.1.1",
228
228
  "uuid": "~8.3.2",
229
- "vite": "~2.7.13",
230
- "vitest": "~0.2.7",
229
+ "vite": "~2.8.1",
230
+ "vitest": "~0.3.2",
231
231
  "webpack": "~5.65.0",
232
232
  "webpack-bundle-analyzer": "~4.5.0",
233
233
  "webpack-cli": "~4.9.2",