style-dictionary 5.0.2 → 5.0.3
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/README.md +1 -1
- 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/utils/loadFile.js +5 -1
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<pre>
|
|
2
|
-
<a href="https://styledictionary.com/
|
|
2
|
+
<a href="https://styledictionary.com/versions/v4/migration/">What's new in Style Dictionary 4.0!</a>
|
|
3
3
|
</pre>
|
|
4
4
|
|
|
5
5
|
<img src="docs/src/assets/logo.png" alt="Style Dictionary logo and mascot" title=""Pascal"" width="100" align="right" />
|
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 = '5.0.
|
|
83
|
+
static VERSION = '5.0.3';
|
|
84
84
|
|
|
85
85
|
/** @returns {Config} */
|
|
86
86
|
get options() {
|
package/lib/utils/loadFile.js
CHANGED
|
@@ -35,7 +35,11 @@ export async function loadFile(filePath, vol) {
|
|
|
35
35
|
try {
|
|
36
36
|
file_content = (await import(/* @vite-ignore */ /* webpackIgnore: true */ resolvedPath))
|
|
37
37
|
.default;
|
|
38
|
-
|
|
38
|
+
try {
|
|
39
|
+
file_content = structuredClone(file_content);
|
|
40
|
+
} catch (_e) {
|
|
41
|
+
// cloning may fail if the content is a config with dynamic not cloneable content e.g. Function
|
|
42
|
+
}
|
|
39
43
|
} catch (e) {
|
|
40
44
|
if (e instanceof Error) {
|
|
41
45
|
if ('.ts' === extname(filePath)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "style-dictionary",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "Style once, use everywhere. A build system for creating cross-platform styles.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"style dictionary",
|
|
@@ -65,8 +65,7 @@
|
|
|
65
65
|
"test:strip-types": "node --experimental-strip-types __tests__/strip-types-test.js",
|
|
66
66
|
"install-cli": "npm install -g $(npm pack)",
|
|
67
67
|
"release": "npm run build && changeset publish",
|
|
68
|
-
"prepare": "husky install",
|
|
69
|
-
"postinstall": "patch-package",
|
|
68
|
+
"prepare": "husky install && patch-package",
|
|
70
69
|
"version": "changeset version && npm install"
|
|
71
70
|
},
|
|
72
71
|
"lint-staged": {
|
|
@@ -118,16 +117,14 @@
|
|
|
118
117
|
},
|
|
119
118
|
"dependencies": {
|
|
120
119
|
"@bundled-es-modules/deepmerge": "^4.3.1",
|
|
121
|
-
"@bundled-es-modules/glob": "^
|
|
120
|
+
"@bundled-es-modules/glob": "^11.0.3",
|
|
122
121
|
"@bundled-es-modules/memfs": "^4.9.4",
|
|
123
|
-
"@types/node": "^22.10.5",
|
|
124
122
|
"@zip.js/zip.js": "^2.7.44",
|
|
125
123
|
"chalk": "^5.3.0",
|
|
126
124
|
"change-case": "^5.3.0",
|
|
127
125
|
"commander": "^12.1.0",
|
|
128
126
|
"is-plain-obj": "^4.1.0",
|
|
129
127
|
"json5": "^2.2.2",
|
|
130
|
-
"patch-package": "^8.0.0",
|
|
131
128
|
"path-unified": "^0.2.0",
|
|
132
129
|
"prettier": "^3.3.3",
|
|
133
130
|
"tinycolor2": "^1.6.0"
|
|
@@ -143,6 +140,7 @@
|
|
|
143
140
|
"@rollup/plugin-virtual": "^3.0.2",
|
|
144
141
|
"@shoelace-style/shoelace": "^2.15.0",
|
|
145
142
|
"@types/chai": "^4.3.9",
|
|
143
|
+
"@types/node": "^22.10.5",
|
|
146
144
|
"@types/tinycolor2": "^1.4.6",
|
|
147
145
|
"@types/uuid": "^9.0.8",
|
|
148
146
|
"@typescript-eslint/parser": "^8.22.0",
|
|
@@ -150,7 +148,7 @@
|
|
|
150
148
|
"@web/test-runner-commands": "^0.9.0",
|
|
151
149
|
"@web/test-runner-playwright": "^0.11.0",
|
|
152
150
|
"acorn": "^8.11.3",
|
|
153
|
-
"astro": "^5.2
|
|
151
|
+
"astro": "^5.13.2",
|
|
154
152
|
"chai": "^5.0.0-alpha.2",
|
|
155
153
|
"eslint": "^9.19.0",
|
|
156
154
|
"eslint-plugin-mocha": "^10.5.0",
|
|
@@ -170,6 +168,7 @@
|
|
|
170
168
|
"mocha": "^10.2.0",
|
|
171
169
|
"monaco-editor": "^0.47.0",
|
|
172
170
|
"npm-run-all": "^4.1.5",
|
|
171
|
+
"patch-package": "^8.0.0",
|
|
173
172
|
"sass": "^1.69.5",
|
|
174
173
|
"semver": "^7.6.3",
|
|
175
174
|
"sharp": "^0.32.5",
|