X Tutup
Skip to content

Electron upgrade: follow-up tasks and future explorations #3396

@leafo

Description

@leafo

Tracking follow-up improvements and explorations after successfully upgrading Electron from v25 to v40 #3382

  • Replace net.request() with net.fetch()
    • Modern API available since Electron 28
    • Location: src/main/net/request/metal-request.ts
  • Replace req.abort() with req.destroy()
    • Location: src/main/net/request/metal-request.ts:142
  • Migrate main process from CJS to ESM
    • Electron 28+ supports ESM. Already has "type": "module" in package.json and a TODO in esbuild.config.mjs:28.
    • Would change from "cjs" to "esm" format and output extension from .bundle.cjs to .bundle.js.
    • Currently deferred/not worth doing right now.
  • Evaluate replacing @goosewobbler/electron-redux
    • The library is abandoned but Electron APIs are stable through v40. No urgency.
    • Upstream klarna/electron-redux v2.0.0 is the same code with worse packaging. @zubridge/electron is an actively maintained alternative if migration is desired.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup