#ow, my validation...

60 messages · Page 1 of 1 (latest)

brisk ether

I don't think anything concrete was discussed per say?

near palm

what are ur ideas about my pr with joi?

I think ow has to be replaced regardless but maybe you have some other lib in mind

brisk ether

I am not gonna say "use this over x bc I said so" or deny your PR because I usually stick with ow. I haven't had much time to see other options or stick with joi sweats
If the libs small in size, doesn't bring in dependencies, and whatnot, then it's probs good, but I'd need the thoughts of the other maintainers before saying anything concrete

near palm

ow has 7 dependencies (incl. sub deps), joi has 5

not sure about size

vital yoke

zod, the other dependency there, is not dependent on anything

near palm

yep that's also true but no one really has done any work to support it

vital yoke

What do you mean?

near palm

it takes time to replace ow; took me about 2 hours to get tests passing

someone has to do that work

vital yoke

Well that's not relevant, the right package should be

It seems ow is the least in size, followed by zod then joi, but zod and joi are very close together being 513 kB and 516 kB (unpacked)

near palm

I doubt size matters with ow since it just doesn't work at all with esm

a bunch of people have had issues with it

brisk ether

well now it only works with esm so we're either way in a predicament

near palm

oh that pr got merged?

brisk ether
brisk ether

I respect Sindres push for esm adoption but jfc

near palm

huh, I was expecting that pr to sit for a few months lol

vital yoke
near palm

I think my pr can get merged and its hopefully semver minor and then another package can replace it after?

vital yoke

Sure, I guess, up to Vlad

near palm

I agree that zod is a good choice but joi is better for a quick patch

all tests passed without changes so it should be a minor change

unless people do stuff with the errors i guess

i've had to move away from builders in my own bot because even importing the text modifiers (bold, for example) would throw errors

actually on windows i could import them but on ubuntu it would throw errors

brisk ether

That makes no sense...same node versions and package versions?

near palm

it definitely doesn't 😦 and I doubt I could replicate the issue again

brisk ether
stiff horizon

I'm willing to do a Zod rewrite tonight or tomorrow if the main reason joi is gonna be used is cuz the pr already exists

there's not really a reason for joi to be merged only to be rewritten with another package in the near future

near palm

does zod have a way to whitelist certain values? looking at the docs i can't find anything

stiff horizon

wdym whitelist? Like the equivalent of oneOf in ow?

near palm

yeah, exactly

stiff horizon

yeah enums

near palm

that is very unintuitive i gotta say, but it works

stiff horizon

should just be z.enum([1, 2]).parse(value)

near palm

doesn't work with ts - it's expecting a string

stiff horizon

oh u gotta use nativeEnum for numbers

near palm

wow this api is horrible and nativeEnum doesn't work either

i'll leave it to you i guess

stiff horizon

I'll test it when I get access to a computer again

tidal star
brisk ether
stiff horizon
brisk ether

eyess

hexed thorn

@stiff horizon do u want to like pr this

stiff horizon
hexed thorn

we do not want to move forward with joi

hence me asking

stiff horizon

alr its up

tidal star

Would it be okay for me to PR superstruct?

tidal star

@brisk ether

brisk ether

We already have Zod iirc

stiff horizon

Yeah zod got merged

topaz burrow

I guess we can archive this thread