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

Created moon project for diff-generator in tools directory #344

Merged
merged 101 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
906a870
feat: created moon project for diff-generator in tools directory
May 31, 2024
04e85fd
feat: created function to check for renamed tokens in diff based on uuid
May 31, 2024
de11738
test: created very basic and possibly incorrect test for rename checking
May 31, 2024
3f3f432
test: fixed basic rename test and rename function to properly detect …
Jun 3, 2024
1c382f0
test: created more tests to test 2+ tokens and entire existing schema
Jun 3, 2024
c632fa8
feat: detect when new tokens are added and moved looping through sche…
Jun 3, 2024
b7631cd
test: added uuid to opacity-checkerboard-square-dark in test schemas
Jun 3, 2024
9148440
test: created tests for detecting added tokens and fixed added token …
Jun 3, 2024
998cda1
feat: created function to detect deleted tokens and wrote some tests
Jun 4, 2024
25ef7a9
chore: updated pnpm lock file
GarthDB Jun 4, 2024
4dbd551
test: renamed expected output variable names for better future mainta…
Jun 4, 2024
0de714f
Merge branch 'main' of https://github.com/adobe/spectrum-tokens into …
Jun 4, 2024
303867b
Merge branch 'detect-deleted-tokens' of https://github.com/adobe/spec…
Jun 4, 2024
48df9e7
fix: not sure if this will fix the failing github actions test
Jun 4, 2024
67ebecc
feat: created function to detect deprecated tokens with some basic tests
Jun 5, 2024
d5f5412
test: added tests for deprected tokens because i forgot to stage the …
Jun 5, 2024
fd1e90d
docs: added comment to detect deprecated function
Jun 5, 2024
124a5b7
feat: detect when new tokens are added and moved looping through sche…
Jun 3, 2024
9067c10
test: created tests for detecting added tokens and fixed added token …
Jun 3, 2024
2245e20
chore: update pnpm-lock file
GarthDB Jun 5, 2024
a936cb7
Merge branch 'diff-generator' into detect-deleted-tokens
GarthDB Jun 5, 2024
c1b08eb
chore: move functions into separate files for easier individual testing
Jun 5, 2024
ab0ac84
Merge branch 'detect-deleted-tokens' of https://github.com/adobe/spec…
Jun 5, 2024
3f0d4d0
Merge branch 'detect-deleted-tokens' into detect-deprecated-tokens
Jun 5, 2024
667da21
fix: fixed renamed detector to not tokens whose uuids were the same b…
Jun 5, 2024
caf82f5
feat: detects when previously deprecated tokens are marked as not dep…
Jun 6, 2024
67a8c39
feat: created detect updated tokens function and wrote tests for toke…
Jun 6, 2024
5220ced
Merge branch 'main' into detect-updated-tokens
Jun 6, 2024
c97e102
feat: created format result function and wrote e2e tests
Jun 7, 2024
821fb93
chore: moved index.js into lib folder so updating moon yml file
Jun 7, 2024
b64dd58
feat: added uuids to set tokens root
GarthDB Jun 3, 2024
6263332
feat: updated addIds task to add uuids to set tokens
GarthDB Jun 3, 2024
fa067df
chore: added changeset
GarthDB Jun 3, 2024
2e3d66d
chore: release
github-actions[bot] Jun 3, 2024
17d3b6e
ci: testing automated snapshot release
GarthDB Jun 3, 2024
1c092ac
feat: created detect updated tokens function and wrote tests for toke…
Jun 6, 2024
839d34a
feat: created format result function and wrote e2e tests
Jun 7, 2024
5d37148
chore: moved index.js into lib folder so updating moon yml file
Jun 7, 2024
65c28f1
refactor: changed parts of functions that had redundant code
Jun 7, 2024
c884bcc
refactor: changed a double forloop into O(n)
Jun 10, 2024
69b6dcd
refactor: changed detect renamed tokens result to match output of oth…
Jun 10, 2024
fbfbf04
refactor: optimizing code
Jun 10, 2024
a76fdfc
refactor: removed redundant code in updated token detection function
Jun 10, 2024
52b5420
refactor: removed two loops in deprecated tokens detection
Jun 10, 2024
8a78c36
Merge branch 'diff-generator' into shirlsli/diff-generator-code-impro…
shirlsli Jun 10, 2024
f69f27d
chore: renamed token test had extra expected constants when running g…
Jun 10, 2024
c8dff87
chore: realized i did not update expected test output
Jun 10, 2024
857233a
feat: cli for diff generator
Jun 11, 2024
f435cc3
chore: added diff command to bin and made indentations for listed items
Jun 11, 2024
f34f14f
refactor: added user inquiry about undeprecated tokens and return sig…
Jun 11, 2024
46462ec
feat: created file import function to take cli file name inputs and r…
Jun 12, 2024
535fc05
fix: got cli working on example tokens
Jun 12, 2024
468d5b0
refactor: added check for if there are no undeprecated tokens so ques…
Jun 13, 2024
de42080
feat: created function for adding and deleting properties to existing…
Jun 13, 2024
165577f
fix: changed how new properties added to token looks when printed in …
Jun 13, 2024
a36106c
fix: revised property deletion in token and added tests
Jun 13, 2024
053a2b7
fix: when add new property to token cli displays correctly
Jun 13, 2024
754ac08
refactor: made two general formatting functions for cli output
Jun 13, 2024
299b4b7
feat: separates cli report updated output into added, deleted, and up…
Jun 13, 2024
082d415
refactor: changed text colors from chalk defaults to custom hex values
Jun 14, 2024
d3bcad3
chore: commenting out nixt file for now because it is not importing
Jun 14, 2024
35edf82
chore: deleted cli test file for now to pass github pr check
Jun 14, 2024
65a1b93
refactor: missed some chalk.white
Jun 14, 2024
e1ffd7f
chore: debugging nixt setup
Jun 14, 2024
292e552
fix: switched chalk-cli for chalk dependency
GarthDB Jun 14, 2024
d2bb068
test: added test for version number
GarthDB Jun 14, 2024
73e1ee2
test: wrote tests checking for output of cli commands
Jun 17, 2024
f2928b9
refactor: changed tests to snapshots
Jun 17, 2024
c3b77dc
refactor: added comments and replace chalk.white with white everywhere
Jun 17, 2024
689daad
fix: realized earlier refactor refactored something that was not mean…
Jun 17, 2024
3f2a437
feat: created function to fetch tokens from github branches and tags
Jun 18, 2024
1178592
test: basic tests comparing tokens from two branches
Jun 18, 2024
09e8dc6
chore: changed warning content, removed comments, and updated snapshots
Jun 18, 2024
87d2a70
chore: added more styling and changed snapshots to reflect style changes
Jun 18, 2024
0855eab
chore: added branch and version names to cli output
Jun 18, 2024
90bb828
Merge branch 'shirlsli/diff-generator-cli' into shirlsli/diff-generat…
shirlsli Jun 18, 2024
4f5a134
chore: skipping cli version test because works locally but not when r…
Jun 18, 2024
21f55c4
Merge branch 'shirlsli/diff-generator-cli-tests' of https://github.co…
Jun 18, 2024
e45a820
feat: moved functionality in cli into diff generator library for cros…
Jun 21, 2024
ed14745
docs: edited comments
Jun 21, 2024
69a337e
fix: fixed bug with added and deleted properties detection after refa…
Jun 25, 2024
f50bf89
test: added another test to check for added and deleted properties
Jun 26, 2024
3070e31
feat: moved functionality in cli into diff generator library for cros…
Jun 21, 2024
40b50b6
docs: edited comments
Jun 21, 2024
0cd741d
fix: fixed bug with added and deleted properties detection after refa…
Jun 25, 2024
89dd2ea
test: added another test to check for added and deleted properties
Jun 26, 2024
f5d245e
test: checking cli output for when comparing between github tag and b…
Jun 27, 2024
95dcc78
test: added tests to check token comparisons between branch and relea…
Jun 27, 2024
85b5ead
chore: merged branch diff generator cli into diff generator refactor
Jun 27, 2024
16cbd7a
feat: detects renamed keys in tokens
Jun 29, 2024
ad8ee39
feat: prints out renamed properties in cli
Jul 8, 2024
5131bc6
refactor: edited comments and added tests
Jul 9, 2024
02f01ca
fix: forgot to delete parameters in call to function in cli
Jul 9, 2024
a4e6e82
refactor: forgot to uncomment try catch statement after debugging
Jul 9, 2024
8a021e0
build: added changeset for diff generator library and cli
Jul 9, 2024
0c97616
chore: updated readme
Jul 9, 2024
298827a
Merge branch 'main' into diff-generator
GarthDB Jul 9, 2024
536f249
refactor: made requested changes
Jul 9, 2024
d807cab
Merge branch 'diff-generator' of https://github.com/adobe/spectrum-to…
Jul 9, 2024
17c0315
fix: merged latest from main
GarthDB Aug 7, 2024
9459e3a
chore: update schema on docs website to the latest
GarthDB Aug 7, 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
5 changes: 5 additions & 0 deletions .changeset/small-radios-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@adobe/token-diff-generator": major
---

Initial release of the token diff generator library and cli
1 change: 1 addition & 0 deletions .moon/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ projects:
site: "docs/site"
root: "."
csvGenerator: tools/token-csv-generator
diff: "tools/diff-generator"
vcs:
manager: "git"
defaultBranch: "main"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Packages in this monorepo:
- [Spectrum Tokens](packages/tokens/) design tokens for Spectrum, Adobe's design system.
- [Spectrum Token Visualizer Tool](docs/visualizer/) a visualizer for inspecting tokens. Published as a [static site](https://opensource.adobe.com/spectrum-tokens/visualizer/), not an NPM package.
- [Spectrum Tokens Docs](docs/site/) a static site to show the component options API and other token data.
- [Spectrum Token Diff Generator](tools/diff-generator/) a library and cli tool that reports changes made between two schema/releases/branches.

## Setup monorepo locally

Expand Down
8 changes: 6 additions & 2 deletions docs/site/public/schemas/token-types/color-set.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@
"private": {},
"deprecated": {},
"deprecated_comment": {},
"uuid": {}
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$",
"format": "uuid"
}
},
"required": ["sets"]
"required": ["sets", "uuid"]
}
8 changes: 6 additions & 2 deletions docs/site/public/schemas/token-types/scale-set.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
"private": {},
"deprecated": {},
"deprecated_comment": {},
"uuid": {}
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$",
"format": "uuid"
}
},
"required": ["sets"]
"required": ["sets", "uuid"]
}
2 changes: 1 addition & 1 deletion packages/tokens/test/snapshots/deprecateExpress.test.js.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Snapshot report for `test/deprecateExpress.test.js`
# Snapshot report for `packages/tokens/test/deprecateExpress.test.js`

The actual snapshot is saved in `deprecateExpress.test.js.snap`.

Expand Down
Binary file modified packages/tokens/test/snapshots/deprecateExpress.test.js.snap
Binary file not shown.
Loading