Skip to content

Commit e710222

Browse files
authored
fix(image): update napi to fix electron create Buffer issues (#39)
1 parent b2b8bbe commit e710222

File tree

5 files changed

+457
-9
lines changed

5 files changed

+457
-9
lines changed

.github/workflows/CI.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
- uses: goto-bus-stop/setup-zig@v2
161161
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
162162
with:
163-
version: 0.10.0
163+
version: 0.10.1
164164
- name: Install LLVM and Clang
165165
uses: KyleMayes/install-llvm-action@v1
166166
if: ${{ matrix.settings.target == 'i686-pc-windows-msvc' }}
@@ -212,7 +212,7 @@ jobs:
212212
curl -qL https://www.npmjs.com/install.sh | sh
213213
npm install --location=global --ignore-scripts yarn
214214
curl https://sh.rustup.rs -sSf --output rustup.sh
215-
sh rustup.sh -y --profile minimal --default-toolchain stable
215+
sh rustup.sh -y --profile minimal --default-toolchain beta
216216
export PATH="/usr/local/cargo/bin:$PATH"
217217
echo "~~~~ rustc --version ~~~~"
218218
rustc --version
@@ -266,7 +266,7 @@ jobs:
266266
check-latest: true
267267
cache: yarn
268268
- name: Install dependencies
269-
run: yarn install --immutable --mode=skip-build
269+
run: yarn install --immutable
270270
- name: Download artifacts
271271
uses: actions/download-artifact@v3
272272
with:
@@ -279,7 +279,9 @@ jobs:
279279
run: ls -R .
280280
shell: bash
281281
- name: Test bindings
282-
run: yarn test
282+
run: |
283+
yarn test
284+
yarn electron electron.js
283285
test-linux-x64-gnu-binding:
284286
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
285287
needs:
@@ -301,7 +303,7 @@ jobs:
301303
check-latest: true
302304
cache: yarn
303305
- name: Install dependencies
304-
run: yarn install --immutable --mode=skip-build
306+
run: yarn install --immutable
305307
- name: Download artifacts
306308
uses: actions/download-artifact@v3
307309
with:

electron.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import('./example.mjs')
2+
.then(() => {
3+
process.exit(0)
4+
})
5+
.catch((e) => {
6+
console.error(e)
7+
process.exit(1)
8+
})

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"ava": "^5.1.0",
2020
"blurhash": "^2.0.4",
2121
"chalk": "^5.2.0",
22+
"electron": "^22.1.0",
2223
"lerna": "^6.3.0",
2324
"npm-run-all": "^4.1.5",
2425
"prettier": "^2.8.1",
@@ -33,7 +34,8 @@
3334
"format:prettier": "prettier . -w",
3435
"format:rs": "cargo fmt",
3536
"format:toml": "taplo format",
36-
"test": "ava"
37+
"test": "ava",
38+
"test:electron": "yarn electron electron.js"
3739
},
3840
"prettier": {
3941
"printWidth": 120,

packages/binding/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ image = { version = "0.24", default-features = false, features = [
3535
"openexr",
3636
] }
3737
jpeg-decoder = "0.3"
38-
libavif = { version = "0.10", default-features = false, features = [
38+
libavif = { version = "=0.10.1", default-features = false, features = [
3939
"codec-aom",
4040
] }
4141
libc = "0.2"

0 commit comments

Comments
 (0)