vela 0.18.0 → 0.18.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/bin.js +35 -31
- package/dist/bin.js.map +2 -2
- package/package.json +2 -2
- package/templates/minimal/package.template.json +3 -8
package/dist/bin.js
CHANGED
|
@@ -20,7 +20,7 @@ import dotenv2 from "dotenv";
|
|
|
20
20
|
// package.json
|
|
21
21
|
var package_default = {
|
|
22
22
|
name: "vela",
|
|
23
|
-
version: "0.18.
|
|
23
|
+
version: "0.18.1",
|
|
24
24
|
type: "module",
|
|
25
25
|
description: "A CLI for creating and updating SvelteKit projects",
|
|
26
26
|
license: "MIT",
|
|
@@ -57,7 +57,7 @@ var package_default = {
|
|
|
57
57
|
dependencies: {
|
|
58
58
|
"@clack/prompts": "^1.7.0",
|
|
59
59
|
"@faker-js/faker": "^10.6.0",
|
|
60
|
-
"@velastack/patterns": "^0.7.
|
|
60
|
+
"@velastack/patterns": "^0.7.1",
|
|
61
61
|
"@velastack/pocketbase-codegen": "^0.1.0",
|
|
62
62
|
"@velastack/schema": "^0.3.0",
|
|
63
63
|
"@velastack/schema-ui": "^0.3.1",
|
|
@@ -372,6 +372,19 @@ function raiseFloor(pkg, name, range) {
|
|
|
372
372
|
}
|
|
373
373
|
return changed;
|
|
374
374
|
}
|
|
375
|
+
function dropFormsnapOverride(pkg) {
|
|
376
|
+
const overrides = pkg.overrides;
|
|
377
|
+
const entry = overrides?.formsnap;
|
|
378
|
+
if (typeof entry !== "object" || entry === null || !("sveltekit-superforms" in entry)) {
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
const { "sveltekit-superforms": _, ...rest } = entry;
|
|
382
|
+
const { formsnap: __, ...others } = overrides;
|
|
383
|
+
const next = Object.keys(rest).length > 0 ? { ...others, formsnap: rest } : others;
|
|
384
|
+
if (Object.keys(next).length > 0) pkg.overrides = next;
|
|
385
|
+
else delete pkg.overrides;
|
|
386
|
+
return true;
|
|
387
|
+
}
|
|
375
388
|
var VERSION_PART = /^v?(\d+|[xX*])(?:\.(\d+|[xX*]))?(?:\.(\d+|[xX*]))?(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
376
389
|
function minVersion(range) {
|
|
377
390
|
const alternatives = range.split("||").map((alt) => alt.trim());
|
|
@@ -2888,8 +2901,10 @@ function mergeDependencies(projectPath, templateDir) {
|
|
|
2888
2901
|
if (ensureLibImports(merged)) p6.log.info("package.json: added the #lib imports.");
|
|
2889
2902
|
writePackageJson(userPkgPath, merged);
|
|
2890
2903
|
if (pinned.length > 0) {
|
|
2891
|
-
p6.log.info(
|
|
2892
|
-
|
|
2904
|
+
p6.log.info(
|
|
2905
|
+
`Set what SvelteKit 3's form libraries need:
|
|
2906
|
+
${pinned.map((l) => ` ${l}`).join("\n")}`
|
|
2907
|
+
);
|
|
2893
2908
|
}
|
|
2894
2909
|
if (added.length > 0) {
|
|
2895
2910
|
p6.log.info(
|
|
@@ -2926,16 +2941,15 @@ function applyTemplatePins(merged, template, conflicts) {
|
|
|
2926
2941
|
const index = conflicts.findIndex((c) => c.name === name);
|
|
2927
2942
|
if (index !== -1) conflicts.splice(index, 1);
|
|
2928
2943
|
}
|
|
2929
|
-
const
|
|
2930
|
-
const
|
|
2931
|
-
if (
|
|
2932
|
-
|
|
2933
|
-
const
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
}
|
|
2944
|
+
const formsnapRange = template.devDependencies?.formsnap ?? template.dependencies?.formsnap;
|
|
2945
|
+
const formsnapBefore = merged.devDependencies?.formsnap ?? merged.dependencies?.formsnap;
|
|
2946
|
+
if (formsnapRange && raiseFloor(merged, "formsnap", formsnapRange)) {
|
|
2947
|
+
lines.push(`formsnap: ${formsnapBefore} \u2192 ${formsnapRange}`);
|
|
2948
|
+
const index = conflicts.findIndex((c) => c.name === "formsnap");
|
|
2949
|
+
if (index !== -1) conflicts.splice(index, 1);
|
|
2950
|
+
}
|
|
2951
|
+
if (dropFormsnapOverride(merged)) {
|
|
2952
|
+
lines.push("overrides.formsnap: dropped the sveltekit-superforms entry formsnap 2.0 needed");
|
|
2939
2953
|
}
|
|
2940
2954
|
const engines = template.engines;
|
|
2941
2955
|
const userEngines = merged.engines ?? {};
|
|
@@ -3931,6 +3945,7 @@ import {
|
|
|
3931
3945
|
ADAPTER_STATIC as ADAPTER_STATIC2,
|
|
3932
3946
|
ensurePackageOverrides,
|
|
3933
3947
|
FLASH,
|
|
3948
|
+
FORMSNAP,
|
|
3934
3949
|
SUPERFORMS_VERSION,
|
|
3935
3950
|
VELASTACK_CMS,
|
|
3936
3951
|
VELASTACK_KIT,
|
|
@@ -5670,6 +5685,8 @@ var FLOORS = [
|
|
|
5670
5685
|
["svelte-check", "^4.7.6"],
|
|
5671
5686
|
["typescript", "^6.0.0"],
|
|
5672
5687
|
["shadcn-svelte", "^1.7.0"],
|
|
5688
|
+
// 2.1 is the first formsnap whose superforms peer admits 3.x.
|
|
5689
|
+
splitSpec(FORMSNAP),
|
|
5673
5690
|
splitSpec(VELASTACK_KIT),
|
|
5674
5691
|
splitSpec(VELASTACK_POCKETBASE),
|
|
5675
5692
|
splitSpec(VELASTACK_CMS),
|
|
@@ -5706,23 +5723,10 @@ function packageFixup(root, cliVersion) {
|
|
|
5706
5723
|
changed.push(`engines.node ${engines.node ?? "(unset)"} \u2192 ${ENGINES_FLOOR}`);
|
|
5707
5724
|
data.engines = { ...engines, node: ENGINES_FLOOR };
|
|
5708
5725
|
}
|
|
5709
|
-
if (
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
f.warnings.push(
|
|
5714
|
-
`overrides.formsnap is not an object; set "formsnap": { "sveltekit-superforms": "${SUPERFORMS_VERSION}" } by hand`
|
|
5715
|
-
);
|
|
5716
|
-
} else {
|
|
5717
|
-
const formsnap = current ?? {};
|
|
5718
|
-
if (formsnap["sveltekit-superforms"] !== SUPERFORMS_VERSION) {
|
|
5719
|
-
data.overrides = {
|
|
5720
|
-
...overrides,
|
|
5721
|
-
formsnap: { ...formsnap, "sveltekit-superforms": SUPERFORMS_VERSION }
|
|
5722
|
-
};
|
|
5723
|
-
changed.push(`overrides formsnap \u2192 sveltekit-superforms ${SUPERFORMS_VERSION}`);
|
|
5724
|
-
}
|
|
5725
|
-
}
|
|
5726
|
+
if (dropFormsnapOverride(data)) {
|
|
5727
|
+
changed.push(
|
|
5728
|
+
"overrides formsnap \u2192 sveltekit-superforms dropped (formsnap 2.1 peers superforms 3)"
|
|
5729
|
+
);
|
|
5726
5730
|
}
|
|
5727
5731
|
if (changed.length > 0) {
|
|
5728
5732
|
writeJson(pkgPath, data, indent);
|