Skip to content

fix(toolkit): doesn't load on platforms without the Disposable API #309

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

Merged
merged 2 commits into from
Apr 2, 2025

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Apr 2, 2025

Toolkit classes reference the public static Symbol.asyncDispose symbol, but that is only defined on runtimes that are implementing the new Disposable API yet.

On platforms that don't know that API, that constant doesn't exist and the class definition fails.

Polyfill it.


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

Toolkit classes reference the public static `Symbol.asyncDispose`
symbol, but that is only defined on runtimes that are implementing
the new Disposable API yet.

On platforms that don't know that API, that constant doesn't exist
and the class definition fails.

Polyfill it.
@rix0rrr rix0rrr requested a review from a team April 2, 2025 13:49
@github-actions github-actions bot added the p2 label Apr 2, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team April 2, 2025 13:51
@codecov-commenter
Copy link

codecov-commenter commented Apr 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.47%. Comparing base (445fd71) to head (f46da2f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
- Coverage   85.54%   85.47%   -0.07%     
==========================================
  Files         222      222              
  Lines       36926    36926              
  Branches     4458     4452       -6     
==========================================
- Hits        31588    31563      -25     
- Misses       5248     5267      +19     
- Partials       90       96       +6     
Flag Coverage Δ
suite.unit 85.47% <ø> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: github-actions <[email protected]>
@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Apr 2, 2025
Merged via the queue into main with commit 20337de Apr 2, 2025
20 checks passed
@aws-cdk-automation aws-cdk-automation deleted the huijbers/polyfill-disposable branch April 2, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants