Skip to content

Migrate to Typescript-go #2104

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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Migrate to Typescript-go #2104

wants to merge 10 commits into from

Conversation

Bashamega
Copy link
Contributor

Just a test PR, to see if this can move to Typescript-go

@saschanaz
Copy link
Contributor

Seems the answer is "not yet"

@jakebailey
Copy link
Member

First the problem is to fix this repo's imports; the repo is still using the old deprecated node10 resolution, which we did not implement in TS7.

@saschanaz
Copy link
Contributor

(I want my maintainer permission to push to this PR and see how it goes 🙈)

@jakebailey
Copy link
Member

Also, you definitely do not want to accept this PR as is, the native preview is just a preview and should not "replace" tsc at the time being. A new workflow to check it seems fine.

@jakebailey
Copy link
Member

(I want my maintainer permission to push to this PR and see how it goes 🙈)

Me too but I haven't gotten that settled yet ☹️

@Bashamega
Copy link
Contributor Author

The build error should be fixed when the next version of BCD is published

@Bashamega
Copy link
Contributor Author

Bashamega commented Aug 6, 2025

I have updated it to use the latest bcd and typescript syntax @jakebailey
I think the current issue is a problem with typescript-go.
It says that optionsOrLoose in semver is required. But it is actually optional:
image
Or is there something that I am missing?

@jakebailey
Copy link
Member

It's using a jsconfig and then looking into the JS types for the package instead of the dts file, which is interesting. I'm not sure any of us have actually tested jsconfig.

Worth a bug and a more minimal repro.

@jakebailey
Copy link
Member

Oh, the types for semver aren't even installed in the repo. Yeah, I think this might be expected.

@Bashamega
Copy link
Contributor Author

I will create a minimal repro and open an issue today.
Thanks for your reply

@saschanaz
Copy link
Contributor

saschanaz commented Aug 6, 2025

Why did we go ahead to fix BCD instead of investigating why tsgo fails on BCD even though ts5 is okay with it?

@Bashamega
Copy link
Contributor Author

First the problem is to fix this repo's imports; the repo is still using the old deprecated node10 resolution, which we did not implement in TS7.

I think this answers your question @saschanaz

@saschanaz
Copy link
Contributor

But this PR doesn't use node10 anymore?

@jakebailey
Copy link
Member

We didn't implement node10 in tsgo; right now it silently maps itself to bundler resolution for easier testing, but will error in the future. The errors shown in this PR (before the dep fixes) would appear with tsc in newer resolution modes.

@saschanaz
Copy link
Contributor

Hmm actually, ts5 is not okay with it with node16 👀

@saschanaz
Copy link
Contributor

Understood, thanks for fixing it 👍🏻

We should probably open new PR to switch from node10 and land it.

@Bashamega
Copy link
Contributor Author

Understood, thanks for fixing it 👍🏻

We should probably open new PR to switch from node10 and land it.

I will open a separate PR for it

@Bashamega Bashamega mentioned this pull request Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants