Skip to content

Commit

Permalink
Version Packages (#31)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Sep 15, 2022
1 parent ab01a1e commit dc178bd
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 80 deletions.
5 changes: 0 additions & 5 deletions .changeset/four-bulldogs-protect.md

This file was deleted.

74 changes: 0 additions & 74 deletions .changeset/spicy-sloths-rescue.md

This file was deleted.

79 changes: 79 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,84 @@
# @divriots/style-dictionary-to-figma

## 0.4.0

### Minor Changes

- ab01a1e: BREAKING: if an upper token group does not have a tokenset property, it will get placed in a "global" tokenset by default. This means that no action is required by the user of the transformer to get a working JSON for Figma Tokens Plugin, but this change is potentially breaking because of how it changes the JSON output.

### Before

```json
{
"core": {
"color": {
"primary": {
"base": {
"type": "color",
"value": "#14b8a6"
},
"secondary": {
"type": "color",
"value": "#ff0000"
}
}
}
}
}
```

Nothing is changed in the output. However, if you have references, they might be broken because the plugin will interpret this as `"color"` being the upper property in a tokenset called `"core"`.

### After

```json
{
"core": {
"color": {
"primary": {
"base": {
"type": "color",
"value": "#14b8a6"
},
"secondary": {
"type": "color",
"value": "#ff0000"
}
}
}
}
}
```

turns into

```json
{
"global": {
"core": {
"color": {
"primary": {
"base": {
"type": "color",
"value": "#14b8a6"
},
"secondary": {
"type": "color",
"value": "#ff0000"
}
}
}
}
}
}
```

Your reference, for example `{core.color.primary.base}` will now work properly because `"core"` is not interpreted as the tokenset, `"global"` is.

### Patch Changes

- ab01a1e: Fix clean-meta utility by using a proper isObject check which excludes arrays (values can be arrays).

## 0.3.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@divriots/style-dictionary-to-figma",
"version": "0.3.3",
"version": "0.4.0",
"description": "A utility that transforms a style-dictionary object into something Figma Tokens plugin understands",
"license": "MIT",
"author": "divRiots <[email protected]>",
Expand Down

0 comments on commit dc178bd

Please sign in to comment.