Upgrade eslint and typescript#3662
Open
hyperair wants to merge 10 commits intobrianc:masterfrom
Open
Conversation
- rootDir defaults have changed, so we need to specify it manually now - baseUrl is no longer supported - types no longer loads everything in @types by default, so we have to specify that we want node types - Pin @types/node to 16.* because we support node16 and above
Fixes the following error:
% yarn build
yarn run v1.22.19
$ tsc --build
packages/pg-cloudflare/src/index.ts:156:29 - error TS2769: No overload matches this call.
The last overload gave the following error.
Argument of type 'ArrayBuffer | Uint8Array<ArrayBufferLike>' is not assignable to parameter of type 'WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: "string"): string; }'.
Type 'ArrayBuffer' is not assignable to type 'WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: "string"): string; }'.
156 const hex = Buffer.from(data).toString('hex')
~~~~
node_modules/@types/node/buffer.buffer.d.ts:83:13
83 from(
~~~~~
84 str:
~~~~~~~~~~~~~~~~~~~~
...
89 encoding?: BufferEncoding,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90 ): Buffer<ArrayBuffer>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The last overload is declared here.
Found 1 error.
See microsoft/TypeScript#63447 for more info
596ca60 to
62c67ae
Compare
Fixes the following typescript error:
node_modules/typescript/lib/lib.esnext.intl.d.ts:26:135 - error TS2552: Cannot find name 'DateTimeRangeFormatPart'. Did you mean 'DateTimeFormatPart'?
26 formatRangeToParts(startDate: FormattableTemporalObject | Date | number, endDate: FormattableTemporalObject | Date | number): DateTimeRangeFormatPart[];
`BufferReader.encoding` to `BufferEncoding` from `string` to match the new signature of `Buffer.toString`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is required for tests that use the new
usingsyntax that was introduced inhttps://tc39.es/proposal-explicit-resource-management/, because the current eslint version doesn't support it (see
errors in #3661), and upgrading eslint requires an upgrade of typescript as well.
Changes:
eslint,typescript,@types/node, and some related packages