Skip to content

Commit

Permalink
chore: release (prerelease) (#1108)
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] committed Feb 23, 2024
1 parent 502dbd1 commit d5d7a8e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"nice-ears-shop",
"ninety-geckos-build",
"old-ants-fix",
"pretty-clocks-guess",
"rich-pianos-walk",
"rotten-shirts-fail",
"smooth-bulldogs-type",
Expand Down
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.15

### Major Changes

- 502dbd1: BREAKING: All of our hooks, parsers, preprocessors, transforms, formats, actions, fileHeaders and filters, support async functions as well now. This means that the formatHelpers -> fileHeader helper method is now asynchronous, to support async fileheader functions.

```js
import StyleDictionary from 'style-dictionary';

const { fileHeader } = StyleDictionary.formatHelpers;

StyleDictionary.registerFormat({
name: 'custom/css',
// this can be async now, usually it is if you use fileHeader format helper, since that now always returns a Promise
formatter: async function ({ dictionary, file, options }) {
const { outputReferences } = options;
return (
// this helper is now async! because the user-passed file.fileHeader might be an async function
(await fileHeader({ file })) +
':root {\n' +
formattedVariables({ format: 'css', dictionary, outputReferences }) +
'\n}\n'
);
},
});
```

## 4.0.0-prerelease.14

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

0 comments on commit d5d7a8e

Please sign in to comment.