Skip to content

Commit

Permalink
fix(image): update napi to fix electron create Buffer issues (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Jan 29, 2023
1 parent b2b8bbe commit e710222
Show file tree
Hide file tree
Showing 5 changed files with 457 additions and 9 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/CI.yml
Expand Up @@ -160,7 +160,7 @@ jobs:
- uses: goto-bus-stop/setup-zig@v2
if: ${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
with:
version: 0.10.0
version: 0.10.1
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
if: ${{ matrix.settings.target == 'i686-pc-windows-msvc' }}
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
curl -qL https://www.npmjs.com/install.sh | sh
npm install --location=global --ignore-scripts yarn
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
sh rustup.sh -y --profile minimal --default-toolchain beta
export PATH="/usr/local/cargo/bin:$PATH"
echo "~~~~ rustc --version ~~~~"
rustc --version
Expand Down Expand Up @@ -266,7 +266,7 @@ jobs:
check-latest: true
cache: yarn
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
run: yarn install --immutable
- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -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 All @@ -301,7 +303,7 @@ jobs:
check-latest: true
cache: yarn
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
run: yarn install --immutable
- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand Down
8 changes: 8 additions & 0 deletions electron.js
@@ -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
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
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

1 comment on commit e710222

@vercel
Copy link

@vercel vercel bot commented on e710222 Jan 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

image – ./

image-git-main-lynweklm.vercel.app
image.napi.rs
image-two.vercel.app
image-lynweklm.vercel.app

Please sign in to comment.