-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(NODE-5323): update to typescript 5 #3694
Conversation
@@ -17,7 +17,6 @@ | |||
// Never emit error filled code | |||
"noEmitOnError": true, | |||
"outDir": "lib", | |||
"importsNotUsedAsValues": "error", |
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.
This is deprecated, now using eslint rule.
@@ -88,6 +88,14 @@ | |||
], | |||
"@typescript-eslint/no-explicit-any": "off", | |||
"@typescript-eslint/require-await": "off", | |||
"@typescript-eslint/consistent-type-imports": [ |
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.
This is the new rule replacing the deprecated importsNotUsedAsValues
typescript config.
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.
one last improvement
src/cmap/connect.ts
Outdated
hello && | ||
typeof hello.maxWireVersion?.valueOf() === 'number' && | ||
hello.maxWireVersion >= MIN_SUPPORTED_WIRE_VERSION; | ||
hello && !Number.isNaN(maxWireVersion) && hello.maxWireVersion >= MIN_SUPPORTED_WIRE_VERSION; |
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.
hello && !Number.isNaN(maxWireVersion) && hello.maxWireVersion >= MIN_SUPPORTED_WIRE_VERSION; | |
!Number.isNaN(maxWireVersion) && hello.maxWireVersion >= MIN_SUPPORTED_WIRE_VERSION; |
If hello is nullish which I don't think it can be then the lines 82/83 will throw, so we can remove this check
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.
Updated.
Description
Updates the driver to use Typescript 5.
What is changing?
importsNotUsedAsValues
config and replaces with eslint rule.number
andInt32
.Is there new documentation needed for these changes?
None
What is the motivation for this change?
NODE-5323
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript