Skip to content

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Oct 2, 2025

This upgrades jsii to a version with support for type intersections.

Changes around decorators:

  • Because this is switching to a newer version of jsii that doesn't set experimentalDecorators: true anymore by default, we need to update the typing for the @MethodMetadata decorator (ref).
  • Because the framework-integ package can see the source .ts files from aws-cdk-lib, it can see the presence of the decorators. The code must type check, so we must switch experimentalDecorators to the same value in that package (false). Some example code used a legacy decorator which had to be rewritten to be somewhat equivalent: the exact example cannot be recreated with modern decorators.
  • The emulation of modern decorators behaves slightly differently depending on the target (it either uses the static { } JS syntax if available in ES2022+, or tries to emulate that syntax). If the behavior is emulated, the CONSTRUCT_INJECTION_ID property can never be read from the class -- it always shows up as undefined. Upgrade to ES2022 across the board to generate the right polyfill code. This is supported by Node 16+.
    • Jsii forces ES2020 by default. To switch everything to ES2022, we need to eject from the jsii autogenerated config everywhere.

I also bumped the Node type definitions, which led to a couple more eslint violations that needed to be fixed.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@rix0rrr rix0rrr requested a review from a team October 2, 2025 12:29
@github-actions github-actions bot added the p2 label Oct 2, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Oct 2, 2025
@rix0rrr rix0rrr changed the title chore: bump jsii to version with support for type intersections chore: bump TypeScript/jsii to 5.9 Oct 3, 2025
Copy link
Contributor

mergify bot commented Oct 6, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot added the queued label Oct 6, 2025
Copy link
Contributor

mergify bot commented Oct 6, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 3e54de0 into main Oct 6, 2025
18 of 19 checks passed
@mergify mergify bot deleted the huijbers/bump-jssi branch October 6, 2025 19:18
@mergify mergify bot removed the queued label Oct 6, 2025
Copy link
Contributor

github-actions bot commented Oct 6, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants