Skip to content

Commit

Permalink
🚑 Fix tokens filter
Browse files Browse the repository at this point in the history
  • Loading branch information
salamaashoush committed Dec 15, 2023
1 parent ce27be3 commit bff1497
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 8 deletions.
8 changes: 8 additions & 0 deletions apps/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @design-sync/sync

## 0.11.1

### Patch Changes

- Updated dependencies
- @design-sync/w3c-dtfm@0.11.0
- @design-sync/manager@0.6.1

## 0.11.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@design-sync/cli",
"description": "CLI for Design Sync",
"version": "0.11.0",
"version": "0.11.1",
"repository": "salamaashoush/design-sync",
"license": "MIT",
"sideEffects": false,
Expand Down
8 changes: 8 additions & 0 deletions packages/css-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @design-sync/css-plugin

## 0.3.1

### Patch Changes

- Updated dependencies
- @design-sync/w3c-dtfm@0.11.0
- @design-sync/manager@0.6.1

## 0.3.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/css-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@design-sync/css-plugin",
"version": "0.3.0",
"version": "0.3.1",
"description": "Transforms design tokens to css variables and classes",
"repository": "salamaashoush/design-sync",
"license": "MIT",
Expand Down
8 changes: 8 additions & 0 deletions packages/json-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @design-sync/json-plugin

## 0.3.1

### Patch Changes

- Updated dependencies
- @design-sync/w3c-dtfm@0.11.0
- @design-sync/manager@0.6.1

## 0.3.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/json-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@design-sync/json-plugin",
"version": "0.3.0",
"version": "0.3.1",
"description": "Transforms design tokens to flat json structure",
"repository": "salamaashoush/design-sync",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/manager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @design-sync/manager

## 0.6.1

### Patch Changes

- Updated dependencies
- @design-sync/w3c-dtfm@0.11.0

## 0.6.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@design-sync/manager",
"version": "0.6.0",
"version": "0.6.1",
"description": "Plugable design tokens manager",
"repository": "salamaashoush/design-sync",
"license": "MIT",
Expand Down
8 changes: 8 additions & 0 deletions packages/styled-components-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @design-sync/styled-components-plugin

## 0.0.2

### Patch Changes

- Updated dependencies
- @design-sync/w3c-dtfm@0.11.0
- @design-sync/manager@0.6.1

## 0.0.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/styled-components-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@design-sync/styled-components-plugin",
"version": "0.0.1",
"version": "0.0.2",
"description": "Transforms design tokens to styled components themes and styles",
"repository": "salamaashoush/design-sync",
"license": "MIT",
Expand Down
8 changes: 8 additions & 0 deletions packages/vanilla-extract-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @design-sync/vanilla-extract-plugin

## 0.6.1

### Patch Changes

- Updated dependencies
- @design-sync/w3c-dtfm@0.11.0
- @design-sync/manager@0.6.1

## 0.6.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vanilla-extract-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@design-sync/vanilla-extract-plugin",
"version": "0.6.0",
"version": "0.6.1",
"description": "Transforms design tokens to vanilla extract themes and styles",
"repository": "salamaashoush/design-sync",
"license": "MIT",
Expand Down
6 changes: 6 additions & 0 deletions packages/w3c-dtfm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @design-sync/w3c-dtfm

## 0.11.0

### Minor Changes

- Fix tokens filter

## 0.10.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/w3c-dtfm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@design-sync/w3c-dtfm",
"version": "0.10.0",
"version": "0.11.0",
"description": "Design tokens module format (DTFM) utils and types",
"repository": "salamaashoush/design-sync",
"license": "MIT",
Expand Down
4 changes: 3 additions & 1 deletion packages/w3c-dtfm/src/walker/walker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,9 @@ export class TokensWalker {
private processTokens() {
this.tokens.clear();
this.walkTokens(this.tokensObj, '', (token, path) => {
this.tokens.set(path, this.createToken(token, path));
if (isMatchingTokensFilter([path, token], this.options.filter)) {
this.tokens.set(path, this.createToken(token, path));
}
});

for (const token of this.tokens.values()) {
Expand Down

0 comments on commit bff1497

Please sign in to comment.