Skip to content

Releases: amzn/style-dictionary

v4.0.0-prerelease.18

12 Mar 12:38
aa49a5f
Compare
Choose a tag to compare
v4.0.0-prerelease.18 Pre-release
Pre-release

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

11 Mar 16:58
Compare
Choose a tag to compare
v4.0.0-prerelease.17 Pre-release
Pre-release

Patch Changes

  • 63681a6: Fix a couple of type imports issues in .d.ts files

v4.0.0-prerelease.16

11 Mar 12:36
f3c0df2
Compare
Choose a tag to compare
v4.0.0-prerelease.16 Pre-release
Pre-release

Patch Changes

  • 72f020d: Pass outputReferencesFallback option to the relevant utilities, so the option actually works.
  • d008c67: Fix a couple of spots where DTCG option wasn't properly taken into account, more tests added.

v4.0.0-prerelease.15

23 Feb 13:26
d5d7a8e
Compare
Choose a tag to compare
v4.0.0-prerelease.15 Pre-release
Pre-release

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

12 Feb 21:07
5194116
Compare
Choose a tag to compare
v4.0.0-prerelease.14 Pre-release
Pre-release

Minor Changes

  • 606af51: Rename typeW3CDelegate utility function to typeDtcgDelegate, 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

26 Jan 14:43
b3f5d86
Compare
Choose a tag to compare
v4.0.0-prerelease.13 Pre-release
Pre-release

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

26 Jan 11:52
290cf44
Compare
Choose a tag to compare
v4.0.0-prerelease.12 Pre-release
Pre-release

Patch Changes

  • c2cbd1b: Publish the postinstall-dev script to NPM.

v4.0.0-prerelease.11

26 Jan 11:42
6857825
Compare
Choose a tag to compare
v4.0.0-prerelease.11 Pre-release
Pre-release

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

25 Jan 22:41
0e0dd46
Compare
Choose a tag to compare
v4.0.0-prerelease.10 Pre-release
Pre-release

Patch Changes

  • 0c1a36f: Fix small issue in type w3c delegate utility type tracking.
  • 0c1a36f: Expose typeW3CDelegate utility. Don't take "value" into account anymore to determine that it's a design token, use $value.

v4.0.0-prerelease.9

23 Jan 09:51
7a1e446
Compare
Choose a tag to compare
v4.0.0-prerelease.9 Pre-release
Pre-release

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.