@elliemae/pui-cli 6.0.0-beta.5 → 6.0.0-beta.9

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/lib/esbuild.js CHANGED
@@ -13,12 +13,14 @@ const commonConfig = {
13
13
  const outDir = 'dist';
14
14
 
15
15
  const build = async ({ srcPath, commonJS }) => {
16
- const entryPoints = await fg([
16
+ const inputFiles = [
17
17
  `${srcPath}/**/*.{js,jsx,ts,tsx}`,
18
18
  `!${srcPath}/**/*.test.{js,jsx,ts,tsx}`,
19
19
  `!${srcPath}/**/*.stories.{js,jsx,ts,tsx}`,
20
- ]);
20
+ `!${srcPath}/**/*.endpoint.{js,jsx,ts,tsx}`,
21
+ ];
21
22
  if (!commonJS) {
23
+ const entryPoints = await fg(inputFiles);
22
24
  await esbuild.build({
23
25
  entryPoints,
24
26
  ...commonConfig,
@@ -26,8 +28,11 @@ const build = async ({ srcPath, commonJS }) => {
26
28
  format: 'esm',
27
29
  });
28
30
  } else {
31
+ const commonJSEntryPoints = await fg(
32
+ inputFiles.concat([`${srcPath}/**/*.cjs`]),
33
+ );
29
34
  await esbuild.build({
30
- entryPoints,
35
+ entryPoints: commonJSEntryPoints,
31
36
  ...commonConfig,
32
37
  outdir: `${outDir}/cjs`,
33
38
  format: 'cjs',
@@ -13,8 +13,11 @@ const { loadRoutes } = require('./util');
13
13
  const { getAssetPath } = require('../webpack/helpers');
14
14
 
15
15
  const pino = expressPinoLogger({
16
- prettyPrint: {
17
- levelFirst: true,
16
+ transport: {
17
+ target: 'pino-pretty',
18
+ options: {
19
+ colorize: true,
20
+ },
18
21
  },
19
22
  });
20
23
  pino.logger.level = 'warn';
@@ -1,3 +1,5 @@
1
- module.exports = {
2
- ReactComponent: 'IMAGE_MOCK',
3
- };
1
+ // eslint-disable-next-line no-unused-vars
2
+ import * as React from 'react';
3
+
4
+ export default 'SvgrURL';
5
+ export const ReactComponent = 'div';
@@ -7,7 +7,6 @@ const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack
7
7
  const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
8
8
  const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
9
9
  const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
10
- const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
11
10
  const { ProvidePlugin } = require('webpack');
12
11
 
13
12
  const {
@@ -16,13 +15,10 @@ const {
16
15
  modulesToTranspile,
17
16
  getAlias,
18
17
  getPaths,
19
- getMediaPath,
20
18
  } = require('./helpers');
21
19
  const { ESBUILD_TARGET } = require('../esbuild');
22
- const { isTypeScriptEnabled } = require('../typescript/util');
23
20
 
24
21
  // get the application configuration
25
- const devMode = process.env.NODE_ENV !== 'production';
26
22
  const minicssLoader = {
27
23
  loader: MiniCssExtractPlugin.loader,
28
24
  options: {},
@@ -110,17 +106,6 @@ const plugins = [
110
106
  new WebpackManifestPlugin(),
111
107
  ];
112
108
 
113
- if (isTypeScriptEnabled()) {
114
- plugins.push(
115
- new ForkTsCheckerWebpackPlugin({
116
- async: devMode,
117
- eslint: {
118
- files: './app/**/*.{ts,js,tsx,jsx}',
119
- },
120
- }),
121
- );
122
- }
123
-
124
109
  module.exports = (options) => ({
125
110
  mode: options.mode,
126
111
  entry: options.entry,
@@ -229,19 +214,13 @@ module.exports = (options) => ({
229
214
  type: 'asset/resource',
230
215
  },
231
216
  {
232
- test: /\.svg$/,
233
- exclude: excludeNodeModulesExcept(['@elliemae/*']),
234
- use: [
235
- {
236
- loader: '@svgr/webpack',
237
- },
238
- {
239
- loader: 'file-loader',
240
- options: {
241
- name: getMediaPath(),
242
- },
243
- },
244
- ],
217
+ type: 'asset',
218
+ resourceQuery: /url/, // *.svg?react
219
+ },
220
+ {
221
+ test: /\.svg$/i,
222
+ issuer: /\.[jt]sx?$/,
223
+ use: ['@svgr/webpack'],
245
224
  },
246
225
  {
247
226
  test: /\.(jpe?g|png|gif|ico)$/i,
@@ -10,7 +10,6 @@ const PostcssPresetEnv = require('postcss-preset-env');
10
10
  const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
11
11
  const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
12
12
  const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
13
- const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
14
13
 
15
14
  const {
16
15
  excludeNodeModulesExcept,
@@ -19,12 +18,9 @@ const {
19
18
  modulesToTranspile,
20
19
  getAssetPath,
21
20
  getAlias,
22
- getMediaPath,
23
21
  } = require('./helpers');
24
22
  const { ESBUILD_TARGET } = require('../esbuild');
25
- const { isTypeScriptEnabled } = require('../typescript/util');
26
23
 
27
- const devMode = process.env.NODE_ENV !== 'production';
28
24
  const minicssLoader = {
29
25
  loader: MiniCssExtractPlugin.loader,
30
26
  options: {},
@@ -63,17 +59,6 @@ const plugins = [
63
59
  new MomentLocalesPlugin(),
64
60
  ];
65
61
 
66
- if (isTypeScriptEnabled()) {
67
- plugins.push(
68
- new ForkTsCheckerWebpackPlugin({
69
- async: devMode,
70
- eslint: {
71
- files: './lib/**/*.{ts,js,tsx,jsx}',
72
- },
73
- }),
74
- );
75
- }
76
-
77
62
  module.exports = (options) => ({
78
63
  mode: options.mode,
79
64
  entry: [path.join(process.cwd(), 'lib/index')],
@@ -186,19 +171,13 @@ module.exports = (options) => ({
186
171
  type: 'asset/resource',
187
172
  },
188
173
  {
189
- test: /\.svg$/,
190
- exclude: excludeNodeModulesExcept(['@elliemae/*']),
191
- use: [
192
- {
193
- loader: '@svgr/webpack',
194
- },
195
- {
196
- loader: 'file-loader',
197
- options: {
198
- name: getMediaPath(),
199
- },
200
- },
201
- ],
174
+ type: 'asset',
175
+ resourceQuery: /url/, // *.svg?react
176
+ },
177
+ {
178
+ test: /\.svg$/i,
179
+ issuer: /\.[jt]sx?$/,
180
+ use: ['@svgr/webpack'],
202
181
  },
203
182
  {
204
183
  test: /\.(jpe?g|png|gif|ico)$/i,
@@ -3,16 +3,12 @@ const webpack = require('webpack');
3
3
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
4
  const CopyWebpackPlugin = require('copy-webpack-plugin');
5
5
  const CompressionPlugin = require('compression-webpack-plugin');
6
- const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
7
6
  const {
8
7
  getAppConfig,
9
8
  isApp,
10
9
  getAlias,
11
10
  excludeNodeModulesExcept,
12
11
  modulesToTranspile,
13
- resolveExtensions,
14
- mainFields,
15
- getMediaPath,
16
12
  } = require('./helpers');
17
13
  const { ESBUILD_TARGET } = require('../esbuild');
18
14
 
@@ -115,19 +111,13 @@ const getModuleRules = () => [
115
111
  type: 'asset/resource',
116
112
  },
117
113
  {
118
- test: /\.svg$/,
119
- exclude: excludeNodeModulesExcept(['@elliemae/*']),
120
- use: [
121
- {
122
- loader: '@svgr/webpack',
123
- },
124
- {
125
- loader: 'file-loader',
126
- options: {
127
- name: getMediaPath(),
128
- },
129
- },
130
- ],
114
+ type: 'asset',
115
+ resourceQuery: /url/, // *.svg?react
116
+ },
117
+ {
118
+ test: /\.svg$/i,
119
+ issuer: /\.[jt]sx?$/,
120
+ use: ['@svgr/webpack'],
131
121
  },
132
122
  {
133
123
  test: /\.(jpe?g|png|gif|ico)$/i,
@@ -157,9 +147,6 @@ exports.webpackFinal = async (config, { configType }) => {
157
147
 
158
148
  config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
159
149
  config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
160
- config.resolve.plugins = (config.resolve.plugins || []).concat([
161
- new TsconfigPathsPlugin({ extensions: resolveExtensions, mainFields }),
162
- ]);
163
150
 
164
151
  config.externals = config.externals || {};
165
152
  config.externals['@elliemae/pui-user-monitoring'] = 'emuiUserMonitoring';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.0.0-beta.5",
3
+ "version": "6.0.0-beta.9",
4
4
  "private": false,
5
5
  "description": "EllieMae Platform UI CLI",
6
6
  "sideEffects": false,
@@ -66,18 +66,16 @@
66
66
  "@commitlint/cli": "~15.0.0",
67
67
  "@commitlint/config-conventional": "~15.0.0",
68
68
  "@elliemae/browserslist-config-elliemae": "~1.2.1",
69
- "@pmmmwh/react-refresh-webpack-plugin": "~0.5.2",
69
+ "@pmmmwh/react-refresh-webpack-plugin": "~0.5.3",
70
70
  "@semantic-release/changelog": "~6.0.1",
71
71
  "@semantic-release/exec": "~6.0.2",
72
72
  "@semantic-release/git": "~10.0.1",
73
73
  "@storybook/addon-a11y": "~6.3.12",
74
74
  "@storybook/addon-actions": "~6.3.12",
75
75
  "@storybook/addon-backgrounds": "~6.3.12",
76
- "@storybook/addon-console": "~1.2.3",
77
76
  "@storybook/addon-controls": "~6.3.12",
78
77
  "@storybook/addon-docs": "~6.3.12",
79
78
  "@storybook/addon-events": "~6.2.9",
80
- "@storybook/addon-knobs": "~6.3.1",
81
79
  "@storybook/addon-links": "~6.3.12",
82
80
  "@storybook/addon-storysource": "~6.3.12",
83
81
  "@storybook/addon-toolbars": "~6.3.12",
@@ -88,7 +86,7 @@
88
86
  "@storybook/react": "~6.3.12",
89
87
  "@storybook/theming": "~6.3.12",
90
88
  "@stylelint/postcss-css-in-js": "~0.37.2",
91
- "@svgr/webpack": "~5.5.0",
89
+ "@svgr/webpack": "~6.0.0",
92
90
  "@testing-library/jest-dom": "~5.15.1",
93
91
  "@testing-library/react": "~12.1.2",
94
92
  "@testing-library/react-hooks": "~7.0.2",
@@ -96,8 +94,9 @@
96
94
  "@types/node": "~16.11.10",
97
95
  "@types/rimraf": "~3.0.2",
98
96
  "@types/testing-library__jest-dom": "~5.14.1",
99
- "@typescript-eslint/eslint-plugin": "~5.4.0",
100
- "@typescript-eslint/parser": "~5.4.0",
97
+ "@typescript-eslint/eslint-plugin": "~5.5.0",
98
+ "@typescript-eslint/parser": "~5.5.0",
99
+ "@vitejs/plugin-react": "~1.1.0",
101
100
  "autoprefixer": "~10.4.0",
102
101
  "axe-core": "~4.3.5",
103
102
  "babel-loader": "~8.2.3",
@@ -108,7 +107,7 @@
108
107
  "babel-plugin-lodash": "~3.3.4",
109
108
  "babel-plugin-module-resolver": "~4.1.0",
110
109
  "babel-plugin-source-map-support": "~2.1.3",
111
- "babel-plugin-styled-components": "~2.0.1",
110
+ "babel-plugin-styled-components": "~2.0.2",
112
111
  "babel-plugin-transform-react-remove-prop-types": "~0.4.24",
113
112
  "babel-plugin-transform-remove-console": "~6.9.4",
114
113
  "babel-plugin-transform-strip-block": "~0.0.4",
@@ -132,7 +131,8 @@
132
131
  "dotenv": "~10.0.0",
133
132
  "dotenv-webpack": "~7.0.3",
134
133
  "duplicate-package-checker-webpack-plugin": "~3.0.0",
135
- "esbuild": "~0.13.15",
134
+ "esbuild": "~0.14.0",
135
+ "esbuild-jest": "~0.5.0",
136
136
  "esbuild-loader": "~2.16.0",
137
137
  "eslint": "~8.3.0",
138
138
  "eslint-config-airbnb": "~18.2.1",
@@ -160,7 +160,7 @@
160
160
  "express": "~4.17.1",
161
161
  "express-pino-logger": "~7.0.0",
162
162
  "file-loader": "~6.2.0",
163
- "fork-ts-checker-webpack-plugin": "~6.4.2",
163
+ "fork-ts-checker-webpack-plugin": "~6.5.0",
164
164
  "helmet-csp": "~3.4.0",
165
165
  "html-loader": "~3.0.1",
166
166
  "html-webpack-plugin": "~5.5.0",
@@ -171,7 +171,7 @@
171
171
  "imports-loader": "~3.1.1",
172
172
  "ip": "~1.1.5",
173
173
  "jest-axe": "~5.0.1",
174
- "jest-cli": "~27.3.1",
174
+ "jest-cli": "~27.4.0",
175
175
  "jest-sonar-reporter": "~2.0.0",
176
176
  "jest-styled-components": "~7.0.8",
177
177
  "jscodeshift": "~0.13.0",
@@ -182,20 +182,20 @@
182
182
  "moment": "~2.29.1",
183
183
  "moment-locales-webpack-plugin": "~1.2.0",
184
184
  "msw": "~0.35.0",
185
- "node-plop": "~0.26.3",
185
+ "node-plop": "~0.30.0",
186
186
  "nodemon": "~2.0.15",
187
187
  "npm-check-updates": "12.0.2",
188
188
  "null-loader": "~4.0.1",
189
- "pino": "~7.4.1",
189
+ "pino": "~7.5.0",
190
190
  "pino-pretty": "~7.2.0",
191
191
  "pinst": "~2.1.6",
192
- "plop": "~2.7.6",
193
- "postcss": "~8.4.1",
192
+ "plop": "~3.0.1",
193
+ "postcss": "~8.4.4",
194
194
  "postcss-jsx": "~0.36.4",
195
195
  "postcss-html": "~1.3.0",
196
196
  "postcss-markdown": "~1.2.0",
197
197
  "postcss-syntax": "~0.36.2",
198
- "postcss-loader": "~6.2.0",
198
+ "postcss-loader": "~6.2.1",
199
199
  "postcss-preset-env": "~7.0.1",
200
200
  "prettier": "~2.5.0",
201
201
  "pug": "~3.0.2",
@@ -212,6 +212,7 @@
212
212
  "semantic-release": "~18.0.1",
213
213
  "shelljs": "~0.8.4",
214
214
  "slackify-markdown": "~4.3.0",
215
+ "storybook-builder-vite": "~0.1.10",
215
216
  "storybook-react-router": "~1.0.8",
216
217
  "storybook-addon-turbo-build": "~1.0.1",
217
218
  "style-loader": "~3.3.1",
@@ -233,6 +234,7 @@
233
234
  "update-notifier": "~5.1.0",
234
235
  "url-loader": "~4.1.1",
235
236
  "uuid": "~8.3.2",
237
+ "vite": "~2.6.14",
236
238
  "webpack": "~5.64.4",
237
239
  "webpack-bundle-analyzer": "~4.5.0",
238
240
  "webpack-cli": "~4.9.1",