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

Updating to node v20 #13

Merged
merged 2 commits into from
Sep 12, 2023
Merged

Updating to node v20 #13

merged 2 commits into from
Sep 12, 2023

Conversation

tegefaulkes
Copy link
Contributor

@tegefaulkes tegefaulkes commented Sep 12, 2023

Description

In this PR we are updating to node 20. This includes nix changes and package updates.

Issues Fixed

  • This doesn't directly fix any issues

Tasks

  1. Update nix config to use node 20
  2. Update node dependencies to the appropriate versions. Using js-quic as reference.
  3. Build with the new version
  4. make sure all tests are working.

Final checklist

  • Domain specific tests
  • Full tests
  • Updated inline-comment documentation
  • Lint fixed
  • Squash and rebased
  • Sanity check the final build

@tegefaulkes tegefaulkes self-assigned this Sep 12, 2023
@tegefaulkes tegefaulkes marked this pull request as draft September 12, 2023 06:29
@ghost
Copy link

ghost commented Sep 12, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@tegefaulkes
Copy link
Contributor Author

Same problems as MatrixAI/js-db#69, this is the source of it.

@tegefaulkes
Copy link
Contributor Author

Running a test.ts script that just console.logs and running it with npm run ts-node -- test.ts results in the same error. I've test that here and in Polykey with the same results.

So it seems ts-node is broken. Seems to not be transpiling with swc properly. This is broken in polykey repo and presumably everywhere we've updated to node 20 so far. I think the only reason it was revealed here is because of it being run on the worker script.

@tegefaulkes
Copy link
Contributor Author

swc-project/swc#7923

Seems relevant. Pinning the version of @swc/core to 1.3.82 fixes the problem.

@CMCDragonkai
Copy link
Member

The latest @swc/core that I have currently is ^1.3.76. Should we update to ^1.3.82?

@CMCDragonkai
Copy link
Member

Oh I think I understand, apparently a later version of swc has a problem, and they want to rollback something or until ts-node fixes this TypeStrong/ts-node#2057.

Then we just have to pin it to 1.3.82, the 1 patch version before that change that introduced that issue.

On a side note, the ESM branches I've already stopped using ts-node and swapped to tsx which works for ESM stuff.

@tegefaulkes
Copy link
Contributor Author

Yep, the fix for now is pinning to 1.3.82. I'll make that change and apply it to the other repos as well.

>=`1.3.83` breaks ts-node until until TypeStrong/ts-node#2057 is merged and published.
@tegefaulkes tegefaulkes mentioned this pull request Sep 12, 2023
10 tasks
@tegefaulkes tegefaulkes marked this pull request as ready for review September 12, 2023 07:28
@tegefaulkes
Copy link
Contributor Author

All fixed, Merging.

@tegefaulkes tegefaulkes merged commit e2f078e into staging Sep 12, 2023
1 check passed
@CMCDragonkai
Copy link
Member

swc-project/swc#7923

Seems relevant. Pinning the version of @swc/core to 1.3.82 fixes the problem.

@amydevs @addievo - apply this to js-ws and js-rpc. I'll be doing this for js-quic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants