Skip to content

feat!: Bump typescript to ~5.0.0 #14758

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

Merged
merged 1 commit into from
Dec 19, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"next": "14.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "5.0.1",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@sentry/browser": "latest || *",
"@types/node": "^18.19.1",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"scripts": {
"start": "serve -s build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"supertest": "^6.3.3",
"ts-loader": "^9.4.3",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5"
"typescript": "~5.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"supertest": "^6.3.3",
"ts-loader": "^9.4.3",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5"
"typescript": "~5.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"supertest": "^6.3.3",
"ts-loader": "^9.4.3",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5"
"typescript": "~5.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
"supertest": "^6.3.3",
"ts-loader": "^9.4.3",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5"
"typescript": "~5.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"supertest": "^6.3.3",
"ts-loader": "^9.4.3",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5"
"typescript": "~5.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"supertest": "^6.3.3",
"ts-loader": "^9.4.3",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5"
"typescript": "~5.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"supertest": "^6.3.3",
"ts-loader": "^9.4.3",
"tsconfig-paths": "^4.2.0",
"typescript": "^4.9.5"
"typescript": "~5.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"next": "13.5.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"next": "14.1.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"next": "15.0.0-canary.182",
"react": "beta",
"react-dom": "beta",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"next": "14.0.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"next": "15.0.0",
"react": "rc",
"react-dom": "rc",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@sentry/opentelemetry": "latest || *",
"@types/node": "^18.19.1",
"connect": "3.7.0",
"typescript": "4.9.5",
"typescript": "~5.0.0",
"ts-node": "10.9.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@sentry/google-cloud-serverless": "latest || *",
"@sentry/bun": "latest || *",
"@types/node": "^18.19.1",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"volta": {
"extends": "../../package.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@types/express": "4.17.17",
"@types/node": "^18.19.1",
"express": "4.20.0",
"typescript": "4.9.5",
"typescript": "~5.0.0",
"zod": "~3.22.4"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/express": "4.17.17",
"@types/node": "^18.19.1",
"express": "4.19.2",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@types/express": "4.17.17",
"@types/node": "^18.19.1",
"express": "4.20.0",
"typescript": "4.9.5",
"typescript": "~5.0.0",
"zod": "~3.22.4"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@sentry/opentelemetry": "latest || *",
"@types/node": "^18.19.1",
"fastify": "4.23.2",
"typescript": "4.9.5",
"typescript": "~5.0.0",
"ts-node": "10.9.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@sentry/node": "latest || *",
"@types/node": "^18.19.1",
"koa": "^2.15.2",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@types/express": "4.17.17",
"@types/node": "^18.19.1",
"express": "4.19.2",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/express": "4.17.17",
"@types/node": "^18.19.1",
"express": "4.19.2",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@types/express": "4.17.17",
"@types/node": "^18.19.1",
"express": "4.19.2",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"devDependencies": {
"@playwright/test": "^1.44.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react-dom": "17.0.2",
"react-router-dom": "~6.3.0",
"react-scripts": "5.0.1",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"scripts": {
"build": "react-scripts build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"react": "19.0.0-rc-935180c7e0-20240524",
"react-dom": "19.0.0-rc-935180c7e0-20240524",
"react-scripts": "5.0.1",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"scripts": {
"build": "react-scripts build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.4.2"
"typescript": "~5.0.0"
},
"scripts": {
"build": "react-scripts build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react-dom": "18.2.0",
"react-router-dom": "5.3.4",
"react-scripts": "5.0.1",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"scripts": {
"build": "react-scripts build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.28.0",
"react-scripts": "5.0.1",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"scripts": {
"build": "react-scripts build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"scripts": {
"build": "react-scripts build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"react-dom": "18.2.0",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"scripts": {
"build": "react-scripts build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@sentry-internal/test-utils": "link:../../../test-utils",
"vite": "^6.0.1",
"@vitejs/plugin-react": "^4.3.4",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"scripts": {
"build": "vite build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"react-dom": "18.2.0",
"react-router-dom": "6.4.1",
"react-scripts": "5.0.1",
"typescript": "4.9.5"
"typescript": "~5.0.0"
},
"scripts": {
"build": "react-scripts build",
Expand Down
2 changes: 2 additions & 0 deletions docs/migration/v8-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ In preparation for the OpenTelemetry SDK v2, which will raise the minimum requir

Additionally, like the OpenTelemetry SDK, the Sentry JavaScript SDK will follow [DefinitelyType's version support policy](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window) which has a support time frame of 2 years for any released version of TypeScript.

Older Typescript versions _may_ still work, but we will not test them anymore and no more guarantees apply.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this note, not 100% sure if this makes sense? 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that feels reasonable to me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No hard opinions but personally if a sentence effectively says nothing, which is the case for this one I believe, I would not write it down.


## 2. Behavior Changes

### `@sentry/core` / All SDKs
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"sucrase": "^3.35.0",
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"typescript": "4.9.5",
"typescript": "~5.0.0",
"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 @@ -54,7 +54,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.0": {
"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.0": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
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.0": {
"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.0": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
},
"typesVersions": {
"<4.9": {
"<5.0": {
"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.0": {
"build/types/index.d.ts": [
"build/types-ts3.8/index.d.ts"
]
Expand Down
3 changes: 2 additions & 1 deletion packages/core/test/utils-hoist/object.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ describe('markFunctionWrapped', () => {
const wrappedFunc = jest.fn();
markFunctionWrapped(wrappedFunc, originalFunc);

expect((wrappedFunc as WrappedFunction).__sentry_original__).toBe(originalFunc);
// cannot wrap because it is frozen, but we do not error!
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, why did this test pass before? 😅 some ts bug or so? The new behavior is def. the actual expected behavior!

expect((wrappedFunc as WrappedFunction).__sentry_original__).toBe(undefined);

wrappedFunc();

Expand Down
1 change: 0 additions & 1 deletion packages/ember/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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.0": {
"build/npm/types/index.d.ts": [
"build/npm/types-ts3.8/index.d.ts"
]
Expand Down
Loading
Loading