-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Replace Moment.js within the Cypress project. #8714
Comments
I want to start working on this 🔥 |
I can work with this! I have had experience converting my own projects from Moment.js to Day.js. I could collaborate with the other guy. |
Yes we are open to PRs - even ones that partially replace some of the moment deps are fine. Check out our contributing doc. |
So will |
It is still bundled and exposed but we plan to remove it starting with version 7 because the moment.JS itself is deprecated
…Sent from my iPhone
On Dec 8, 2020, at 11:09, Jon Stone ***@***.***> wrote:
So will Cypress.moment still be exposed after replacing moment.js or is best practice moving forward to not use it?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks, @bahmutov! I'll start looking into migrating to one of their recommendations. |
dayjs has been pretty comparable for what we use moment for and is likely what we will move Cypress internal code to use. |
Thanks, @jennifer-shehane! dayjs it is then |
Out of curiosity, what's the purpose of |
We are internally using these libraries within Cypress, so the library is already there. When we first created Cypress we just exposed the methods as a convenience. I agree that this doesn't feel as necessary anymore as it did at the time. |
The code for this is done in cypress-io/cypress#14729, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
Cypress requires Moment.js in the desktop-gui, cli, driver, and server packages.
Moment.js is now considered legacy and is in maintenance mode. They recommend moving to other projects. See https://momentjs.com/docs/#/-project-status
Desired behavior
Replace Moment.js with other smaller, more up to date package(s). See their recommendations. We would be open to PRs that replace parts of Moment.js one piece at a time. Also - using newer libraries for any new Date uses is recommended.
Versions
5.3.0
The text was updated successfully, but these errors were encountered: