Skip to content

Commit bb37b6c

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feat/separate-source-reading
2 parents 2266ac5 + b122af8 commit bb37b6c

File tree

36 files changed

+213
-169
lines changed

36 files changed

+213
-169
lines changed

CHANGELOG.md

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

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

7+
## 6.17.9
8+
9+
- fix(gatsby): Add missing React peer dependency ([#4576](https://github.com/getsentry/sentry-javascript/pull/4576))
10+
- fix(types): Use Sentry event type instead of dom one ([#4584](https://github.com/getsentry/sentry-javascript/pull/4584))
11+
12+
Work in this release contributed by @aaronadamsCA. Thank you for your contribution!
13+
14+
## 6.17.8
15+
16+
- feat(types): Add Envelope types ([#4527](https://github.com/getsentry/sentry-javascript/pull/4527))
17+
- fix(build): Remove node code from CDN bundles ([#4548](https://github.com/getsentry/sentry-javascript/pull/4548))
18+
- fix(build): Prevent unused utils code in integration bundles ([#4547](https://github.com/getsentry/sentry-javascript/pull/4547))
19+
- fix(tracing): Export BrowserTracing directly in CDN bundle ([#4570](https://github.com/getsentry/sentry-javascript/pull/4570))
20+
- fix(utils): Use apply in console instrumentation ([#4568](https://github.com/getsentry/sentry-javascript/pull/4568))
21+
- ref(core): Log `normalizeDepth` when normalization is skipped([#4574](https://github.com/getsentry/sentry-javascript/pull/4574))
22+
23+
Work in this release contributed by @mydea. Thank you for your contribution!
24+
725
## 6.17.7
826

927
- fix(utils): Make new non-enumerable properties mutable ([#4528](https://github.com/getsentry/sentry-javascript/pull/4528))

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lerna": "3.4.0",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"packages": "packages/*",
55
"npmClient": "yarn",
66
"useWorkspaces": true

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
],
5252
"devDependencies": {
5353
"@google-cloud/storage": "^5.7.0",
54+
"@rollup/plugin-commonjs": "^21.0.1",
55+
"@rollup/plugin-node-resolve": "^13.1.3",
5456
"@rollup/plugin-replace": "^3.0.1",
5557
"@size-limit/preset-small-lib": "^4.5.5",
5658
"@strictsoftware/typedoc-plugin-monorepo": "^0.3.1",
@@ -72,6 +74,7 @@
7274
"prettier": "2.5.1",
7375
"replace-in-file": "^4.0.0",
7476
"rimraf": "^3.0.2",
77+
"rollup": "^2.67.1",
7578
"rollup-plugin-license": "^2.6.1",
7679
"rollup-plugin-terser": "^7.0.2",
7780
"rollup-plugin-typescript2": "^0.31.2",

packages/angular/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/angular",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"description": "Official Sentry SDK for Angular",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular",
@@ -21,9 +21,9 @@
2121
"@angular/router": "10.x || 11.x || 12.x || 13.x"
2222
},
2323
"dependencies": {
24-
"@sentry/browser": "6.17.7",
25-
"@sentry/types": "6.17.7",
26-
"@sentry/utils": "6.17.7",
24+
"@sentry/browser": "6.17.9",
25+
"@sentry/types": "6.17.9",
26+
"@sentry/utils": "6.17.9",
2727
"rxjs": "^6.6.0",
2828
"tslib": "^1.9.3"
2929
},

packages/browser/package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/browser",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"description": "Official Sentry SDK for browsers",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
@@ -16,9 +16,9 @@
1616
"access": "public"
1717
},
1818
"dependencies": {
19-
"@sentry/core": "6.17.7",
20-
"@sentry/types": "6.17.7",
21-
"@sentry/utils": "6.17.7",
19+
"@sentry/core": "6.17.9",
20+
"@sentry/types": "6.17.9",
21+
"@sentry/utils": "6.17.9",
2222
"tslib": "^1.9.3"
2323
},
2424
"devDependencies": {
@@ -40,9 +40,6 @@
4040
"karma-webkit-launcher": "^1.0.2",
4141
"node-fetch": "^2.6.0",
4242
"playwright": "^1.17.1",
43-
"rollup": "^1.10.1",
44-
"rollup-plugin-commonjs": "^9.3.4",
45-
"rollup-plugin-node-resolve": "^4.2.3",
4643
"sinon": "^7.3.2",
4744
"webpack": "^4.30.0"
4845
},

packages/browser/rollup.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { terser } from 'rollup-plugin-terser';
22
import typescript from 'rollup-plugin-typescript2';
33
import license from 'rollup-plugin-license';
4-
import resolve from 'rollup-plugin-node-resolve';
5-
import commonjs from 'rollup-plugin-commonjs';
4+
import resolve from '@rollup/plugin-node-resolve';
65
import replace from '@rollup/plugin-replace';
76

87
const commitHash = require('child_process')
@@ -72,7 +71,6 @@ const plugins = [
7271
resolve({
7372
mainFields: ['module'],
7473
}),
75-
commonjs(),
7674
];
7775

7876
const bundleConfig = {
@@ -82,6 +80,7 @@ const bundleConfig = {
8280
name: 'Sentry',
8381
sourcemap: true,
8482
strict: false,
83+
esModule: false,
8584
},
8685
context: 'window',
8786
plugins: [

packages/core/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/core",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"description": "Base implementation for all Sentry JavaScript SDKs",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core",
@@ -16,10 +16,10 @@
1616
"access": "public"
1717
},
1818
"dependencies": {
19-
"@sentry/hub": "6.17.7",
20-
"@sentry/minimal": "6.17.7",
21-
"@sentry/types": "6.17.7",
22-
"@sentry/utils": "6.17.7",
19+
"@sentry/hub": "6.17.9",
20+
"@sentry/minimal": "6.17.9",
21+
"@sentry/types": "6.17.9",
22+
"@sentry/utils": "6.17.9",
2323
"tslib": "^1.9.3"
2424
},
2525
"scripts": {

packages/core/src/baseclient.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
374374
}
375375

376376
return result.then(evt => {
377+
if (evt) {
378+
// TODO this is more of the hack trying to solve https://github.com/getsentry/sentry-javascript/issues/2809
379+
// it is only attached as extra data to the event if the event somehow skips being normalized
380+
evt.sdkProcessingMetadata = { ...evt.sdkProcessingMetadata, normalizeDepth: normalize(normalizeDepth) };
381+
}
377382
if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {
378383
return this._normalizeEvent(evt, normalizeDepth);
379384
}

packages/core/src/request.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,28 @@ export function eventToSentryRequest(event: Event, api: APIDetails): SentryReque
5959
const { method: samplingMethod, rate: sampleRate } = transactionSampling || {};
6060

6161
// TODO: Below is a temporary hack in order to debug a serialization error - see
62-
// https://github.com/getsentry/sentry-javascript/issues/2809 and
63-
// https://github.com/getsentry/sentry-javascript/pull/4425. TL;DR: even though we normalize all events (which should
64-
// prevent this), something is causing `JSON.stringify` to throw a circular reference error.
62+
// https://github.com/getsentry/sentry-javascript/issues/2809,
63+
// https://github.com/getsentry/sentry-javascript/pull/4425, and
64+
// https://github.com/getsentry/sentry-javascript/pull/4574.
65+
//
66+
// TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to
67+
// throw a circular reference error.
6568
//
6669
// When it's time to remove it:
6770
// 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting
6871
// `sdkProcessingMetadata`
6972
// 2. Restore the original version of the request body, which is commented out
70-
// 3. Search for `skippedNormalization` and pull out the companion hack in the browser playwright tests
73+
// 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the
74+
// baseClient tests in this package
7175
enhanceEventWithSdkInfo(event, api.metadata.sdk);
7276
event.tags = event.tags || {};
7377
event.extra = event.extra || {};
7478

7579
// In theory, all events should be marked as having gone through normalization and so
76-
// we should never set this tag
80+
// we should never set this tag/extra data
7781
if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {
7882
event.tags.skippedNormalization = true;
83+
event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';
7984
}
8085

8186
// prevent this data from being sent to sentry

packages/core/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const SDK_VERSION = '6.17.7';
1+
export const SDK_VERSION = '6.17.9';

packages/core/test/lib/base.test.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,21 @@ describe('BaseClient', () => {
867867

868868
client.captureEvent(transaction);
869869

870-
expect(TestBackend.instance!.event!).toEqual(normalizedTransaction);
870+
// TODO: This is to compensate for a temporary debugging hack which adds data the tests aren't anticipating to the
871+
// event. The code can be restored to its original form (the commented-out line below) once that hack is
872+
// removed. See https://github.com/getsentry/sentry-javascript/pull/4425 and
873+
// https://github.com/getsentry/sentry-javascript/pull/4574
874+
const capturedEvent = TestBackend.instance!.event!;
875+
if (capturedEvent.sdkProcessingMetadata?.normalizeDepth) {
876+
if (Object.keys(capturedEvent.sdkProcessingMetadata).length === 1) {
877+
delete capturedEvent.sdkProcessingMetadata;
878+
} else {
879+
delete capturedEvent.sdkProcessingMetadata.normalizeDepth;
880+
}
881+
}
882+
883+
expect(capturedEvent).toEqual(normalizedTransaction);
884+
// expect(TestBackend.instance!.event!).toEqual(normalizedTransaction);
871885
});
872886

873887
test('calls beforeSend and uses original event without any changes', () => {

packages/ember/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/ember",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"description": "Official Sentry SDK for Ember.js",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/ember",
@@ -31,10 +31,10 @@
3131
},
3232
"dependencies": {
3333
"@embroider/macros": "~0.47.2",
34-
"@sentry/browser": "6.17.7",
35-
"@sentry/tracing": "6.17.7",
36-
"@sentry/types": "6.17.7",
37-
"@sentry/utils": "6.17.7",
34+
"@sentry/browser": "6.17.9",
35+
"@sentry/tracing": "6.17.9",
36+
"@sentry/types": "6.17.9",
37+
"@sentry/utils": "6.17.9",
3838
"ember-auto-import": "^1.12.0 || ^2.2.0",
3939
"ember-cli-babel": "~7.26.6",
4040
"ember-cli-htmlbars": "^6.0.1",

packages/eslint-config-sdk/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/eslint-config-sdk",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"description": "Official Sentry SDK eslint config",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/eslint-config-sdk",
@@ -19,8 +19,8 @@
1919
"access": "public"
2020
},
2121
"dependencies": {
22-
"@sentry-internal/eslint-plugin-sdk": "6.17.7",
23-
"@sentry-internal/typescript": "6.17.7",
22+
"@sentry-internal/eslint-plugin-sdk": "6.17.9",
23+
"@sentry-internal/typescript": "6.17.9",
2424
"@typescript-eslint/eslint-plugin": "^3.9.0",
2525
"@typescript-eslint/parser": "^3.9.0",
2626
"eslint-config-prettier": "^6.11.0",

packages/eslint-plugin-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/eslint-plugin-sdk",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"description": "Official Sentry SDK eslint plugin",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/eslint-plugin-sdk",

packages/gatsby/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/gatsby",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"description": "Official Sentry SDK for Gatsby.js",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby",
@@ -26,15 +26,16 @@
2626
"access": "public"
2727
},
2828
"dependencies": {
29-
"@sentry/react": "6.17.7",
30-
"@sentry/tracing": "6.17.7",
29+
"@sentry/react": "6.17.9",
30+
"@sentry/tracing": "6.17.9",
3131
"@sentry/webpack-plugin": "1.18.5"
3232
},
3333
"peerDependencies": {
34-
"gatsby": "^2.0.0 || ^3.0.0 || ^4.0.0"
34+
"gatsby": "^2.0.0 || ^3.0.0 || ^4.0.0",
35+
"react": "15.x || 16.x || 17.x"
3536
},
3637
"devDependencies": {
37-
"@sentry/types": "6.17.7",
38+
"@sentry/types": "6.17.9",
3839
"@testing-library/react": "^10.4.9",
3940
"react": "^17.0.0"
4041
},

packages/hub/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/hub",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"description": "Sentry hub which handles global state managment.",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/hub",
@@ -16,8 +16,8 @@
1616
"access": "public"
1717
},
1818
"dependencies": {
19-
"@sentry/types": "6.17.7",
20-
"@sentry/utils": "6.17.7",
19+
"@sentry/types": "6.17.9",
20+
"@sentry/utils": "6.17.9",
2121
"tslib": "^1.9.3"
2222
},
2323
"scripts": {

packages/integration-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {

packages/integration-tests/suites/public-api/configureScope/clear_scope/test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ sentryTest('should clear previously set properties of a scope', async ({ getLoca
88

99
const eventData = await getSentryRequest(page, url);
1010

11+
// TODO: This is to compensate for a temporary debugging hack which adds data the tests aren't anticipating to the
12+
// event. The code can be restored to its original form (the commented-out line below) once that hack is
13+
// removed. See https://github.com/getsentry/sentry-javascript/pull/4425 and
14+
// https://github.com/getsentry/sentry-javascript/pull/4574
15+
if (eventData.extra) {
16+
if (Object.keys(eventData.extra).length === 1) {
17+
delete eventData.extra;
18+
} else {
19+
delete eventData.extra.normalizeDepth;
20+
}
21+
}
22+
1123
expect(eventData.message).toBe('cleared_scope');
1224
expect(eventData.user).toBeUndefined();
1325
expect(eventData.tags).toBeUndefined();

packages/integrations/package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/integrations",
3-
"version": "6.17.7",
3+
"version": "6.17.9",
44
"description": "Pluggable integrations that can be used to enhance JS SDKs",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/integrations",
@@ -16,16 +16,13 @@
1616
"module": "esm/index.js",
1717
"types": "dist/index.d.ts",
1818
"dependencies": {
19-
"@sentry/types": "6.17.7",
20-
"@sentry/utils": "6.17.7",
19+
"@sentry/types": "6.17.9",
20+
"@sentry/utils": "6.17.9",
2121
"localforage": "^1.8.1",
2222
"tslib": "^1.9.3"
2323
},
2424
"devDependencies": {
25-
"chai": "^4.1.2",
26-
"rollup": "^1.10.1",
27-
"rollup-plugin-commonjs": "^9.3.4",
28-
"rollup-plugin-node-resolve": "^4.2.3"
25+
"chai": "^4.1.2"
2926
},
3027
"scripts": {
3128
"build": "run-p build:cjs build:esm build:bundle",

packages/integrations/rollup.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import * as fs from 'fs';
22

33
import { terser } from 'rollup-plugin-terser';
44
import typescript from 'rollup-plugin-typescript2';
5-
import resolve from 'rollup-plugin-node-resolve';
6-
import commonjs from 'rollup-plugin-commonjs';
5+
import resolve from '@rollup/plugin-node-resolve';
6+
import commonjs from '@rollup/plugin-commonjs';
77
import replace from '@rollup/plugin-replace';
88

99
const terserInstance = terser({
@@ -95,6 +95,7 @@ function loadAllIntegrations() {
9595
format: 'cjs',
9696
sourcemap: true,
9797
strict: false,
98+
esModule: false,
9899
},
99100
plugins: build.plugins,
100101
treeshake: 'smallest',

0 commit comments

Comments
 (0)