Skip to content

Commit 561a7d1

Browse files
authored
Merge pull request #11916 from getsentry/prepare-release/v8.0.0-rc.0
meta(changelog): Update changelog for 8.0.0-rc.0
2 parents ae83bab + 03eb9a1 commit 561a7d1

File tree

55 files changed

+854
-756
lines changed

Some content is hidden

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

55 files changed

+854
-756
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ jobs:
10171017
'generic-ts3.8',
10181018
'node-fastify-app',
10191019
# TODO(v8): Re-enable hapi tests
1020-
# 'node-hapi-app',
1020+
'node-hapi',
10211021
'node-nestjs-app',
10221022
'node-exports-test-app',
10231023
'node-koa-app',

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@
44

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

7+
## 8.0.0-rc.0
8+
9+
This is the first release candidate of Sentry JavaScript SDK v8. Except for missing ESM support, this version is
10+
considered stable.
11+
12+
We recommend to read the detailed [migration guide](https://docs.sentry.io/platforms/javascript/migration/v7-to-v8/) in
13+
the docs.
14+
15+
### Important Changes
16+
17+
- **feat(node): Support hapi v21 & fix E2E test (#11906)**
18+
19+
We now support hapi v21 and added tests for it.
20+
21+
- **feat(node): Warn if ESM mode is detected (#11914)**
22+
23+
When running Sentry in ESM mode, we will now warn you that this is not supported as of now. We are working on ensuring
24+
support with ESM builds.
25+
26+
### Other Changes
27+
28+
- feat(feedback): Iterate on css for better scrolling & resizing when browser is small (#11893)
29+
- fix(node): Ensure prisma integration creates valid DB spans (#11908)
30+
- fix(node): Include loader hook files in package.json (#11911)
31+
732
## 8.0.0-beta.6
833

934
This beta release contains various bugfixes and improvements for the v8 beta cycle.

dev-packages/browser-integration-tests/suites/feedback/captureFeedback/test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { expect } from '@playwright/test';
22

3-
import { sentryTest } from '../../../utils/fixtures';
3+
import { TEST_HOST, sentryTest } from '../../../utils/fixtures';
44
import { envelopeRequestParser, getEnvelopeType, shouldSkipFeedbackTest } from '../../../utils/helpers';
55

6-
sentryTest('should capture feedback', async ({ getLocalTestPath, page }) => {
6+
sentryTest('should capture feedback', async ({ getLocalTestUrl, page }) => {
77
if (shouldSkipFeedbackTest()) {
88
sentryTest.skip();
99
}
@@ -31,7 +31,7 @@ sentryTest('should capture feedback', async ({ getLocalTestPath, page }) => {
3131
});
3232
});
3333

34-
const url = await getLocalTestPath({ testDir: __dirname });
34+
const url = await getLocalTestUrl({ testDir: __dirname });
3535

3636
await page.goto(url);
3737
await page.getByText('Report a Bug').click();
@@ -51,7 +51,7 @@ sentryTest('should capture feedback', async ({ getLocalTestPath, page }) => {
5151
message: 'my example feedback',
5252
name: 'Jane Doe',
5353
source: 'widget',
54-
url: expect.stringContaining('/dist/index.html'),
54+
url: `${TEST_HOST}/index.html`,
5555
},
5656
trace: {
5757
trace_id: expect.stringMatching(/\w{32}/),
@@ -69,7 +69,7 @@ sentryTest('should capture feedback', async ({ getLocalTestPath, page }) => {
6969
packages: expect.anything(),
7070
},
7171
request: {
72-
url: expect.stringContaining('/dist/index.html'),
72+
url: `${TEST_HOST}/index.html`,
7373
headers: {
7474
'User-Agent': expect.stringContaining(''),
7575
},

dev-packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/hasSampling/test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from '@playwright/test';
22

3-
import { sentryTest } from '../../../../utils/fixtures';
3+
import { TEST_HOST, sentryTest } from '../../../../utils/fixtures';
44
import { envelopeRequestParser, getEnvelopeType, shouldSkipFeedbackTest } from '../../../../utils/helpers';
55
import {
66
collectReplayRequests,
@@ -9,7 +9,7 @@ import {
99
waitForReplayRequest,
1010
} from '../../../../utils/replayHelpers';
1111

12-
sentryTest('should capture feedback', async ({ forceFlushReplay, getLocalTestPath, page }) => {
12+
sentryTest('should capture feedback', async ({ forceFlushReplay, getLocalTestUrl, page }) => {
1313
if (shouldSkipFeedbackTest() || shouldSkipReplayTest()) {
1414
sentryTest.skip();
1515
}
@@ -39,7 +39,7 @@ sentryTest('should capture feedback', async ({ forceFlushReplay, getLocalTestPat
3939
});
4040
});
4141

42-
const url = await getLocalTestPath({ testDir: __dirname });
42+
const url = await getLocalTestUrl({ testDir: __dirname });
4343

4444
await Promise.all([page.goto(url), page.getByText('Report a Bug').click(), reqPromise0]);
4545

@@ -87,7 +87,7 @@ sentryTest('should capture feedback', async ({ forceFlushReplay, getLocalTestPat
8787
name: 'Jane Doe',
8888
replay_id: replayEvent.event_id,
8989
source: 'widget',
90-
url: expect.stringContaining('/dist/index.html'),
90+
url: `${TEST_HOST}/index.html`,
9191
},
9292
trace: {
9393
trace_id: expect.stringMatching(/\w{32}/),
@@ -105,7 +105,7 @@ sentryTest('should capture feedback', async ({ forceFlushReplay, getLocalTestPat
105105
packages: expect.anything(),
106106
},
107107
request: {
108-
url: expect.stringContaining('/dist/index.html'),
108+
url: `${TEST_HOST}/index.html`,
109109
headers: {
110110
'User-Agent': expect.stringContaining(''),
111111
},

dev-packages/browser-integration-tests/suites/replay/slowClick/windowOpen/test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ sentryTest('window.open() is considered for slow click', async ({ getLocalTestUr
1616
});
1717
});
1818

19+
await page.route('http://example.com/', route => {
20+
return route.fulfill({
21+
status: 200,
22+
contentType: 'application/json',
23+
body: JSON.stringify({}),
24+
});
25+
});
26+
1927
const url = await getLocalTestUrl({ testDir: __dirname });
2028

2129
await Promise.all([waitForReplayRequest(page, 0), page.goto(url)]);

dev-packages/browser-integration-tests/suites/tracing/trace-lifetime/navigation/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,12 @@ sentryTest(
311311

312312
sentryTest(
313313
'user feedback event after navigation has navigation traceId in headers',
314-
async ({ getLocalTestPath, page }) => {
314+
async ({ getLocalTestUrl, page }) => {
315315
if (shouldSkipTracingTest() || shouldSkipFeedbackTest()) {
316316
sentryTest.skip();
317317
}
318318

319-
const url = await getLocalTestPath({ testDir: __dirname });
319+
const url = await getLocalTestUrl({ testDir: __dirname });
320320

321321
// ensure pageload transaction is finished
322322
await getFirstSentryEnvelopeRequest<Event>(page, url);

dev-packages/browser-integration-tests/suites/tracing/trace-lifetime/pageload-meta/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,12 @@ sentryTest(
297297
},
298298
);
299299

300-
sentryTest('user feedback event after pageload has pageload traceId in headers', async ({ getLocalTestPath, page }) => {
300+
sentryTest('user feedback event after pageload has pageload traceId in headers', async ({ getLocalTestUrl, page }) => {
301301
if (shouldSkipTracingTest() || shouldSkipFeedbackTest()) {
302302
sentryTest.skip();
303303
}
304304

305-
const url = await getLocalTestPath({ testDir: __dirname });
305+
const url = await getLocalTestUrl({ testDir: __dirname });
306306

307307
const pageloadEvent = await getFirstSentryEnvelopeRequest<Event>(page, url);
308308
const pageloadTraceContext = pageloadEvent.contexts?.trace;

dev-packages/browser-integration-tests/suites/tracing/trace-lifetime/pageload/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,12 @@ sentryTest(
294294
},
295295
);
296296

297-
sentryTest('user feedback event after pageload has pageload traceId in headers', async ({ getLocalTestPath, page }) => {
297+
sentryTest('user feedback event after pageload has pageload traceId in headers', async ({ getLocalTestUrl, page }) => {
298298
if (shouldSkipTracingTest() || shouldSkipFeedbackTest()) {
299299
sentryTest.skip();
300300
}
301301

302-
const url = await getLocalTestPath({ testDir: __dirname });
302+
const url = await getLocalTestUrl({ testDir: __dirname });
303303

304304
const pageloadEvent = await getFirstSentryEnvelopeRequest<Event>(page, url);
305305
const pageloadTraceContext = pageloadEvent.contexts?.trace;

dev-packages/browser-integration-tests/utils/fixtures.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from 'path';
33
/* eslint-disable no-empty-pattern */
44
import { test as base } from '@playwright/test';
55

6+
import { SDK_VERSION } from '@sentry/browser';
67
import { generatePage } from './generatePage';
78

89
export const TEST_HOST = 'http://sentry-test.io';
@@ -63,6 +64,17 @@ const sentryTest = base.extend<TestFixtures>({
6364

6465
return fs.existsSync(filePath) ? route.fulfill({ path: filePath }) : route.continue();
6566
});
67+
68+
// Ensure feedback can be lazy loaded
69+
await page.route(`https://browser.sentry-cdn.com/${SDK_VERSION}/feedback-modal.min.js`, route => {
70+
const filePath = path.resolve(testDir, './dist/feedback-modal.bundle.js');
71+
return fs.existsSync(filePath) ? route.fulfill({ path: filePath }) : route.continue();
72+
});
73+
74+
await page.route(`https://browser.sentry-cdn.com/${SDK_VERSION}/feedback-screenshot.min.js`, route => {
75+
const filePath = path.resolve(testDir, './dist/feedback-screenshot.bundle.js');
76+
return fs.existsSync(filePath) ? route.fulfill({ path: filePath }) : route.continue();
77+
});
6678
}
6779

6880
return pagePath;

dev-packages/browser-integration-tests/utils/generatePlugin.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ const BUNDLE_PATHS: Record<string, Record<string, string>> = {
6363
bundle: 'build/bundles/[INTEGRATION_NAME].js',
6464
bundle_min: 'build/bundles/[INTEGRATION_NAME].min.js',
6565
},
66+
feedback: {
67+
bundle: 'build/bundles/[INTEGRATION_NAME].js',
68+
bundle_min: 'build/bundles/[INTEGRATION_NAME].min.js',
69+
},
6670
wasm: {
6771
cjs: 'build/npm/cjs/index.js',
6872
esm: 'build/npm/esm/index.js',
@@ -225,6 +229,24 @@ class SentryScenarioGenerationPlugin {
225229
.replace('_tracing', '')
226230
.replace('_feedback', '');
227231

232+
// For feedback bundle, make sure to add modal & screenshot integrations
233+
if (bundleKey.includes('_feedback')) {
234+
['feedback-modal', 'feedback-screenshot'].forEach(integration => {
235+
const fileName = `${integration}.bundle.js`;
236+
237+
// We add the files, but not a script tag - they are lazy-loaded
238+
addStaticAssetSymlink(
239+
this.localOutPath,
240+
path.resolve(
241+
PACKAGES_DIR,
242+
'feedback',
243+
BUNDLE_PATHS['feedback'][integrationBundleKey].replace('[INTEGRATION_NAME]', integration),
244+
),
245+
fileName,
246+
);
247+
});
248+
}
249+
228250
this.requiredIntegrations.forEach(integration => {
229251
const fileName = `${integration}.bundle.js`;
230252
addStaticAssetSymlink(

dev-packages/browser-integration-tests/utils/helpers.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,8 @@ export function shouldSkipTracingTest(): boolean {
248248
* @returns `true` if we should skip the feedback test
249249
*/
250250
export function shouldSkipFeedbackTest(): boolean {
251-
// TODO(fn): For now we are skipping feedback tests in all bundles, until we have a proper way to test them.
252-
// We need to make sure lazy loading works on release branches...
253251
const bundle = process.env.PW_BUNDLE as string | undefined;
254-
return !!bundle && bundle.startsWith('bundle');
252+
return bundle != null && !bundle.includes('feedback') && !bundle.includes('esm') && !bundle.includes('cjs');
255253
}
256254

257255
/**

0 commit comments

Comments
 (0)