@zeroheight/adoption-cli 0.2.11 → 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 ADDED
@@ -0,0 +1,37 @@
1
+ # Release notes
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
+
8
+ ## [0.2.12](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.12) - 24th July 2024
9
+ - Update release notes
10
+
11
+ ## [0.2.11](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.11) - 24th July 2024
12
+ - Add accessible release notes
13
+
14
+ ## [0.2.10](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.10) - 15th July 2024
15
+ - Add ability to reset authentication credentials
16
+
17
+ ## [0.2.9](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.9) - 20th June 2024
18
+ - Update documentation links
19
+
20
+ ## [0.2.8](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.8) - 19th June 2024
21
+ - Bug fixes
22
+
23
+ ## [0.2.7](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.7) - 19th June 2024
24
+ - Bug fixes
25
+
26
+ ## [0.2.6](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.6) - 19th June 2024
27
+ - Bug fixes
28
+
29
+ ## [0.2.5](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.5) - 14th June 2024
30
+ - Add more support for TypeScript files
31
+ - Allow `--ignore` to be passed as an option
32
+
33
+ ## [0.2.0](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.2.0) - 10th June 2024
34
+ - Add ability to define name of repository being analyzed
35
+
36
+ ## [0.1.1](https://www.npmjs.com/package/@zeroheight/adoption-cli/v/0.1.1) - 3rd June 2024
37
+ - Initial package set up
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  CLI for measuring component usage to view in your [zeroheight](https://zeroheight.com/) account.
4
4
 
5
- See release notes [here](CHANGELOG.md)
5
+ See release notes [here](https://www.npmjs.com/package/@zeroheight/adoption-cli?activeTab=code)
6
6
 
7
7
  ## Install
8
8
 
@@ -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.11")
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.11",
3
+ "version": "0.2.13",
4
4
  "license": "ISC",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -21,7 +21,8 @@
21
21
  "test": "vitest"
22
22
  },
23
23
  "files": [
24
- "dist"
24
+ "dist",
25
+ "CHANGELOG.md"
25
26
  ],
26
27
  "dependencies": {
27
28
  "acorn": "^8.11.3",