Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: markdown reporting stuff #433

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8d69ed9
fix: incorrect identification of renamed tokens
mrcjhicks Oct 9, 2024
f707e39
fix: supports token values that are numeric
mrcjhicks Oct 9, 2024
9e55bf6
Merge remote-tracking branch 'origin/cable/fix-diffgen-renamed-token'…
mrcjhicks Oct 9, 2024
6465a7a
feat: diff-gen - adding markdown reporting format
mrcjhicks Oct 9, 2024
fb7f959
fix: removed markdown output identifier
mrcjhicks Oct 9, 2024
cddf353
fix: markdown dollar sign handling
mrcjhicks Oct 9, 2024
12e64e9
Merge remote-tracking branch 'origin/main' into cable/reporting
mrcjhicks Oct 10, 2024
bc3771d
chore: merge cleanup
mrcjhicks Oct 10, 2024
9f72e31
chore: cli merge fixes
mrcjhicks Oct 10, 2024
fca9ca6
feat: more markdown work
mrcjhicks Oct 10, 2024
0378d72
fix: for cli console feedback workflow
mrcjhicks Oct 10, 2024
7dbd4bf
Merge remote-tracking branch 'origin/main' into cable/reporting
mrcjhicks Oct 17, 2024
0d3ca6f
chore: output dir for markdown log
mrcjhicks Oct 21, 2024
a7953a8
fix: require git api key
mrcjhicks Oct 21, 2024
804f50c
chore: update gitignore
mrcjhicks Oct 21, 2024
6ae791a
fix: surface file fetch errors
mrcjhicks Oct 21, 2024
41f0538
chore: missing function param comment
mrcjhicks Oct 21, 2024
8c4cd26
fix: expose git url fetch failures
mrcjhicks Oct 21, 2024
6c3adbd
Merge remote-tracking branch 'origin/cable/tdiff-stuff' into cable/re…
mrcjhicks Oct 21, 2024
266b666
chore: disable cli y/n
mrcjhicks Oct 21, 2024
b7fe42d
fix: remove attempt at git fetch url encoding
mrcjhicks Oct 21, 2024
f10d2c3
fix: check github key exists before trying to use it
mrcjhicks Oct 23, 2024
8b5677f
fix: exit code cleanup and command line query removal
mrcjhicks Oct 23, 2024
41b6da8
chore: removed unused imports
mrcjhicks Oct 23, 2024
cea8ac6
chore: removed npm version option feedback
mrcjhicks Oct 23, 2024
9797f1e
chore: updated readme for cli changes/clarifications
mrcjhicks Oct 23, 2024
9b57dc5
chore: removed unused git workflow/changeset hook
mrcjhicks Oct 23, 2024
3e4c6ac
chore: removed deprecated cli option
mrcjhicks Oct 23, 2024
1d2b975
fix: add support for command line github api key
mrcjhicks Oct 23, 2024
cc0de29
fix: removed debug msg
mrcjhicks Oct 24, 2024
ebf7ee2
chore: added copyright msgs
mrcjhicks Oct 24, 2024
99ab7b4
feat: format and output command line options
mrcjhicks Oct 24, 2024
b846e58
fix: warn when trying to write console output to a file
mrcjhicks Oct 24, 2024
fad5739
chore: updated readme with new cli options
mrcjhicks Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,9 @@ dist
# moon
.moon/cache
.moon/docker

# visual studio code
.vscode/

# api key
github-api-key.js
24 changes: 15 additions & 9 deletions tools/diff-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,17 @@ tdiff report

### Options

| Shorthand | Name | Argument(s) | Description |
| --------- | --------------------- | -------------- | ------------------------------------------------------ |
| `-y` | `-y` | `null` | answers yes to removing deprecated status of token(s) |
| `-otv` | `--old-token-version` | `<oldVersion>` | npm package version/github tag to pull old tokens from |
| `-ntv` | `--new-token-version` | `<newVersion>` | npm package version/github tag to pull new tokens from |
| `-otb` | `--old-token-branch` | `<oldBranch>` | branch to fetch old token data from |
| `-ntb` | `--new-token-branch` | `<newBranch>` | branch to fetch new token data from |
| `-l` | `--local` | `<path>` | local path within repository to fetch token data from |
| `-tn` | `--token-names` | `<tokens...>` | indicates specific tokens to compare |
| Shorthand | Name | Argument(s) | Description |
| --------- | --------------------- | -------------- | ----------------------------------------------------- |
| `-otv` | `--old-token-version` | `<oldVersion>` | github tag to pull old tokens from |
| `-ntv` | `--new-token-version` | `<newVersion>` | github tag to pull new tokens from |
| `-otb` | `--old-token-branch` | `<oldBranch>` | branch to fetch old token data from |
| `-ntb` | `--new-token-branch` | `<newBranch>` | branch to fetch new token data from |
| `-l` | `--local` | `<path>` | local path within repository to fetch token data from |
| `-tn` | `--token-names` | `<tokens...>` | indicates specific tokens to compare |
| `-gak` | `--githubAPIKey` | `<key>` | github api key to use when fetching from github |
| `-f` | `--format` | `<format>` | choose result format cli (default) or markdown |
| `-o` | `--output` | `<path>` | choose where to store result output, if available |

### Usage examples

Expand All @@ -91,3 +93,7 @@ This is how you can compare specific token files from a remote branch with your
```
tdiff report -otb shirlsli/file-import-tests -l packages/tokens/src -tn color-aliases.json color-component.json
```

```
tdiff report -otv "@adobe/[email protected]" -ntv "@adobe/[email protected]" --format markdown --output logs/output.md
```
1 change: 1 addition & 0 deletions tools/diff-generator/github-api-key.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const githubAPIKey = "";
1 change: 1 addition & 0 deletions tools/diff-generator/src/lib/added-token-detection.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ governing permissions and limitations under the License.
* @param {object} renamed - the token data that were renamed
* @param {object} deprecatedTokens - the newly deprecated tokens
* @param {object} changes - the changed token data
* @param {object} original - token data to compare against
* @returns {object} addedTokens - a JSON object containing the added tokens
*/

Expand Down
Loading