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

smaller alternative to RxJS? #913

Closed
mheiber opened this issue Apr 21, 2020 · 7 comments
Closed

smaller alternative to RxJS? #913

mheiber opened this issue Apr 21, 2020 · 7 comments

Comments

@mheiber
Copy link

mheiber commented Apr 21, 2020

Thanks for your library!

I noticed that 27% of the package size is RxJS:

package size from link above

We're trying to keep package sizes small to reduce download times for users.

@react-native-community/rxjs seems seems to be 1/10th the size. A more drastic change would be using something like xstream.

@lydell
Copy link

lydell commented May 24, 2020

This would be great. ESLint is around 36 MB on my machine – almost half of that is rxjs (via inquirer).

Edit: Just found ESLint is getting rid of inquirer.js because of this: eslint/eslint#13254

@XhmikosR
Copy link

Agreed on this. I've yet to find a replacement but I think it's totally worth dropping it eventually.

@SBoudrias
Copy link
Owner

FWIW, the repo contains beta versions of a fully reimplemented version of Inquirer without rxjs (see #692)

It's not complete, but most prompts are functional and deployed to npm already. There's just not any top-level Inquirer.js release offering the question list API (it goes like await checkbox({ ... }))

You might be interested in trying the beta versions, or helping out 🙏 with refactoring missing prompts.

@XhmikosR
Copy link

Nice to hear that!

Can you share a little more info like a PR/branch/tag where the rxjs removal is implemented? I can't find it anywhere.

I haven't used rxjs myself, but the number of files it ships is insane :/ And imagine on a big project where the package manager cannot deduplicate rxjs, the effect is even bigger.

@SBoudrias
Copy link
Owner

SBoudrias commented Jan 24, 2022

Of course, this is on the master branch, but in different section of the monorepo. Inside the packages/** root, every folder except inquirer are new prompts implemented without the rxjs dependency.

They're not all documented yet, but they all work in similar fashion to https://github.com/SBoudrias/Inquirer.js/tree/master/packages/confirm

@XhmikosR
Copy link

Ah, I was looking at this:

Very promising, looking forward to the removal of rxjs!

@SBoudrias
Copy link
Owner

SBoudrias commented Jun 3, 2023

The new Inquirer is now out and stable (and can boast of having MUCH smaller size). So I'll close this ticket as I don't intend to modify the old one aside from basic maintenance.

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

No branches or pull requests

4 participants