Skip to content
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

Merged
merged 5 commits into from
May 23, 2019
Merged

chore: move dev deps to root #312

merged 5 commits into from
May 23, 2019

Conversation

marbemac
Copy link
Contributor

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).

@marbemac marbemac requested a review from XVincentX May 21, 2019 03:07
philsturgeon
philsturgeon previously approved these changes May 21, 2019
Copy link
Contributor

@philsturgeon philsturgeon left a 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?

Copy link
Contributor

@XVincentX XVincentX left a 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:

  1. 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.
  2. There's no real disk space benefit, since Yarn workspaces use a single node_modules directory anyway
  3. I haven't verified, but I think TypeScript could start screaming about this organisation.

@marbemac Is this PR attempting to solve a specific issue?

@marbemac
Copy link
Contributor Author

@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.

My counter points:

  1. 🤷‍♂ do you reeeeally think it's a possibility that we break this repo apart in the next year? I understand this hypothetical, but it doesn't seem like a realistic one imho.
  2. Correct, was never about disk space.
  3. Works fine for me.

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!

@XVincentX
Copy link
Contributor

XVincentX commented May 21, 2019

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?

marbemac added 2 commits May 23, 2019 17:14
# Conflicts:
#	packages/core/package.json
#	yarn.lock
@marbemac marbemac requested a review from XVincentX May 23, 2019 21:26
@XVincentX XVincentX merged commit a9bbc36 into master May 23, 2019
@XVincentX XVincentX deleted the chore/dev-deps branch May 23, 2019 22:24
@XVincentX XVincentX added this to the Prism v3 Release milestone May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants