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

feat(v8/react): Add a handled prop to ErrorBoundary #14978

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jan 10, 2025

backport of #14560

The previous behaviour was to rely on the presence of the `fallback`
prop to decide if the error was considered handled or not. The new
property lets users explicitly choose what should the handled
status be. If omitted, the old behaviour is still applied.
@Lms24 Lms24 requested review from a team as code owners January 10, 2025 12:22
@Lms24 Lms24 changed the base branch from develop to v8 January 10, 2025 12:23
@Lms24 Lms24 requested review from lforst and AbhiPrasad and removed request for a team January 10, 2025 12:23
@Lms24 Lms24 enabled auto-merge (squash) January 10, 2025 12:27
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.29 KB - -
@sentry/browser - with treeshaking flags 21.96 KB - -
@sentry/browser (incl. Tracing) 35.85 KB - -
@sentry/browser (incl. Tracing, Replay) 73.09 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 63.48 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 77.4 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 89.34 KB - -
@sentry/browser (incl. Feedback) 39.5 KB - -
@sentry/browser (incl. sendFeedback) 27.89 KB - -
@sentry/browser (incl. FeedbackAsync) 32.69 KB - -
@sentry/react 25.97 KB +0.06% +14 B 🔺
@sentry/react (incl. Tracing) 38.67 KB +0.04% +13 B 🔺
@sentry/vue 27.57 KB - -
@sentry/vue (incl. Tracing) 37.71 KB - -
@sentry/svelte 23.45 KB - -
CDN Bundle 24.49 KB - -
CDN Bundle (incl. Tracing) 37.56 KB - -
CDN Bundle (incl. Tracing, Replay) 72.75 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 78.11 KB - -
CDN Bundle - uncompressed 71.93 KB - -
CDN Bundle (incl. Tracing) - uncompressed 111.42 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 225.5 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 238.6 KB - -
@sentry/nextjs (client) 38.92 KB - -
@sentry/sveltekit (client) 36.36 KB - -
@sentry/node 162.8 KB - -
@sentry/node - without tracing 98.94 KB - -
@sentry/aws-serverless 126.63 KB - -

View base workflow run

@Lms24 Lms24 merged commit fda1aee into v8 Jan 10, 2025
77 checks passed
@Lms24 Lms24 deleted the lms/feat-react-handled-prop-v8 branch January 10, 2025 12:35
alexandresoro pushed a commit to alexandresoro/ouca-backend that referenced this pull request Jan 15, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@sentry/node](/~https://github.com/getsentry/sentry-javascript/tree/master/packages/node) ([source](/~https://github.com/getsentry/sentry-javascript)) | dependencies | minor | [`8.48.0` -> `8.50.0`](https://renovatebot.com/diffs/npm/@sentry%2fnode/8.48.0/8.50.0) |

---

### Release Notes

<details>
<summary>getsentry/sentry-javascript (@&#8203;sentry/node)</summary>

### [`v8.50.0`](/~https://github.com/getsentry/sentry-javascript/releases/tag/8.50.0)

[Compare Source](getsentry/sentry-javascript@8.49.0...8.50.0)

-   feat(v8/react): Add support for React Router `createMemoryRouter` ([#&#8203;14985](getsentry/sentry-javascript#14985))

#### Bundle size 📦

| Path                                                             | Size              |
| ---------------------------------------------------------------- | ----------------- |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser)                                                  | 23.29 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) - with treeshaking flags                         | 21.96 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing)                                  | 35.85 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay)                          | 73.19 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay) - with treeshaking flags | 63.58 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay with Canvas)              | 77.5 KB   |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay, Feedback)                | 89.43 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Feedback)                                 | 39.5 KB   |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. sendFeedback)                             | 27.89 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. FeedbackAsync)                            | 32.69 KB  |
| [@&#8203;sentry/react](/~https://github.com/sentry/react)                                                    | 25.97 KB  |
| [@&#8203;sentry/react](/~https://github.com/sentry/react) (incl. Tracing)                                    | 38.67 KB  |
| [@&#8203;sentry/vue](/~https://github.com/sentry/vue)                                                      | 27.57 KB  |
| [@&#8203;sentry/vue](/~https://github.com/sentry/vue) (incl. Tracing)                                      | 37.71 KB  |
| [@&#8203;sentry/svelte](/~https://github.com/sentry/svelte)                                                   | 23.45 KB  |
| CDN Bundle                                                       | 24.49 KB  |
| CDN Bundle (incl. Tracing)                                       | 37.56 KB  |
| CDN Bundle (incl. Tracing, Replay)                               | 72.84 KB  |
| CDN Bundle (incl. Tracing, Replay, Feedback)                     | 78.2 KB   |
| CDN Bundle - uncompressed                                        | 71.93 KB  |
| CDN Bundle (incl. Tracing) - uncompressed                        | 111.42 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed                | 225.68 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed      | 238.78 KB |
| [@&#8203;sentry/nextjs](/~https://github.com/sentry/nextjs) (client)                                          | 38.92 KB  |
| [@&#8203;sentry/sveltekit](/~https://github.com/sentry/sveltekit) (client)                                       | 36.35 KB  |
| [@&#8203;sentry/node](/~https://github.com/sentry/node)                                                     | 162.82 KB |
| [@&#8203;sentry/node](/~https://github.com/sentry/node) - without tracing                                   | 98.95 KB  |
| [@&#8203;sentry/aws-serverless](/~https://github.com/sentry/aws-serverless)                                           | 126.65 KB |

### [`v8.49.0`](/~https://github.com/getsentry/sentry-javascript/releases/tag/8.49.0)

[Compare Source](getsentry/sentry-javascript@8.48.0...8.49.0)

-   feat(v8/browser): Flush offline queue on flush and browser online event ([#&#8203;14969](getsentry/sentry-javascript#14969))
-   feat(v8/react): Add a `handled` prop to ErrorBoundary ([#&#8203;14978](getsentry/sentry-javascript#14978))
-   fix(profiling/v8): Don't put `require`, `__filename` and `__dirname` on global object ([#&#8203;14952](getsentry/sentry-javascript#14952))
-   fix(v8/node): Enforce that ContextLines integration does not leave open file handles ([#&#8203;14997](getsentry/sentry-javascript#14997))
-   fix(v8/replay): Disable mousemove sampling in rrweb for iOS browsers ([#&#8203;14944](getsentry/sentry-javascript#14944))
-   fix(v8/sveltekit): Ensure source maps deletion is called after source ma… ([#&#8203;14963](getsentry/sentry-javascript#14963))
-   fix(v8/vue): Re-throw error when no errorHandler exists ([#&#8203;14943](getsentry/sentry-javascript#14943))

Work in this release was contributed by [@&#8203;HHK1](/~https://github.com/HHK1) and [@&#8203;mstrokin](/~https://github.com/mstrokin). Thank you for your contribution!

#### Bundle size 📦

| Path                                                             | Size              |
| ---------------------------------------------------------------- | ----------------- |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser)                                                  | 23.29 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) - with treeshaking flags                         | 21.96 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing)                                  | 35.85 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay)                          | 73.19 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay) - with treeshaking flags | 63.58 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay with Canvas)              | 77.5 KB   |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay, Feedback)                | 89.44 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Feedback)                                 | 39.5 KB   |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. sendFeedback)                             | 27.89 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. FeedbackAsync)                            | 32.69 KB  |
| [@&#8203;sentry/react](/~https://github.com/sentry/react)                                                    | 25.97 KB  |
| [@&#8203;sentry/react](/~https://github.com/sentry/react) (incl. Tracing)                                    | 38.67 KB  |
| [@&#8203;sentry/vue](/~https://github.com/sentry/vue)                                                      | 27.57 KB  |
| [@&#8203;sentry/vue](/~https://github.com/sentry/vue) (incl. Tracing)                                      | 37.71 KB  |
| [@&#8203;sentry/svelte](/~https://github.com/sentry/svelte)                                                   | 23.45 KB  |
| CDN Bundle                                                       | 24.49 KB  |
| CDN Bundle (incl. Tracing)                                       | 37.56 KB  |
| CDN Bundle (incl. Tracing, Replay)                               | 72.84 KB  |
| CDN Bundle (incl. Tracing, Replay, Feedback)                     | 78.2 KB   |
| CDN Bundle - uncompressed                                        | 71.93 KB  |
| CDN Bundle (incl. Tracing) - uncompressed                        | 111.42 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed                | 225.68 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed      | 238.78 KB |
| [@&#8203;sentry/nextjs](/~https://github.com/sentry/nextjs) (client)                                          | 38.92 KB  |
| [@&#8203;sentry/sveltekit](/~https://github.com/sentry/sveltekit) (client)                                       | 36.36 KB  |
| [@&#8203;sentry/node](/~https://github.com/sentry/node)                                                     | 162.82 KB |
| [@&#8203;sentry/node](/~https://github.com/sentry/node) - without tracing                                   | 98.95 KB  |
| [@&#8203;sentry/aws-serverless](/~https://github.com/sentry/aws-serverless)                                           | 126.65 KB |

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](/~https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca-backend/pulls/476
Reviewed-by: Alexandre Soro <code@soro.dev>
Co-authored-by: renovate <renovate@git.tristess.app>
Co-committed-by: renovate <renovate@git.tristess.app>
alexandresoro pushed a commit to alexandresoro/ouca-web that referenced this pull request Jan 15, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@sentry/react](/~https://github.com/getsentry/sentry-javascript/tree/master/packages/react) ([source](/~https://github.com/getsentry/sentry-javascript)) | dependencies | minor | [`8.48.0` -> `8.50.0`](https://renovatebot.com/diffs/npm/@sentry%2freact/8.48.0/8.50.0) |

---

### Release Notes

<details>
<summary>getsentry/sentry-javascript (@&#8203;sentry/react)</summary>

### [`v8.50.0`](/~https://github.com/getsentry/sentry-javascript/releases/tag/8.50.0)

[Compare Source](getsentry/sentry-javascript@8.49.0...8.50.0)

-   feat(v8/react): Add support for React Router `createMemoryRouter` ([#&#8203;14985](getsentry/sentry-javascript#14985))

#### Bundle size 📦

| Path                                                             | Size              |
| ---------------------------------------------------------------- | ----------------- |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser)                                                  | 23.29 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) - with treeshaking flags                         | 21.96 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing)                                  | 35.85 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay)                          | 73.19 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay) - with treeshaking flags | 63.58 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay with Canvas)              | 77.5 KB   |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay, Feedback)                | 89.43 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Feedback)                                 | 39.5 KB   |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. sendFeedback)                             | 27.89 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. FeedbackAsync)                            | 32.69 KB  |
| [@&#8203;sentry/react](/~https://github.com/sentry/react)                                                    | 25.97 KB  |
| [@&#8203;sentry/react](/~https://github.com/sentry/react) (incl. Tracing)                                    | 38.67 KB  |
| [@&#8203;sentry/vue](/~https://github.com/sentry/vue)                                                      | 27.57 KB  |
| [@&#8203;sentry/vue](/~https://github.com/sentry/vue) (incl. Tracing)                                      | 37.71 KB  |
| [@&#8203;sentry/svelte](/~https://github.com/sentry/svelte)                                                   | 23.45 KB  |
| CDN Bundle                                                       | 24.49 KB  |
| CDN Bundle (incl. Tracing)                                       | 37.56 KB  |
| CDN Bundle (incl. Tracing, Replay)                               | 72.84 KB  |
| CDN Bundle (incl. Tracing, Replay, Feedback)                     | 78.2 KB   |
| CDN Bundle - uncompressed                                        | 71.93 KB  |
| CDN Bundle (incl. Tracing) - uncompressed                        | 111.42 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed                | 225.68 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed      | 238.78 KB |
| [@&#8203;sentry/nextjs](/~https://github.com/sentry/nextjs) (client)                                          | 38.92 KB  |
| [@&#8203;sentry/sveltekit](/~https://github.com/sentry/sveltekit) (client)                                       | 36.35 KB  |
| [@&#8203;sentry/node](/~https://github.com/sentry/node)                                                     | 162.82 KB |
| [@&#8203;sentry/node](/~https://github.com/sentry/node) - without tracing                                   | 98.95 KB  |
| [@&#8203;sentry/aws-serverless](/~https://github.com/sentry/aws-serverless)                                           | 126.65 KB |

### [`v8.49.0`](/~https://github.com/getsentry/sentry-javascript/releases/tag/8.49.0)

[Compare Source](getsentry/sentry-javascript@8.48.0...8.49.0)

-   feat(v8/browser): Flush offline queue on flush and browser online event ([#&#8203;14969](getsentry/sentry-javascript#14969))
-   feat(v8/react): Add a `handled` prop to ErrorBoundary ([#&#8203;14978](getsentry/sentry-javascript#14978))
-   fix(profiling/v8): Don't put `require`, `__filename` and `__dirname` on global object ([#&#8203;14952](getsentry/sentry-javascript#14952))
-   fix(v8/node): Enforce that ContextLines integration does not leave open file handles ([#&#8203;14997](getsentry/sentry-javascript#14997))
-   fix(v8/replay): Disable mousemove sampling in rrweb for iOS browsers ([#&#8203;14944](getsentry/sentry-javascript#14944))
-   fix(v8/sveltekit): Ensure source maps deletion is called after source ma… ([#&#8203;14963](getsentry/sentry-javascript#14963))
-   fix(v8/vue): Re-throw error when no errorHandler exists ([#&#8203;14943](getsentry/sentry-javascript#14943))

Work in this release was contributed by [@&#8203;HHK1](/~https://github.com/HHK1) and [@&#8203;mstrokin](/~https://github.com/mstrokin). Thank you for your contribution!

#### Bundle size 📦

| Path                                                             | Size              |
| ---------------------------------------------------------------- | ----------------- |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser)                                                  | 23.29 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) - with treeshaking flags                         | 21.96 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing)                                  | 35.85 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay)                          | 73.19 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay) - with treeshaking flags | 63.58 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay with Canvas)              | 77.5 KB   |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Tracing, Replay, Feedback)                | 89.44 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. Feedback)                                 | 39.5 KB   |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. sendFeedback)                             | 27.89 KB  |
| [@&#8203;sentry/browser](/~https://github.com/sentry/browser) (incl. FeedbackAsync)                            | 32.69 KB  |
| [@&#8203;sentry/react](/~https://github.com/sentry/react)                                                    | 25.97 KB  |
| [@&#8203;sentry/react](/~https://github.com/sentry/react) (incl. Tracing)                                    | 38.67 KB  |
| [@&#8203;sentry/vue](/~https://github.com/sentry/vue)                                                      | 27.57 KB  |
| [@&#8203;sentry/vue](/~https://github.com/sentry/vue) (incl. Tracing)                                      | 37.71 KB  |
| [@&#8203;sentry/svelte](/~https://github.com/sentry/svelte)                                                   | 23.45 KB  |
| CDN Bundle                                                       | 24.49 KB  |
| CDN Bundle (incl. Tracing)                                       | 37.56 KB  |
| CDN Bundle (incl. Tracing, Replay)                               | 72.84 KB  |
| CDN Bundle (incl. Tracing, Replay, Feedback)                     | 78.2 KB   |
| CDN Bundle - uncompressed                                        | 71.93 KB  |
| CDN Bundle (incl. Tracing) - uncompressed                        | 111.42 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed                | 225.68 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed      | 238.78 KB |
| [@&#8203;sentry/nextjs](/~https://github.com/sentry/nextjs) (client)                                          | 38.92 KB  |
| [@&#8203;sentry/sveltekit](/~https://github.com/sentry/sveltekit) (client)                                       | 36.36 KB  |
| [@&#8203;sentry/node](/~https://github.com/sentry/node)                                                     | 162.82 KB |
| [@&#8203;sentry/node](/~https://github.com/sentry/node) - without tracing                                   | 98.95 KB  |
| [@&#8203;sentry/aws-serverless](/~https://github.com/sentry/aws-serverless)                                           | 126.65 KB |

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](/~https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca-web/pulls/23
Reviewed-by: Alexandre Soro <code@soro.dev>
Co-authored-by: renovate <renovate@git.tristess.app>
Co-committed-by: renovate <renovate@git.tristess.app>
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.

3 participants