Skip to content

feat(toolkit): watch operation can be stopped #308

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 1 commit into from
Apr 3, 2025

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Apr 2, 2025

The toolkit.watch() operation used to start a filesystem watcher in the background and immediately return. The caller would continue running to its end, while the filesystem watcher would keep the node process alive.

Instead, now return an IWatcher object that can be disposed to stop the watching, and can be used to wait for the watcher to stop.

Closes #299


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 April 2, 2025 13:38
@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:38
@codecov-commenter
Copy link

codecov-commenter commented Apr 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.44%. Comparing base (f816a1b) to head (486e70b).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
packages/aws-cdk/lib/cli/cli.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #308      +/-   ##
==========================================
+ Coverage   85.34%   85.44%   +0.10%     
==========================================
  Files         222      222              
  Lines       36898    36926      +28     
  Branches     4451     4455       +4     
==========================================
+ Hits        31492    31553      +61     
+ Misses       5313     5277      -36     
- Partials       93       96       +3     
Flag Coverage Δ
suite.unit 85.44% <0.00%> (+0.10%) ⬆️

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.

The `toolkit.watch()` operation used to start a filesystem watcher in
the background and immediately return. The caller would continue running
to its end, while the filesystem watcher would keep the node process
alive.

Instead, now return an `IWatcher` object that can be disposed
to stop the watching, and can be used to wait for the watcher to stop.
@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Apr 3, 2025
Merged via the queue into main with commit 634f512 Apr 3, 2025
24 checks passed
@aws-cdk-automation aws-cdk-automation deleted the huijbers/watch-return-type branch April 3, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2 pr/exempt-integ-test Skips the integ test steps if set.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toolkit Action: Typed return for watch
4 participants