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

TS 5.0 module conversion will require changing how internal types are obtained #10

Closed
jakebailey opened this issue Nov 3, 2022 · 7 comments

Comments

@jakebailey
Copy link

microsoft/TypeScript#51387 majorly changes how TypeScript is built and packaged.

One thing that differs is that disabling stripInternal is no longer the way to obtain our internal API.

Instead, running the dts task in our repo will produce these files:

-rw-r--r-- 1 jabaile jabaile 635K Nov  3 13:45 tsserverlibrary.d.ts
-rw-r--r-- 1 jabaile jabaile 1.5M Nov  3 13:45 tsserverlibrary.internal.d.ts
-rw-r--r-- 1 jabaile jabaile 466K Nov  3 13:45 typescript.d.ts
-rw-r--r-- 1 jabaile jabaile 1.3M Nov  3 13:45 typescript.internal.d.ts

You should be able to rename and ship the .internal.d.ts files for this package. I believe this will also mean you can drop all of your post-build patches; the internal API d.ts files are now checked in our tests so should contain a type-complete set of exports.

@nonara
Copy link
Owner

nonara commented Nov 18, 2022

Hi Jake! Thanks for the heads up. That had to be some work to do! Looking forward to taking a look at how you implemented it.

Sounds like this would be a good opportunity to do my rewrite to rely on GitHub CI + artifacts. Do you guys have an idea of when 5 will ship?

@jakebailey
Copy link
Author

You can check microsoft/TypeScript#51362 for the schedule; stable would be in March.

This probably affects you less than byots given it's nightly and broken; I posted this same issue there.

@jackTabsCode
Copy link

@nonara Hello, curious if there's any update on this? We're currently at stable release with 5.0

@nonara
Copy link
Owner

nonara commented Apr 5, 2023

@jackTabsCode I'm expecting to have this done by early next week. Finishing up major ts-patch rewrite at the moment

@osyrisrblx
Copy link
Contributor

@nonara Hi 👋, any updates on this? My project depends on ts-expose-internals and we're blocked on upgrading to TS 5.0.

@nonara
Copy link
Owner

nonara commented Jun 9, 2023

@osyrisrblx Understood! I've been slammed for months, but I've blocked out the foreseeable to get caught up on OSS.

I'm wrapping tests for the new ts-patch and then I'll be redoing this right after.

If all goes well, new tsei should be live next week.

@nonara
Copy link
Owner

nonara commented Jun 21, 2023

New version is live + all >=v5 types are published! If anyone faces any issues, let me know.

I rewrote everything to run entirely in GitHub Actions. It also has much smoother handling and retries for build failures.

@nonara nonara closed this as completed Jun 21, 2023
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

No branches or pull requests

4 participants