Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use typescript 5.5.3 to build the SDK (WIP) #12834

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"build": "node ./scripts/verify-packages-versions.js && lerna run build:transpile,build:types,build:bundle",
"build": "lerna run build:transpile,build:types,build:bundle",
"build:bundle": "lerna run build:bundle",
"build:dev": "lerna run build:types,build:transpile",
"build:dev:filter": "lerna run build:dev --include-filtered-dependencies --include-filtered-dependents --scope",
Expand Down Expand Up @@ -130,7 +130,7 @@
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"typedoc": "^0.18.0",
"typescript": "4.9.5",
"typescript": "5.5.3",
"vitest": "^1.6.0",
"yalc": "^1.0.0-pre.53"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-serverless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/npm/types/index.d.ts": [
"build/npm/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
12 changes: 6 additions & 6 deletions packages/browser-utils/src/metrics/web-vitals/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ declare global {

// https://w3c.github.io/largest-contentful-paint/#sec-largest-contentful-paint-interface
interface LargestContentfulPaint extends PerformanceEntry {
renderTime: DOMHighResTimeStamp;
loadTime: DOMHighResTimeStamp;
size: number;
id: string;
url: string;
element?: Element;
readonly renderTime: DOMHighResTimeStamp;
readonly loadTime: DOMHighResTimeStamp;
readonly size: number;
readonly id: string;
readonly url: string;
readonly element: Element | null;
}
}
2 changes: 1 addition & 1 deletion packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/npm/types/index.d.ts": [
"build/npm/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/lib/prepareEvent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ describe('parseEventHintOrCaptureContext', () => {

it('triggers a TS error if trying to mix ScopeContext & EventHint', () => {
const actual = parseEventHintOrCaptureContext({
// @ts-expect-error We are specifically testing that this errors!
user: { id: 'xxx' },
// @ts-expect-error We are specifically testing that this errors!
mechanism: { handled: false },
});

Expand Down
1 change: 0 additions & 1 deletion packages/ember/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"alwaysStrict": true,
"noImplicitUseStrict": false,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"noEmitOnError": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/feedback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/npm/types/index.d.ts": [
"build/npm/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-serverless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/integration-shims/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
1 change: 1 addition & 0 deletions packages/integration-shims/src/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ export const metricsShim: Metrics = {
if (typeof value === 'function') {
return value();
}
return;
},
};
2 changes: 1 addition & 1 deletion packages/nestjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/npm/types/index.d.ts": [
"build/npm/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/test/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/react": "17.0.47",
"@types/react-dom": "17.0.17",
"nock": "^13.1.0",
"typescript": "4.9.5",
"typescript": "5.5.3",
"yargs": "^16.2.0"
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
6 changes: 3 additions & 3 deletions packages/node/test/sdk/preload.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('preload', () => {
it('works without env vars', async () => {
const logSpy = jest.spyOn(console, 'log');

await import('../../src/preload');
require('../../src/preload');

expect(logSpy).toHaveBeenCalledTimes(0);
});
Expand All @@ -26,7 +26,7 @@ describe('preload', () => {

process.env.SENTRY_DEBUG = '1';

await import('../../src/preload');
require('../../src/preload');

expect(logSpy).toHaveBeenCalledWith('Sentry Logger [log]:', '[Sentry] Preloaded Http instrumentation');
expect(logSpy).toHaveBeenCalledWith('Sentry Logger [log]:', '[Sentry] Preloaded Express instrumentation');
Expand All @@ -41,7 +41,7 @@ describe('preload', () => {
process.env.SENTRY_DEBUG = '1';
process.env.SENTRY_PRELOAD_INTEGRATIONS = 'Http,Express';

await import('../../src/preload');
require('../../src/preload');

expect(logSpy).toHaveBeenCalledWith('Sentry Logger [log]:', '[Sentry] Preloaded Http instrumentation');
expect(logSpy).toHaveBeenCalledWith('Sentry Logger [log]:', '[Sentry] Preloaded Express instrumentation');
Expand Down
3 changes: 2 additions & 1 deletion packages/node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

"compilerOptions": {
"lib": ["es2018"],
"module": "Node16"
"module": "Node16",
"moduleResolution": "Node16"
}
}
2 changes: 1 addition & 1 deletion packages/opentelemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
5 changes: 2 additions & 3 deletions packages/profiling-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"lib/types/index.d.ts": [
"lib/types-ts3.8/index.d.ts"
]
Expand Down Expand Up @@ -87,8 +87,7 @@
"@types/node-abi": "^3.0.3",
"clang-format": "^1.8.0",
"cross-env": "^7.0.3",
"node-gyp": "^9.4.1",
"typescript": "^4.9.5"
"node-gyp": "^9.4.1"
},
"volta": {
"extends": "../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/remix/test/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/react": "^17.0.47",
"@types/react-dom": "^17.0.17",
"nock": "^13.1.0",
"typescript": "4.9.5"
"typescript": "5.5.3"
},
"resolutions": {
"@sentry/browser": "file:../../../browser",
Expand Down
2 changes: 1 addition & 1 deletion packages/replay-canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/npm/types/index.d.ts": [
"build/npm/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/replay-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/npm/types/index.d.ts": [
"build/npm/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/replay-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"tsconfig.json"
],
"peerDependencies": {
"typescript": "4.9.5"
"typescript": "5.5.3"
},
"scripts": {
"clean": "yarn rimraf sentry-internal-typescript-*.tgz",
Expand Down
1 change: 0 additions & 1 deletion packages/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"noErrorTruncation": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noImplicitUseStrict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"preserveWatchOutput": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
1 change: 1 addition & 0 deletions packages/utils/src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export function getLocationHref(): string {
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function getDomElement<E = any>(selector: string): E | null {
// eslint-disable-next-line deprecation/deprecation
if (WINDOW.document && WINDOW.document.querySelector) {
return WINDOW.document.querySelector(selector) as unknown as E;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vercel-edge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.5": {
"build/npm/types/index.d.ts": [
"build/npm/types-ts3.8/index.d.ts"
]
Expand Down
Loading
Loading