From da10866c45d2c65ece1bed260af3e99423aead34 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Wed, 24 Apr 2019 07:17:14 +1000 Subject: [PATCH 1/7] Add support for Node 12 --- .travis.yml | 6 ++++++ CHANGELOG.md | 4 ++++ README.md | 1 + appveyor.yml | 8 +++++++- lib/extensions.js | 1 + src/create_string.cpp | 4 ++-- 6 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8c7acd20b..303cd892a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 006dbb9df..4590a801b 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/README.md b/README.md index 25fa995a0..4aa1cba48 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/appveyor.yml b/appveyor.yml index ed7c2f8ff..86e0ae2c3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 @@ -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 diff --git a/lib/extensions.js b/lib/extensions.js index 47ada7166..8d365b45d 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -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; } } diff --git a/src/create_string.cpp b/src/create_string.cpp index 1b35b125f..27a496f7a 100644 --- a/src/create_string.cpp +++ b/src/create_string.cpp @@ -5,7 +5,7 @@ char* create_string(Nan::MaybeLocal maybevalue) { v8::Local value; - + if (maybevalue.ToLocal(&value)) { if (value->IsNull() || !value->IsString()) { return 0; @@ -14,7 +14,7 @@ char* create_string(Nan::MaybeLocal maybevalue) { return 0; } - v8::String::Utf8Value string(value); + Nan::Utf8String string(value); char *str = (char *)malloc(string.length() + 1); strcpy(str, *string); return str; From 34f99a20d529434ce98a2cf9627cd804bb3b7427 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Thu, 25 Apr 2019 12:11:07 +1000 Subject: [PATCH 2/7] Fix OSX compilation for Mojavi --- binding.gyp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/binding.gyp b/binding.gyp index f4507e6b8..8b3415293 100644 --- a/binding.gyp +++ b/binding.gyp @@ -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' From f4eebc85f96fa54e306ad2c799ba7ca727cdf1da Mon Sep 17 00:00:00 2001 From: xzyfer Date: Thu, 25 Apr 2019 12:16:38 +1000 Subject: [PATCH 3/7] Node 12 requires at least nan@2.13.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 23bc0502a..94d889271 100644 --- a/package.json +++ b/package.json @@ -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", From 480250c1624551b5ec38a00b89c8cb34dcc175d7 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Thu, 25 Apr 2019 12:23:38 +1000 Subject: [PATCH 4/7] Use g++4.9 for all Node >= 10 in Travis CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 303cd892a..c720ad811 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,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"; From 5aae0d235ec2d9823e9d7ae3c07ea06c80ca56f6 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Thu, 25 Apr 2019 12:36:16 +1000 Subject: [PATCH 5/7] Use Visual Studio 2017 for Node >= 10 --- appveyor.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 86e0ae2c3..8edbcd7c0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -68,14 +68,14 @@ 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: 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + GYP_MSVS_VERSION: 2017 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 install: - ps: Install-Product node $env:nodejs_version $env:platform @@ -164,14 +164,14 @@ 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: 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + GYP_MSVS_VERSION: 2017 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 install: - ps: Install-Product node $env:nodejs_version $env:platform From 9e564a170e38826247bbf02b7a44d04f6cb094ea Mon Sep 17 00:00:00 2001 From: xzyfer Date: Thu, 25 Apr 2019 12:50:29 +1000 Subject: [PATCH 6/7] Use explicit Node version numbers in CI config --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index c720ad811..220f34050 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,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" From 12c0052200260d72a1b5d5cac3a9b6c28b333e61 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Fri, 26 Apr 2019 14:04:18 +1000 Subject: [PATCH 7/7] Workaround waiting for AppVeyor to add Node versions --- appveyor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8edbcd7c0..bfd75922a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -78,7 +78,8 @@ 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 @@ -174,7 +175,8 @@ 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