rittaschool / ritta

Modular open source learning/student management system built with TypeScript and NestJS.
https://ritta.fi
Other
46 stars 5 forks source link

Migrate to vlid.js #85

Closed raikasdev closed 2 years ago

raikasdev commented 2 years ago

I recommend switching to vlid.js for optimizing purposes. It is a similar library, but 10x smaller and better for as an example the frontend where the 140kb of joi would be packed into our JS file, thy making loading times longer.

kymppi commented 2 years ago

Okay, you just have to change validation.pipe.ts in src/validation for every service.

kymppi commented 2 years ago

And also you have to change the validation schemes in the shared package.

kymppi commented 2 years ago

Also when i read the description again, i got confused you talking about frontend and packed JS files?. This is the server, right repo?

raikasdev commented 2 years ago

Also when i read the description again, i got confused you talking about frontend and packed JS files?. This is the server, right repo?

Yes, but as it is also included in the shared it will also be in the frontend, and thy will be in the webpacked JS files. I put it here as this is the "main" repo, and joi is also present here bit more complicatedly and needs more work.

kymppi commented 2 years ago

Ah i see, i never thought this was the main repo.

raikasdev commented 2 years ago

vlid.js seems abandoned, closing.