Skip to content

Commit d4aaa3a

Browse files
authored
Merge pull request #12280 from getsentry/prepare-release/8.7.0
meta: Add Changelog entry for 8.7.0
2 parents 264675d + 9b09cb2 commit d4aaa3a

File tree

89 files changed

+2688
-962
lines changed

Some content is hidden

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

89 files changed

+2688
-962
lines changed

.github/workflows/build.yml

+85-1
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,6 @@ jobs:
10011001
'create-remix-app-v2',
10021002
'create-remix-app-express',
10031003
'create-remix-app-express-vite-dev',
1004-
'debug-id-sourcemaps',
10051004
'node-express-esm-loader',
10061005
'node-express-esm-preload',
10071006
'node-express-esm-without-loader',
@@ -1018,6 +1017,7 @@ jobs:
10181017
'sveltekit',
10191018
'sveltekit-2',
10201019
'sveltekit-2-svelte-5',
1020+
'tanstack-router',
10211021
'generic-ts3.8',
10221022
'node-fastify',
10231023
'node-hapi',
@@ -1113,6 +1113,90 @@ jobs:
11131113
directory: dist
11141114
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
11151115

1116+
job_optional_e2e_tests:
1117+
name: E2E ${{ matrix.label || matrix.test-application }} Test
1118+
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
1119+
# We need to add the `always()` check here because the previous step has this as well :(
1120+
# See: https://github.com/actions/runner/issues/2205
1121+
if:
1122+
always() && needs.job_e2e_prepare.result == 'success' &&
1123+
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
1124+
needs: [job_get_metadata, job_build, job_e2e_prepare]
1125+
runs-on: ubuntu-20.04
1126+
timeout-minutes: 10
1127+
env:
1128+
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
1129+
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
1130+
# Needed because some apps expect a certain prefix
1131+
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
1132+
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
1133+
REACT_APP_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
1134+
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
1135+
E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests'
1136+
strategy:
1137+
fail-fast: false
1138+
matrix:
1139+
is_dependabot:
1140+
- ${{ github.actor == 'dependabot[bot]' }}
1141+
test-application:
1142+
[
1143+
'react-send-to-sentry',
1144+
'node-express-send-to-sentry',
1145+
'debug-id-sourcemaps',
1146+
]
1147+
build-command:
1148+
- false
1149+
label:
1150+
- false
1151+
1152+
steps:
1153+
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
1154+
uses: actions/checkout@v4
1155+
with:
1156+
ref: ${{ env.HEAD_COMMIT }}
1157+
- uses: pnpm/action-setup@v2
1158+
with:
1159+
version: 8.3.1
1160+
- name: Set up Node
1161+
uses: actions/setup-node@v4
1162+
with:
1163+
node-version-file: 'dev-packages/e2e-tests/package.json'
1164+
- name: Restore caches
1165+
uses: ./.github/actions/restore-cache
1166+
env:
1167+
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
1168+
1169+
- name: Restore tarball cache
1170+
uses: actions/cache/restore@v4
1171+
with:
1172+
path: ${{ github.workspace }}/packages/*/*.tgz
1173+
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
1174+
1175+
- name: Get node version
1176+
id: versions
1177+
run: |
1178+
echo "echo node=$(jq -r '.volta.node' dev-packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT
1179+
1180+
- name: Validate Verdaccio
1181+
run: yarn test:validate
1182+
working-directory: dev-packages/e2e-tests
1183+
1184+
- name: Prepare Verdaccio
1185+
run: yarn test:prepare
1186+
working-directory: dev-packages/e2e-tests
1187+
env:
1188+
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
1189+
1190+
- name: Build E2E app
1191+
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1192+
timeout-minutes: 5
1193+
run: yarn ${{ matrix.build-command || 'test:build' }}
1194+
1195+
- name: Run E2E test
1196+
working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}
1197+
timeout-minutes: 5
1198+
run: yarn test:assert
1199+
11161200
job_profiling_e2e_tests:
11171201
name: E2E ${{ matrix.label || matrix.test-application }} Test
11181202
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks

.size-limit.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ module.exports = [
149149
name: 'CDN Bundle (incl. Tracing, Replay)',
150150
path: createCDNPath('bundle.tracing.replay.min.js'),
151151
gzip: true,
152-
limit: '70 KB',
152+
limit: '72 KB',
153153
},
154154
{
155155
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
@@ -170,7 +170,7 @@ module.exports = [
170170
path: createCDNPath('bundle.tracing.min.js'),
171171
gzip: false,
172172
brotli: false,
173-
limit: '105 KB',
173+
limit: '110 KB',
174174
},
175175
{
176176
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,35 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
## 8.7.0
8+
9+
### Important Changes
10+
11+
- **feat(react): Add TanStack Router integration (#12095)**
12+
13+
This release adds instrumentation for TanStack router with a new `tanstackRouterBrowserTracingIntegration` in the
14+
`@sentry/react` SDK:
15+
16+
```javascript
17+
import * as Sentry from '@sentry/react';
18+
import { createRouter } from '@tanstack/react-router';
19+
20+
const router = createRouter({
21+
// Your router options...
22+
});
23+
24+
Sentry.init({
25+
dsn: '___PUBLIC_DSN___',
26+
integrations: [Sentry.tanstackRouterBrowserTracingIntegration(router)],
27+
tracesSampleRate: 1.0,
28+
});
29+
```
30+
31+
### Other Changes
32+
33+
- fix(nextjs): Do not hide `sourceMappingURL` comment on client when `nextConfig.productionBrowserSourceMaps: true` is
34+
set (#12278)
35+
736
## 8.6.0
837

938
### Important Changes

dev-packages/e2e-tests/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@
2222
"dotenv": "16.0.3",
2323
"esbuild": "0.20.0",
2424
"glob": "8.0.3",
25-
"rimraf": "^3.0.2",
2625
"ts-node": "10.9.1",
2726
"yaml": "2.2.2"
2827
},
2928
"volta": {
30-
"node": "18.20.2",
31-
"yarn": "1.22.22",
29+
"extends": "../../package.json",
3230
"pnpm": "8.15.8"
3331
}
3432
}

dev-packages/e2e-tests/test-applications/angular-17/playwright.config.ts

-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import type { PlaywrightTestConfig } from '@playwright/test';
22
import { devices } from '@playwright/test';
33

4-
// Fix urls not resolving to localhost on Node v17+
5-
// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575
6-
import { setDefaultResultOrder } from 'dns';
7-
setDefaultResultOrder('ipv4first');
8-
94
const testEnv = process.env['TEST_ENV'] || 'production';
105

116
if (!testEnv) {

dev-packages/e2e-tests/test-applications/angular-18/playwright.config.ts

-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import type { PlaywrightTestConfig } from '@playwright/test';
22
import { devices } from '@playwright/test';
33

4-
// Fix urls not resolving to localhost on Node v17+
5-
// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575
6-
import { setDefaultResultOrder } from 'dns';
7-
setDefaultResultOrder('ipv4first');
8-
94
const testEnv = process.env['TEST_ENV'] || 'production';
105

116
if (!testEnv) {

dev-packages/e2e-tests/test-applications/create-next-app/playwright.config.ts

-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import type { PlaywrightTestConfig } from '@playwright/test';
22
import { devices } from '@playwright/test';
33

4-
// Fix urls not resolving to localhost on Node v17+
5-
// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575
6-
import { setDefaultResultOrder } from 'dns';
7-
setDefaultResultOrder('ipv4first');
8-
94
const testEnv = process.env.TEST_ENV;
105

116
if (!testEnv) {

dev-packages/e2e-tests/test-applications/create-next-app/tests/behaviour-client.test.ts

+26-57
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expect, test } from '@playwright/test';
2-
import axios, { AxiosError } from 'axios';
32

43
const authToken = process.env.E2E_TEST_AUTH_TOKEN;
54
const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG;
@@ -20,24 +19,12 @@ test('Sends a client-side exception to Sentry', async ({ page }) => {
2019
await expect
2120
.poll(
2221
async () => {
23-
try {
24-
const response = await axios.get(
25-
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${exceptionEventId}/`,
26-
{ headers: { Authorization: `Bearer ${authToken}` } },
27-
);
28-
29-
return response.status;
30-
} catch (e) {
31-
if (e instanceof AxiosError && e.response) {
32-
if (e.response.status !== 404) {
33-
throw e;
34-
} else {
35-
return e.response.status;
36-
}
37-
} else {
38-
throw e;
39-
}
40-
}
22+
const response = await fetch(
23+
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${exceptionEventId}/`,
24+
{ headers: { Authorization: `Bearer ${authToken}` } },
25+
);
26+
27+
return response.status;
4128
},
4229
{
4330
timeout: EVENT_POLLING_TIMEOUT,
@@ -71,28 +58,19 @@ test('Sends a pageload transaction to Sentry', async ({ page }) => {
7158
await expect
7259
.poll(
7360
async () => {
74-
try {
75-
const response = await axios.get(
76-
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`,
77-
{ headers: { Authorization: `Bearer ${authToken}` } },
78-
);
79-
80-
if (response.data.contexts.trace.op === 'pageload') {
61+
const response = await fetch(
62+
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`,
63+
{ headers: { Authorization: `Bearer ${authToken}` } },
64+
);
65+
66+
if (response.ok) {
67+
const data = await response.json();
68+
if (data.contexts.trace.op === 'pageload') {
8169
hadPageLoadTransaction = true;
8270
}
83-
84-
return response.status;
85-
} catch (e) {
86-
if (e instanceof AxiosError && e.response) {
87-
if (e.response.status !== 404) {
88-
throw e;
89-
} else {
90-
return e.response.status;
91-
}
92-
} else {
93-
throw e;
94-
}
9571
}
72+
73+
return response.status;
9674
},
9775
{
9876
timeout: EVENT_POLLING_TIMEOUT,
@@ -136,28 +114,19 @@ test('Sends a navigation transaction to Sentry', async ({ page }) => {
136114
await expect
137115
.poll(
138116
async () => {
139-
try {
140-
const response = await axios.get(
141-
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`,
142-
{ headers: { Authorization: `Bearer ${authToken}` } },
143-
);
144-
145-
if (response.data.contexts.trace.op === 'navigation') {
117+
const response = await fetch(
118+
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${transactionEventId}/`,
119+
{ headers: { Authorization: `Bearer ${authToken}` } },
120+
);
121+
122+
if (response.ok) {
123+
const data = await response.json();
124+
if (data.contexts.trace.op === 'navigation') {
146125
hadPageNavigationTransaction = true;
147126
}
148-
149-
return response.status;
150-
} catch (e) {
151-
if (e instanceof AxiosError && e.response) {
152-
if (e.response.status !== 404) {
153-
throw e;
154-
} else {
155-
return e.response.status;
156-
}
157-
} else {
158-
throw e;
159-
}
160127
}
128+
129+
return response.status;
161130
},
162131
{
163132
timeout: EVENT_POLLING_TIMEOUT,

dev-packages/e2e-tests/test-applications/create-next-app/tests/behaviour-server.test.ts

+4-31
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expect, test } from '@playwright/test';
2-
import axios, { AxiosError } from 'axios';
32

43
const authToken = process.env.E2E_TEST_AUTH_TOKEN;
54
const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG;
@@ -18,21 +17,8 @@ test('Sends a server-side exception to Sentry', async ({ baseURL }) => {
1817
await expect
1918
.poll(
2019
async () => {
21-
try {
22-
const response = await axios.get(url, { headers: { Authorization: `Bearer ${authToken}` } });
23-
24-
return response.status;
25-
} catch (e) {
26-
if (e instanceof AxiosError && e.response) {
27-
if (e.response.status !== 404) {
28-
throw e;
29-
} else {
30-
return e.response.status;
31-
}
32-
} else {
33-
throw e;
34-
}
35-
}
20+
const response = await fetch(url, { headers: { Authorization: `Bearer ${authToken}` } });
21+
return response.status;
3622
},
3723
{ timeout: EVENT_POLLING_TIMEOUT },
3824
)
@@ -53,21 +39,8 @@ test('Sends server-side transactions to Sentry', async ({ baseURL }) => {
5339
await expect
5440
.poll(
5541
async () => {
56-
try {
57-
const response = await axios.get(url, { headers: { Authorization: `Bearer ${authToken}` } });
58-
59-
return response.status;
60-
} catch (e) {
61-
if (e instanceof AxiosError && e.response) {
62-
if (e.response.status !== 404) {
63-
throw e;
64-
} else {
65-
return e.response.status;
66-
}
67-
} else {
68-
throw e;
69-
}
70-
}
42+
const response = await fetch(url, { headers: { Authorization: `Bearer ${authToken}` } });
43+
return response.status;
7144
},
7245
{ timeout: EVENT_POLLING_TIMEOUT },
7346
)

0 commit comments

Comments
 (0)