Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.
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
20 changes: 3 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
language: node_js
sudo: false
env:
- CXX=g++-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8


before_install:
- node --version | grep -q 'v0.8' && npm install -g npm@2 || true

node_js:
- "6"
- "5"
- "4"
- "0.12"
- "0.10"
- "lts/erbium"
- "lts/dubnium"
- "stable"

notifications:
email: false
19 changes: 8 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@ init:

environment:
matrix:
- nodejs_version: 6
- nodejs_version: 5
- nodejs_version: 4
- nodejs_version: 0.12
- nodejs_version: 0.10

platform:
- x86
- x64
- nodejs_version: "lts/erbium"
- nodejs_version: "lts/dubnium"
- nodejs_version: "stable"

install:
- ps: Install-Product node $env:nodejs_version $env:platform
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
- set PATH=%APPDATA%\npm;%PATH%
- dir "C:\Program Files"
- dir "C:\Program Files (x86)"
- npm install
- git submodule update --init --recursive
- npm install --msvs_version=2013

build: off

Expand Down
2 changes: 1 addition & 1 deletion deps/hiredis
6 changes: 3 additions & 3 deletions src/reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static void *tryParentize(const redisReadTask *task, const Local<Value> &v) {
Local<Value> lvalue = Nan::New(r->handle[pidx]);
assert(lvalue->IsArray());
Local<Array> larray = lvalue.As<Array>();
larray->Set(task->idx,v);
Nan::Set(larray, task->idx, v);

/* Store the handle when this is an inner array. Otherwise, hiredis
* doesn't care about the return value as long as the value is set in
Expand Down Expand Up @@ -52,7 +52,7 @@ static void *createString(const redisReadTask *task, char *str, size_t len) {
Local<Value> v(r->createString(str,len));

if (task->type == REDIS_REPLY_ERROR)
v = Exception::Error(v->ToString());
v = Exception::Error(v->ToString(Nan::GetCurrentContext()).FromMaybe(v8::Local<v8::String>()));
return tryParentize(task,v);
}

Expand Down Expand Up @@ -191,7 +191,7 @@ NAN_METHOD(Reader::Feed) {
assert(redisReaderFeed(r->reader, data, length) == REDIS_OK);
} else if (info[0]->IsString()) {
Nan::Utf8String str(info[0].As<String>());
redisReplyReaderFeed(r->reader, *str, str.length());
redisReaderFeed(r->reader, *str, str.length());
} else {
Nan::ThrowError("Invalid argument");
}
Expand Down