@elliemae/pui-cli 8.10.0 → 8.11.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.
@@ -32,10 +32,19 @@ __export(lint_exports, {
32
32
  });
33
33
  module.exports = __toCommonJS(lint_exports);
34
34
  var import_node_path = __toESM(require("node:path"), 1);
35
+ var import_node_util = require("node:util");
35
36
  var import_yargs = __toESM(require("yargs"), 1);
36
37
  var import_utils = require("./utils.js");
37
- const lintCSS = async (fix = false) => {
38
- const fixIssues = fix ? "--fix" : "";
38
+ const lintCSS = async (args) => {
39
+ const fixIssues = args.fix ? "--fix" : "";
40
+ if (args.debug) {
41
+ const configPath = import_node_path.default.join(process.cwd(), "stylelint.config.cjs");
42
+ const config = await import(configPath);
43
+ (0, import_utils.logInfo)("stylelint version:");
44
+ await (0, import_utils.exec)(`stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} --version`);
45
+ (0, import_utils.logInfo)("stylelint config:");
46
+ (0, import_utils.logInfo)((0, import_node_util.inspect)(config, { depth: null }));
47
+ }
39
48
  await (0, import_utils.exec)(
40
49
  `stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} ${fixIssues} ${!(0, import_utils.getCIEnv)() ? "--color" : "--no-color"} --allow-empty-input --config ${import_node_path.default.join(
41
50
  process.cwd(),
@@ -43,10 +52,11 @@ const lintCSS = async (fix = false) => {
43
52
  )}`
44
53
  );
45
54
  };
46
- const lintJS = async (fix = false) => {
47
- const fixIssues = fix ? "--fix" : "";
55
+ const lintJS = async (args) => {
56
+ const fixIssues = args.fix ? "--fix" : "";
57
+ const debugFlags = args.debug ? "--env-info --debug" : "";
48
58
  await (0, import_utils.exec)(
49
- `eslint ${!(0, import_utils.getCIEnv)() ? "--color" : "--no-color"} ${fixIssues} .`
59
+ `eslint ${!(0, import_utils.getCIEnv)() ? "--color" : "--no-color"} ${fixIssues} ${debugFlags} .`
50
60
  );
51
61
  };
52
62
  const cmdArgs = {
@@ -64,6 +74,11 @@ const cmdArgs = {
64
74
  boolean: true,
65
75
  alias: "fix",
66
76
  default: false
77
+ },
78
+ debug: {
79
+ boolean: true,
80
+ alias: "debug",
81
+ default: false
67
82
  }
68
83
  };
69
84
  const lintCmd = {
@@ -73,10 +88,12 @@ const lintCmd = {
73
88
  await (0, import_utils.exec)("tsc --noEmit --emitDeclarationOnly false");
74
89
  try {
75
90
  await (0, import_utils.exec)("rimraf ./reports/eslint.json");
76
- await lintJS(argv.fix);
91
+ await lintJS({ ...argv });
77
92
  (0, import_utils.logSuccess)("JS linting completed");
78
93
  } catch (err) {
79
94
  (0, import_utils.logError)("JS linting failed");
95
+ if (argv.debug)
96
+ (0, import_utils.logError)(err);
80
97
  (0, import_yargs.default)().exit(-1, err);
81
98
  return;
82
99
  }
@@ -84,10 +101,12 @@ const lintCmd = {
84
101
  if (argv.css) {
85
102
  try {
86
103
  await (0, import_utils.exec)("rimraf ./reports/stylelint.json");
87
- await lintCSS(argv.fix);
104
+ await lintCSS({ ...argv });
88
105
  (0, import_utils.logSuccess)("CSS linting completed");
89
106
  } catch (err) {
90
107
  (0, import_utils.logError)("CSS linting failed");
108
+ if (argv.debug)
109
+ (0, import_utils.logError)(err);
91
110
  (0, import_yargs.default)().exit(-1, err);
92
111
  }
93
112
  }
@@ -37,6 +37,7 @@ __export(utils_exports, {
37
37
  logError: () => logError,
38
38
  logInfo: () => logInfo,
39
39
  logSuccess: () => logSuccess,
40
+ logWarning: () => logWarning,
40
41
  writeAppInfo: () => writeAppInfo
41
42
  });
42
43
  module.exports = __toCommonJS(utils_exports);
@@ -61,6 +62,7 @@ const browsersMapping = {
61
62
  };
62
63
  const exec = async (command, options = { stdio: "inherit" }) => (0, import_execa.execaCommand)(command, options);
63
64
  const logInfo = console.log;
65
+ const logWarning = (...args) => console.log(import_chalk.default.yellow(...args));
64
66
  const logSuccess = (...args) => console.log(import_chalk.default.green(...args));
65
67
  const logError = console.error;
66
68
  const readPackageLock = async () => {
@@ -152,6 +152,7 @@ exports.baseConfig = {
152
152
  },
153
153
  ignorePatterns: [
154
154
  "/build/**/*",
155
+ "/node_modules/**/*",
155
156
  "/dist/**/*",
156
157
  "/reports/**/*",
157
158
  "/coverage/**/*",
@@ -1,19 +1,20 @@
1
1
  exports.stylelintConfig = {
2
2
  ignoreFiles: [
3
- '/dist/**/*',
4
- '/coverage/**/*',
5
- '/build/**/*',
6
- '/reports/**/*',
7
- '/temp/**/*',
8
- '/docs/**/*',
9
- '/demo/**/*',
10
- '/node_modules/**/*',
11
- '/vendor/**/*',
3
+ "/dist/**/*",
4
+ "/coverage/**/*",
5
+ "/build/**/*",
6
+ "/reports/**/*",
7
+ "/temp/**/*",
8
+ "/docs/**/*",
9
+ "/demo/**/*",
10
+ "/node_modules/**/*",
11
+ "/vendor/**/*",
12
12
  ],
13
- customSyntax: '@stylelint/postcss-css-in-js',
13
+ customSyntax: "@stylelint/postcss-css-in-js",
14
+ // customSyntax: "postcss-styled-components", // '@stylelint/postcss-css-in-js' is deprecated, this may be a replacement?
14
15
  extends: [
15
- 'stylelint-config-recommended',
16
- 'stylelint-config-styled-components',
16
+ "stylelint-config-recommended",
17
+ "stylelint-config-styled-components",
17
18
  ],
18
- rules: { 'selector-type-no-unknown': null, 'function-no-unknown': null },
19
+ rules: { "selector-type-no-unknown": null, "function-no-unknown": null },
19
20
  };
@@ -57,6 +57,8 @@ const jestConfig = {
57
57
  coverageReporters: ['lcov', 'html', 'text-summary'],
58
58
  moduleDirectories: ['node_modules', 'app', 'lib'],
59
59
  moduleNameMapper: {
60
+ d3: '<rootDir>/node_modules/d3/dist/d3.min.js',
61
+ '^d3-(.*)$': '<rootDir>/node_modules/d3-$1/dist/d3-$1.min.js',
60
62
  '.*\\webpack-hmr(.[t|j]s)?$': getMockFilePath('webpack-hmr.js'),
61
63
  '.*\\.(css|scss)$': getMockFilePath('cssModule.js'),
62
64
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$':
@@ -1,14 +1,24 @@
1
1
  import path from "node:path";
2
+ import { inspect } from "node:util";
2
3
  import yargs from "yargs";
3
4
  import {
4
5
  exec,
6
+ logInfo,
5
7
  logError,
6
8
  logSuccess,
7
9
  getCIEnv,
8
10
  isTypeScriptEnabled
9
11
  } from "./utils.js";
10
- const lintCSS = async (fix = false) => {
11
- const fixIssues = fix ? "--fix" : "";
12
+ const lintCSS = async (args) => {
13
+ const fixIssues = args.fix ? "--fix" : "";
14
+ if (args.debug) {
15
+ const configPath = path.join(process.cwd(), "stylelint.config.cjs");
16
+ const config = await import(configPath);
17
+ logInfo("stylelint version:");
18
+ await exec(`stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} --version`);
19
+ logInfo("stylelint config:");
20
+ logInfo(inspect(config, { depth: null }));
21
+ }
12
22
  await exec(
13
23
  `stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} ${fixIssues} ${!getCIEnv() ? "--color" : "--no-color"} --allow-empty-input --config ${path.join(
14
24
  process.cwd(),
@@ -16,10 +26,11 @@ const lintCSS = async (fix = false) => {
16
26
  )}`
17
27
  );
18
28
  };
19
- const lintJS = async (fix = false) => {
20
- const fixIssues = fix ? "--fix" : "";
29
+ const lintJS = async (args) => {
30
+ const fixIssues = args.fix ? "--fix" : "";
31
+ const debugFlags = args.debug ? "--env-info --debug" : "";
21
32
  await exec(
22
- `eslint ${!getCIEnv() ? "--color" : "--no-color"} ${fixIssues} .`
33
+ `eslint ${!getCIEnv() ? "--color" : "--no-color"} ${fixIssues} ${debugFlags} .`
23
34
  );
24
35
  };
25
36
  const cmdArgs = {
@@ -37,6 +48,11 @@ const cmdArgs = {
37
48
  boolean: true,
38
49
  alias: "fix",
39
50
  default: false
51
+ },
52
+ debug: {
53
+ boolean: true,
54
+ alias: "debug",
55
+ default: false
40
56
  }
41
57
  };
42
58
  const lintCmd = {
@@ -46,10 +62,12 @@ const lintCmd = {
46
62
  await exec("tsc --noEmit --emitDeclarationOnly false");
47
63
  try {
48
64
  await exec("rimraf ./reports/eslint.json");
49
- await lintJS(argv.fix);
65
+ await lintJS({ ...argv });
50
66
  logSuccess("JS linting completed");
51
67
  } catch (err) {
52
68
  logError("JS linting failed");
69
+ if (argv.debug)
70
+ logError(err);
53
71
  yargs().exit(-1, err);
54
72
  return;
55
73
  }
@@ -57,10 +75,12 @@ const lintCmd = {
57
75
  if (argv.css) {
58
76
  try {
59
77
  await exec("rimraf ./reports/stylelint.json");
60
- await lintCSS(argv.fix);
78
+ await lintCSS({ ...argv });
61
79
  logSuccess("CSS linting completed");
62
80
  } catch (err) {
63
81
  logError("CSS linting failed");
82
+ if (argv.debug)
83
+ logError(err);
64
84
  yargs().exit(-1, err);
65
85
  }
66
86
  }
@@ -31,6 +31,7 @@ const browsersMapping = {
31
31
  };
32
32
  const exec = async (command, options = { stdio: "inherit" }) => execaCommand(command, options);
33
33
  const logInfo = console.log;
34
+ const logWarning = (...args) => console.log(chalk.yellow(...args));
34
35
  const logSuccess = (...args) => console.log(chalk.green(...args));
35
36
  const logError = console.error;
36
37
  const readPackageLock = async () => {
@@ -186,5 +187,6 @@ export {
186
187
  logError,
187
188
  logInfo,
188
189
  logSuccess,
190
+ logWarning,
189
191
  writeAppInfo
190
192
  };
@@ -152,6 +152,7 @@ exports.baseConfig = {
152
152
  },
153
153
  ignorePatterns: [
154
154
  "/build/**/*",
155
+ "/node_modules/**/*",
155
156
  "/dist/**/*",
156
157
  "/reports/**/*",
157
158
  "/coverage/**/*",
@@ -1,19 +1,20 @@
1
1
  exports.stylelintConfig = {
2
2
  ignoreFiles: [
3
- '/dist/**/*',
4
- '/coverage/**/*',
5
- '/build/**/*',
6
- '/reports/**/*',
7
- '/temp/**/*',
8
- '/docs/**/*',
9
- '/demo/**/*',
10
- '/node_modules/**/*',
11
- '/vendor/**/*',
3
+ "/dist/**/*",
4
+ "/coverage/**/*",
5
+ "/build/**/*",
6
+ "/reports/**/*",
7
+ "/temp/**/*",
8
+ "/docs/**/*",
9
+ "/demo/**/*",
10
+ "/node_modules/**/*",
11
+ "/vendor/**/*",
12
12
  ],
13
- customSyntax: '@stylelint/postcss-css-in-js',
13
+ customSyntax: "@stylelint/postcss-css-in-js",
14
+ // customSyntax: "postcss-styled-components", // '@stylelint/postcss-css-in-js' is deprecated, this may be a replacement?
14
15
  extends: [
15
- 'stylelint-config-recommended',
16
- 'stylelint-config-styled-components',
16
+ "stylelint-config-recommended",
17
+ "stylelint-config-styled-components",
17
18
  ],
18
- rules: { 'selector-type-no-unknown': null, 'function-no-unknown': null },
19
+ rules: { "selector-type-no-unknown": null, "function-no-unknown": null },
19
20
  };
@@ -57,6 +57,8 @@ const jestConfig = {
57
57
  coverageReporters: ['lcov', 'html', 'text-summary'],
58
58
  moduleDirectories: ['node_modules', 'app', 'lib'],
59
59
  moduleNameMapper: {
60
+ d3: '<rootDir>/node_modules/d3/dist/d3.min.js',
61
+ '^d3-(.*)$': '<rootDir>/node_modules/d3-$1/dist/d3-$1.min.js',
60
62
  '.*\\webpack-hmr(.[t|j]s)?$': getMockFilePath('webpack-hmr.js'),
61
63
  '.*\\.(css|scss)$': getMockFilePath('cssModule.js'),
62
64
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$':
@@ -3,6 +3,7 @@ type Arguments = {
3
3
  css: boolean;
4
4
  js: boolean;
5
5
  fix: boolean;
6
+ debug: boolean;
6
7
  };
7
8
  export declare const lintCmd: CommandModule<Record<string, never>, Arguments>;
8
9
  export {};
@@ -4,6 +4,7 @@ export declare const logInfo: {
4
4
  (...data: any[]): void;
5
5
  (message?: any, ...optionalParams: any[]): void;
6
6
  };
7
+ export declare const logWarning: (...args: string[]) => void;
7
8
  export declare const logSuccess: (...args: string[]) => void;
8
9
  export declare const logError: {
9
10
  (...data: any[]): void;
@@ -4,7 +4,7 @@ export namespace stylelintConfig {
4
4
  const _extends: string[];
5
5
  export { _extends as extends };
6
6
  export const rules: {
7
- 'selector-type-no-unknown': null;
8
- 'function-no-unknown': null;
7
+ "selector-type-no-unknown": null;
8
+ "function-no-unknown": null;
9
9
  };
10
10
  }
@@ -5,6 +5,8 @@ export namespace jestConfig {
5
5
  const coverageReporters: string[];
6
6
  const moduleDirectories: string[];
7
7
  const moduleNameMapper: {
8
+ d3: string;
9
+ '^d3-(.*)$': string;
8
10
  '.*\\webpack-hmr(.[t|j]s)?$': string;
9
11
  '.*\\.(css|scss)$': string;
10
12
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$': string;
@@ -9,6 +9,8 @@ export const jestNodeConfig: {
9
9
  coverageReporters: string[];
10
10
  moduleDirectories: string[];
11
11
  moduleNameMapper: {
12
+ d3: string;
13
+ '^d3-(.*)$': string;
12
14
  '.*\\webpack-hmr(.[t|j]s)?$': string;
13
15
  '.*\\.(css|scss)$': string;
14
16
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$': string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "8.10.0",
3
+ "version": "8.11.1",
4
4
  "description": "ICE MT UI Platform CLI",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -125,8 +125,8 @@
125
125
  "@testing-library/react-hooks": "~8.0.1",
126
126
  "@testing-library/user-event": "~14.4.3",
127
127
  "@types/circular-dependency-plugin": "~5.0.5",
128
- "@types/cors": "~2.8.13",
129
128
  "@types/compression": "~1.7.2",
129
+ "@types/cors": "~2.8.13",
130
130
  "@types/duplicate-package-checker-webpack-plugin": "~2.1.2",
131
131
  "@types/ip": "~1.1.0",
132
132
  "@types/jest": "~29.5.1",
@@ -138,8 +138,8 @@
138
138
  "@types/rimraf": "~3.0.2",
139
139
  "@types/speed-measure-webpack-plugin": "~1.3.4",
140
140
  "@types/supertest": "~2.0.12",
141
- "@types/uuid": "~9.0.1",
142
141
  "@types/testing-library__jest-dom": "~5.14.5",
142
+ "@types/uuid": "~9.0.1",
143
143
  "@types/webpack-bundle-analyzer": "~4.6.0",
144
144
  "@typescript-eslint/eslint-plugin": "~5.59.5",
145
145
  "@typescript-eslint/parser": "~5.59.5",
@@ -204,9 +204,9 @@
204
204
  "execa": "~7.1.1",
205
205
  "express": "~4.18.2",
206
206
  "express-static-gzip": "~2.1.7",
207
+ "fast-glob": "~3.2.12",
207
208
  "favicons": "~7.1.2",
208
209
  "favicons-webpack-plugin": "~6.0.0",
209
- "fast-glob": "~3.2.12",
210
210
  "find-up": "~6.3.0",
211
211
  "find-up-cli": "~5.0.0",
212
212
  "happy-dom": "~9.10.9",
@@ -228,17 +228,17 @@
228
228
  "jsdoc": "~4.0.2",
229
229
  "lerna": "~6.6.2",
230
230
  "lint-staged": "~13.2.2",
231
- "mini-css-extract-plugin": "~2.7.5",
231
+ "mini-css-extract-plugin": "~2.7.6",
232
232
  "minimist": "~1.2.8",
233
233
  "moment": "~2.29.4",
234
234
  "moment-locales-webpack-plugin": "~1.2.0",
235
235
  "msw": "~1.2.1",
236
- "npm-run-all": "~4.1.5",
237
236
  "node-gyp": "~9.3.1",
238
237
  "node-plop": "~0.31.1",
239
238
  "nodemon": "~2.0.22",
240
239
  "normalize-path": "~3.0.0",
241
240
  "npm-check-updates": "16.10.10",
241
+ "npm-run-all": "~4.1.5",
242
242
  "pino": "~8.14.1",
243
243
  "pino-http": "~8.3.3",
244
244
  "pino-pretty": "~10.0.0",
@@ -266,8 +266,8 @@
266
266
  "speed-measure-webpack-plugin": "~1.5.0",
267
267
  "storybook-addon-turbo-build": "~1.1.0",
268
268
  "storybook-react-router": "~1.0.8",
269
- "style-loader": "~3.3.2",
270
- "stylelint": "~15.6.1",
269
+ "style-loader": "~3.3.3",
270
+ "stylelint": "~15.8.0",
271
271
  "stylelint-config-recommended": "~12.0.0",
272
272
  "stylelint-config-styled-components": "~0.1.1",
273
273
  "supertest": "~6.3.3",
@@ -280,9 +280,9 @@
280
280
  "url-loader": "~4.1.1",
281
281
  "uuid": "~9.0.0",
282
282
  "vite": "~4.3.5",
283
- "vitest": "~0.31.0",
284
283
  "vite-tsconfig-paths": "~4.2.0",
285
- "webpack": "~5.82.0",
284
+ "vitest": "~0.31.4",
285
+ "webpack": "~5.82.1",
286
286
  "webpack-bundle-analyzer": "~4.8.0",
287
287
  "webpack-cli": "~5.1.1",
288
288
  "webpack-dev-server": "~4.15.0",
@@ -298,6 +298,11 @@
298
298
  "react-dom": "~18.2.0",
299
299
  "redux": "~4.2.1",
300
300
  "redux-saga": "~1.2.3",
301
- "styled-components": "~5.3.10"
301
+ "styled-components": "~5.3.11"
302
+ },
303
+ "pnpm": {
304
+ "overrides": {
305
+ "postcss": "^8.4.16"
306
+ }
302
307
  }
303
308
  }