create-volt 0.45.1 → 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.
Files changed (3) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/index.js +28 -1
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ 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
+
7
16
  ## [0.45.1] - 2026-06-29
8
17
 
9
18
  ### Fixed
@@ -600,6 +609,7 @@ All notable changes to `create-volt` are documented here. The format follows
600
609
  watching and full-page hot reload. Supports `--skip-install` and `--force`,
601
610
  and auto-detects npm / pnpm / yarn / bun for the install step.
602
611
 
612
+ [0.46.0]: https://github.com/MIR-2025/volt/releases/tag/v0.46.0
603
613
  [0.45.1]: https://github.com/MIR-2025/volt/releases/tag/v0.45.1
604
614
  [0.45.0]: https://github.com/MIR-2025/volt/releases/tag/v0.45.0
605
615
  [0.44.0]: https://github.com/MIR-2025/volt/releases/tag/v0.44.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.1",
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": {