@pega/custom-dx-components 0.25.62 → 0.25.64

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/eslint.config.mjs CHANGED
@@ -1,28 +1,19 @@
1
1
  import { globalIgnores } from 'eslint/config';
2
- import path from 'node:path';
3
2
  import { fileURLToPath } from 'node:url';
4
- import js from '@eslint/js';
5
- import { FlatCompat } from '@eslint/eslintrc';
3
+ import eslint from '@eslint/js';
6
4
  import tseslint from 'typescript-eslint';
7
5
  import sonarjs from 'eslint-plugin-sonarjs';
8
6
  import importPlugin from 'eslint-plugin-import';
9
7
  import react from 'eslint-plugin-react';
10
8
  import reactHooks from 'eslint-plugin-react-hooks';
9
+ // eslint.config.js
10
+ import { defineConfig } from 'eslint/config';
11
11
 
12
12
  const __filename = fileURLToPath(import.meta.url);
13
- const __dirname = path.dirname(__filename);
14
- const compat = new FlatCompat({
15
- baseDirectory: __dirname,
16
- recommendedConfig: js.configs.recommended,
17
- sonarjs: sonarjs.configs.recommended,
18
- importPlugin: importPlugin.configs.recommended,
19
- react: react.configs.recommended,
20
- reactHooks: reactHooks.configs.recommended,
21
- allConfig: js.configs.all
22
- });
23
13
 
24
- export default tseslint.config(
25
- tseslint.configs.recommended,
14
+ export default defineConfig([
15
+ eslint.configs.recommended,
16
+ ...tseslint.configs.recommended,
26
17
  globalIgnores([
27
18
  '**/node_modules',
28
19
  'packages/*/lib',
@@ -32,6 +23,7 @@ export default tseslint.config(
32
23
  '**/mock.stories.js',
33
24
  '**/demo.stories.tsx',
34
25
  '**/demo.test.tsx',
26
+ '**/*.test.tsx',
35
27
  '**/mock.stories.ts',
36
28
  '**/*.mdx',
37
29
  '**/webpack.config.js',
@@ -131,7 +123,6 @@ export default tseslint.config(
131
123
  'no-alert': 'off',
132
124
  'no-console': 'error',
133
125
  'no-fallthrough': 'error',
134
- 'no-undef': 'error',
135
126
  'no-unused-vars': 'off',
136
127
  'no-var': 'off',
137
128
  yoda: 'error',
@@ -155,7 +146,6 @@ export default tseslint.config(
155
146
  'react/no-unused-prop-types': 'error',
156
147
  'react/static-property-placement': 'error',
157
148
  'array-callback-return': 'error',
158
- camelcase: 'error',
159
149
  'func-names': 'error',
160
150
  'no-case-declarations': 'error',
161
151
  'no-lonely-if': 'error',
@@ -208,7 +198,6 @@ export default tseslint.config(
208
198
  {
209
199
  files: ['**/*.@(ts|tsx)'],
210
200
  rules: {
211
- 'no-undef': 'error',
212
201
  'no-console': 'off',
213
202
  'import/prefer-default-export': 'off',
214
203
  'import/no-relative-packages': 'off',
@@ -230,4 +219,4 @@ export default tseslint.config(
230
219
  'import/prefer-default-export': ['off']
231
220
  }
232
221
  }
233
- );
222
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "0.25.62",
3
+ "version": "0.25.64",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "keywords": [
package/src/cli.js CHANGED
@@ -293,4 +293,4 @@ export default async (args = []) => {
293
293
  break;
294
294
  }
295
295
  }
296
- };
296
+ }
@@ -1,28 +1,19 @@
1
1
  import { globalIgnores } from 'eslint/config';
2
- import path from 'node:path';
3
2
  import { fileURLToPath } from 'node:url';
4
- import js from '@eslint/js';
5
- import { FlatCompat } from '@eslint/eslintrc';
3
+ import eslint from '@eslint/js';
6
4
  import tseslint from 'typescript-eslint';
7
5
  import sonarjs from 'eslint-plugin-sonarjs';
8
6
  import importPlugin from 'eslint-plugin-import';
9
7
  import react from 'eslint-plugin-react';
10
8
  import reactHooks from 'eslint-plugin-react-hooks';
9
+ // eslint.config.js
10
+ import { defineConfig } from 'eslint/config';
11
11
 
12
12
  const __filename = fileURLToPath(import.meta.url);
13
- const __dirname = path.dirname(__filename);
14
- const compat = new FlatCompat({
15
- baseDirectory: __dirname,
16
- recommendedConfig: js.configs.recommended,
17
- sonarjs: sonarjs.configs.recommended,
18
- importPlugin: importPlugin.configs.recommended,
19
- react: react.configs.recommended,
20
- reactHooks: reactHooks.configs.recommended,
21
- allConfig: js.configs.all
22
- });
23
13
 
24
- export default tseslint.config(
25
- tseslint.configs.recommended,
14
+ export default defineConfig([
15
+ eslint.configs.recommended,
16
+ ...tseslint.configs.recommended,
26
17
  globalIgnores([
27
18
  '**/node_modules',
28
19
  'packages/*/lib',
@@ -228,4 +219,4 @@ export default tseslint.config(
228
219
  'import/prefer-default-export': ['off']
229
220
  }
230
221
  }
231
- );
222
+ ]);
@@ -108,7 +108,7 @@
108
108
  "@babel/preset-react": "^7.27.1",
109
109
  "@babel/preset-typescript": "^7.27.1",
110
110
  "@pega/configs": "^0.16.3",
111
- "@pega/custom-dx-components": "~0.25.62",
111
+ "@pega/custom-dx-components": "~0.25.64",
112
112
  "@pega/pcore-pconnect-typedefs": "^4.1.0",
113
113
  "@storybook/addon-actions": "^8.6.14",
114
114
  "@storybook/addon-essentials": "^8.6.14",
@@ -131,7 +131,8 @@
131
131
  "@types/react-color": "^3.0.13",
132
132
  "@types/react-dom": "^18.3.7",
133
133
  "@types/styled-components": "^5.1.34",
134
- "@typescript-eslint/eslint-plugin": "^5.62.0",
134
+ "@typescript-eslint/eslint-plugin": "^8.44.1",
135
+ "@typescript-eslint/parser": "^8.44.1",
135
136
  "core-js": "^3.42.0",
136
137
  "eslint": "^9.27.0",
137
138
  "eslint-plugin-import": "^2.31.0",
@@ -156,7 +157,7 @@
156
157
  "stylelint": "^16.19.1",
157
158
  "ts-jest": "^29.3.2",
158
159
  "typescript": "~5.5.4",
159
- "typescript-eslint": "^8.32.1",
160
+ "typescript-eslint": "^8.44.1",
160
161
  "vite": "^6.3.5"
161
162
  }
162
163
  }
@@ -54,7 +54,7 @@ export default async (options) => {
54
54
  }
55
55
 
56
56
  await showVersion();
57
- await checkLibraryAndArchives(false);
57
+ await checkLibraryAndArchives();
58
58
  addDebugLog("listPublished", "", "+");
59
59
  await cleanUpTemp();
60
60
 
package/src/util.js CHANGED
@@ -47,6 +47,7 @@ import {
47
47
  } from './constants.js';
48
48
 
49
49
 
50
+
50
51
  const access = promisify(fs.access);
51
52
 
52
53
  let showDebug = false;
@@ -2650,14 +2651,10 @@ if (showDebug) addDebugLog("deleteArchives", ``, "");
2650
2651
  }
2651
2652
  }
2652
2653
 
2653
- export const checkLibraryAndArchives = async (checkArch = true) => {
2654
+ export const checkLibraryAndArchives = async () => {
2654
2655
  if (showDebug) addDebugLog("checkLibraryAndArchives", ``, "");
2655
2656
  const isLibraryBased = getLibraryBased();
2656
- let hasArch = true;
2657
- if (checkArch) {
2658
- hasArch = await hasArchives();
2659
-
2660
- }
2657
+ const hasArch = await hasArchives();
2661
2658
 
2662
2659
  if (isLibraryBased && !hasArch) {
2663
2660
  console.log(chalk.yellow('\nPlease create/import a library before proceeding.'));