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

build(deps): update dependency @tokens-studio/sd-transforms to v1 #10618

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 25, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@tokens-studio/sd-transforms 0.12.2 -> 1.2.8 age adoption passing confidence

Release Notes

tokens-studio/sd-transforms (@​tokens-studio/sd-transforms)

v1.2.8

Compare Source

Patch Changes
  • 5de4025: Addressed issue #​316 about letterSpacing. LetterSpacing is no longer a dimension token. Also, the expand composition test token has been modify to test if the letterSpacing still works properly.

v1.2.7

Compare Source

Patch Changes
  • fb3c7d3: Export TransformOption type to be publicly available (#​319)
  • 26cf7f9: -Made the font weight case insensitive; Extra checks for style and weight values, confusions cleared up in the code; Font style and value are not both mandatory, it is fine if only one is specified; If font style is not provided, the style field will take the weight value; The bug from issue #​267 is fixed.

v1.2.6

Compare Source

Patch Changes
  • b4461f4: Ensure that shadow value is still of type object (either Object or Array) before attempting to resolve math for each property/item.

v1.2.5

Compare Source

Patch Changes
  • 61af02f: Check for color transforms that the value is of type string, since other color object types could occur from previously ran transforms.

v1.2.4

Compare Source

Patch Changes
  • b9aee1e: Fix lineHeight transform to keep numbers as numbers, and not stringify them.

v1.2.3

Compare Source

Patch Changes
  • 1085fe8: Improve math compute utility to better deal with mixed units computations. Expand on tests.

v1.2.2

Compare Source

Patch Changes
  • 0dea2af: fix: evaluate math expressions with units
  • 4fe336f: Override lineHeight expandTypesMap from SD. Add letterSpacing override. This is needed for our lineHeight and letterSpacing transforms to apply.

v1.2.1

Compare Source

Patch Changes
  • c6c9223: Add composition to expandTypesMap.
  • 19f4530: Fix alwaysAddFontStyle option to not apply to tokens of type fontWeight(s), only meant for typography tokens.
  • 32c2d13: textCase and textDecoration types should be kept, instead of changing to "other". This should help with transforms targeting those tokens, whereas "other" is not a useful type conversion whatsoever.
  • 3a044ed: Remove the boxShadow expandTypesMap, this is no longer needed since SD 4.0.1 as it runs user defined preprocessors before expanding tokens.

v1.2.0

Compare Source

Minor Changes
  • ff31df8: Add lineHeight and fontWeight types to the expandTypesMap. Even though DTCG spec does not yet recognize them, they really are special types and marking them as such enables transforms to target them specifically.
  • ff31df8: Properly split fontWeight tokens that contain fontStyle into the parent group. For typography tokens this was correct but for fontWeight tokens, collision could occur between the token and its sibling tokens.

v1.1.0

Compare Source

Minor Changes
  • c687817: Add the originalType property to $extensions.['studio.tokens'] to store the original Tokens Studio token type, when the type is aligned to DTCG types. LetterSpacing transform is the transform in this package that actually needs to use this, because it doesn't want to match all dimension tokens, but it does want to match letterSpacing tokens.
  • ed10715: Allow changing the resolve math transform amount of decimals to round for using platform options mathFractionDigits, change default value from 3 to 4.
Patch Changes
  • c687817: Fix alignTypes to also include borderWidth, letterSpacing, paragraphSpacing and paragraphIndent and align them to dimension.
  • 9c02741: Fix bug where usesDtcg flag was not passed to resolveReference utility.

v1.0.1

Compare Source

Patch Changes
  • 6c7b2ff: Fix tsconfig to exclude test files and ensure dist folder structure is correct.

v1.0.0

Compare Source

Major Changes
  • 67edf4b: BREAKING: descriptionToComment transform no longer removes newlines, just turns carriage returns into newlines. Style Dictionary now handles comments with newlines properly in its createPropertyFormatter utility.

  • 67edf4b: BREAKING: Remove expand option, composite/object-value tokens must be expanded by using Style Dictionary Expand.

  • 67edf4b: BREAKING: remove CommonJS entrypoint and tools/scripts required to dual publish. Now that Style Dictionary v4 is ESM-only, this library will follow suit.

  • 67edf4b: BREAKING: transformFontWeights has been renamed to transformFontWeight for consistency.

    Apply transforms to object-value (composite) token types:

    • HEXRGBa transform applies to border and shadow colors
    • Px dimension transform applies to border, typography and shadow dimensions
    • Letterspacing, lineheights and fontweights transforms apply to these respective typography properties
    • Resolve math transform applies to all properties of border, typography and shadow tokens

    This also means that all transforms except for description to comment mapping are now transitive transforms, since the math resolve transform must be transitive and all other transforms must apply after the math one.

  • 67edf4b: BREAKING: remove CSS shorthand transforms for border, typography and shadow. Use the Style Dictionary transforms instead: https://styledictionary.com/reference/hooks/transforms/predefined/#bordercssshorthand.

    Note that if you're not disabling the withSDBuiltins option, the tokens-studio transformGroup will include the ones in the css built-in transformGroup, so you might not notice the fact that they are moved.

  • 67edf4b: - BREAKING: Compatible with Style Dictionary >= v4.0.0. Not compatible with anything below that SD version.

    • BREAKING: registerTransforms function has been renamed to register.
    • BREAKING: transforms array has been refactored to getTransforms(), which is a function you should call. Optionally pass in the new platform option as parameter { platform: 'css' /* or 'compose' */}
    • BREAKING: By default, registered tokens-studio transformGroup will include the platform's Style Dictionary built-in transforms. E.g. if you're registering for platform css it will include the css transformGroup transforms from Style Dictionary, appended to the Tokens Studio specific transforms. This behavior can be disabled by passing { withSDBuiltins: false }.
    • Allow passing platform to the register() call: register(SD, { platform: 'compose' }). Default value is 'css'. This means your tokens-studio group will be registered for that specific platform.
    • Allow passing name to the register() call to configure the transformGroup name: register(SD, { name: 'tokens-studio-css' }). Default value is tokens-studio.
Minor Changes
  • 67edf4b: Adjust add-font-styles parser to also run on tokens of type fontWeight, to create a sibling token for the fontStyle if it is included in the fontWeight token.
  • 67edf4b: Add an adjust-types preprocessor utility that aligns the Tokens Studio types / object-value props with the DTCG ones.

v0.16.1

Compare Source

Patch Changes
  • 3ab8d64: Restructure evaluate math util to support expr eval expressions in combination with regular math.
  • 3ab8d64: Allow math expressions where multiple components contain units, as long as they are still computable.

v0.16.0

Compare Source

Minor Changes
  • 5856621: BREAKING: update to Style Dictionary v4.0.0-prerelease.27, set preprocessor name to 'tokens-studio', which now has to be applied if you want to exclude parent keys, expand composite types or add font style properties to typography values.

v0.15.2

Compare Source

Patch Changes
  • 7617f9d: Pass colorspace to mix modifier, to use the correct color space to mix in.

v0.15.1

Compare Source

Patch Changes
  • 000b202: Update to latest style-dictionary pre.22

v0.15.0

Compare Source

Minor Changes
  • 09b1fc0: BREAKING: remove options addAttributeCTI & casing.
    Since transformGroup can now be combined with transforms, this is now much easier to accomplish in Style-Dictionary without additional sd-transforms options.

    Before:

    registerTransforms(StyleDictionary, { addAttributeCTI: true, casing: 'kebab' });

    After:

    {
      "platforms": {
        "css": {
          "transformGroup": "tokens-studio",
          "transforms": ["attribute/cti", "name/kebab"]
        }
      }
    }

    From this version onwards, Style-Dictionary v4.0.0-prerelease.19 minimum is required.

v0.14.4

Compare Source

Patch Changes
  • 41d83fa: Add "book" to named font weights, converted to 400

v0.14.3

Compare Source

Patch Changes
  • 9351782: Fix expand utility with latest style-dictionary prerelease.16, values would end up undefined due to bad reference resolve.

v0.14.2

Compare Source

Patch Changes

v0.14.1

Compare Source

Patch Changes
  • f5a8b12: Copy metadata from composite type tokens when expanding.

v0.14.0

Compare Source

Minor Changes

v0.13.4

Compare Source

Patch Changes
  • 8bde22d: Support references in color modifiers now that style-dictionary transformers can defer themselves.
  • 771428a: Fix expanding composition tokens flattening to not occur for certain object values and resulting in [object Object].

v0.13.3

Compare Source

Patch Changes
  • cfc0c3d: Fix rgba(hex, alpha) regex to allow percentages, add more tests for different types of alpha values.

v0.13.2

Compare Source

Patch Changes
  • 3f97dc2: Remove trailing console logs from previous update.

v0.13.1

Compare Source

Patch Changes
  • 7409419: Use expr-eval-fork to work around a prototype pollution vulnerability in the original package.

v0.13.0

Compare Source

Minor Changes
  • 6c95fe4: BREAKING: remove code that allowed user to not pass StyleDictionary instance to registerTransforms, and grabbed the locally installed StyleDictionary automatically. This seemed like a cool feature at first, but can cause hard to trace bugs if there are multiple installations of style-dictionary (due to incompatible semver).
  • 6c95fe4: Will now use preprocessors instead of parsers when user Style-Dictionary is v4.0.0-prerelease.2 or higher. Fixes an issue with multi-file references not being resolvable when running composite token expansion or add font style utilities.

  • If you want to rebase/retry this PR, check this box

@renovate renovate bot requested a review from benelan as a code owner October 25, 2024 11:07
@renovate renovate bot added the chore Issues with changes that don't modify src or test files. label Oct 25, 2024
@renovate renovate bot requested a review from jcfranco as a code owner October 25, 2024 11:07
@renovate renovate bot added the dependencies Pull requests that update a dependency file label Oct 25, 2024
Copy link
Contributor Author

renovate bot commented Oct 25, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/style-dictionary
npm ERR!   dev style-dictionary@"3.9.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer style-dictionary@"^4.1.4" from @tokens-studio/[email protected]
npm ERR! node_modules/@tokens-studio/sd-transforms
npm ERR!   dev @tokens-studio/sd-transforms@"1.2.8" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /tmp/renovate/cache/others/npm/_logs/2024-11-26T19_07_35_906Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2024-11-26T19_07_35_906Z-debug-0.log

Copy link
Contributor

github-actions bot commented Nov 4, 2024

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Nov 4, 2024
@renovate renovate bot force-pushed the renovate/tokens-studio-sd-transforms-1.x branch 2 times, most recently from 4b8e299 to 3db5a09 Compare November 10, 2024 22:44
@github-actions github-actions bot removed the Stale Issues or pull requests that have not had recent activity. label Nov 11, 2024
@renovate renovate bot force-pushed the renovate/tokens-studio-sd-transforms-1.x branch 2 times, most recently from 3c1dcce to a37337e Compare November 16, 2024 09:36
Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Nov 26, 2024
@renovate renovate bot force-pushed the renovate/tokens-studio-sd-transforms-1.x branch from a37337e to 1ace631 Compare November 26, 2024 19:07
@github-actions github-actions bot removed the Stale Issues or pull requests that have not had recent activity. label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issues with changes that don't modify src or test files. dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants