fix(deps): drop electron-icon-builder from the install path - #35
Merged
Conversation
Closes #34. electron-icon-builder pulls a deprecated phantomjs-prebuilt through icon-gen and svg2png. Its postinstall downloads a 17 MB binary from GitHub release assets on every clean install, so a blip at GitHub's end fails `npm ci` outright — which is what took down the main run after #31 merged, on a transient 504. The asset is fine; the fragility is having a third-party download in the critical path at all. Nothing in the app, the tests or CI needs it. It exists for `npm run build:icons`, which is run by hand when the icon changes, and scripts/build-icons.js already invokes it through npx rather than importing it. Removing it from devDependencies takes phantomjs out of every install and leaves the cost with the one task that needs it. npx prompts before installing a package it doesn't have, which would hang a non-interactive shell, so the call now passes --yes. Verified: a clean `npm ci` installs 678 packages with no phantomjs and no electron-icon-builder anywhere in the tree, and `npm run build:icons` still regenerates every icon from icon.svg — byte-identical to the committed ones, same SHA-256 for all eight files. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #34.
The problem
electron-icon-builderdrags a deprecatedphantomjs-prebuiltinto the tree:Its
postinstalldownloads a 17 MB binary from GitHub release assets on every clean install. When that request fails,npm cifails outright — which is what took down themainrun after #31 merged:The asset itself is fine — it returns
200and the full 17 MB on request. The fragility is having a third-party download in the critical path of every install at all: it fails at random rather than staying broken, so it can't be waited out.Why it can just go
Nothing in the app, the tests or CI needs it:
build:icons.scripts/build-icons.jsalready invokes it throughnpx, not an import — so it never needed to be installed.It exists for
npm run build:icons, run by hand when the icon changes. Removing it fromdevDependenciestakes PhantomJS out of every install and leaves the cost with the one task that actually needs it.npxprompts before installing a package it doesn't have, which would hang a non-interactive shell, so the call now passes--yes.Verified
Clean install —
rm -rf node_modules && npm ci:Icon generation still works — ran
npm run build:iconswith the package absent, and it regenerated every icon fromicon.svgthroughnpx --yes. The output is byte-identical to what's committed;git status assets/is clean and all eight files keep their SHA-256:Full gate — lint, format, typecheck, 54 tests, build, and the boot smoke test all pass.
Trade-off, stated plainly
Rebuilding icons still pulls PhantomJS — this moves that cost to the one manual task rather than removing it. #34 notes the larger alternative:
build-icons.jsalready uses sharp for the 1024×1024 master, so only the.icns/.icopacking needs an external tool, and a maintained packer would drop the deprecated chain entirely. Not attempted here.🤖 Generated with Claude Code