Skip to content

Commit

Permalink
chore: release (prerelease) (#1126)
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 Mar 19, 2024
1 parent 8e297d6 commit 220bc88
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"cuddly-cheetahs-drum",
"curvy-geckos-exist",
"eight-items-cheat",
"famous-falcons-join",
"fifty-dragons-heal",
"fifty-hats-study",
"four-fireants-try",
Expand All @@ -20,6 +21,7 @@
"great-trainers-shop",
"green-wolves-heal",
"grumpy-peaches-flow",
"happy-glasses-teach",
"happy-numbers-grab",
"happy-vans-end",
"honest-toes-wink",
Expand All @@ -38,6 +40,7 @@
"sweet-toes-fly",
"tall-falcons-explode",
"two-keys-pump",
"unlucky-cameras-draw"
"unlucky-cameras-draw",
"wise-phones-eat"
]
}
89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,94 @@
# Changelog

## 4.0.0-prerelease.19

### Major Changes

- 79bb201: BREAKING: Logging has been redesigned a fair bit and is more configurable now.

Before:

```json
{
"log": "error" // 'error' | 'warn' -> 'warn' is the default value
}
```

After:

```json
{
"log": {
"warnings": "error", // 'error' | 'warn' -> 'warn' is the default value
"verbosity": "verbose" // 'default' | 'verbose' | 'silent' -> 'default' is the default value
}
}
```

Log is now and object and the old "log" option is now "warnings".

This configures whether the following five warnings will be thrown as errors instead of being logged as warnings:

- Token value collisions (in the source)
- Token name collisions (when exporting)
- Missing "undo" function for Actions
- File not created because no tokens found, or all of them filtered out
- Broken references in file when using outputReferences, but referring to a token that's been filtered out

Verbosity configures whether the following warnings/errors should display in a verbose manner:

- Token collisions of both types (value & name)
- Broken references due to outputReferences & filters
- Token reference errors

And it also configures whether success/neutral logs should be logged at all.
Using "silent" (or --silent in the CLI) means no logs are shown apart from fatal errors.

- bcb5ef3: Remove reliance on CTI token structure across transforms, actions and formats.

Breaking changes:

- Token type will now be determined by "type" (or "$type") property on the token, rather than by checking its CTI attributes. This change has been reflected in all of the format templates as well as transform "matcher" functions that were previously checking `attributes.category` as the token type indicator.
- Types are mostly aligned with [DTCG spec types](https://design-tokens.github.io/community-group/format/#types), although a few additional ones have been added for compatibility reasons:
- asset -> string type tokens where the value is a filepath to an asset
- icon -> content type string tokens where the content resembles an icon, e.g. for icon fonts like [Microsoft codicons](https://github.com/microsoft/vscode-codicons)
- html -> HTML entity strings for unicode characters
- content -> regular string content e.g. text content which sometimes needs to be wrapped in quotes
- Built-in name transforms are now reliant only on the token path, and are renamed from `name/cti/casing` to just `name/casing`. `name/ti/camel` and `name/ti/constant` have been removed. For example `name/cti/kebab` transform is now `name/kebab`.
- Transform `content/icon` has been renamed to `html/icon` since it targets HTML entity strings, not just any icon content.
- `font/objC/literal`, `font/swift/literal` and `font/flutter/literal` have been removed in favor of `font/objC/literal`, `font/swift/literal` and `font/flutter/literal`, as they do he exact same transformations.
- `typescript/module-declarations` format to be updated with current DesignToken type interface.

Before:

```json
{
"color": {
"red": {
"value": "#FF0000"
}
}
}
```

After:

```json
{
"color": {
// <-- this no longer needs to be "color" in order for the tokens inside this group to be considered of type "color"
"red": {
"value": "#FF0000",
"type": "color"
}
}
}
```

### Patch Changes

- 8e297d6: Fix outputReferences for DTCG spec tokens, by using token.original.$value instead of token.original.value.

## 4.0.0-prerelease.18

### 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": "style-dictionary",
"version": "4.0.0-prerelease.18",
"version": "4.0.0-prerelease.19",
"description": "Style once, use everywhere. A build system for creating cross-platform styles.",
"keywords": [
"style dictionary",
Expand Down

0 comments on commit 220bc88

Please sign in to comment.