From f63559775d84fe460812ae3b6ce1707925e35da3 Mon Sep 17 00:00:00 2001 From: davidvujic Date: Mon, 24 Sep 2018 22:09:15 +0200 Subject: [PATCH 1/5] fix: remove deprecated v8 feature --- src/node-zk.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/node-zk.cpp b/src/node-zk.cpp index 8e114e2e..b0bd35ca 100644 --- a/src/node-zk.cpp +++ b/src/node-zk.cpp @@ -6,7 +6,6 @@ #include #include #include -#include using namespace v8; using namespace node; #undef THREADED From 4b96e1eaedafcb33b1c39d495fbae9511ea7058d Mon Sep 17 00:00:00 2001 From: davidvujic Date: Mon, 24 Sep 2018 22:10:05 +0200 Subject: [PATCH 2/5] update deps --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c4f2e60a..1c955ec7 100644 --- a/package.json +++ b/package.json @@ -20,12 +20,12 @@ } ,"keywords": ["apache", "zookeeper", "client"] ,"dependencies": { - "async": "~2.1.4" - ,"nan": "~2.5.0" - ,"lodash": "~4.17.2" + "async": "~2.6.1" + ,"nan": "~2.11.0" + ,"lodash": "~4.17.11" } ,"devDependencies": { - "log4js": "~1.0.1" + "log4js": "~3.0.5" ,"webworker": ">=0.8.4" } ,"main": "lib/index" From da613744b1ac328e8e08c91d3378c58c7e0e5a2b Mon Sep 17 00:00:00 2001 From: davidvujic Date: Mon, 24 Sep 2018 22:14:06 +0200 Subject: [PATCH 3/5] fix: ForceSet deprecation warnings --- src/node-zk.cpp | 54 ++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/node-zk.cpp b/src/node-zk.cpp index b0bd35ca..58e9b9ec 100644 --- a/src/node-zk.cpp +++ b/src/node-zk.cpp @@ -129,24 +129,24 @@ class ZooKeeper: public Nan::ObjectWrap { //extern ZOOAPI struct ACL_vector ZOO_OPEN_ACL_UNSAFE; Local acl_open = Nan::New(); - Nan::ForceSet(acl_open, LOCAL_STRING("perms"), Nan::New(ZOO_PERM_ALL), static_cast(ReadOnly | DontDelete)); - Nan::ForceSet(acl_open, LOCAL_STRING("scheme"), LOCAL_STRING("world"), static_cast(ReadOnly | DontDelete)); - Nan::ForceSet(acl_open, LOCAL_STRING("auth"), LOCAL_STRING("anyone"), static_cast(ReadOnly | DontDelete)); - Nan::ForceSet(constructor, LOCAL_STRING("ZOO_OPEN_ACL_UNSAFE"), acl_open, static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(acl_open, LOCAL_STRING("perms"), Nan::New(ZOO_PERM_ALL), static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(acl_open, LOCAL_STRING("scheme"), LOCAL_STRING("world"), static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(acl_open, LOCAL_STRING("auth"), LOCAL_STRING("anyone"), static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(constructor, LOCAL_STRING("ZOO_OPEN_ACL_UNSAFE"), acl_open, static_cast(ReadOnly | DontDelete)); //extern ZOOAPI struct ACL_vector ZOO_READ_ACL_UNSAFE; Local acl_read = Nan::New(); - Nan::ForceSet(acl_read, LOCAL_STRING("perms"), Nan::New(ZOO_PERM_READ), static_cast(ReadOnly | DontDelete)); - Nan::ForceSet(acl_read, LOCAL_STRING("scheme"), LOCAL_STRING("world"), static_cast(ReadOnly | DontDelete)); - Nan::ForceSet(acl_read, LOCAL_STRING("auth"), LOCAL_STRING("anyone"), static_cast(ReadOnly | DontDelete)); - Nan::ForceSet(constructor, LOCAL_STRING("ZOO_READ_ACL_UNSAFE"), acl_read, static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(acl_read, LOCAL_STRING("perms"), Nan::New(ZOO_PERM_READ), static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(acl_read, LOCAL_STRING("scheme"), LOCAL_STRING("world"), static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(acl_read, LOCAL_STRING("auth"), LOCAL_STRING("anyone"), static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(constructor, LOCAL_STRING("ZOO_READ_ACL_UNSAFE"), acl_read, static_cast(ReadOnly | DontDelete)); //extern ZOOAPI struct ACL_vector ZOO_CREATOR_ALL_ACL; Local acl_creator = Nan::New(); - Nan::ForceSet(acl_creator, LOCAL_STRING("perms"), Nan::New(ZOO_PERM_ALL), static_cast(ReadOnly | DontDelete)); - Nan::ForceSet(acl_creator, LOCAL_STRING("scheme"), LOCAL_STRING("auth"), static_cast(ReadOnly | DontDelete)); - Nan::ForceSet(acl_creator, LOCAL_STRING("auth"), LOCAL_STRING(""), static_cast(ReadOnly | DontDelete)); - Nan::ForceSet(constructor, LOCAL_STRING("ZOO_CREATOR_ALL_ACL"), acl_creator, static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(acl_creator, LOCAL_STRING("perms"), Nan::New(ZOO_PERM_ALL), static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(acl_creator, LOCAL_STRING("scheme"), LOCAL_STRING("auth"), static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(acl_creator, LOCAL_STRING("auth"), LOCAL_STRING(""), static_cast(ReadOnly | DontDelete)); + Nan::DefineOwnProperty(constructor, LOCAL_STRING("ZOO_CREATOR_ALL_ACL"), acl_creator, static_cast(ReadOnly | DontDelete)); NODE_DEFINE_CONSTANT(constructor, ZOO_CREATED_EVENT); @@ -641,18 +641,18 @@ class ZooKeeper: public Nan::ObjectWrap { Local createStatObject (const struct Stat *stat) { Nan::EscapableHandleScope scope; Local o = Nan::New(); - Nan::ForceSet(o, LOCAL_STRING("czxid"), Nan::New(stat->czxid), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("mzxid"), Nan::New(stat->mzxid), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("pzxid"), Nan::New(stat->pzxid), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("dataLength"), Nan::New(stat->dataLength), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("numChildren"), Nan::New(stat->numChildren), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("version"), Nan::New(stat->version), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("cversion"), Nan::New(stat->cversion), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("aversion"), Nan::New(stat->aversion), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("ctime"), NODE_UNIXTIME_V8(stat->ctime/1000.), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("mtime"), NODE_UNIXTIME_V8(stat->mtime/1000.), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("ephemeralOwner"), idAsString(stat->ephemeralOwner), ReadOnly); - Nan::ForceSet(o, LOCAL_STRING("createdInThisSession"), Nan::New(myid.client_id == stat->ephemeralOwner), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("czxid"), Nan::New(stat->czxid), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("mzxid"), Nan::New(stat->mzxid), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("pzxid"), Nan::New(stat->pzxid), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("dataLength"), Nan::New(stat->dataLength), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("numChildren"), Nan::New(stat->numChildren), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("version"), Nan::New(stat->version), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("cversion"), Nan::New(stat->cversion), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("aversion"), Nan::New(stat->aversion), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("ctime"), NODE_UNIXTIME_V8(stat->ctime/1000.), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("mtime"), NODE_UNIXTIME_V8(stat->mtime/1000.), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("ephemeralOwner"), idAsString(stat->ephemeralOwner), ReadOnly); + Nan::DefineOwnProperty(o, LOCAL_STRING("createdInThisSession"), Nan::New(myid.client_id == stat->ephemeralOwner), ReadOnly); return scope.Escape(o); } @@ -871,9 +871,9 @@ class ZooKeeper: public Nan::ObjectWrap { struct ACL *acl = &aclv->data[i]; Local obj = Nan::New(); - Nan::ForceSet(obj, LOCAL_STRING("perms"), Nan::New(acl->perms), ReadOnly); - Nan::ForceSet(obj, LOCAL_STRING("scheme"), LOCAL_STRING(acl->id.scheme), ReadOnly); - Nan::ForceSet(obj, LOCAL_STRING("auth"), LOCAL_STRING(acl->id.id), ReadOnly); + Nan::DefineOwnProperty(obj, LOCAL_STRING("perms"), Nan::New(acl->perms), ReadOnly); + Nan::DefineOwnProperty(obj, LOCAL_STRING("scheme"), LOCAL_STRING(acl->id.scheme), ReadOnly); + Nan::DefineOwnProperty(obj, LOCAL_STRING("auth"), LOCAL_STRING(acl->id.id), ReadOnly); arr->Set(i, obj); } From a97d1f3d03e642776e864638ed30aae7efb7a2b1 Mon Sep 17 00:00:00 2001 From: davidvujic Date: Mon, 24 Sep 2018 22:25:43 +0200 Subject: [PATCH 4/5] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c955ec7..3cfbc02f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zookeeper" ,"description": "apache zookeeper client (zookeeper async API >= 3.4.0)" - ,"version": "3.4.9-3" + ,"version": "3.4.9-4" ,"author": "Yuri Finkelstein " ,"contributors": [ "Yuri Finkelstein " From 2c994c6fa929801c643405b4e2160766b35753df Mon Sep 17 00:00:00 2001 From: davidvujic Date: Wed, 16 Jan 2019 10:27:11 +0100 Subject: [PATCH 5/5] fix: add node versions to CI build --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 90f5a480..ae0362db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ language: node_js node_js: + - "10" + - "9" + - "8" - "7" - "6" - "5"