Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated v8::Handle to upgrade to node@12 #23

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
remove deprecated v8::Handle to upgrade to node@12
the change is also needed for using electron 5.x: https://electronjs.org/blog/nodejs-native-addons-and-electron-5
  • Loading branch information
zy4 committed Jun 5, 2019
commit 78cd0beb7236b65d6dea9d75d6dffdbbe34a6327
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
"test": "mocha"
},
"dependencies": {
"bindings": "^1.4.0",
"nan": "^2.12.1"
"bindings": "^1.5.0",
"nan": "^2.14.0"
},
"devDependencies": {
"mocha": "^6.0.0",
"mocha": "^6.1.4",
"should": "^13.2.3",
"sinon": "^7.2.4"
"sinon": "^7.3.2"
},
"gypfile": true
}
2 changes: 1 addition & 1 deletion src/addon.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "pcsclite.h"
#include "cardreader.h"

void init_all(v8::Handle<v8::Object> target) {
void init_all(v8::Local<v8::Object> target) {
PCSCLite::init(target);
CardReader::init(target);
}
Expand Down
4 changes: 2 additions & 2 deletions src/cardreader.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class CardReader: public Nan::ObjectWrap {

public:

static void init(v8::Handle<v8::Object> target);
static void init(v8::Local<v8::Object> target);

const SCARDHANDLE& GetHandler() const { return m_card_handle; };

Expand Down Expand Up @@ -120,7 +120,7 @@ class CardReader: public Nan::ObjectWrap {
static void AfterTransmit(uv_work_t* req, int status);
static void AfterControl(uv_work_t* req, int status);

static v8::Handle<v8::Value> CreateBufferInstance(char* data, unsigned long size);
static v8::Local<v8::Value> CreateBufferInstance(char* data, unsigned long size);

private:

Expand Down
2 changes: 1 addition & 1 deletion src/pcsclite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace node;

Nan::Persistent<Function> PCSCLite::constructor;

void PCSCLite::init(Handle<Object> target) {
void PCSCLite::init(Local<Object> target) {

// Prepare constructor template
Local<FunctionTemplate> tpl = Nan::New<FunctionTemplate>(New);
Expand Down
2 changes: 1 addition & 1 deletion src/pcsclite.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class PCSCLite: public Nan::ObjectWrap {

public:

static void init(v8::Handle<v8::Object> target);
static void init(v8::Local<v8::Object> target);

private:

Expand Down