Skip to content

feat(cli): add browser mode CLI options#864

Merged
fi3ework merged 2 commits intomainfrom
bargs
Jan 14, 2026
Merged

feat(cli): add browser mode CLI options#864
fi3ework merged 2 commits intomainfrom
bargs

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Jan 13, 2026

Summary

  • Add --browser.enabled, --browser.name, --browser.headless, --browser.port, --browser.strictPort CLI options
  • Support --browser as shorthand alias for --browser.enabled
  • Extract BrowserName type to reduce duplication across config types
  • Move browser options handling to mergeWithCLIOptions for multi-project support
  • Add unit tests for browser CLI options parsing

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 13, 2026

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 6f826a4
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/69670b5bada6360007f63ad5
😎 Deploy Preview https://deploy-preview-864--rstest-dev.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.

- Add `--browser.enabled`, `--browser.name`, `--browser.headless`, `--browser.port`, `--browser.strictPort` CLI options
- Support `--browser` as shorthand alias for `--browser.enabled`
- Extract `BrowserName` type to reduce duplication across config types
- Move browser options handling to `mergeWithCLIOptions` for multi-project support
- Add unit tests for browser CLI options parsing
@fi3ework fi3ework changed the title fix(browser): decouple strictPort from port configuration (#862) feat(cli): add browser mode CLI options Jan 14, 2026
@fi3ework fi3ework marked this pull request as ready for review January 14, 2026 03:19
Copilot AI review requested due to automatic review settings January 14, 2026 03:19
@fi3ework fi3ework enabled auto-merge (squash) January 14, 2026 03:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive CLI support for browser mode configuration options, allowing users to configure browser testing via command-line flags instead of only through config files. The changes enable fine-grained control over browser settings including browser type, headless mode, port configuration, and strict port behavior.

Changes:

  • Added 5 new CLI flags (--browser.enabled, --browser.name, --browser.headless, --browser.port, --browser.strictPort) while maintaining backward compatibility with the existing --browser boolean flag
  • Extracted BrowserName type into a reusable type definition to ensure consistency across the codebase
  • Moved browser options handling from resolveConfig to mergeWithCLIOptions to properly support multi-project configurations

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/core/src/types/config.ts Extracted BrowserName type for reuse across browser configuration types, improving type consistency and maintainability
packages/core/src/cli/commands.ts Added CLI option definitions for browser configuration with appropriate help text
packages/core/src/cli/init.ts Updated CommonOptions type to support both boolean and object browser options; moved browser option merging logic to mergeWithCLIOptions for multi-project support
packages/core/tests/cli/init.test.ts Added comprehensive test coverage for browser CLI options including boolean shorthand, full object configuration, and override behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fi3ework fi3ework merged commit 43e2e64 into main Jan 14, 2026
23 checks passed
@fi3ework fi3ework deleted the bargs branch January 14, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants