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

Actual website, other one was configured wrong #378

Merged
merged 126 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 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
23e77b2
feat: created project for diff generator website
Jul 9, 2024
fc5bf65
Merge branch 'diff-generator' into shirlsli/diff-generator-website
Jul 9, 2024
4ce67e5
chore: pushing for now because weird error
Jul 9, 2024
e734fa4
feat: changed to using typescript because the javascript one had a we…
Jul 10, 2024
90c8145
chore: pushing for debugging help
Jul 11, 2024
640977b
feat: created compare card and github api key because ran out of calls
Jul 11, 2024
957c19c
chore: added moon yml file
Jul 11, 2024
8e7450e
feat: finished compare card component and interactions with parent co…
Jul 13, 2024
2563872
feat: working on getting started page and trying to figure out routing
Jul 16, 2024
0ab4ef9
feat: added routing and currently trying to figure out css for code b…
Jul 16, 2024
18b05ab
feat: added tags to the code panel component
Jul 16, 2024
b65a521
feat: added cli options table and worked on code panel
Jul 17, 2024
6930853
chore: trying to figure out font stuff
Jul 17, 2024
2585d78
fix: fixed code panel bug where code is floating center
Jul 17, 2024
c125d00
fix: addressed missing typekit issue
GarthDB Jul 18, 2024
5ea37a6
chore: update to latest commit
GarthDB Jul 18, 2024
d6922f2
fix: changed clip to keyboard layout and added responsiveness
Jul 18, 2024
d3ee511
feat: added header to house navigation for mobile and made both pages…
Jul 19, 2024
182a106
feat: mobile side bar interactions
Jul 19, 2024
e9a810a
chore: need to change sidebar to how swc website does it
Jul 19, 2024
ffa628b
feat: finally figured out how to make a passing sidebar with swc
Jul 22, 2024
a389660
feat: created footer
Jul 22, 2024
8cccde4
fix: fixed styling for footer and token diff page
Jul 22, 2024
9732ad8
feat: created diff generator report draft
Jul 23, 2024
8a96449
fix: fixed getting started page min width issue
Jul 24, 2024
d31b26f
feat: worked on report component to add share feature
Jul 24, 2024
35f1ed0
fix: maneuvered around the rendering bug to display updated propertie…
Jul 25, 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
2 changes: 2 additions & 0 deletions .moon/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ projects:
site: "docs/site"
root: "."
csvGenerator: tools/token-csv-generator
diff: "tools/diff-generator"
tdiff: "docs/token-diff"
vcs:
manager: "git"
defaultBranch: "main"
10 changes: 10 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"configurations": [
{
"type": "chrome",
"name": "http://localhost:8000/demo/",
"request": "launch",
"url": "http://localhost:8000/demo/"
}
]
}
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
29 changes: 29 additions & 0 deletions docs/token-diff/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.json]
indent_size = 2

[*.{html,js,md}]
block_comment_start = /**
block_comment = *
block_comment_end = */
27 changes: 27 additions & 0 deletions docs/token-diff/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## editors
/.idea
/.vscode

## system files
.DS_Store

## npm
/node_modules/
/npm-debug.log

## testing
/coverage/

## temp folders
/.tmp/

# build
/_site/
/dist/
/out-tsc/

storybook-static
custom-elements.json

# api keys
github-api-key.ts
1 change: 1 addition & 0 deletions docs/token-diff/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./node_modules/.bin/lint-staged
21 changes: 21 additions & 0 deletions docs/token-diff/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 token-diff

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
48 changes: 48 additions & 0 deletions docs/token-diff/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# \<token-diff>

This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.

## Installation

```bash
npm i token-diff
```

## Usage

```html
<script type="module">
import 'token-diff/token-diff.js';
</script>

<token-diff></token-diff>
```

## Linting and formatting

To scan the project for linting and formatting errors, run

```bash
npm run lint
```

To automatically fix linting and formatting errors, run

```bash
npm run format
```


## Tooling configs

For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.

## Local Demo with `web-dev-server`

```bash
npm start
```

To run a local development server that serves the basic demo located in `demo/index.html`
44 changes: 44 additions & 0 deletions docs/token-diff/demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!doctype html>
<html lang="en-GB" class="spectrum spectrum--medium spectrum--light">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
/>
<style>
:host {
overflow-x: hidden;
}
body {
background: #fafafa;
margin: 0;
}
.page {
display: flex;
height: 100vh;
width: 100vw;
overflow-y: hidden;
}
</style>
<link rel="preconnect" href="https://use.typekit.net" />
<link rel="dns-prefetch" href="https://use.typekit.net" />
<link rel="stylesheet" href="https://use.typekit.net/evk7lzt.css" />
</head>
<body>
<div id="demo"></div>

<script type="module">
import { html, render } from 'lit';
import '../dist/src/token-diff.js';
import '../dist/src/nav-bar.js';
import '../dist/src/getting-started.js';
import '../dist/src/page-container.js';

render(
html` <page-container></page-container> `,
document.querySelector('#demo'),
);
</script>
</body>
</html>
36 changes: 36 additions & 0 deletions docs/token-diff/moon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2024 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
$schema: "https://moonrepo.dev/schemas/project.json"
stack: frontend
type: application
tags:
- docs
- token-diff
fileGroups:
sources:
- "src/**/*"
config:
- "tsconfig.json"
- "web-dev-server.config.js"
tasks:
build:
command:
- build
deps:
- ~:typescript
platform: node
inputs:
- "config"
- "@globs(sources)"
outputs:
- "/token-diff"
typescript:
command: tsc
platform: node
101 changes: 101 additions & 0 deletions docs/token-diff/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"name": "token-diff",
"description": "Webcomponent token-diff following open-wc recommendations",
"license": "MIT",
"author": "token-diff",
"version": "0.0.0",
"type": "module",
"main": "dist/src/index.js",
"module": "dist/src/index.js",
"exports": {
".": "./dist/src/index.js",
"./token-diff.js": "./dist/src/token-diff.js"
},
"scripts": {
"analyze": "cem analyze --litelement",
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"web-dev-server\"",
"build": "tsc && npm run analyze -- --exclude dist",
"prepublish": "tsc && npm run analyze -- --exclude dist",
"lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
"format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
"prepare": "husky"
},
"dependencies": {
"@adobe/token-diff-generator": "workspace:*",
"@spectrum-css/button": "^13.1.1",
"@spectrum-css/icon": "^7.1.1",
"@spectrum-css/page": "^7.1.4",
"@spectrum-css/tokens": "^13.2.0",
"@spectrum-css/typography": "^5.1.5",
"@spectrum-web-components/action-button": "0.43.0",
"@spectrum-web-components/action-group": "^0.43.0",
"@spectrum-web-components/button": "0.43.0",
"@spectrum-web-components/card": "^0.43.0",
"@spectrum-web-components/dialog": "0.43.0",
"@spectrum-web-components/divider": "0.43.0",
"@spectrum-web-components/field-label": "^0.43.0",
"@spectrum-web-components/icons-ui": "0.43.0",
"@spectrum-web-components/icons-workflow": "0.43.0",
"@spectrum-web-components/menu": "^0.43.0",
"@spectrum-web-components/overlay": "0.43.0",
"@spectrum-web-components/picker": "^0.43.0",
"@spectrum-web-components/popover": "0.43.0",
"@spectrum-web-components/sidenav": "^0.43.0",
"@spectrum-web-components/styles": "0.43.0",
"@spectrum-web-components/table": "0.43.0",
"@spectrum-web-components/tabs": "0.43.0",
"@spectrum-web-components/theme": "0.43.0",
"@spectrum-web-components/toast": "0.43.0",
"@spectrum-web-components/underlay": "0.43.0",
"@vaadin/router": "^1.7.5",
"lit": "^3.1.4",
"tslib": "^2.6.3"
},
"devDependencies": {
"@custom-elements-manifest/analyzer": "^0.10.3",
"@open-wc/eslint-config": "^12.0.3",
"@types/jquery": "^3.5.30",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"@web/dev-server": "^0.4.6",
"concurrently": "^8.2.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
"prettier": "^3.3.2",
"typescript": "^5.5.3"
},
"customElements": "custom-elements.json",
"eslintConfig": {
"parser": "@typescript-eslint/parser",
"extends": [
"@open-wc",
"prettier"
],
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"import/no-unresolved": "off",
"import/extensions": [
"error",
"always",
{
"ignorePackages": true
}
]
}
},
"prettier": {
"singleQuote": true,
"arrowParens": "avoid"
},
"lint-staged": {
"*.ts": [
"prettier --write"
]
}
}
Loading