feat(p2-shim): migrate to typescript#1650
Conversation
15de6b4 to
32b815f
Compare
|
Hey @eduardomourar this is huge, thanks for taking on this work! Will dig in and review soon |
|
I believe having this in TypeScript will help with any confusion between types and values being exported/exposed in the public API. |
vados-cosmonic
left a comment
There was a problem hiding this comment.
LGTM 🚀
This looks overall good to me -- just a few things to address/discuss (mostly nits) and we can get it in.
24ab1a5 to
6c103b2
Compare
|
@vados-cosmonic, all comments have been addressed. I was having some issues in the test/browser.ts file. The tests are all passing. There is a mismatch for options type while transpiling. I have removed some explicit options and the default behavior is in place for instantiation and wasi shim injection. |
|
Hey @eduardomourar thanks for the heads up -- I'll take a quick look! Please feel free to mark all the conversations that you've addressed as resolved! |
26e484e to
8ae7653
Compare
|
hey @eduardomourar sorry for the delay here -- I really will get to the bottom of the browser tests -- they're unfortunately really unergonomic to debug, trying to make get a jco release out and then will get to this and release p2-shim as well. |
|
I was able to get the other tests working, except the one for deno. |
|
Oh that's fantastic! Looking a the issues, it looks like something simple:
Nope it's there... wonder if it's getting a stale version somehow or because it's not installed |
|
I think is because I changed to the new dist/ folder, but that does not exist on previously published version: Lines 17 to 19 in 3c64835 Let me know what you want me to do. Either I revert back that folder change for deno importmap or you merge it and include the new published version. |
|
Yeah so it's weird because it's looking for the new code (so must be using the newer I think the fix might be that we need to perform a build of jco/.github/workflows/main.yml Line 223 in 3c64835 Do the deno tests fail locally? Maybe I'm missing something here -- why would Deno take the newer |
|
I already included the preview2-shim build to the test-wasi-deno, but it still fails. On my local machine, deno tests fail in the same way. Locally I see that the |
3b7d492 to
69cf55a
Compare
Related to #717.
Migrate preview2-shim to TypeScript
This PR completes the TypeScript migration for the @bytecodealliance/preview2-shim package.
Changes
Source Migration:
Test Migration:
Type System Improvements:
Build Configuration:
Migration Strategy
Complex low-level files (IO workers, sockets, HTTP, filesystem) are still using
anyfor now, allowing gradual type refinement in future PRs while ensuring the codebase compiles successfully.Fixes #1596.