-
Notifications
You must be signed in to change notification settings - Fork 59
Install prettier3 + alpha solidity plugin in parallel #640
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
base: development
Are you sure you want to change the base?
Conversation
We only updated the output previously.
This was previously implicit and depended on a the root build. This clashes with my attempts to update the typescript version, so I am scoping the e2e tests to their own build.
This commit at its heart does the following: 1. Updates the version of typescript we are using to 5.5 2. Switches to node16 as our module resolution strategy 3. Updates the underlying node-language-server version we are using These are all initial steps to allow us to pull in ESM module based dependencies, in particular `slang@19`. * chore: add eslint config for coc This brings coc inline with the eslint config pattern found for other packages in the repo. It showed up as an issue when attempting to update the typescript version. * chore: bump version of language server The language server was 2 years out of date. To maximize ease of integration with typescript@5 we are updating to the latest version. * chore: bump version of lodash types The latest version of lodash types is been taken to better work with typescript@5. * chore: bump version of eslint and plugins Eslint and its plugins are 2 years out of date. They have been brought up to the same version used in the Hardhat repo. We initially tried to jump straight to `eslint@10` but backed out with the config format changes. We will look at this again with the repo modernization efforts. * chore: bump verion of @types/node to latest Node 20 is now the version used in VSCode. The types have been updated to reflect the new node versions. * chore: bump version of esbuild To package the extension we use a bundler, esbuild needs to be updated to match the new version of typescript. * chore: update version of typescript We need better module resolution support as we deal with Slang's ESM packages, specifically the loading of TS types from commonjs. * chore: bump node target in tsconfig To support pulling in more modern ts libraries like Slang@18, we want to swap to `node16` module resolution. This is not ESM, but the modern version of commonjs. It lets us use TS types from Slang from the VSCode extension's commonjs packages. * chore: disable lib check on server This is a hack that we should accept temporarily. A library that the language server node library uses fails more refined typechecking in typescript@5. For the moment checking types in dependent packages is skipped. * chore: fix linting error on t.type The update to eslint revealed this equality error. * chore: update eslint errors New rules are affecting our naming conventions. Rather than disable the rule I have scattered disable lines. This is a tradeoff, but we expect a revamp of the eslint rules based on HH3 in the near future. * Update bundle script - @solidity-parser got hoisted --------- Co-authored-by: Armando Andini <[email protected]>
New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected] |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## upgrade-slang-0.19 #640 +/- ##
======================================================
- Coverage 53.16% 53.05% -0.12%
======================================================
Files 226 227 +1
Lines 5199 5223 +24
Branches 801 803 +2
======================================================
+ Hits 2764 2771 +7
- Misses 2198 2215 +17
Partials 237 237 ☔ View full report in Codecov by Sentry. |
712e2d1
to
63ff95d
Compare
af8716f
to
4c0da33
Compare
4c0da33
to
5007d98
Compare
We want to repurpose this PR to support user's who have version 2 of the |
<This PR is based on top of the 0.19 update branch>
This PR installs 2 combinations of prettier + plugin versions (prettier2 + solidity v1 plugin and prettier3 + solidity v2 beta puglin) in parallel. This has been done creating two separate implementations of PrettyPrinter, and having each one as an individual package with their own dependencies.
The interface of the PrettyPrinter has been unified to the one of v3 (mainly some functions went from sync to async), so every direct and indirect usage of the printer have been updated as well.
All calls to documentFormat are still being handled by prettier 2 + plugin v1, but 1% of the calls also run prettier3+plugin v2 beta, and logging any exception on sentry.