privatenumber / tsx

⚡️ TypeScript Execute | The easiest way to run TypeScript in Node.js
https://tsx.is
MIT License
9.43k stars 144 forks source link

fix(esm): resolve absolute paths #544

Closed fardjad closed 5 months ago

fardjad commented 5 months ago

This PR attempts to fix the issue described here: https://github.com/privatenumber/tsx/issues/543

DASPRiD commented 5 months ago

Could this also be addressing https://github.com/privatenumber/tsx/issues/541?

privatenumber commented 5 months ago

@fardjad Would you mind adding a test?

fardjad commented 5 months ago

@privatenumber Of course! I updated my PR.

I wasn't sure where the best place to add the test would be. I decided to put it under the register / unregister group as it affects the module resolution after the hook is registered. Do you think the approach and the location for adding the test make sense, or do you have something else in mind?

privatenumber commented 5 months ago

That works, but I consolidated it into the smoke test—previously, our tests would take super long from spawning so many processes.

Thanks for your contribution!

privatenumber commented 5 months ago

:tada: This issue has been resolved in v4.9.2

If you appreciate this project, please consider supporting this project by sponsoring :heart: :pray: