@elliemae/pui-cli 8.17.0 → 8.17.2

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,6 +34,7 @@ __export(helpers_exports, {
34
34
  getAlias: () => getAlias,
35
35
  getAppVersion: () => getAppVersion,
36
36
  getCompressionPlugins: () => getCompressionPlugins,
37
+ getLibraryAlias: () => getLibraryAlias,
37
38
  getLibraryName: () => getLibraryName,
38
39
  getLibraryVariableName: () => getLibraryVariableName,
39
40
  getMediaPath: () => getMediaPath,
@@ -113,6 +114,15 @@ const getAlias = () => {
113
114
  import_node_path.default.join(monorepoRoot, "./node_modules")
114
115
  );
115
116
  };
117
+ const getLibraryAlias = (name, alias) => {
118
+ const monorepoRoot = (0, import_utils.findMonoRepoRoot)(process.cwd()) || "";
119
+ const aliasPath = import_node_path.default.resolve(
120
+ `${import_node_path.default.join(monorepoRoot, "./node_modules")}/${alias}`
121
+ );
122
+ return {
123
+ [name]: aliasPath
124
+ };
125
+ };
116
126
  const modulesToTranspile = [
117
127
  "@elliemae/pui-*",
118
128
  "@elliemae/ds-*",
@@ -69,6 +69,14 @@ const getAdditionalPlugins = () => [
69
69
  })
70
70
  ];
71
71
  const getModuleRules = () => [
72
+ {
73
+ test: /\.(m?js)$/,
74
+ exclude: (0, import_helpers.excludeNodeModulesExcept)(import_helpers.modulesToTranspile),
75
+ type: "javascript/auto",
76
+ resolve: {
77
+ fullySpecified: false
78
+ }
79
+ },
72
80
  {
73
81
  type: "asset",
74
82
  resourceQuery: /url/
@@ -97,7 +105,20 @@ const webpackFinal = (config, { configType }) => {
97
105
  config.plugins = config?.plugins?.concat((0, import_helpers.getCompressionPlugins)());
98
106
  }
99
107
  if (config.resolve) {
100
- config.resolve.alias = { ...config?.resolve?.alias, ...(0, import_helpers.getAlias)() };
108
+ const aliases = (0, import_helpers.getAlias)();
109
+ const newAliases = Object.keys(aliases).reduce((acc, key) => {
110
+ if (key !== "react" && key !== "react-dom")
111
+ acc[key] = aliases[key];
112
+ return acc;
113
+ }, {});
114
+ config.resolve.alias = {
115
+ ...config?.resolve?.alias,
116
+ ...newAliases,
117
+ ...(0, import_helpers.getLibraryAlias)(
118
+ "@reduxjs/toolkit/query/react",
119
+ "@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js"
120
+ )
121
+ };
101
122
  config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
102
123
  config.resolve.extensions?.push(".svg");
103
124
  config.resolve.plugins = [
@@ -116,7 +137,5 @@ const webpackFinal = (config, { configType }) => {
116
137
  const managerWebpack = (config) => {
117
138
  if (config.plugins)
118
139
  config.plugins = config.plugins.concat((0, import_helpers.getCompressionPlugins)());
119
- if (config.resolve)
120
- config.resolve.alias = { ...config.resolve.alias, ...(0, import_helpers.getAlias)() };
121
140
  return config;
122
141
  };
@@ -65,6 +65,15 @@ const getAlias = () => {
65
65
  path.join(monorepoRoot, "./node_modules")
66
66
  );
67
67
  };
68
+ const getLibraryAlias = (name, alias) => {
69
+ const monorepoRoot = findMonoRepoRoot(process.cwd()) || "";
70
+ const aliasPath = path.resolve(
71
+ `${path.join(monorepoRoot, "./node_modules")}/${alias}`
72
+ );
73
+ return {
74
+ [name]: aliasPath
75
+ };
76
+ };
68
77
  const modulesToTranspile = [
69
78
  "@elliemae/pui-*",
70
79
  "@elliemae/ds-*",
@@ -204,6 +213,7 @@ export {
204
213
  getAlias,
205
214
  getAppVersion,
206
215
  getCompressionPlugins,
216
+ getLibraryAlias,
207
217
  getLibraryName,
208
218
  getLibraryVariableName,
209
219
  getMediaPath,
@@ -2,7 +2,13 @@ import webpack from "webpack";
2
2
  import MiniCssExtractPlugin from "mini-css-extract-plugin";
3
3
  import CopyWebpackPlugin from "copy-webpack-plugin";
4
4
  import ResolveTypeScriptPlugin from "resolve-typescript-plugin";
5
- import { getAlias, getCompressionPlugins } from "./helpers.js";
5
+ import {
6
+ getAlias,
7
+ getLibraryAlias,
8
+ getCompressionPlugins,
9
+ excludeNodeModulesExcept,
10
+ modulesToTranspile
11
+ } from "./helpers.js";
6
12
  import { isApp } from "../utils.js";
7
13
  const IS_APP = isApp();
8
14
  const CWD = process.cwd();
@@ -35,6 +41,14 @@ const getAdditionalPlugins = () => [
35
41
  })
36
42
  ];
37
43
  const getModuleRules = () => [
44
+ {
45
+ test: /\.(m?js)$/,
46
+ exclude: excludeNodeModulesExcept(modulesToTranspile),
47
+ type: "javascript/auto",
48
+ resolve: {
49
+ fullySpecified: false
50
+ }
51
+ },
38
52
  {
39
53
  type: "asset",
40
54
  resourceQuery: /url/
@@ -63,7 +77,20 @@ const webpackFinal = (config, { configType }) => {
63
77
  config.plugins = config?.plugins?.concat(getCompressionPlugins());
64
78
  }
65
79
  if (config.resolve) {
66
- config.resolve.alias = { ...config?.resolve?.alias, ...getAlias() };
80
+ const aliases = getAlias();
81
+ const newAliases = Object.keys(aliases).reduce((acc, key) => {
82
+ if (key !== "react" && key !== "react-dom")
83
+ acc[key] = aliases[key];
84
+ return acc;
85
+ }, {});
86
+ config.resolve.alias = {
87
+ ...config?.resolve?.alias,
88
+ ...newAliases,
89
+ ...getLibraryAlias(
90
+ "@reduxjs/toolkit/query/react",
91
+ "@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js"
92
+ )
93
+ };
67
94
  config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
68
95
  config.resolve.extensions?.push(".svg");
69
96
  config.resolve.plugins = [
@@ -82,8 +109,6 @@ const webpackFinal = (config, { configType }) => {
82
109
  const managerWebpack = (config) => {
83
110
  if (config.plugins)
84
111
  config.plugins = config.plugins.concat(getCompressionPlugins());
85
- if (config.resolve)
86
- config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
87
112
  return config;
88
113
  };
89
114
  export {
@@ -8,6 +8,9 @@ export declare const getLibraryName: () => string;
8
8
  export declare const getLibraryVariableName: () => string[];
9
9
  export declare const mapToFolder: (dependencies: string[], folder: string) => {};
10
10
  export declare const getAlias: () => {};
11
+ export declare const getLibraryAlias: (name: string, alias: string) => {
12
+ [x: string]: string;
13
+ };
11
14
  export declare const modulesToTranspile: string[];
12
15
  export declare const getAppVersion: () => string;
13
16
  export declare const getPaths: (latestVersion?: boolean) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "8.17.0",
3
+ "version": "8.17.2",
4
4
  "description": "ICE MT UI Platform CLI",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -77,9 +77,9 @@
77
77
  "dependencies": {
78
78
  "@axe-core/react": "~4.7.3",
79
79
  "@babel/cli": "~7.22.15",
80
- "@babel/core": "~7.22.17",
80
+ "@babel/core": "~7.22.19",
81
81
  "@babel/eslint-parser": "~7.22.15",
82
- "@babel/node": "~7.22.15",
82
+ "@babel/node": "~7.22.19",
83
83
  "@babel/plugin-proposal-class-properties": "~7.18.6",
84
84
  "@babel/plugin-proposal-export-default-from": "~7.22.17",
85
85
  "@babel/plugin-syntax-dynamic-import": "~7.8.3",
@@ -97,9 +97,9 @@
97
97
  "@commitlint/config-conventional": "~17.7.0",
98
98
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.8.0",
99
99
  "@faker-js/faker": "~7.6.0",
100
- "@nrwl/cli": "~15.9.6",
101
- "@nrwl/tao": "~15.9.6",
102
- "@nrwl/workspace": "~15.9.6",
100
+ "@nrwl/cli": "~15.9.7",
101
+ "@nrwl/tao": "~15.9.7",
102
+ "@nrwl/workspace": "~15.9.7",
103
103
  "@pmmmwh/react-refresh-webpack-plugin": "~0.5.11",
104
104
  "@semantic-release/changelog": "~6.0.3",
105
105
  "@semantic-release/exec": "~6.0.3",
@@ -123,7 +123,7 @@
123
123
  "@testing-library/jest-dom": "~5.17.0",
124
124
  "@testing-library/react": "~14.0.0",
125
125
  "@testing-library/react-hooks": "~8.0.1",
126
- "@testing-library/user-event": "~14.4.3",
126
+ "@testing-library/user-event": "~14.5.0",
127
127
  "@types/circular-dependency-plugin": "~5.0.6",
128
128
  "@types/compression": "~1.7.3",
129
129
  "@types/cors": "~2.8.14",
@@ -139,7 +139,7 @@
139
139
  "@types/speed-measure-webpack-plugin": "~1.3.4",
140
140
  "@types/supertest": "~2.0.12",
141
141
  "@types/testing-library__jest-dom": "~5.14.9",
142
- "@types/uuid": "~9.0.3",
142
+ "@types/uuid": "~9.0.4",
143
143
  "@types/webpack-bundle-analyzer": "~4.6.0",
144
144
  "@typescript-eslint/eslint-plugin": "~5.62.0",
145
145
  "@typescript-eslint/parser": "~5.62.0",
@@ -175,7 +175,7 @@
175
175
  "dotenv-webpack": "~8.0.1",
176
176
  "duplicate-package-checker-webpack-plugin": "~3.0.0",
177
177
  "enhanced-resolve": "5.15.0",
178
- "esbuild": "~0.19.2",
178
+ "esbuild": "~0.19.3",
179
179
  "esbuild-loader": "~3.2.0",
180
180
  "esbuild-plugin-svgr": "~1.1.0",
181
181
  "eslint": "~8.49.0",
@@ -232,12 +232,12 @@
232
232
  "minimist": "~1.2.8",
233
233
  "moment": "~2.29.4",
234
234
  "moment-locales-webpack-plugin": "~1.2.0",
235
- "msw": "~1.3.0",
235
+ "msw": "~1.3.1",
236
236
  "node-gyp": "~9.4.0",
237
237
  "node-plop": "~0.32.0",
238
238
  "nodemon": "~2.0.22",
239
239
  "normalize-path": "~3.0.0",
240
- "npm-check-updates": "16.14.0",
240
+ "npm-check-updates": "16.14.2",
241
241
  "npm-run-all": "~4.1.5",
242
242
  "pino": "~8.15.1",
243
243
  "pino-http": "~8.5.0",
@@ -272,6 +272,7 @@
272
272
  "stylelint-config-styled-components": "~0.1.1",
273
273
  "supertest": "~6.3.3",
274
274
  "swc-loader": "~0.2.3",
275
+ "tsconfig-paths-webpack-plugin": "~3.5.2",
275
276
  "ts-node": "~10.9.1",
276
277
  "tsc-alias": "~1.8.7",
277
278
  "tsx": "~3.12.10",