Skip to content

fix(bundle): parse ocular CLI arguments correctly - #52

Merged
ibgreen merged 1 commit into
masterfrom
codex/fix-ocular-bundle-cli
Aug 31, 2026
Merged

ibgreen merged 1 commit into
masterfrom
codex/fix-ocular-bundle-cli

Conversation

@ibgreen

@ibgreen ibgreen commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Goal

Make ocular-bundle reliably bundle the entry point supplied by a package script and preserve comma-separated CLI configuration for esbuild.

This unblocks vis.gl repositories from replacing small custom esbuild/Rollup wrappers with the shared CLI.

Changes

  • Parse only user arguments (process.argv.slice(2)) so the CLI no longer mistakes its own scripts/bundle.js executable for the requested entry point.
  • Normalize comma-separated --externals and --target values into arrays.
  • Normalize configured externals before assigning esbuild's external option.
  • Report a focused error when no JavaScript or TypeScript entry point is supplied.
  • Add unit coverage for argument parsing and esbuild configuration.
  • Add an end-to-end CLI fixture that verifies the requested source is bundled and external imports remain external.

Validation

  • yarn build
  • yarn ocular-test node (18 tests)
  • yarn test-headless (1 test)
  • yarn lint
  • Manual CLI fixture with ESM output, source maps, comma-separated externals, and an external package import

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-31T15:22:33.988834Z 51cfb7a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ibgreen
ibgreen requested a review from Pessimistress August 31, 2026 15:11
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 33406824241

Coverage increased (+11.2%) to 54.128%

Details

  • Coverage increased (+11.2%) from the base build.
  • Patch coverage: 19 of 19 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 609
Covered Lines: 321
Line Coverage: 52.71%
Relevant Branches: 481
Covered Branches: 269
Branch Coverage: 55.93%
Branches in Coverage %: Yes
Coverage Strength: 4.58 hits per line

💛 - Coveralls

@ibgreen
ibgreen merged commit dce323a into master Aug 31, 2026
1 check passed
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.

3 participants