-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
update config settings and readme #2
Conversation
bump version to 2.0.0
@fastify/typescript FYI |
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'm not convinced by doing this change right now. It means that our typescript modules would become ESM.
As far as production system goes, ESM is almost ready, as ESM loaders will become stable soon.
Out of prudence I would keep it commonjs still.
The other reason why I'm on the fende is that it does not make much sense to produce ESM with TS and stick all other modules as commonjs.
NodeNext says TypeScript to follow Node.js rules around how it resolves ESM and CJS files. In practice, this means that TypeScript will read the nearest package.json file in the scope and search for the "type" field or the absence of it. The rule, therefore, is simple. If The "following the Node.js rules" goes also for the TypeScript should have been doing this since the beginning, but they needed to wait on Node.js to implement ESM. That said, this is a breaking change because we are increasing the minimum Node.js version from version 10 to version 16 since we are changing the I hope this helps you understand how it works and why it is crucial to use this retro-compatible configuration. |
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.
Could you add the above in the README? Thx!
Done! |
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.
LGTM
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.
lgtm
This is a breaking change.
Checklist
runnpm run test
andnpm run benchmark
tests and/or benchmarks are includedand the Code of conduct