diff --git a/deps/sqlcipher-amalgamation-3031000.tar.gz b/deps/sqlcipher-amalgamation-3031000.tar.gz old mode 100644 new mode 100755 diff --git a/package.json b/package.json index b81d645f..11003f6e 100644 --- a/package.json +++ b/package.json @@ -9,14 +9,10 @@ }, "binary": { "module_name": "node_sqlite3", - "module_path": "./lib/binding/napi-v{napi_build_version}-{platform}-{arch}", + "module_path": "./lib/binding/napi-v3-{platform}-{arch}", "host": "https://journeyapps-node-binary.s3.amazonaws.com", "remote_path": "./{name}/v{version}/{toolset}/", - "package_name": "napi-v{napi_build_version}-{platform}-{arch}.tar.gz", - "napi_versions": [ - 3, - 6 - ] + "package_name": "napi-v3-{platform}-{arch}.tar.gz" }, "contributors": [ "Konstantin Käfer ", diff --git a/src/database.cc b/src/database.cc index c8d125cb..62b22566 100644 --- a/src/database.cc +++ b/src/database.cc @@ -7,7 +7,7 @@ using namespace node_sqlite3; -#if NAPI_VERSION < 6 +#if NAPI_VERSION < 6 || TRUE Napi::FunctionReference Database::constructor; #endif @@ -26,7 +26,7 @@ Napi::Object Database::Init(Napi::Env env, Napi::Object exports) { InstanceAccessor("open", &Database::OpenGetter, nullptr) }); -#if NAPI_VERSION < 6 +#if NAPI_VERSION < 6 || TRUE constructor = Napi::Persistent(t); constructor.SuppressDestruct(); #else diff --git a/src/database.h b/src/database.h index ba8785ff..c1cf1e6b 100644 --- a/src/database.h +++ b/src/database.h @@ -21,7 +21,7 @@ class Database; class Database : public Napi::ObjectWrap { public: -#if NAPI_VERSION < 6 +#if NAPI_VERSION < 6 || TRUE static Napi::FunctionReference constructor; #endif static Napi::Object Init(Napi::Env env, Napi::Object exports); @@ -31,7 +31,7 @@ class Database : public Napi::ObjectWrap { Napi::HandleScope scope(env); if (!val.IsObject()) return false; Napi::Object obj = val.As(); -#if NAPI_VERSION < 6 +#if NAPI_VERSION < 6 || TRUE return obj.InstanceOf(constructor.Value()); #else Napi::FunctionReference* constructor =