Skip to content

Commit defbde0

Browse files
committed
build: Update typescript from 3.8.3 to 4.9.5
1 parent 8482c0a commit defbde0

File tree

76 files changed

+261
-192
lines changed

Some content is hidden

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

76 files changed

+261
-192
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,9 @@ jobs:
654654
yarn test:package
655655
656656
job_node_integration_tests:
657-
name: Node (${{ matrix.node }}) Integration Tests
657+
name:
658+
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
659+
Tests
658660
needs: [job_get_metadata, job_build]
659661
if: needs.job_get_metadata.outputs.changed_node == 'true' || github.event_name != 'pull_request'
660662
runs-on: ubuntu-20.04
@@ -663,6 +665,12 @@ jobs:
663665
fail-fast: false
664666
matrix:
665667
node: [10, 12, 14, 16, 18, 20]
668+
typescript:
669+
- false
670+
include:
671+
# Only check typescript for latest version (to streamline CI)
672+
- node: 20
673+
typescript: '3.8'
666674
steps:
667675
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
668676
uses: actions/checkout@v3
@@ -676,6 +684,11 @@ jobs:
676684
uses: ./.github/actions/restore-cache
677685
env:
678686
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
687+
688+
- name: Overwrite typescript version
689+
if: matrix.typescript
690+
run: yarn add --dev --ignore-workspace-root-check typescript@${{ matrix.typescript }}
691+
679692
- name: Run integration tests
680693
env:
681694
NODE_VERSION: ${{ matrix.node }}
@@ -714,7 +727,7 @@ jobs:
714727
yarn test:integration:ci
715728
716729
job_e2e_tests:
717-
name: E2E Tests (Shard ${{ matrix.shard }})
730+
name: E2E (Shard ${{ matrix.shard }}) Tests
718731
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
719732
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
720733
if:
@@ -727,6 +740,7 @@ jobs:
727740
fail-fast: false
728741
matrix:
729742
shard: [1, 2, 3]
743+
730744
steps:
731745
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
732746
uses: actions/checkout@v3
@@ -743,6 +757,7 @@ jobs:
743757
uses: ./.github/actions/restore-cache
744758
env:
745759
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
760+
746761
- name: Get node version
747762
id: versions
748763
run: |

nx.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@
6464
],
6565
"outputs": [
6666
"{projectRoot}/build/types",
67-
"{projectRoot}/build/npm/types"
67+
"{projectRoot}/build/types-ts3.8",
68+
"{projectRoot}/build/npm/types",
69+
"{projectRoot}/build/npm/types-ts3.8"
6870
]
6971
},
7072
"lint:eslint": {

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"chai": "^4.1.2",
9191
"codecov": "^3.6.5",
9292
"deepmerge": "^4.2.2",
93+
"downlevel-dts": "~0.11.0",
9394
"es-check": "7.1.0",
9495
"eslint": "7.32.0",
9596
"jest": "^27.5.1",
@@ -114,9 +115,9 @@
114115
"size-limit": "^4.5.5",
115116
"ts-jest": "^27.1.4",
116117
"ts-node": "10.9.1",
117-
"tslib": "^2.3.1",
118+
"tslib": "2.4.1 || 1.9.3",
118119
"typedoc": "^0.18.0",
119-
"typescript": "3.8.3",
120+
"typescript": "4.9.5",
120121
"vitest": "^0.29.2",
121122
"yalc": "^1.0.0-pre.53"
122123
},

packages/angular-ivy/ng-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"@sentry/utils": "Sentry.util"
99
}
1010
},
11-
"allowedNonPeerDependencies": ["@sentry/browser", "@sentry/utils", "@sentry/types", "tslib"],
11+
"allowedNonPeerDependencies": ["@sentry/browser", "@sentry/core", "@sentry/utils", "@sentry/types", "tslib"],
1212
"assets": ["README.md", "LICENSE"]
1313
}

packages/angular-ivy/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
},
2323
"dependencies": {
2424
"@sentry/browser": "7.53.1",
25+
"@sentry/core": "7.53.1",
2526
"@sentry/types": "7.53.1",
2627
"@sentry/utils": "7.53.1",
27-
"tslib": "^2.3.0"
28+
"tslib": "2.4.1"
2829
},
2930
"devDependencies": {
3031
"@angular-devkit/build-angular": "~12.2.18",
@@ -37,7 +38,6 @@
3738
"@angular/platform-browser-dynamic": "~12.2.0",
3839
"@angular/router": "~12.2.0",
3940
"ng-packagr": "^12.1.1",
40-
"typescript": "~4.3.5",
4141
"zone.js": "~0.11.4"
4242
},
4343
"scripts": {

packages/angular/ng-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"@sentry/utils": "Sentry.util"
99
}
1010
},
11-
"whitelistedNonPeerDependencies": ["@sentry/browser", "@sentry/utils", "@sentry/types", "tslib"],
11+
"whitelistedNonPeerDependencies": ["@sentry/browser", "@sentry/core", "@sentry/utils", "@sentry/types", "tslib"],
1212
"assets": ["README.md", "LICENSE"]
1313
}

packages/angular/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
},
2323
"dependencies": {
2424
"@sentry/browser": "7.53.1",
25+
"@sentry/core": "7.53.1",
2526
"@sentry/types": "7.53.1",
2627
"@sentry/utils": "7.53.1",
27-
"tslib": "^2.0.0"
28+
"tslib": "2.4.1"
2829
},
2930
"devDependencies": {
3031
"@angular-devkit/build-angular": "~0.1002.4",
@@ -38,7 +39,7 @@
3839
"@angular/router": "~10.2.5",
3940
"ng-packagr": "^10.1.0",
4041
"rxjs": "6.5.5",
41-
"typescript": "~4.0.2",
42+
"typescript": "4.0.2",
4243
"zone.js": "^0.11.8"
4344
},
4445
"scripts": {

packages/angular/src/errorhandler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
22
import type { ErrorHandler as AngularErrorHandler } from '@angular/core';
33
import { Inject, Injectable } from '@angular/core';
44
import * as Sentry from '@sentry/browser';
5-
import { captureException } from '@sentry/browser';
5+
import type { Event, Scope } from '@sentry/types';
66
import { addExceptionMechanism, isString } from '@sentry/utils';
77

88
import { runOutsideAngular } from './zone';
@@ -101,7 +101,7 @@ class SentryErrorHandler implements AngularErrorHandler {
101101

102102
// Capture handled exception and send it to Sentry.
103103
const eventId = runOutsideAngular(() =>
104-
captureException(extractedError, scope => {
104+
Sentry.captureException(extractedError, (scope: Scope) => {
105105
scope.addEventProcessor(event => {
106106
addExceptionMechanism(event, {
107107
type: 'angular',
@@ -126,7 +126,7 @@ class SentryErrorHandler implements AngularErrorHandler {
126126
const client = Sentry.getCurrentHub().getClient();
127127

128128
if (client && client.on && !this._registeredAfterSendEventHandler) {
129-
client.on('afterSendEvent', event => {
129+
client.on('afterSendEvent', (event: Event) => {
130130
if (!event.type) {
131131
Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });
132132
}

packages/angular/test/errorhandler.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('SentryErrorHandler', () => {
5757
describe('handleError method', () => {
5858
it('handleError method assigns the correct mechanism', () => {
5959
const addEventProcessorSpy = jest.spyOn(FakeScope, 'addEventProcessor').mockImplementationOnce(callback => {
60-
void callback({}, { event_id: 'fake-event-id' });
60+
void (callback as (event: any, hint: any) => void)({}, { event_id: 'fake-event-id' });
6161
return FakeScope;
6262
});
6363

packages/browser-integration-tests/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"html-webpack-plugin": "^5.5.0",
5454
"pako": "^2.1.0",
5555
"playwright": "^1.31.1",
56-
"typescript": "^4.5.2",
5756
"webpack": "^5.52.0"
5857
},
5958
"devDependencies": {

0 commit comments

Comments
 (0)