ci: electron example should not build with top level yarn build#1195
ci: electron example should not build with top level yarn build#1195
yarn build#1195Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk size report |
|
@launchdarkly/js-client-sdk-common size report |
283410e to
e583c5f
Compare
|
@cursor review |
f99d44f to
d0d9a5b
Compare
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| sudo apt-get install -y xvfb | ||
| Xvfb :99 -screen 0 1024x768x24 > /tmp/xvfb.log 2>&1 & | ||
| yarn workspace @internal/electron-example playwright install --with-deps chromium | ||
| yarn workspace @internal/electron-example start -- --build |
There was a problem hiding this comment.
Double dash consumed by yarn, breaking electron build-exit
High Severity
The old build script was "electron-forge start -- --build", where the -- separator told electron-forge to pass --build through to the electron binary's process.argv. The new command yarn workspace @internal/electron-example start -- --build has yarn's CLI parser (Clipanion Option.Proxy()) consume the -- separator, resulting in electron-forge start --build without the --. Since --build is not a recognized electron-forge option, it likely won't reach process.argv, causing the process.argv.includes('--build') check in main.ts to fail. Instead of exiting immediately after building, the app would fully launch.
Additional Locations (1)
There was a problem hiding this comment.
this is actually exactly what I want it to do.


Note
Low Risk
Low risk CI refactor plus removal of an example-only
buildscript; main impact is on the GitHub Actions e2e job behavior and environment variable/secrets setup.Overview
Refactors
.github/workflows/electron.yaml’srun-examplejob to call the shared./actions/run-examplecomposite action instead of inlining dependency install/build, Xvfb/Playwright setup, and test execution.Enhances
actions/run-example/action.ymlto support anenv_varsinput (written to$GITHUB_ENV) and to fetch the mobile SDK key in addition to the existing client-side and flag keys; the Electron workflow now suppliesDISPLAY/ELECTRON_DISABLE_SANDBOXand moves Xvfb/Playwright/startup intobefore_test.Removes the
buildscript frompackages/sdk/electron/example/package.json, so the example no longer exposes a top-levelyarn buildentry point.Written by Cursor Bugbot for commit 7790739. This will update automatically on new commits. Configure here.