-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix: surface ts-node compile errors #5572
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
base: main
Are you sure you want to change the base?
Conversation
Prevents "Cannot find module" when there are TS errors
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5572 +/- ##
=======================================
Coverage 93.52% 93.53%
=======================================
Files 57 57
Lines 4465 4467 +2
Branches 918 919 +1
=======================================
+ Hits 4176 4178 +2
Misses 289 289 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JoshuaKGoldberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the strategy, but would really like a spot check from another maintainer to make sure there's no way we can get around it.
Just requesting changes on moving the debug() line.
Thanks!
…-mod-not-found * 'ts-mod-not-found' of github.com:sam-super/mocha: feat: add mocha.mjs export (mochajs#5527) docs: bumped docs-next Astro to ^5.16.6 (mochajs#5574) build(dev-deps): upgrade `markdownlint-cli` to latest v0.46.0 (mochajs#5560)
PR Checklist
status: accepting prsOverview
Prevents "Cannot find module" when there are TS errors by prevent fallback to 'import()' when it errors.
The downside is this is tightly coupled to how ts-node throws errors when loading modules. However, this change seems unlikely to have any unexpected side-effects, so the risk is that it wont help if someone is using a different TS loader, but it's still a net gain for most.