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

Support for Typescript 4.x #3609

Closed
1 of 2 tasks
lschierer opened this issue Jun 16, 2022 · 9 comments
Closed
1 of 2 tasks

Support for Typescript 4.x #3609

lschierer opened this issue Jun 16, 2022 · 9 comments
Labels
effort/large Large work item – several weeks of effort feature-request A feature should be added or improved.

Comments

@lschierer
Copy link

lschierer commented Jun 16, 2022

Describe the feature

I am told that the reason that AWS CDK depends on Typescript 3.9 is beacuse of jsii in #18743, I am now stuck in a situation where cdk cannot use typescript above 3.9 and tsc cannot use typescript below 4.2 (due to @types issue 60310). While that might get reverted eventually, it points to the long term unsustainable nature of requiring a version of a key library that is both an entire major version behind and 7 overall releases behind.

Use Case

Compatibility: I cannot run cdk after running npm up at all because @types/prettier automatically upgrades unless manually pinned (which I did not know to do), nor can I initialize a new cdk workspace with typescript because the install grabs the latest version of @types/prettier which won't work with the required version of typescript.

Proposed Solution

Upgrade the supported version of typescript.

Other Information

No response

Acknowledgements

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

CDK version used

2.28.1 (build d035432)

Environment details (OS name and version, etc.)

Ubuntu 20 LTS with node 16 from https://nodesource.com/, but also tested and verified on OSX 12.2 with node from homebrew

@lschierer lschierer added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 16, 2022
@webratz
Copy link

webratz commented Jul 13, 2022

There was an attempt with #1940 but it never was merged due to potential breaking changes.

I really hope it would be done anyway at some time as this is making things tricky very often, and the situation won't improve

@RichiCoder1
Copy link

There's a proposal out with aws/aws-cdk-rfcs#373 to fix this, but I'm not sure what it's present status is.

pflorek added a commit to pepperize/cdk-organizations that referenced this issue Jul 15, 2022
- version pin @types/prettier DefinitelyTyped/DefinitelyTyped#60314
- upgrade npm-check-updates raineorshine/npm-check-updates#1145 and projen/projen#1963
- upgrade aws-cdk-lib 2.32.0 https://github.com/aws/aws-cdk/releases/tag/v2.32.0
- use projenrc ts
- upgrade jsii 1.62.0 aws/jsii#3609
- upgrade jsii-docgen
pflorek added a commit to pepperize/cdk-organizations that referenced this issue Jul 15, 2022
- version pin @types/prettier DefinitelyTyped/DefinitelyTyped#60314
- upgrade npm-check-updates raineorshine/npm-check-updates#1145 and projen/projen#1963
- upgrade aws-cdk-lib 2.32.0 https://github.com/aws/aws-cdk/releases/tag/v2.32.0
- use projenrc ts
- upgrade jsii 1.62.0 aws/jsii#3609
- upgrade jsii-docgen
@peterwoodworth peterwoodworth added effort/large Large work item – several weeks of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jul 21, 2022
@RomainMuller
Copy link
Contributor

@RichiCoder1 you're correct, this is the current plan. I've investigated doing a "bring your own typescript" with adapters but it turns out to be nearly impossible to do without creating a maintenance nightmare.

The RFC still stands as the best plan I have so far, and I would like to implement that sooner rather than later (but so far received very little traction/interest).

@ansgarm
Copy link
Contributor

ansgarm commented Feb 8, 2023

Given that DefinitelyTyped just dropped support for TS versions <4.x (as they only support TS versions that are less than two years old), this issue seems to become a bit more pressing 😅
Related: DefinitelyTyped/DefinitelyTyped#64262

@RomainMuller
Copy link
Contributor

We are actively working on RFC 373, and plan to have preview releases out as soon as possible.

@RichiCoder1
Copy link

That's awesome! I'm sure the team is aware, but hopefully some of the insight from that work can help with the now impending TS 5 release coming out this quarter. I don't think there's an urgency, but still!

@arnulfojr
Copy link

So I guess with jsii@^5 typescript 5 is now supported and this issue is resolved?

CDK ^2.72 uses migrated to use jsii@~5 and ts 5
aws/aws-cdk@6d581d7
https://aws.github.io/jsii/compiler-and-rosetta-maintenance/

@mrgrain mrgrain closed this as completed May 15, 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.

@mrgrain
Copy link
Contributor

mrgrain commented May 15, 2024

So I guess with jsii@^5 typescript 5 is now supported and this issue is resolved?

CDK ^2.72 uses migrated to use jsii@~5 and ts 5 aws/aws-cdk@6d581d7 https://aws.github.io/jsii/compiler-and-rosetta-maintenance/

Yes, modern TS is fully supported now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/large Large work item – several weeks of effort feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

8 participants