Skip to content

Commit

Permalink
Add support for Node 12
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Apr 25, 2019
1 parent 0f86a0a commit da10866
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -17,6 +17,12 @@ jobs:
- stage: platform-test
node_js: "node"
os: osx
- stage: platform-test
node_js: "11"
os: linux
- stage: platform-test
node_js: "11"
os: osx
- stage: platform-test
node_js: "10"
os: linux
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## v4.12.0

https://github.com/sass/node-sass/releases/tag/v4.12.0

## v4.11.0

https://github.com/sass/node-sass/releases/tag/v4.11.0
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -4,6 +4,7 @@

NodeJS | Minimum node-sass version | Node Module
--------|--------------------------|------------
Node 12 | 4.12+ | 72
Node 11 | 4.10+ | 67
Node 10 | 4.9+ | 64
Node 8 | 4.5.3+ | 57
Expand Down
8 changes: 7 additions & 1 deletion appveyor.yml
Expand Up @@ -73,6 +73,9 @@
- nodejs_version: 11
GYP_MSVS_VERSION: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- nodejs_version: 12
GYP_MSVS_VERSION: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

install:
- ps: Install-Product node $env:nodejs_version $env:platform
Expand Down Expand Up @@ -166,7 +169,10 @@
- nodejs_version: 11
GYP_MSVS_VERSION: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

- nodejs_version: 12
GYP_MSVS_VERSION: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

install:
- ps: Install-Product node $env:nodejs_version $env:platform
- node --version
Expand Down
1 change: 1 addition & 0 deletions lib/extensions.js
Expand Up @@ -77,6 +77,7 @@ function getHumanNodeVersion(abi) {
case 59: return 'Node.js 9.x';
case 64: return 'Node.js 10.x';
case 67: return 'Node.js 11.x';
case 72: return 'Node.js 12.x';
default: return false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/create_string.cpp
Expand Up @@ -5,7 +5,7 @@

char* create_string(Nan::MaybeLocal<v8::Value> maybevalue) {
v8::Local<v8::Value> value;

if (maybevalue.ToLocal(&value)) {
if (value->IsNull() || !value->IsString()) {
return 0;
Expand All @@ -14,7 +14,7 @@ char* create_string(Nan::MaybeLocal<v8::Value> maybevalue) {
return 0;
}

v8::String::Utf8Value string(value);
Nan::Utf8String string(value);
char *str = (char *)malloc(string.length() + 1);
strcpy(str, *string);
return str;
Expand Down

0 comments on commit da10866

Please sign in to comment.