Skip to content

Commit 7011146

Browse files
authored
Merge branch 'develop' into sig/nitro-utils
2 parents 199e5a6 + 9581a2e commit 7011146

File tree

1,064 files changed

+7175
-4593
lines changed

Some content is hidden

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

1,064 files changed

+7175
-4593
lines changed

.craft.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ targets:
55
# NPM Targets
66
## 1. Base Packages, node or browser SDKs depend on
77
## 1.1 Types
8+
# TODO(v9): Remove
89
- name: npm
910
id: '@sentry/types'
1011
includeNames: /^sentry-types-\d.*\.tgz$/
1112
## 1.2 Utils
13+
# TODO(v9): Remove
1214
- name: npm
1315
id: '@sentry/utils'
1416
includeNames: /^sentry-utils-\d.*\.tgz$/
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
fail-on-severity: 'high'
22
allow-ghsas:
33
# dependency review does not allow specific file exclusions
4-
# we use an older version of NextJS in our tests and thus need to
4+
# we use an older version of NextJS in our tests and thus need to
55
# exclude this
66
# once our minimum supported version is over 14.1.1 this can be removed
77
- GHSA-fr5h-rqp8-mj6g
8+
# we need this for an E2E test for the minimum required version of Nuxt 3.7.0
9+
- GHSA-v784-fjjh-f8r4

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ jobs:
387387
if: github.event_name != 'pull_request'
388388

389389
- name: Compute test coverage
390-
uses: codecov/codecov-action@v4
390+
uses: codecov/codecov-action@v5
391391
with:
392392
token: ${{ secrets.CODECOV_TOKEN }}
393393

@@ -491,7 +491,7 @@ jobs:
491491
NODE_VERSION: ${{ matrix.node }}
492492

493493
- name: Compute test coverage
494-
uses: codecov/codecov-action@v4
494+
uses: codecov/codecov-action@v5
495495
with:
496496
token: ${{ secrets.CODECOV_TOKEN }}
497497

@@ -1408,6 +1408,10 @@ jobs:
14081408
key: ${{ needs.job_build.outputs.dependency_cache_key }}
14091409
enableCrossOsArchive: true
14101410

1411+
- name: Increase yarn network timeout on Windows
1412+
if: contains(matrix.os, 'windows')
1413+
run: yarn config set network-timeout 600000 -g
1414+
14111415
- name: Install dependencies
14121416
env:
14131417
SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1"
@@ -1418,10 +1422,6 @@ jobs:
14181422
run: |
14191423
git config --global --add safe.directory "*"
14201424
1421-
- name: Increase yarn network timeout on Windows
1422-
if: contains(matrix.os, 'windows')
1423-
run: yarn config set network-timeout 600000 -g
1424-
14251425
- name: Setup python
14261426
uses: actions/setup-python@v5
14271427
if: ${{ !contains(matrix.container, 'alpine') }}

.size-limit.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = [
4040
path: 'packages/browser/build/npm/esm/index.js',
4141
import: createImport('init', 'browserTracingIntegration'),
4242
gzip: true,
43-
limit: '36.5 KB',
43+
limit: '37.5 KB',
4444
},
4545
{
4646
name: '@sentry/browser (incl. Tracing, Replay)',
@@ -124,22 +124,22 @@ module.exports = [
124124
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
125125
ignore: ['react/jsx-runtime'],
126126
gzip: true,
127-
limit: '39.5 KB',
127+
limit: '40.5 KB',
128128
},
129129
// Vue SDK (ESM)
130130
{
131131
name: '@sentry/vue',
132132
path: 'packages/vue/build/esm/index.js',
133133
import: createImport('init'),
134134
gzip: true,
135-
limit: '28 KB',
135+
limit: '29 KB',
136136
},
137137
{
138138
name: '@sentry/vue (incl. Tracing)',
139139
path: 'packages/vue/build/esm/index.js',
140140
import: createImport('init', 'browserTracingIntegration'),
141141
gzip: true,
142-
limit: '38.5 KB',
142+
limit: '39.5 KB',
143143
},
144144
// Svelte SDK (ESM)
145145
{
@@ -219,7 +219,7 @@ module.exports = [
219219
import: createImport('init'),
220220
ignore: ['$app/stores'],
221221
gzip: true,
222-
limit: '37 KB',
222+
limit: '38 KB',
223223
},
224224
// Node SDK (ESM)
225225
{

CHANGELOG.md

Lines changed: 144 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,150 @@
1010

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

13-
Work in this release was contributed by @NEKOYASAN. Thank you for your contribution!
13+
## 8.42.0
14+
15+
### Important Changes
16+
17+
- **feat(react): React Router v7 support (library) ([#14513](https://github.com/getsentry/sentry-javascript/pull/14513))**
18+
19+
This release adds support for [React Router v7 (library mode)](https://reactrouter.com/home#react-router-as-a-library).
20+
Check out the docs on how to set up the integration: [Sentry React Router v7 Integration Docs](https://docs.sentry.io/platforms/javascript/guides/react/features/react-router/v7/)
21+
22+
### Deprecations
23+
24+
- **feat: Warn about source-map generation ([#14533](https://github.com/getsentry/sentry-javascript/pull/14533))**
25+
26+
In the next major version of the SDK we will change how source maps are generated when the SDK is added to an application.
27+
Currently, the implementation varies a lot between different SDKs and can be difficult to understand.
28+
Moving forward, our goal is to turn on source maps for every framework, unless we detect that they are explicitly turned off.
29+
Additionally, if we end up enabling source maps, we will emit a log message that we did so.
30+
31+
With this particular release, we are emitting warnings that source map generation will change in the future and we print instructions on how to prepare for the next major.
32+
33+
- **feat(nuxt): Deprecate `tracingOptions` in favor of `vueIntegration` ([#14530](https://github.com/getsentry/sentry-javascript/pull/14530))**
34+
35+
Currently it is possible to configure tracing options in two places in the Sentry Nuxt SDK:
36+
37+
- In `Sentry.init()`
38+
- Inside `tracingOptions` in `Sentry.init()`
39+
40+
For tree-shaking purposes and alignment with the Vue SDK, it is now recommended to instead use the newly exported `vueIntegration()` and its `tracingOptions` option to configure tracing options in the Nuxt SDK:
41+
42+
```ts
43+
// sentry.client.config.ts
44+
import * as Sentry from '@sentry/nuxt';
45+
46+
Sentry.init({
47+
// ...
48+
integrations: [
49+
Sentry.vueIntegration({
50+
tracingOptions: {
51+
trackComponents: true,
52+
},
53+
}),
54+
],
55+
});
56+
```
57+
58+
### Other Changes
59+
60+
- feat(browser-utils): Update `web-vitals` to v4.2.4 ([#14439](https://github.com/getsentry/sentry-javascript/pull/14439))
61+
- feat(nuxt): Expose `vueIntegration` ([#14526](https://github.com/getsentry/sentry-javascript/pull/14526))
62+
- fix(feedback): Handle css correctly in screenshot mode ([#14535](https://github.com/getsentry/sentry-javascript/pull/14535))
63+
64+
## 8.41.0
65+
66+
### Important Changes
67+
68+
- **meta(nuxt): Require minimum Nuxt v3.7.0 ([#14473](https://github.com/getsentry/sentry-javascript/pull/14473))**
69+
70+
We formalized that the Nuxt SDK is at minimum compatible with Nuxt version 3.7.0 and above.
71+
Additionally, the SDK requires the implicit `nitropack` dependency to satisfy version `^2.10.0` and `ofetch` to satisfy `^1.4.0`.
72+
It is recommended to check your lock-files and manually upgrade these dependencies if they don't match the version ranges.
73+
74+
### Deprecations
75+
76+
We are deprecating a few APIs which will be removed in the next major.
77+
78+
The following deprecations will _potentially_ affect you:
79+
80+
- **feat(core): Update & deprecate `undefined` option handling ([#14450](https://github.com/getsentry/sentry-javascript/pull/14450))**
81+
82+
In the next major version we will change how passing `undefined` to `tracesSampleRate` / `tracesSampler` / `enableTracing` will behave.
83+
84+
Currently, doing the following:
85+
86+
```ts
87+
Sentry.init({
88+
tracesSampleRate: undefined,
89+
});
90+
```
91+
92+
Will result in tracing being _enabled_ (although no spans will be generated) because the `tracesSampleRate` key is present in the options object.
93+
In the next major version, this behavior will be changed so that passing `undefined` (or rather having a `tracesSampleRate` key) will result in tracing being disabled, the same as not passing the option at all.
94+
If you are currently relying on `undefined` being passed, and and thus have tracing enabled, it is recommended to update your config to set e.g. `tracesSampleRate: 0` instead, which will also enable tracing in v9.
95+
96+
The same applies to `tracesSampler` and `enableTracing`.
97+
98+
- **feat(core): Log warnings when returning `null` in `beforeSendSpan` ([#14433](https://github.com/getsentry/sentry-javascript/pull/14433))**
99+
100+
Currently, the `beforeSendSpan` option in `Sentry.init()` allows you to drop individual spans from a trace by returning `null` from the hook.
101+
Since this API lends itself to creating "gaps" inside traces, we decided to change how this API will work in the next major version.
102+
103+
With the next major version the `beforeSendSpan` API can only be used to mutate spans, but no longer to drop them.
104+
With this release the SDK will warn you if you are using this API to drop spans.
105+
Instead, it is recommended to configure instrumentation (i.e. integrations) directly to control what spans are created.
106+
107+
Additionally, with the next major version, root spans will also be passed to `beforeSendSpan`.
108+
109+
- **feat(utils): Deprecate `@sentry/utils` ([#14431](https://github.com/getsentry/sentry-javascript/pull/14431))**
110+
111+
With the next major version the `@sentry/utils` package will be merged into the `@sentry/core` package.
112+
It is therefore no longer recommended to use the `@sentry/utils` package.
113+
114+
- **feat(vue): Deprecate configuring Vue tracing options anywhere else other than through the `vueIntegration`'s `tracingOptions` option ([#14385](https://github.com/getsentry/sentry-javascript/pull/14385))**
115+
116+
Currently it is possible to configure tracing options in various places in the Sentry Vue SDK:
117+
118+
- In `Sentry.init()`
119+
- Inside `tracingOptions` in `Sentry.init()`
120+
- In the `vueIntegration()` options
121+
- Inside `tracingOptions` in the `vueIntegration()` options
122+
123+
Because this is a bit messy and confusing to document, the only recommended way to configure tracing options going forward is through the `tracingOptions` in the `vueIntegration()`.
124+
The other means of configuration will be removed in the next major version of the SDK.
125+
126+
- **feat: Deprecate `registerEsmLoaderHooks.include` and `registerEsmLoaderHooks.exclude` ([#14486](https://github.com/getsentry/sentry-javascript/pull/14486))**
127+
128+
Currently it is possible to define `registerEsmLoaderHooks.include` and `registerEsmLoaderHooks.exclude` options in `Sentry.init()` to only apply ESM loader hooks to a subset of modules.
129+
This API served as an escape hatch in case certain modules are incompatible with ESM loader hooks.
130+
131+
Since this API was introduced, a way was found to only wrap modules that there exists instrumentation for (meaning a vetted list).
132+
To only wrap modules that have instrumentation, it is recommended to instead set `registerEsmLoaderHooks.onlyIncludeInstrumentedModules` to `true`.
133+
134+
Note that `onlyIncludeInstrumentedModules: true` will become the default behavior in the next major version and the `registerEsmLoaderHooks` will no longer accept fine-grained options.
135+
136+
The following deprecations will _most likely_ not affect you unless you are building an SDK yourself:
137+
138+
- feat(core): Deprecate `arrayify` ([#14405](https://github.com/getsentry/sentry-javascript/pull/14405))
139+
- feat(core): Deprecate `flatten` ([#14454](https://github.com/getsentry/sentry-javascript/pull/14454))
140+
- feat(core): Deprecate `urlEncode` ([#14406](https://github.com/getsentry/sentry-javascript/pull/14406))
141+
- feat(core): Deprecate `validSeverityLevels` ([#14407](https://github.com/getsentry/sentry-javascript/pull/14407))
142+
- feat(core/utils): Deprecate `getNumberOfUrlSegments` ([#14458](https://github.com/getsentry/sentry-javascript/pull/14458))
143+
- feat(utils): Deprecate `memoBuilder`, `BAGGAGE_HEADER_NAME`, and `makeFifoCache` ([#14434](https://github.com/getsentry/sentry-javascript/pull/14434))
144+
- feat(utils/core): Deprecate `addRequestDataToEvent` and `extractRequestData` ([#14430](https://github.com/getsentry/sentry-javascript/pull/14430))
145+
146+
### Other Changes
147+
148+
- feat: Streamline `sentry-trace`, `baggage` and DSC handling ([#14364](https://github.com/getsentry/sentry-javascript/pull/14364))
149+
- feat(core): Further optimize debug ID parsing ([#14365](https://github.com/getsentry/sentry-javascript/pull/14365))
150+
- feat(node): Add `openTelemetryInstrumentations` option ([#14484](https://github.com/getsentry/sentry-javascript/pull/14484))
151+
- feat(nuxt): Add filter for not found source maps (devtools) ([#14437](https://github.com/getsentry/sentry-javascript/pull/14437))
152+
- feat(nuxt): Only delete public source maps ([#14438](https://github.com/getsentry/sentry-javascript/pull/14438))
153+
- fix(nextjs): Don't report `NEXT_REDIRECT` from browser ([#14440](https://github.com/getsentry/sentry-javascript/pull/14440))
154+
- perf(opentelemetry): Bucket spans for cleanup ([#14154](https://github.com/getsentry/sentry-javascript/pull/14154))
155+
156+
Work in this release was contributed by @NEKOYASAN and @fmorett. Thank you for your contributions!
14157

15158
## 8.40.0
16159

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,6 @@ below:
111111
Provides the integration for Session Replay.
112112
- [`@sentry/core`](https://github.com/getsentry/sentry-javascript/tree/master/packages/core): The base for all
113113
JavaScript SDKs with interfaces, type definitions and base classes.
114-
- [`@sentry/utils`](https://github.com/getsentry/sentry-javascript/tree/master/packages/utils): A set of helpers and
115-
utility functions useful for various SDKs.
116-
- [`@sentry/types`](https://github.com/getsentry/sentry-javascript/tree/master/packages/types): Types used in all
117-
packages.
118114

119115
## Bug Bounty Program
120116

biome.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
"angular.json",
4545
"ember/instance-initializers/**",
4646
"ember/types.d.ts",
47+
"solidstart/*.d.ts",
48+
"solidstart/client/",
49+
"solidstart/server/",
4750
".output",
4851
".vinxi"
4952
]

dev-packages/browser-integration-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "8.40.0",
3+
"version": "8.42.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -43,7 +43,7 @@
4343
"@babel/preset-typescript": "^7.16.7",
4444
"@playwright/test": "^1.44.1",
4545
"@sentry-internal/rrweb": "2.29.0",
46-
"@sentry/browser": "8.40.0",
46+
"@sentry/browser": "8.42.0",
4747
"axios": "1.7.7",
4848
"babel-loader": "^8.2.2",
4949
"html-webpack-plugin": "^5.5.0",

dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import type { Event } from '@sentry/types';
2+
import type { Event } from '@sentry/core';
33

44
import { sentryTest } from '../../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers';

dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/customEvent/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from '@playwright/test';
2-
import type { Event } from '@sentry/types';
2+
import type { Event } from '@sentry/core';
33

44
import { sentryTest } from '../../../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest } from '../../../../../utils/helpers';

0 commit comments

Comments
 (0)