Skip to content

Commit f51c7d0

Browse files
authored
Merge pull request #12615 from getsentry/prepare-release/8.12.0
meta(changelog): Update changelog for 8.12.0
2 parents 49b0ce0 + 6f9d57c commit f51c7d0

File tree

85 files changed

+4268
-265
lines changed

Some content is hidden

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

85 files changed

+4268
-265
lines changed

CHANGELOG.md

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

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

7+
## 8.12.0
8+
9+
### Important Changes
10+
11+
- **feat(core): Return client from init method (#12585)**
12+
13+
`Sentry.init()` now returns a client directly, so you don't need to explicitly call `getClient()` anymore:
14+
15+
```js
16+
const client = Sentry.init();
17+
```
18+
19+
- **feat(nextjs): Add `deleteSourcemapsAfterUpload` option (#12457)**
20+
21+
This adds an easy way to delete sourcemaps immediately after uploading them:
22+
23+
```js
24+
module.exports = withSentryConfig(nextConfig, {
25+
sourcemaps: {
26+
deleteSourcemapsAfterUpload: true,
27+
},
28+
});
29+
```
30+
31+
### Other Changes
32+
33+
- feat(feedback): Extra check for iPad in screenshot support (#12593)
34+
- fix(bundle): Ensure CDN bundles do not overwrite `window.Sentry` (#12580)
35+
- ref(node): Add error message to NodeFetch log (#12612)
36+
37+
Work in this release was contributed by @n4bb12. Thank you for your contribution!
38+
739
## 8.11.0
840

941
### Important Changes
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
window.sentryOnLoad = function () {
2+
Sentry.init({});
3+
4+
window.__sentryLoaded = true;
5+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Sentry.forceLoad();
2+
3+
Sentry.captureException('Test exception');
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<script>
6+
window.Sentry = {_customThingOnSentry: 'customThingOnSentry' };
7+
</script>
8+
</head>
9+
<body></body>
10+
</html>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { expect } from '@playwright/test';
2+
3+
import { sentryTest } from '../../../../utils/fixtures';
4+
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
5+
6+
sentryTest('keeps data on window.Sentry intact', async ({ getLocalTestUrl, page }) => {
7+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
8+
return route.fulfill({
9+
status: 200,
10+
contentType: 'application/json',
11+
body: JSON.stringify({ id: 'test-id' }),
12+
});
13+
});
14+
15+
const url = await getLocalTestUrl({ testDir: __dirname });
16+
const req = await waitForErrorRequestOnUrl(page, url);
17+
18+
const eventData = envelopeRequestParser(req);
19+
20+
expect(eventData.message).toBe('Test exception');
21+
22+
const customThingy = await page.evaluate('window.Sentry._customThingOnSentry');
23+
expect(customThingy).toBe('customThingOnSentry');
24+
});

dev-packages/e2e-tests/test-applications/nextjs-app-dir/assert-build.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as fs from 'fs';
2+
import * as path from 'path';
23
import * as assert from 'assert/strict';
34

45
const packageJson = require('./package.json');
@@ -20,4 +21,11 @@ assert.match(buildStdout, /(λ|ƒ) \/server-component/);
2021
assert.match(buildStdout, /(λ|ƒ) \/server-component\/parameter\/\[\.\.\.parameters\]/);
2122
assert.match(buildStdout, /(λ|ƒ) \/server-component\/parameter\/\[parameter\]/);
2223

24+
// Read the contents of the directory
25+
const files = fs.readdirSync(path.join(process.cwd(), '.next', 'server'));
26+
const mapFiles = files.filter(file => path.extname(file) === '.map');
27+
if (mapFiles.length > 0) {
28+
throw new Error('.map files found even though `sourcemaps.deleteSourcemapsAfterUpload` option is set!');
29+
}
30+
2331
export {};

dev-packages/e2e-tests/test-applications/nextjs-app-dir/next.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ const nextConfig = {
99
};
1010

1111
module.exports = withSentryConfig(nextConfig, {
12-
silent: true,
12+
debug: true,
13+
sourcemaps: {
14+
deleteSourcemapsAfterUpload: true,
15+
},
1316
});

dev-packages/e2e-tests/verdaccio-config/config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ packages:
170170
unpublish: $all
171171
# proxy: npmjs # Don't proxy for E2E tests!
172172

173+
'@sentry/nuxt':
174+
access: $all
175+
publish: $all
176+
unpublish: $all
177+
# proxy: npmjs # Don't proxy for E2E tests!
178+
173179
'@sentry/wasm':
174180
access: $all
175181
publish: $all

dev-packages/rollup-utils/bundleHelpers.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ export function makeBaseBundleConfig(options) {
4848
output: {
4949
format: 'iife',
5050
name: 'Sentry',
51+
intro: () => {
52+
return 'exports = window.Sentry || {};';
53+
},
5154
},
5255
context: 'window',
5356
plugins: [rrwebBuildPlugin, markAsBrowserBuildPlugin],

docs/commit-issue-pr-guidelines.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ and committed as such onto `develop`.
2929
- Make sure to rebase the branch on `develop` before squashing it
3030
- Make sure to update the commit message of the squashed branch to follow the commit guidelines - including the PR
3131
number
32+
- If you are a Sentry employee, assign yourself to the PR
3233

3334
Please note that we cannot _enforce_ Squash Merge due to the usage of Gitflow (see below). Github remembers the last
3435
used merge method, so you'll need to make sure to double check that you are using "Squash and Merge" correctly.

0 commit comments

Comments
 (0)