apollographql / apollo-tooling

✏️ Apollo CLI for client tooling (Mostly replaced by Rover)
https://apollographql.com
MIT License
3.04k stars 467 forks source link

Remove `moment` as a dependency for `apollo-language-server` #2595

Closed nickpith closed 2 years ago

nickpith commented 2 years ago

There is really no strong need for moment to a dependency of apollo-language-server when it is used just to calculate durations in milliseconds. A simple constant will suffice instead.

Also added some tests to prove that this change works but is by no means exhaustive.

Related: https://github.com/apollographql/apollo-tooling/issues/2323.

TODO:

*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.

apollo-cla commented 2 years ago

@nickpith: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

trevor-scheer commented 2 years ago

Thanks @nickpith! I updated your PR description so it doesn't autoclose the related issue. We still need to remove moment in the CLI itself in order to close that one out (even though the author of that issue wrote in that it's due to the usage in apollo-language-server).

As mentioned in #2593, I'll make a best effort w.r.t. this repo and try to get a release of this cut in a reasonable time, but my current focus is AS4. Apologies for any inconvenience this causes in the meantime.

nickpith commented 2 years ago

@trevor-scheer Thanks for merging and fixing the description. I can understand the focus on AS4 so whenever you can get to it would be fine!