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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ jobs:
with:
package_manager: npm
skip_package_manager_install: true
args: --publish onTagOrDraft # attach signed binaries to an existing release draft or when a tag is merged
args: --publish onTagOrDraft ${{ matrix.os == 'macos-latest' && '-c.afterSign=./pkgs/macos/notarize-build.js' || '' }} # attach signed binaries to an existing release draft or when a tag is merged
release: false # keep github release as draft for manual inspection
max_attempts: 2
# GH token for attaching atrifacts to release draft on tag build
Expand Down Expand Up @@ -262,4 +262,3 @@ jobs:

- name: Show Cache
run: du -sh ${{ github.workspace }}/.cache/ && ls -l ${{ github.workspace }}/.cache/

2 changes: 0 additions & 2 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ directories:

asarUnpack: 'src/**/scripts/**/*'

afterSign: './pkgs/macos/notarize-build.js'

mac:
artifactName: ${name}-${version}-squirrel.${ext}
category: public.app-category.utilities
Expand Down
14 changes: 14 additions & 0 deletions patches/app-builder-lib+26.8.1.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
diff --git a/node_modules/app-builder-lib/out/node-module-collector/nodeModulesCollector.js b/node_modules/app-builder-lib/out/node-module-collector/nodeModulesCollector.js
index 8160257..219dfd1 100644
--- a/node_modules/app-builder-lib/out/node-module-collector/nodeModulesCollector.js
+++ b/node_modules/app-builder-lib/out/node-module-collector/nodeModulesCollector.js
@@ -320,7 +320,8 @@ class NodeModulesCollector {
const child = childProcess.spawn(command, args, {
cwd,
env: { COREPACK_ENABLE_STRICT: "0", ...process.env }, // allow `process.env` overrides
- shell: true, // `true`` is now required: https://github.com/electron-userland/electron-builder/issues/9488
+ // Linux emits DEP0190 when args are passed with shell=true; we only need shell wrapping on Windows.
+ shell: process.platform === "win32", // https://github.com/electron-userland/electron-builder/issues/9488
});
let stderr = "";
child.stdout.pipe(outStream);
diff --git a/node_modules/app-builder-lib/scheme.json b/node_modules/app-builder-lib/scheme.json
index 2eadec7..d55eced 100644
--- a/node_modules/app-builder-lib/scheme.json
Expand Down
14 changes: 14 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ const { registerAppStartTime, getSecondsSinceAppStart } = require('./metrics/app
registerAppStartTime()
require('v8-compile-cache')

const emitWarning = process.emitWarning.bind(process)
process.emitWarning = (warning, ...args) => {
// Electron's ASAR shim currently triggers DEP0180 internally (asarStatsToFsStats).
// Filter this known upstream warning to keep runtime logs actionable.
const warningCode = (
(warning && typeof warning === 'object' && warning.code) ||
(args[0] && typeof args[0] === 'object' && args[0].code) ||
(typeof args[1] === 'string' && args[1]) ||
undefined
)
if (warningCode === 'DEP0180') return
return emitWarning(warning, ...args)
}

const { app, dialog } = require('electron')

if (process.env.NODE_ENV === 'test') {
Expand Down