Skip to content

Commit 57431ec

Browse files
Version Packages (#284)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 67edf4b commit 57431ec

10 files changed

+36
-62
lines changed

.changeset/four-shoes-peel.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/giant-days-smash.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/good-ties-sell.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/new-points-jam.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/odd-phones-fail.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.changeset/polite-cobras-arrive.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/twelve-icons-wait.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/yellow-nails-live.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# @tokens-studio/sd-transforms
22

3+
## 1.0.0
4+
5+
### Major Changes
6+
7+
- 67edf4b: BREAKING: `descriptionToComment` transform no longer removes newlines, just turns carriage returns into newlines. Style Dictionary now handles comments with newlines properly in its createPropertyFormatter utility.
8+
- 67edf4b: BREAKING: Remove `expand` option, composite/object-value tokens must be expanded by using [Style Dictionary Expand](https://v4.styledictionary.com/reference/config/#expand).
9+
- 67edf4b: BREAKING: remove CommonJS entrypoint and tools/scripts required to dual publish. Now that Style Dictionary v4 is ESM-only, this library will follow suit.
10+
- 67edf4b: BREAKING: `transformFontWeights` has been renamed to `transformFontWeight` for consistency.
11+
12+
Apply transforms to object-value (composite) token types:
13+
14+
- HEXRGBa transform applies to border and shadow colors
15+
- Px dimension transform applies to border, typography and shadow dimensions
16+
- Letterspacing, lineheights and fontweights transforms apply to these respective typography properties
17+
- Resolve math transform applies to all properties of border, typography and shadow tokens
18+
19+
This also means that all transforms except for description to comment mapping are now transitive transforms, since the math resolve transform must be transitive and all other transforms must apply after the math one.
20+
21+
- 67edf4b: BREAKING: remove CSS shorthand transforms for border, typography and shadow. Use the Style Dictionary transforms instead: https://styledictionary.com/reference/hooks/transforms/predefined/#bordercssshorthand.
22+
23+
Note that if you're not disabling the `withSDBuiltins` option, the `tokens-studio` transformGroup will include the ones in the `css` built-in transformGroup, so you might not notice the fact that they are moved.
24+
25+
- 67edf4b: - BREAKING: Compatible with Style Dictionary >= v4.0.0. Not compatible with anything below that SD version.
26+
27+
- BREAKING: `registerTransforms` function has been renamed to `register`.
28+
- BREAKING: `transforms` array has been refactored to `getTransforms()`, which is a function you should call. Optionally pass in the new platform option as parameter `{ platform: 'css' /* or 'compose' */}`
29+
- BREAKING: By default, registered `tokens-studio` transformGroup will include the platform's Style Dictionary built-in transforms. E.g. if you're registering for platform `css` it will include the `css` transformGroup transforms from Style Dictionary, appended to the Tokens Studio specific transforms. This behavior can be disabled by passing `{ withSDBuiltins: false }`.
30+
- Allow passing platform to the `register()` call: `register(SD, { platform: 'compose' })`. Default value is `'css'`. This means your `tokens-studio` group will be registered for that specific platform.
31+
- Allow passing `name` to the `register()` call to configure the transformGroup name: `register(SD, { name: 'tokens-studio-css' })`. Default value is `tokens-studio`.
32+
33+
### Minor Changes
34+
35+
- 67edf4b: Adjust add-font-styles parser to also run on tokens of type fontWeight, to create a sibling token for the fontStyle if it is included in the fontWeight token.
36+
- 67edf4b: Add an adjust-types preprocessor utility that aligns the Tokens Studio types / object-value props with the DTCG ones.
37+
338
## 0.16.1
439

540
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tokens-studio/sd-transforms",
3-
"version": "0.16.1",
3+
"version": "1.0.0",
44
"description": "Custom transforms for Style-Dictionary, to work with Design Tokens that are exported from Tokens Studio",
55
"license": "MIT",
66
"author": "Joren Broekema <joren.broekema@gmail.com>",

0 commit comments

Comments
 (0)