Skip to content
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 tsconfig.json to the latest standards #4419

Closed
2 tasks
rehanvdm opened this issue Feb 7, 2024 · 6 comments
Closed
2 tasks

Update tsconfig.json to the latest standards #4419

rehanvdm opened this issue Feb 7, 2024 · 6 comments
Assignees
Labels
feature-request A feature should be added or improved. p2

Comments

@rehanvdm
Copy link

rehanvdm commented Feb 7, 2024

Describe the feature

The generated tsconfig is using which is outdated in 2024.

"module": "CommonJS",
"target": "ES2020",
"lib": [
      "es2020"
    ],

Use Case

Stay current and up to date with the TS standards.

Proposed Solution

Use the new and latest versions:

"module": "ESNext",
"target": "ESNext",
"lib": [
      "ESNext"
    ],

Other Information

This is one of the reason why I am ejecting from projen that has tooling around JSII. My code uses the paths inside tsconfig.json and it needs to be on the newer tsconfig values for the web-based project that uses Vite to work. This forces me to create two versions of tsconfig but then I have endless problems with paths and eslint. So I decided to just publish my package https://github.com/rehanvdm/serverless-website-analytics in TS now and not any other languages.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

Environment details (OS name and version, etc.)

@rehanvdm rehanvdm added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 7, 2024
@mrgrain
Copy link
Contributor

mrgrain commented Feb 14, 2024

We can definitely talk about target and lib for the 5.4 release.

Regarding module, I'm not sure how ESM will affect the way jsii works at the moment.

@sam-goodwin
Copy link

Also, please support disabling the generated tsconfig.json and don't write the .d.ts and .js to the src directory. That is super annoying.

@mrgrain
Copy link
Contributor

mrgrain commented Feb 22, 2024

@sam-goodwin #2071 I think this covers your request.

Otherwise please open a new issue for other request to config defaults.

@iliapolo iliapolo assigned iliapolo and unassigned iliapolo Feb 22, 2024
@mrgrain
Copy link
Contributor

mrgrain commented Apr 3, 2024

@rehanvdm FYI we are actively looking at #2071 at the moment, which will include a mode to remove all safe-guards. Later on we might use community feedback/experience to update the defaults. Hope that makes sense.

@mrgrain mrgrain added p2 and removed needs-triage This issue or PR still needs to be triaged. labels Apr 9, 2024
@mrgrain
Copy link
Contributor

mrgrain commented May 21, 2024

Mostly closing this in favor of user-provided tsconfig #2071

Documentation:
https://aws.github.io/jsii/user-guides/lib-author/configuration/#typescript-configuration

But we still might change some defaults in future versions. New tracking issue: aws/jsii-compiler#956

@mrgrain mrgrain closed this as completed May 21, 2024
Copy link
Contributor

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

4 participants