@zeroheight/adoption-cli 0.2.12 → 0.2.13

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release notes
2
2
 
3
+ ## [0.2.13](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.13) - 25th July 2024
4
+
5
+ - Fix ws dependency security issue — https://github.com/advisories/GHSA-3h5v-q93c-6h6q
6
+ - Stop the flow breaking due to parsing errors
7
+
3
8
  ## [0.2.12](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.12) - 24th July 2024
4
9
  - Update release notes
5
10
 
package/README.md CHANGED
@@ -18,12 +18,20 @@ In the repository in which you wish to analyze the component usage, run the foll
18
18
  zh-adoption analyze
19
19
  ```
20
20
 
21
+ You are able to limit the file extensions to include when searching for components by using `-e, --extensions [ext]` with a glob pattern to determine file extensions.
22
+
23
+ You are able to state files to ignore when searching for components by using `-i, --ignore [ext]` with a glob pattern to determine ignored files.
24
+
25
+ ---
26
+
21
27
  To send adoption data to your [zeroheight](https://zeroheight.com/) account you will need to authenticate. This can be done as part of the `analyze` flow or separately by running:
22
28
 
23
29
  ```
24
30
  zh-adoption auth
25
31
  ```
26
32
 
33
+ ---
34
+
27
35
  More info on the commands can be seen by running
28
36
 
29
37
  ```
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ const { output, cleanup } = render(React.createElement(HelpInfo, null));
10
10
  program
11
11
  .name("zh-adoption")
12
12
  .description("CLI for measuring design system usage usage in your products")
13
- .version("0.2.12")
13
+ .version("0.2.13")
14
14
  .addHelpText("before", output)
15
15
  .addCommand(analyzeCommand())
16
16
  .addCommand(authCommand());
@@ -15,6 +15,6 @@ export interface ComponentUsageRecord {
15
15
  */
16
16
  export declare function findFiles(base: string, extensions: string, ignorePattern: string): Promise<string[]>;
17
17
  export declare function analyzeFiles(extensions: string, ignorePattern: string): Promise<{
18
- errors: string[];
18
+ errors: never[];
19
19
  usage: RawUsageMap;
20
20
  }>;
@@ -51,7 +51,6 @@ export async function analyzeFiles(extensions, ignorePattern) {
51
51
  if (files.length === 0) {
52
52
  throw new Error("Can't find any relevant files");
53
53
  }
54
- const parseErrors = [];
55
54
  const usageMap = new Map();
56
55
  for (const file of files) {
57
56
  try {
@@ -63,9 +62,7 @@ export async function analyzeFiles(extensions, ignorePattern) {
63
62
  usageMap.set(relativePath, usage);
64
63
  }
65
64
  }
66
- catch (e) {
67
- parseErrors.push(`Can't parse file ${file}`);
68
- }
65
+ catch { }
69
66
  }
70
- return { errors: parseErrors, usage: usageMap };
67
+ return { errors: [], usage: usageMap };
71
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeroheight/adoption-cli",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "license": "ISC",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {