Skip to content

Commit 67d7c1c

Browse files
neoxpertArGeoph
authored andcommitted
Support builds for Electron v31 (WiseLibs#1200)
* replace v8::CopyablePersistentTraits with v8::Global * add Electron v31 to build tasks
1 parent f97bd19 commit 67d7c1c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
NO_V18_NODE_BUILD_CMD: npx --no-install prebuild -r node -t 20.0.0 -t 22.0.0 --include-regex 'better_sqlite3.node$'
2121
# See https://www.electronjs.org/docs/latest/tutorial/electron-timelines#version-support-policy
2222
# Electron v25 EOL = 2023-12-05. v26 EOL = 2024-02-20. v27 EOL = 2024-04-16. v28 EOL = 2024-06-11. v29 EOL = 2024-08-20.
23-
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$'
23+
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$'
2424

2525
jobs:
2626
test:

src/better_sqlite3.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <node_object_wrap.h>
2929
#include <node_buffer.h>
3030
#line 31 "./src/util/macros.lzz"
31-
template <class T> using CopyablePersistent = v8::Persistent<T, v8::CopyablePersistentTraits<T>>;
31+
template <class T> using CopyablePersistent = v8::Global<T>;
3232
#line 144 "./src/util/macros.lzz"
3333
void SetPrototypeGetter(
3434
v8::Isolate* isolate,

src/util/macros.lzz

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ inline v8::Local<v8::String> InternalizedFromLatin1(v8::Isolate* isolate, const
2828
}
2929

3030
#hdr
31-
template <class T> using CopyablePersistent = v8::Persistent<T, v8::CopyablePersistentTraits<T>>;
31+
template <class T> using CopyablePersistent = v8::Global<T>;
3232
#end
3333
inline void SetFrozen(v8::Isolate* isolate, v8::Local<v8::Context> ctx, v8::Local<v8::Object> obj, CopyablePersistent<v8::String>& key, v8::Local<v8::Value> value) {
3434
obj->DefineOwnProperty(ctx, key.Get(isolate), value, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly)).FromJust();

0 commit comments

Comments
 (0)