create-volt 0.33.0 → 0.34.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,14 @@ 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.34.0] - 2026-06-29
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- **Timezone detection.** The setup wizard detects the admin's timezone from
|
|
11
|
+
their browser (`Intl`) and writes `SITE_TZ` to `.env`. The `posts` add-on then
|
|
12
|
+
renders full timestamps in `SITE_TZ` rather than the server's zone (usually UTC
|
|
13
|
+
on a host); date-only values render as that calendar day either way.
|
|
14
|
+
|
|
7
15
|
## [0.33.0] - 2026-06-29
|
|
8
16
|
|
|
9
17
|
### Added
|
|
@@ -446,6 +454,7 @@ All notable changes to `create-volt` are documented here. The format follows
|
|
|
446
454
|
watching and full-page hot reload. Supports `--skip-install` and `--force`,
|
|
447
455
|
and auto-detects npm / pnpm / yarn / bun for the install step.
|
|
448
456
|
|
|
457
|
+
[0.34.0]: https://github.com/MIR-2025/volt/releases/tag/v0.34.0
|
|
449
458
|
[0.33.0]: https://github.com/MIR-2025/volt/releases/tag/v0.33.0
|
|
450
459
|
[0.32.0]: https://github.com/MIR-2025/volt/releases/tag/v0.32.0
|
|
451
460
|
[0.31.0]: https://github.com/MIR-2025/volt/releases/tag/v0.31.0
|
|
@@ -17,11 +17,15 @@ const tagsOf = (meta) => String(meta.tags || "").split(",").map((s) => s.trim())
|
|
|
17
17
|
|
|
18
18
|
function fmtDate(d) {
|
|
19
19
|
if (!d) return "";
|
|
20
|
-
|
|
21
|
-
//
|
|
20
|
+
const opts = { year: "numeric", month: "long", day: "numeric" };
|
|
21
|
+
// A date-only value (YYYY-MM-DD) is a calendar day with no timezone — parse it
|
|
22
|
+
// as local midnight and render that day (new Date("2026-06-28") would be UTC →
|
|
23
|
+
// off by a day in negative-offset zones). A full timestamp is rendered in the
|
|
24
|
+
// admin's timezone (SITE_TZ, detected by the setup wizard), not the server's.
|
|
22
25
|
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(String(d).trim());
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
if (m) return new Date(+m[1], +m[2] - 1, +m[3]).toLocaleDateString("en-US", opts);
|
|
27
|
+
const t = new Date(d);
|
|
28
|
+
return isNaN(t.getTime()) ? esc(d) : t.toLocaleDateString("en-US", process.env.SITE_TZ ? { ...opts, timeZone: process.env.SITE_TZ } : opts);
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
function excerpt(p) {
|
package/package.json
CHANGED
|
@@ -25,6 +25,9 @@ const state = signal({
|
|
|
25
25
|
s3Secret: current.S3_SECRET || "",
|
|
26
26
|
s3PublicBase: current.S3_PUBLIC_BASE || "",
|
|
27
27
|
port: current.PORT || String(defaultPort),
|
|
28
|
+
// detect the admin's timezone from their browser (the wizard runs here), so
|
|
29
|
+
// dates render in their zone — not the server's (usually UTC on a host).
|
|
30
|
+
tz: current.SITE_TZ || Intl.DateTimeFormat().resolvedOptions().timeZone || "",
|
|
28
31
|
});
|
|
29
32
|
const set = (patch) => state({ ...state(), ...patch });
|
|
30
33
|
const toggle = (n) => state({ ...state(), addons: { ...state().addons, [n]: !state().addons[n] } });
|
|
@@ -46,6 +49,7 @@ const clean = (v) => String(v).replace(/[\r\n]/g, "").trim(); // one value per l
|
|
|
46
49
|
function genEnv(s) {
|
|
47
50
|
const eff = effective(s);
|
|
48
51
|
const out = [`VOLT_ADDONS=${eff.join(",")}`, `PORT=${clean(s.port)}`];
|
|
52
|
+
if (s.tz) out.push(`SITE_TZ=${clean(s.tz)}`); // admin's timezone, for date display
|
|
49
53
|
if (eff.includes("db")) {
|
|
50
54
|
out.push(`DB_DRIVER=${clean(s.dbDriver)}`);
|
|
51
55
|
if (s.dbDriver === "mongodb") {
|
|
@@ -25,6 +25,9 @@ const state = signal({
|
|
|
25
25
|
s3Secret: current.S3_SECRET || "",
|
|
26
26
|
s3PublicBase: current.S3_PUBLIC_BASE || "",
|
|
27
27
|
port: current.PORT || String(defaultPort),
|
|
28
|
+
// detect the admin's timezone from their browser (the wizard runs here), so
|
|
29
|
+
// dates render in their zone — not the server's (usually UTC on a host).
|
|
30
|
+
tz: current.SITE_TZ || Intl.DateTimeFormat().resolvedOptions().timeZone || "",
|
|
28
31
|
});
|
|
29
32
|
const set = (patch) => state({ ...state(), ...patch });
|
|
30
33
|
const toggle = (n) => state({ ...state(), addons: { ...state().addons, [n]: !state().addons[n] } });
|
|
@@ -46,6 +49,7 @@ const clean = (v) => String(v).replace(/[\r\n]/g, "").trim(); // one value per l
|
|
|
46
49
|
function genEnv(s) {
|
|
47
50
|
const eff = effective(s);
|
|
48
51
|
const out = [`VOLT_ADDONS=${eff.join(",")}`, `PORT=${clean(s.port)}`];
|
|
52
|
+
if (s.tz) out.push(`SITE_TZ=${clean(s.tz)}`); // admin's timezone, for date display
|
|
49
53
|
if (eff.includes("db")) {
|
|
50
54
|
out.push(`DB_DRIVER=${clean(s.dbDriver)}`);
|
|
51
55
|
if (s.dbDriver === "mongodb") {
|