fuzzyworld

when-am-i / commit

chore: finish repo rename what-year-is-it → when-am-i

6b2790fab4b3c06c294b9fe7d222e717795d9ba3 · Pavel Safronov · 2026-06-20 09:24:17 -0700 · parents 8961f70b6224

chore: finish repo rename what-year-is-it → when-am-i

Update the package name, Vite/dev-server base path, GitLab project +
Pages URLs, REPO_URL, Service Desk email, console-error tags, mailto
subject, and README links to the renamed "when-am-i" project. Matches
the already-renamed origin remote.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
 README.md                        | 8 ++++----
 package.json                     | 2 +-
 scripts/gen-badges.mts           | 4 ++--
 scripts/lib/server.mts           | 2 +-
 src/components/ErrorBoundary.tsx | 2 +-
 src/utils/report.ts              | 8 ++++----
 vite.config.ts                   | 2 +-
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/README.md b/README.md
index 303b1a3..1834ac2 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-# 🚀 [Live site](https://pavelsafronov.gitlab.io/what-year-is-it)
+# 🚀 [Live site](https://pavelsafronov.gitlab.io/when-am-i)
 
 <!-- badges:start -->
 <!-- generated by `npm run gen:badges` — do not edit by hand -->
-[![pipeline status](https://gitlab.com/PavelSafronov/what-year-is-it/badges/main/pipeline.svg)](https://gitlab.com/PavelSafronov/what-year-is-it/-/pipelines)
-[![live demo](https://img.shields.io/badge/demo-live-success)](https://pavelsafronov.gitlab.io/what-year-is-it)
+[![pipeline status](https://gitlab.com/PavelSafronov/when-am-i/badges/main/pipeline.svg)](https://gitlab.com/PavelSafronov/when-am-i/-/pipelines)
+[![live demo](https://img.shields.io/badge/demo-live-success)](https://pavelsafronov.gitlab.io/when-am-i)
 ![version](https://img.shields.io/badge/version-v0.1.0-blue)
 ![calendar data](https://img.shields.io/badge/calendar%20data-2-orange)
 ![license](https://img.shields.io/badge/license-MIT-green)
@@ -90,7 +90,7 @@ in each era, capturing the answer panel and shaded map per era.
 
 ## Reporting issues
 
-The app footer links to the [source repository](https://gitlab.com/PavelSafronov/what-year-is-it)
+The app footer links to the [source repository](https://gitlab.com/PavelSafronov/when-am-i)
 and a **Report an issue** link. The latter opens a pre-addressed email to the
 project's GitLab Service Desk (no GitLab account needed) prefilled with context
 — build version/commit, browser, URL, and the current selection. If the app
diff --git a/package.json b/package.json
index 72bfccb..88dbc7a 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
-    "name": "what-year-is-it",
+    "name": "when-am-i",
     "version": "0.1.0",
     "private": true,
     "type": "module",
diff --git a/scripts/gen-badges.mts b/scripts/gen-badges.mts
index 49dfe87..0fa1343 100644
--- a/scripts/gen-badges.mts
+++ b/scripts/gen-badges.mts
@@ -16,8 +16,8 @@ import { fileURLToPath } from 'node:url';
 const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
 const README = path.join(REPO_ROOT, 'README.md');
 
-const GITLAB_PROJECT = 'PavelSafronov/what-year-is-it';
-const PAGES_URL = 'https://pavelsafronov.gitlab.io/what-year-is-it';
+const GITLAB_PROJECT = 'PavelSafronov/when-am-i';
+const PAGES_URL = 'https://pavelsafronov.gitlab.io/when-am-i';
 const START = '<!-- badges:start -->';
 const END = '<!-- badges:end -->';
 const PREAMBLE = '<!-- generated by `npm run gen:badges` — do not edit by hand -->';
diff --git a/scripts/lib/server.mts b/scripts/lib/server.mts
index 2d8af7d..0c5ddef 100644
--- a/scripts/lib/server.mts
+++ b/scripts/lib/server.mts
@@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url';
 
 const __dirname = path.dirname(fileURLToPath(import.meta.url));
 export const REPO_ROOT = path.resolve(__dirname, '../..');
-export const BASE_URL = 'http://127.0.0.1:5173/what-year-is-it/';
+export const BASE_URL = 'http://127.0.0.1:5173/when-am-i/';
 
 function isUp(url: string): Promise<boolean> {
     return new Promise((resolve) => {
diff --git a/src/components/ErrorBoundary.tsx b/src/components/ErrorBoundary.tsx
index e33a0da..8daa956 100644
--- a/src/components/ErrorBoundary.tsx
+++ b/src/components/ErrorBoundary.tsx
@@ -20,7 +20,7 @@ class ErrorBoundary extends React.Component<Props, State> {
     }
 
     componentDidCatch(error: Error, info: React.ErrorInfo): void {
-        console.error('[what-year-is-it] render error:', error, info);
+        console.error('[when-am-i] render error:', error, info);
     }
 
     render(): React.ReactNode {
diff --git a/src/utils/report.ts b/src/utils/report.ts
index 201d17a..e196dbc 100644
--- a/src/utils/report.ts
+++ b/src/utils/report.ts
@@ -6,7 +6,7 @@
 // for crashes — the error message + a trimmed stack). Kept short because some
 // mail clients truncate long mailto bodies.
 
-export const REPO_URL = 'https://gitlab.com/PavelSafronov/what-year-is-it';
+export const REPO_URL = 'https://gitlab.com/PavelSafronov/when-am-i';
 
 /** Link to a repo-relative file on the default branch (for data-source links). */
 export function repoFileUrl(path: string): string {
@@ -14,7 +14,7 @@ export function repoFileUrl(path: string): string {
 }
 
 export const SERVICE_DESK_EMAIL =
-    'contact-project+pavelsafronov-what-year-is-it-80432471-issue-@incoming.gitlab.com';
+    'contact-project+pavelsafronov-when-am-i-80432471-issue-@incoming.gitlab.com';
 
 const MAX_BODY = 1800;
 const MAX_STACK = 1000;
@@ -48,7 +48,7 @@ export function subscribeReportErrors(listener: ErrorListener): () => void {
 
 /** Record a runtime error and notify subscribers (e.g. to show a banner). */
 export function reportRuntimeError(error: unknown): void {
-    console.error('[what-year-is-it] captured error:', error);
+    console.error('[when-am-i] captured error:', error);
     listeners.forEach((listener) => listener(error));
 }
 
@@ -117,7 +117,7 @@ export function buildReportBody(error?: unknown, ctx: ReportContext = context):
 
 /** A `mailto:` href to the service desk, prefilled with context. */
 export function reportMailtoHref(error?: unknown, ctx: ReportContext = context): string {
-    const subject = `[what-year-is-it] ${error ? 'Error report' : 'Issue report'}`;
+    const subject = `[when-am-i] ${error ? 'Error report' : 'Issue report'}`;
     const body = buildReportBody(error, ctx);
     return `mailto:${SERVICE_DESK_EMAIL}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
 }
diff --git a/vite.config.ts b/vite.config.ts
index d6f250a..0174122 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -18,7 +18,7 @@ const gitCommit = (() => {
 })();
 
 export default defineConfig({
-    base: '/what-year-is-it/',
+    base: '/when-am-i/',
     plugins: [react()],
     define: {
         __APP_VERSION__: JSON.stringify(pkg.version),