Skip to content

Commit a5cd091

Browse files
authored
Merge pull request getsentry#12637 from getsentry/prepare-release/8.12.0
2 parents f51c7d0 + 944e1ea commit a5cd091

File tree

36 files changed

+546
-254
lines changed

36 files changed

+546
-254
lines changed

.craft.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -160,28 +160,34 @@ targets:
160160
# Sentry Release Registry Target
161161
- name: registry
162162
sdks:
163+
'npm:@sentry/angular':
164+
onlyIfPresent: /^sentry-angular-\d.*\.tgz$/
165+
'npm:@sentry/astro':
166+
onlyIfPresent: /^sentry-astro-\d.*\.tgz$/
167+
'npm:@sentry/aws-serverless':
168+
onlyIfPresent: /^sentry-aws-serverless-\d.*\.tgz$/
163169
'npm:@sentry/browser':
164170
onlyIfPresent: /^sentry-browser-\d.*\.tgz$/
165171
includeNames: /\.js$/
166172
checksums:
167173
- algorithm: sha384
168174
format: base64
169-
'npm:@sentry/node':
170-
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
171-
'npm:@sentry/react':
172-
onlyIfPresent: /^sentry-react-\d.*\.tgz$/
173-
'npm:@sentry/vue':
174-
onlyIfPresent: /^sentry-vue-\d.*\.tgz$/
175+
'npm:@sentry/bun':
176+
onlyIfPresent: /^sentry-bun-\d.*\.tgz$/
177+
'npm:@sentry/deno':
178+
onlyIfPresent: /^sentry-deno-\d.*\.tgz$/
179+
'npm:@sentry/ember':
180+
onlyIfPresent: /^sentry-ember-\d.*\.tgz$/
175181
'npm:@sentry/gatsby':
176182
onlyIfPresent: /^sentry-gatsby-\d.*\.tgz$/
177-
'npm:@sentry/angular':
178-
onlyIfPresent: /^sentry-angular-\d.*\.tgz$/
179-
'npm:@sentry/astro':
180-
onlyIfPresent: /^sentry-astro-\d.*\.tgz$/
181-
'npm:@sentry/wasm':
182-
onlyIfPresent: /^sentry-wasm-\d.*\.tgz$/
183+
'npm:@sentry/google-cloud-serverless':
184+
onlyIfPresent: /^sentry-google-cloud-serverless-\d.*\.tgz$/
183185
'npm:@sentry/nextjs':
184186
onlyIfPresent: /^sentry-nextjs-\d.*\.tgz$/
187+
'npm:@sentry/node':
188+
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
189+
'npm:@sentry/react':
190+
onlyIfPresent: /^sentry-react-\d.*\.tgz$/
185191
'npm:@sentry/remix':
186192
onlyIfPresent: /^sentry-remix-\d.*\.tgz$/
187193
'npm:@sentry/solid':
@@ -190,9 +196,9 @@ targets:
190196
onlyIfPresent: /^sentry-svelte-\d.*\.tgz$/
191197
'npm:@sentry/sveltekit':
192198
onlyIfPresent: /^sentry-sveltekit-\d.*\.tgz$/
193-
'npm:@sentry/bun':
194-
onlyIfPresent: /^sentry-bun-\d.*\.tgz$/
195199
'npm:@sentry/vercel-edge':
196200
onlyIfPresent: /^sentry-vercel-edge-\d.*\.tgz$/
197-
'npm:@sentry/ember':
198-
onlyIfPresent: /^sentry-ember-\d.*\.tgz$/
201+
'npm:@sentry/vue':
202+
onlyIfPresent: /^sentry-vue-\d.*\.tgz$/
203+
'npm:@sentry/wasm':
204+
onlyIfPresent: /^sentry-wasm-\d.*\.tgz$/

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,33 +1477,33 @@ jobs:
14771477
node: 22
14781478

14791479
# macos x64
1480-
- os: macos-11
1480+
- os: macos-13
14811481
node: 16
14821482
arch: x64
1483-
- os: macos-11
1483+
- os: macos-13
14841484
node: 18
14851485
arch: x64
1486-
- os: macos-11
1486+
- os: macos-13
14871487
node: 20
14881488
arch: x64
1489-
- os: macos-11
1489+
- os: macos-13
14901490
node: 22
14911491
arch: x64
14921492

14931493
# macos arm64
1494-
- os: macos-12
1494+
- os: macos-13
14951495
arch: arm64
14961496
node: 16
14971497
target_platform: darwin
1498-
- os: macos-12
1498+
- os: macos-13
14991499
arch: arm64
15001500
node: 18
15011501
target_platform: darwin
1502-
- os: macos-12
1502+
- os: macos-13
15031503
arch: arm64
15041504
node: 20
15051505
target_platform: darwin
1506-
- os: macos-12
1506+
- os: macos-13
15071507
arch: arm64
15081508
node: 22
15091509
target_platform: darwin

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,28 @@
88

99
### Important Changes
1010

11+
- **feat(solid): Remove need to pass router hooks to solid integration** (breaking)
12+
13+
This release introduces breaking changes to the `@sentry/solid` package (which is currently out in alpha).
14+
15+
We've made it easier to get started with the solid router integration by removing the need to pass **use\*** hooks
16+
explicitly to `solidRouterBrowserTracingIntegration`. Import `solidRouterBrowserTracingIntegration` from
17+
`@sentry/solid/solidrouter` and add it to `Sentry.init`
18+
19+
```js
20+
import * as Sentry from '@sentry/solid';
21+
import { solidRouterBrowserTracingIntegration, withSentryRouterRouting } from '@sentry/solid/solidrouter';
22+
import { Router } from '@solidjs/router';
23+
24+
Sentry.init({
25+
dsn: '__PUBLIC_DSN__',
26+
integrations: [solidRouterBrowserTracingIntegration()],
27+
tracesSampleRate: 1.0, // Capture 100% of the transactions
28+
});
29+
30+
const SentryRouter = withSentryRouterRouting(Router);
31+
```
32+
1133
- **feat(core): Return client from init method (#12585)**
1234

1335
`Sentry.init()` now returns a client directly, so you don't need to explicitly call `getClient()` anymore:
@@ -28,10 +50,21 @@ module.exports = withSentryConfig(nextConfig, {
2850
});
2951
```
3052

53+
- **feat(node): Allow to configure `maxSpanWaitDuration` (#12610)**
54+
55+
Adds configuration option for the max. duration in seconds that the SDK will wait for parent spans to be finished before
56+
discarding a span. The SDK will automatically clean up spans that have no finished parent after this duration. This is
57+
necessary to prevent memory leaks in case of parent spans that are never finished or otherwise dropped/missing. However,
58+
if you have very long-running spans in your application, a shorter duration might cause spans to be discarded too early.
59+
In this case, you can increase this duration to a value that fits your expected data.
60+
3161
### Other Changes
3262

3363
- feat(feedback): Extra check for iPad in screenshot support (#12593)
3464
- fix(bundle): Ensure CDN bundles do not overwrite `window.Sentry` (#12580)
65+
- fix(feedback): Inject preact from feedbackModal into feedbackScreenshot integration (#12535)
66+
- fix(node): Re-throw errors from koa middleware (#12609)
67+
- fix(remix): Mark `isRemixV2` as optional in exposed types. (#12614)
3568
- ref(node): Add error message to NodeFetch log (#12612)
3669

3770
Work in this release was contributed by @n4bb12. Thank you for your contribution!

dev-packages/e2e-tests/test-applications/node-koa/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ router1.get('/test-outgoing-http-external-disallowed', async ctx => {
103103
ctx.body = data;
104104
});
105105

106+
router1.get('/test-assert/:condition', async ctx => {
107+
ctx.body = 200;
108+
const condition = ctx.params.condition !== 'false';
109+
ctx.assert(condition, 400, 'ctx.assert failed');
110+
});
111+
106112
app1.use(router1.routes()).use(router1.allowedMethods());
107113

108114
app1.listen(port1);
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { expect, test } from '@playwright/test';
2+
import { waitForError } from '@sentry-internal/test-utils';
3+
4+
test('Returns 400 from failed assert', async ({ baseURL }) => {
5+
const errorEventPromise = waitForError('node-koa', event => {
6+
return !event.type && event.exception?.values?.[0]?.value === 'ctx.assert failed';
7+
});
8+
9+
const res = await fetch(`${baseURL}/test-assert/false`);
10+
expect(res.status).toBe(400);
11+
12+
const errorEvent = await errorEventPromise;
13+
14+
expect(errorEvent.exception?.values).toHaveLength(1);
15+
expect(errorEvent.exception?.values?.[0]?.value).toBe('ctx.assert failed');
16+
17+
expect(errorEvent.request).toEqual({
18+
method: 'GET',
19+
cookies: {},
20+
headers: expect.any(Object),
21+
url: 'http://localhost:3030/test-assert/false',
22+
});
23+
24+
expect(errorEvent.transaction).toEqual('GET /test-assert/:condition');
25+
26+
expect(errorEvent.contexts?.trace).toEqual({
27+
trace_id: expect.any(String),
28+
span_id: expect.any(String),
29+
});
30+
});
31+
32+
test('Returns 200 from successful assert', async ({ baseURL }) => {
33+
const res = await fetch(`${baseURL}/test-assert/true`);
34+
expect(res.status).toBe(200);
35+
});
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* @refresh reload */
22
import * as Sentry from '@sentry/solid';
3-
import { Router, useBeforeLeave, useLocation } from '@solidjs/router';
3+
import { solidRouterBrowserTracingIntegration, withSentryRouterRouting } from '@sentry/solid/solidrouter';
4+
import { Router } from '@solidjs/router';
45
import { render } from 'solid-js/web';
56
import './index.css';
67
import PageRoot from './pageroot';
@@ -10,12 +11,12 @@ Sentry.init({
1011
dsn: import.meta.env.PUBLIC_E2E_TEST_DSN,
1112
debug: true,
1213
environment: 'qa', // dynamic sampling bias to keep transactions
13-
integrations: [Sentry.solidRouterBrowserTracingIntegration({ useBeforeLeave, useLocation })],
14+
integrations: [solidRouterBrowserTracingIntegration()],
1415
release: 'e2e-test',
1516
tunnel: 'http://localhost:3031/', // proxy server
1617
tracesSampleRate: 1.0,
1718
});
1819

19-
const SentryRouter = Sentry.withSentryRouterRouting(Router);
20+
const SentryRouter = withSentryRouterRouting(Router);
2021

2122
render(() => <SentryRouter root={PageRoot}>{routes}</SentryRouter>, document.getElementById('root'));

docs/migration/feedback.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Below you can find a list of relevant feedback changes and issues that have been
1414
We have streamlined the interface for interacting with the Feedback widget. Below is a list of public functions that
1515
existed in 7.x and a description of how they have changed in v8.
1616

17-
| Method Name | Replacement | Notes |
18-
| ------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19-
| `Sentry.getClient<BrowserClient>()?.getIntegration(Feedback)` | `const feedback = Sentry.getFeedback()` | Get a type-safe reference to the configured feedbackIntegration instance. |
20-
| `feedback.getWidget()` | `const widget = feedback.createWidget(); widget.appendToDom()` | The SDK no longer maintains a stack of form instances. If you call `createWidget()` a new widget will be inserted into the DOM and an `ActorComponent` returned allows you control over the lifecycle of the widget. |
21-
| `feedback.openDialog()` | `widget.open()` | Make the form inside the widget visible. |
22-
| `feedback.closeDialog()` | `widget.close()` | Make the form inside the widget hidden in the page. Success/Error messages will still be rendered and will hide themselves if the form was recently submitted. |
23-
| `feedback.removeWidget()` | `widget.removeFromDom()` | Remove the form and widget instance from the page. After calling this `widget.el.parentNode` will be set to null. |
24-
| `feedback.attachTo()` | `const unsubscribe = feedback.attachTo(myButtonElem)` | The `attachTo()` method will create an onClick event listener to your html element that calls `appendToDom()` and `open()`. It returns a callback to remove the event listener. |
25-
| - | `const form = await feedback.createForm()` | A new method `createForm()`, used internally by `createWidget()` and `attachTo()`, returns a `Promise<FeedbackDialog>` so you can control showing and hiding of the feedback form directly. |
17+
| Method Name | Replacement | Notes |
18+
| ------------------------------------------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19+
| `Sentry.getClient<BrowserClient>()?.getIntegration(Feedback)` | `const feedback = Sentry.getFeedback()` | Get a type-safe reference to the configured feedbackIntegration instance. |
20+
| `feedback.getWidget()` | `const widget = feedback.createWidget(); widget.appendToDom()` | The SDK no longer maintains a stack of form instances. If you call `createWidget()` a new widget will be inserted into the DOM and an `ActorComponent` returned allows you control over the lifecycle of the widget. |
21+
| `feedback.openDialog()` | `widget.open()` | Make the form inside the widget visible. |
22+
| `feedback.closeDialog()` | `widget.close()` | Make the form inside the widget hidden in the page. Success/Error messages will still be rendered and will hide themselves if the form was recently submitted. |
23+
| `feedback.removeWidget()` | `widget.removeFromDom()` | Remove the form and widget instance from the page. After calling this `widget.el.parentNode` will be set to null. |
24+
| `feedback.attachTo()` | `const unsubscribe = feedback.attachTo(myButtonElem)` | The `attachTo()` method will create an onClick event listener to your html element that calls `appendToDom()` and `open()`. It returns a callback to remove the event listener. |
25+
| - | `const form = await feedback.createForm()` | A new method `createForm()`, used internally by `createWidget()` and `attachTo()`, returns a `Promise<ReturnType<FeedbackModalIntegration['createDialog']>>` so you can control showing and hiding of the feedback form directly. |
2626

2727
### API Examples
2828

docs/publishing-a-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ _These steps are only relevant to Sentry employees when preparing and publishing
1313
4. Open a PR with the title `meta(changelog): Update changelog for VERSION` against `master` branch.
1414
5. **Be cautious!** The PR against `master` should be merged via "Merge Commit"
1515
6. When the PR is merged, it will automatically trigger the
16-
[Prepare Release](https://github.com/getsentry/sentry-javascript/actions/workflows/release.yml) on master.
16+
[Auto Prepare Release](https://github.com/getsentry/sentry-javascript/actions/workflows/auto-release.yml) on master.
1717
7. A new issue should appear in https://github.com/getsentry/publish/issues.
1818
8. Wait until the CI check runs have finished successfully (there is a link to them in the issue).
1919
9. Once CI passes successfully, ask a member of the

0 commit comments

Comments
 (0)