ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

monorepo: upgrade typescript beyond v5

Open gabrocheleau opened this issue 1 year ago • 1 comments

This PR upgrades TypeScript to 5.5.4 and makes the necessary adjustments so that the monorepo builds.

This PR also makes some related adjustments to the monorepo dependencies, as some of the dependencies were not compatile with the updated TypeScript version (the two @typescript-eslint ones). This led to peer dependency issues with the "eslint-config-typestrict": "^1.0.5", and since there seems to be no updaed version of that package (I can't find anything on it actually strangely?), I removed it altogether.

One linting error that I have not yet been able to fix:

error: Parsing error: ESLint was configured to run on `<tsconfigRootDir>/ethereumjs-evm-bundle.es.js` using `parserOptions.project`: <tsconfigRootDir>/tsconfig.lint.json
However, that TSConfig does not include this file. Either:
- Change ESLint's list of included files to not include this file
- Change that TSConfig to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
See the typescript-eslint docs for more info: https://typescript-eslint.io/troubleshooting/typed-linting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file at ethereumjs-evm-bundle.es.js:

(Edit: finally fixed by adding paths in some places in the tsconfigs, leaving this here for reference:). There is one outstanding build error that I have yet to fix:

> @ethereumjs/[email protected] build
> ../../config/cli/ts-build.sh

[Node build] Using tsconfig.prod.cjs.json
> tsc --build ./tsconfig.prod.cjs.json
[Node build] Working... ../util/src/account.ts:1:21 - error TS2307: Cannot find module '@ethereumjs/rlp' or its corresponding type declarations.

1 import { RLP } from '@ethereumjs/rlp'
                      ~~~~~~~~~~~~~~~~~

../util/src/requests.ts:1:21 - error TS2307: Cannot find module '@ethereumjs/rlp' or its corresponding type declarations.

1 import { RLP } from '@ethereumjs/rlp'
                      ~~~~~~~~~~~~~~~~~


Found 2 errors.

gabrocheleau avatar Aug 22 '24 17:08 gabrocheleau

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.90%. Comparing base (4470cc3) to head (d069a8d). Report is 17 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block ?
client ?
tx 76.90% <60.00%> (-0.88%) :arrow_down:
wallet ?

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Aug 24 '24 18:08 codecov[bot]

Can this be closed?

holgerd77 avatar Apr 23 '25 10:04 holgerd77

Can this be closed?

Yes, we've upgraded to 5.8.2 in another PR, closing this.

gabrocheleau avatar Apr 23 '25 11:04 gabrocheleau