-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: move dev deps to root #312
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems legit! @XVincentX you have any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am generally pro for this, but not for all the dependencies.
For example, while I agree that having a centralised Jest and Typescript and TSLint configurations definitely makes sense (and we should do that, 👍) I really do not think we should put oclif
(which is a specific dev-dependency of the CLI) as a shared dependency.
My counter points:
- Really makes understanding what packages need way more difficult. Imagine one day we want to separate these packages — that will be a problem. Reverse engineer the specific dev dependency won't be fun.
- There's no real disk space benefit, since Yarn workspaces use a single
node_modules
directory anyway - I haven't verified, but I think TypeScript could start screaming about this organisation.
@marbemac Is this PR attempting to solve a specific issue?
Yeah, in a separate branch I noticed the Typescript version was behind, and thus updated it. However, I did not realize that some of the other packages also declare typescript as a dev dependency, so I started getting some weird errors in vscode. When I noticed that we're declaring dev deps in multiple packages, I figured I'd open a PR that consolidates them down to root.
We can indeed go with "sometimes put devDependencies in root workspace, sometimes declare them in their specific package (unless they're used by more than one package?)" message, but to me that is more complicated to explain than "devDependencies go in the root package.json file". All that said, I swear I'm not passionate about this one way or the other :). I just feel like a "dev deps go in root" is a simpler message for internal and external contributors. Will leave to you and @philsturgeon to decide what to do! |
Ok, I think we can move with this then; can we at least to add to our tslint configuration file this rule so that we do not require stuff that's not declared? Also, can you write no more than 1-2 rows in the Contributing file so that people know that? |
# Conflicts: # packages/core/package.json # yarn.lock
Open for discussion, but IMHO it makes sense to move the devDependencies to the root workspace rather than duplicating things like
typescript
and@types/lodash
across packages (and having to keep their versions in sync, etc).