-
-
Notifications
You must be signed in to change notification settings - Fork 359
chore: switch to npm workspaces #869
chore: switch to npm workspaces #869
Conversation
CodeSee Review Map:Review in an interactive map View more CodeSee Maps Legend |
7df2d04
to
dec565d
Compare
@gikf @Ravichandra-C does this all make sense? You'll be the most directly impacted in the immediate future, so if some of this seems silly let me know! |
@ojeytonwilliams I couldn't say, I'm not too familiar with how this should be configured. |
Not to worry, @gikf Not much should change, honestly. The only real quirk I ran into is that prisma doesn't automatically Anyways, it's not urgent, so I'll give Ravi a chance to see it before I merge. |
@ojeytonwilliams , I'm also not very familiar with this. |
Okay, the idea goes like this. Rather than having three packages, (root, client and server) all with independent package-locks, we treat the client and server as workspaces and have a single package-lock that governs all three. This dramatically cuts down on package duplication and, because npm understands workspaces, we no longer need to handle their installation. i.e. we don't need to use In practical terms, you have to use |
@ojeytonwilliams does this npm workspaces change anything about our dependencies or minimum versions of node or npm? Is all that changes is some of the npm i commands? |
No, they're unchanged. Workspaces need npm 7, but we've required 8 for a while now.
Pretty much. Anything you'd have previously done via |
It sounds to me like we can update the docs and go with workspaces if it's not going to confuse or bother the casual contributor. |
We don't need a custom install script, we can just use npm workspaces and benefit from de-duplication and faster installation
Since a new contributor might not realise that the TypeScript has to be compiled for db:reset to work.
dec565d
to
219b1b9
Compare
@allella I think so. I've add a little to the docs in this PR, but I'm going to merge as soon as the CI passes. Just because otherwise renovate might merge something and rebasing is a nuisance. |
Update README.md
).main
branch of Chapter.This isn't a huge deal, since we only have three packages, but workspaces are quite nice. They cut down on duplication and, as a result, speed up installation. Plus, we don't need our own code for installing all the packages.