Skip to content

Comments

fix: electron version updater#170

Merged
iamEvanYT merged 2 commits intomainfrom
evan/fix-electron-updater
Dec 5, 2025
Merged

fix: electron version updater#170
iamEvanYT merged 2 commits intomainfrom
evan/fix-electron-updater

Conversation

@iamEvanYT
Copy link
Member

@iamEvanYT iamEvanYT commented Dec 5, 2025

Summary by CodeRabbit

  • Documentation

    • Updated Electron update workflow documentation with new procedures, including cache clearing and lock file adjustments.
  • Chores

    • Updated Electron dependency resolution from git-based to HTTPS URL format.
    • Modified internal update scripts to support new dependency URL handling and shortened commit hashes.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 5, 2025

Walkthrough

This PR transitions Electron dependency resolution from git+ssh GitHub references to HTTPS URLs, introduces short-hash commit referencing in lock files, updates the electron-upgrader script to handle the new format, and expands manual update documentation with cache cleanup steps.

Changes

Cohort / File(s) Summary
Documentation
docs/contributing/updating-electron.md
Updated dependency URL templates from git-based format to HTTPS GitHub URLs, expanded manual update workflow with cache deletion and bun.lock adjustment steps using short commit hashes.
Configuration
package.json
Changed Electron dependency reference from GitHub spec format to direct HTTPS URL while maintaining version tag.
Electron Upgrader
scripts/electron-upgrader/_modules/updater.ts
Replaced git+ssh prefixes with HTTPS URLs, introduced LOCK_PREFIX and LOCK_SUFFIX constants for lock-file assembly, implemented 7-character short commit hash handling, and updated both updatePackageJson and updateBunLock functions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify consistency of HTTPS URL format across all three files
  • Validate short commit hash logic (7-character truncation) in updater.ts
  • Confirm lock-file prefix/suffix construction matches expected bun.lock format
  • Review documentation examples match updated URL patterns

Possibly related PRs

Suggested reviewers

  • IAmStiven

Poem

🐰 A rabbit hops through URLs anew,
From git to https, a cleaner view!
Short hashes dance in lock-file grace,
Electron builds at swifter pace! 🚀

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: electron version updater' directly addresses the main change: updates to the electron dependency resolver and version update workflow across package.json, bun.lock, and the updater script.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch evan/fix-electron-updater

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Build artifacts for all platforms are ready! 🚀

Download the artifacts for:

One-line installer (Unstable):
bunx flow-debug-build --open 19968564165

(execution 19968564165 / attempt 1)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 94d63cc and b675932.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • docs/contributing/updating-electron.md (2 hunks)
  • package.json (1 hunks)
  • scripts/electron-upgrader/_modules/updater.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
package.json

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

package.json: Use bun install instead of npm install or yarn install or pnpm install
Use bun run <script> instead of npm run <script> or yarn run <script> or pnpm run <script>

Files:

  • package.json
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

**/*.{js,jsx,ts,tsx}: Use bun <file> instead of node <file> or ts-node <file>
Bun automatically loads .env, so don't use dotenv.
Use Bun.serve() for HTTP servers and WebSockets instead of express.
Use bun:sqlite for SQLite instead of better-sqlite3.
Use Bun.redis for Redis instead of ioredis.
Use Bun.sql for Postgres instead of pg or postgres.js.
Use built-in WebSocket instead of ws.
Prefer Bun.file over node:fs's readFile/writeFile.
Use Bun.$ for shell commands instead of execa.

Files:

  • scripts/electron-upgrader/_modules/updater.ts
**/*.{html,ts,css}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun build <file.html|file.ts|file.css> instead of webpack or esbuild

Files:

  • scripts/electron-upgrader/_modules/updater.ts
🧠 Learnings (7)
📚 Learning: 2025-07-24T08:49:07.217Z
Learnt from: CR
Repo: MultiboxLabs/flow-browser PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-24T08:49:07.217Z
Learning: Applies to package.json : Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`

Applied to files:

  • docs/contributing/updating-electron.md
  • scripts/electron-upgrader/_modules/updater.ts
📚 Learning: 2025-07-24T08:49:07.217Z
Learnt from: CR
Repo: MultiboxLabs/flow-browser PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-24T08:49:07.217Z
Learning: Applies to package.json : Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`

Applied to files:

  • docs/contributing/updating-electron.md
  • scripts/electron-upgrader/_modules/updater.ts
📚 Learning: 2025-07-24T08:49:07.217Z
Learnt from: CR
Repo: MultiboxLabs/flow-browser PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-24T08:49:07.217Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use `bun <file>` instead of `node <file>` or `ts-node <file>`

Applied to files:

  • docs/contributing/updating-electron.md
📚 Learning: 2025-07-24T08:49:07.217Z
Learnt from: CR
Repo: MultiboxLabs/flow-browser PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-24T08:49:07.217Z
Learning: Applies to **/*.{html,ts,css} : Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`

Applied to files:

  • docs/contributing/updating-electron.md
📚 Learning: 2025-07-24T08:49:07.217Z
Learnt from: CR
Repo: MultiboxLabs/flow-browser PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-24T08:49:07.217Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use `Bun.$` for shell commands instead of execa.

Applied to files:

  • docs/contributing/updating-electron.md
📚 Learning: 2025-07-24T08:49:07.217Z
Learnt from: CR
Repo: MultiboxLabs/flow-browser PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-24T08:49:07.217Z
Learning: For more information, read the Bun API docs in `node_modules/bun-types/docs/**.md`.

Applied to files:

  • docs/contributing/updating-electron.md
📚 Learning: 2025-07-24T08:49:07.217Z
Learnt from: CR
Repo: MultiboxLabs/flow-browser PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-07-24T08:49:07.217Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use `bun:sqlite` for SQLite instead of `better-sqlite3`.

Applied to files:

  • docs/contributing/updating-electron.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: build (macos-15-intel)
  • GitHub Check: build (ubuntu-24.04-arm)
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: build (macos-latest)
  • GitHub Check: main-checks
  • GitHub Check: format
🔇 Additional comments (6)
package.json (1)

74-74: LGTM! Electron dependency URL format updated correctly.

The migration from git+ssh to HTTPS URL format is correct and aligns with the updater script changes.

scripts/electron-upgrader/_modules/updater.ts (2)

7-9: LGTM! URL constants are well-structured.

The new constants correctly define the HTTPS-based URL format for both package.json and bun.lock entries.


30-30: LGTM! Package.json update uses the correct URL format.

The electron dependency is correctly updated using the new HTTPS URL prefix.

docs/contributing/updating-electron.md (3)

12-16: LGTM! Documentation correctly reflects the new HTTPS URL format.

The template and example properly document the updated electron dependency format that matches the code implementation.


24-28: LGTM! bun.lock format documented correctly.

The template and example accurately reflect the short commit hash format (7 characters) used in the updater script.


34-34: LGTM! Helpful cache cleanup step added.

This additional cleanup step helps ensure a clean installation state and is a good troubleshooting measure.

@iamEvanYT
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Breezy!

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@iamEvanYT iamEvanYT merged commit 033dfb3 into main Dec 5, 2025
12 checks passed
@iamEvanYT iamEvanYT deleted the evan/fix-electron-updater branch December 5, 2025 20:28
Copy link

@IAmStiven IAmStiven left a comment

Choose a reason for hiding this comment

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

👍

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.

2 participants