#omgeving - Type-safe environment variables in Bun and Node
1 messages ยท Page 1 of 1 (latest)
npm fault
... no you have to publish things properly lmao
npm's doing its job perfectly
actually write things in your package.json
they say "add a README" i added a README.md and published a new version ๐คฃ i thought that'd work
actually i guess you don't need a repo?
https://docs.npmjs.com/about-package-readme-files
but i don't nkow why you wouldn't have a repo either way
lazy to make gh actions
i just pnpm publish
lol
i don't need gh actions?
? why would you
why even type pnpm publish
to publish?
just fuck off and dont' publish bc you won't have users anw lmao
if you're too lazy to press git commit on your keyboard
maybe you need to rethink your life
._.
what you're doing
i thought u were playful
packages are primarily discovered on github
now you're really saying i'm a piece of trash
if you just hav ethem on npm they take up a name, no one finds them, and it's a waste of space for everyone
im not saying your coding skills are trash or that your lib is useless
im saying no one will ever find your package lmao
Why tf did this convo go this toxic ๐ฟ
bro was too lazy to do the basics
a lot of people :(
but whats the point of publishing something if you don't plan to do like the basic fucking steps lmao
if you can't make a repo for it, which is like 90% of your publicity, then you're only wasting your time and npm's space
Why do you care this much? Everyone has to start somewhere
Dude, chill out
the person who made is-even:
also um
I don't think it's a good idea to publish minified code
lol
fixed it and added a repo: https://github.com/huseeiin/omgeving
please find any bugs ๐
export function number(options?: NumberOptions) {
return { name: "number", options } as Validator as unknown as number;
}
export function string(options?: StringOptions) {
return { name: "string", options } as Validator as unknown as string;
}
export function url(options?: URLOptions) {
return { name: "url", options } as Validator as unknown as string;
}
export function port(options?: NumberOptions) {
return { name: "port", options } as Validator as unknown as number;
}
``` the what
why the hell do you type assert this lol
then why do you assert it to number or string
so PORT in const { PORT } = cleanEnv({ PORT: port({ devDefault: 3000 }) }); becomes a number
i don't know a better way to do this
the number type is just being made from the return type of port or number
function error(msg: string) {
console.log(`omgeving: \x1b[31m${msg}`);
process.exit(1);
}
``` Can't you just
throw then lol
stacktrace looked too ugly for me
so i made this little function
bruh
envalid doesn't throw too, this lib is inspired by it
you think what throwing will also do? exit the process
i know
its just to remove the stacktrace
idk seems weird
also
why would you vaaildate your env variables
they don't come from a weird source
well
good that this one person has you blocked
because else they'd come and say something probably
Just like I can write this code in 5 minutes
i did kinda also write it in 5 minutes
it just took me long to make it more typesafe, work with node/bun and esm/cjs
๐
it even works with deno if you're using it from npm (npm specifier or with pnpm)
cjs
yeah I feel bad for the time you had to waste
I'd like to write smth and publish it but
1.lack of ideas
2.idk if I remember my npm account password and stuff lol
publish a react.js alternative!
No, I'm not making a svelte clone
is this guy making a meme lib?? that literally doesn't count ๐ญ
it apparently helps millions every day anw
yes
holy shit that's a fucking minefield
what the absolute fuck
troling
that makes less than 0 sense
imagine some random stupidass guy uses this in prod
reply ping moment
lol
BRO
this guy
omg i realize why he was saying he was too lazy
he was just that afraid of people looking at his source code
because it's a fucking joke
๐ญ
._.
i hate you
you're a piece of trash
you're legitimately demotivating me
i've had a few positive conversations with you before, but you fucked it up
you're an idiot
you lost someone who liked you, at least for some time
๐คทโโ๏ธ
IT'S A FUCKING PIECE OF CODE
i mean there are things you have to do if you want to help others, you aren't doing some of the basics and complaining about everything
you'd never say me to what you said to me on discord in real life.
you're only silly online
you know deep down, its a fucking piece of code
i know advanced javascript on back and front end. i'm just not a typescript magician and that's why you're angry.
i'm not saying you're a shitty coder overall, maybe you wrote some good code in the past, but as unknown as <type> is something you should almost never do in typescript
and a library should never exit on it's own
the control should be given to the one using it
those are just some basic principles you always follow when you write libraries
leave me alone