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

Stop exporting Eris namespace from yuuko #57

Open
eritbh opened this issue Apr 6, 2021 · 3 comments
Open

Stop exporting Eris namespace from yuuko #57

eritbh opened this issue Apr 6, 2021 · 3 comments
Labels
changes: api modifies behavior of the public API quality removes something unnecessary or updates code style version: major semver-major, involves breaking change
Milestone

Comments

@eritbh
Copy link
Owner

eritbh commented Apr 6, 2021

Makes docs messy, re-exports make it unclear which package provides what, and one more require('eris')/import 'eris' isn't the end of the world for anyone

@eritbh eritbh added changes: api modifies behavior of the public API version: major semver-major, involves breaking change labels Apr 6, 2021
@eritbh eritbh added this to the future milestone Apr 6, 2021
@megahypercat
Copy link

I think it's A-ok to re-export

@eritbh
Copy link
Owner Author

eritbh commented Aug 17, 2021

I agree it's okay, but I don't actually know if it's that helpful, and it adds clutter to the Yuuko API docs. In order to use the re-export, you have to do e.g. const {Eris} = require('yuuko'); and then reference things as e.g. Eris.Collection, whereas if you add a second import for Eris directly you can just do const {Collection} = require('eris'); and use Collection directly.

Ultimately I think the cases for having to use Eris classes directly are pretty uncommon unless you're using Typescript, and TS folks should be more used to having more imports at the top of the file anyway.

All that said, it's gonna be a while before I do anything about this either way - this will have to be in Yuuko v3, which is a long way away still.

@eritbh eritbh added the quality removes something unnecessary or updates code style label Aug 22, 2021
@eritbh
Copy link
Owner Author

eritbh commented Aug 22, 2021

Should do a deprecation for this before v3

@eritbh eritbh modified the milestones: future, v2.4, v3 Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: api modifies behavior of the public API quality removes something unnecessary or updates code style version: major semver-major, involves breaking change
Projects
None yet
Development

No branches or pull requests

2 participants