Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
, "node"
, "native"
]
, "engines": { "node": ">=0.6.0 <0.13" }
, "engines": { "node": ">= 11.7.0" }
, "main": "./lib/rrd"
, "scripts": {
"test": "cd test; make"
}
, "dependencies": {
"bindings": "*"
, "arguee": ">=0.0.2"
, "nan": ">=2.0.9"
, "nan": ">=2.14.1"
}
, "devDependencies": {
"mocha": ">=1.3.0"
Expand Down
4 changes: 2 additions & 2 deletions src/node_rrd.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ class AsyncInfos {

/* Some useful macros to extract arguments */
#define SET_CHARS_ARG(I, VAR) \
String::Utf8Value _chars ## I(info[I]->ToString()); \
Nan::Utf8String _chars ## I (info[I]); \
VAR = strndup(*_chars ## I, _chars ## I.length());

#define SET_ARGC_ARGV_ARG(I, VAR_ARGC, VAR_ARGV) \
Local<Array> argv ## I = Local<Array>::Cast(info[I]); \
VAR_ARGC = argv ## I->Length(); \
VAR_ARGV = (char**)malloc(sizeof(char*) * VAR_ARGC); \
for (int i = 0; i < VAR_ARGC; i++) { \
String::Utf8Value arg(argv ## I->Get(i)); \
Nan::Utf8String arg(argv ## I->Get(i)); \
VAR_ARGV[i] = strndup(*arg, arg.length()); \
}

Expand Down
4 changes: 2 additions & 2 deletions src/node_rrd_fetch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ static void async_after(uv_work_t *req) {
Local<Object> current_data_to_object(unsigned long ds_cnt, char ** ds_namv, rrd_value_t *data) {
Nan::EscapableHandleScope scope;

auto obj = ObjectTemplate::New();
auto result = obj->NewInstance();
auto obj = ObjectTemplate::New(v8::Isolate::GetCurrent());
auto result = obj->NewInstance(Nan::GetCurrentContext()).ToLocalChecked();

unsigned long ii;
rrd_value_t *datai;
Expand Down
4 changes: 2 additions & 2 deletions src/node_rrd_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ static void async_after(uv_work_t *req) {
static Local<Object>info_data_to_object(rrd_info_t *data) {
Nan::EscapableHandleScope scope;

auto info = ObjectTemplate::New();
auto instance = info->NewInstance();
auto info = ObjectTemplate::New(v8::Isolate::GetCurrent());
auto instance = info->NewInstance(Nan::GetCurrentContext()).ToLocalChecked();

while (data) {
v8::Local<v8::String> key = Nan::New<String>(data->key).ToLocalChecked();
Expand Down