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

fix: fix compatibility with latest versions of ts-node #4314

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Conversation

danez
Copy link
Contributor

@danez danez commented Jun 9, 2022

Summary

Fixes #4313

The Error that happens with a newer ts-node version without this commit is:

Error: function () { [native code] } could not be cloned.

In ts-node 10.5.0 two (for us) breaking things changed:


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@danez danez added the type: bug code to address defects in shipped code label Jun 9, 2022
@danez danez requested a review from a team June 9, 2022 13:21
TSError now sets diagnosticText to be non-enumerable so we need to grab it manually
In 10.5.0 ts-node added a new config option tsTrace which is a function. Functions are not
serializable so we need to filter functions out.
Copy link
Member

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Might be good to get someone like @lukasholzer to give it a thumbs up too.

@danez danez requested a review from lukasholzer June 9, 2022 13:51
Copy link
Contributor

@lukasholzer lukasholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snapshots looking good! Thanks for tackling this 🐈

@danez danez added the automerge label Jun 9, 2022
@kodiakhq kodiakhq bot merged commit cedb140 into main Jun 9, 2022
@kodiakhq kodiakhq bot deleted the tsnodefix branch June 9, 2022 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails with latest typescript version
3 participants