@sentry/react-router 10.37.0 → 10.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/server/createSentryHandleError.js +1 -4
- package/build/cjs/server/createSentryHandleError.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/server/createSentryHandleError.js +1 -4
- package/build/esm/server/createSentryHandleError.js.map +1 -1
- package/build/types/server/createSentryHandleError.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -8,10 +8,7 @@ const core = require('@sentry/core');
|
|
|
8
8
|
* @returns A Sentry-instrumented handleError function
|
|
9
9
|
*/
|
|
10
10
|
function createSentryHandleError({ logErrors = false }) {
|
|
11
|
-
const handleError = async function handleError(
|
|
12
|
-
error,
|
|
13
|
-
args,
|
|
14
|
-
) {
|
|
11
|
+
const handleError = async function handleError(error, args) {
|
|
15
12
|
// React Router may abort some interrupted requests, don't report those
|
|
16
13
|
if (!args.request.signal.aborted) {
|
|
17
14
|
core.captureException(error, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSentryHandleError.js","sources":["../../../src/server/createSentryHandleError.ts"],"sourcesContent":["import { captureException, flushIfServerless } from '@sentry/core';\nimport type {
|
|
1
|
+
{"version":3,"file":"createSentryHandleError.js","sources":["../../../src/server/createSentryHandleError.ts"],"sourcesContent":["import { captureException, flushIfServerless } from '@sentry/core';\nimport type { HandleErrorFunction } from 'react-router';\n\nexport type SentryHandleErrorOptions = {\n logErrors?: boolean;\n};\n\n/**\n * A complete Sentry-instrumented handleError implementation that handles error reporting\n *\n * @returns A Sentry-instrumented handleError function\n */\nexport function createSentryHandleError({ logErrors = false }: SentryHandleErrorOptions): HandleErrorFunction {\n const handleError: HandleErrorFunction = async function handleError(error, args): Promise<void> {\n // React Router may abort some interrupted requests, don't report those\n if (!args.request.signal.aborted) {\n captureException(error, {\n mechanism: {\n type: 'react-router',\n handled: false,\n },\n });\n if (logErrors) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n try {\n await flushIfServerless();\n } catch {\n // Ignore flush errors to ensure error handling completes gracefully\n }\n }\n };\n\n return handleError;\n}\n"],"names":["captureException","flushIfServerless"],"mappings":";;;;AAOA;AACA;AACA;AACA;AACA;AACO,SAAS,uBAAuB,CAAC,EAAE,YAAY,KAAA,EAAO,EAAiD;AAC9G,EAAE,MAAM,WAAW,GAAwB,eAAe,WAAW,CAAC,KAAK,EAAE,IAAI,EAAiB;AAClG;AACA,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE;AACtC,MAAMA,qBAAgB,CAAC,KAAK,EAAE;AAC9B,QAAQ,SAAS,EAAE;AACnB,UAAU,IAAI,EAAE,cAAc;AAC9B,UAAU,OAAO,EAAE,KAAK;AACxB,SAAS;AACT,OAAO,CAAC;AACR,MAAM,IAAI,SAAS,EAAE;AACrB;AACA,QAAQ,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AAC5B,MAAM;AACN,MAAM,IAAI;AACV,QAAQ,MAAMC,sBAAiB,EAAE;AACjC,MAAM,EAAE,MAAM;AACd;AACA,MAAM;AACN,IAAI;AACJ,EAAE,CAAC;;AAEH,EAAE,OAAO,WAAW;AACpB;;;;"}
|
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"10.
|
|
1
|
+
{"type":"module","version":"10.38.0"}
|
|
@@ -6,10 +6,7 @@ import { captureException, flushIfServerless } from '@sentry/core';
|
|
|
6
6
|
* @returns A Sentry-instrumented handleError function
|
|
7
7
|
*/
|
|
8
8
|
function createSentryHandleError({ logErrors = false }) {
|
|
9
|
-
const handleError = async function handleError(
|
|
10
|
-
error,
|
|
11
|
-
args,
|
|
12
|
-
) {
|
|
9
|
+
const handleError = async function handleError(error, args) {
|
|
13
10
|
// React Router may abort some interrupted requests, don't report those
|
|
14
11
|
if (!args.request.signal.aborted) {
|
|
15
12
|
captureException(error, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSentryHandleError.js","sources":["../../../src/server/createSentryHandleError.ts"],"sourcesContent":["import { captureException, flushIfServerless } from '@sentry/core';\nimport type {
|
|
1
|
+
{"version":3,"file":"createSentryHandleError.js","sources":["../../../src/server/createSentryHandleError.ts"],"sourcesContent":["import { captureException, flushIfServerless } from '@sentry/core';\nimport type { HandleErrorFunction } from 'react-router';\n\nexport type SentryHandleErrorOptions = {\n logErrors?: boolean;\n};\n\n/**\n * A complete Sentry-instrumented handleError implementation that handles error reporting\n *\n * @returns A Sentry-instrumented handleError function\n */\nexport function createSentryHandleError({ logErrors = false }: SentryHandleErrorOptions): HandleErrorFunction {\n const handleError: HandleErrorFunction = async function handleError(error, args): Promise<void> {\n // React Router may abort some interrupted requests, don't report those\n if (!args.request.signal.aborted) {\n captureException(error, {\n mechanism: {\n type: 'react-router',\n handled: false,\n },\n });\n if (logErrors) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n try {\n await flushIfServerless();\n } catch {\n // Ignore flush errors to ensure error handling completes gracefully\n }\n }\n };\n\n return handleError;\n}\n"],"names":[],"mappings":";;AAOA;AACA;AACA;AACA;AACA;AACO,SAAS,uBAAuB,CAAC,EAAE,YAAY,KAAA,EAAO,EAAiD;AAC9G,EAAE,MAAM,WAAW,GAAwB,eAAe,WAAW,CAAC,KAAK,EAAE,IAAI,EAAiB;AAClG;AACA,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE;AACtC,MAAM,gBAAgB,CAAC,KAAK,EAAE;AAC9B,QAAQ,SAAS,EAAE;AACnB,UAAU,IAAI,EAAE,cAAc;AAC9B,UAAU,OAAO,EAAE,KAAK;AACxB,SAAS;AACT,OAAO,CAAC;AACR,MAAM,IAAI,SAAS,EAAE;AACrB;AACA,QAAQ,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AAC5B,MAAM;AACN,MAAM,IAAI;AACV,QAAQ,MAAM,iBAAiB,EAAE;AACjC,MAAM,EAAE,MAAM;AACd;AACA,MAAM;AACN,IAAI;AACJ,EAAE,CAAC;;AAEH,EAAE,OAAO,WAAW;AACpB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSentryHandleError.d.ts","sourceRoot":"","sources":["../../../src/server/createSentryHandleError.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"createSentryHandleError.d.ts","sourceRoot":"","sources":["../../../src/server/createSentryHandleError.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,SAAiB,EAAE,EAAE,wBAAwB,GAAG,mBAAmB,CAuB5G"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/react-router",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.38.0",
|
|
4
4
|
"description": "Official Sentry SDK for React Router (Framework)",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/react-router",
|
|
@@ -49,19 +49,19 @@
|
|
|
49
49
|
"@opentelemetry/core": "^2.5.0",
|
|
50
50
|
"@opentelemetry/instrumentation": "^0.211.0",
|
|
51
51
|
"@opentelemetry/semantic-conventions": "^1.39.0",
|
|
52
|
-
"@sentry/browser": "10.
|
|
52
|
+
"@sentry/browser": "10.38.0",
|
|
53
53
|
"@sentry/cli": "^2.58.4",
|
|
54
|
-
"@sentry/core": "10.
|
|
55
|
-
"@sentry/node": "10.
|
|
56
|
-
"@sentry/react": "10.
|
|
57
|
-
"@sentry/vite-plugin": "^4.
|
|
54
|
+
"@sentry/core": "10.38.0",
|
|
55
|
+
"@sentry/node": "10.38.0",
|
|
56
|
+
"@sentry/react": "10.38.0",
|
|
57
|
+
"@sentry/vite-plugin": "^4.8.0",
|
|
58
58
|
"glob": "11.1.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@react-router/dev": "^7.
|
|
62
|
-
"@react-router/node": "^7.
|
|
61
|
+
"@react-router/dev": "^7.13.0",
|
|
62
|
+
"@react-router/node": "^7.13.0",
|
|
63
63
|
"react": "^18.3.1",
|
|
64
|
-
"react-router": "^7.
|
|
64
|
+
"react-router": "^7.13.0",
|
|
65
65
|
"vite": "^6.1.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|