-
Notifications
You must be signed in to change notification settings - Fork 362
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(typescript): use Node16 module & moduleResolution when appropriate #2791
base: main
Are you sure you want to change the base?
Conversation
Instead of using `CommonJS` and `Node`, apply the `Node16` module and module resolution settings, which are preferred when targeting node >=16 as it allows dynamically choosing the correct algorithms based on file extension as well as package.json configuration. Additionally, automatically configure `target` and `lib` based on the configured minimum node version (if present).
Signed-off-by: github-actions <[email protected]>
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #2791 +/- ##
==========================================
+ Coverage 96.39% 96.41% +0.02%
==========================================
Files 181 181
Lines 33649 33741 +92
Branches 3099 3113 +14
==========================================
+ Hits 32435 32531 +96
+ Misses 1214 1210 -4
|
Is this going to be a breaking change because the |
Good question. I suspect possibly maybe? I can revert this to being |
Co-authored-by: Momo Kornher <[email protected]>
Signed-off-by: github-actions <[email protected]>
Signed-off-by: github-actions <[email protected]>
Side note: I determined the proper configuration to get Projen and Jest working correctly with a TypeScript project where the |
Note to myself: https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping jsii probably needs to update these as well |
Instead of using
CommonJS
andNode
, apply theNode16
module and module resolution settings, which are preferred when targeting node >=16 as it allows dynamically choosing the correct algorithms based on file extension as well as package.json configuration.Additionally, automatically configure
target
andlib
based on the configured minimum node version (if present).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.