Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
chore: move CJS scripts to ESM and use strippable types#10887
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for the PR,@43081j! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. |
netlifybot commentedFeb 25, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
nx-cloudbot commentedFeb 25, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
View yourCI Pipeline Execution ↗ for commit08096b0.
☁️Nx Cloud last updated this comment at |
@43081j I edited a few things with which issues are linked. Feel free to undraft once ready for review! |
This switches various repo scripts to be `*.mts` files (since that iswhat they actually are, given we don't build them into CJS output, yetour package `type` is `"commonjs"`).This will allow newer Node to execute them correctly, as they will nowinfer the correct module type.The `generate-lib` script has also been changed to use only strippabletypes (i.e. no enums).Both of these changes mean we have the option to drop `tsx` in futureand use `--experimental-strip-types` (when it is no longerexperimental).
codecovbot commentedMar 1, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #10887 +/- ##======================================= Coverage 87.43% 87.43% ======================================= Files 468 468 Lines 16040 16040 Branches 4649 4649 ======================================= Hits 14025 14025 Misses 1658 1658 Partials 357 357
Flags with carried forward coverage won't be shown.Click here to find out more. |
this should be good to go now@kirkwaiblinger |
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.
Looks good! Thanks! One question but no action requested
Uh oh!
There was an error while loading.Please reload this page.
43081j commentedMar 2, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Not too sure why ci is failing. Doesn't seem related to the changes here, but that is more concerning 😅 if main has problems Maybe catching up from main will help. Next time I'm at a laptop I'll do that unless someone beats me to it |
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.
Thanks for making these changes! It's always satisfying to me to get TS a step closer to out-of-the-box node.js rather than requiring layers of transpilation and/or CLI tools just to be able to execute 🙂
Re the integration test that was failing, that was fixed in#10906 👍
2810ceb
intotypescript-eslint:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Depends on#10886
This prepares the various scripts for being consumed by
node
directly (via the strip-types feature).Primarily this means the following:
type: "commonjs"
, so some of our scripts are incorrectly*.ts
(CJS) whichtsx
covers up by the fact it transpiles it to CJS on the fly*.ts
scripts to*.mts
solves thisDRAFT UNTIL#10885 is accepting PRs and#10886 is merged
PR Checklist
tsx
executes scripts in ESM context in Node 23.6 #10711Also related to#10885