-
Notifications
You must be signed in to change notification settings - Fork 810
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
chore!: update typescript to version 5.6.3
#5145
base: next
Are you sure you want to change the base?
Changes from all commits
f0933b9
8d8ea7c
08d14f7
73422ec
40d4587
8f4220c
0695015
1db53a3
7dfbae7
780830e
268bf92
6fe7953
87f231f
703f0ab
c46c11b
7d71e92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require: 'ts-node/register' | ||
require: 'ts-node/register/transpile-only' |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,20 @@ cd packages/opentelemetry-module-name | |
npm run watch | ||
``` | ||
|
||
#### TypeScript version | ||
|
||
TypeScript version used to compile the pacakges is `v5.6.3`. If you plan to make your own instrumentation script | ||
in a `.ts` file it is recommended to use same version or higher. | ||
|
||
<!-- TODO: review the update policy --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note for reviewer: any other items we can add to this list? |
||
Also TypeScript is meant to be updated in compatible verisons of `5.x`. However there could be scenarios | ||
where we might don't want to update the minor version: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is likely my TypeScript-ignorance: What is TypeScript's definition of "compatible versions", if not all of "5.x"? Or could I be misunderstanding what you are saying? Are you saying "all updates of TS 5.x to a later 5.x version is meant to be compatible, but here is a list of reasons that might not be true for us: ..."? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sometimes a TS release has this paragraph that makes me be cautious about updating versions. |
||
|
||
- breaking changes in `lib.d.ts`: each release of TypeScript may come with a section of changes | ||
in `lib.d.ts` file ([example](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/#lib.d.ts-changes)). These changes | ||
include DOM and other platform types that, if breaking, could break our compilation or even compilation | ||
of our coonsumers if re-export them. | ||
|
||
### Running tests | ||
|
||
Similar to compilations, tests can be run from the root to run all tests or from a single module to run only the tests for that module. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ | |
"lint": "eslint . --ext .ts", | ||
"test:browser": "karma start --single-run", | ||
"test": "nyc mocha 'test/**/*.test.ts'", | ||
"test:eol": "mocha 'test/**/*.test.ts'", | ||
"test:webworker": "karma start karma.worker.js --single-run", | ||
"cycle-check": "dpdm --exit-code circular:1 src/index.ts", | ||
"version": "node ../scripts/version-update.js", | ||
|
@@ -77,7 +76,7 @@ | |
"access": "public" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "10.0.8", | ||
"@types/mocha": "10.0.9", | ||
"@types/node": "18.6.5", | ||
"@types/sinon": "17.0.3", | ||
"@types/webpack": "5.28.5", | ||
|
@@ -98,7 +97,7 @@ | |
"nyc": "15.1.0", | ||
"sinon": "15.1.2", | ||
"ts-loader": "9.5.1", | ||
"typescript": "4.4.4", | ||
"typescript": "5.6.3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @open-telemetry/javascript-maintainers what do you think about making this change in the API package? I think we should probably just go for it:
I think for both of these to be true, we have to eventually make this change in a minor API version, painful though it may be to some small number of users. In order to not make this change, we'd have to keep a different version of typescript here than everywhere else. IDK how painful this would be in practice in our monorepo (maybe not that bad?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I think at least typedoc is coupled with the typescript version - so it may hold us back with quite a few dependencies as well. I'm for updating. Maybe we could do the following:
Here's me hoping that bumping the API major will be allowed at some point in the future. Edit: the reason we don't do is because of this spec, and 2.0 milestone scope creep, right? Dropping language version support has its own spec actually and says that we should follow the conventions given by the ecosystem (which would be bumping major). This spec does not explicitly prohibit it. |
||
"unionfs": "4.5.4", | ||
"webpack": "5.94.0" | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for reviewer: TypeScript 5.0+ removes support for Node.js <=12.0