-
Notifications
You must be signed in to change notification settings - Fork 247
fix: pull the chromium version from the binary, not the monorepo when testing the packaged app COMPASS-9421 #7108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ing the packaged app
There was a problem hiding this 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 introduces a new CLI flag --versions to print the full process.versions JSON (Node, Electron, Chromium) and updates the end-to-end test setup to dynamically derive the Chromium version from the target Electron binary (packaged or monorepo) to avoid mismatches.
- Add
--versionsflag in the Compass main process to output all process versions. - Extend preferences schema to include a
versionsboolean flag. - Rename test-runner constants to
MONOREPO_ELECTRON_*and implementgetChromiumVersionFromBinaryfor packaged-app tests. - Update E2E helpers (
compass.tsandcompass-web-sandbox.ts) to use the correct Chromium version depending on context.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/compass/src/main/index.ts | Added --versions CLI check to dump process.versions. |
| packages/compass-preferences-model/src/preferences-schema.tsx | Added versions preference and schema entry for the new flag. |
| packages/compass-e2e-tests/helpers/test-runner-paths.ts | Renamed Electron version exports to distinguish monorepo. |
| packages/compass-e2e-tests/helpers/compass.ts | Imported new monorepo constant, added getChromiumVersionFromBinary, and conditional version logic. |
| packages/compass-e2e-tests/helpers/compass-web-sandbox.ts | Switched to use MONOREPO_ELECTRON_CHROMIUM_VERSION import. |
Comments suppressed due to low confidence (2)
packages/compass/src/main/index.ts:60
- The new --versions flag isn't mentioned in the CLI help output; consider updating
getHelpText()or the usage instructions to document this option.
if (preferences.versions) {
packages/compass-e2e-tests/helpers/compass.ts:478
- The new
getChromiumVersionFromBinaryfunction isn’t covered by any tests; adding unit or integration tests would ensure it correctly parses and converts the Electron version.
async function getChromiumVersionFromBinary(path: string) {
| async function getChromiumVersionFromBinary(path: string) { | ||
| const { stdout } = await execFileIgnoreError(path, ['--versions'], {}); |
Copilot
AI
Jul 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The parameter name path shadows the imported path module; consider renaming it (e.g., to binaryPath) to avoid confusion.
| async function getChromiumVersionFromBinary(path: string) { | |
| const { stdout } = await execFileIgnoreError(path, ['--versions'], {}); | |
| async function getChromiumVersionFromBinary(binaryPath: string) { | |
| const { stdout } = await execFileIgnoreError(binaryPath, ['--versions'], {}); |
gribnoysup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question / suggestion (that I don't think is that important), otherwise looks good to me, hopefully will help with the smokes!
No description provided.