better-sqlite3-multiple-ciphers 12.10.0 → 12.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,9 +31,9 @@
31
31
 
32
32
  #define SQLITE3MC_VERSION_MAJOR 2
33
33
  #define SQLITE3MC_VERSION_MINOR 3
34
- #define SQLITE3MC_VERSION_RELEASE 4
34
+ #define SQLITE3MC_VERSION_RELEASE 5
35
35
  #define SQLITE3MC_VERSION_SUBRELEASE 0
36
- #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.3.4"
36
+ #define SQLITE3MC_VERSION_STRING "SQLite3 Multiple Ciphers 2.3.5"
37
37
 
38
38
  #endif /* SQLITE3MC_VERSION_H_ */
39
39
  /*** End of #include "sqlite3mc_version.h" ***/
@@ -192,12 +192,12 @@ extern "C" {
192
192
  ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
193
193
  ** [sqlite_version()] and [sqlite_source_id()].
194
194
  */
195
- #define SQLITE_VERSION "3.53.1"
196
- #define SQLITE_VERSION_NUMBER 3053001
197
- #define SQLITE_SOURCE_ID "2026-05-05 10:34:17 c88b22011a54b4f6fbd149e9f8e4de77658ce58143a1af0e3785e4e6475127e9"
195
+ #define SQLITE_VERSION "3.53.2"
196
+ #define SQLITE_VERSION_NUMBER 3053002
197
+ #define SQLITE_SOURCE_ID "2026-06-03 19:12:13 d6e03d8c777cfa2d35e3b60d8ec3e0187f3e9f99d8e2ee9cac695fd6fcdf1a24"
198
198
  #define SQLITE_SCM_BRANCH "branch-3.53"
199
- #define SQLITE_SCM_TAGS "release version-3.53.1"
200
- #define SQLITE_SCM_DATETIME "2026-05-05T10:34:17.344Z"
199
+ #define SQLITE_SCM_TAGS "release version-3.53.2"
200
+ #define SQLITE_SCM_DATETIME "2026-06-03T19:12:13.350Z"
201
201
 
202
202
  /*
203
203
  ** CAPI3REF: Run-Time Library Version Numbers
@@ -12899,11 +12899,23 @@ SQLITE_API int sqlite3changeset_apply_v3(
12899
12899
  ** database behave as if they were declared with "ON UPDATE NO ACTION ON
12900
12900
  ** DELETE NO ACTION", even if they are actually CASCADE, RESTRICT, SET NULL
12901
12901
  ** or SET DEFAULT.
12902
+ **
12903
+ ** <dt>SQLITE_CHANGESETAPPLY_NOUPDATELOOP <dd>
12904
+ ** Sometimes, a changeset contains two or more update statements such that
12905
+ ** although after applying all updates the database will contain no
12906
+ ** constraint violations, no single update can be applied before the others.
12907
+ ** The simplest example of this is a pair of UPDATEs that have "swapped"
12908
+ ** two column values with a UNIQUE constraint.
12909
+ ** <p>
12910
+ ** Usually, sqlite3changeset_apply() and similar functions work hard to try
12911
+ ** to find a way to apply such a changeset. However, if this flag is set,
12912
+ ** then all such updates are considered CONSTRAINT conflicts.
12902
12913
  */
12903
12914
  #define SQLITE_CHANGESETAPPLY_NOSAVEPOINT 0x0001
12904
12915
  #define SQLITE_CHANGESETAPPLY_INVERT 0x0002
12905
12916
  #define SQLITE_CHANGESETAPPLY_IGNORENOOP 0x0004
12906
12917
  #define SQLITE_CHANGESETAPPLY_FKNOACTION 0x0008
12918
+ #define SQLITE_CHANGESETAPPLY_NOUPDATELOOP 0x0010
12907
12919
 
12908
12920
  /*
12909
12921
  ** CAPI3REF: Constants Passed To The Conflict Handler
@@ -21,8 +21,8 @@
21
21
  # ===
22
22
 
23
23
  YEAR="2026"
24
- VERSION="3530100"
25
- SQLITE3MC_VERSION="v2.3.4"
24
+ VERSION="3530200"
25
+ SQLITE3MC_VERSION="v2.3.5"
26
26
 
27
27
  # Defines below are sorted alphabetically
28
28
  DEFINES="
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-sqlite3-multiple-ciphers",
3
- "version": "12.10.0",
3
+ "version": "12.11.1",
4
4
  "description": "better-sqlite3 with multiple-cipher encryption support",
5
5
  "homepage": "https://github.com/m4heshd/better-sqlite3-multiple-ciphers",
6
6
  "author": "Mahesh Bandara Wijerathna (m4heshd) <m4heshd@gmail.com>",
@@ -57,7 +57,7 @@ NODE_MODULE_INIT(/* exports, context */) {
57
57
 
58
58
  // Initialize addon instance.
59
59
  Addon* addon = new Addon(isolate);
60
- v8::Local<v8::External> data = v8::External::New(isolate, addon);
60
+ v8::Local<v8::External> data = EXTERNAL_NEW(isolate, addon);
61
61
  node::AddEnvironmentCleanupHook(isolate, Addon::Cleanup, addon);
62
62
 
63
63
  // Create and export native-backed classes and functions.
@@ -1,109 +1,109 @@
1
- inline v8::Local<v8::String> StringFromUtf8(v8::Isolate* isolate, const char* data, int length) {
2
- return v8::String::NewFromUtf8(isolate, data, v8::NewStringType::kNormal, length).ToLocalChecked();
3
- }
4
-
5
- inline v8::Local<v8::String> InternalizedFromUtf8(v8::Isolate* isolate, const char* data, int length) {
6
- return v8::String::NewFromUtf8(isolate, data, v8::NewStringType::kInternalized, length).ToLocalChecked();
7
- }
8
-
9
- inline v8::Local<v8::Value> InternalizedFromUtf8OrNull(v8::Isolate* isolate, const char* data, int length) {
10
- if (data == NULL) return v8::Null(isolate);
11
- return InternalizedFromUtf8(isolate, data, length);
12
- }
13
-
14
- inline v8::Local<v8::String> InternalizedFromLatin1(v8::Isolate* isolate, const char* str) {
15
- return v8::String::NewFromOneByte(isolate, reinterpret_cast<const uint8_t*>(str), v8::NewStringType::kInternalized).ToLocalChecked();
16
- }
17
-
18
- inline void SetFrozen(v8::Isolate* isolate, v8::Local<v8::Context> ctx, v8::Local<v8::Object> obj, v8::Global<v8::String>& key, v8::Local<v8::Value> value) {
19
- obj->DefineOwnProperty(ctx, key.Get(isolate), value, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly)).FromJust();
20
- }
21
-
22
- void ThrowError(const char* message) { EasyIsolate; isolate->ThrowException(v8::Exception::Error(StringFromUtf8(isolate, message, -1))); }
23
- void ThrowTypeError(const char* message) { EasyIsolate; isolate->ThrowException(v8::Exception::TypeError(StringFromUtf8(isolate, message, -1))); }
24
- void ThrowRangeError(const char* message) { EasyIsolate; isolate->ThrowException(v8::Exception::RangeError(StringFromUtf8(isolate, message, -1))); }
25
-
26
- // Determines whether to skip the given character at the start of an SQL string.
27
- inline bool IS_SKIPPED(char c) {
28
- return c == ' ' || c == ';' || (c >= '\t' && c <= '\r');
29
- }
30
-
31
- // Allocates an empty array, without calling constructors/initializers.
32
- template<class T> inline T* ALLOC_ARRAY(size_t count) {
33
- return static_cast<T*>(::operator new[](count * sizeof(T)));
34
- }
35
-
36
- // Deallocates an array, without calling destructors.
37
- template<class T> inline void FREE_ARRAY(T* array_pointer) {
38
- ::operator delete[](array_pointer);
39
- }
40
-
41
- v8::Local<v8::FunctionTemplate> NewConstructorTemplate(
42
- v8::Isolate* isolate,
43
- v8::Local<v8::External> data,
44
- v8::FunctionCallback func,
45
- const char* name
46
- ) {
47
- v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(isolate, func, data);
48
- t->InstanceTemplate()->SetInternalFieldCount(1);
49
- t->SetClassName(InternalizedFromLatin1(isolate, name));
50
- return t;
51
- }
52
-
53
- void SetPrototypeMethod(
54
- v8::Isolate* isolate,
55
- v8::Local<v8::External> data,
56
- v8::Local<v8::FunctionTemplate> recv,
57
- const char* name,
58
- v8::FunctionCallback func
59
- ) {
60
- v8::HandleScope scope(isolate);
61
- recv->PrototypeTemplate()->Set(
62
- InternalizedFromLatin1(isolate, name),
63
- v8::FunctionTemplate::New(isolate, func, data, v8::Signature::New(isolate, recv))
64
- );
65
- }
66
-
67
- void SetPrototypeSymbolMethod(
68
- v8::Isolate* isolate,
69
- v8::Local<v8::External> data,
70
- v8::Local<v8::FunctionTemplate> recv,
71
- v8::Local<v8::Symbol> symbol,
72
- v8::FunctionCallback func
73
- ) {
74
- v8::HandleScope scope(isolate);
75
- recv->PrototypeTemplate()->Set(
76
- symbol,
77
- v8::FunctionTemplate::New(isolate, func, data, v8::Signature::New(isolate, recv))
78
- );
79
- }
80
-
81
- void SetPrototypeGetter(
82
- v8::Isolate* isolate,
83
- v8::Local<v8::External> data,
84
- v8::Local<v8::FunctionTemplate> recv,
85
- const char* name,
86
- v8::AccessorNameGetterCallback func
87
- ) {
88
- v8::HandleScope scope(isolate);
89
- recv->InstanceTemplate()->SetNativeDataProperty(
90
- InternalizedFromLatin1(isolate, name),
91
- func,
92
- 0,
93
- data
94
- );
95
- }
96
-
97
- #if defined(V8_ENABLE_SANDBOX)
98
- // When V8 Sandbox is enabled (in newer Electron versions), we need to use Buffer::Copy
99
- // instead of Buffer::New to ensure the ArrayBuffer backing store is allocated inside the sandbox
100
- static inline v8::MaybeLocal<v8::Object> BufferSandboxNew(v8::Isolate* isolate, char* data, size_t length, void (*finalizeCallback)(char*, void*), void* finalizeHint) {
101
- v8::MaybeLocal<v8::Object> buffer = node::Buffer::Copy(isolate, data, length);
102
- finalizeCallback(data, finalizeHint);
103
- return buffer;
104
- }
105
- #define SAFE_NEW_BUFFER(env, data, length, finalizeCallback, finalizeHint) BufferSandboxNew(env, data, length, finalizeCallback, finalizeHint)
106
- #else
107
- // When V8 Sandbox is not enabled, we can use the more efficient Buffer::New
108
- #define SAFE_NEW_BUFFER(env, data, length, finalizeCallback, finalizeHint) node::Buffer::New(env, data, length, finalizeCallback, finalizeHint)
109
- #endif
1
+ inline v8::Local<v8::String> StringFromUtf8(v8::Isolate* isolate, const char* data, int length) {
2
+ return v8::String::NewFromUtf8(isolate, data, v8::NewStringType::kNormal, length).ToLocalChecked();
3
+ }
4
+
5
+ inline v8::Local<v8::String> InternalizedFromUtf8(v8::Isolate* isolate, const char* data, int length) {
6
+ return v8::String::NewFromUtf8(isolate, data, v8::NewStringType::kInternalized, length).ToLocalChecked();
7
+ }
8
+
9
+ inline v8::Local<v8::Value> InternalizedFromUtf8OrNull(v8::Isolate* isolate, const char* data, int length) {
10
+ if (data == NULL) return v8::Null(isolate);
11
+ return InternalizedFromUtf8(isolate, data, length);
12
+ }
13
+
14
+ inline v8::Local<v8::String> InternalizedFromLatin1(v8::Isolate* isolate, const char* str) {
15
+ return v8::String::NewFromOneByte(isolate, reinterpret_cast<const uint8_t*>(str), v8::NewStringType::kInternalized).ToLocalChecked();
16
+ }
17
+
18
+ inline void SetFrozen(v8::Isolate* isolate, v8::Local<v8::Context> ctx, v8::Local<v8::Object> obj, v8::Global<v8::String>& key, v8::Local<v8::Value> value) {
19
+ obj->DefineOwnProperty(ctx, key.Get(isolate), value, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly)).FromJust();
20
+ }
21
+
22
+ void ThrowError(const char* message) { EasyIsolate; isolate->ThrowException(v8::Exception::Error(StringFromUtf8(isolate, message, -1))); }
23
+ void ThrowTypeError(const char* message) { EasyIsolate; isolate->ThrowException(v8::Exception::TypeError(StringFromUtf8(isolate, message, -1))); }
24
+ void ThrowRangeError(const char* message) { EasyIsolate; isolate->ThrowException(v8::Exception::RangeError(StringFromUtf8(isolate, message, -1))); }
25
+
26
+ // Determines whether to skip the given character at the start of an SQL string.
27
+ inline bool IS_SKIPPED(char c) {
28
+ return c == ' ' || c == ';' || (c >= '\t' && c <= '\r');
29
+ }
30
+
31
+ // Allocates an empty array, without calling constructors/initializers.
32
+ template<class T> inline T* ALLOC_ARRAY(size_t count) {
33
+ return static_cast<T*>(::operator new[](count * sizeof(T)));
34
+ }
35
+
36
+ // Deallocates an array, without calling destructors.
37
+ template<class T> inline void FREE_ARRAY(T* array_pointer) {
38
+ ::operator delete[](array_pointer);
39
+ }
40
+
41
+ v8::Local<v8::FunctionTemplate> NewConstructorTemplate(
42
+ v8::Isolate* isolate,
43
+ v8::Local<v8::External> data,
44
+ v8::FunctionCallback func,
45
+ const char* name
46
+ ) {
47
+ v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(isolate, func, data);
48
+ t->InstanceTemplate()->SetInternalFieldCount(1);
49
+ t->SetClassName(InternalizedFromLatin1(isolate, name));
50
+ return t;
51
+ }
52
+
53
+ void SetPrototypeMethod(
54
+ v8::Isolate* isolate,
55
+ v8::Local<v8::External> data,
56
+ v8::Local<v8::FunctionTemplate> recv,
57
+ const char* name,
58
+ v8::FunctionCallback func
59
+ ) {
60
+ v8::HandleScope scope(isolate);
61
+ recv->PrototypeTemplate()->Set(
62
+ InternalizedFromLatin1(isolate, name),
63
+ v8::FunctionTemplate::New(isolate, func, data, v8::Signature::New(isolate, recv))
64
+ );
65
+ }
66
+
67
+ void SetPrototypeSymbolMethod(
68
+ v8::Isolate* isolate,
69
+ v8::Local<v8::External> data,
70
+ v8::Local<v8::FunctionTemplate> recv,
71
+ v8::Local<v8::Symbol> symbol,
72
+ v8::FunctionCallback func
73
+ ) {
74
+ v8::HandleScope scope(isolate);
75
+ recv->PrototypeTemplate()->Set(
76
+ symbol,
77
+ v8::FunctionTemplate::New(isolate, func, data, v8::Signature::New(isolate, recv))
78
+ );
79
+ }
80
+
81
+ void SetPrototypeGetter(
82
+ v8::Isolate* isolate,
83
+ v8::Local<v8::External> data,
84
+ v8::Local<v8::FunctionTemplate> recv,
85
+ const char* name,
86
+ v8::AccessorNameGetterCallback func
87
+ ) {
88
+ v8::HandleScope scope(isolate);
89
+ recv->InstanceTemplate()->SetNativeDataProperty(
90
+ InternalizedFromLatin1(isolate, name),
91
+ func,
92
+ nullptr,
93
+ data
94
+ );
95
+ }
96
+
97
+ #if defined(V8_ENABLE_SANDBOX)
98
+ // When V8 Sandbox is enabled (in newer Electron versions), we need to use Buffer::Copy
99
+ // instead of Buffer::New to ensure the ArrayBuffer backing store is allocated inside the sandbox
100
+ static inline v8::MaybeLocal<v8::Object> BufferSandboxNew(v8::Isolate* isolate, char* data, size_t length, void (*finalizeCallback)(char*, void*), void* finalizeHint) {
101
+ v8::MaybeLocal<v8::Object> buffer = node::Buffer::Copy(isolate, data, length);
102
+ finalizeCallback(data, finalizeHint);
103
+ return buffer;
104
+ }
105
+ #define SAFE_NEW_BUFFER(env, data, length, finalizeCallback, finalizeHint) BufferSandboxNew(env, data, length, finalizeCallback, finalizeHint)
106
+ #else
107
+ // When V8 Sandbox is not enabled, we can use the more efficient Buffer::New
108
+ #define SAFE_NEW_BUFFER(env, data, length, finalizeCallback, finalizeHint) node::Buffer::New(env, data, length, finalizeCallback, finalizeHint)
109
+ #endif
@@ -27,7 +27,14 @@
27
27
  #define EasyIsolate v8::Isolate* isolate = v8::Isolate::GetCurrent()
28
28
  #define OnlyIsolate info.GetIsolate()
29
29
  #define OnlyContext isolate->GetCurrentContext()
30
- #define OnlyAddon static_cast<Addon*>(info.Data().As<v8::External>()->Value())
30
+ #if defined(NODE_MODULE_VERSION) && NODE_MODULE_VERSION >= 146
31
+ #define EXTERNAL_NEW(isolate, value) v8::External::New((isolate), (value), 0)
32
+ #define EXTERNAL_VALUE(value) (value)->Value(0)
33
+ #else
34
+ #define EXTERNAL_NEW(isolate, value) v8::External::New((isolate), (value))
35
+ #define EXTERNAL_VALUE(value) (value)->Value()
36
+ #endif
37
+ #define OnlyAddon static_cast<Addon*>(EXTERNAL_VALUE(info.Data().As<v8::External>()))
31
38
  #define UseIsolate v8::Isolate* isolate = OnlyIsolate
32
39
  #define UseContext v8::Local<v8::Context> ctx = OnlyContext
33
40
  #define UseAddon Addon* addon = OnlyAddon