From 5f4d5c99ef89ec32951164cdf79f06dbc09472ca Mon Sep 17 00:00:00 2001 From: Mahesh Bandara Wijerathna Date: Thu, 13 Jun 2024 12:46:50 +0530 Subject: [PATCH] Support builds for Electron v31 * replace v8::CopyablePersistentTraits with v8::Global * add Electron v31 to build tasks Co-authored-by: neoxpert <18628980+neoxpert@users.noreply.github.com> --- .github/workflows/prebuild.yml | 2 +- src/better_sqlite3.hpp | 2 +- src/util/macros.lzz | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index a33a048c..20757169 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -7,7 +7,7 @@ on: env: NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 22.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }} - ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }} + ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 -t 31.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }} jobs: prebuild: diff --git a/src/better_sqlite3.hpp b/src/better_sqlite3.hpp index dc540dcb..99e8751b 100644 --- a/src/better_sqlite3.hpp +++ b/src/better_sqlite3.hpp @@ -17,7 +17,7 @@ #include #include #line 31 "./src/util/macros.lzz" -template using CopyablePersistent = v8::Persistent>; +template using CopyablePersistent = v8::Global; #line 144 "./src/util/macros.lzz" void SetPrototypeGetter( v8::Isolate* isolate, diff --git a/src/util/macros.lzz b/src/util/macros.lzz index 31b9850c..4763b3c3 100644 --- a/src/util/macros.lzz +++ b/src/util/macros.lzz @@ -28,7 +28,7 @@ inline v8::Local InternalizedFromLatin1(v8::Isolate* isolate, const } #hdr -template using CopyablePersistent = v8::Persistent>; +template using CopyablePersistent = v8::Global; #end inline void SetFrozen(v8::Isolate* isolate, v8::Local ctx, v8::Local obj, CopyablePersistent& key, v8::Local value) { obj->DefineOwnProperty(ctx, key.Get(isolate), value, static_cast(v8::DontDelete | v8::ReadOnly)).FromJust();