catalog: schema v2 — price, brand, part number, category, weight, availability #34

Closed
opened 2026-08-24 08:27:40 +00:00 by yuris · 0 comments
Owner

Bump packages/catalog to schemaVersion: 2 as a clean cutover with no v1 compatibility branch — producer and consumer both live in this monorepo. Add brand, partNumber, category, price (IDR int, nullable = belum ditentukan), weightGrams, inStock, shippable, and installService to both PublicCatalogItemSchema and StrictItemSchema, keeping the strict variant's .strict(), regex/trim rules, and its Unsupported catalog schema version message. parseCatalog keeps its duplicate-slug superRefine and slug sort. inStock is a boolean, never a count.

Acceptance: pnpm --filter @garage/catalog test passes, including new cases rejecting a v1 payload, price: -1, price: 1.5, weightGrams: 0, and category: "". The other two packages are expected to fail typecheck until Wave 2.

Bump `packages/catalog` to `schemaVersion: 2` as a clean cutover with no v1 compatibility branch — producer and consumer both live in this monorepo. Add `brand`, `partNumber`, `category`, `price` (IDR int, nullable = belum ditentukan), `weightGrams`, `inStock`, `shippable`, and `installService` to both `PublicCatalogItemSchema` and `StrictItemSchema`, keeping the strict variant's `.strict()`, regex/trim rules, and its `Unsupported catalog schema version` message. `parseCatalog` keeps its duplicate-slug `superRefine` and slug sort. `inStock` is a boolean, never a count. Acceptance: `pnpm --filter @garage/catalog test` passes, including new cases rejecting a v1 payload, `price: -1`, `price: 1.5`, `weightGrams: 0`, and `category: ""`. The other two packages are expected to fail typecheck until Wave 2.
yuris closed this issue 2026-08-24 08:39:06 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/garage#34
No description provided.