Conversation
- Updated compression setting to maximum in electron-builder configuration. - Excluded screenshot directory from extra resources during packaging. - Added new dependencies: electron-store, electron-updater, and ws. - Improved cleanup scripts to remove unnecessary files and directories, optimizing the bundle size. - Implemented logic to skip dev-only packages during the bundling process.
Co-authored-by: Haze <hazeone@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on March 19
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| const NM_REMOVE_FILE_NAMES = new Set([ | ||
| '.DS_Store', 'README.md', 'CHANGELOG.md', 'LICENSE.md', 'CONTRIBUTING.md', | ||
| 'tsconfig.json', '.npmignore', '.eslintrc', '.prettierrc', '.editorconfig', | ||
| ]); |
There was a problem hiding this comment.
Identical cleanup constants duplicated within same function
Low Severity
Inside cleanupBundle, NM_REMOVE_DIRS/NM_REMOVE_FILE_EXTS/NM_REMOVE_FILE_NAMES and REMOVE_DIRS/REMOVE_FILE_EXTS/REMOVE_FILE_NAMES are byte-for-byte identical constant definitions declared in two separate blocks of the same function. If one copy is updated (e.g., adding a new directory or extension) without updating the other, the extensions cleanup and node_modules cleanup will silently diverge. These could be defined once at the top of cleanupBundle and shared.


Note
Medium Risk
Build/packaging logic now deletes files and prunes platform-specific native binaries, which could accidentally remove a runtime-required asset for a given OS/arch. Changes are isolated to release artifacts but may surface as missing-module failures only after packaging.
Overview
Packaging now prioritizes smaller artifacts.
electron-builder.ymlswitches tocompression: maximumand excludesresources/screenshot/**fromextraResources.OpenClaw bundling/packing is tightened to remove non-runtime payload.
scripts/bundle-openclaw.mjsskips known dev-only packages/scopes during dependency BFS and adds a size-reduction cleanup pass (removing maps/type defs/tests/docs plus large unused subtrees likepdfjs-dist/legacyandnode-llama-cpp/llama).scripts/after-pack.cjsexpands cleanup to the entireopenclaw/resource and adds platform/arch-aware pruning ofkoffiprebuilds and wrong-platform native packages under@napi-rs,@img, and@mariozechner.Also bumps app version to
0.1.17-beta.0and reclassifies some packages betweendependenciesanddevDependencies(lockfile updated).Written by Cursor Bugbot for commit 4c65e5e. This will update automatically on new commits. Configure here.