Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -655,7 +655,9 @@ jobs:
yarn test:package

job_node_integration_tests:
name: Node (${{ matrix.node }}) Integration Tests
name:
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_node == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
Expand All@@ -664,6 +666,12 @@ jobs:
fail-fast: false
matrix:
node: [10, 12, 14, 16, 18, 20]
typescript:
- false
include:
# Only check typescript for latest version (to streamline CI)
- node: 20
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -677,6 +685,11 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Overwrite typescript version
if: matrix.typescript
run: yarn add --dev --ignore-workspace-root-check typescript@${{ matrix.typescript }}

- name: Run integration tests
env:
NODE_VERSION: ${{ matrix.node }}
Expand DownExpand Up@@ -717,7 +730,7 @@ jobs:
yarn test:integration:ci

job_e2e_tests:
name: E2E Tests (Shard ${{ matrix.shard }})
name: E2E (Shard ${{ matrix.shard }}) Tests
# 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
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
if:
Expand All@@ -730,6 +743,7 @@ jobs:
fail-fast: false
matrix:
shard: [1, 2, 3]

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -746,6 +760,7 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Get node version
id: versions
run: |
Expand Down
4 changes: 3 additions & 1 deletion nx.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,9 @@
],
"outputs": [
"{projectRoot}/build/types",
"{projectRoot}/build/npm/types"
"{projectRoot}/build/types-ts3.8",
"{projectRoot}/build/npm/types",
"{projectRoot}/build/npm/types-ts3.8"
]
},
"lint:eslint": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,6 +90,7 @@
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"downlevel-dts": "~0.11.0",
"es-check": "7.1.0",
"eslint": "7.32.0",
"jest": "^27.5.1",
Expand All@@ -114,9 +115,9 @@
"size-limit": "^4.5.5",
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"tslib": "^2.3.1",
"tslib": "2.4.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3",
"typescript": "4.9.5",
"vitest": "^0.29.2",
"yalc": "^1.0.0-pre.53"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/angular-ivy/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.3.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.18",
Expand All@@ -37,7 +37,6 @@
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"ng-packagr": "^12.1.1",
"typescript": "~4.3.5",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "~0.11.4"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.0.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1002.4",
Expand All@@ -38,7 +38,7 @@
"@angular/router": "~10.2.5",
"ng-packagr": "^10.1.0",
"rxjs": "6.5.5",
"typescript": "~4.0.2",
"typescript": "4.0.2",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "^0.11.8"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/src/errorhandler.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import type { ErrorHandler as AngularErrorHandler } from '@angular/core';
import { Inject, Injectable } from '@angular/core';
import * as Sentry from '@sentry/browser';
import { captureException } from '@sentry/browser';
import type { Event, Scope } from '@sentry/types';
import { addExceptionMechanism, isString } from '@sentry/utils';

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

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

if (client && client.on && !this._registeredAfterSendEventHandler) {
client.on('afterSendEvent', event => {
client.on('afterSendEvent', (event: Event) => {
if (!event.type) {
Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/test/errorhandler.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,7 +57,7 @@ describe('SentryErrorHandler', () => {
describe('handleError method', () => {
it('handleError method assigns the correct mechanism', () => {
const addEventProcessorSpy = jest.spyOn(FakeScope, 'addEventProcessor').mockImplementationOnce(callback => {
void callback({}, { event_id: 'fake-event-id' });
void (callback as (event: any, hint: any) => void)({}, { event_id: 'fake-event-id' });
return FakeScope;
});

Expand Down
1 change: 0 additions & 1 deletion packages/browser-integration-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,7 +53,6 @@
"html-webpack-plugin": "^5.5.0",
"pako": "^2.1.0",
"playwright": "^1.31.1",
"typescript": "^4.5.2",
"webpack": "^5.52.0"
},
"devDependencies": {
Expand Down
9 changes: 7 additions & 2 deletions packages/browser/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/npm/types/index.d.ts": ["build/npm/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
Expand All@@ -21,7 +24,7 @@
"@sentry/replay": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
Comment thread
Lms24 marked this conversation as resolved.
},
"devDependencies": {
"@sentry-internal/integration-shims": "7.56.0",
Expand DownExpand Up@@ -53,7 +56,9 @@
"build:bundle:es5": "JS_VERSION=es5 rollup -c rollup.bundle.config.js",
"build:bundle:es6": "JS_VERSION=es6 rollup -c rollup.bundle.config.js",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:bundle:watch": "rollup -c rollup.bundle.config.js --watch",
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/src/eventbuilder.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -208,7 +208,7 @@ export function eventFromUnknownInput(
// https://developer.mozilla.org/en-US/docs/Web/API/DOMError
// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {
if (isDOMError(exception) || isDOMException(exception as DOMException)) {
const domException = exception as DOMException;

if ('stack' in (exception as Error)) {
Expand All@@ -220,6 +220,7 @@ export function eventFromUnknownInput(
addExceptionTypeValue(event, message);
}
if ('code' in domException) {
// eslint-disable-next-line deprecation/deprecation
event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };
}

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/integrations/breadcrumbs.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,5 +348,5 @@ function _historyBreadcrumb(handlerData: HandlerData & { from: string; to: strin
}

function _isEvent(event: unknown): event is Event {
return event && !!(event as Record<string, unknown>).target;
return !!event && !!(event as Record<string, unknown>).target;
}
2 changes: 1 addition & 1 deletion packages/browser/test/unit/integrations/helpers.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -157,7 +157,7 @@ describe('internal wrap()', () => {
try {
wrapped();
} catch (error) {
expect(error.message).toBe('boom');
expect((error as Error).message).toBe('boom');
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/test/unit/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ export const createTestTransport = (...sendResults: MockResult<TransportMakeRequ
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
9 changes: 7 additions & 2 deletions packages/core/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,19 +12,24 @@
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/types/index.d.ts": ["build/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.js --watch",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/transports/offline.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -131,10 +131,10 @@ export function makeOfflineTransport<TO>(
retryDelay = START_DELAY;
return result;
} catch (e) {
if (store && (await shouldQueue(envelope, e, retryDelay))) {
if (store && (await shouldQueue(envelope, e as Error, retryDelay))) {
Comment thread
Lms24 marked this conversation as resolved.
await store.insert(envelope);
flushWithBackOff();
log('Error sending. Event queued', e);
log('Error sending. Event queued', e as Error);
return {};
} else {
throw e;
Expand Down
1 change: 1 addition & 0 deletions packages/core/test/lib/hint.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,7 @@ describe('Hint', () => {

afterEach(() => {
jest.clearAllMocks();
// @ts-ignore for testing
delete GLOBAL_OBJ.__SENTRY__;
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/lib/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,7 +98,7 @@ const createTestTransport = (
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@
"fs-extra": "11.1.0",
"glob": "8.0.3",
"ts-node": "10.9.1",
"typescript": "3.8.3",
"yaml": "2.2.2"
},
"volta": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.0.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
"typescript": "4.9.5"
},
"devDependencies": {
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,13 @@
"testApplicationName": "create-react-app",
"buildCommand": "pnpm install && pnpm build",
"tests": [],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4",
"typescript": "4.9.5",
"wait-port": "1.0.4",
"ts-node": "10.9.1",
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,13 @@
"testCommand": "pnpm test"
}
],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"ts-node": "10.9.1",
"tslib": "^2.4.1",
"tslib": "2.4.1",
"typescript": "^5.0.0",
"vite": "^4.2.0",
"wait-port": "1.0.4"
Expand Down
1 change: 0 additions & 1 deletion packages/ember/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,7 +75,6 @@
"loader.js": "~4.7.0",
"qunit": "~2.19.2",
"qunit-dom": "~2.0.0",
"typescript": "~4.5.2",
"webpack": "~5.74.0"
},
"engines": {
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -655,7 +655,9 @@ jobs:
yarn test:package

job_node_integration_tests:
name: Node (${{ matrix.node }}) Integration Tests
name:
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_node == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
Expand All@@ -664,6 +666,12 @@ jobs:
fail-fast: false
matrix:
node: [10, 12, 14, 16, 18, 20]
typescript:
- false
include:
# Only check typescript for latest version (to streamline CI)
- node: 20
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -677,6 +685,11 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Overwrite typescript version
if: matrix.typescript
run: yarn add --dev --ignore-workspace-root-check typescript@${{ matrix.typescript }}

- name: Run integration tests
env:
NODE_VERSION: ${{ matrix.node }}
Expand DownExpand Up@@ -717,7 +730,7 @@ jobs:
yarn test:integration:ci

job_e2e_tests:
name: E2E Tests (Shard ${{ matrix.shard }})
name: E2E (Shard ${{ matrix.shard }}) Tests
# 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
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
if:
Expand All@@ -730,6 +743,7 @@ jobs:
fail-fast: false
matrix:
shard: [1, 2, 3]

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -746,6 +760,7 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Get node version
id: versions
run: |
Expand Down
4 changes: 3 additions & 1 deletion nx.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,9 @@
],
"outputs": [
"{projectRoot}/build/types",
"{projectRoot}/build/npm/types"
"{projectRoot}/build/types-ts3.8",
"{projectRoot}/build/npm/types",
"{projectRoot}/build/npm/types-ts3.8"
]
},
"lint:eslint": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,6 +90,7 @@
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"downlevel-dts": "~0.11.0",
"es-check": "7.1.0",
"eslint": "7.32.0",
"jest": "^27.5.1",
Expand All@@ -114,9 +115,9 @@
"size-limit": "^4.5.5",
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"tslib": "^2.3.1",
"tslib": "2.4.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3",
"typescript": "4.9.5",
"vitest": "^0.29.2",
"yalc": "^1.0.0-pre.53"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/angular-ivy/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.3.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.18",
Expand All@@ -37,7 +37,6 @@
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"ng-packagr": "^12.1.1",
"typescript": "~4.3.5",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "~0.11.4"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.0.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1002.4",
Expand All@@ -38,7 +38,7 @@
"@angular/router": "~10.2.5",
"ng-packagr": "^10.1.0",
"rxjs": "6.5.5",
"typescript": "~4.0.2",
"typescript": "4.0.2",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "^0.11.8"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/src/errorhandler.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import type { ErrorHandler as AngularErrorHandler } from '@angular/core';
import { Inject, Injectable } from '@angular/core';
import * as Sentry from '@sentry/browser';
import { captureException } from '@sentry/browser';
import type { Event, Scope } from '@sentry/types';
import { addExceptionMechanism, isString } from '@sentry/utils';

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

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

if (client && client.on && !this._registeredAfterSendEventHandler) {
client.on('afterSendEvent', event => {
client.on('afterSendEvent', (event: Event) => {
if (!event.type) {
Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/test/errorhandler.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,7 +57,7 @@ describe('SentryErrorHandler', () => {
describe('handleError method', () => {
it('handleError method assigns the correct mechanism', () => {
const addEventProcessorSpy = jest.spyOn(FakeScope, 'addEventProcessor').mockImplementationOnce(callback => {
void callback({}, { event_id: 'fake-event-id' });
void (callback as (event: any, hint: any) => void)({}, { event_id: 'fake-event-id' });
return FakeScope;
});

Expand Down
1 change: 0 additions & 1 deletion packages/browser-integration-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,7 +53,6 @@
"html-webpack-plugin": "^5.5.0",
"pako": "^2.1.0",
"playwright": "^1.31.1",
"typescript": "^4.5.2",
"webpack": "^5.52.0"
},
"devDependencies": {
Expand Down
9 changes: 7 additions & 2 deletions packages/browser/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/npm/types/index.d.ts": ["build/npm/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
Expand All@@ -21,7 +24,7 @@
"@sentry/replay": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
Comment thread
Lms24 marked this conversation as resolved.
},
"devDependencies": {
"@sentry-internal/integration-shims": "7.56.0",
Expand DownExpand Up@@ -53,7 +56,9 @@
"build:bundle:es5": "JS_VERSION=es5 rollup -c rollup.bundle.config.js",
"build:bundle:es6": "JS_VERSION=es6 rollup -c rollup.bundle.config.js",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:bundle:watch": "rollup -c rollup.bundle.config.js --watch",
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/src/eventbuilder.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -208,7 +208,7 @@ export function eventFromUnknownInput(
// https://developer.mozilla.org/en-US/docs/Web/API/DOMError
// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {
if (isDOMError(exception) || isDOMException(exception as DOMException)) {
const domException = exception as DOMException;

if ('stack' in (exception as Error)) {
Expand All@@ -220,6 +220,7 @@ export function eventFromUnknownInput(
addExceptionTypeValue(event, message);
}
if ('code' in domException) {
// eslint-disable-next-line deprecation/deprecation
event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };
}

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/integrations/breadcrumbs.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,5 +348,5 @@ function _historyBreadcrumb(handlerData: HandlerData & { from: string; to: strin
}

function _isEvent(event: unknown): event is Event {
return event && !!(event as Record<string, unknown>).target;
return !!event && !!(event as Record<string, unknown>).target;
}
2 changes: 1 addition & 1 deletion packages/browser/test/unit/integrations/helpers.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -157,7 +157,7 @@ describe('internal wrap()', () => {
try {
wrapped();
} catch (error) {
expect(error.message).toBe('boom');
expect((error as Error).message).toBe('boom');
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/test/unit/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ export const createTestTransport = (...sendResults: MockResult<TransportMakeRequ
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
9 changes: 7 additions & 2 deletions packages/core/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,19 +12,24 @@
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/types/index.d.ts": ["build/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.js --watch",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/transports/offline.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -131,10 +131,10 @@ export function makeOfflineTransport<TO>(
retryDelay = START_DELAY;
return result;
} catch (e) {
if (store && (await shouldQueue(envelope, e, retryDelay))) {
if (store && (await shouldQueue(envelope, e as Error, retryDelay))) {
Comment thread
Lms24 marked this conversation as resolved.
await store.insert(envelope);
flushWithBackOff();
log('Error sending. Event queued', e);
log('Error sending. Event queued', e as Error);
return {};
} else {
throw e;
Expand Down
1 change: 1 addition & 0 deletions packages/core/test/lib/hint.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,7 @@ describe('Hint', () => {

afterEach(() => {
jest.clearAllMocks();
// @ts-ignore for testing
delete GLOBAL_OBJ.__SENTRY__;
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/lib/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,7 +98,7 @@ const createTestTransport = (
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@
"fs-extra": "11.1.0",
"glob": "8.0.3",
"ts-node": "10.9.1",
"typescript": "3.8.3",
"yaml": "2.2.2"
},
"volta": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.0.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
"typescript": "4.9.5"
},
"devDependencies": {
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,13 @@
"testApplicationName": "create-react-app",
"buildCommand": "pnpm install && pnpm build",
"tests": [],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4",
"typescript": "4.9.5",
"wait-port": "1.0.4",
"ts-node": "10.9.1",
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,13 @@
"testCommand": "pnpm test"
}
],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"ts-node": "10.9.1",
"tslib": "^2.4.1",
"tslib": "2.4.1",
"typescript": "^5.0.0",
"vite": "^4.2.0",
"wait-port": "1.0.4"
Expand Down
1 change: 0 additions & 1 deletion packages/ember/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,7 +75,6 @@
"loader.js": "~4.7.0",
"qunit": "~2.19.2",
"qunit-dom": "~2.0.0",
"typescript": "~4.5.2",
"webpack": "~5.74.0"
},
"engines": {
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -655,7 +655,9 @@ jobs:
yarn test:package

job_node_integration_tests:
name: Node (${{ matrix.node }}) Integration Tests
name:
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_node == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
Expand All@@ -664,6 +666,12 @@ jobs:
fail-fast: false
matrix:
node: [10, 12, 14, 16, 18, 20]
typescript:
- false
include:
# Only check typescript for latest version (to streamline CI)
- node: 20
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -677,6 +685,11 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Overwrite typescript version
if: matrix.typescript
run: yarn add --dev --ignore-workspace-root-check typescript@${{ matrix.typescript }}

- name: Run integration tests
env:
NODE_VERSION: ${{ matrix.node }}
Expand DownExpand Up@@ -717,7 +730,7 @@ jobs:
yarn test:integration:ci

job_e2e_tests:
name: E2E Tests (Shard ${{ matrix.shard }})
name: E2E (Shard ${{ matrix.shard }}) Tests
# 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
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
if:
Expand All@@ -730,6 +743,7 @@ jobs:
fail-fast: false
matrix:
shard: [1, 2, 3]

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -746,6 +760,7 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Get node version
id: versions
run: |
Expand Down
4 changes: 3 additions & 1 deletion nx.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,9 @@
],
"outputs": [
"{projectRoot}/build/types",
"{projectRoot}/build/npm/types"
"{projectRoot}/build/types-ts3.8",
"{projectRoot}/build/npm/types",
"{projectRoot}/build/npm/types-ts3.8"
]
},
"lint:eslint": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,6 +90,7 @@
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"downlevel-dts": "~0.11.0",
"es-check": "7.1.0",
"eslint": "7.32.0",
"jest": "^27.5.1",
Expand All@@ -114,9 +115,9 @@
"size-limit": "^4.5.5",
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"tslib": "^2.3.1",
"tslib": "2.4.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3",
"typescript": "4.9.5",
"vitest": "^0.29.2",
"yalc": "^1.0.0-pre.53"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/angular-ivy/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.3.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.18",
Expand All@@ -37,7 +37,6 @@
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"ng-packagr": "^12.1.1",
"typescript": "~4.3.5",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "~0.11.4"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.0.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1002.4",
Expand All@@ -38,7 +38,7 @@
"@angular/router": "~10.2.5",
"ng-packagr": "^10.1.0",
"rxjs": "6.5.5",
"typescript": "~4.0.2",
"typescript": "4.0.2",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "^0.11.8"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/src/errorhandler.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import type { ErrorHandler as AngularErrorHandler } from '@angular/core';
import { Inject, Injectable } from '@angular/core';
import * as Sentry from '@sentry/browser';
import { captureException } from '@sentry/browser';
import type { Event, Scope } from '@sentry/types';
import { addExceptionMechanism, isString } from '@sentry/utils';

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

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

if (client && client.on && !this._registeredAfterSendEventHandler) {
client.on('afterSendEvent', event => {
client.on('afterSendEvent', (event: Event) => {
if (!event.type) {
Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/test/errorhandler.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,7 +57,7 @@ describe('SentryErrorHandler', () => {
describe('handleError method', () => {
it('handleError method assigns the correct mechanism', () => {
const addEventProcessorSpy = jest.spyOn(FakeScope, 'addEventProcessor').mockImplementationOnce(callback => {
void callback({}, { event_id: 'fake-event-id' });
void (callback as (event: any, hint: any) => void)({}, { event_id: 'fake-event-id' });
return FakeScope;
});

Expand Down
1 change: 0 additions & 1 deletion packages/browser-integration-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,7 +53,6 @@
"html-webpack-plugin": "^5.5.0",
"pako": "^2.1.0",
"playwright": "^1.31.1",
"typescript": "^4.5.2",
"webpack": "^5.52.0"
},
"devDependencies": {
Expand Down
9 changes: 7 additions & 2 deletions packages/browser/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/npm/types/index.d.ts": ["build/npm/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
Expand All@@ -21,7 +24,7 @@
"@sentry/replay": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
Comment thread
Lms24 marked this conversation as resolved.
},
"devDependencies": {
"@sentry-internal/integration-shims": "7.56.0",
Expand DownExpand Up@@ -53,7 +56,9 @@
"build:bundle:es5": "JS_VERSION=es5 rollup -c rollup.bundle.config.js",
"build:bundle:es6": "JS_VERSION=es6 rollup -c rollup.bundle.config.js",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:bundle:watch": "rollup -c rollup.bundle.config.js --watch",
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/src/eventbuilder.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -208,7 +208,7 @@ export function eventFromUnknownInput(
// https://developer.mozilla.org/en-US/docs/Web/API/DOMError
// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {
if (isDOMError(exception) || isDOMException(exception as DOMException)) {
const domException = exception as DOMException;

if ('stack' in (exception as Error)) {
Expand All@@ -220,6 +220,7 @@ export function eventFromUnknownInput(
addExceptionTypeValue(event, message);
}
if ('code' in domException) {
// eslint-disable-next-line deprecation/deprecation
event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };
}

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/integrations/breadcrumbs.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,5 +348,5 @@ function _historyBreadcrumb(handlerData: HandlerData & { from: string; to: strin
}

function _isEvent(event: unknown): event is Event {
return event && !!(event as Record<string, unknown>).target;
return !!event && !!(event as Record<string, unknown>).target;
}
2 changes: 1 addition & 1 deletion packages/browser/test/unit/integrations/helpers.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -157,7 +157,7 @@ describe('internal wrap()', () => {
try {
wrapped();
} catch (error) {
expect(error.message).toBe('boom');
expect((error as Error).message).toBe('boom');
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/test/unit/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ export const createTestTransport = (...sendResults: MockResult<TransportMakeRequ
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
9 changes: 7 additions & 2 deletions packages/core/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,19 +12,24 @@
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/types/index.d.ts": ["build/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.js --watch",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/transports/offline.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -131,10 +131,10 @@ export function makeOfflineTransport<TO>(
retryDelay = START_DELAY;
return result;
} catch (e) {
if (store && (await shouldQueue(envelope, e, retryDelay))) {
if (store && (await shouldQueue(envelope, e as Error, retryDelay))) {
Comment thread
Lms24 marked this conversation as resolved.
await store.insert(envelope);
flushWithBackOff();
log('Error sending. Event queued', e);
log('Error sending. Event queued', e as Error);
return {};
} else {
throw e;
Expand Down
1 change: 1 addition & 0 deletions packages/core/test/lib/hint.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,7 @@ describe('Hint', () => {

afterEach(() => {
jest.clearAllMocks();
// @ts-ignore for testing
delete GLOBAL_OBJ.__SENTRY__;
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/lib/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,7 +98,7 @@ const createTestTransport = (
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@
"fs-extra": "11.1.0",
"glob": "8.0.3",
"ts-node": "10.9.1",
"typescript": "3.8.3",
"yaml": "2.2.2"
},
"volta": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.0.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
"typescript": "4.9.5"
},
"devDependencies": {
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,13 @@
"testApplicationName": "create-react-app",
"buildCommand": "pnpm install && pnpm build",
"tests": [],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4",
"typescript": "4.9.5",
"wait-port": "1.0.4",
"ts-node": "10.9.1",
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,13 @@
"testCommand": "pnpm test"
}
],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"ts-node": "10.9.1",
"tslib": "^2.4.1",
"tslib": "2.4.1",
"typescript": "^5.0.0",
"vite": "^4.2.0",
"wait-port": "1.0.4"
Expand Down
1 change: 0 additions & 1 deletion packages/ember/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,7 +75,6 @@
"loader.js": "~4.7.0",
"qunit": "~2.19.2",
"qunit-dom": "~2.0.0",
"typescript": "~4.5.2",
"webpack": "~5.74.0"
},
"engines": {
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -655,7 +655,9 @@ jobs:
yarn test:package

job_node_integration_tests:
name: Node (${{ matrix.node }}) Integration Tests
name:
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_node == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
Expand All@@ -664,6 +666,12 @@ jobs:
fail-fast: false
matrix:
node: [10, 12, 14, 16, 18, 20]
typescript:
- false
include:
# Only check typescript for latest version (to streamline CI)
- node: 20
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -677,6 +685,11 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Overwrite typescript version
if: matrix.typescript
run: yarn add --dev --ignore-workspace-root-check typescript@${{ matrix.typescript }}

- name: Run integration tests
env:
NODE_VERSION: ${{ matrix.node }}
Expand DownExpand Up@@ -717,7 +730,7 @@ jobs:
yarn test:integration:ci

job_e2e_tests:
name: E2E Tests (Shard ${{ matrix.shard }})
name: E2E (Shard ${{ matrix.shard }}) Tests
# 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
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
if:
Expand All@@ -730,6 +743,7 @@ jobs:
fail-fast: false
matrix:
shard: [1, 2, 3]

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -746,6 +760,7 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Get node version
id: versions
run: |
Expand Down
4 changes: 3 additions & 1 deletion nx.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,9 @@
],
"outputs": [
"{projectRoot}/build/types",
"{projectRoot}/build/npm/types"
"{projectRoot}/build/types-ts3.8",
"{projectRoot}/build/npm/types",
"{projectRoot}/build/npm/types-ts3.8"
]
},
"lint:eslint": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,6 +90,7 @@
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"downlevel-dts": "~0.11.0",
"es-check": "7.1.0",
"eslint": "7.32.0",
"jest": "^27.5.1",
Expand All@@ -114,9 +115,9 @@
"size-limit": "^4.5.5",
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"tslib": "^2.3.1",
"tslib": "2.4.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3",
"typescript": "4.9.5",
"vitest": "^0.29.2",
"yalc": "^1.0.0-pre.53"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/angular-ivy/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.3.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.18",
Expand All@@ -37,7 +37,6 @@
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"ng-packagr": "^12.1.1",
"typescript": "~4.3.5",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "~0.11.4"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.0.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1002.4",
Expand All@@ -38,7 +38,7 @@
"@angular/router": "~10.2.5",
"ng-packagr": "^10.1.0",
"rxjs": "6.5.5",
"typescript": "~4.0.2",
"typescript": "4.0.2",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "^0.11.8"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/src/errorhandler.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import type { ErrorHandler as AngularErrorHandler } from '@angular/core';
import { Inject, Injectable } from '@angular/core';
import * as Sentry from '@sentry/browser';
import { captureException } from '@sentry/browser';
import type { Event, Scope } from '@sentry/types';
import { addExceptionMechanism, isString } from '@sentry/utils';

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

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

if (client && client.on && !this._registeredAfterSendEventHandler) {
client.on('afterSendEvent', event => {
client.on('afterSendEvent', (event: Event) => {
if (!event.type) {
Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/test/errorhandler.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,7 +57,7 @@ describe('SentryErrorHandler', () => {
describe('handleError method', () => {
it('handleError method assigns the correct mechanism', () => {
const addEventProcessorSpy = jest.spyOn(FakeScope, 'addEventProcessor').mockImplementationOnce(callback => {
void callback({}, { event_id: 'fake-event-id' });
void (callback as (event: any, hint: any) => void)({}, { event_id: 'fake-event-id' });
return FakeScope;
});

Expand Down
1 change: 0 additions & 1 deletion packages/browser-integration-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,7 +53,6 @@
"html-webpack-plugin": "^5.5.0",
"pako": "^2.1.0",
"playwright": "^1.31.1",
"typescript": "^4.5.2",
"webpack": "^5.52.0"
},
"devDependencies": {
Expand Down
9 changes: 7 additions & 2 deletions packages/browser/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/npm/types/index.d.ts": ["build/npm/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
Expand All@@ -21,7 +24,7 @@
"@sentry/replay": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
Comment thread
Lms24 marked this conversation as resolved.
},
"devDependencies": {
"@sentry-internal/integration-shims": "7.56.0",
Expand DownExpand Up@@ -53,7 +56,9 @@
"build:bundle:es5": "JS_VERSION=es5 rollup -c rollup.bundle.config.js",
"build:bundle:es6": "JS_VERSION=es6 rollup -c rollup.bundle.config.js",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:bundle:watch": "rollup -c rollup.bundle.config.js --watch",
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/src/eventbuilder.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -208,7 +208,7 @@ export function eventFromUnknownInput(
// https://developer.mozilla.org/en-US/docs/Web/API/DOMError
// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {
if (isDOMError(exception) || isDOMException(exception as DOMException)) {
const domException = exception as DOMException;

if ('stack' in (exception as Error)) {
Expand All@@ -220,6 +220,7 @@ export function eventFromUnknownInput(
addExceptionTypeValue(event, message);
}
if ('code' in domException) {
// eslint-disable-next-line deprecation/deprecation
event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };
}

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/integrations/breadcrumbs.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,5 +348,5 @@ function _historyBreadcrumb(handlerData: HandlerData & { from: string; to: strin
}

function _isEvent(event: unknown): event is Event {
return event && !!(event as Record<string, unknown>).target;
return !!event && !!(event as Record<string, unknown>).target;
}
2 changes: 1 addition & 1 deletion packages/browser/test/unit/integrations/helpers.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -157,7 +157,7 @@ describe('internal wrap()', () => {
try {
wrapped();
} catch (error) {
expect(error.message).toBe('boom');
expect((error as Error).message).toBe('boom');
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/test/unit/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ export const createTestTransport = (...sendResults: MockResult<TransportMakeRequ
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
9 changes: 7 additions & 2 deletions packages/core/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,19 +12,24 @@
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/types/index.d.ts": ["build/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.js --watch",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/transports/offline.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -131,10 +131,10 @@ export function makeOfflineTransport<TO>(
retryDelay = START_DELAY;
return result;
} catch (e) {
if (store && (await shouldQueue(envelope, e, retryDelay))) {
if (store && (await shouldQueue(envelope, e as Error, retryDelay))) {
Comment thread
Lms24 marked this conversation as resolved.
await store.insert(envelope);
flushWithBackOff();
log('Error sending. Event queued', e);
log('Error sending. Event queued', e as Error);
return {};
} else {
throw e;
Expand Down
1 change: 1 addition & 0 deletions packages/core/test/lib/hint.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,7 @@ describe('Hint', () => {

afterEach(() => {
jest.clearAllMocks();
// @ts-ignore for testing
delete GLOBAL_OBJ.__SENTRY__;
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/lib/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,7 +98,7 @@ const createTestTransport = (
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@
"fs-extra": "11.1.0",
"glob": "8.0.3",
"ts-node": "10.9.1",
"typescript": "3.8.3",
"yaml": "2.2.2"
},
"volta": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.0.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
"typescript": "4.9.5"
},
"devDependencies": {
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,13 @@
"testApplicationName": "create-react-app",
"buildCommand": "pnpm install && pnpm build",
"tests": [],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4",
"typescript": "4.9.5",
"wait-port": "1.0.4",
"ts-node": "10.9.1",
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,13 @@
"testCommand": "pnpm test"
}
],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"ts-node": "10.9.1",
"tslib": "^2.4.1",
"tslib": "2.4.1",
"typescript": "^5.0.0",
"vite": "^4.2.0",
"wait-port": "1.0.4"
Expand Down
1 change: 0 additions & 1 deletion packages/ember/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,7 +75,6 @@
"loader.js": "~4.7.0",
"qunit": "~2.19.2",
"qunit-dom": "~2.0.0",
"typescript": "~4.5.2",
"webpack": "~5.74.0"
},
"engines": {
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -655,7 +655,9 @@ jobs:
yarn test:package

job_node_integration_tests:
name: Node (${{ matrix.node }}) Integration Tests
name:
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_node == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
Expand All@@ -664,6 +666,12 @@ jobs:
fail-fast: false
matrix:
node: [10, 12, 14, 16, 18, 20]
typescript:
- false
include:
# Only check typescript for latest version (to streamline CI)
- node: 20
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -677,6 +685,11 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Overwrite typescript version
if: matrix.typescript
run: yarn add --dev --ignore-workspace-root-check typescript@${{ matrix.typescript }}

- name: Run integration tests
env:
NODE_VERSION: ${{ matrix.node }}
Expand DownExpand Up@@ -717,7 +730,7 @@ jobs:
yarn test:integration:ci

job_e2e_tests:
name: E2E Tests (Shard ${{ matrix.shard }})
name: E2E (Shard ${{ matrix.shard }}) Tests
# 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
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
if:
Expand All@@ -730,6 +743,7 @@ jobs:
fail-fast: false
matrix:
shard: [1, 2, 3]

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -746,6 +760,7 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Get node version
id: versions
run: |
Expand Down
4 changes: 3 additions & 1 deletion nx.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,9 @@
],
"outputs": [
"{projectRoot}/build/types",
"{projectRoot}/build/npm/types"
"{projectRoot}/build/types-ts3.8",
"{projectRoot}/build/npm/types",
"{projectRoot}/build/npm/types-ts3.8"
]
},
"lint:eslint": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,6 +90,7 @@
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"downlevel-dts": "~0.11.0",
"es-check": "7.1.0",
"eslint": "7.32.0",
"jest": "^27.5.1",
Expand All@@ -114,9 +115,9 @@
"size-limit": "^4.5.5",
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"tslib": "^2.3.1",
"tslib": "2.4.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3",
"typescript": "4.9.5",
"vitest": "^0.29.2",
"yalc": "^1.0.0-pre.53"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/angular-ivy/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.3.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.18",
Expand All@@ -37,7 +37,6 @@
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"ng-packagr": "^12.1.1",
"typescript": "~4.3.5",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "~0.11.4"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.0.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1002.4",
Expand All@@ -38,7 +38,7 @@
"@angular/router": "~10.2.5",
"ng-packagr": "^10.1.0",
"rxjs": "6.5.5",
"typescript": "~4.0.2",
"typescript": "4.0.2",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "^0.11.8"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/src/errorhandler.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import type { ErrorHandler as AngularErrorHandler } from '@angular/core';
import { Inject, Injectable } from '@angular/core';
import * as Sentry from '@sentry/browser';
import { captureException } from '@sentry/browser';
import type { Event, Scope } from '@sentry/types';
import { addExceptionMechanism, isString } from '@sentry/utils';

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

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

if (client && client.on && !this._registeredAfterSendEventHandler) {
client.on('afterSendEvent', event => {
client.on('afterSendEvent', (event: Event) => {
if (!event.type) {
Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/test/errorhandler.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,7 +57,7 @@ describe('SentryErrorHandler', () => {
describe('handleError method', () => {
it('handleError method assigns the correct mechanism', () => {
const addEventProcessorSpy = jest.spyOn(FakeScope, 'addEventProcessor').mockImplementationOnce(callback => {
void callback({}, { event_id: 'fake-event-id' });
void (callback as (event: any, hint: any) => void)({}, { event_id: 'fake-event-id' });
return FakeScope;
});

Expand Down
1 change: 0 additions & 1 deletion packages/browser-integration-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,7 +53,6 @@
"html-webpack-plugin": "^5.5.0",
"pako": "^2.1.0",
"playwright": "^1.31.1",
"typescript": "^4.5.2",
"webpack": "^5.52.0"
},
"devDependencies": {
Expand Down
9 changes: 7 additions & 2 deletions packages/browser/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/npm/types/index.d.ts": ["build/npm/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
Expand All@@ -21,7 +24,7 @@
"@sentry/replay": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
Comment thread
Lms24 marked this conversation as resolved.
},
"devDependencies": {
"@sentry-internal/integration-shims": "7.56.0",
Expand DownExpand Up@@ -53,7 +56,9 @@
"build:bundle:es5": "JS_VERSION=es5 rollup -c rollup.bundle.config.js",
"build:bundle:es6": "JS_VERSION=es6 rollup -c rollup.bundle.config.js",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:bundle:watch": "rollup -c rollup.bundle.config.js --watch",
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/src/eventbuilder.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -208,7 +208,7 @@ export function eventFromUnknownInput(
// https://developer.mozilla.org/en-US/docs/Web/API/DOMError
// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {
if (isDOMError(exception) || isDOMException(exception as DOMException)) {
const domException = exception as DOMException;

if ('stack' in (exception as Error)) {
Expand All@@ -220,6 +220,7 @@ export function eventFromUnknownInput(
addExceptionTypeValue(event, message);
}
if ('code' in domException) {
// eslint-disable-next-line deprecation/deprecation
event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };
}

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/integrations/breadcrumbs.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,5 +348,5 @@ function _historyBreadcrumb(handlerData: HandlerData & { from: string; to: strin
}

function _isEvent(event: unknown): event is Event {
return event && !!(event as Record<string, unknown>).target;
return !!event && !!(event as Record<string, unknown>).target;
}
2 changes: 1 addition & 1 deletion packages/browser/test/unit/integrations/helpers.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -157,7 +157,7 @@ describe('internal wrap()', () => {
try {
wrapped();
} catch (error) {
expect(error.message).toBe('boom');
expect((error as Error).message).toBe('boom');
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/test/unit/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ export const createTestTransport = (...sendResults: MockResult<TransportMakeRequ
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
9 changes: 7 additions & 2 deletions packages/core/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,19 +12,24 @@
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/types/index.d.ts": ["build/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.js --watch",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/transports/offline.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -131,10 +131,10 @@ export function makeOfflineTransport<TO>(
retryDelay = START_DELAY;
return result;
} catch (e) {
if (store && (await shouldQueue(envelope, e, retryDelay))) {
if (store && (await shouldQueue(envelope, e as Error, retryDelay))) {
Comment thread
Lms24 marked this conversation as resolved.
await store.insert(envelope);
flushWithBackOff();
log('Error sending. Event queued', e);
log('Error sending. Event queued', e as Error);
return {};
} else {
throw e;
Expand Down
1 change: 1 addition & 0 deletions packages/core/test/lib/hint.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,7 @@ describe('Hint', () => {

afterEach(() => {
jest.clearAllMocks();
// @ts-ignore for testing
delete GLOBAL_OBJ.__SENTRY__;
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/lib/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,7 +98,7 @@ const createTestTransport = (
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@
"fs-extra": "11.1.0",
"glob": "8.0.3",
"ts-node": "10.9.1",
"typescript": "3.8.3",
"yaml": "2.2.2"
},
"volta": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.0.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
"typescript": "4.9.5"
},
"devDependencies": {
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,13 @@
"testApplicationName": "create-react-app",
"buildCommand": "pnpm install && pnpm build",
"tests": [],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4",
"typescript": "4.9.5",
"wait-port": "1.0.4",
"ts-node": "10.9.1",
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,13 @@
"testCommand": "pnpm test"
}
],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"ts-node": "10.9.1",
"tslib": "^2.4.1",
"tslib": "2.4.1",
"typescript": "^5.0.0",
"vite": "^4.2.0",
"wait-port": "1.0.4"
Expand Down
1 change: 0 additions & 1 deletion packages/ember/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,7 +75,6 @@
"loader.js": "~4.7.0",
"qunit": "~2.19.2",
"qunit-dom": "~2.0.0",
"typescript": "~4.5.2",
"webpack": "~5.74.0"
},
"engines": {
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -655,7 +655,9 @@ jobs:
yarn test:package

job_node_integration_tests:
name: Node (${{ matrix.node }}) Integration Tests
name:
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_node == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
Expand All@@ -664,6 +666,12 @@ jobs:
fail-fast: false
matrix:
node: [10, 12, 14, 16, 18, 20]
typescript:
- false
include:
# Only check typescript for latest version (to streamline CI)
- node: 20
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -677,6 +685,11 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Overwrite typescript version
if: matrix.typescript
run: yarn add --dev --ignore-workspace-root-check typescript@${{ matrix.typescript }}

- name: Run integration tests
env:
NODE_VERSION: ${{ matrix.node }}
Expand DownExpand Up@@ -717,7 +730,7 @@ jobs:
yarn test:integration:ci

job_e2e_tests:
name: E2E Tests (Shard ${{ matrix.shard }})
name: E2E (Shard ${{ matrix.shard }}) Tests
# 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
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
if:
Expand All@@ -730,6 +743,7 @@ jobs:
fail-fast: false
matrix:
shard: [1, 2, 3]

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -746,6 +760,7 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Get node version
id: versions
run: |
Expand Down
4 changes: 3 additions & 1 deletion nx.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,9 @@
],
"outputs": [
"{projectRoot}/build/types",
"{projectRoot}/build/npm/types"
"{projectRoot}/build/types-ts3.8",
"{projectRoot}/build/npm/types",
"{projectRoot}/build/npm/types-ts3.8"
]
},
"lint:eslint": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,6 +90,7 @@
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"downlevel-dts": "~0.11.0",
"es-check": "7.1.0",
"eslint": "7.32.0",
"jest": "^27.5.1",
Expand All@@ -114,9 +115,9 @@
"size-limit": "^4.5.5",
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"tslib": "^2.3.1",
"tslib": "2.4.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3",
"typescript": "4.9.5",
"vitest": "^0.29.2",
"yalc": "^1.0.0-pre.53"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/angular-ivy/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.3.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.18",
Expand All@@ -37,7 +37,6 @@
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"ng-packagr": "^12.1.1",
"typescript": "~4.3.5",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "~0.11.4"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.0.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1002.4",
Expand All@@ -38,7 +38,7 @@
"@angular/router": "~10.2.5",
"ng-packagr": "^10.1.0",
"rxjs": "6.5.5",
"typescript": "~4.0.2",
"typescript": "4.0.2",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "^0.11.8"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/src/errorhandler.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import type { ErrorHandler as AngularErrorHandler } from '@angular/core';
import { Inject, Injectable } from '@angular/core';
import * as Sentry from '@sentry/browser';
import { captureException } from '@sentry/browser';
import type { Event, Scope } from '@sentry/types';
import { addExceptionMechanism, isString } from '@sentry/utils';

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

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

if (client && client.on && !this._registeredAfterSendEventHandler) {
client.on('afterSendEvent', event => {
client.on('afterSendEvent', (event: Event) => {
if (!event.type) {
Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/test/errorhandler.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,7 +57,7 @@ describe('SentryErrorHandler', () => {
describe('handleError method', () => {
it('handleError method assigns the correct mechanism', () => {
const addEventProcessorSpy = jest.spyOn(FakeScope, 'addEventProcessor').mockImplementationOnce(callback => {
void callback({}, { event_id: 'fake-event-id' });
void (callback as (event: any, hint: any) => void)({}, { event_id: 'fake-event-id' });
return FakeScope;
});

Expand Down
1 change: 0 additions & 1 deletion packages/browser-integration-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,7 +53,6 @@
"html-webpack-plugin": "^5.5.0",
"pako": "^2.1.0",
"playwright": "^1.31.1",
"typescript": "^4.5.2",
"webpack": "^5.52.0"
},
"devDependencies": {
Expand Down
9 changes: 7 additions & 2 deletions packages/browser/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/npm/types/index.d.ts": ["build/npm/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
Expand All@@ -21,7 +24,7 @@
"@sentry/replay": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
Comment thread
Lms24 marked this conversation as resolved.
},
"devDependencies": {
"@sentry-internal/integration-shims": "7.56.0",
Expand DownExpand Up@@ -53,7 +56,9 @@
"build:bundle:es5": "JS_VERSION=es5 rollup -c rollup.bundle.config.js",
"build:bundle:es6": "JS_VERSION=es6 rollup -c rollup.bundle.config.js",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:bundle:watch": "rollup -c rollup.bundle.config.js --watch",
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/src/eventbuilder.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -208,7 +208,7 @@ export function eventFromUnknownInput(
// https://developer.mozilla.org/en-US/docs/Web/API/DOMError
// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {
if (isDOMError(exception) || isDOMException(exception as DOMException)) {
const domException = exception as DOMException;

if ('stack' in (exception as Error)) {
Expand All@@ -220,6 +220,7 @@ export function eventFromUnknownInput(
addExceptionTypeValue(event, message);
}
if ('code' in domException) {
// eslint-disable-next-line deprecation/deprecation
event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };
}

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/integrations/breadcrumbs.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,5 +348,5 @@ function _historyBreadcrumb(handlerData: HandlerData & { from: string; to: strin
}

function _isEvent(event: unknown): event is Event {
return event && !!(event as Record<string, unknown>).target;
return !!event && !!(event as Record<string, unknown>).target;
}
2 changes: 1 addition & 1 deletion packages/browser/test/unit/integrations/helpers.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -157,7 +157,7 @@ describe('internal wrap()', () => {
try {
wrapped();
} catch (error) {
expect(error.message).toBe('boom');
expect((error as Error).message).toBe('boom');
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/test/unit/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ export const createTestTransport = (...sendResults: MockResult<TransportMakeRequ
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
9 changes: 7 additions & 2 deletions packages/core/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,19 +12,24 @@
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/types/index.d.ts": ["build/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.js --watch",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/transports/offline.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -131,10 +131,10 @@ export function makeOfflineTransport<TO>(
retryDelay = START_DELAY;
return result;
} catch (e) {
if (store && (await shouldQueue(envelope, e, retryDelay))) {
if (store && (await shouldQueue(envelope, e as Error, retryDelay))) {
Comment thread
Lms24 marked this conversation as resolved.
await store.insert(envelope);
flushWithBackOff();
log('Error sending. Event queued', e);
log('Error sending. Event queued', e as Error);
return {};
} else {
throw e;
Expand Down
1 change: 1 addition & 0 deletions packages/core/test/lib/hint.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,7 @@ describe('Hint', () => {

afterEach(() => {
jest.clearAllMocks();
// @ts-ignore for testing
delete GLOBAL_OBJ.__SENTRY__;
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/lib/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,7 +98,7 @@ const createTestTransport = (
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@
"fs-extra": "11.1.0",
"glob": "8.0.3",
"ts-node": "10.9.1",
"typescript": "3.8.3",
"yaml": "2.2.2"
},
"volta": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.0.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
"typescript": "4.9.5"
},
"devDependencies": {
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,13 @@
"testApplicationName": "create-react-app",
"buildCommand": "pnpm install && pnpm build",
"tests": [],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4",
"typescript": "4.9.5",
"wait-port": "1.0.4",
"ts-node": "10.9.1",
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,13 @@
"testCommand": "pnpm test"
}
],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"ts-node": "10.9.1",
"tslib": "^2.4.1",
"tslib": "2.4.1",
"typescript": "^5.0.0",
"vite": "^4.2.0",
"wait-port": "1.0.4"
Expand Down
1 change: 0 additions & 1 deletion packages/ember/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,7 +75,6 @@
"loader.js": "~4.7.0",
"qunit": "~2.19.2",
"qunit-dom": "~2.0.0",
"typescript": "~4.5.2",
"webpack": "~5.74.0"
},
"engines": {
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -655,7 +655,9 @@ jobs:
yarn test:package

job_node_integration_tests:
name: Node (${{ matrix.node }}) Integration Tests
name:
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_node == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
Expand All@@ -664,6 +666,12 @@ jobs:
fail-fast: false
matrix:
node: [10, 12, 14, 16, 18, 20]
typescript:
- false
include:
# Only check typescript for latest version (to streamline CI)
- node: 20
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -677,6 +685,11 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Overwrite typescript version
if: matrix.typescript
run: yarn add --dev --ignore-workspace-root-check typescript@${{ matrix.typescript }}

- name: Run integration tests
env:
NODE_VERSION: ${{ matrix.node }}
Expand DownExpand Up@@ -717,7 +730,7 @@ jobs:
yarn test:integration:ci

job_e2e_tests:
name: E2E Tests (Shard ${{ matrix.shard }})
name: E2E (Shard ${{ matrix.shard }}) Tests
# 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
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
if:
Expand All@@ -730,6 +743,7 @@ jobs:
fail-fast: false
matrix:
shard: [1, 2, 3]

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -746,6 +760,7 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Get node version
id: versions
run: |
Expand Down
4 changes: 3 additions & 1 deletion nx.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,9 @@
],
"outputs": [
"{projectRoot}/build/types",
"{projectRoot}/build/npm/types"
"{projectRoot}/build/types-ts3.8",
"{projectRoot}/build/npm/types",
"{projectRoot}/build/npm/types-ts3.8"
]
},
"lint:eslint": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,6 +90,7 @@
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"downlevel-dts": "~0.11.0",
"es-check": "7.1.0",
"eslint": "7.32.0",
"jest": "^27.5.1",
Expand All@@ -114,9 +115,9 @@
"size-limit": "^4.5.5",
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"tslib": "^2.3.1",
"tslib": "2.4.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3",
"typescript": "4.9.5",
"vitest": "^0.29.2",
"yalc": "^1.0.0-pre.53"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/angular-ivy/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.3.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.18",
Expand All@@ -37,7 +37,6 @@
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"ng-packagr": "^12.1.1",
"typescript": "~4.3.5",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "~0.11.4"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.0.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1002.4",
Expand All@@ -38,7 +38,7 @@
"@angular/router": "~10.2.5",
"ng-packagr": "^10.1.0",
"rxjs": "6.5.5",
"typescript": "~4.0.2",
"typescript": "4.0.2",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "^0.11.8"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/src/errorhandler.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import type { ErrorHandler as AngularErrorHandler } from '@angular/core';
import { Inject, Injectable } from '@angular/core';
import * as Sentry from '@sentry/browser';
import { captureException } from '@sentry/browser';
import type { Event, Scope } from '@sentry/types';
import { addExceptionMechanism, isString } from '@sentry/utils';

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

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

if (client && client.on && !this._registeredAfterSendEventHandler) {
client.on('afterSendEvent', event => {
client.on('afterSendEvent', (event: Event) => {
if (!event.type) {
Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/test/errorhandler.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,7 +57,7 @@ describe('SentryErrorHandler', () => {
describe('handleError method', () => {
it('handleError method assigns the correct mechanism', () => {
const addEventProcessorSpy = jest.spyOn(FakeScope, 'addEventProcessor').mockImplementationOnce(callback => {
void callback({}, { event_id: 'fake-event-id' });
void (callback as (event: any, hint: any) => void)({}, { event_id: 'fake-event-id' });
return FakeScope;
});

Expand Down
1 change: 0 additions & 1 deletion packages/browser-integration-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,7 +53,6 @@
"html-webpack-plugin": "^5.5.0",
"pako": "^2.1.0",
"playwright": "^1.31.1",
"typescript": "^4.5.2",
"webpack": "^5.52.0"
},
"devDependencies": {
Expand Down
9 changes: 7 additions & 2 deletions packages/browser/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/npm/types/index.d.ts": ["build/npm/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
Expand All@@ -21,7 +24,7 @@
"@sentry/replay": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
Comment thread
Lms24 marked this conversation as resolved.
},
"devDependencies": {
"@sentry-internal/integration-shims": "7.56.0",
Expand DownExpand Up@@ -53,7 +56,9 @@
"build:bundle:es5": "JS_VERSION=es5 rollup -c rollup.bundle.config.js",
"build:bundle:es6": "JS_VERSION=es6 rollup -c rollup.bundle.config.js",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:bundle:watch": "rollup -c rollup.bundle.config.js --watch",
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/src/eventbuilder.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -208,7 +208,7 @@ export function eventFromUnknownInput(
// https://developer.mozilla.org/en-US/docs/Web/API/DOMError
// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {
if (isDOMError(exception) || isDOMException(exception as DOMException)) {
const domException = exception as DOMException;

if ('stack' in (exception as Error)) {
Expand All@@ -220,6 +220,7 @@ export function eventFromUnknownInput(
addExceptionTypeValue(event, message);
}
if ('code' in domException) {
// eslint-disable-next-line deprecation/deprecation
event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };
}

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/integrations/breadcrumbs.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,5 +348,5 @@ function _historyBreadcrumb(handlerData: HandlerData & { from: string; to: strin
}

function _isEvent(event: unknown): event is Event {
return event && !!(event as Record<string, unknown>).target;
return !!event && !!(event as Record<string, unknown>).target;
}
2 changes: 1 addition & 1 deletion packages/browser/test/unit/integrations/helpers.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -157,7 +157,7 @@ describe('internal wrap()', () => {
try {
wrapped();
} catch (error) {
expect(error.message).toBe('boom');
expect((error as Error).message).toBe('boom');
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/test/unit/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ export const createTestTransport = (...sendResults: MockResult<TransportMakeRequ
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
9 changes: 7 additions & 2 deletions packages/core/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,19 +12,24 @@
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/types/index.d.ts": ["build/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.js --watch",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/transports/offline.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -131,10 +131,10 @@ export function makeOfflineTransport<TO>(
retryDelay = START_DELAY;
return result;
} catch (e) {
if (store && (await shouldQueue(envelope, e, retryDelay))) {
if (store && (await shouldQueue(envelope, e as Error, retryDelay))) {
Comment thread
Lms24 marked this conversation as resolved.
await store.insert(envelope);
flushWithBackOff();
log('Error sending. Event queued', e);
log('Error sending. Event queued', e as Error);
return {};
} else {
throw e;
Expand Down
1 change: 1 addition & 0 deletions packages/core/test/lib/hint.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,7 @@ describe('Hint', () => {

afterEach(() => {
jest.clearAllMocks();
// @ts-ignore for testing
delete GLOBAL_OBJ.__SENTRY__;
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/lib/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,7 +98,7 @@ const createTestTransport = (
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@
"fs-extra": "11.1.0",
"glob": "8.0.3",
"ts-node": "10.9.1",
"typescript": "3.8.3",
"yaml": "2.2.2"
},
"volta": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.0.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
"typescript": "4.9.5"
},
"devDependencies": {
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,13 @@
"testApplicationName": "create-react-app",
"buildCommand": "pnpm install && pnpm build",
"tests": [],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4",
"typescript": "4.9.5",
"wait-port": "1.0.4",
"ts-node": "10.9.1",
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,13 @@
"testCommand": "pnpm test"
}
],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"ts-node": "10.9.1",
"tslib": "^2.4.1",
"tslib": "2.4.1",
"typescript": "^5.0.0",
"vite": "^4.2.0",
"wait-port": "1.0.4"
Expand Down
1 change: 0 additions & 1 deletion packages/ember/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,7 +75,6 @@
"loader.js": "~4.7.0",
"qunit": "~2.19.2",
"qunit-dom": "~2.0.0",
"typescript": "~4.5.2",
"webpack": "~5.74.0"
},
"engines": {
Expand Down
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -655,7 +655,9 @@ jobs:
yarn test:package

job_node_integration_tests:
name: Node (${{ matrix.node }}) Integration Tests
name:
Node (${{ matrix.node }})${{ (matrix.typescript && format(' (TS {0})', matrix.typescript)) || '' }} Integration
Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_node == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
Expand All@@ -664,6 +666,12 @@ jobs:
fail-fast: false
matrix:
node: [10, 12, 14, 16, 18, 20]
typescript:
- false
include:
# Only check typescript for latest version (to streamline CI)
- node: 20
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -677,6 +685,11 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Overwrite typescript version
if: matrix.typescript
run: yarn add --dev --ignore-workspace-root-check typescript@${{ matrix.typescript }}

- name: Run integration tests
env:
NODE_VERSION: ${{ matrix.node }}
Expand DownExpand Up@@ -717,7 +730,7 @@ jobs:
yarn test:integration:ci

job_e2e_tests:
name: E2E Tests (Shard ${{ matrix.shard }})
name: E2E (Shard ${{ matrix.shard }}) Tests
# 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
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well
if:
Expand All@@ -730,6 +743,7 @@ jobs:
fail-fast: false
matrix:
shard: [1, 2, 3]

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
Expand All@@ -746,6 +760,7 @@ jobs:
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Get node version
id: versions
run: |
Expand Down
4 changes: 3 additions & 1 deletion nx.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,9 @@
],
"outputs": [
"{projectRoot}/build/types",
"{projectRoot}/build/npm/types"
"{projectRoot}/build/types-ts3.8",
"{projectRoot}/build/npm/types",
"{projectRoot}/build/npm/types-ts3.8"
]
},
"lint:eslint": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,6 +90,7 @@
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"downlevel-dts": "~0.11.0",
"es-check": "7.1.0",
"eslint": "7.32.0",
"jest": "^27.5.1",
Expand All@@ -114,9 +115,9 @@
"size-limit": "^4.5.5",
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"tslib": "^2.3.1",
"tslib": "2.4.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3",
"typescript": "4.9.5",
"vitest": "^0.29.2",
"yalc": "^1.0.0-pre.53"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/angular-ivy/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.3.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.18",
Expand All@@ -37,7 +37,6 @@
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"ng-packagr": "^12.1.1",
"typescript": "~4.3.5",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "~0.11.4"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@
"@sentry/browser": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^2.0.0"
"tslib": "^2.4.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1002.4",
Expand All@@ -38,7 +38,7 @@
"@angular/router": "~10.2.5",
"ng-packagr": "^10.1.0",
"rxjs": "6.5.5",
"typescript": "~4.0.2",
"typescript": "4.0.2",
Comment thread
Lms24 marked this conversation as resolved.
"zone.js": "^0.11.8"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/angular/src/errorhandler.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
import type { ErrorHandler as AngularErrorHandler } from '@angular/core';
import { Inject, Injectable } from '@angular/core';
import * as Sentry from '@sentry/browser';
import { captureException } from '@sentry/browser';
import type { Event, Scope } from '@sentry/types';
import { addExceptionMechanism, isString } from '@sentry/utils';

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

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

if (client && client.on && !this._registeredAfterSendEventHandler) {
client.on('afterSendEvent', event => {
client.on('afterSendEvent', (event: Event) => {
if (!event.type) {
Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/test/errorhandler.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,7 +57,7 @@ describe('SentryErrorHandler', () => {
describe('handleError method', () => {
it('handleError method assigns the correct mechanism', () => {
const addEventProcessorSpy = jest.spyOn(FakeScope, 'addEventProcessor').mockImplementationOnce(callback => {
void callback({}, { event_id: 'fake-event-id' });
void (callback as (event: any, hint: any) => void)({}, { event_id: 'fake-event-id' });
return FakeScope;
});

Expand Down
1 change: 0 additions & 1 deletion packages/browser-integration-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,7 +53,6 @@
"html-webpack-plugin": "^5.5.0",
"pako": "^2.1.0",
"playwright": "^1.31.1",
"typescript": "^4.5.2",
"webpack": "^5.52.0"
},
"devDependencies": {
Expand Down
9 changes: 7 additions & 2 deletions packages/browser/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/npm/types/index.d.ts": ["build/npm/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
Expand All@@ -21,7 +24,7 @@
"@sentry/replay": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
Comment thread
Lms24 marked this conversation as resolved.
},
"devDependencies": {
"@sentry-internal/integration-shims": "7.56.0",
Expand DownExpand Up@@ -53,7 +56,9 @@
"build:bundle:es5": "JS_VERSION=es5 rollup -c rollup.bundle.config.js",
"build:bundle:es6": "JS_VERSION=es6 rollup -c rollup.bundle.config.js",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:bundle:watch": "rollup -c rollup.bundle.config.js --watch",
Expand Down
3 changes: 2 additions & 1 deletion packages/browser/src/eventbuilder.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -208,7 +208,7 @@ export function eventFromUnknownInput(
// https://developer.mozilla.org/en-US/docs/Web/API/DOMError
// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
if (isDOMError(exception as DOMError) || isDOMException(exception as DOMException)) {
if (isDOMError(exception) || isDOMException(exception as DOMException)) {
const domException = exception as DOMException;

if ('stack' in (exception as Error)) {
Expand All@@ -220,6 +220,7 @@ export function eventFromUnknownInput(
addExceptionTypeValue(event, message);
}
if ('code' in domException) {
// eslint-disable-next-line deprecation/deprecation
event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };
}

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/integrations/breadcrumbs.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,5 +348,5 @@ function _historyBreadcrumb(handlerData: HandlerData & { from: string; to: strin
}

function _isEvent(event: unknown): event is Event {
return event && !!(event as Record<string, unknown>).target;
return !!event && !!(event as Record<string, unknown>).target;
}
2 changes: 1 addition & 1 deletion packages/browser/test/unit/integrations/helpers.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -157,7 +157,7 @@ describe('internal wrap()', () => {
try {
wrapped();
} catch (error) {
expect(error.message).toBe('boom');
expect((error as Error).message).toBe('boom');
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/browser/test/unit/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ export const createTestTransport = (...sendResults: MockResult<TransportMakeRequ
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
9 changes: 7 additions & 2 deletions packages/core/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,19 +12,24 @@
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"typesVersions": {
"<4.9": { "build/types/index.d.ts": ["build/types-ts3.8/index.d.ts"] }
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0",
"tslib": "^1.9.3"
"tslib": "^2.4.1 || ^1.9.3"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/types build/types-ts3.8 --to ts3.8",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.js --watch",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/transports/offline.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -131,10 +131,10 @@ export function makeOfflineTransport<TO>(
retryDelay = START_DELAY;
return result;
} catch (e) {
if (store && (await shouldQueue(envelope, e, retryDelay))) {
if (store && (await shouldQueue(envelope, e as Error, retryDelay))) {
Comment thread
Lms24 marked this conversation as resolved.
await store.insert(envelope);
flushWithBackOff();
log('Error sending. Event queued', e);
log('Error sending. Event queued', e as Error);
return {};
} else {
throw e;
Expand Down
1 change: 1 addition & 0 deletions packages/core/test/lib/hint.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,6 +16,7 @@ describe('Hint', () => {

afterEach(() => {
jest.clearAllMocks();
// @ts-ignore for testing
delete GLOBAL_OBJ.__SENTRY__;
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/lib/transports/offline.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,7 +98,7 @@ const createTestTransport = (
reject(next);
} else {
sendCount += 1;
resolve(next as TransportMakeRequestResponse | undefined);
resolve(next as TransportMakeRequestResponse);
}
});
}),
Expand Down
1 change: 0 additions & 1 deletion packages/e2e-tests/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@
"fs-extra": "11.1.0",
"glob": "8.0.3",
"ts-node": "10.9.1",
"typescript": "3.8.3",
"yaml": "2.2.2"
},
"volta": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.0.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
"typescript": "4.9.5"
},
"devDependencies": {
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,13 @@
"testApplicationName": "create-react-app",
"buildCommand": "pnpm install && pnpm build",
"tests": [],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4",
"typescript": "4.9.5",
"wait-port": "1.0.4",
"ts-node": "10.9.1",
"@playwright/test": "^1.27.1"
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2",
"typescript": "4.9.5",
"web-vitals": "2.1.0"
},
"scripts": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,13 @@
"testCommand": "pnpm test"
}
],
"versions": [
{
"dependencyOverrides": {
"typescript": "3.8.3"
}
}
],
"canaryVersions": [
{
"dependencyOverrides": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"ts-node": "10.9.1",
"tslib": "^2.4.1",
"tslib": "2.4.1",
"typescript": "^5.0.0",
"vite": "^4.2.0",
"wait-port": "1.0.4"
Expand Down
1 change: 0 additions & 1 deletion packages/ember/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,7 +75,6 @@
"loader.js": "~4.7.0",
"qunit": "~2.19.2",
"qunit-dom": "~2.0.0",
"typescript": "~4.5.2",
"webpack": "~5.74.0"
},
"engines": {
Expand Down
Loading