Skip to content

Commit

Permalink
fix(image): update napi to fix electron create Buffer issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jan 28, 2023
1 parent b2b8bbe commit d17babd
Show file tree
Hide file tree
Showing 5 changed files with 454 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ jobs:
run: ls -R .
shell: bash
- name: Test bindings
run: yarn test
run: |
yarn test
yarn electron electron.js
test-linux-x64-gnu-binding:
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
needs:
Expand Down Expand Up @@ -314,7 +316,7 @@ jobs:
run: ls -R .
shell: bash
- name: Test bindings
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test && yarn electron electron.js
test-linux-x64-musl-binding:
name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
needs:
Expand Down
8 changes: 8 additions & 0 deletions electron.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import('./example.mjs')
.then(() => {
process.exit(0)
})
.catch((e) => {
console.error(e)
process.exit(1)
})
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"ava": "^5.1.0",
"blurhash": "^2.0.4",
"chalk": "^5.2.0",
"electron": "^22.1.0",
"lerna": "^6.3.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.1",
Expand All @@ -33,7 +34,8 @@
"format:prettier": "prettier . -w",
"format:rs": "cargo fmt",
"format:toml": "taplo format",
"test": "ava"
"test": "ava",
"test:electron": "yarn electron electron.js"
},
"prettier": {
"printWidth": 120,
Expand Down
2 changes: 1 addition & 1 deletion packages/binding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ image = { version = "0.24", default-features = false, features = [
"openexr",
] }
jpeg-decoder = "0.3"
libavif = { version = "0.10", default-features = false, features = [
libavif = { version = "=0.10.1", default-features = false, features = [
"codec-aom",
] }
libc = "0.2"
Expand Down

0 comments on commit d17babd

Please sign in to comment.