🌐 AI搜索 & 代理 主页
Skip to content

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 4.0.0 version; PR gh-5212 implements the 3.7.0 one.

Fixes gh-5201
Ref gh-5212

Checklist

@mgol mgol added this to the 4.0.0 milestone Feb 15, 2023
@mgol mgol self-assigned this Feb 15, 2023
@mgol mgol requested a review from dmethvin February 15, 2023 13:18
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 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
Copy link
Member Author

mgol commented Feb 15, 2023

A few JS Bins to test what gets passed to the hook, justifying the name change:

@mgol
Copy link
Member Author

mgol commented Feb 15, 2023

PR to @dmethvin's jquery-deferred-reporter: dmethvin/jquery-deferred-reporter#5

@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

@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.

LGTM, thanks!

@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 `4.0.0` version; PR jquerygh-5212 implements
the `3.7.0` one.

Fixes jquerygh-5201
Closes jquerygh-5211
Ref jquerygh-5212
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 `3.7.0` version; PR jquerygh-5211 implements
the `4.0.0` one.

Fixes jquerygh-5201
Closes jquerygh-5212
Ref jquerygh-5211
@mgol mgol merged commit 258ca1e into jquery:main Mar 14, 2023
@mgol mgol deleted the get-error-hook branch March 14, 2023 21:32
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 `3.7.0` version; PR gh-5211 implements
the `4.0.0` one.

Fixes gh-5201
Closes gh-5212
Ref gh-5211
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

Use jQuery.Deferred.getErrorHook in 3.7.0, deprecate jQuery.Deferred.getStackHook

3 participants