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

feat: support explicit-resource-management #5444

Merged
merged 4 commits into from Apr 3, 2024
Merged

Conversation

TrickyPi
Copy link
Member

@TrickyPi TrickyPi commented Mar 27, 2024

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
resolved #5113

Description

The first version of supporting explicit-resource-management. Currently, using using or await using keywords always has side effects. In the future, we can add tree-shaking logic for it.

The related Estree link: https://github.com/estree/estree/blob/master/stage3/explicit-resource-management.md

Copy link

vercel bot commented Mar 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2024 3:58pm

Copy link

github-actions bot commented Mar 27, 2024

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#feat/support-using

Notice: Ensure you have installed Rust nightly. If you haven't installed it yet, please first see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust, then see https://rust-lang.github.io/rustup/concepts/channels.html to learn how to install Rust nightly.

or load it into the REPL:
https://rollup-rgucvpuf3-rollup-js.vercel.app/repl/?pr=5444

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.80%. Comparing base (1dd3c02) to head (2a68da1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5444   +/-   ##
=======================================
  Coverage   98.80%   98.80%           
=======================================
  Files         237      237           
  Lines        9432     9435    +3     
  Branches     2398     2401    +3     
=======================================
+ Hits         9319     9322    +3     
  Misses         48       48           
  Partials       65       65           

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

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good, just one question about the side effect detection.

src/ast/nodes/Identifier.ts Outdated Show resolved Hide resolved
@lukastaegert lukastaegert added this pull request to the merge queue Apr 3, 2024
Merged via the queue into master with commit 8521d29 Apr 3, 2024
30 checks passed
@lukastaegert lukastaegert deleted the feat/support-using branch April 3, 2024 04:26
Copy link

github-actions bot commented Apr 3, 2024

This PR has been released as part of rollup@4.14.0. You can test it via npm install rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support new "using" keyword for disposable objects
2 participants