Skip to content

Commit

Permalink
Add Nodejs 4/5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
syndbg committed May 23, 2017
1 parent c4622aa commit 399f229
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 135 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
Node v0.11.13 Now Supported
Node v4.x.x/5.x.x Now Supported
---------------------------

Many thanks to [Mário Freitas/imkira](https://github.com/imkira) for his work.
Currently maintained by [Anton Antonov/syndbg](https://github.com/syndbg).


Protobuf
--------

This is a fork of http://code.google.com/p/protobuf-for-node/

It now works with the NodeJS 0.8.x and 0.10.x series.
Works/worked with NodeJS versions:

* 0.8.x,
* 0.10.x,
* 4.x.x,
* 5.x.x

To install, just type:

Expand Down
3 changes: 1 addition & 2 deletions addon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
#include "protobuf_for_node.h"

void init(v8::Handle<v8::Object> target) {
target->Set(NanNew<v8::String>("Schema"), protobuf_for_node::SchemaConstructor());
target->Set(Nan::New<v8::String>("Schema").ToLocalChecked(), protobuf_for_node::SchemaConstructor());
}

NODE_MODULE(protobuf_for_node, init)

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"main": "./build/Release/protobuf_for_node",
"engines": {
"node": ">= 0.8.0 < 0.12"
"node": ">= 0.8.0"
},
"repository": {
"type": "git",
Expand All @@ -17,6 +17,6 @@
"test": "node test/unittest.js"
},
"dependencies": {
"nan": "~1.0.0"
"nan": "~2.1.0"
}
}
Loading

0 comments on commit 399f229

Please sign in to comment.