Skip to content

Commit 220bc88

Browse files
chore: release (prerelease) (#1126)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 8e297d6 commit 220bc88

File tree

3 files changed

+94
-2
lines changed

3 files changed

+94
-2
lines changed

.changeset/pre.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"cuddly-cheetahs-drum",
1313
"curvy-geckos-exist",
1414
"eight-items-cheat",
15+
"famous-falcons-join",
1516
"fifty-dragons-heal",
1617
"fifty-hats-study",
1718
"four-fireants-try",
@@ -20,6 +21,7 @@
2021
"great-trainers-shop",
2122
"green-wolves-heal",
2223
"grumpy-peaches-flow",
24+
"happy-glasses-teach",
2325
"happy-numbers-grab",
2426
"happy-vans-end",
2527
"honest-toes-wink",
@@ -38,6 +40,7 @@
3840
"sweet-toes-fly",
3941
"tall-falcons-explode",
4042
"two-keys-pump",
41-
"unlucky-cameras-draw"
43+
"unlucky-cameras-draw",
44+
"wise-phones-eat"
4245
]
4346
}

CHANGELOG.md

+89
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,94 @@
11
# Changelog
22

3+
## 4.0.0-prerelease.19
4+
5+
### Major Changes
6+
7+
- 79bb201: BREAKING: Logging has been redesigned a fair bit and is more configurable now.
8+
9+
Before:
10+
11+
```json
12+
{
13+
"log": "error" // 'error' | 'warn' -> 'warn' is the default value
14+
}
15+
```
16+
17+
After:
18+
19+
```json
20+
{
21+
"log": {
22+
"warnings": "error", // 'error' | 'warn' -> 'warn' is the default value
23+
"verbosity": "verbose" // 'default' | 'verbose' | 'silent' -> 'default' is the default value
24+
}
25+
}
26+
```
27+
28+
Log is now and object and the old "log" option is now "warnings".
29+
30+
This configures whether the following five warnings will be thrown as errors instead of being logged as warnings:
31+
32+
- Token value collisions (in the source)
33+
- Token name collisions (when exporting)
34+
- Missing "undo" function for Actions
35+
- File not created because no tokens found, or all of them filtered out
36+
- Broken references in file when using outputReferences, but referring to a token that's been filtered out
37+
38+
Verbosity configures whether the following warnings/errors should display in a verbose manner:
39+
40+
- Token collisions of both types (value & name)
41+
- Broken references due to outputReferences & filters
42+
- Token reference errors
43+
44+
And it also configures whether success/neutral logs should be logged at all.
45+
Using "silent" (or --silent in the CLI) means no logs are shown apart from fatal errors.
46+
47+
- bcb5ef3: Remove reliance on CTI token structure across transforms, actions and formats.
48+
49+
Breaking changes:
50+
51+
- 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.
52+
- 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:
53+
- asset -> string type tokens where the value is a filepath to an asset
54+
- 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)
55+
- html -> HTML entity strings for unicode characters
56+
- content -> regular string content e.g. text content which sometimes needs to be wrapped in quotes
57+
- 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`.
58+
- Transform `content/icon` has been renamed to `html/icon` since it targets HTML entity strings, not just any icon content.
59+
- `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.
60+
- `typescript/module-declarations` format to be updated with current DesignToken type interface.
61+
62+
Before:
63+
64+
```json
65+
{
66+
"color": {
67+
"red": {
68+
"value": "#FF0000"
69+
}
70+
}
71+
}
72+
```
73+
74+
After:
75+
76+
```json
77+
{
78+
"color": {
79+
// <-- this no longer needs to be "color" in order for the tokens inside this group to be considered of type "color"
80+
"red": {
81+
"value": "#FF0000",
82+
"type": "color"
83+
}
84+
}
85+
}
86+
```
87+
88+
### Patch Changes
89+
90+
- 8e297d6: Fix outputReferences for DTCG spec tokens, by using token.original.$value instead of token.original.value.
91+
392
## 4.0.0-prerelease.18
493

594
### Patch Changes

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "style-dictionary",
3-
"version": "4.0.0-prerelease.18",
3+
"version": "4.0.0-prerelease.19",
44
"description": "Style once, use everywhere. A build system for creating cross-platform styles.",
55
"keywords": [
66
"style dictionary",

0 commit comments

Comments
 (0)