skeleton 4.11.0 → 4.12.1
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/dist/index.mjs +27 -27
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -243,8 +243,8 @@ function transformClasses(code) {
|
|
|
243
243
|
function transformStylesheet$1(code) {
|
|
244
244
|
try {
|
|
245
245
|
const parsed = parse(code);
|
|
246
|
-
parsed.walkAtRules("apply", (atRule
|
|
247
|
-
atRule
|
|
246
|
+
parsed.walkAtRules("apply", (atRule) => {
|
|
247
|
+
atRule.params = transformClasses(atRule.params).code;
|
|
248
248
|
});
|
|
249
249
|
return { code: parsed.toString() };
|
|
250
250
|
} catch (error) {
|
|
@@ -257,8 +257,8 @@ function transformStylesheet$1(code) {
|
|
|
257
257
|
//#region src/commands/migrate/migrations/skeleton-3/transformers/transform-app.css.ts
|
|
258
258
|
function getTailwindImport(root) {
|
|
259
259
|
let tailwindImport;
|
|
260
|
-
root.walkAtRules("import", (atRule
|
|
261
|
-
if (atRule
|
|
260
|
+
root.walkAtRules("import", (atRule) => {
|
|
261
|
+
if (atRule.params.includes("tailwindcss")) tailwindImport = atRule;
|
|
262
262
|
});
|
|
263
263
|
return tailwindImport;
|
|
264
264
|
}
|
|
@@ -851,23 +851,23 @@ function sortPropertiesAlphabetically(object) {
|
|
|
851
851
|
//#region src/commands/migrate/migrations/skeleton-3/transformers/transform-package.json.ts
|
|
852
852
|
function transformPackageJson$1(code, skeletonVersion, skeletonSvelteVersion) {
|
|
853
853
|
let isUsingComponents = false;
|
|
854
|
-
const pkg
|
|
854
|
+
const pkg = JSON.parse(code);
|
|
855
855
|
for (const field of ["dependencies", "devDependencies"]) {
|
|
856
|
-
if (!pkg
|
|
857
|
-
const coerced = coerce(pkg
|
|
856
|
+
if (!pkg[field]) continue;
|
|
857
|
+
const coerced = coerce(pkg[field]["@skeletonlabs/skeleton"]);
|
|
858
858
|
if (coerced && lt(coerced.version, "3.0.0")) {
|
|
859
859
|
isUsingComponents = true;
|
|
860
|
-
delete pkg
|
|
861
|
-
pkg
|
|
860
|
+
delete pkg[field]["@skeletonlabs/skeleton"];
|
|
861
|
+
pkg[field]["@skeletonlabs/skeleton-svelte"] = `^${skeletonSvelteVersion}`;
|
|
862
862
|
}
|
|
863
|
-
if (pkg
|
|
864
|
-
delete pkg
|
|
865
|
-
pkg
|
|
863
|
+
if (pkg[field]["@skeletonlabs/tw-plugin"]) {
|
|
864
|
+
delete pkg[field]["@skeletonlabs/tw-plugin"];
|
|
865
|
+
pkg[field]["@skeletonlabs/skeleton"] = `^${skeletonVersion}`;
|
|
866
866
|
}
|
|
867
|
-
pkg
|
|
867
|
+
pkg[field] = sortPropertiesAlphabetically(pkg[field]);
|
|
868
868
|
}
|
|
869
869
|
return {
|
|
870
|
-
code: JSON.stringify(pkg
|
|
870
|
+
code: JSON.stringify(pkg, void 0, detectIndent(code).indent || " "),
|
|
871
871
|
meta: { isUsingComponents }
|
|
872
872
|
};
|
|
873
873
|
}
|
|
@@ -1161,24 +1161,24 @@ function transformModule(code) {
|
|
|
1161
1161
|
//#endregion
|
|
1162
1162
|
//#region src/commands/migrate/migrations/skeleton-4/transformers/transform-package.json.ts
|
|
1163
1163
|
function transformPackageJson(code) {
|
|
1164
|
-
const pkg
|
|
1164
|
+
const pkg = JSON.parse(code);
|
|
1165
1165
|
for (const field of ["dependencies", "devDependencies"]) {
|
|
1166
|
-
if (!pkg
|
|
1166
|
+
if (!pkg[field]) continue;
|
|
1167
1167
|
for (const dep of [
|
|
1168
1168
|
"@skeletonlabs/skeleton",
|
|
1169
1169
|
"@skeletonlabs/skeleton-svelte",
|
|
1170
1170
|
"@skeletonlabs/skeleton-react"
|
|
1171
1171
|
]) {
|
|
1172
|
-
if (!pkg
|
|
1173
|
-
const coerced = coerce(pkg
|
|
1172
|
+
if (!pkg[field][dep]) continue;
|
|
1173
|
+
const coerced = coerce(pkg[field][dep]);
|
|
1174
1174
|
if (coerced && lt(coerced.version, "4.0.0")) {
|
|
1175
|
-
delete pkg
|
|
1176
|
-
pkg
|
|
1175
|
+
delete pkg[field][dep];
|
|
1176
|
+
pkg[field][dep] = "^4.0.0";
|
|
1177
1177
|
}
|
|
1178
1178
|
}
|
|
1179
|
-
pkg
|
|
1179
|
+
pkg[field] = sortPropertiesAlphabetically(pkg[field]);
|
|
1180
1180
|
}
|
|
1181
|
-
return { code: JSON.stringify(pkg
|
|
1181
|
+
return { code: JSON.stringify(pkg, void 0, detectIndent(code).indent || " ") };
|
|
1182
1182
|
}
|
|
1183
1183
|
|
|
1184
1184
|
//#endregion
|
|
@@ -1186,14 +1186,14 @@ function transformPackageJson(code) {
|
|
|
1186
1186
|
function transformStylesheet(content) {
|
|
1187
1187
|
try {
|
|
1188
1188
|
const ast = parse(content);
|
|
1189
|
-
ast.walkAtRules((atRule
|
|
1190
|
-
if (atRule
|
|
1191
|
-
if (atRule
|
|
1192
|
-
if (atRule
|
|
1189
|
+
ast.walkAtRules((atRule) => {
|
|
1190
|
+
if (atRule.name === "import" && atRule.params.includes("@skeletonlabs/skeleton/optional/presets")) atRule.remove();
|
|
1191
|
+
if (atRule.name === "source") {
|
|
1192
|
+
if (atRule.params.includes("@skeletonlabs/skeleton-svelte")) atRule.replaceWith(new AtRule({
|
|
1193
1193
|
name: "import",
|
|
1194
1194
|
params: `'@skeletonlabs/skeleton-svelte'`
|
|
1195
1195
|
}));
|
|
1196
|
-
if (atRule
|
|
1196
|
+
if (atRule.params.includes("@skeletonlabs/skeleton-react")) atRule.replaceWith(new AtRule({
|
|
1197
1197
|
name: "import",
|
|
1198
1198
|
params: `'@skeletonlabs/skeleton-react'`
|
|
1199
1199
|
}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skeleton",
|
|
3
3
|
"description": "The CLI for Skeleton related tooling.",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.12.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/skeletonlabs/skeleton.git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@clack/prompts": "0.11.0",
|
|
17
17
|
"colorette": "2.0.20",
|
|
18
|
-
"commander": "14.0.
|
|
18
|
+
"commander": "14.0.3",
|
|
19
19
|
"detect-indent": "7.0.2",
|
|
20
20
|
"latest-version": "9.0.0",
|
|
21
21
|
"magic-string": "0.30.21",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"node-html-parser": "7.0.2",
|
|
24
24
|
"package-manager-detector": "1.6.0",
|
|
25
25
|
"postcss": "8.5.6",
|
|
26
|
-
"semver": "7.7.
|
|
27
|
-
"svelte": "5.
|
|
26
|
+
"semver": "7.7.4",
|
|
27
|
+
"svelte": "5.51.5",
|
|
28
28
|
"tinyglobby": "0.2.15",
|
|
29
29
|
"ts-morph": "27.0.2",
|
|
30
30
|
"zimmerframe": "1.1.4"
|