Skip to content

Deferred: Rename getStackHook to getErrorHook (3.x version) #5212

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

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

mgol
Copy link
Member

@mgol mgol commented Feb 15, 2023

Summary

Rename jQuery.Deferred.getStackHook to jQuery.Deferred.getErrorHook to indicate passing an error instance is usually a better choice - it works with source maps while a raw stack generally does not.

In jQuery 3.7.0, we'll keep both names, marking the old one as deprecated. In jQuery 4.0.0 we'll just keep the new one. This change implements the 3.7.0 version; PR gh-5211 implements the 4.0.0 one.

Fixes gh-5201
Ref gh-5211

Checklist

@mgol mgol added this to the 3.7.0 milestone Feb 15, 2023
@mgol mgol requested a review from dmethvin February 15, 2023 13:18
@mgol mgol self-assigned this Feb 15, 2023
mgol added a commit to mgol/jquery that referenced this pull request Feb 15, 2023
Rename `jQuery.Deferred.getStackHook` to `jQuery.Deferred.getErrorHook`
to indicate passing an error instance is usually a better choice - it
works with source maps while a raw stack generally does not.

In jQuery `3.7.0`, we'll keep both names, marking the old one as
deprecated. In jQuery `4.0.0` we'll just keep the new one. This
change implements the `3.7.0` version; PR jquerygh-5211 implements
the `4.0.0` one.

Fixes jquerygh-5201
Closes jquerygh-5212
Ref jquerygh-5211
@mgol mgol force-pushed the 3.x-get-error-hook branch from dc2f3cf to 8522221 Compare February 15, 2023 13:21
mgol added a commit to mgol/jquery that referenced this pull request Feb 15, 2023
Rename `jQuery.Deferred.getStackHook` to `jQuery.Deferred.getErrorHook`
to indicate passing an error instance is usually a better choice - it
works with source maps while a raw stack generally does not.

In jQuery `3.7.0`, we'll keep both names, marking the old one as
deprecated. In jQuery `4.0.0` we'll just keep the new one. This
change implements the `4.0.0` version; PR jquerygh-5212 implements
the `3.7.0` one.

Fixes jquerygh-5201
Closes jquerygh-5211
Ref jquerygh-5212
@mgol mgol changed the title Deferred: Rename getStackHook to getErrorHook Deferred: Rename getStackHook to getErrorHook (3.x version) Feb 15, 2023
Copy link
Member

@dmethvin dmethvin left a comment

Choose a reason for hiding this comment

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

I love when my old test cases make me laugh.

@mgol mgol added the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Feb 24, 2023
Copy link
Member

@timmywil timmywil left a comment

Choose a reason for hiding this comment

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

Looks simple enough. I like that getStackHook is still tested in the deprecated module.

@timmywil timmywil removed the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Mar 13, 2023
Rename `jQuery.Deferred.getStackHook` to `jQuery.Deferred.getErrorHook`
to indicate passing an error instance is usually a better choice - it
works with source maps while a raw stack generally does not.

In jQuery `3.7.0`, we'll keep both names, marking the old one as
deprecated. In jQuery `4.0.0` we'll just keep the new one. This
change implements the `3.7.0` version; PR jquerygh-5211 implements
the `4.0.0` one.

Fixes jquerygh-5201
Closes jquerygh-5212
Ref jquerygh-5211
mgol added a commit to mgol/jquery that referenced this pull request Mar 14, 2023
Rename `jQuery.Deferred.getStackHook` to `jQuery.Deferred.getErrorHook`
to indicate passing an error instance is usually a better choice - it
works with source maps while a raw stack generally does not.

In jQuery `3.7.0`, we'll keep both names, marking the old one as
deprecated. In jQuery `4.0.0` we'll just keep the new one. This
change implements the `4.0.0` version; PR jquerygh-5212 implements
the `3.7.0` one.

Fixes jquerygh-5201
Closes jquerygh-5211
Ref jquerygh-5212
@mgol mgol force-pushed the 3.x-get-error-hook branch from 8522221 to bc19320 Compare March 14, 2023 21:26
mgol added a commit that referenced this pull request Mar 14, 2023
Rename `jQuery.Deferred.getStackHook` to `jQuery.Deferred.getErrorHook`
to indicate passing an error instance is usually a better choice - it
works with source maps while a raw stack generally does not.

In jQuery `3.7.0`, we'll keep both names, marking the old one as
deprecated. In jQuery `4.0.0` we'll just keep the new one. This
change implements the `4.0.0` version; PR gh-5212 implements
the `3.7.0` one.

Fixes gh-5201
Closes gh-5211
Ref gh-5212
@mgol mgol merged commit cca7118 into jquery:3.x-stable Mar 14, 2023
@mgol mgol deleted the 3.x-get-error-hook branch March 14, 2023 21:32
mgol added a commit that referenced this pull request Mar 15, 2023
The non-deprecated test was already skipped there, the deprecated
one is now skipped as well.

Ref gh-5212
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants