Skip to content

Commit d3f4399

Browse files
authored
Merge branch 'develop' into jb/ref/module-path-normalize
2 parents b77b920 + 80b6939 commit d3f4399

File tree

110 files changed

+2437
-628
lines changed

Some content is hidden

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

110 files changed

+2437
-628
lines changed

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@
2323
"yaml.schemas": {
2424
"https://json.schemastore.org/github-workflow.json": ".github/workflows/**.yml"
2525
},
26+
"eslint.packageManager": "yarn",
27+
"eslint.workingDirectories": [
28+
{
29+
"mode": "auto"
30+
}
31+
]
2632
}

CHANGELOG.md

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

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

7+
## 7.43.0
8+
9+
- feat(nextjs): Run source map upload in Vercel develop and preview environments (#7436)
10+
- feat(types): Add `profilesSampler` option to node client type (#7385)
11+
- fix(core): Avoid using `Array.findIndex()` as it is ES5 incompatible (#7400)
12+
- fix(nextjs): Add better error messages for missing params during next build (#7434)
13+
- fix(nextjs): Don't crash build when auth token is missing
14+
- fix(node): Revert to dynamic `require` call to fix monkey patching (#7430)
15+
- fix(types): Fix node types & add E2E test (#7429)
16+
17+
718
## 7.42.0
819

920
- feat(core): Add lifecycle hooks (#7370)

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "7.42.0",
3+
"version": "7.43.0",
44
"npmClient": "yarn",
55
"useWorkspaces": true
66
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"packages/hub",
4848
"packages/integration-tests",
4949
"packages/integrations",
50+
"packages/integration-shims",
5051
"packages/overhead-metrics",
5152
"packages/nextjs",
5253
"packages/node",
@@ -60,6 +61,7 @@
6061
"packages/svelte",
6162
"packages/sveltekit",
6263
"packages/tracing",
64+
"packages/tracing-internal",
6365
"packages/types",
6466
"packages/typescript",
6567
"packages/utils",
@@ -81,6 +83,7 @@
8183
"@types/node": "~10.17.0",
8284
"@types/rimraf": "^3.0.2",
8385
"@types/sinon": "^7.0.11",
86+
"@vitest/coverage-c8": "^0.29.2",
8487
"acorn": "^8.7.0",
8588
"chai": "^4.1.2",
8689
"codecov": "^3.6.5",
@@ -104,6 +107,7 @@
104107
"rollup": "^2.67.1",
105108
"rollup-plugin-cleanup": "3.2.1",
106109
"rollup-plugin-license": "^2.6.1",
110+
"rollup-plugin-modify": "^3.0.0",
107111
"rollup-plugin-terser": "^7.0.2",
108112
"rollup-plugin-typescript2": "^0.31.2",
109113
"sinon": "^7.3.2",
@@ -112,7 +116,8 @@
112116
"ts-node": "10.9.1",
113117
"tslib": "^2.3.1",
114118
"typedoc": "^0.18.0",
115-
"typescript": "3.8.3"
119+
"typescript": "3.8.3",
120+
"vitest": "^0.29.2"
116121
},
117122
"resolutions": {
118123
"**/agent-base": "5"

packages/angular-ivy/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-ivy",
3-
"version": "7.42.0",
3+
"version": "7.43.0",
44
"description": "Official Sentry SDK for Angular with full Ivy Support",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular-ivy",
@@ -21,9 +21,9 @@
2121
"rxjs": "^6.5.5 || ^7.x"
2222
},
2323
"dependencies": {
24-
"@sentry/browser": "7.42.0",
25-
"@sentry/types": "7.42.0",
26-
"@sentry/utils": "7.42.0",
24+
"@sentry/browser": "7.43.0",
25+
"@sentry/types": "7.43.0",
26+
"@sentry/utils": "7.43.0",
2727
"tslib": "^2.3.0"
2828
},
2929
"devDependencies": {

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": "7.42.0",
3+
"version": "7.43.0",
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
"rxjs": "^6.5.5 || ^7.x"
2222
},
2323
"dependencies": {
24-
"@sentry/browser": "7.42.0",
25-
"@sentry/types": "7.42.0",
26-
"@sentry/utils": "7.42.0",
24+
"@sentry/browser": "7.43.0",
25+
"@sentry/types": "7.43.0",
26+
"@sentry/utils": "7.43.0",
2727
"tslib": "^2.0.0"
2828
},
2929
"devDependencies": {

packages/browser/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/browser",
3-
"version": "7.42.0",
3+
"version": "7.43.0",
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,13 +16,14 @@
1616
"access": "public"
1717
},
1818
"dependencies": {
19-
"@sentry/core": "7.42.0",
20-
"@sentry/replay": "7.42.0",
21-
"@sentry/types": "7.42.0",
22-
"@sentry/utils": "7.42.0",
19+
"@sentry/core": "7.43.0",
20+
"@sentry/replay": "7.43.0",
21+
"@sentry/types": "7.43.0",
22+
"@sentry/utils": "7.43.0",
2323
"tslib": "^1.9.3"
2424
},
2525
"devDependencies": {
26+
"@sentry-internal/integration-shims": "7.43.0",
2627
"@types/md5": "2.1.33",
2728
"btoa": "^1.2.1",
2829
"chai": "^4.1.2",

packages/browser/rollup.bundle.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const builds = [];
88
entrypoints: ['src/index.ts'],
99
jsVersion,
1010
licenseTitle: '@sentry/browser',
11+
includeReplay: 'shim',
1112
outputFileBase: () => `bundles/bundle${jsVersion === 'es5' ? '.es5' : ''}`,
1213
});
1314

packages/browser/src/integrations/breadcrumbs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function _consoleBreadcrumb(handlerData: HandlerData & { args: unknown[]; level:
216216
/**
217217
* Creates breadcrumbs from XHR API calls
218218
*/
219-
function _xhrBreadcrumb(handlerData: HandlerData & { xhr: SentryWrappedXMLHttpRequest }): void {
219+
function _xhrBreadcrumb(handlerData: HandlerData & { xhr: XMLHttpRequest & SentryWrappedXMLHttpRequest }): void {
220220
if (handlerData.endTimestamp) {
221221
// We only capture complete, non-sentry requests
222222
if (handlerData.xhr.__sentry_own_request__) {
@@ -248,7 +248,7 @@ function _xhrBreadcrumb(handlerData: HandlerData & { xhr: SentryWrappedXMLHttpRe
248248
/**
249249
* Creates breadcrumbs from fetch API calls
250250
*/
251-
function _fetchBreadcrumb(handlerData: HandlerData & HandlerDataFetch): void {
251+
function _fetchBreadcrumb(handlerData: HandlerData & HandlerDataFetch & { response?: Response }): void {
252252
// We only capture complete fetch requests
253253
if (!handlerData.endTimestamp) {
254254
return;

packages/core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/core",
3-
"version": "7.42.0",
3+
"version": "7.43.0",
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,8 +16,8 @@
1616
"access": "public"
1717
},
1818
"dependencies": {
19-
"@sentry/types": "7.42.0",
20-
"@sentry/utils": "7.42.0",
19+
"@sentry/types": "7.43.0",
20+
"@sentry/utils": "7.43.0",
2121
"tslib": "^1.9.3"
2222
},
2323
"scripts": {

packages/core/src/tracing/idletransaction.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ export const TRACING_DEFAULTS = {
1313
heartbeatInterval: 5000,
1414
};
1515

16+
const FINISH_REASON_TAG = 'finishReason';
17+
18+
const IDLE_TRANSACTION_FINISH_REASONS = [
19+
'heartbeatFailed',
20+
'idleTimeout',
21+
'documentHidden',
22+
'finalTimeout',
23+
'externalFinish',
24+
'cancelled',
25+
];
26+
1627
/**
1728
* @inheritDoc
1829
*/
@@ -79,6 +90,8 @@ export class IdleTransaction extends Transaction {
7990
*/
8091
private _idleTimeoutID: ReturnType<typeof setTimeout> | undefined;
8192

93+
private _finishReason: typeof IDLE_TRANSACTION_FINISH_REASONS[number] = IDLE_TRANSACTION_FINISH_REASONS[4];
94+
8295
public constructor(
8396
transactionContext: TransactionContext,
8497
private readonly _idleHub: Hub,
@@ -111,6 +124,7 @@ export class IdleTransaction extends Transaction {
111124
setTimeout(() => {
112125
if (!this._finished) {
113126
this.setStatus('deadline_exceeded');
127+
this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3];
114128
this.finish();
115129
}
116130
}, this._finalTimeout);
@@ -121,6 +135,10 @@ export class IdleTransaction extends Transaction {
121135
this._finished = true;
122136
this.activities = {};
123137

138+
if (this.op === 'ui.action.click') {
139+
this.setTag(FINISH_REASON_TAG, this._finishReason);
140+
}
141+
124142
if (this.spanRecorder) {
125143
__DEBUG_BUILD__ &&
126144
logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);
@@ -227,6 +245,7 @@ export class IdleTransaction extends Transaction {
227245
this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;
228246

229247
if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) {
248+
this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];
230249
this.finish(endTimestamp);
231250
}
232251
}
@@ -239,6 +258,7 @@ export class IdleTransaction extends Transaction {
239258
this.cancelIdleTimeout();
240259
this._idleTimeoutID = setTimeout(() => {
241260
if (!this._finished && Object.keys(this.activities).length === 0) {
261+
this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1];
242262
this.finish(endTimestamp);
243263
}
244264
}, this._idleTimeout);
@@ -270,6 +290,7 @@ export class IdleTransaction extends Transaction {
270290
if (Object.keys(this.activities).length === 0) {
271291
const endTimestamp = timestampWithMs();
272292
if (this._idleTimeoutCanceledPermanently) {
293+
this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];
273294
this.finish(endTimestamp);
274295
} else {
275296
// We need to add the timeout here to have the real endtimestamp of the transaction
@@ -302,6 +323,7 @@ export class IdleTransaction extends Transaction {
302323
if (this._heartbeatCounter >= 3) {
303324
__DEBUG_BUILD__ && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');
304325
this.setStatus('deadline_exceeded');
326+
this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[0];
305327
this.finish();
306328
} else {
307329
this._pingHeartbeat();

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 = '7.42.0';
1+
export const SDK_VERSION = '7.43.0';

packages/e2e-tests/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ current state.
77

88
Prerequisites: Docker
99

10+
- Copy `.env.example` to `.env`
11+
- Fill in auth information in `.env` for an example Sentry project
12+
- The `E2E_TEST_AUTH_TOKEN` must have all the default permissions
13+
1014
```bash
1115
yarn test:e2e
1216
```

packages/e2e-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/e2e-tests",
3-
"version": "7.42.0",
3+
"version": "7.43.0",
44
"license": "MIT",
55
"engines": {
66
"node": ">=10"

packages/e2e-tests/test-applications/nextjs-app-dir/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@types/node": "18.11.17",
1717
"@types/react": "18.0.26",
1818
"@types/react-dom": "18.0.9",
19-
"next": "13.2.3",
19+
"next": "13.2.4",
2020
"react": "18.2.0",
2121
"react-dom": "18.2.0",
2222
"typescript": "4.9.4"

0 commit comments

Comments
 (0)