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

Consider removing re-exports #19

Closed
nickserv opened this issue Mar 11, 2018 · 0 comments
Closed

Consider removing re-exports #19

nickserv opened this issue Mar 11, 2018 · 0 comments
Assignees
Labels
discussion wontfix This will not be worked on

Comments

@nickserv
Copy link
Collaborator

nickserv commented Mar 11, 2018

This package currently imports and re-exports selectorator without using it internally, while also exporting parts of the redux and immer packages that are used internally. In my opinion maintenance for both this package itself and dependent apps/packages would be easier if we removed our re-exports. This would include removing the dependency on selectorator, though in my opinion it's a very useful package and we should still recommend it in the same way in our readme.

Advantages

  • Less maintenance work involved in updating dependencies, and more freedom for dependent packages to update dependencies without waiting for us to update them or installing newer upstream versions. For example: Update selectorator to support the new argIndex syntax #16
  • Less package bloat for users that don't want the packages we recommend. For example if someone uses their own memoization library that isn't compatible with reselectorator, they won't have to set up tree shaking to remove the extra dependency if we make it optional.
  • Explicit understanding of where dependencies come from. Users would be aware of the packages they're using directly, but not implementation details of this package such as redux-thunk.
  • Closer to the intention of package.json files only including dependencies that are required internally (ignoring optionalDependences and peerDependencies which I don't think would be useful in this case).
  • Dependencies of dependencies don't satisfy the peer dependencies of other dependencies of a package. For example, if we kept our current behavior and someone installed a new package that peer depends on selectorator, they may have to install selectorator manually just to satisfy the peer dependency. This could cause confusion.

Disadvantages

  • Slightly more installation work. This could be remedied by simply adding other packages to the install script in our readme, for example npm install @acemarke/redux-starter-kit selectorator. This is a common practice in documentation for popular npm packages.
@nickserv nickserv added question Further information is requested discussion and removed question Further information is requested labels Mar 21, 2018
@nickserv nickserv self-assigned this Mar 21, 2018
@nickserv nickserv added the wontfix This will not be worked on label Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant