Skip to content

Commit ffcb4b9

Browse files
committed
Merge remote-tracking branch 'origin/master' into lforst-standard-react-application-transaction-session-tests
2 parents 34501b1 + 8ef9995 commit ffcb4b9

File tree

150 files changed

+1290
-490
lines changed

Some content is hidden

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

150 files changed

+1290
-490
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ on:
1111
description: If the commit you want to test isn't the head of a branch, provide its SHA here
1212
required: false
1313

14+
# Cancel in progress workflows on pull_requests.
15+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
1420
env:
1521
# We pin the exact version to enforce reproducable builds with node + npm.
1622
DEFAULT_NODE_VERSION: '16.15.1'
@@ -643,6 +649,7 @@ jobs:
643649
env:
644650
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ env.DEFAULT_NODE_VERSION }}
645651
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
652+
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
646653
run: |
647654
cd packages/e2e-tests
648655
yarn test:e2e

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@ name: 'CodeQL'
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [master]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
1919
branches: [master]
2020
schedule:
2121
- cron: '40 3 * * 0'
2222

23+
# Cancel in progress workflows on pull_requests.
24+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
27+
cancel-in-progress: true
28+
2329
jobs:
2430
analyze:
2531
name: Analyze

CHANGELOG.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@
44

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

7+
## 7.15.0
8+
9+
This release deprecates `@sentry/hub` and all of it's exports. All of the `@sentry/hub` exports have moved to `@sentry/core`. `@sentry/hub` will be removed in the next major release.
10+
11+
- feat(ember): Add ember-engine-router support (#5905)
12+
- feat(nextjs): Enable `autoInstrumentServerFunctions` per default (#5919)
13+
- feat(tracing): Make BrowserTracing heartbeat interval configurable (#5867)
14+
- fix(node): Remove Cookie header from requestdata.headers if cookies should not be sent to Sentry (#5898)
15+
- fix(remix): Rework dynamic imports of `react-router-dom` (#5897)
16+
- fix(utils): Accept DSN URLs with empty password (#5902)
17+
- fix(vue): Finish spans in component tracking before starting new ones for same operation (#5918)
18+
- ref(hub): Move `@sentry/hub` code to `@sentry/core` (#5823)
19+
20+
Work in this release contributed by @outsideris and @JonasKruckenberg. Thank you for your contributions!
21+
22+
## 7.14.2
23+
24+
- fix(ember): Align span operations to new operations (#5883)
25+
- fix(nextjs): Consider pageExtensions option in auto instrumentation (#5881)
26+
- fix(remix): Align span operations to new operations (#5889)
27+
- fix(serverless): Align span operations to new operations (#5890)
28+
- fix(tracing): Align span operations to new operations (#5891)
29+
- fix(vue): Align span operations to new operations (#5892)
30+
- ref(hub): Remove hard cap from maxBreadcrumbs (#5873)
31+
- ref(nextjs): Make build-phase check more robust (#5857)
32+
33+
Work in this release contributed by @outsideris. Thank you for your contributions!
34+
735
## 7.14.1
836

937
- fix(nextjs): Handle CJS API route exports (#5865)
@@ -22,7 +50,7 @@
2250
- fix(nextjs): Handle `pathname` being passed in object in `instrumentServer` (#5782)
2351
- fix(nextjs): Pass request in sampling context of data fetchers wrapper transaction (#5784)
2452
- fix(nextjs): Reverse order of checks for instrumenting server (#5828)
25-
- fix(nextjs): Rename `nextjs.data.server` ops (#5830)
53+
- fix(nextjs): Rename `nextjs.data.server` ops (#5830)
2654
- fix(remix): Do not skip error handling if tracing is not enabled. (#5811)
2755
- fix(remix): Use import() to get `react-router-dom` in Express wrapper. (#5810)
2856
- fix(tracing): Remove `connection.downlink` measurement (#5794)

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": "7.14.1",
3+
"version": "7.15.0",
44
"packages": "packages/*",
55
"npmClient": "yarn",
66
"useWorkspaces": true

packages/angular/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ module.exports = {
33
browser: true,
44
},
55
extends: ['../../.eslintrc.js'],
6+
ignorePatterns: ['setup-jest.ts'],
67
};

packages/angular/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ const baseConfig = require('../../jest/jest.config.js');
33
module.exports = {
44
...baseConfig,
55
testEnvironment: 'jsdom',
6+
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
67
};

packages/angular/package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/angular",
3-
"version": "7.14.1",
3+
"version": "7.15.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.14.1",
25-
"@sentry/types": "7.14.1",
26-
"@sentry/utils": "7.14.1",
24+
"@sentry/browser": "7.15.0",
25+
"@sentry/types": "7.15.0",
26+
"@sentry/utils": "7.15.0",
2727
"tslib": "^2.0.0"
2828
},
2929
"devDependencies": {
@@ -33,9 +33,12 @@
3333
"@angular/compiler": "^10.2.5",
3434
"@angular/compiler-cli": "~10.2.5",
3535
"@angular/core": "~10.2.5",
36+
"@angular/platform-browser": "~10.2.5",
37+
"@angular/platform-browser-dynamic": "~10.2.5",
3638
"@angular/router": "~10.2.5",
3739
"ng-packagr": "^10.1.0",
38-
"typescript": "~4.0.2"
40+
"typescript": "~4.0.2",
41+
"zone.js": "^0.11.8"
3942
},
4043
"scripts": {
4144
"build": "yarn build:ngc",

packages/angular/setup-jest.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import 'zone.js';
2+
3+
import { TestBed } from '@angular/core/testing';
4+
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
5+
6+
TestBed.resetTestEnvironment();
7+
TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());

packages/angular/test/errorhandler.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,28 @@ describe('SentryErrorHandler', () => {
121121
expect.any(Function),
122122
);
123123
});
124+
125+
it('handleError method shows report dialog', () => {
126+
const showReportDialogSpy = jest.spyOn(SentryBrowser, 'showReportDialog');
127+
128+
const errorHandler = createErrorHandler({ showDialog: true });
129+
errorHandler.handleError(new Error('test'));
130+
131+
expect(showReportDialogSpy).toBeCalledTimes(1);
132+
});
133+
134+
it('handleError method extracts error with a custom extractor', () => {
135+
const customExtractor = (error: unknown) => {
136+
if (typeof error === 'string') {
137+
return new Error(`custom ${error}`);
138+
}
139+
return error;
140+
};
141+
142+
const errorHandler = createErrorHandler({ extractor: customExtractor });
143+
errorHandler.handleError('error');
144+
145+
expect(captureExceptionSpy).toHaveBeenCalledTimes(1);
146+
expect(captureExceptionSpy).toHaveBeenCalledWith(new Error('custom error'), expect.any(Function));
147+
});
124148
});

0 commit comments

Comments
 (0)