yuuko icon indicating copy to clipboard operation
yuuko copied to clipboard

Stop exporting Eris namespace from yuuko

Open eritbh opened this issue 4 years ago • 3 comments

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 avatar Apr 06 '21 03:04 eritbh

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

megahypercat avatar Aug 17 '21 20:08 megahypercat

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 avatar Aug 17 '21 22:08 eritbh

Should do a deprecation for this before v3

eritbh avatar Aug 22 '21 02:08 eritbh