Files
shared/package.json
T
Bastian de Byl e405985c34 SEV-378: add tolerant formatDate/formatDateTime to shared (v0.3.0)
Our Go/Turso layer emits SQLite datetime('now') as "YYYY-MM-DD HH:MM:SS"
(UTC, no zone), which new Date() can't parse → "Invalid Date" in admin.
formatDate/formatDateTime normalize that shape (space→T + Z) and RFC3339,
returning '' for falsy/invalid. Tests cover both formats + empties.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 16:36:24 -04:00

33 lines
738 B
JSON

{
"name": "@switchev/web-shared",
"version": "0.3.0",
"description": "Shared browser helpers (formatters, markdown, image polling) for the SwitchEV frontends",
"type": "module",
"exports": {
".": "./src/index.js",
"./format": "./src/format.js",
"./markdown": "./src/markdown.js",
"./wait-image": "./src/wait-image.js"
},
"files": [
"src"
],
"sideEffects": [
"./src/markdown.js"
],
"peerDependencies": {
"dompurify": ">=3",
"marked": ">=12"
},
"scripts": {
"test": "node --test"
},
"publishConfig": {
"registry": "https://git.debyl.io/api/packages/SwitchEV/npm/"
},
"repository": {
"type": "git",
"url": "git+https://git.debyl.io/SwitchEV/shared.git"
}
}