From 60ad5fb77b5ba47c7c5a9517741061f72e7cdd70 Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Fri, 9 May 2025 01:03:30 +0100 Subject: [PATCH 1/2] fix(test): Make Remix integration tests Node 24 compatible --- .../test/integration/test/client/capture-exception.test.ts | 2 +- .../remix/test/integration/test/client/capture-message.test.ts | 2 +- packages/remix/test/integration/test/client/click-error.test.ts | 2 +- .../remix/test/integration/test/client/errorboundary.test.ts | 2 +- .../remix/test/integration/test/client/manualtracing.test.ts | 2 +- packages/remix/test/integration/test/client/meta-tags.test.ts | 2 +- packages/remix/test/integration/test/client/pageload.test.ts | 2 +- packages/remix/test/integration/test/client/root-loader.test.ts | 2 +- .../test/integration/test/server/instrumentation/loader.test.ts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/remix/test/integration/test/client/capture-exception.test.ts b/packages/remix/test/integration/test/client/capture-exception.test.ts index 68aaa9e0a018..3f0aaaa4d83d 100644 --- a/packages/remix/test/integration/test/client/capture-exception.test.ts +++ b/packages/remix/test/integration/test/client/capture-exception.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@playwright/test'; -import { Event } from '@sentry/core'; +import type { Event } from '@sentry/core'; import { getMultipleSentryEnvelopeRequests } from './utils/helpers'; test('should report a manually captured error.', async ({ page }) => { diff --git a/packages/remix/test/integration/test/client/capture-message.test.ts b/packages/remix/test/integration/test/client/capture-message.test.ts index ab1a9083d132..09a1720f94fa 100644 --- a/packages/remix/test/integration/test/client/capture-message.test.ts +++ b/packages/remix/test/integration/test/client/capture-message.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@playwright/test'; -import { Event } from '@sentry/core'; +import type { Event } from '@sentry/core'; import { getMultipleSentryEnvelopeRequests } from './utils/helpers'; test('should report a manually captured message.', async ({ page }) => { diff --git a/packages/remix/test/integration/test/client/click-error.test.ts b/packages/remix/test/integration/test/client/click-error.test.ts index a6385c0e0963..c8c70105708f 100644 --- a/packages/remix/test/integration/test/client/click-error.test.ts +++ b/packages/remix/test/integration/test/client/click-error.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@playwright/test'; -import { Event } from '@sentry/core'; +import type { Event } from '@sentry/core'; import { getMultipleSentryEnvelopeRequests } from './utils/helpers'; test('should report a manually captured message on click with the correct stacktrace.', async ({ page }) => { diff --git a/packages/remix/test/integration/test/client/errorboundary.test.ts b/packages/remix/test/integration/test/client/errorboundary.test.ts index dc7f0378184f..cb30c5c15c89 100644 --- a/packages/remix/test/integration/test/client/errorboundary.test.ts +++ b/packages/remix/test/integration/test/client/errorboundary.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@playwright/test'; -import { Event } from '@sentry/core'; +import type { Event } from '@sentry/core'; import { getMultipleSentryEnvelopeRequests } from './utils/helpers'; test('should capture React component errors.', async ({ page }) => { diff --git a/packages/remix/test/integration/test/client/manualtracing.test.ts b/packages/remix/test/integration/test/client/manualtracing.test.ts index ff2bcac3ec1c..cc9b5b086e0b 100644 --- a/packages/remix/test/integration/test/client/manualtracing.test.ts +++ b/packages/remix/test/integration/test/client/manualtracing.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@playwright/test'; -import { Event } from '@sentry/core'; +import type { Event } from '@sentry/core'; import { getMultipleSentryEnvelopeRequests } from './utils/helpers'; test('should report a manually created / finished transaction.', async ({ page }) => { diff --git a/packages/remix/test/integration/test/client/meta-tags.test.ts b/packages/remix/test/integration/test/client/meta-tags.test.ts index 5e54226c65d6..94a5ecfa1bd4 100644 --- a/packages/remix/test/integration/test/client/meta-tags.test.ts +++ b/packages/remix/test/integration/test/client/meta-tags.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@playwright/test'; -import { Event } from '@sentry/core'; +import type { Event } from '@sentry/core'; import { getFirstSentryEnvelopeRequest } from './utils/helpers'; test('should inject `sentry-trace` and `baggage` meta tags inside the root page.', async ({ page }) => { diff --git a/packages/remix/test/integration/test/client/pageload.test.ts b/packages/remix/test/integration/test/client/pageload.test.ts index 55e97e23635f..967eb3952623 100644 --- a/packages/remix/test/integration/test/client/pageload.test.ts +++ b/packages/remix/test/integration/test/client/pageload.test.ts @@ -1,5 +1,5 @@ import { expect, test } from '@playwright/test'; -import { Event } from '@sentry/core'; +import type { Event } from '@sentry/core'; import { getFirstSentryEnvelopeRequest } from './utils/helpers'; test('should add `pageload` transaction on load.', async ({ page }) => { diff --git a/packages/remix/test/integration/test/client/root-loader.test.ts b/packages/remix/test/integration/test/client/root-loader.test.ts index 431195e8eab7..e9273fbd6caa 100644 --- a/packages/remix/test/integration/test/client/root-loader.test.ts +++ b/packages/remix/test/integration/test/client/root-loader.test.ts @@ -1,4 +1,4 @@ -import { Page, expect, test } from '@playwright/test'; +import { type Page, expect, test } from '@playwright/test'; async function getRouteData(page: Page): Promise { return page.evaluate('window.__remixContext.state.loaderData').catch(err => { diff --git a/packages/remix/test/integration/test/server/instrumentation/loader.test.ts b/packages/remix/test/integration/test/server/instrumentation/loader.test.ts index a1e257681fa0..eef2a9683813 100644 --- a/packages/remix/test/integration/test/server/instrumentation/loader.test.ts +++ b/packages/remix/test/integration/test/server/instrumentation/loader.test.ts @@ -1,4 +1,4 @@ -import { Event } from '@sentry/core'; +import type { Event } from '@sentry/core'; import { describe, expect, it } from 'vitest'; import { RemixTestEnv, assertSentryEvent, assertSentryTransaction } from '../utils/helpers'; From 41ad7e4d45869c2dddbd54d79c1fcd5265e06858 Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Fri, 9 May 2025 01:11:26 +0100 Subject: [PATCH 2/2] Add Node 24 to the CI matrix --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8996e5f5cf5f..7cfcdb449ea6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -760,7 +760,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 22] + node: [18, 20, 22, 24] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4