Skip to content

tgz support #1132

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

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

tgz support #1132

wants to merge 1 commit into from

Conversation

stainless-em
Copy link

adds support for .tar.gz files from arbitrary urls

@stevekrouse
Copy link

Would be very helpful for supporting Stainless packages in Val Town 👍

@stainless-em
Copy link
Author

specifically preview versions, which we upload as tarballs to our own servers

@stevekrouse
Copy link

I've found that val town doesn't acquire types for any val town sdk's actually via esm.sh but yes for npm, but I'm not sure why. (To be fair our type acquisition is super janky, so it might not be worth designing around too much.)

@ije
Copy link
Member

ije commented May 8, 2025

@stainless-em thanks, this is great! do you think we can remove the package name in the tgz path? like:

- https://esm.sh/tgz/preact@https%3A%2F%2Fregistry.yarnpkg.com%2Fpreact%2F-%2Fpreact-10.26.6.tgz
+ https://esm.sh/tgz/https%3A%2F%2Fregistry.yarnpkg.com%2Fpreact%2F-%2Fpreact-10.26.6.tgz

@ije
Copy link
Member

ije commented May 8, 2025

I've found that val town doesn't acquire types for any val town sdk's actually via esm.sh but yes for npm, but I'm not sure why. (To be fair our type acquisition is super janky, so it might not be worth designing around too much.)

@stevekrouse i will look into it, can you please provide a code smaple for testing? Thanks🙏

@stainless-em
Copy link
Author

do you think we can remove the package name in the tgz path?

Possibly, I tried that first actually. But then the PkgName in the EsmPath would need to be empty I think? Because there's no way to know what it is until the tarball is downloaded? idk

@ije
Copy link
Member

ije commented May 12, 2025

Possibly, I tried that first actually. But then the PkgName in the EsmPath would need to be empty I think? Because there's no way to know what it is until the tarball is downloaded? idk

makes sense, can you please check the CI? i'm love to the merge this after the CI passing. Thanks!

@stainless-em
Copy link
Author

tbc i think having the pkgname in the url is bad but i'm not familiar enough with how esm.sh is structured to know how to get rid of it 😅

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.

3 participants