Skip to content

Commit

Permalink
Merge branch 'develop' into jb/ref/module-path-normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa authored Mar 14, 2023
2 parents b77b920 + 80b6939 commit d3f4399
Show file tree
Hide file tree
Showing 110 changed files with 2,437 additions and 628 deletions.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": ".github/workflows/**.yml"
},
"eslint.packageManager": "yarn",
"eslint.workingDirectories": [
{
"mode": "auto"
}
]
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@

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

## 7.43.0

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


## 7.42.0

- feat(core): Add lifecycle hooks (#7370)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "7.42.0",
"version": "7.43.0",
"npmClient": "yarn",
"useWorkspaces": true
}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"packages/hub",
"packages/integration-tests",
"packages/integrations",
"packages/integration-shims",
"packages/overhead-metrics",
"packages/nextjs",
"packages/node",
Expand All @@ -60,6 +61,7 @@
"packages/svelte",
"packages/sveltekit",
"packages/tracing",
"packages/tracing-internal",
"packages/types",
"packages/typescript",
"packages/utils",
Expand All @@ -81,6 +83,7 @@
"@types/node": "~10.17.0",
"@types/rimraf": "^3.0.2",
"@types/sinon": "^7.0.11",
"@vitest/coverage-c8": "^0.29.2",
"acorn": "^8.7.0",
"chai": "^4.1.2",
"codecov": "^3.6.5",
Expand All @@ -104,6 +107,7 @@
"rollup": "^2.67.1",
"rollup-plugin-cleanup": "3.2.1",
"rollup-plugin-license": "^2.6.1",
"rollup-plugin-modify": "^3.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.31.2",
"sinon": "^7.3.2",
Expand All @@ -112,7 +116,8 @@
"ts-node": "10.9.1",
"tslib": "^2.3.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3"
"typescript": "3.8.3",
"vitest": "^0.29.2"
},
"resolutions": {
"**/agent-base": "5"
Expand Down
8 changes: 4 additions & 4 deletions packages/angular-ivy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/angular-ivy",
"version": "7.42.0",
"version": "7.43.0",
"description": "Official Sentry SDK for Angular with full Ivy Support",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular-ivy",
Expand All @@ -21,9 +21,9 @@
"rxjs": "^6.5.5 || ^7.x"
},
"dependencies": {
"@sentry/browser": "7.42.0",
"@sentry/types": "7.42.0",
"@sentry/utils": "7.42.0",
"@sentry/browser": "7.43.0",
"@sentry/types": "7.43.0",
"@sentry/utils": "7.43.0",
"tslib": "^2.3.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/angular",
"version": "7.42.0",
"version": "7.43.0",
"description": "Official Sentry SDK for Angular",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular",
Expand All @@ -21,9 +21,9 @@
"rxjs": "^6.5.5 || ^7.x"
},
"dependencies": {
"@sentry/browser": "7.42.0",
"@sentry/types": "7.42.0",
"@sentry/utils": "7.42.0",
"@sentry/browser": "7.43.0",
"@sentry/types": "7.43.0",
"@sentry/utils": "7.43.0",
"tslib": "^2.0.0"
},
"devDependencies": {
Expand Down
11 changes: 6 additions & 5 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/browser",
"version": "7.42.0",
"version": "7.43.0",
"description": "Official Sentry SDK for browsers",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
Expand All @@ -16,13 +16,14 @@
"access": "public"
},
"dependencies": {
"@sentry/core": "7.42.0",
"@sentry/replay": "7.42.0",
"@sentry/types": "7.42.0",
"@sentry/utils": "7.42.0",
"@sentry/core": "7.43.0",
"@sentry/replay": "7.43.0",
"@sentry/types": "7.43.0",
"@sentry/utils": "7.43.0",
"tslib": "^1.9.3"
},
"devDependencies": {
"@sentry-internal/integration-shims": "7.43.0",
"@types/md5": "2.1.33",
"btoa": "^1.2.1",
"chai": "^4.1.2",
Expand Down
1 change: 1 addition & 0 deletions packages/browser/rollup.bundle.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const builds = [];
entrypoints: ['src/index.ts'],
jsVersion,
licenseTitle: '@sentry/browser',
includeReplay: 'shim',
outputFileBase: () => `bundles/bundle${jsVersion === 'es5' ? '.es5' : ''}`,
});

Expand Down
4 changes: 2 additions & 2 deletions packages/browser/src/integrations/breadcrumbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function _consoleBreadcrumb(handlerData: HandlerData & { args: unknown[]; level:
/**
* Creates breadcrumbs from XHR API calls
*/
function _xhrBreadcrumb(handlerData: HandlerData & { xhr: SentryWrappedXMLHttpRequest }): void {
function _xhrBreadcrumb(handlerData: HandlerData & { xhr: XMLHttpRequest & SentryWrappedXMLHttpRequest }): void {
if (handlerData.endTimestamp) {
// We only capture complete, non-sentry requests
if (handlerData.xhr.__sentry_own_request__) {
Expand Down Expand Up @@ -248,7 +248,7 @@ function _xhrBreadcrumb(handlerData: HandlerData & { xhr: SentryWrappedXMLHttpRe
/**
* Creates breadcrumbs from fetch API calls
*/
function _fetchBreadcrumb(handlerData: HandlerData & HandlerDataFetch): void {
function _fetchBreadcrumb(handlerData: HandlerData & HandlerDataFetch & { response?: Response }): void {
// We only capture complete fetch requests
if (!handlerData.endTimestamp) {
return;
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/core",
"version": "7.42.0",
"version": "7.43.0",
"description": "Base implementation for all Sentry JavaScript SDKs",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core",
Expand All @@ -16,8 +16,8 @@
"access": "public"
},
"dependencies": {
"@sentry/types": "7.42.0",
"@sentry/utils": "7.42.0",
"@sentry/types": "7.43.0",
"@sentry/utils": "7.43.0",
"tslib": "^1.9.3"
},
"scripts": {
Expand Down
22 changes: 22 additions & 0 deletions packages/core/src/tracing/idletransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ export const TRACING_DEFAULTS = {
heartbeatInterval: 5000,
};

const FINISH_REASON_TAG = 'finishReason';

const IDLE_TRANSACTION_FINISH_REASONS = [
'heartbeatFailed',
'idleTimeout',
'documentHidden',
'finalTimeout',
'externalFinish',
'cancelled',
];

/**
* @inheritDoc
*/
Expand Down Expand Up @@ -79,6 +90,8 @@ export class IdleTransaction extends Transaction {
*/
private _idleTimeoutID: ReturnType<typeof setTimeout> | undefined;

private _finishReason: typeof IDLE_TRANSACTION_FINISH_REASONS[number] = IDLE_TRANSACTION_FINISH_REASONS[4];

public constructor(
transactionContext: TransactionContext,
private readonly _idleHub: Hub,
Expand Down Expand Up @@ -111,6 +124,7 @@ export class IdleTransaction extends Transaction {
setTimeout(() => {
if (!this._finished) {
this.setStatus('deadline_exceeded');
this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3];
this.finish();
}
}, this._finalTimeout);
Expand All @@ -121,6 +135,10 @@ export class IdleTransaction extends Transaction {
this._finished = true;
this.activities = {};

if (this.op === 'ui.action.click') {
this.setTag(FINISH_REASON_TAG, this._finishReason);
}

if (this.spanRecorder) {
__DEBUG_BUILD__ &&
logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);
Expand Down Expand Up @@ -227,6 +245,7 @@ export class IdleTransaction extends Transaction {
this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;

if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) {
this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];
this.finish(endTimestamp);
}
}
Expand All @@ -239,6 +258,7 @@ export class IdleTransaction extends Transaction {
this.cancelIdleTimeout();
this._idleTimeoutID = setTimeout(() => {
if (!this._finished && Object.keys(this.activities).length === 0) {
this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1];
this.finish(endTimestamp);
}
}, this._idleTimeout);
Expand Down Expand Up @@ -270,6 +290,7 @@ export class IdleTransaction extends Transaction {
if (Object.keys(this.activities).length === 0) {
const endTimestamp = timestampWithMs();
if (this._idleTimeoutCanceledPermanently) {
this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];
this.finish(endTimestamp);
} else {
// We need to add the timeout here to have the real endtimestamp of the transaction
Expand Down Expand Up @@ -302,6 +323,7 @@ export class IdleTransaction extends Transaction {
if (this._heartbeatCounter >= 3) {
__DEBUG_BUILD__ && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');
this.setStatus('deadline_exceeded');
this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[0];
this.finish();
} else {
this._pingHeartbeat();
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SDK_VERSION = '7.42.0';
export const SDK_VERSION = '7.43.0';
4 changes: 4 additions & 0 deletions packages/e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ current state.

Prerequisites: Docker

- Copy `.env.example` to `.env`
- Fill in auth information in `.env` for an example Sentry project
- The `E2E_TEST_AUTH_TOKEN` must have all the default permissions

```bash
yarn test:e2e
```
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/e2e-tests",
"version": "7.42.0",
"version": "7.43.0",
"license": "MIT",
"engines": {
"node": ">=10"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/node": "18.11.17",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.9",
"next": "13.2.3",
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
Expand Down
Loading

0 comments on commit d3f4399

Please sign in to comment.