Releases: amzn/style-dictionary
Releases · amzn/style-dictionary
v4.0.0-prerelease.18
Patch Changes
- 738686b: Allow transformGroup to be combined with transforms, where standalone transforms will be added after the group's transforms.
v4.0.0-prerelease.17
Patch Changes
- 63681a6: Fix a couple of type imports issues in .d.ts files
v4.0.0-prerelease.16
v4.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.
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' ); }, });
v4.0.0-prerelease.14
Minor Changes
- 606af51: Rename
typeW3CDelegate
utility function totypeDtcgDelegate
, as using "W3C" is highly discouraged when the standard isn't a W3C standard yet. - 606af51: Support the use of "value"/"type"/"description" as token names or token group names, at the sacrifice of now no longer being able to combine non-DTCG and DTCG syntax within the same token dictionary.
Patch Changes
- cd9f484: Escape double quotes for ts outputStringLiterals
v4.0.0-prerelease.13
Patch Changes
- 24584b4: Conditionally only run dev scripts when CWD is style-dictionary, so our consumers don't run it by accident
v4.0.0-prerelease.12
Patch Changes
- c2cbd1b: Publish the postinstall-dev script to NPM.
v4.0.0-prerelease.11
Patch Changes
- cd48aac: Only run postinstall scripts when NODE_ENV isn't production (e.g. npm install --production or --omit=dev). To avoid errors running husky/patch-package.
v4.0.0-prerelease.10
v4.0.0-prerelease.9
Minor Changes
- 294fd0e: Support W3C Draft specification for Design Tokens, by adding support for $value, $type and $description properties.
Patch Changes
- 3138313: Allow transitive transforms to return undefined, by doing this the transformer can mark itself as "deferred" for that specific token. This is useful when references in properties other than "value" need to be resolved first.