Skip to content

Commit 35bcb7c

Browse files
authored
Merge branch 'develop' into cg/next-skip-tunnel-route
2 parents 14d7349 + b4b9e71 commit 35bcb7c

44 files changed

Lines changed: 1099 additions & 34 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.craft.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
minVersion: '0.23.1'
2-
changelogPolicy: simple
2+
changelog:
3+
policy: simple
34
preReleaseCommand: bash scripts/craft-pre-release.sh
45
targets:
56
# NPM Targets

.github/workflows/auto-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ on:
66
branches:
77
- master
88

9-
# This workflow tirggers a release when merging a branch with the pattern `prepare-release/VERSION` into master.
9+
# This workflow triggers a release when merging a branch with the pattern `prepare-release/VERSION` into master.
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
1014
jobs:
1115
release:
1216
runs-on: ubuntu-24.04
@@ -47,7 +51,7 @@ jobs:
4751
node-version-file: 'package.json'
4852

4953
- name: Prepare release
50-
uses: getsentry/action-prepare-release@v1
54+
uses: getsentry/craft@013a7b2113c2cac0ff32d5180cfeaefc7c9ce5b6 # v2.24.1
5155
if:
5256
github.event.pull_request.merged == true && steps.version-regex.outputs.match != '' &&
5357
steps.get_version.outputs.version != ''
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Changelog Preview
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
- edited
9+
- labeled
10+
- unlabeled
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
statuses: write
15+
16+
jobs:
17+
changelog-preview:
18+
uses: getsentry/craft/.github/workflows/changelog-preview.yml@2.24.1
19+
secrets: inherit

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ on:
33
workflow_dispatch:
44
inputs:
55
version:
6-
description: Version to release
7-
required: true
6+
description: Version to release (or "auto")
7+
required: false
88
force:
99
description: Force a release even when there are release-blockers (optional)
1010
required: false
1111
merge_target:
1212
description: Target branch to merge into. Uses the default branch as a fallback (optional)
1313
required: false
1414
default: master
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
1519
jobs:
1620
release:
1721
runs-on: ubuntu-24.04
@@ -32,7 +36,7 @@ jobs:
3236
with:
3337
node-version-file: 'package.json'
3438
- name: Prepare release
35-
uses: getsentry/action-prepare-release@v1
39+
uses: getsentry/craft@013a7b2113c2cac0ff32d5180cfeaefc7c9ce5b6 # v2.24.1
3640
env:
3741
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3842
with:

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/cloudflare-runtime.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForError } from '@sentry-internal/test-utils';
33

4-
test.describe('Cloudflare Runtime', () => {
4+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
5+
test.describe.skip('Cloudflare Runtime', () => {
56
test('Should report cloudflare as the runtime in API route error events', async ({ request }) => {
67
const errorEventPromise = waitForError('nextjs-16-cf-workers', errorEvent => {
78
return !!errorEvent?.exception?.values?.some(value =>

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/isr-routes.test.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForTransaction } from '@sentry-internal/test-utils';
33

4-
test('should remove sentry-trace and baggage meta tags on ISR dynamic route page load', async ({ page }) => {
4+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
5+
test.skip('should remove sentry-trace and baggage meta tags on ISR dynamic route page load', async ({ page }) => {
56
// Navigate to ISR page
67
await page.goto('/isr-test/laptop');
78

@@ -13,7 +14,8 @@ test('should remove sentry-trace and baggage meta tags on ISR dynamic route page
1314
await expect(page.locator('meta[name="baggage"]')).toHaveCount(0);
1415
});
1516

16-
test('should remove sentry-trace and baggage meta tags on ISR static route', async ({ page }) => {
17+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
18+
test.skip('should remove sentry-trace and baggage meta tags on ISR static route', async ({ page }) => {
1719
// Navigate to ISR static page
1820
await page.goto('/isr-test/static');
1921

@@ -25,7 +27,8 @@ test('should remove sentry-trace and baggage meta tags on ISR static route', asy
2527
await expect(page.locator('meta[name="baggage"]')).toHaveCount(0);
2628
});
2729

28-
test('should remove meta tags for different ISR dynamic route values', async ({ page }) => {
30+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
31+
test.skip('should remove meta tags for different ISR dynamic route values', async ({ page }) => {
2932
// Test with 'phone' (one of the pre-generated static params)
3033
await page.goto('/isr-test/phone');
3134
await expect(page.locator('#isr-product-id')).toHaveText('phone');
@@ -41,7 +44,8 @@ test('should remove meta tags for different ISR dynamic route values', async ({
4144
await expect(page.locator('meta[name="baggage"]')).toHaveCount(0);
4245
});
4346

44-
test('should create unique transactions for ISR pages on each visit', async ({ page }) => {
47+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
48+
test.skip('should create unique transactions for ISR pages on each visit', async ({ page }) => {
4549
const traceIds: string[] = [];
4650

4751
// Load the same ISR page 5 times to ensure cached HTML meta tags are consistently removed
@@ -71,7 +75,8 @@ test('should create unique transactions for ISR pages on each visit', async ({ p
7175
expect(uniqueTraceIds.size).toBe(5);
7276
});
7377

74-
test('ISR route should be identified correctly in the route manifest', async ({ page }) => {
78+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
79+
test.skip('ISR route should be identified correctly in the route manifest', async ({ page }) => {
7580
const transactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {
7681
return transactionEvent.transaction === '/isr-test/:product' && transactionEvent.contexts?.trace?.op === 'pageload';
7782
});

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/parameterized-routes.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForTransaction } from '@sentry-internal/test-utils';
33

4-
test('should create a parameterized transaction when the `app` directory is used', async ({ page }) => {
4+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
5+
test.skip('should create a parameterized transaction when the `app` directory is used', async ({ page }) => {
56
const transactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {
67
return (
78
transactionEvent.transaction === '/parameterized/:one' && transactionEvent.contexts?.trace?.op === 'pageload'
@@ -47,7 +48,8 @@ test('should create a parameterized transaction when the `app` directory is used
4748
});
4849
});
4950

50-
test('should create a static transaction when the `app` directory is used and the route is not parameterized', async ({
51+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
52+
test.skip('should create a static transaction when the `app` directory is used and the route is not parameterized', async ({
5153
page,
5254
}) => {
5355
const transactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {
@@ -95,7 +97,8 @@ test('should create a static transaction when the `app` directory is used and th
9597
});
9698
});
9799

98-
test('should create a partially parameterized transaction when the `app` directory is used', async ({ page }) => {
100+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
101+
test.skip('should create a partially parameterized transaction when the `app` directory is used', async ({ page }) => {
99102
const transactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {
100103
return (
101104
transactionEvent.transaction === '/parameterized/:one/beep' && transactionEvent.contexts?.trace?.op === 'pageload'
@@ -141,7 +144,8 @@ test('should create a partially parameterized transaction when the `app` directo
141144
});
142145
});
143146

144-
test('should create a nested parameterized transaction when the `app` directory is used.', async ({ page }) => {
147+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
148+
test.skip('should create a nested parameterized transaction when the `app` directory is used.', async ({ page }) => {
145149
const transactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {
146150
return (
147151
transactionEvent.transaction === '/parameterized/:one/beep/:two' &&

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/prefetch-spans.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { expect, test } from '@playwright/test';
22
import { waitForTransaction } from '@sentry-internal/test-utils';
33
import { isDevMode } from './isDevMode';
44

5-
test('Prefetch client spans should have a http.request.prefetch attribute', async ({ page }) => {
5+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
6+
test.skip('Prefetch client spans should have a http.request.prefetch attribute', async ({ page }) => {
67
test.skip(isDevMode, "Prefetch requests don't have the prefetch header in dev mode");
78

89
const pageloadTransactionPromise = waitForTransaction('nextjs-16-cf-workers', async transactionEvent => {

dev-packages/e2e-tests/test-applications/nextjs-16-cf-workers/tests/streaming-rsc-error.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForError, waitForTransaction } from '@sentry-internal/test-utils';
33

4-
test('Should capture errors for crashing streaming promises in server components when `Sentry.captureRequestError` is added to the `onRequestError` hook', async ({
4+
// TODO(https://github.com/opennextjs/opennextjs-cloudflare/issues/1141): Unskip once opennext supports prefetch-hints.json
5+
test.skip('Should capture errors for crashing streaming promises in server components when `Sentry.captureRequestError` is added to the `onRequestError` hook', async ({
56
page,
67
}) => {
78
const errorEventPromise = waitForError('nextjs-16-cf-workers', errorEvent => {

dev-packages/e2e-tests/test-applications/remix-hydrogen/app/entry.server.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { RemixServer } from '@remix-run/react';
2+
import { generateSentryServerTimingHeader } from '@sentry/remix/cloudflare';
23
import { createContentSecurityPolicy } from '@shopify/hydrogen';
34
import type { EntryContext } from '@shopify/remix-oxygen';
45
import isbot from 'isbot';
@@ -43,8 +44,15 @@ export default async function handleRequest(
4344
// This is required for Sentry's profiling integration
4445
responseHeaders.set('Document-Policy', 'js-profiling');
4546

46-
return new Response(body, {
47+
const response = new Response(body, {
4748
headers: responseHeaders,
4849
status: responseStatusCode,
4950
});
51+
52+
const serverTimingValue = generateSentryServerTimingHeader();
53+
if (serverTimingValue) {
54+
response.headers.append('Server-Timing', serverTimingValue);
55+
}
56+
57+
return response;
5058
}

0 commit comments

Comments
 (0)