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

Reconsider package breakdown #683

Open
sarahdayan opened this issue Nov 29, 2022 · 4 comments
Open

Reconsider package breakdown #683

sarahdayan opened this issue Nov 29, 2022 · 4 comments

Comments

@sarahdayan
Copy link
Collaborator

The current v2 alpha is broken down between multiple packages:

Not all packages may be relevant:

  • Most users only need dinero.js and @dinero.js/currencies
  • @dinero.js/core isn't tested to avoid duplicates with dinero.js
  • @dinero.js/calculator-number is used by default in dinero.js and hasn't much use elsewhere

Multi-packages make sense when there are strong reasons why you might not need them all (e.g., when implementing a library in multiple JavaScript flavors, when providing fully optional plugins, etc.) and in case of large bundle size impact.

Right now, there might be more packages than necessary, which hurts developer experience (e.g., it's easy to have mismatched versions) for no gain.

Let's reconsider how the packages are broken down before going beta.

@johnhooks
Copy link
Contributor

I support combining the calculators and core into dinero.js.

@johnhooks
Copy link
Contributor

johnhooks commented Nov 29, 2022

I would recommend using tsconfig paths to reduce the need for relative paths.

@sarahdayan
Copy link
Collaborator Author

I'm going to write a proper RFC for this issue. This goes beyond just splitting the codebase into packages, we can go as far as detailing UMD endpoints.

I'll post a link here once it's up.

@sarahdayan
Copy link
Collaborator Author

It took me a while, but the RFC is up!

Please read and comment so we can iron out the kinks and move forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants