Skip to content

Comments

refactor(dev): introduce DevWatchOptions for enhanced file watching configuration#6057

Merged
shulaoda merged 1 commit intomainfrom
09-08-refactor_dev_introduce_devwatchoptions_for_enhanced_file_watching_configuration
Sep 8, 2025
Merged

refactor(dev): introduce DevWatchOptions for enhanced file watching configuration#6057
shulaoda merged 1 commit intomainfrom
09-08-refactor_dev_introduce_devwatchoptions_for_enhanced_file_watching_configuration

Conversation

@hyf0
Copy link
Member

@hyf0 hyf0 commented Sep 8, 2025

Gonna have more options about watch. Better to split a separate options.

Copy link
Member Author

hyf0 commented Sep 8, 2025


How to use the Graphite Merge Queue

Add the label graphite: merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@netlify
Copy link

netlify bot commented Sep 8, 2025

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit c7069ec
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/68bec24659c38300089bc6e6
😎 Deploy Preview https://deploy-preview-6057--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2025

Benchmarks Rust

  • target: main(7fa31d9)
  • pr: 09-08-refactor_dev_introduce_devwatchoptions_for_enhanced_file_watching_configuration(9a254c3)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.05     84.2±4.87ms        ? ?/sec    1.00     80.1±2.45ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.06     96.2±4.31ms        ? ?/sec    1.00     91.2±4.53ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    122.7±3.14ms        ? ?/sec    1.00    122.4±2.67ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.02    144.4±2.89ms        ? ?/sec    1.00    141.0±1.96ms        ? ?/sec
bundle/bundle@threejs                                        1.00     47.7±3.18ms        ? ?/sec    1.02     48.6±3.79ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.01     55.6±1.57ms        ? ?/sec    1.00     55.3±1.21ms        ? ?/sec
bundle/bundle@threejs10x                                     1.06    497.4±9.34ms        ? ?/sec    1.00    470.9±5.34ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.04   572.3±12.01ms        ? ?/sec    1.00    547.9±5.08ms        ? ?/sec
scan/scan@rome_ts                                            1.05     98.2±1.79ms        ? ?/sec    1.00     93.9±2.65ms        ? ?/sec
scan/scan@threejs                                            1.05     35.1±0.68ms        ? ?/sec    1.00     33.4±2.08ms        ? ?/sec
scan/scan@threejs10x                                         1.04    365.6±4.44ms        ? ?/sec    1.00    350.7±4.44ms        ? ?/sec

@hyf0 hyf0 force-pushed the 09-08-refactor_dev_introduce_devwatchoptions_for_enhanced_file_watching_configuration branch 2 times, most recently from 52aaeb3 to 526a681 Compare September 8, 2025 07:24
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 8, 2025

Merge activity

  • Sep 8, 9:37 AM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Sep 8, 9:37 AM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..
  • Sep 8, 11:14 AM UTC: The merge label 'graphite: merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Sep 8, 11:14 AM UTC: shulaoda added this pull request to the Graphite merge queue.
  • Sep 8, 11:44 AM UTC: The Graphite merge queue couldn't merge this PR because it had merge conflicts.
  • Sep 8, 11:47 AM UTC: The merge label 'graphite: merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.

@hyf0 hyf0 force-pushed the 09-08-refactor_dev_introduce_devwatchoptions_for_enhanced_file_watching_configuration branch from 526a681 to 9a254c3 Compare September 8, 2025 10:18
@hyf0 hyf0 requested a review from shulaoda September 8, 2025 11:12
…onfiguration

Moves watcher-related options (usePolling, pollInterval) from DevOptions
into a standalone DevWatchOptions struct/interface, providing better
organization and type safety for file watching configuration.

Changes:
- Create DevWatchOptions struct with optional usePolling and pollInterval fields
- Update DevOptions to include optional watch field of type DevWatchOptions
- Maintain backward compatibility in normalized options structure
- Update TypeScript API, NAPI bindings, and Rust core layers
- Add proper exports for new types in experimental index
- Update integration points and conversion logic
- Remove redundant exports from dev/index.ts to fix linting

This change enables cleaner API usage:
```typescript
const devEngine = await dev(input, output, {
  onHmrUpdates: (updates) => console.log(updates),
  watch: {
    usePolling: true,
    pollInterval: 500
  }
});
```

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@hyf0 hyf0 force-pushed the 09-08-refactor_dev_introduce_devwatchoptions_for_enhanced_file_watching_configuration branch from 9a254c3 to c7069ec Compare September 8, 2025 11:47
@shulaoda shulaoda merged commit a138a47 into main Sep 8, 2025
16 of 17 checks passed
@shulaoda shulaoda deleted the 09-08-refactor_dev_introduce_devwatchoptions_for_enhanced_file_watching_configuration branch September 8, 2025 11:48
@github-actions github-actions bot mentioned this pull request Sep 8, 2025
shulaoda added a commit that referenced this pull request Sep 8, 2025
## [1.0.0-beta.36] - 2025-09-08
> [!warning]
> ### 💥 BREAKING CHANGES
> 
> - drop CJS format, increase minimum required node (#6025) by @sxzz


### 🚀 Features

- rolldown_plugin_reporter: statically imported dynamic import warning (#6065) by @shulaoda
- rolldown_plugin_reporter: warn large chunks (#6063) by @shulaoda
- rolldown: oxc v0.87.0 (#5975) by @Boshen

### 🐛 Bug Fixes

- allow keeping whitespace while enabling minify (#5893) by @sapphi-red
- dev/watch: build connection between file in `this.addWatchFile` and currently transformed module during transform hook (#6048) by @hyf0
- validator of `output.minify` (#6062) by @IWANABETHATGUY
- codspeed rust benchmark ci (#6052) by @IWANABETHATGUY
- just command in ci (#6045) by @IWANABETHATGUY
- watch: only consider files read from disk are able to watch (#6037) by @hyf0

### 🚜 Refactor

- dev: introduce `DevWatchOptions` for enhanced file watching configuration (#6057) by @hyf0
- unify to use `is_in_node_modules` from `rolldown_plugin_utils` (#6066) by @shulaoda

### 🧪 Testing

- rust: ensure unused pure function call got treeshaked (#4524) by @hyf0
- hmr: tweak improper test (#6034) by @hyf0
- hmr: add test of editing multiple files in the same timeframe (#6029) by @hyf0
- hmr: support to edit multiple files in the same timeframe (#6014) by @hyf0

### ⚙️ Miscellaneous Tasks

- deps: lock file maintenance rust crates (#6003) by @renovate[bot]
- deps: lock file maintenance npm packages (#5995) by @renovate[bot]
- add auto-assign PR workflow for organization members (#6058) by @IWANABETHATGUY
- fix benchmark-node workflow (#6060) by @IWANABETHATGUY
- adding `test-node-rolldown-only` just command (#6055) by @IWANABETHATGUY
- just commands in ci (#6056) by @IWANABETHATGUY
- run test ci when `justfile` is changed (#6049) by @IWANABETHATGUY
- remove unused warning for conditional compiled`SimplifyMinifyOptions` (#6047) by @IWANABETHATGUY
- remove auto approval ci (#6051) by @IWANABETHATGUY
- adding rustfmt components for `repo-validation` (#6053) by @IWANABETHATGUY
- repo: check format/style in `just lint-rust` (#6050) by @hyf0
- repo/ai: refine `justfile` (#6038) by @hyf0
- repo/ai: add `AGENTS.md` and `CLAUDE.md` (#6039) by @hyf0
- deps: update github-actions (major) (#6041) by @renovate[bot]
- deps: update github-actions (#6040) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.16.1 (#6035) by @renovate[bot]

Co-authored-by: shulaoda <[email protected]>
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.

2 participants