SEV-329: @switchev/web-shared package (formatters, markdown, waitForImage) #1

Merged
bastian merged 1 commits from sev-329/web-shared-package into main 2026-06-09 09:44:30 -04:00
Owner

Phase 3 foundation. Stands up the shared browser-helpers package so the three frontends stop copy-pasting these (and drifting — see SEV-310):

  • format.jsformatLabel / formatStatus / formatTimeline / formatBudget
  • markdown.jsrenderMarkdown (marked + strict DOMPurify; both peer deps)
  • wait-image.jswaitForImage (was byte-identical in public + vendor)

ESM source package (no build step — Vite consumers import the source directly). publishConfig targets the Gitea npm registry. node --test green (formatters).

Next steps (separate PRs): publish v0.1.0 to the Gitea npm registry, then migrate each site (public → vendor → admin) to consume @switchev/web-shared and delete the local copies — one site at a time so a registry/CI-auth issue can't break all three builds at once. SEV-330 (shared Tailwind/Vite/partials) and SEV-331 (vendor pane shell) follow.

🤖 Generated with Claude Code

Phase 3 foundation. Stands up the shared browser-helpers package so the three frontends stop copy-pasting these (and drifting — see SEV-310): - `format.js` — `formatLabel` / `formatStatus` / `formatTimeline` / `formatBudget` - `markdown.js` — `renderMarkdown` (marked + strict DOMPurify; both **peer deps**) - `wait-image.js` — `waitForImage` (was byte-identical in public + vendor) ESM source package (no build step — Vite consumers import the source directly). `publishConfig` targets the Gitea npm registry. `node --test` green (formatters). **Next steps (separate PRs):** publish `v0.1.0` to the Gitea npm registry, then migrate each site (public → vendor → admin) to consume `@switchev/web-shared` and delete the local copies — one site at a time so a registry/CI-auth issue can't break all three builds at once. SEV-330 (shared Tailwind/Vite/partials) and SEV-331 (vendor pane shell) follow. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bastian added 1 commit 2026-06-09 09:42:53 -04:00
Stands up the shared browser-helpers package (consumed by public/vendor/admin
via the Gitea npm registry) to de-duplicate copy-pasted frontend code:
- format.js: formatLabel/formatStatus/formatTimeline/formatBudget (single source
  of truth — these had drifted, see SEV-310).
- markdown.js: renderMarkdown (marked + strict DOMPurify; both peer deps).
- wait-image.js: waitForImage (was byte-identical in public + vendor).

ESM source package (no build step — Vite consumers import directly). publishConfig
points at the Gitea npm registry. node --test green (formatters).

Next: publish v0.1.0, then migrate each site to consume it and delete the copies.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bastian merged commit 50379c1868 into main 2026-06-09 09:44:30 -04:00
bastian deleted branch sev-329/web-shared-package 2026-06-09 09:44:30 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SwitchEV/shared#1