Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump style-dictionary from 3.9.2 to 4.0.0 #540

Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 1, 2024

Bumps style-dictionary from 3.9.2 to 4.0.0.

Release notes

Sourced from style-dictionary's releases.

v4.0.0

For a more comprehensive migration guide from version 3.x.x to version 4.0.0, visit the migration guide page

Major Changes

  • 6cc7f31: BREAKING:

    • usesReference util function is now usesReferences to be consistent plural form like the other reference util functions.

    • getReferences first and second parameters have been swapped to be consistent with resolveReferences, so value first, then the full token object (instead of the entire dictionary instance).

    • getReferences accepts a third options parameter which can be used to set reference Regex options as well as an unfilteredTokens object which can be used as a fallback when references are made to tokens that have been filtered out. There will be warnings logged for this.

    • format.formatter removed old function signature of (dictionary, platform, file) in favor of ({ dictionary, platform, options, file }).

    • Types changes:

      • Style Dictionary is entirely strictly typed now, and there will be .d.ts files published next to every file, this means that if you import from one of Style Dictionary's entrypoints, you automatically get the types implicitly with it. This is a big win for people using TypeScript, as the majority of the codebase now has much better types, with much fewer anys.
      • There is no more hand-written Style Dictionary module index.d.ts anymore that exposes all type interfaces on itself. This means that you can no longer grab types that aren't members of the Style Dictionary class directly from the default export of the main entrypoint. External types such as Parser, Transform, DesignTokens, etc. can be imported from the newly added types entrypoint:
      import type { DesignTokens, Transform, Parser } from 'style-dictionary/types';

      Please raise an issue if you find anything missing or suddenly broken.

      • Matcher, Transformer, Formatter, etc. are still available, although no longer directly but rather as properties on their parents, so Filter['matcher'], Transform['transformer'], Format['formatter']
  • dcbe2fb: - The project has been fully converted to ESM format, which is also the format that the browser uses. For users, this means you'll have to either use Style Dictionary in ESM JavaScript code, or dynamically import it into your CommonJS code.

    • StyleDictionary.extend() method is now asynchronous, which means it returns Promise<StyleDictionary.Core> instead of StyleDictionary.Core.
    • allProperties / properties was deprecated in v3, and is now removed from StyleDictionary.Core, use allTokens and tokens instead.
    • Templates and the method registerTemplate were deprecated in v3, now removed. Use Formats instead.
    • The package now uses package entrypoints, which means that what is importable from the package is locked down to just the specified entrypoints: style-dictionary & style-dictionary/fs. If more is needed, please raise an issue explaining which file you were importing and why you need it to be public API.
  • f2ed88b: BREAKING: File headers, when registered, are put inside the hooks.fileHeaders property now, as opposed to fileHeader. Note the change from singular to plural form here.

    Before:

    export default {
      fileHeader: {
        foo: (defaultMessages = []) => ['Ola, planet!', ...defaultMessages, 'Hello, World!'],
      },
    };

    After:

    export default {
      hooks: {

... (truncated)

Changelog

Sourced from style-dictionary's changelog.

4.0.0

For a more comprehensive migration guide from version 3.x.x to version 4.0.0, visit the migration guide page

Major Changes

  • 6cc7f31: BREAKING:

    • usesReference util function is now usesReferences to be consistent plural form like the other reference util functions.

    • getReferences first and second parameters have been swapped to be consistent with resolveReferences, so value first, then the full token object (instead of the entire dictionary instance).

    • getReferences accepts a third options parameter which can be used to set reference Regex options as well as an unfilteredTokens object which can be used as a fallback when references are made to tokens that have been filtered out. There will be warnings logged for this.

    • format.formatter removed old function signature of (dictionary, platform, file) in favor of ({ dictionary, platform, options, file }).

    • Types changes:

      • Style Dictionary is entirely strictly typed now, and there will be .d.ts files published next to every file, this means that if you import from one of Style Dictionary's entrypoints, you automatically get the types implicitly with it. This is a big win for people using TypeScript, as the majority of the codebase now has much better types, with much fewer anys.
      • There is no more hand-written Style Dictionary module index.d.ts anymore that exposes all type interfaces on itself. This means that you can no longer grab types that aren't members of the Style Dictionary class directly from the default export of the main entrypoint. External types such as Parser, Transform, DesignTokens, etc. can be imported from the newly added types entrypoint:
      import type { DesignTokens, Transform, Parser } from 'style-dictionary/types';

      Please raise an issue if you find anything missing or suddenly broken.

      • Matcher, Transformer, Formatter, etc. are still available, although no longer directly but rather as properties on their parents, so Filter['matcher'], Transform['transformer'], Format['formatter']
  • dcbe2fb: - The project has been fully converted to ESM format, which is also the format that the browser uses. For users, this means you'll have to either use Style Dictionary in ESM JavaScript code, or dynamically import it into your CommonJS code.

    • StyleDictionary.extend() method is now asynchronous, which means it returns Promise<StyleDictionary.Core> instead of StyleDictionary.Core.
    • allProperties / properties was deprecated in v3, and is now removed from StyleDictionary.Core, use allTokens and tokens instead.
    • Templates and the method registerTemplate were deprecated in v3, now removed. Use Formats instead.
    • The package now uses package entrypoints, which means that what is importable from the package is locked down to just the specified entrypoints: style-dictionary & style-dictionary/fs. If more is needed, please raise an issue explaining which file you were importing and why you need it to be public API.
  • f2ed88b: BREAKING: File headers, when registered, are put inside the hooks.fileHeaders property now, as opposed to fileHeader. Note the change from singular to plural form here.

    Before:

    export default {
      fileHeader: {
        foo: (defaultMessages = []) => ['Ola, planet!', ...defaultMessages, 'Hello, World!'],
      },
    };

    After:

    export default {
      hooks: {

... (truncated)

Commits

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 merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @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)

@dependabot dependabot bot requested a review from mfranzke as a code owner July 1, 2024 01:32
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jul 1, 2024
@dependabot dependabot bot requested a review from nmerget as a code owner July 1, 2024 01:32
@dependabot dependabot bot added the major label Jul 1, 2024
@dependabot dependabot bot requested review from dkolba and annsch as code owners July 1, 2024 01:32
Copy link
Contributor

github-actions bot commented Jul 1, 2024

github-actions[bot]
github-actions bot previously approved these changes Jul 1, 2024
@dependabot dependabot bot force-pushed the dependabot-npm_and_yarn-style-dictionary-4.0.0 branch from df0e966 to 6b3c5de Compare July 10, 2024 02:03
github-actions[bot]
github-actions bot previously approved these changes Jul 10, 2024
@dependabot dependabot bot force-pushed the dependabot-npm_and_yarn-style-dictionary-4.0.0 branch from 6b3c5de to 16da3cf Compare July 12, 2024 01:49
github-actions[bot]
github-actions bot previously approved these changes Jul 12, 2024
Bumps [style-dictionary](https://github.com/amzn/style-dictionary) from 3.9.2 to 4.0.0.
- [Release notes](https://github.com/amzn/style-dictionary/releases)
- [Changelog](https://github.com/amzn/style-dictionary/blob/main/CHANGELOG.md)
- [Commits](amzn/style-dictionary@v3.9.2...v4.0.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot-npm_and_yarn-style-dictionary-4.0.0 branch from 16da3cf to 15f8f3e Compare July 15, 2024 01:50
Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 19, 2024

Superseded by #548.

@dependabot dependabot bot closed this Jul 19, 2024
@dependabot dependabot bot deleted the dependabot-npm_and_yarn-style-dictionary-4.0.0 branch July 19, 2024 02:33
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 major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants