@elliemae/pui-cli 6.5.2 → 6.5.3

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.
@@ -0,0 +1,15 @@
1
+ const path = require('path');
2
+ const { sync: findUp } = require('find-up');
3
+
4
+ const WORKSPACE_DIR_ENV_VAR = 'NPM_CONFIG_WORKSPACE_DIR';
5
+ const WORKSPACE_MANIFEST_FILENAME = 'pnpm-workspace.yaml';
6
+
7
+ exports.findPnpmWorkspaceDir = (cwd) => {
8
+ const workspaceManifestDirEnvVar =
9
+ process.env[WORKSPACE_DIR_ENV_VAR] ??
10
+ process.env[WORKSPACE_DIR_ENV_VAR.toLowerCase()];
11
+ const workspaceManifestLocation = workspaceManifestDirEnvVar
12
+ ? path.join(workspaceManifestDirEnvVar, 'pnpm-workspace.yaml')
13
+ : findUp([WORKSPACE_MANIFEST_FILENAME, 'pnpm-workspace.yml'], { cwd });
14
+ return workspaceManifestLocation && path.dirname(workspaceManifestLocation);
15
+ };
@@ -4,6 +4,7 @@ const fs = require('fs');
4
4
  const _ = require('lodash');
5
5
  const CompressionPlugin = require('compression-webpack-plugin');
6
6
  const zlib = require('zlib');
7
+ const { findPnpmWorkspaceDir } = require('../monorepo/utils');
7
8
 
8
9
  let pathSep = path.sep;
9
10
  if (pathSep === '\\')
@@ -66,8 +67,9 @@ const mapToFolder = (dependencies, folder) =>
66
67
  {},
67
68
  );
68
69
 
69
- const getAlias = () =>
70
- mapToFolder(
70
+ const getAlias = () => {
71
+ const monorepoRoot = findPnpmWorkspaceDir(process.cwd()) || '';
72
+ return mapToFolder(
71
73
  [
72
74
  '@babel/runtime',
73
75
  'react',
@@ -85,8 +87,9 @@ const getAlias = () =>
85
87
  '@elliemae/pui-app-sdk$',
86
88
  '@elliemae/pui-theme$',
87
89
  ],
88
- './node_modules',
90
+ path.join(monorepoRoot, './node_modules'),
89
91
  );
92
+ };
90
93
 
91
94
  const modulesToTranspile = [
92
95
  '@elliemae/pui-*',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.5.2",
3
+ "version": "6.5.3",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
@@ -145,7 +145,7 @@
145
145
  "eslint-plugin-eslint-comments": "~3.2.0",
146
146
  "eslint-plugin-import": "~2.25.4",
147
147
  "eslint-plugin-jest": "~26.1.0",
148
- "eslint-plugin-jsdoc": "~37.8.2",
148
+ "eslint-plugin-jsdoc": "~37.9.0",
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",
@@ -161,6 +161,7 @@
161
161
  "express-static-gzip": "~2.1.4",
162
162
  "favicons": "~6.2.2",
163
163
  "favicons-webpack-plugin": "~5.0.2",
164
+ "find-up": "~5.0.0",
164
165
  "happy-dom": "~2.31.1",
165
166
  "helmet-csp": "~3.4.0",
166
167
  "html-webpack-plugin": "~5.5.0",