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

How can I install rrule without luxon library? #382

Closed
justsanjit opened this issue Dec 19, 2019 · 4 comments
Closed

How can I install rrule without luxon library? #382

justsanjit opened this issue Dec 19, 2019 · 4 comments

Comments

@justsanjit
Copy link

This is not an issue just a question.

I know, I can pass --no-optional to ignore the optional dependencies while installing package like this:

npm install rrule --no-optional

But if I run 'npm run install' again on my project. it installs the luxon library.

Either I have to ignore optional dependencies from all the packages that I have installed or I have to install luxon.

Is there any way I can install rrule from npm with luxon ?

@jorroll
Copy link

jorroll commented Dec 19, 2019

So I could be mistaken, but I think that luxon is actually a required dependency (which can be viewed as a bug, given that it is clearly intended as an optional dependency). See this comment on another issue for more info: #344 (comment).

Both myself and the original issue maker have only tested using a webpack build process though.

I think the underlying issue needs to be fixed with a breaking change that creates a second, separate package entry point for rrule.

In answer to your question though:

Is there any way I can install rrule from npm with luxon ?

No, I don't think so.

@davidgoli
Copy link
Collaborator

I intend to work on a minor version bump release that will remove luxon. Unfortunately, I'm not sure there's a way to do this without requiring people who desire timezone support to implement their own timezone conversion function, whether using Luxon or another library, which could be a source of uninentional bugs.

An alternative might be to reimplement a library that's just the timezone logic without the rest of Luxon, which is a bit more work but probably not impossible.

@jorroll
Copy link

jorroll commented Dec 20, 2019

@davidgoli simply providing two entry points to rrule (the second one needed for timezone support) seems reasonable and easy to implement (I'm happy to provide the PR). It would be a breaking change though. And it would complicate the rrule setup process for folks using luxon.

As I noted over in #344 (comment), given how rarely the issue of removing luxon comes up, it also seems reasonable to just make luxon a required dependency of rrule. Again, it appears that luxon is currently a required dependency, and 99% of folks don't notice soo...?

@davidgoli
Copy link
Collaborator

Duplicate of #344.

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

3 participants