create-volt 0.45.0 → 0.46.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/CHANGELOG.md CHANGED
@@ -4,6 +4,22 @@ All notable changes to `create-volt` are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/), and this project adheres to
5
5
  [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.46.0] - 2026-06-29
8
+
9
+ ### Added
10
+ - **`update` self-heals `server.js` startup-log encoding.** Older scaffolds had
11
+ byte-corrupted bolt/arrow/ellipsis/dash characters in their console logs;
12
+ `create-volt update` (and the config wizard Upgrade button, which runs it) now
13
+ surgically repairs them — rewriting the brand log lines to plain ASCII and
14
+ swapping the corrupted byte-runs — with no change to your logic.
15
+
16
+ ## [0.45.1] - 2026-06-29
17
+
18
+ ### Fixed
19
+ - **.env inline comments.** `KEY=value # note` now parses to `value` (trailing
20
+ comment stripped); quoted values stay literal. Previously the comment became
21
+ part of the value.
22
+
7
23
  ## [0.45.0] - 2026-06-29
8
24
 
9
25
  ### Added
@@ -593,6 +609,8 @@ All notable changes to `create-volt` are documented here. The format follows
593
609
  watching and full-page hot reload. Supports `--skip-install` and `--force`,
594
610
  and auto-detects npm / pnpm / yarn / bun for the install step.
595
611
 
612
+ [0.46.0]: https://github.com/MIR-2025/volt/releases/tag/v0.46.0
613
+ [0.45.1]: https://github.com/MIR-2025/volt/releases/tag/v0.45.1
596
614
  [0.45.0]: https://github.com/MIR-2025/volt/releases/tag/v0.45.0
597
615
  [0.44.0]: https://github.com/MIR-2025/volt/releases/tag/v0.44.0
598
616
  [0.43.0]: https://github.com/MIR-2025/volt/releases/tag/v0.43.0
package/index.js CHANGED
@@ -270,8 +270,35 @@ if (positionals[0] === "update") {
270
270
  }
271
271
  fs.mkdirSync(path.join(cwd, ".volt"), { recursive: true });
272
272
  fs.writeFileSync(path.join(cwd, ".volt", "version"), pkg.version + "\n");
273
+
274
+ // Self-heal: older scaffolds have byte-corrupted ⚡/→/…/— in server.js's startup
275
+ // logs (a tooling bug). Repair is SURGICAL — it only swaps the corrupted byte-runs
276
+ // and rewrites the brand console.log lines to plain ASCII; no logic is touched.
277
+ const srv = path.join(cwd, "server.js");
278
+ if (fs.existsSync(srv)) {
279
+ let code = fs.readFileSync(srv, "utf8");
280
+ const orig = code;
281
+ code = code.replace(/`[^`]*Volt[^`]*http:\/\/localhost/g, "`Volt at http://localhost");
282
+ code = code.replace(/`\\n[^`]*Volt setup[^`]*\$\{url\}/g, "`\\nVolt setup at ${url}");
283
+ code = code.replace(/`\\n[^`]*Volt Studio[^`]*\$\{url\}/g, "`\\nVolt Studio at ${url}");
284
+ const cc = (...a) => String.fromCharCode(...a);
285
+ const moji = [
286
+ [cc(195, 162, 194, 128, 194, 148), "—"], // em-dash
287
+ [cc(195, 162, 194, 134, 194, 144), "→"], // arrow
288
+ [cc(195, 162, 194, 134, 194, 146), "→"], // arrow
289
+ [cc(195, 162, 194, 128, 194, 166), "…"], // ellipsis
290
+ [cc(195, 131, 194, 160), "—"],
291
+ [cc(226, 128, 148), "—"], // single-encoded em-dash
292
+ ];
293
+ for (const [from, to] of moji) code = code.split(from).join(to);
294
+ if (code !== orig) {
295
+ fs.writeFileSync(srv, code);
296
+ done.push("server.js (repaired startup-log encoding)");
297
+ }
298
+ }
299
+
273
300
  console.log(`\n${green("✔")} Updated to create-volt ${pkg.version}: ${done.join(", ")}.`);
274
- console.log(dim(` Your server.js + content are untouched (re-scaffold to adopt entry-point changes). Restart the app.`));
301
+ console.log(dim(` server.js logic is untouched (re-scaffold to adopt entry-point changes). Restart the app.`));
275
302
  process.exit(0);
276
303
  }
277
304
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-volt",
3
- "version": "0.45.0",
3
+ "version": "0.46.0",
4
4
  "description": "Scaffold a new Volt app — no-build, signals-based UI with Socket.io hot reload.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -51,7 +51,10 @@ function readEnvFile() {
51
51
  if (!fs.existsSync(ENV_PATH)) return out;
52
52
  for (const line of fs.readFileSync(ENV_PATH, "utf8").split("\n")) {
53
53
  const m = line.match(/^\s*([A-Za-z0-9_]+)\s*=\s*(.*?)\s*$/);
54
- if (m) out[m[1]] = m[2];
54
+ if (m) {
55
+ const v = m[2];
56
+ out[m[1]] = (v.startsWith('"') && v.endsWith('"')) || (v.startsWith("'") && v.endsWith("'")) ? v.slice(1, -1) : v.replace(/(?:^|\s+)#.*$/, "");
57
+ }
55
58
  }
56
59
  return out;
57
60
  }
@@ -51,7 +51,10 @@ function readEnvFile() {
51
51
  if (!fs.existsSync(ENV_PATH)) return out;
52
52
  for (const line of fs.readFileSync(ENV_PATH, "utf8").split("\n")) {
53
53
  const m = line.match(/^\s*([A-Za-z0-9_]+)\s*=\s*(.*?)\s*$/);
54
- if (m) out[m[1]] = m[2];
54
+ if (m) {
55
+ const v = m[2];
56
+ out[m[1]] = (v.startsWith('"') && v.endsWith('"')) || (v.startsWith("'") && v.endsWith("'")) ? v.slice(1, -1) : v.replace(/(?:^|\s+)#.*$/, "");
57
+ }
55
58
  }
56
59
  return out;
57
60
  }
@@ -51,7 +51,10 @@ function readEnvFile() {
51
51
  if (!fs.existsSync(ENV_PATH)) return out;
52
52
  for (const line of fs.readFileSync(ENV_PATH, "utf8").split("\n")) {
53
53
  const m = line.match(/^\s*([A-Za-z0-9_]+)\s*=\s*(.*?)\s*$/);
54
- if (m) out[m[1]] = m[2];
54
+ if (m) {
55
+ const v = m[2];
56
+ out[m[1]] = (v.startsWith('"') && v.endsWith('"')) || (v.startsWith("'") && v.endsWith("'")) ? v.slice(1, -1) : v.replace(/(?:^|\s+)#.*$/, "");
57
+ }
55
58
  }
56
59
  return out;
57
60
  }
@@ -52,7 +52,10 @@ function readEnvFile() {
52
52
  if (!fs.existsSync(ENV_PATH)) return out;
53
53
  for (const line of fs.readFileSync(ENV_PATH, "utf8").split("\n")) {
54
54
  const m = line.match(/^\s*([A-Za-z0-9_]+)\s*=\s*(.*?)\s*$/);
55
- if (m) out[m[1]] = m[2];
55
+ if (m) {
56
+ const v = m[2];
57
+ out[m[1]] = (v.startsWith('"') && v.endsWith('"')) || (v.startsWith("'") && v.endsWith("'")) ? v.slice(1, -1) : v.replace(/(?:^|\s+)#.*$/, "");
58
+ }
56
59
  }
57
60
  return out;
58
61
  }