Browse files

pull version from package.json

Ensures that version exported matches the installed module.

Conflicts:
	src/libxmljs.h
  • Loading branch information...
1 parent 95c614c commit 51e63d68a462b30185d484de1487774f3a3ba958 @defunctzombie defunctzombie committed Oct 10, 2012
Showing with 1 addition and 6 deletions.
  1. +1 −1 index.js
  2. +0 −3 src/libxmljs.cc
  3. +0 −2 src/libxmljs.h
View
2 index.js
@@ -13,7 +13,7 @@ module.exports.parseXml = Document.fromXml;
module.exports.parseHtml = Document.fromHtml;
// constants
-module.exports.version = bindings.version;
+module.exports.version = require('./package.json').version;
module.exports.libxml_version = bindings.libxml_version;
module.exports.libxml_parser_version = bindings.libxml_parser_version;
module.exports.libxml_debug_enabled = bindings.libxml_debug_enabled;
View
3 src/libxmljs.cc
@@ -125,9 +125,6 @@ init(v8::Handle<v8::Object> target)
XmlDocument::Initialize(target);
XmlSaxParser::Initialize(target);
- target->Set(v8::String::NewSymbol("version"),
- v8::String::New(LIBXMLJS_VERSION));
-
target->Set(v8::String::NewSymbol("libxml_version"),
v8::String::New(LIBXML_DOTTED_VERSION));
View
2 src/libxmljs.h
@@ -5,8 +5,6 @@
#include <v8.h>
#include <node.h>
-#define LIBXMLJS_VERSION "0.6.1"
-
#define LIBXMLJS_ARGUMENT_TYPE_CHECK(arg, type, err) \
if (!arg->type()) { \
v8::Local<v8::Value> exception = v8::Exception::TypeError( \

0 comments on commit 51e63d6

Please sign in to comment.