Skip to content
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

monorepo: upgrade typescript beyond v5 #3610

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

gabrocheleau
Copy link
Contributor

@gabrocheleau gabrocheleau commented Aug 22, 2024

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/block@5.3.0 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 gabrocheleau added package: monorepo dependencies Pull requests that update a dependency file type: maintenance labels Aug 23, 2024
Copy link

codecov bot commented Aug 24, 2024

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%) ⬇️
wallet ?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file package: monorepo type: maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant