style-dictionary 4.3.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/advanced/assets-base64-embed/package.json +1 -1
- package/examples/advanced/create-react-app/package.json +1 -1
- package/examples/advanced/create-react-native-app/package.json +1 -1
- package/examples/advanced/custom-parser/package.json +1 -1
- package/examples/advanced/custom-transforms/package.json +1 -1
- package/examples/advanced/font-face-rules/package.json +1 -1
- package/examples/advanced/format-helpers/package.json +1 -1
- package/examples/advanced/matching-build-files/package.json +1 -1
- package/examples/advanced/multi-brand-multi-platform/package.json +1 -1
- package/examples/advanced/node-modules-as-config-and-properties/package.json +1 -1
- package/examples/advanced/npm-module/package.json +1 -1
- package/examples/advanced/referencing_aliasing/package.json +1 -1
- package/examples/advanced/s3/package.json +1 -1
- package/examples/advanced/tailwind-preset/package.json +1 -1
- package/examples/advanced/tokens-deprecation/package.json +1 -1
- package/examples/advanced/transitive-transforms/package.json +1 -1
- package/examples/advanced/variables-in-outputs/package.json +1 -1
- package/examples/advanced/yaml-tokens/package.json +1 -1
- package/lib/StyleDictionary.js +1 -1
- package/lib/common/transforms.js +1 -1
- package/package.json +1 -1
package/lib/StyleDictionary.js
CHANGED
|
@@ -80,7 +80,7 @@ export default class StyleDictionary extends Register {
|
|
|
80
80
|
// Placeholder is transformed on prepublish -> see scripts/inject-version.js
|
|
81
81
|
// Another option might be import pkg from './package.json' with { "type": "json" } which would work in both browser and node, but support is not there yet.
|
|
82
82
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#browser_compatibility
|
|
83
|
-
static VERSION = '4.3.
|
|
83
|
+
static VERSION = '4.3.2';
|
|
84
84
|
|
|
85
85
|
/** @returns {Config} */
|
|
86
86
|
get options() {
|
package/lib/common/transforms.js
CHANGED
|
@@ -829,7 +829,7 @@ export default {
|
|
|
829
829
|
transform: function (token, _, options) {
|
|
830
830
|
const nonParsed = options.usesDtcg ? token.$value : token.value;
|
|
831
831
|
// if the dimension already has a unit (non-digit / . period character)
|
|
832
|
-
if (`${nonParsed}`.match(
|
|
832
|
+
if (`${nonParsed}`.match(/[^0-9.-]+$/)) {
|
|
833
833
|
return nonParsed;
|
|
834
834
|
}
|
|
835
835
|
const parsedVal = parseFloat(nonParsed);
|