-
Notifications
You must be signed in to change notification settings - Fork 833
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.0.4
#5145
Changes from all commits
f0933b9
8d8ea7c
08d14f7
73422ec
40d4587
8f4220c
0695015
1db53a3
7dfbae7
780830e
268bf92
6fe7953
87f231f
703f0ab
c46c11b
7d71e92
8ce75a9
8eca42c
517790c
04391c7
8b6e408
af2f2b0
9d74bb9
36c084c
7c5e895
920c2c3
bb7568d
d26fbd2
b7580fb
991280b
a4e30a7
e01cd50
d890099
e574e6e
5b4ed13
7fb82fe
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 |
---|---|---|
|
@@ -203,6 +203,15 @@ cd packages/opentelemetry-module-name | |
npm run watch | ||
``` | ||
|
||
#### TypeScript version & update policy | ||
|
||
TypeScript version used to compile the pacakges is `v5.0.4`. If you plan to use any of the packages from this | ||
repository to make your own application or package instrumentation make sure to use same version or higher. | ||
|
||
<!-- Ref: https://github.com/open-telemetry/opentelemetry-js/pull/5145#issuecomment-2518263890 --> | ||
As update policy OpenTelemetry JS will follow DefinitelyType's [support policy for TypeScript](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window) | ||
which sets a support window of 2 years. | ||
|
||
Comment on lines
+206
to
+214
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. It may be good to have this be more visible by also stating something similar in README.md - while it's important for contributors to know how we're using typescript, there's an effect on end-users that we should communicate. 🙂 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. would be e01cd50 enough? 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. I added one more comment 🙂 |
||
### 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 |
---|---|---|
|
@@ -233,6 +233,7 @@ describe('fetch', () => { | |
const decoder = new TextDecoder(); | ||
requestBody = ''; | ||
const read = async () => { | ||
// @ts-expect-error -- iterator symbol was removed from types | ||
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 error can be resolved by adding 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. I think this lib is not available in this version yet npm run compile
tsconfig.base.json:30:7 - error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'es2022.regexp', 'es2023.array', 'esnext.array', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref', 'decorators', 'decorators.legacy'.
30 "DOM.AsyncIterable"
~~~~~~~~~~~~~~~~~~~ Looking at the history it was added a year ago https://github.com/microsoft/TypeScript/commits/main/src/lib/dom.asynciterable.generated.d.ts. Probably is included in v5.4+ |
||
for await (const c of body) { | ||
requestBody += decoder.decode(c); | ||
} | ||
|
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