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

🤔Discussion: Core Utility Packages as peerDependencies #151

Closed
cKellyDesign opened this issue Mar 21, 2020 · 6 comments
Closed

🤔Discussion: Core Utility Packages as peerDependencies #151

cKellyDesign opened this issue Mar 21, 2020 · 6 comments
Labels
question Further information is requested

Comments

@cKellyDesign
Copy link
Contributor

Is this a new feature or an enhancement?
Enhancement / Optimization

Is your feature request related to a problem? Please describe.
Should @onaio/utils and @onaio/react-utils be peerDepencies of our other packages?

Describe the solution you'd like
Would this make is so things like Dictionary and percentage are referencing a single declaration globally throughout a project (which uses our js-tool'ing)?

@cKellyDesign cKellyDesign added the question Further information is requested label Mar 21, 2020
@moshthepitt
Copy link
Contributor

Why peer dependencies?

@cKellyDesign
Copy link
Contributor Author

Why peer dependencies?

@moshthepitt so that installing the package also installs the utils:

👍 yarn add @onaio/session-reducer

without requiring the user to install the utils:

👎 yarn add @onaio/utils @onaio/session-reducer 

@moshthepitt
Copy link
Contributor

@cKellyDesign I think that we should only do this for packages that actually use @onaio/utils. I think something like gatekeeper does indeed need Dictionary from @onaio/utils but something like @onaio/session-reducer does not need any extra dependency, and we shouldn't force someone to install @onaio/utils when they just need/want @onaio/session-reducer (for example).

It seems the only benefit is some convenience for us? I'm not sure it is work it though.

@cKellyDesign
Copy link
Contributor Author

Definitely only want to install them in packages which would use them.

It seems the only benefit is some convenience for us? I'm not sure it is work it though.

If it's not worth the effort then we don't need to pursue :)

@moshthepitt
Copy link
Contributor

Definitely only want to install them in packages which would use them.

There is an issue for this #142

@cKellyDesign
Copy link
Contributor Author

Cool, I'm going to close this. one then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants