vela 0.27.0 → 0.28.0

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 CHANGED
@@ -164,7 +164,7 @@ Generated files are yours to edit — no framework wrapping your app, no magic y
164
164
 
165
165
  ## Requirements
166
166
 
167
- Node 22.17+ and SvelteKit 3. That's it.
167
+ Node 22.22+ and SvelteKit 3. That's it.
168
168
 
169
169
  ## Docs
170
170
 
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.27.0",
23
+ version: "0.28.0",
24
24
  type: "module",
25
25
  description: "A CLI for creating and updating SvelteKit projects",
26
26
  license: "MIT",
@@ -30,7 +30,7 @@ var package_default = {
30
30
  },
31
31
  homepage: "https://velastack.dev",
32
32
  engines: {
33
- node: ">=22.17"
33
+ node: ">=22.22"
34
34
  },
35
35
  bin: {
36
36
  vela: "./dist/bin.js",
@@ -59,12 +59,14 @@ var package_default = {
59
59
  prepare: "npm run build",
60
60
  version: "npm run build",
61
61
  "lint:sh": "shellcheck -x -P SCRIPTDIR -S warning templates/server/*.sh",
62
- "test:scripts": "bash scripts/test-server-scripts.sh"
62
+ "test:scripts": "bash scripts/test-server-scripts.sh",
63
+ "sync-versions": "node --experimental-strip-types scripts/sync-versions.ts",
64
+ canary: "bash scripts/canary.sh"
63
65
  },
64
66
  dependencies: {
65
67
  "@clack/prompts": "^1.7.0",
66
68
  "@faker-js/faker": "^10.6.0",
67
- "@velastack/patterns": "^0.12.0",
69
+ "@velastack/patterns": "^0.13.0",
68
70
  "@velastack/pocketbase-codegen": "^0.1.0",
69
71
  "@velastack/schema": "^0.3.0",
70
72
  "@velastack/schema-ui": "^0.3.1",
@@ -2986,18 +2988,14 @@ ${lines.join("\n")}`);
2986
2988
  ${lines.join("\n")}`);
2987
2989
  }
2988
2990
  }
2989
- var EXACT_TEMPLATE_PINS = ["sveltekit-superforms", "sveltekit-flash-message"];
2991
+ var TEMPLATE_FLOORS = ["sveltekit-superforms", "sveltekit-flash-message"];
2990
2992
  function applyTemplatePins(merged, template, conflicts) {
2991
2993
  const lines = [];
2992
- for (const name of EXACT_TEMPLATE_PINS) {
2994
+ for (const name of TEMPLATE_FLOORS) {
2993
2995
  const wanted = template.devDependencies?.[name] ?? template.dependencies?.[name];
2994
2996
  if (!wanted) continue;
2995
- for (const kind of ["dependencies", "devDependencies"]) {
2996
- const current = merged[kind]?.[name];
2997
- if (current === void 0 || current === wanted) continue;
2998
- merged[kind][name] = wanted;
2999
- lines.push(`${name}: ${current} \u2192 ${wanted}`);
3000
- }
2997
+ const current = merged.devDependencies?.[name] ?? merged.dependencies?.[name];
2998
+ if (raiseFloor(merged, name, wanted)) lines.push(`${name}: ${current} \u2192 ${wanted}`);
3001
2999
  const index = conflicts.findIndex((c) => c.name === name);
3002
3000
  if (index !== -1) conflicts.splice(index, 1);
3003
3001
  }
@@ -4176,10 +4174,11 @@ import {
4176
4174
  SyntaxKind as SyntaxKind3
4177
4175
  } from "ts-morph";
4178
4176
  import { detect as detect3 } from "package-manager-detector";
4177
+ import { ADAPTER_NODE as ADAPTER_NODE_SPEC } from "@velastack/patterns";
4179
4178
  var ADAPTER_NODE = "@sveltejs/adapter-node";
4180
4179
  var ADAPTER_AUTO = "@sveltejs/adapter-auto";
4181
4180
  var ADAPTER_STATIC = "@sveltejs/adapter-static";
4182
- var ADAPTER_NODE_RANGE = "^6.0.0";
4181
+ var ADAPTER_NODE_RANGE = ADAPTER_NODE_SPEC.slice(ADAPTER_NODE_SPEC.lastIndexOf("@") + 1);
4183
4182
  var ADAPTER_SNIPPET = `import adapter from '${ADAPTER_NODE}';
4184
4183
 
4185
4184
  // ...
@@ -5461,7 +5460,7 @@ function rewriteVelaEnvDefaults(root) {
5461
5460
  }
5462
5461
 
5463
5462
  // src/lib/kit3-migrate.ts
5464
- var NODE_FLOOR = "22.17.0";
5463
+ var NODE_FLOOR = "22.22.0";
5465
5464
  var SV_TASKS = [
5466
5465
  "svelte-config",
5467
5466
  "environment",
@@ -5543,7 +5542,7 @@ async function runKit3Migration(root, options = {}) {
5543
5542
  readJson(path28.join(root, "package.json")).data,
5544
5543
  "@sveltejs/adapter-node"
5545
5544
  ) ? [
5546
- "Servers need Node 22.17 or later: run `vela provision` on each before the first SvelteKit 3 deploy."
5545
+ "Servers need Node 22.22 or later: run `vela provision` on each before the first SvelteKit 3 deploy."
5547
5546
  ] : [];
5548
5547
  writeFollowUps(root, followUps, genericFollowUps);
5549
5548
  const tasks = summarizeMigrationTasks(root);
@@ -5553,7 +5552,7 @@ async function preflight(root, options) {
5553
5552
  const node = minVersion(options.nodeVersion ?? process15.versions.node);
5554
5553
  if (!node || compareVersions(node, minVersion(NODE_FLOOR)) < 0) {
5555
5554
  throw new Kit3MigrationError(
5556
- `SvelteKit 3 needs Node ${NODE_FLOOR} or later; this is Node ${options.nodeVersion ?? process15.versions.node}.`
5555
+ `A vela project on SvelteKit 3 needs Node ${NODE_FLOOR} or later; this is Node ${options.nodeVersion ?? process15.versions.node}.`
5557
5556
  );
5558
5557
  }
5559
5558
  const pkgPath = path28.join(root, "package.json");
@@ -5902,6 +5901,11 @@ var FLOORS = [
5902
5901
  ["shadcn-svelte", "^1.7.0"],
5903
5902
  // 2.1 is the first formsnap whose superforms peer admits 3.x.
5904
5903
  splitSpec(FORMSNAP),
5904
+ // The form libraries' Kit 3 lines. Floors like the rest: a project on
5905
+ // superforms 2, or on one of the `3.0.0-next` prereleases vela pinned
5906
+ // exactly before the release, moves up; one already past the floor stays.
5907
+ ["sveltekit-superforms", SUPERFORMS_VERSION],
5908
+ splitSpec(FLASH),
5905
5909
  splitSpec(VELASTACK_KIT),
5906
5910
  splitSpec(VELASTACK_POCKETBASE),
5907
5911
  splitSpec(VELASTACK_CMS),
@@ -5910,11 +5914,7 @@ var FLOORS = [
5910
5914
  // 0.3 peers @velastack/pocketbase ^0.3, which the floor above moves past.
5911
5915
  ["@velastack/patterns", package_default.dependencies["@velastack/patterns"]]
5912
5916
  ];
5913
- var EXACT_PINS = [
5914
- ["sveltekit-superforms", SUPERFORMS_VERSION],
5915
- splitSpec(FLASH)
5916
- ];
5917
- var ENGINES_FLOOR = ">=22.17";
5917
+ var ENGINES_FLOOR = ">=22.22";
5918
5918
  function packageFixup(root, cliVersion) {
5919
5919
  const f = fixup("package.json");
5920
5920
  const pkgPath = path28.join(root, "package.json");
@@ -5924,14 +5924,6 @@ function packageFixup(root, cliVersion) {
5924
5924
  const before = depRange(data, name);
5925
5925
  if (raiseFloor(data, name, range)) changed.push(`${name} ${before} \u2192 ${range}`);
5926
5926
  }
5927
- for (const [name, version] of EXACT_PINS) {
5928
- for (const kind of ["dependencies", "devDependencies"]) {
5929
- const current = data[kind]?.[name];
5930
- if (current === void 0 || current === version || current.includes(":")) continue;
5931
- data[kind][name] = version;
5932
- changed.push(`${name} ${current} \u2192 ${version}`);
5933
- }
5934
- }
5935
5927
  const engines = data.engines ?? {};
5936
5928
  const nodeFloor = engines.node ? minVersion(engines.node) : null;
5937
5929
  if (!engines.node || nodeFloor && compareVersions(nodeFloor, minVersion(NODE_FLOOR)) < 0) {
@@ -5978,7 +5970,7 @@ function ssrExternalFixup(root) {
5978
5970
  return f;
5979
5971
  }
5980
5972
  function bumpedHere(name) {
5981
- return name === "vela" || name.startsWith("@sveltejs/") || name.startsWith("@velastack/") || name.startsWith("@types/") || FLOORS.some(([floor]) => floor === name) || EXACT_PINS.some(([pin]) => pin === name);
5973
+ return name === "vela" || name.startsWith("@sveltejs/") || name.startsWith("@velastack/") || name.startsWith("@types/") || FLOORS.some(([floor]) => floor === name);
5982
5974
  }
5983
5975
  async function peersFixup(root, lookup) {
5984
5976
  const f = fixup("SvelteKit 2 peers");
@@ -14545,7 +14537,7 @@ function isDirectory(target) {
14545
14537
  return false;
14546
14538
  }
14547
14539
  }
14548
- var SERVER_NODE_FLOOR = { major: 22, minor: 17 };
14540
+ var SERVER_NODE_FLOOR = { major: 22, minor: 22 };
14549
14541
  function nodeVersionAtLeast(version, major, minor) {
14550
14542
  const match = /^v?(\d+)\.(\d+)/.exec(version.trim());
14551
14543
  if (!match) return false;