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 using for RollupBuild #5721

Merged

Conversation

shulaoda
Copy link
Contributor

@shulaoda shulaoda commented Nov 9, 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:

resolves #5714

Description

Since this is a new TypeScript feature, I'm not sure how to add additional test cases on the JavaScript side.

Copy link

vercel bot commented Nov 9, 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 Nov 12, 2024 7:27am

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.

Thank you, and also for considering the docs. I have some small comments, especially since to my understanding, no runtime fully supports the feature yet.

src/rollup/rollup.ts Show resolved Hide resolved
docs/javascript-api/index.md Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.00%. Comparing base (42e587e) to head (d163eb3).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5721   +/-   ##
=======================================
  Coverage   99.00%   99.00%           
=======================================
  Files         258      258           
  Lines        8069     8070    +1     
  Branches     1360     1360           
=======================================
+ Hits         7989     7990    +1     
  Misses         53       53           
  Partials       27       27           

☔ 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.

Thanks, this looks good. I still think, though, that it would be nice to have at least a hint in the docs that you can do that. How about in the example, we replace the // create a bundle comment with something like

	// Create a bundle. If you are using TypeScript or a runtime that
        // supports it, you can write
        //
        // await using bundle = await rollup(inputOptions);
        //
        // instead and do not need to close the bundle explicitly below.

@lukastaegert lukastaegert added this pull request to the merge queue Nov 13, 2024
Merged via the queue into rollup:master with commit 06b28cc Nov 13, 2024
39 checks passed
@shulaoda shulaoda deleted the feat/support-using-for-rollup-build branch November 13, 2024 06:40
Copy link

This PR has been released as part of rollup@4.26.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.

Bundles should support explicit resource management
2 participants