getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
8.01k stars 1.58k forks source link

fix(core): Do not throw when trying to fill readonly properties #14402

Closed mydea closed 1 day ago

mydea commented 1 day ago

This PR adds a guard to avoid us throwing if we try to fill a readonly property on an object.

Generally speaking this should not work, but it does not hurt us to be defensive here and try-catch this to avoid breaking users apps.

Fixes https://github.com/getsentry/sentry-javascript/issues/14368

github-actions[bot] commented 1 day ago

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.88 KB +0.09% +19 B 🔺
@sentry/browser - with treeshaking flags 21.57 KB +0.01% +2 B 🔺
@sentry/browser (incl. Tracing) 35.43 KB +0.06% +20 B 🔺
@sentry/browser (incl. Tracing, Replay) 72.11 KB +0.03% +20 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.42 KB +0.01% +1 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 76.41 KB +0.03% +20 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 88.89 KB +0.03% +19 B 🔺
@sentry/browser (incl. Feedback) 39.62 KB +0.04% +14 B 🔺
@sentry/browser (incl. sendFeedback) 27.51 KB +0.07% +19 B 🔺
@sentry/browser (incl. FeedbackAsync) 32.32 KB +0.04% +13 B 🔺
@sentry/react 25.58 KB +0.07% +18 B 🔺
@sentry/react (incl. Tracing) 38.29 KB +0.06% +20 B 🔺
@sentry/vue 27.04 KB +0.07% +17 B 🔺
@sentry/vue (incl. Tracing) 37.24 KB +0.05% +19 B 🔺
@sentry/svelte 23.03 KB +0.1% +23 B 🔺
CDN Bundle 24.04 KB +0.01% +1 B 🔺
CDN Bundle (incl. Tracing) 36.99 KB - -
CDN Bundle (incl. Tracing, Replay) 71.7 KB +0.01% +2 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 77.05 KB +0.01% +1 B 🔺
CDN Bundle - uncompressed 70.9 KB +0.03% +15 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 110.12 KB +0.02% +15 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 222.65 KB +0.01% +15 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 235.87 KB +0.01% +15 B 🔺
@sentry/nextjs (client) 38.39 KB +0.04% +14 B 🔺
@sentry/sveltekit (client) 35.94 KB +0.07% +25 B 🔺
@sentry/node 134.48 KB +0.03% +39 B 🔺
@sentry/node - without tracing 96.3 KB +0.03% +23 B 🔺
@sentry/aws-serverless 106.55 KB +0.04% +38 B 🔺

View base workflow run

codecov[bot] commented 1 day ago

:x: 1 Tests Failed:

Tests completed Failed Passed Skipped
651 1 650 30
View the top 1 failed tests by shortest run time > > ```python > client-app-routing-instrumentation.test.ts Creates a navigation transaction for app router routes > ``` > >
Stack Traces | 30s run time > > > > > ```python > > client-app-routing-instrumentation.test.ts:19:5 Creates a navigation transaction for app router routes > > ``` > >

To view more test analytics, go to the Test Analytics Dashboard Got feedback? Let us know on Github