-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat: support native type stripping for Node >= v23 #442
base: master
Are you sure you want to change the base?
feat: support native type stripping for Node >= v23 #442
Conversation
|
||
t.test('independent of module support', function (t) { | ||
t.plan(8) | ||
t.plan(typeStrippingEnabled ? 7 : 8) |
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.
Can be removed when #440 is merged.
Can you add something in the README? |
If you run |
Not the indentation, but remove semi-colons, use single-quotes etc. |
mmm so how does |
Probably because it doesn't enforce certain formatting rules, like trailing coma for example: https://github.com/fastify/fastify-autoload/pull/442/files#diff-93d89c5bddae92725a3ce7b3a38a424edb3d4f4de3b403e34af97dadee0d583eR11 |
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.
Throwing in a block until I can properly review.
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.
Too much stylistics changes.
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.
As has been said, the stylistic changes need to be reverted as it's hard to see what functionality has actually changed.
@@ -319,6 +319,7 @@ provider, such as `ts-node`. Otherwise, widening the acceptance extension here w | |||
``` | |||
## Override TypeScript detection using an environment variable | |||
> **Note**: Node >= 23 supports native type stripping, and this plugin will automatically take advantage of it. Read more about native type stripping on the [API docs](https://nodejs.org/docs/latest-v23.x/api/typescript.html#modules-typescript). |
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.
> **Note**: Node >= 23 supports native type stripping, and this plugin will automatically take advantage of it. Read more about native type stripping on the [API docs](https://nodejs.org/docs/latest-v23.x/api/typescript.html#modules-typescript). | |
This plugin uses [native type stripping](https://nodejs.org/docs/latest-v23.x/api/typescript.html#modules-typescript) with Node 23 and later. |
#441
My editor has reformatted the code a bit, but eslint seems ok with some of the changes.
I think the PR is still readable and it improves readability a bit, let me know if I should revert.