Skip to content

Comments

feat: support function config with custom CLI arguments#6076

Merged
graphite-app[bot] merged 1 commit intomainfrom
09-08-feat_6067
Sep 9, 2025
Merged

feat: support function config with custom CLI arguments#6076
graphite-app[bot] merged 1 commit intomainfrom
09-08-feat_6067

Conversation

@IWANABETHATGUY
Copy link
Member

@IWANABETHATGUY IWANABETHATGUY commented Sep 8, 2025

Closed #6067

Screenshot

image

similar with https://rollupjs.org/command-line-interface/#configuration-files:~:text=command%20line%20options%20if%20you%20prefix%20them%20with%20config%3A,

Limitation compared to Rollup

  • Because we use node builtin parseArgs util to parse cli args, it only supports k=v pattern when parsing the unknown pair of args, e.g.
rolldown -c rolldown.cofnig.js --foo bar

it would only return {config: 'rolldown.config.js', foo: undefined}

you should use

rolldown -c rolldown.cofnig.js --foo=bar

instead

Copy link
Member Author


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 d1db928
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/68bf0173f95a6900087f60a9
😎 Deploy Preview https://deploy-preview-6076--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.

@netlify
Copy link

netlify bot commented Sep 8, 2025

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 5c2e2df
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/68bfd2c48514fb0008527043
😎 Deploy Preview https://deploy-preview-6076--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.

@IWANABETHATGUY IWANABETHATGUY force-pushed the 09-08-feat_6067 branch 6 times, most recently from f4b13a7 to 1f84e92 Compare September 9, 2025 06:04
@IWANABETHATGUY IWANABETHATGUY changed the title feat: 6067 feat: support function config with custom CLI arguments Sep 9, 2025
@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review September 9, 2025 06:48
@IWANABETHATGUY IWANABETHATGUY added blocker Blocks someone to make progress graphite: merge and removed blocker Blocks someone to make progress labels Sep 9, 2025
Copy link
Member Author

IWANABETHATGUY commented Sep 9, 2025

Merge activity

  • Sep 9, 6:59 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 9, 7:02 AM UTC: IWANABETHATGUY added this pull request to the Graphite merge queue.
  • Sep 9, 7:15 AM UTC: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'node-test (ubuntu-latest) / Node Test', 'node-test (windows-latest) / Node Test').
  • Sep 9, 7:26 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 9, 7:36 AM UTC: IWANABETHATGUY added this pull request to the Graphite merge queue.
  • Sep 9, 7:36 AM UTC: Merged by the Graphite merge queue.

Closed #6067

## Screenshot
<img width="1000" height="150" alt="image" src="https://github.com/user-attachments/assets/d99eaae3-dfd0-44ca-9106-3ee74e7daffc" />

similar with https://rollupjs.org/command-line-interface/#configuration-files:~:text=command%20line%20options%20if%20you%20prefix%20them%20with%20config%3A,

**Limitation compared to Rollup**
- Because we use node builtin `parseArgs` util to parse cli args, it only supports `k=v` pattern when parsing the unknown pair  of args, e.g.
```bash
rolldown -c rolldown.cofnig.js --foo bar
```
it would only return `{config: 'rolldown.config.js', foo: undefined}`

you should use
```bash
rolldown -c rolldown.cofnig.js --foo=bar
```
instead
@graphite-app graphite-app bot merged commit 5c2e2df into main Sep 9, 2025
41 of 44 checks passed
@graphite-app graphite-app bot deleted the 09-08-feat_6067 branch September 9, 2025 07:36
Boshen added a commit that referenced this pull request Sep 10, 2025
## [1.0.0-beta.37] - 2025-09-10

### 🚀 Features

- partial align with const inline strategy with oxc in smart mode
(#6126) by @IWANABETHATGUY
- dev: use PathsMut for non-debounced RecommendedWatcher (#6120) by
@sapphi-red
- dev: return whether the build is already scheduled from
`scheduleBuildIfStale` method (#6116) by @sapphi-red
- handle errors from `BundlerBuilder#build` (#6104) by @shulaoda
- add debounceTickRate option for debounced watchers (#6113) by @hyf0
- support full build in `incrementalBuild` mode (#6098) by
@IWANABETHATGUY
- add compare_contents_for_polling option to dev watcher (#6108) by
@hyf0
- dev: add `scheduleBuildIfStale` method to DevEngine (#6087) by
@sapphi-red
- dev: return changed files in onHmrUpdates callback (#6086) by
@sapphi-red
- support function config with custom CLI arguments (#6076) by
@IWANABETHATGUY
- improve `MISSING_EXPORT` warning to suggest `type` modifier (#6085) by
@sapphi-red
- crates/rolldown_watcher: introduce `PathsMut` to batch watch/unwatch
behaviors (#6075) by @hyf0
- enable `treeshake.commonjs` by default (#6072) by @IWANABETHATGUY
- dev: add debounce control and PollWatcher support to DevWatchOptions
(#6070) by @hyf0

### 🐛 Bug Fixes

- use kqueue for file watch on mac (#6124) by @sapphi-red
- use patched notify for better file change event debouncing (#6125) by
@sapphi-red
- support passing all js primitive value for `alias` plugin (#6123) by
@IWANABETHATGUY
- track spans in member expression properties for accurate sourcemaps
(#6100) by @IWANABETHATGUY
- correctly handle inlined CommonJS exports in member expressions
(#6090) by @IWANABETHATGUY
- dev: ensure patch file names to be unique (#6096) by @sapphi-red
- dev: normalize slash on Windows before comparing paths (#6095) by
@sapphi-red
- dev/watch: debounce duration should default to 10 (#6078) by @hyf0

### 🚜 Refactor

- simplify `__export` runtime helper to create target object internally
(#6114) by @IWANABETHATGUY
- simplify module_namespace construction second try (#6118) by
@IWANABETHATGUY
- simplify module_namespace construction (#5939) by @IWANABETHATGUY
- optimize member expression creation in AstSnippet (#6091) by
@IWANABETHATGUY
- test-dev-server: sensible watcher configuration for CI env (#6077) by
@hyf0

### 🧪 Testing

- dev: apply HMR edits on Windows (#6094) by @sapphi-red

### ⚙️ Miscellaneous Tasks

- Revert "chore: adjust breaking change template of cliff (#6069)"
(#6130) by @IWANABETHATGUY
- test-dev-server: improve hmr test configuration (#6115) by @hyf0
- deps: update dependency rolldown-plugin-dts to v0.16.2 (#6128) by
@renovate[bot]
- Revert "refactor: simplify module_namespace construction (#5939)"
(#6117) by @IWANABETHATGUY
- test-dev-server: optimize test log output (#6107) by @hyf0
- enable compare_contents_for_polling and update poll interval for CI
test-dev-server (#6110) by @hyf0
- deps: update dependency vite to v7.1.5 [security] (#6111) by
@renovate[bot]
- fix warnings reported by `just lint` (#6105) by @shulaoda
- deps: update dependency tsdown to v0.15.0 (#6102) by @renovate[bot]
- use debug builds for browser tests in CI (#6092) by @hyf0
- test-dev-server: update polling interval and add retry logic for CI
tests (#6088) by @hyf0
- adjust breaking change template of cliff (#6069) by @IWANABETHATGUY

### ◀️ Revert

- "fix: replace_plugin does not work as expected with .ts config
(#5920)" (#6074) by @IWANABETHATGUY

Co-authored-by: Boshen <[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.

[Bug]: Custom command line arguments are not handled in rolldown

2 participants