privatenumber / tsx

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

Imports with `.` and no explicit file extension no longer work #604

Closed Jiralite closed 3 months ago

Jiralite commented 3 months ago

Acknowledgements

Minimal reproduction URL

https://github.com/Jiralite/tsx-4.15.8-1

Problem & expected behavior (under 200 words)

Imports with a . in them fail to resolve without an extension. This worked fine in 4.15.7 and before, but not with https://github.com/privatenumber/tsx/releases/tag/v4.15.8 which was recently released.

Bugs are expected to be fixed by those affected by it

Compensating engineering work will speed up resolution and support the project

fernandocanizo commented 3 months ago

I can confirm this is happening here to. We are using in our package.json the script:

"scripts": {
   "dev": "pnpx tsx ./server.js",
   ...

}

Which automatically uses the latest tsx, our code works perfectly with v4.15.7 but now, without having touched anything, it stopped working.

I understand that the way we were using tsx would have blown on our faces anyway, but maybe some other people is getting caught by this and they don't automatically update their tsx dependency.

So at least you should have bumped a major version, as this is a breaking change.

privatenumber commented 3 months ago

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

If you rely on this project, please consider making a donation :heart: :pray:

privatenumber commented 3 months ago

As per the Contributing Guide, I've hid comments that don't contribute towards fixing the bug.

Please remember this is a Bug Tracker—a place to discuss solutions and track progress. Not a place to say "happening to me too".