work-hub-server/openspec/changes/archive/2026-06-04-swap-superstruct-valibot/tasks.md
Nicolas HOARAU 9190908062 docs: archive completed changes
Archive add-shared-schema-package and swap-superstruct-valibot changes to openspec/changes/archive/
2026-06-04 12:49:12 +04:00

1 KiB

1. Dependency swap

  • 1.1 Remove superstruct from packages/schema/package.json dependencies
  • 1.2 Add valibot to packages/schema/package.json dependencies

2. Create Valibot schemas

  • 2.1 Create packages/schema/src/valibot.ts with createInsertSchema and createUpdateSchema for projects and tasks
  • 2.2 Add picklist() refinements for enum fields (status, priority) using the constant arrays from drizzle/enums.ts
  • 2.3 Export insert and update schemas as named exports

3. Remove old modules

  • 3.1 Delete packages/schema/src/validation/ directory
  • 3.2 Delete packages/schema/src/types/ directory

4. Update barrel export

  • 4.1 Update packages/schema/src/index.ts to export Drizzle tables and Valibot schemas (remove old validation/types exports)

5. Verify

  • 5.1 Run pnpm --filter=@workspace/schema build to confirm compilation
  • 5.2 Run pnpm build from root to confirm full monorepo integrity
  • 5.3 Run pnpm --filter=api test to confirm no regressions