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

Version Packages (prerelease) #1108

Merged
merged 1 commit into from
Feb 23, 2024
Merged

Version Packages (prerelease) #1108

merged 1 commit into from
Feb 23, 2024

Conversation

github-actions[bot]
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to v4, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

v4 is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on v4.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

style-dictionary@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.

    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'
        );
      },
    });

@github-actions github-actions bot requested a review from a team as a code owner February 23, 2024 12:58
@jorenbroekema jorenbroekema merged commit d5d7a8e into v4 Feb 23, 2024
jorenbroekema pushed a commit that referenced this pull request Jun 28, 2024
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant