fix(coding-agent): move sharp to optional dependencies for arm64 support

This commit is contained in:
can1357
2026-01-12 11:08:33 +01:00
parent b06b005b6b
commit bf770d7b96
4 changed files with 23 additions and 6 deletions
+12 -4
View File
@@ -64,10 +64,18 @@ jobs:
- run: bun install --frozen-lockfile
- name: Install cross-platform native bindings
run: |
bun install --os darwin --cpu arm64
bun install --os darwin --cpu x64
bun install --os linux --cpu arm64
bun install --os win32 --cpu x64
# bun install only fetches optional deps for current platform (linux-x64)
# Explicitly install all platform binaries for bun cross-compilation
bun add --no-save \
@img/sharp-darwin-arm64@0.34.5 \
@img/sharp-darwin-x64@0.34.5 \
@img/sharp-linux-x64@0.34.5 \
@img/sharp-linux-arm64@0.34.5 \
@img/sharp-win32-x64@0.34.5 \
@img/sharp-libvips-darwin-arm64@1.2.4 \
@img/sharp-libvips-darwin-x64@1.2.4 \
@img/sharp-libvips-linux-x64@1.2.4 \
@img/sharp-libvips-linux-arm64@1.2.4
- name: Build binaries
run: |
cd packages/coding-agent
+3 -1
View File
@@ -83,7 +83,6 @@
"nanoid": "^5.1.6",
"ndjson": "^2.0.0",
"node-html-parser": "^6.1.13",
"sharp": "^0.34.2",
"smol-toml": "^1.6.0",
"strip-ansi": "^7.1.2",
"winston": "^3.17.0",
@@ -97,6 +96,9 @@
"@types/node": "^24.3.0",
"ms": "^2.1.3",
},
"optionalDependencies": {
"sharp": "^0.34.2",
},
},
"packages/git-tool": {
"name": "@oh-my-pi/pi-git-tool",
+4
View File
@@ -2,6 +2,10 @@
## [Unreleased]
### Fixed
- Move `sharp` to optional dependencies with all platform binaries to fix arm64 runtime errors
## [4.7.0] - 2026-01-12
### Added
+4 -1
View File
@@ -58,7 +58,7 @@
"nanoid": "^5.1.6",
"ndjson": "^2.0.0",
"node-html-parser": "^6.1.13",
"sharp": "^0.34.2",
"smol-toml": "^1.6.0",
"strip-ansi": "^7.1.2",
"winston": "^3.17.0",
@@ -72,6 +72,9 @@
"@types/node": "^24.3.0",
"ms": "^2.1.3"
},
"optionalDependencies": {
"sharp": "^0.34.2"
},
"keywords": [
"coding-agent",
"ai",