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 adding swc configuration file support as an option #2143

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hanseltime
Copy link

Summary

This PR implements what looks like the correct changes for ts-node to support specifying an swcConfig.

Unfortunately, the version of yarn has a bug that won't download the github based packages due to checksum mismatch and the tests seem very reliant on that particular yarn. If someone can point me to documentation for how to run the tests with out debugging tons of failures, I would be more than happy to implement additional tests.

This would unlock a lot of swc based flows as indicated in: #1856

@sdotson
Copy link

sdotson commented Dec 26, 2024

hi @hanseltime . excited to see you try to get this into ts-node. I'm not a maintainer or have any real power here, but happy to try to help. What errors are you seeing? I pulled down your pr and I only see one failing test transpilers › swc › verify that TS->SWC target mappings suppport all possible values from both TS and SWC.

To be fair, I see the same failure on main branch. Is this what you are seeing as well or are you referring to a different sort of error?

@hanseltime
Copy link
Author

hanseltime commented Dec 27, 2024

Hey @sdotson,

If you are capable of running the various tests, etc. Then that might help. The contributing.md doc seems to be out of date (or just doesn't handle me running this on a linux machine pop-os).

A list of the problems I have when trying to use the prescribed calls:

  1. yarn install fails because all of the "github" sourced packages fail checksums
  2. When I tell yarn to ignore checksums, then yarn build fails due to lots of strict failures:
src/test/repl/repl.spec.ts:574:23 - error TS7006: Parameter 't' implicitly has an 'any' type.

574   test('test', async (t) => {

As an example^

Running tests fails due to the same typescript build failures and it seems testing types aren't recognized. I could try getting something to work, but since I'm not sure if that would affect tests, I'm personally hamstrung to verify it.

For anyone who may be able to verify this, please feel free to do so!

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

Successfully merging this pull request may close these issues.

2 participants