Skip to content

Conversation

lukastaegert
Copy link
Member

@lukastaegert lukastaegert commented Jan 17, 2025

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:

Description

There was a logic to stop watch mode when stdin closes when running in a non-TTY context. I think this logic was not really serving a purpose as it does not make sense to run watch mode in a pipe IMO. However, it was breaking watch mode when running it from yarn, gradle, or docker containers. This is fixed here.

Copy link

vercel bot commented Jan 17, 2025

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 Jan 17, 2025 5:46pm

Copy link

github-actions bot commented Jan 17, 2025

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-5649_fix_watch_mode

Notice: Ensure you have installed the latest stable Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust.

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

Copy link

github-actions bot commented Jan 17, 2025

Performance report

  • BUILD: 7320ms, 736 MB
    • initialize: 0ms, 27.3 MB
    • generate module graph: 2708ms, 552 MB
      • generate ast: 1236ms, 543 MB
    • sort and bind modules: 395ms, 592 MB
    • mark included statements: 4215ms, 736 MB
      • treeshaking pass 1: 1377ms, 698 MB
      • treeshaking pass 2: 662ms, 719 MB
      • treeshaking pass 3: 279ms, 724 MB
      • treeshaking pass 4: 259ms, 727 MB
      • treeshaking pass 5: 299ms, 730 MB
      • treeshaking pass 6: 250ms, 731 MB
      • treeshaking pass 7: 232ms, 730 MB
      • treeshaking pass 8: 224ms, 735 MB
      • treeshaking pass 9: 208ms, 729 MB
      • treeshaking pass 10: 210ms, 732 MB
      • treeshaking pass 11: 209ms, 736 MB
  • GENERATE: 710ms, 973 MB
    • initialize render: 0ms, 869 MB
    • generate chunks: 73ms, 880 MB
      • optimize chunks: 0ms, 874 MB
    • render chunks: 622ms, 947 MB
    • transform chunks: 16ms, 973 MB
    • generate bundle: 0ms, 973 MB

Copy link

@mroloux mroloux left a comment

Choose a reason for hiding this comment

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

Thanks, I tested this and it works well 👍

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.79%. Comparing base (8e814a5) to head (07abb37).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5803      +/-   ##
==========================================
- Coverage   99.01%   98.79%   -0.23%     
==========================================
  Files         259      259              
  Lines        8117     8114       -3     
  Branches     1370     1369       -1     
==========================================
- Hits         8037     8016      -21     
- Misses         53       72      +19     
+ Partials       27       26       -1     

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

@lukastaegert lukastaegert force-pushed the gh-5649_fix_watch_mode branch from 2d29f9f to 07abb37 Compare January 17, 2025 17:45
@lukastaegert lukastaegert merged commit 0e77fb7 into master Jan 19, 2025
41 of 42 checks passed
@lukastaegert lukastaegert deleted the gh-5649_fix_watch_mode branch January 19, 2025 06:34
Copy link

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

Since 4.21.1, running from Makefile in background doesn't work Rollup build --watch not works on docker with Vite
2 participants