Skip to content
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

build(deps-dev): bump electron-builder from 24.13.3 to 25.0.5 #7409

Merged
merged 4 commits into from
Oct 2, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 4, 2024

Bumps electron-builder from 24.13.3 to 25.0.5.

Release notes

Sourced from electron-builder's releases.

v25.0.5

What's Changed

New Contributors

Full Changelog: electron-userland/electron-builder@v25.0.4...v25.0.5

v25.0.4

What's Changed

New Contributors

Full Changelog: electron-userland/electron-builder@v25.0.3...v25.0.4

v25.0.3

What's Changed

New Contributors

Full Changelog: electron-userland/electron-builder@v25.0.2...v25.0.3

v25.0.2

What's Changed

... (truncated)

Changelog

Sourced from electron-builder's changelog.

25.0.5

Patch Changes

  • Updated dependencies [8e6c1712]:
    • app-builder-lib@25.0.5
    • dmg-builder@25.0.5

25.0.4

Patch Changes

25.0.3

Patch Changes

25.0.2

Patch Changes

25.0.1

Patch Changes

25.0.0

Minor Changes

... (truncated)

Commits
  • d5d9f3f chore(deploy): Release v25.0.5 (electron-updater@6.3.4) (#8411)
  • de1ea75 Revert "feat: allow riscv64 support via custom electron dist (#8143)" (#8427)
  • b306895 feat: allow riscv64 support via custom electron dist (#8143)
  • 1dcf6bc chore(deploy): Release v25.0.4 (electron-updater@6.3.3) (#8402)
  • 84f2909 chore(deploy): Release v25.0.3 (electron-updater@6.3.2) (#8377)
  • b20496b chore(deploy): Release v25.0.2 (electron-updater@6.3.1) (#8357)
  • c85b73d fix: allow typescript typechecking for electron-updater .d.ts (#8372)
  • fb16669 chore(deploy): Release v25.0.1 (#8343)
  • bfe4ecc chore(deploy): Release v25.0.0 (electron-updater@6.3.0) (#8337)
  • 1320c0e chore(deploy): Release v25.0.0-alpha.13 (electron-updater@6.3.0-alpha.8) (alp...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the component/dependencies Pull requests that update a dependency file label Sep 4, 2024
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/electron-builder-25.0.5 branch from 5dc9cf1 to f18bc4b Compare September 4, 2024 16:06
@jandubois
Copy link
Member

Electron Builder 25 requires Node 20; we can't upgrade as long as we are on Node 18.

@jandubois jandubois marked this pull request as draft September 4, 2024 16:27
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/electron-builder-25.0.5 branch 2 times, most recently from 2451a55 to e714275 Compare September 9, 2024 16:56
@jandubois jandubois mentioned this pull request Sep 10, 2024
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/electron-builder-25.0.5 branch 7 times, most recently from 6bb400f to aa70ae0 Compare September 13, 2024 15:26
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/electron-builder-25.0.5 branch 3 times, most recently from 40c67a2 to d757822 Compare September 23, 2024 21:33
@mook-as
Copy link
Contributor

mook-as commented Sep 23, 2024

Current failure is because, per https://github.com/nodejs/node-gyp?tab=readme-ov-file#installation:

Important

Python >= v3.12 requires node-gyp >= v10

$ yarn why node-gyp
…
=> Found "node-gyp@10.2.0"
…
=> Found "@electron/rebuild#node-gyp@9.4.1"
info This module exists because "electron-builder#app-builder-lib#@electron#rebuild" depends on it.

https://github.com/electron/rebuild/blob/cb372cdf09d9ca3ac8f1231608e4ebedddabe51c/package.json#L50
electron/rebuild#1116
I tried overriding it with resolutions, but that just makes node node_modules/electron-builder/out/cli/cli.js install-app-deps hang (according to CI, on Linux & macOS).

Trying to manually run pip install setuptools seems better, but now on Linux (only) we get:

  • electron-builder  version=25.0.5
  • executing @electron/rebuild  electronVersion=30.5.1 arch=x64 buildFromSource=false appDir=./
  • installing native dependencies  arch=x64
  • preparing       moduleName=fs-xattr arch=x64
  • finished        moduleName=fs-xattr arch=x64
  • preparing       moduleName=native-reg arch=x64
  ⨯ node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module 'node-addon-api'
Require stack:
- /home/runner/work/rd/rd/node_modules/native-reg/[eval]
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at [eval]:1:1
    at runScriptInThisContext (node:internal/vm:209:10)
    at node:internal/process/execution:118:14
    at [eval]-wrapper:6:24
    at runScript (node:internal/process/execution:101:62)
    at evalScript (node:internal/process/execution:133:3) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/runner/work/rd/rd/node_modules/native-reg/[eval]' ]
}

Node.js v20.17.0
gyp: Call to 'node -p "require('node-addon-api').gyp"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
Error: `gyp` failed with exit code: 1
    at ChildProcess.onCpExit (/home/runner/work/rd/rd/node_modules/@electron/rebuild/node_modules/node-gyp/lib/configure.js:325:16)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)


  ⨯ node-gyp failed to rebuild '/home/runner/work/rd/rd/node_modules/native-reg'  failedTask=installAppDeps stackTrace=Error: node-gyp failed to rebuild '/home/runner/work/rd/rd/node_modules/native-reg'
    at ChildProcess.<anonymous> (/home/runner/work/rd/rd/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js:118:24)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)
POSTINSTALL ERROR:  {"code":1,"signal":null,"message":"Command failed: node node_modules/electron-builder/out/cli/cli.js install-app-deps"}
error Command failed with exit code 2.

It looks like this was also ready installed on macOS, because:

$ yarn why node-addon-api
…
info Reasons this module exists
   - "dmg-license#iconv-corefoundation" depends on it
   - Hoisted from "dmg-license#iconv-corefoundation#node-addon-api"

After that, it's just stuff we're importing from them that needs updating; that's more of the normal kind of upgrade failures.


After that, we end up with something weird:

$ node scripts/ts-wrapper.js scripts/package.ts
/home/runner/work/rd/rd/node_modules/app-builder-lib/src/winPackager.ts:38
export class WinPackager extends PlatformPackager<WindowsConfiguration> {
                                 ^
TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (/home/runner/work/rd/rd/node_modules/app-builder-lib/src/winPackager.ts:38:34)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Object.require.extensions.<computed> [as .js] (/home/runner/work/rd/rd/node_modules/ts-node/src/index.ts:1608:43)

Both classes are part of app-builder-lib, so it shouldn't be an issue of mismatched versions. It sounds like electron-userland/electron-builder#8431 which says develar/app-builder#134 would fix it, but forcing app-builder-bin@5.0.0-alpha.9 just ends up with a stack overflow for some reason.

@mook-as
Copy link
Contributor

mook-as commented Sep 23, 2024

Given podman-desktop/podman-desktop#8806 I suspect we should just look at the next bump of electron-builder instead.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/electron-builder-25.0.5 branch from d757822 to c155492 Compare October 2, 2024 16:33
@mook-as
Copy link
Contributor

mook-as commented Oct 2, 2024

@dependabot recreate

It looks like they're up to 25.1.7 now, let's see if that is happier

Bumps [electron-builder](https://github.com/electron-userland/electron-builder/tree/HEAD/packages/electron-builder) from 24.13.3 to 25.0.5.
- [Release notes](https://github.com/electron-userland/electron-builder/releases)
- [Changelog](https://github.com/electron-userland/electron-builder/blob/master/packages/electron-builder/CHANGELOG.md)
- [Commits](https://github.com/electron-userland/electron-builder/commits/v25.0.5/packages/electron-builder)

---
updated-dependencies:
- dependency-name: electron-builder
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/electron-builder-25.0.5 branch from c155492 to 5e0c1bc Compare October 2, 2024 18:59
@mook-as
Copy link
Contributor

mook-as commented Oct 2, 2024

25.1.7 is in pre-release (tagged as next in npm), so dependabot isn't seeing it. Also, it didn't seem to help anyway.

Currently, `electron-builder` eventually pulls in `node-gyp@9` via
`@electron/rebuild.  However, newer versions of Python (>= 3.12) no longer
ship with `distutils` built-in.  That means we need `node-gyp@10` or higher
in those cases.  Trying to manually override the installed `node-gyp`
version leads to `yarn install` hanging instead, so we will need to wait
for `@electron/rebuild` to upgrade.

Work around the issue by manually installing `setuptools` (to get
`distutils`) in CI, so we can wait until the dependencies get fixed.

Signed-off-by: Mark Yen <mark.yen@suse.com>
This is a dependency of `native-reg`; on Linux, lacking this fails Electron
installation (even though we don't use `native-reg` on Linux and it doesn't
build there, we still need to get far enough to fail correctly).

Signed-off-by: Mark Yen <mark.yen@suse.com>
- `MacPackager` is no longer the default export.
- Defer importing `LinuxPackager` until needed to avoid issues with
  dependency ordering.

Signed-off-by: Mark Yen <mark.yen@suse.com>
@mook-as mook-as marked this pull request as ready for review October 2, 2024 22:24
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM.

I wonder though if we should put the combination of setup-python, install setuptools, yarn install into a reusable action in .github/actions.

I'll leave it to you if you think that's worth it, or if you want to merge as-is.

@mook-as
Copy link
Contributor

mook-as commented Oct 2, 2024

I'll merge it as-is, and do a follow-up to see what cleanup we can do.

@mook-as mook-as merged commit 4d05021 into main Oct 2, 2024
23 checks passed
@mook-as mook-as deleted the dependabot/npm_and_yarn/electron-builder-25.0.5 branch October 2, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants