Skip to content

Commit

Permalink
support prebuild for electron v20
Browse files Browse the repository at this point in the history
  • Loading branch information
neoxpert committed Aug 26, 2022
1 parent 0c42307 commit 81aabad
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ jobs:
node-version: 16
- run: npm install --ignore-scripts
- run: npx --no-install prebuild -r node -t 10.20.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }}
- run: npx --no-install prebuild -r electron -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }}
- run: npx --no-install prebuild -r electron -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }}
- if: matrix.os == 'windows-2019'
run: npx --no-install prebuild -r electron -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 --include-regex 'better_sqlite3.node$' --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
run: npx --no-install prebuild -r electron -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 --include-regex 'better_sqlite3.node$' --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}

prebuild-alpine:
name: Prebuild on alpine
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@
"cli-color": "^2.0.2",
"fs-extra": "^10.1.0",
"mocha": "^8.3.2",
"node-gyp": "9.1.0",
"nodemark": "^0.3.0",
"prebuild": "^11.0.4",
"sqlite": "^4.1.1",
"sqlite3": "^5.0.8"
},
"overrides": {
"prebuild": {
"node-gyp": "$node-gyp"
}
},
"scripts": {
"install": "prebuild-install || npm run build-release",
"build-release": "node-gyp rebuild --release",
Expand Down
5 changes: 2 additions & 3 deletions src/better_sqlite3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ void SetPrototypeGetter (v8::Isolate * isolate, v8::Local <v8::External> data, v
0,
data,
v8::AccessControl::DEFAULT,
v8::PropertyAttribute::None,
v8::AccessorSignature::New(isolate, recv)
v8::PropertyAttribute::None
);
}
#line 4 "./src/util/constants.lzz"
Expand Down Expand Up @@ -1949,7 +1948,7 @@ bool Binder::IsPlainObject (v8::Isolate * isolate, v8::Local <v8::Object> obj)
#line 35 "./src/util/binder.lzz"
{
v8::Local<v8::Value> proto = obj->GetPrototype();
v8::Local<v8::Context> ctx = obj->CreationContext();
v8::Local<v8::Context> ctx = obj->GetCreationContext().ToLocalChecked();
ctx->Enter();
v8::Local<v8::Value> baseProto = v8::Object::New(isolate)->GetPrototype();
ctx->Exit();
Expand Down
2 changes: 1 addition & 1 deletion src/util/binder.lzz
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private:

static bool IsPlainObject(v8::Isolate* isolate, v8::Local<v8::Object> obj) {
v8::Local<v8::Value> proto = obj->GetPrototype();
v8::Local<v8::Context> ctx = obj->CreationContext();
v8::Local<v8::Context> ctx = obj->GetCreationContext().ToLocalChecked();
ctx->Enter();
v8::Local<v8::Value> baseProto = v8::Object::New(isolate)->GetPrototype();
ctx->Exit();
Expand Down
3 changes: 1 addition & 2 deletions src/util/macros.lzz
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ void SetPrototypeGetter(
0,
data,
v8::AccessControl::DEFAULT,
v8::PropertyAttribute::None,
v8::AccessorSignature::New(isolate, recv)
v8::PropertyAttribute::None
);
}

0 comments on commit 81aabad

Please sign in to comment.