Skip to content

Commit 8a7b738

Browse files
author
Luca Forstner
committed
Merge remote-tracking branch 'origin/develop' into lforst-isolation-scope-propagation
2 parents ef2834d + 8e21feb commit 8a7b738

File tree

228 files changed

+2086
-1624
lines changed

Some content is hidden

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

228 files changed

+2086
-1624
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ jobs:
102102
- 'packages/replay/**'
103103
- 'packages/replay-canvas/**'
104104
- 'packages/feedback/**'
105+
- 'packages/wasm/**'
105106
browser_integration:
106107
- *shared
107108
- *browser
@@ -726,6 +727,32 @@ jobs:
726727
cd packages/utils
727728
yarn test:package
728729
730+
job_check_for_faulty_dts:
731+
name: Check for faulty .d.ts files
732+
needs: [job_get_metadata, job_build]
733+
runs-on: ubuntu-20.04
734+
timeout-minutes: 5
735+
steps:
736+
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
737+
uses: actions/checkout@v4
738+
with:
739+
ref: ${{ env.HEAD_COMMIT }}
740+
- name: Set up Node
741+
uses: actions/setup-node@v4
742+
with:
743+
node-version-file: 'package.json'
744+
- name: Restore caches
745+
uses: ./.github/actions/restore-cache
746+
env:
747+
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
748+
- name: Check for dts files that reference stuff in the temporary build folder
749+
run: |
750+
if grep -r --include "*.d.ts" --exclude-dir ".nxcache" 'import("@sentry(-internal)?/[^/]*/build' .; then
751+
echo "Found illegal TypeScript import statement."
752+
exit 1
753+
fi
754+
755+
729756
job_node_integration_tests:
730757
name:
731758
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration

CHANGELOG.md

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

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

7+
## 7.98.0
8+
9+
This release primarily fixes some type declaration errors:
10+
11+
- feat(core): Export `IntegrationIndex` type (#10337)
12+
- fix(nextjs): Fix Http integration type declaration (#10338)
13+
- fix(node): Fix type definitions (#10339)
14+
15+
## 7.97.0
16+
17+
Note: The 7.96.0 release was incomplete. This release is partially encompassing changes from `7.96.0`.
18+
19+
- feat(react): Add `stripBasename` option for React Router 6 (#10314)
20+
21+
## 7.96.0
22+
23+
Note: This release was incomplete. Not all Sentry SDK packages were released for this version. Please upgrade to 7.97.0
24+
directly.
25+
26+
### Important Changes
27+
28+
#### Deprecations
29+
30+
This release includes some deprecations for integrations in `@sentry/browser` and frontend framework SDKs
31+
(`@sentry/react`, `@sentry/vue`, etc.). Please take a look at our
32+
[migration guide](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md) for more details.
33+
34+
- feat(browser): Export functional integrations & deprecate classes (#10267)
35+
36+
#### Web Vitals Fix for LCP and CLS
37+
38+
This release fixes an issue with the Web Vitals integration where LCP and CLS were not being captured correctly,
39+
increasing capture rate by 10-30% for some apps. LCP and CLS capturing issues were introduced with version `7.75.0`.
40+
41+
- fix(tracing): Ensure web vitals are correctly stopped/captured (#10323)
42+
43+
### Other Changes
44+
45+
- fix(node): Fix `node-cron` types and add test (#10315)
46+
- fix(node): Fix downleveled types entry point (#10321)
47+
- fix(node): LocalVariables integration should use setupOnce (#10307)
48+
- fix(replay): Fix type for options of replayIntegration (#10325)
49+
50+
Work in this release contributed by @Shubhdeep12. Thank you for your contribution!
51+
52+
## 7.95.0
53+
54+
### Important Changes
55+
56+
#### Deprecations
57+
58+
This release includes some deprecations in preparation for v8.
59+
60+
Most notably, it deprecates the `Replay` & `Feedback` classes in favor of a functional replacement:
61+
62+
```js
63+
import * as Sentry from '@sentry/browser';
64+
65+
Sentry.init({
66+
integrations: [
67+
// Instead of
68+
new Sentry.Replay(),
69+
new Sentry.Feedback(),
70+
// Use the functional replacement:
71+
Sentry.replayIntegration(),
72+
Sentry.feedbackIntegration(),
73+
],
74+
});
75+
```
76+
77+
- feat(core): Deprecate `Span.origin` in favor of `sentry.origin` attribute (#10260)
78+
- feat(core): Deprecate `Span.parentSpanId` (#10244)
79+
- feat(core): Expose `isInitialized()` to replace checking via `getClient` (#10296)
80+
- feat(replay): Deprecate `Replay`, `ReplayCanvas`, `Feedback` classes (#10270)
81+
- feat(wasm): Deprecate `Wasm` integration class (#10230)
82+
83+
### Other Changes
84+
85+
- feat: Make `parameterize` function available through browser and node API (#10085)
86+
- feat(feedback): Configure feedback border radius (#10289)
87+
- feat(sveltekit): Update default integration handling & deprecate `addOrUpdateIntegration` (#10263)
88+
- fix(replay-canvas): Add missing dependency on @sentry/utils (#10279)
89+
- fix(tracing): Don't send negative ttfb (#10286)
90+
91+
Work in this release contributed by @AleshaOleg. Thank you for your contribution!
92+
793
## 7.94.1
894

995
This release fixes a publishing issue.

MIGRATION.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ npx @sentry/migr8@latest
1010
This will let you select which updates to run, and automatically update your code. Make sure to still review all code
1111
changes!
1212

13+
## Deprecate using `getClient()` to check if the SDK was initialized
14+
15+
In v8, `getClient()` will stop returning `undefined` if `Sentry.init()` was not called. For cases where this may be used
16+
to check if Sentry was actually initialized, using `getClient()` will thus not work anymore. Instead, you should use the
17+
new `Sentry.isInitialized()` utility to check this.
18+
1319
## Deprecate `getCurrentHub()`
1420

1521
In v8, you will no longer have a Hub, only Scopes as a concept. This also means that `getCurrentHub()` will eventually
@@ -28,14 +34,31 @@ integrations from the `Integrations.XXX` hash, is deprecated in favor of using t
2834

2935
The following list shows how integrations should be migrated:
3036

31-
| Old | New | Packages |
32-
| ------------------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------- |
33-
| `new InboundFilters()` | `inboundFiltersIntegration()` | `@sentry/core`, `@sentry/browser`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
34-
| `new FunctionToString()` | `functionToStringIntegration()` | `@sentry/core`, `@sentry/browser`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
35-
| `new LinkedErrors()` | `linkedErrorsIntegration()` | `@sentry/core`, `@sentry/browser`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
36-
| `new ModuleMetadata()` | `moduleMetadataIntegration()` | `@sentry/core`, `@sentry/browser` |
37-
| `new RequestData()` | `requestDataIntegration()` | `@sentry/core`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
38-
| `new Wasm() ` | `wasmIntegration()` | `@sentry/wasm` |
37+
| Old | New | Packages |
38+
| ------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------- |
39+
| `new InboundFilters()` | `inboundFiltersIntegration()` | `@sentry/core`, `@sentry/browser`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
40+
| `new FunctionToString()` | `functionToStringIntegration()` | `@sentry/core`, `@sentry/browser`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
41+
| `new LinkedErrors()` | `linkedErrorsIntegration()` | `@sentry/core`, `@sentry/browser`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
42+
| `new ModuleMetadata()` | `moduleMetadataIntegration()` | `@sentry/core`, `@sentry/browser` |
43+
| `new RequestData()` | `requestDataIntegration()` | `@sentry/core`, `@sentry/node`, `@sentry/deno`, `@sentry/bun`, `@sentry/vercel-edge` |
44+
| `new Wasm() ` | `wasmIntegration()` | `@sentry/wasm` |
45+
| `new Replay()` | `replayIntegration()` | `@sentry/browser` |
46+
| `new ReplayCanvas()` | `replayCanvasIntegration()` | `@sentry/browser` |
47+
| `new Feedback()` | `feedbackIntegration()` | `@sentry/browser` |
48+
| `new CaptureConsole()` | `captureConsoleIntegration()` | `@sentry/integrations` |
49+
| `new Debug()` | `debugIntegration()` | `@sentry/integrations` |
50+
| `new Dedupe()` | `dedupeIntegration()` | `@sentry/browser`, `@sentry/integrations`, `@sentry/deno` |
51+
| `new ExtraErrorData()` | `extraErrorDataIntegration()` | `@sentry/integrations` |
52+
| `new ReportingObserver()` | `reportingObserverIntegration()` | `@sentry/integrations` |
53+
| `new RewriteFrames()` | `rewriteFramesIntegration()` | `@sentry/integrations` |
54+
| `new SessionTiming()` | `sessionTimingIntegration()` | `@sentry/integrations` |
55+
| `new HttpClient()` | `httpClientIntegration()` | `@sentry/integrations` |
56+
| `new ContextLines()` | `contextLinesIntegration()` | `@sentry/browser` |
57+
| `new Breadcrumbs()` | `breadcrumbsIntegration()` | `@sentry/browser`, `@sentry/deno` |
58+
| `new GlobalHandlers()` | `globalHandlersIntegration()` | `@sentry/browser` |
59+
| `new HttpContext()` | `httpContextIntegration()` | `@sentry/browser` |
60+
| `new TryCatch()` | `browserApiErrorsIntegration()` | `@sentry/browser`, `@sentry/deno` |
61+
| `new VueIntegration()` | `vueIntegration()` | `@sentry/vue` |
3962

4063
## Deprecate `hub.bindClient()` and `makeMain()`
4164

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "7.94.1",
3+
"version": "7.98.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -9,13 +9,14 @@
99
"private": true,
1010
"scripts": {
1111
"clean": "rimraf -g suites/**/dist loader-suites/**/dist tmp",
12-
"install-browsers": "playwright install --with-deps",
12+
"install-browsers": "npx playwright install --with-deps",
1313
"lint": "eslint . --format stylish",
1414
"fix": "eslint . --format stylish --fix",
1515
"type-check": "tsc",
16+
"postinstall": "yarn install-browsers",
1617
"pretest": "yarn clean && yarn type-check",
17-
"test": "playwright test ./suites --project='chromium'",
18-
"test:all": "playwright test ./suites",
18+
"test": "yarn test:all --project='chromium'",
19+
"test:all": "npx playwright test -c playwright.browser.config.ts",
1920
"test:bundle:es5": "PW_BUNDLE=bundle_es5 yarn test",
2021
"test:bundle:es5:min": "PW_BUNDLE=bundle_es5_min yarn test",
2122
"test:bundle:es6": "PW_BUNDLE=bundle_es6 yarn test",
@@ -30,29 +31,28 @@
3031
"test:bundle:tracing:replay:es6:min": "PW_BUNDLE=bundle_tracing_replay_es6_min yarn test",
3132
"test:cjs": "PW_BUNDLE=cjs yarn test",
3233
"test:esm": "PW_BUNDLE=esm yarn test",
33-
"test:loader": "playwright test ./loader-suites --project='chromium'",
34+
"test:loader": "npx playwright test -c playwright.loader.config.ts --project='chromium'",
3435
"test:loader:base": "PW_BUNDLE=loader_base yarn test:loader",
3536
"test:loader:eager": "PW_BUNDLE=loader_eager yarn test:loader",
3637
"test:loader:tracing": "PW_BUNDLE=loader_tracing yarn test:loader",
3738
"test:loader:replay": "PW_BUNDLE=loader_replay yarn test:loader",
3839
"test:loader:full": "PW_BUNDLE=loader_tracing_replay yarn test:loader",
3940
"test:loader:debug": "PW_BUNDLE=loader_debug yarn test:loader",
40-
"test:ci": "playwright test ./suites --reporter='line'",
41+
"test:ci": "yarn test:all --reporter='line'",
4142
"test:update-snapshots": "yarn test:all --update-snapshots",
4243
"test:detect-flaky": "ts-node scripts/detectFlakyTests.ts",
4344
"validate:es5": "es-check es5 'fixtures/loader.js'"
4445
},
4546
"dependencies": {
4647
"@babel/preset-typescript": "^7.16.7",
47-
"@playwright/test": "^1.31.1",
48+
"@playwright/test": "^1.40.1",
4849
"@sentry-internal/rrweb": "2.9.0",
49-
"@sentry/browser": "7.94.1",
50-
"@sentry/tracing": "7.94.1",
50+
"@sentry/browser": "7.98.0",
51+
"@sentry/tracing": "7.98.0",
5152
"axios": "1.6.0",
5253
"babel-loader": "^8.2.2",
5354
"html-webpack-plugin": "^5.5.0",
5455
"pako": "^2.1.0",
55-
"playwright": "^1.31.1",
5656
"webpack": "^5.52.0"
5757
},
5858
"devDependencies": {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { PlaywrightTestConfig } from '@playwright/test';
2+
import CorePlaywrightConfig from './playwright.config';
3+
4+
const config: PlaywrightTestConfig = {
5+
...CorePlaywrightConfig,
6+
testDir: './suites',
7+
};
8+
9+
export default config;

dev-packages/browser-integration-tests/playwright.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const config: PlaywrightTestConfig = {
88
// Use 3 workers on CI, else use defaults (based on available CPU cores)
99
// Note that 3 is a random number selected to work well with our CI setup
1010
workers: process.env.CI ? 3 : undefined,
11+
testMatch: /test.ts/,
1112

1213
projects: [
1314
{
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { PlaywrightTestConfig } from '@playwright/test';
2+
import CorePlaywrightConfig from './playwright.config';
3+
4+
const config: PlaywrightTestConfig = {
5+
...CorePlaywrightConfig,
6+
testDir: './loader-suites',
7+
};
8+
9+
export default config;

dev-packages/browser-integration-tests/scripts/detectFlakyTests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ${changedPaths.join('\n')}
4343
try {
4444
await new Promise<void>((resolve, reject) => {
4545
const cp = childProcess.spawn(
46-
`yarn playwright test ${
46+
`npx playwright test ${
4747
testPaths.length ? testPaths.join(' ') : './suites'
4848
} --reporter='line' --repeat-each ${runCount}`,
4949
{ shell: true, cwd },

0 commit comments

Comments
 (0)