Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pkg/linux/build-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,16 @@ _build_runtime() {
ELECTRON_ARCH="arm64"
fi

ELECTRON_VERSION="$(npm info electron version)"
# Resolve the electron version from runtime/package.json, NOT from
# `npm info electron version`. The latter fetches whatever currently
# carries the `latest` dist-tag on the npm registry, which means any
# newly published electron release lands in shipped binaries without
# review. Keep the build deterministic and pinned.
ELECTRON_VERSION=$(sed -nE 's/.*"electron":[[:space:]]*"\^?([0-9.]+)".*/\1/p' "${SOURCEDIR}/runtime/package.json" | head -1)
if [ -z "${ELECTRON_VERSION}" ]; then
echo "ERROR: could not resolve electron version from runtime/package.json" >&2
exit 1
fi

pushd "${BUILDROOT}" > /dev/null || exit
while true;do
Expand Down
11 changes: 10 additions & 1 deletion pkg/mac/build-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ _build_runtime() {

test -d "${BUILD_ROOT}" || mkdir "${BUILD_ROOT}"
# Get a fresh copy of electron
ELECTRON_VERSION="$(npm info electron version)"
# Resolve the electron version from runtime/package.json, NOT from
# `npm info electron version`. The latter fetches whatever currently
# carries the `latest` dist-tag on the npm registry, which means any
# newly published electron release lands in shipped binaries without
# review. Keep the build deterministic and pinned.
ELECTRON_VERSION=$(sed -nE 's/.*"electron":[[:space:]]*"\^?([0-9.]+)".*/\1/p' "${SOURCE_DIR}/runtime/package.json" | head -1)
if [ -z "${ELECTRON_VERSION}" ]; then
echo "ERROR: could not resolve electron version from runtime/package.json" >&2
exit 1
fi

pushd "${BUILD_ROOT}" > /dev/null || exit
while true;do
Expand Down
2 changes: 1 addition & 1 deletion runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"packageManager": "yarn@4.9.2",
"devDependencies": {
"@eslint/js": "^10.0.1",
"electron": "^41.5.0",
"electron": "^42.1.0",
"eslint": "^10.4.0",
"eslint-plugin-unused-imports": "^4.4.1",
"globals": "^17.6.0"
Expand Down
Loading
Loading