drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
23.51k stars 576 forks source link

Upgrade valibot to 0.31.0 #2477

Closed emmanuelchucks closed 3 months ago

emmanuelchucks commented 3 months ago

Valibot 0.31.0 introduced some breaking changes like the new pipe operator among other things.

// With the previous API
const BirthdaySchema = v.brand(
  v.transform(v.string([v.isoDate()]), (input) => new Date(input)),
  'birthday'
);

// With the brand new API
const BirthdaySchema = v.pipe(
  v.string(),
  v.isoDate(),
  v.transform((input) => new Date(input)),
  v.brand('birthday')
);

So far tests are passing but types are broken. Any help will be appreciated.

emmanuelchucks commented 3 months ago

Closing this in favor of #2481