[Snyk] Upgrade style-dictionary from 3.8.0 to 4.1.2 #226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade style-dictionary from 3.8.0 to 4.1.2.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Warning: This is a major version upgrade, and may be a breaking change.
Release notes
Package name: style-dictionary
Patch Changes
Patch Changes
iosSwiftEnumOpts.className
andiosSwiftAnyOpts.className
formats property documentationcopy_assets
do and undo methods, since they affect directories, not files.Minor Changes
ccf27b7: Prevent duplicate redundant calls to StyleDictionary class methods by caching platform specific config & tokens results.
Added reusable methods:
getPlatformTokens()
-> grabs thetokens
/allTokens
(new!exportPlatform
does not return this) for a specific platform, after running platform specific preprocessors and transforms. This replaces the oldexportPlatform
method which is now deprecated and will be removed in v5.getPlatformConfig()
-> grabs the processed/transformedPlatformConfig
for a specific platform, replaces the now deprecatedgetPlatform
method which will be removed in v5.The reasons for deprecating those methods and replacing them with new ones is to reduce method ambiguity and make them more pure.
Add new options object to methods:
getPlatformTokens
getPlatformConfig
exportPlatform
(deprecated, see above)getPlatform
(deprecated, see above)formatPlatform
formatAllPlatforms
buildPlatform
buildAllPlatforms
cleanPlatform
cleanAllPlatforms
with property
cache
, which if set tofalse
, will disable this caching of generating the platform specific config / tokens, e.g.:Expectation is that this is usually not useful for majority of users, unless for example you're testing multiple runs of StyleDictionary while changing tokens or platform configs in between those runs.
Patch Changes
2ec9a44:
size/rem
transform to leave 0 (string or number) values as is, since 0 doesn't need a unit.f317430: Added link to logging documentation inside all of the warnings and errors that refer to verbosity.
6275983: Respect
formatting
options in scss map-deep/map-flat formats, those that make sense:commentPosition
commentStyle
indentation
Also export a new type interface
FormattingOverrides
, which is a limited version ofFormattingOptions
.These contain the formatting options that can be overridden by users, whereas the full version is meant for the format helper utilities such as
createPropertyFormatter
/formattedVariables
.Patch Changes
Read more
Patch Changes
typeDtcgDelegate
utility to remove the $type on token group level between parsing/preprocessing step.Patch Changes
Minor Changes
8450a45: Some fixes for Expand utility:
dashArray
property ofstrokeStyle
tokens no longer get expanded unintentionally,typeof 'object'
check changed toisPlainObject
check.style
property insideborder
tokens) will now also be expanded.This is because if the reference is to an object value, the expansion might break the reference.
Minor Changes
39f0220: Allow not throwing fatal errors on broken token references/aliases, but
console.error
instead.You can also configure this on global/platform
log
property:This setting defaults to
"error"
when not configured.resolveReferences
andgetReferences
warnImmediately
option is set totrue
which causes an error to be thrown/warned immediately by default, which can be configured tofalse
if you know those utils are running in the transform/format hooks respectively, where the errors are collected and grouped, then thrown as 1 error/warning instead of multiple.Some minor grammatical improvements to some of the error logs were also done.
Minor Changes
Commit messages
Package name: style-dictionary
options.className
forios-swift/*
formats amzn/style-dictionary#1330)compose/object
parameters table amzn/style-dictionary#1328)Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs