Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@react-router/dev": "^7.5.2",
"@react-router/node": "^7.5.2",
"react": "^18.3.1",
"react-router": "^7.5.2",
"react-router": "^7.9.2",
"vite": "^6.1.0"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { createReadableStreamFromReadable } from '@react-router/node';
import type { ReactNode } from 'react';
import React from 'react';
import type { AppLoadContext, EntryContext, ServerRouter } from 'react-router';
import type { AppLoadContext, EntryContext, RouterContextProvider, ServerRouter } from 'react-router';
import { PassThrough } from 'stream';
import { getMetaTagTransformer } from './getMetaTagTransformer';
import { wrapSentryHandleRequest } from './wrapSentryHandleRequest';
Expand Down Expand Up @@ -67,7 +67,7 @@ export function createSentryHandleRequest(
responseStatusCode: number,
responseHeaders: Headers,
routerContext: EntryContext,
loadContext: AppLoadContext,
loadContext: AppLoadContext | RouterContextProvider,
) => Promise<unknown> {
const {
streamTimeout = 10000,
Expand All @@ -82,7 +82,7 @@ export function createSentryHandleRequest(
responseStatusCode: number,
responseHeaders: Headers,
routerContext: EntryContext,
_loadContext: AppLoadContext,
_loadContext: AppLoadContext | RouterContextProvider,
): Promise<Response> {
return new Promise((resolve, reject) => {
let shellRendered = false;
Expand Down
6 changes: 3 additions & 3 deletions packages/react-router/src/server/wrapSentryHandleRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import {
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
} from '@sentry/core';
import type { AppLoadContext, EntryContext } from 'react-router';
import type { AppLoadContext, EntryContext, RouterContextProvider } from 'react-router';

type OriginalHandleRequest = (
request: Request,
responseStatusCode: number,
responseHeaders: Headers,
routerContext: EntryContext,
loadContext: AppLoadContext,
loadContext: AppLoadContext | RouterContextProvider,
) => Promise<unknown>;

/**
Expand All @@ -30,7 +30,7 @@ export function wrapSentryHandleRequest(originalHandle: OriginalHandleRequest):
responseStatusCode: number,
responseHeaders: Headers,
routerContext: EntryContext,
loadContext: AppLoadContext,
loadContext: AppLoadContext | RouterContextProvider,
) {
const parameterizedPath =
routerContext?.staticHandlerContext?.matches?.[routerContext.staticHandlerContext.matches.length - 1]?.route.path;
Expand Down
31 changes: 6 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9448,7 +9448,7 @@
postcss "^8.4.47"
source-map-js "^1.2.0"

"@vue/compiler-sfc@^3.4.15", "@vue/compiler-sfc@^3.5.13", "@vue/compiler-sfc@^3.5.4":
"@vue/compiler-sfc@^3.4.15", "@vue/compiler-sfc@^3.5.4":
version "3.5.21"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.5.21.tgz#e48189ef3ffe334c864c2625389ebe3bb4fa41eb"
integrity sha512-SXlyk6I5eUGBd2v8Ie7tF6ADHE9kCR6mBEuPyH1nUZ0h6Xx6nZI29i12sJKQmzbDyr2tUHMhhTt51Z6blbkTTQ==
Expand Down Expand Up @@ -14248,9 +14248,6 @@ detective-scss@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/detective-scss/-/detective-scss-5.0.1.tgz#6a7f792dc9c0e8cfc0d252a50ba26a6df12596a7"
integrity sha512-MAyPYRgS6DCiS6n6AoSBJXLGVOydsr9huwXORUlJ37K3YLyiN0vYHpzs3AdJOgHobBfispokoqrEon9rbmKacg==
dependencies:
gonzales-pe "^4.3.0"
node-source-walk "^7.0.1"

detective-stylus@^4.0.0:
version "4.0.0"
Expand Down Expand Up @@ -14285,14 +14282,6 @@ detective-vue2@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/detective-vue2/-/detective-vue2-2.2.0.tgz#35fd1d39e261b064aca9fcaf20e136c76877482a"
integrity sha512-sVg/t6O2z1zna8a/UIV6xL5KUa2cMTQbdTIIvqNM0NIPswp52fe43Nwmbahzj3ww4D844u/vC2PYfiGLvD3zFA==
dependencies:
"@dependents/detective-less" "^5.0.1"
"@vue/compiler-sfc" "^3.5.13"
detective-es6 "^5.0.1"
detective-sass "^6.0.1"
detective-scss "^5.0.1"
detective-stylus "^5.0.1"
detective-typescript "^14.0.0"

deterministic-object-hash@^1.3.1:
version "1.3.1"
Expand Down Expand Up @@ -16844,9 +16833,6 @@ fetch-blob@^3.1.2, fetch-blob@^3.1.4:
version "3.2.0"
resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9"
integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==
dependencies:
node-domexception "^1.0.0"
web-streams-polyfill "^3.0.3"

[email protected], fflate@^0.8.2:
version "0.8.2"
Expand Down Expand Up @@ -23099,11 +23085,6 @@ node-cron@^3.0.3:
dependencies:
uuid "8.3.2"

node-domexception@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5"
integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==

node-fetch-native@^1.4.0, node-fetch-native@^1.6.3, node-fetch-native@^1.6.4, node-fetch-native@^1.6.6:
version "1.6.6"
resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.6.tgz#ae1d0e537af35c2c0b0de81cbff37eedd410aa37"
Expand Down Expand Up @@ -26164,10 +26145,10 @@ [email protected]:
dependencies:
"@remix-run/router" "1.21.0"

react-router@^7.5.2:
version "7.6.2"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-7.6.2.tgz#9f48b343bead7d0a94e28342fc4f9ae29131520e"
integrity sha512-U7Nv3y+bMimgWjhlT5CRdzHPu2/KVmqPwKUCChW8en5P3znxUqwlYFlbmyj8Rgp1SF6zs5X4+77kBVknkg6a0w==
react-router@^7.9.2:
version "7.9.2"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-7.9.2.tgz#f424a14f87e4d7b5b268ce3647876e9504e4fca6"
integrity sha512-i2TPp4dgaqrOqiRGLZmqh2WXmbdFknUyiCRmSKs0hf6fWXkTKg5h56b+9F22NbGRAMxjYfqQnpi63egzD2SuZA==
dependencies:
cookie "^1.0.1"
set-cookie-parser "^2.6.0"
Expand Down Expand Up @@ -31227,7 +31208,7 @@ web-namespaces@^2.0.0:
resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-2.0.1.tgz#1010ff7c650eccb2592cebeeaf9a1b253fd40692"
integrity sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==

web-streams-polyfill@^3.0.3, web-streams-polyfill@^3.1.1:
web-streams-polyfill@^3.1.1:
version "3.3.3"
resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b"
integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==
Expand Down
Loading