Skip to content

Bump style-dictionary from 3.9.2 to 5.8.0 - #206

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/style-dictionary-5.8.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/style-dictionary-5.8.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 10, 2026

Copy link
Copy Markdown
Contributor

Bumps style-dictionary from 3.9.2 to 5.8.0.

Release notes

Sourced from style-dictionary's releases.

v5.8.0

Minor Changes

  • e8f77ed: Expose stripMetaProps, formatJS and isColor utilities through the style-dictionary/utils entrypoint, so that custom formats and transforms can reuse the same helpers as the built-in ones.
  • 73acfe2: Add StopTransformError to style-dictionary/utils. A transform can throw it to skip the remaining transforms for that token, which keeps the changes made by the transforms that ran before. It is still reported as a transform error.

Patch Changes

  • 52d9d7d: Fix cleaning the copy_assets action on Node.js 25 and later. It removed the assets directory with fs.rmdir() and its recursive option, which Node.js 25 removed, so cleaning threw ERR_INVALID_ARG_VALUE. It now uses fs.rm().
  • ce0a390: When a token in source overrides a token from include (or from the inline tokens option), it now replaces that token instead of being merged into it, the same as when two source files or two include files define the same token. Properties that only the overridden token had, such as $extensions or comment, are no longer carried over.
  • d87ca0b: Round alpha values that come from 8 or 4 digit hex colors in the color/css transform to the shortest value that maps back to the same hex alpha (two decimals, or three when two do not round-trip), the same as browsers do. For example [#00000014](https://github.com/style-dictionary/style-dictionary/issues/00000014) becomes rgba(0, 0, 0, 0.08) again instead of rgba(0, 0, 0, 0.0784313725490196). Alpha values written as decimals are still kept as they are.
  • f82e7aa: BREAKING: the sketch/palette format is registered under its documented name again. Since the enums were introduced in v4.3.0 the format was accidentally registered as sketchPalette, which made format: 'sketch/palette' throw "Can't find format". The formats.sketchPalette enum now resolves to 'sketch/palette', and the accidental 'sketchPalette' string name is no longer accepted. If you used format: 'sketchPalette', switch to format: 'sketch/palette' or use formats.sketchPalette from style-dictionary/enums.
  • 5a2e3d2: Include the token path, and the token's filePath when it has one, in the "Token name must be a string" error, so a token with an empty name (e.g. an empty "" key) is easier to find.

v5.7.1

Patch Changes

  • c3c37e1: Protect convertTokenData to output 'object' from another prototype pollution vulnerability (GHSA-m4pr-rgwp). In this case, the attack vector was by placing 2 tokens and letting the 2nd descend into the 1st one, and then polluting the object prototype in that descension.

v5.7.0

Minor Changes

  • 2f0b0ff: Add support for DTCG v2025.10 duration token values, while remaining backwards compatible for Style Dictionary time tokens.

    The time/seconds transform now also matches duration tokens and handles their object values, and transition/css/shorthand stringifies the duration and delay properties of a transition, including when those properties reference duration tokens.

    {
      "fast": {
        "$type": "duration",
        "$value": { "value": 200, "unit": "ms" }
      },
      "fade": {
        "$type": "transition",
        "$value": {
          "duration": "{fast}",
          "delay": { "value": 0, "unit": "ms" },
          "timingFunction": "ease-in-out"
        }
      }
    }

    time/seconds now uses the minimum amount of decimals that keeps the precision of the input, instead of a fixed two. A 1ms duration resolves to 0.001s instead of being rounded away to 0.00s, and a value that needs no decimals is no longer padded with them. A value that is already in seconds, e.g. "0.36s", is also no longer divided a second time into "0.00s".

    Note that dropping the fixed two decimals changes existing output: a time token of 500 now transforms to 0.5s rather than 0.50s, and 1000 to 1s rather than 1.00s. The values are equivalent on every platform this transform targets.

Patch Changes

  • 871dbfb: Ignore a trailing DTCG v2025.10 $root path segment in the built-in name transforms, so a root token is named after its group (e.g. --color-text-warning instead of --color-text-warning-root). Also fix outputReferences not replacing references to $root tokens.

... (truncated)

Changelog

Sourced from style-dictionary's changelog.

5.8.0

Minor Changes

  • e8f77ed: Expose stripMetaProps, formatJS and isColor utilities through the style-dictionary/utils entrypoint, so that custom formats and transforms can reuse the same helpers as the built-in ones.
  • 73acfe2: Add StopTransformError to style-dictionary/utils. A transform can throw it to skip the remaining transforms for that token, which keeps the changes made by the transforms that ran before. It is still reported as a transform error.

Patch Changes

  • 52d9d7d: Fix cleaning the copy_assets action on Node.js 25 and later. It removed the assets directory with fs.rmdir() and its recursive option, which Node.js 25 removed, so cleaning threw ERR_INVALID_ARG_VALUE. It now uses fs.rm().
  • ce0a390: When a token in source overrides a token from include (or from the inline tokens option), it now replaces that token instead of being merged into it, the same as when two source files or two include files define the same token. Properties that only the overridden token had, such as $extensions or comment, are no longer carried over.
  • d87ca0b: Round alpha values that come from 8 or 4 digit hex colors in the color/css transform to the shortest value that maps back to the same hex alpha (two decimals, or three when two do not round-trip), the same as browsers do. For example [#00000014](https://github.com/style-dictionary/style-dictionary/issues/00000014) becomes rgba(0, 0, 0, 0.08) again instead of rgba(0, 0, 0, 0.0784313725490196). Alpha values written as decimals are still kept as they are.
  • f82e7aa: BREAKING: the sketch/palette format is registered under its documented name again. Since the enums were introduced in v4.3.0 the format was accidentally registered as sketchPalette, which made format: 'sketch/palette' throw "Can't find format". The formats.sketchPalette enum now resolves to 'sketch/palette', and the accidental 'sketchPalette' string name is no longer accepted. If you used format: 'sketchPalette', switch to format: 'sketch/palette' or use formats.sketchPalette from style-dictionary/enums.
  • 5a2e3d2: Include the token path, and the token's filePath when it has one, in the "Token name must be a string" error, so a token with an empty name (e.g. an empty "" key) is easier to find.

5.7.1

Patch Changes

  • c3c37e1: Protect convertTokenData to output 'object' from another prototype pollution vulnerability (GHSA-m4pr-rgwp). In this case, the attack vector was by placing 2 tokens and letting the 2nd descend into the 1st one, and then polluting the object prototype in that descension.

5.7.0

Minor Changes

  • 2f0b0ff: Add support for DTCG v2025.10 duration token values, while remaining backwards compatible for Style Dictionary time tokens.

    The time/seconds transform now also matches duration tokens and handles their object values, and transition/css/shorthand stringifies the duration and delay properties of a transition, including when those properties reference duration tokens.

    {
      "fast": {
        "$type": "duration",
        "$value": { "value": 200, "unit": "ms" }
      },
      "fade": {
        "$type": "transition",
        "$value": {
          "duration": "{fast}",
          "delay": { "value": 0, "unit": "ms" },
          "timingFunction": "ease-in-out"
        }
      }
    }

    time/seconds now uses the minimum amount of decimals that keeps the precision of the input, instead of a fixed two. A 1ms duration resolves to 0.001s instead of being rounded away to 0.00s, and a value that needs no decimals is no longer padded with them. A value that is already in seconds, e.g. "0.36s", is also no longer divided a second time into "0.00s".

    Note that dropping the fixed two decimals changes existing output: a time token of 500 now transforms to 0.5s rather than 0.50s, and 1000 to 1s rather than 1.00s. The values are equivalent on every platform this transform targets.

... (truncated)

Commits
  • 795233d chore: release (#1792)
  • e8f77ed feat: expose stripMetaProps, formatJS and isColor via style-dictionary/utils ...
  • 3815256 docs: correct asset/base64 description and quoting in the base64 example (#1795)
  • ce0a390 fix: let a source token override an include token instead of merging into it ...
  • 52d9d7d fix: clean copy_assets output with fs.rm() so it works on Node.js 25+ (#1796)
  • f82e7aa fix: restore documented sketch/palette format name (#1781)
  • d87ca0b fix: round hex alpha in color/css to the shortest value that round-trips (#1782)
  • 73acfe2 feat: add StopTransformError to stop transforming a token (#1787)
  • 5a2e3d2 fix: include the token path in the "Token name must be a string" error (#1788)
  • d126fdf Update README.md (#1778)
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for style-dictionary since your current version.

Install script changes

This version modifies prepare script that runs during installation. Review the package contents before updating.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [style-dictionary](https://github.com/style-dictionary/style-dictionary) from 3.9.2 to 5.8.0.
- [Release notes](https://github.com/style-dictionary/style-dictionary/releases)
- [Changelog](https://github.com/style-dictionary/style-dictionary/blob/main/CHANGELOG.md)
- [Commits](style-dictionary/style-dictionary@v3.9.2...v5.8.0)

---
updated-dependencies:
- dependency-name: style-dictionary
  dependency-version: 5.8.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants