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

fix: copy other moment properties when wrapping with deprecated warning #9446

Merged
merged 4 commits into from
Dec 4, 2020

Conversation

bahmutov
Copy link
Contributor

@bahmutov bahmutov commented Dec 3, 2020

Screen Shot 2020-12-03 at 9 28 03 AM

Otherwise our build is broken, and any user using these properties would be broken

Screen Shot 2020-12-03 at 9 36 23 AM

PR Tasks

  • Have tests been added/updated?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 3, 2020

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Dec 3, 2020



Test summary

3932 0 52 1


Run details

Project cypress
Status Passed
Commit c9e4644
Started Dec 4, 2020 6:24 AM
Ended Dec 4, 2020 6:35 AM
Duration 11:06 💡
OS Linux Debian - 10.5
Browser Firefox 77

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@bahmutov bahmutov marked this pull request as ready for review December 3, 2020 15:02
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like the deprecation warning will be shown when you call Cypress.moment.duration, etc.

@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 3, 2020

yeah, I did not plan to show a warning when accessing every property, but I don't think it should be blocking this fix. After all, the develop is fixed, the warning for Cypress.moment() is shown and that's the most often use case, right

@bahmutov
Copy link
Contributor Author

bahmutov commented Dec 3, 2020

Ok, looked at this again - and now it is showing deprecated warning on any function property recursively in Cypress.moment

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks for fixing this. 🙇‍♀️

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated error message to say Cypress.moment instead of Cypress.moment(). I think showing individual methods as deprecated in TypeScript is unnecessary for this, so good to go.

@jennifer-shehane jennifer-shehane merged commit 14ae3c7 into develop Dec 4, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants