Skip to content

Commit

Permalink
Merge pull request #1060 from amzn/changeset-release/v4
Browse files Browse the repository at this point in the history
Version Packages (prerelease)
  • Loading branch information
jorenbroekema authored Dec 5, 2023
2 parents 00956de + 1a6d0b5 commit 5b9bcbf
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
"big-worms-collect-2",
"big-worms-collect",
"bright-timers-shout",
"eight-items-cheat",
"fifty-dragons-heal",
"gorgeous-lamps-chew",
"happy-numbers-grab",
"honest-toes-wink",
"light-games-occur",
"nice-ears-shop",
"old-ants-fix",
"sweet-toes-fly",
"unlucky-cameras-draw"
]
}
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 4.0.0-prerelease.4

### Minor Changes

- 122c8f6: Expose a new utility called resolveReferences which takes a value containing references, the dictionary object, and resolves the value's references for you.

```js
import StyleDictionary from 'style-dictionary';
import { resolveReferences } from 'style-dictionary/utils';

const sd = new StyleDictionary({
tokens: {
foo: { value: 'foo' },
bar: { value: '{foo}' },
qux: { value: '{bar}' },
},
});

console.log(resolveReferences(sd.tokens.qux.value, sd.tokens)); // 'foo'
```

- 122c8f6: BREAKING: expose getReferences and usesReference utilities as standalone utils rather than requiring them to be bound to dictionary object. This makes it easier to use.

### Patch Changes

- 044123c: Patch StyleDictionary main type file to export default instead of "export =" which does not work in ESM.

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

0 comments on commit 5b9bcbf

Please sign in to comment.