Skip to content

Upgrade eslint and typescript#3662

Open
hyperair wants to merge 10 commits intobrianc:masterfrom
hyperair:upgrade-eslint-ts
Open

Upgrade eslint and typescript#3662
hyperair wants to merge 10 commits intobrianc:masterfrom
hyperair:upgrade-eslint-ts

Conversation

@hyperair
Copy link
Copy Markdown

@hyperair hyperair commented Apr 27, 2026

This is required for tests that use the new using syntax that was introduced in
https://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:

@hyperair hyperair marked this pull request as draft April 27, 2026 13:10
- 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
@hyperair hyperair force-pushed the upgrade-eslint-ts branch from 596ca60 to 62c67ae Compare April 28, 2026 09:22
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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant