frappe / books

Free Accounting Software
https://frappe.io/books
GNU Affero General Public License v3.0
2.68k stars 614 forks source link

Electron and Dependencies update #801

Closed Isaac-GC closed 5 months ago

Isaac-GC commented 5 months ago

This is a supplemental PR (meant to be an update and replacement for PR#751).

Updates electron -> 18.3.7 -> 22.3.27 electron-builder 24.4.0 -> 24.9.1 electron-updater 5.2.1 -> 6.1.7 better-sqlite3 7.5.3 -> 9.2.2

electron-rebuild -> updated to @electron/rebuild w/version 3.4.1

Currently, with updated electron versions, there is an issue where the node-abi version can't be automatically detected w/electron-builder. To get around this issue, the node-abi version was added in the "resolutions" portion of the package.json

18alantom commented 5 months ago

Seems like it's not finding pre-built binaries for better-sqlite3 under Node 16.14.0 and Darwin causing all tests to fail: https://github.com/frappe/books/actions/runs/7521667651/job/20472776937?pr=801#step:5:17

(build.yml runs on macOS since it's the only one that builds for all platforms)

Isaac-GC commented 5 months ago

Updated the nodejs version from 16 to 18 in the workflow files and that seemed to fix it.

18alantom commented 5 months ago

Checked it locally (ARM macOS 13.5) nothing overtly broken, looks good.

Isaac-GC commented 5 months ago

No, looks like it was removed from the master branch since 2018), but did add in yarn.lock

mildred commented 5 months ago

I was thinking there might be a legitimate reason why yarn.lock was not included

Isaac-GC commented 5 months ago

Since Yarn was implemented as the tool of choice by using the yarn command to install dependencies, I understand the yarn.lock takes the place of package-lock.json. I don't really see a conflict that might happen with having the yarn.lock file (though having both of types of lockfiles present in the repo might cause issues)

@18alantom Is/Was there issues previously with having the yarn.lock file present in the repo and/or should there be a package-lock.json as well?