rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

chore: migrate nx to latest v20, bump typescript-eslint to v7

Open JamesHenry opened this issue 1 year ago • 6 comments

Description:

I ran nx migrate latest to bring the repo up to date with the latest nx and @nx/* packages, including some minor configuration optimizations.

I bumped typescript-eslint packges to v7 as well. We can do the migration to ESLint v9 and typescript-eslint v8 in a separate PR.

This PR can go in once #7512 is merged which fixes all existing issues with the repo's CI that are unrelated to this.

JamesHenry avatar Oct 29 '24 12:10 JamesHenry

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 8f2c44795c34e6af28b03e75bbcddbd1c88df644. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx compile rxjs

Sent with 💌 from NxCloud.

nx-cloud[bot] avatar Oct 29 '24 12:10 nx-cloud[bot]

Node 18 is fine, it looks like the latest Node 20 (20.18.0) which the Node 20 job is configured to use, has actually implemented FinalizationRegistry which was added to the tests 4 years ago (!) but has not actually been in use because of it not being present globally in Node until now.

This is obviously a very surprising discovery, but for now I spun out a dedicated fix PR here: #7512

UPDATE: That PR also fixes the long standing TS compilation issue on latest TS versions (again unrelated to Nx or its version)

JamesHenry avatar Oct 29 '24 13:10 JamesHenry

u

irajsava avatar Nov 10 '24 09:11 irajsava

Ok

irajsava avatar Nov 10 '24 09:11 irajsava

__

irajsava avatar Nov 10 '24 14:11 irajsava

The latest version is nx v22 now: https://nx.dev/blog/nx-22-release

I noticed if you update to TypeScript 5.5 things work fine, but 5.6 and newer give this error:

error TS2741: Property '[Symbol.asyncDispose]' is missing in type '{ next: () => Promise<IteratorResult<T, any>>; throw: (err: any) => Promise<IteratorResult<T, any>>; return: () => Promise<IteratorResult<T, any>>; [Symbol.asyncIterator](): AsyncGenerator<...>; }' but required in type 'AsyncGenerator<T, void, void>'.

  ../../node_modules/typescript/lib/lib.esnext.disposable.d.ts:40:5
    40     [Symbol.asyncDispose](): PromiseLike<void>;

But trying to add the missing method at that spot results in the opposite type error, when transpiling the observable package with tshy.

src/observable.ts:1006:7 - error TS2353: Object literal may only specify known properties, and '[Symbol.asyncDispose]' does not exist in type 'AsyncGenerator<T, void, void>'.

dynst avatar Oct 25 '25 19:10 dynst