pnpm / turbo monorepo - how to structure shared dependencies
I'm fairly new to monorepos, even more to turbo
does anyone have advice on what's the least headache-prone way of structuring shared deps (e.g. one typescript version, one zod version) across a monorepo?
one way ig would be to to create a package, e.g. packages/zod, then use that packages whenever you need zod
the other way i found would be to use pnpm's catalog
but im not sure which is better caching, maintainability-wise
1 Reply
Have you checked out create-t3-turbo?
They have a validators folder in tooling/
Edit: you meant version, then yeah catalog inside pnpm-workspace.yaml file
Then whenever you do pnpm add zod in any app it'll reference catalog