Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Add support for Node 12 #2633

Merged
merged 7 commits into from
Apr 26, 2019
Merged
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
24 changes: 15 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
- stage: platform-test
node_js: "node"
os: osx
- stage: platform-test
node_js: "11"
os: linux
xzyfer marked this conversation as resolved.
Show resolved Hide resolved
- stage: platform-test
node_js: "11"
os: osx
- stage: platform-test
node_js: "10"
xzyfer marked this conversation as resolved.
Show resolved Hide resolved
os: linux
Expand All @@ -30,28 +36,28 @@ jobs:
node_js: "9"
os: osx
- stage: platform-test
node_js: "7"
node_js: "8"
os: linux
- stage: platform-test
node_js: "7"
node_js: "8"
os: osx
- stage: platform-test
node_js: "lts/carbon"
node_js: "7"
os: linux
- stage: platform-test
node_js: "lts/carbon"
node_js: "7"
os: osx
- stage: platform-test
node_js: "lts/boron"
node_js: "6"
os: linux
- stage: platform-test
node_js: "lts/boron"
node_js: "6"
os: osx
- stage: platform-test
node_js: "lts/argon"
node_js: "4"
os: linux
- stage: platform-test
node_js: "lts/argon"
node_js: "4"
os: osx
- stage: platform-test
node_js: "0.12"
Expand All @@ -74,7 +80,7 @@ before_install:
- echo $TRAVIS_NODE_VERSION
- npm config set python `which python`
- if [ $TRAVIS_OS_NAME == "linux" ]; then
if [[ $(node -v) =~ v1[01] ]]; then
if [[ $(node -v) =~ v[1-9][0-9] ]]; then
export CC="gcc-4.9";
export CXX="g++-4.9";
export LINK="gcc-4.9";
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
30 changes: 19 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,18 @@
GYP_MSVS_VERSION: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- nodejs_version: 10
GYP_MSVS_VERSION: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
GYP_MSVS_VERSION: 2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- nodejs_version: 11
GYP_MSVS_VERSION: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
GYP_MSVS_VERSION: 2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- nodejs_version: 12
GYP_MSVS_VERSION: 2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017

install:
- ps: Install-Product node $env:nodejs_version $env:platform
# https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform
- node --version
- npm --version
- npm install
Expand Down Expand Up @@ -161,14 +165,18 @@
GYP_MSVS_VERSION: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- nodejs_version: 10
GYP_MSVS_VERSION: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
GYP_MSVS_VERSION: 2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- nodejs_version: 11
GYP_MSVS_VERSION: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

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

install:
- ps: Install-Product node $env:nodejs_version $env:platform
# https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform
- node --version
- npm --version
- npm install
Expand Down
5 changes: 2 additions & 3 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
}
},
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'-std=c++11'
],
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
'CLANG_CXX_LIBRARY': 'libc++',
'OTHER_LDFLAGS': [],
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
'MACOSX_DEPLOYMENT_TARGET': '10.7'
Expand Down
1 change: 1 addition & 0 deletions lib/extensions.js
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"lodash": "^4.17.11",
"meow": "^3.7.0",
"mkdirp": "^0.5.1",
"nan": "^2.10.0",
"nan": "^2.13.2",
"node-gyp": "^3.8.0",
"npmlog": "^4.0.0",
"request": "^2.88.0",
Expand Down
4 changes: 2 additions & 2 deletions src/create_string.cpp
Original file line number Diff line number Diff line change
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