diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3cb91c0f376..8414ee66f52c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -756,7 +756,6 @@ jobs: fail-fast: false matrix: node: [18, 20, 22] - remix: [1, 2] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4 @@ -779,7 +778,6 @@ jobs: - name: Run integration tests env: NODE_VERSION: ${{ matrix.node }} - REMIX_VERSION: ${{ matrix.remix }} run: | cd packages/remix yarn test:integration:ci diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/.eslintrc.js b/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/.eslintrc.js deleted file mode 100644 index f2faf1470fd8..000000000000 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/.eslintrc.js +++ /dev/null @@ -1,4 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - extends: ['@remix-run/eslint-config', '@remix-run/eslint-config/node'], -}; diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/.gitignore b/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/.gitignore deleted file mode 100644 index 3f7bf98da3e1..000000000000 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -node_modules - -/.cache -/build -/public/build -.env diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/.npmrc b/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/.npmrc deleted file mode 100644 index 070f80f05092..000000000000 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -@sentry:registry=http://127.0.0.1:4873 -@sentry-internal:registry=http://127.0.0.1:4873 diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/app/entry.client.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/app/entry.client.tsx deleted file mode 100644 index d0c95287e0c9..000000000000 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/app/entry.client.tsx +++ /dev/null @@ -1,31 +0,0 @@ -/** - * By default, Remix will handle hydrating your app on the client for you. - * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨ - * For more information, see https://remix.run/file-conventions/entry.client - */ - -import { RemixBrowser, useLocation, useMatches } from '@remix-run/react'; -import * as Sentry from '@sentry/remix'; -import { StrictMode, startTransition, useEffect } from 'react'; -import { hydrateRoot } from 'react-dom/client'; - -Sentry.init({ - environment: 'qa', // dynamic sampling bias to keep transactions - dsn: window.ENV.SENTRY_DSN, - integrations: [Sentry.browserTracingIntegration({ useEffect, useMatches, useLocation }), Sentry.replayIntegration()], - // Performance Monitoring - tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - // Session Replay - replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production. - replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur. - tunnel: 'http://localhost:3031/', // proxy server -}); - -startTransition(() => { - hydrateRoot( - document, - - - , - ); -}); diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/app/entry.server.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/app/entry.server.tsx deleted file mode 100644 index b0f1c5d19f09..000000000000 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/app/entry.server.tsx +++ /dev/null @@ -1,114 +0,0 @@ -import * as Sentry from '@sentry/remix'; - -Sentry.init({ - tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production! - environment: 'qa', // dynamic sampling bias to keep transactions - dsn: process.env.E2E_TEST_DSN, - tunnel: 'http://localhost:3031/', // proxy server -}); - -/** - * By default, Remix will handle generating the HTTP Response for you. - * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨ - * For more information, see https://remix.run/file-conventions/entry.server - */ - -import { PassThrough } from 'node:stream'; - -import type { AppLoadContext, EntryContext } from '@remix-run/node'; -import { Response } from '@remix-run/node'; -import { RemixServer } from '@remix-run/react'; -import isbot from 'isbot'; -import { renderToPipeableStream } from 'react-dom/server'; - -const ABORT_DELAY = 5_000; - -export const handleError = Sentry.wrapRemixHandleError; - -export default function handleRequest( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext, - loadContext: AppLoadContext, -) { - return isbot(request.headers.get('user-agent')) - ? handleBotRequest(request, responseStatusCode, responseHeaders, remixContext) - : handleBrowserRequest(request, responseStatusCode, responseHeaders, remixContext); -} - -function handleBotRequest( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext, -) { - return new Promise((resolve, reject) => { - const { pipe, abort } = renderToPipeableStream( - , - { - onAllReady() { - const body = new PassThrough(); - - responseHeaders.set('Content-Type', 'text/html'); - - resolve( - new Response(body, { - headers: responseHeaders, - status: responseStatusCode, - }), - ); - - pipe(body); - }, - onShellError(error: unknown) { - reject(error); - }, - onError(error: unknown) { - responseStatusCode = 500; - console.error(error); - }, - }, - ); - - setTimeout(abort, ABORT_DELAY); - }); -} - -function handleBrowserRequest( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext, -) { - return new Promise((resolve, reject) => { - const { pipe, abort } = renderToPipeableStream( - , - { - onShellReady() { - const body = new PassThrough(); - - responseHeaders.set('Content-Type', 'text/html'); - - resolve( - new Response(body, { - headers: responseHeaders, - status: responseStatusCode, - }), - ); - - pipe(body); - }, - onShellError(error: unknown) { - reject(error); - }, - onError(error: unknown) { - console.error(error); - responseStatusCode = 500; - }, - }, - ); - - setTimeout(abort, ABORT_DELAY); - }); -} diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/app/root.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/app/root.tsx deleted file mode 100644 index e99991f5994d..000000000000 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-legacy/app/root.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { cssBundleHref } from '@remix-run/css-bundle'; -import { LinksFunction, MetaFunction, json } from '@remix-run/node'; -import { - Links, - LiveReload, - Meta, - Outlet, - Scripts, - ScrollRestoration, - useLoaderData, - useRouteError, -} from '@remix-run/react'; -import { captureRemixErrorBoundaryError, withSentry } from '@sentry/remix'; - -export const links: LinksFunction = () => [...(cssBundleHref ? [{ rel: 'stylesheet', href: cssBundleHref }] : [])]; - -export const loader = () => { - return json({ - ENV: { - SENTRY_DSN: process.env.E2E_TEST_DSN, - }, - }); -}; - -export const meta: MetaFunction = ({ data }) => { - return [ - { - name: 'sentry-trace', - content: data.sentryTrace, - }, - { - name: 'baggage', - content: data.sentryBaggage, - }, - ]; -}; - -export function ErrorBoundary() { - const error = useRouteError(); - const eventId = captureRemixErrorBoundaryError(error); - - return ( -
- ErrorBoundary Error - {eventId} -
- ); -} - -function App() { - const { ENV } = useLoaderData(); - - return ( - - - - -