From 1bab0ad3c888f9de8099d7faa750ba4fc83e9c0a Mon Sep 17 00:00:00 2001 From: rgeerts Date: Tue, 21 Jul 2020 18:09:28 -0500 Subject: [PATCH 001/102] improved language to be more sensitive to less privileged populations (#2944) chore: improved language to be more sensitive to less privileged populations --- lib/extensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extensions.js b/lib/extensions.js index eec0ee229..1d1528e68 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -134,7 +134,7 @@ function getInstalledBinaries() { } /** - * Check that an environment matches the whitelisted values or the current + * Check that an environment matches the allowlisted values or the current * environment if no parameters are passed * * @param {string} platform - The name of the OS platform(darwin, win32, etc...) From f4eec7e136f18ef2d168a4b46e1137a16c19bb98 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 26 Sep 2020 14:33:24 -0400 Subject: [PATCH 002/102] chore: Remove CI for unsupported Node versions --- .github/workflows/alpine.yml | 14 +--- .travis.yml | 124 +++++++++++------------------------ appveyor.yml | 74 ++------------------- 3 files changed, 46 insertions(+), 166 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index db30dce9a..bfd9275c9 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -10,26 +10,18 @@ jobs: env: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true strategy: + fail-fast: false matrix: node: - - 6 - - 8.16.2 - 10 - 12 - - 13 - - 14 + - 14.5 include: - - node: 6 - alpine: "" - - node: 8.16.2 - alpine: "3.9" - node: 10 alpine: "3.9" - node: 12 alpine: "3.9" - - node: 13 - alpine: "3.10" - - node: 14 + - node: 14.5 alpine: "3.10" steps: - name: Install Alpine build tools diff --git a/.travis.yml b/.travis.yml index 8541217e5..1e659541d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,110 +9,64 @@ env: jobs: include: - stage: test - node_js: "14" + node_js: "14.5" os: linux before_script: npm run lint || exit 1; after_success: npm run-script coverage; - - stage: platform-test - node_js: "14" - os: osx - - stage: platform-test - node_js: "13" - os: linux - - stage: platform-test - node_js: "13" + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-6 + - g++-6 + env: + - CC="gcc-6" + - CXX="g++-6" + - LINK="gcc-6" + - LINKXX="g++-6" + - stage: platform-test + node_js: "14.5" os: osx - stage: platform-test node_js: "12" os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-6 + - g++-6 + env: + - CC="gcc-6" + - CXX="g++-6" + - LINK="gcc-6" + - LINKXX="g++-6" - stage: platform-test node_js: "12" 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 + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.9 + - g++-4.9 + env: + - CC="gcc-4.9" + - CXX="g++-4.9" + - LINK="gcc-4.9" + - LINKXX="g++-4.9" - stage: platform-test node_js: "10" os: osx - - stage: platform-test - node_js: "9" - os: linux - - stage: platform-test - node_js: "9" - os: osx - - stage: platform-test - node_js: "8" - os: linux - - stage: platform-test - node_js: "8" - os: osx - - stage: platform-test - node_js: "7" - os: linux - - stage: platform-test - node_js: "7" - os: osx - - stage: platform-test - node_js: "6" - os: linux - - stage: platform-test - node_js: "6" - os: osx - - stage: platform-test - node_js: "4" - os: linux - - stage: platform-test - node_js: "4" - os: osx - - stage: platform-test - node_js: "0.12" - os: linux - - stage: platform-test - node_js: "0.10" - os: linux - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-4.7 - - g++-4.7 - - gcc-4.9 - - g++-4.9 - - gcc-6 - - g++-6 before_install: - - echo $TRAVIS_NODE_VERSION - npm config set python `which python` - - if [ $TRAVIS_OS_NAME == "linux" ]; then - if [[ $(node -v) =~ v1[234] ]]; then - export CC="gcc-6"; - export CXX="g++-6"; - export LINK="gcc-6"; - export LINKXX="g++-6"; - elif [[ $(node -v) =~ v1[01] ]]; then - export CC="gcc-4.9"; - export CXX="g++-4.9"; - export LINK="gcc-4.9"; - export LINKXX="g++-4.9"; - else - export CC="gcc-4.7"; - export CXX="g++-4.7"; - export LINK="gcc-4.7"; - export LINKXX="g++-4.7"; - fi - fi - - nvm --version - - node --version - - npm --version - ${CC:-gcc} --version - ${CXX:-g++} --version diff --git a/appveyor.yml b/appveyor.yml index 96f90fe4f..f9de19af5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,7 @@ except: - master - os: Visual Studio 2013 + os: Visual Studio 2017 configuration: release @@ -34,52 +34,13 @@ environment: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true matrix: - - nodejs_version: 0.10 - GYP_MSVS_VERSION: 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - - nodejs_version: 0.12 - GYP_MSVS_VERSION: 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - - nodejs_version: 1 - GYP_MSVS_VERSION: 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - - nodejs_version: 2 - GYP_MSVS_VERSION: 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - - nodejs_version: 3 - GYP_MSVS_VERSION: 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - - nodejs_version: 4 - GYP_MSVS_VERSION: 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - - nodejs_version: 5 - GYP_MSVS_VERSION: 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - - nodejs_version: 6 - GYP_MSVS_VERSION: 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - - nodejs_version: 7 - GYP_MSVS_VERSION: 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - - nodejs_version: 8 - GYP_MSVS_VERSION: 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - - nodejs_version: 9 - GYP_MSVS_VERSION: 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - nodejs_version: 10 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 11 - 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 - - nodejs_version: 13 - GYP_MSVS_VERSION: 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 14 + - nodejs_version: 14.5 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 @@ -124,7 +85,7 @@ skip_branch_with_pr: true skip_tags: true - os: Visual Studio 2013 + os: Visual Studio 2017 configuration: testing @@ -149,40 +110,13 @@ environment: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true matrix: - - nodejs_version: 0.10 - GYP_MSVS_VERSION: 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - - nodejs_version: 0.12 - GYP_MSVS_VERSION: 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - - nodejs_version: 4 - GYP_MSVS_VERSION: 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - - nodejs_version: 6 - GYP_MSVS_VERSION: 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - - nodejs_version: 7 - GYP_MSVS_VERSION: 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - - nodejs_version: 8 - GYP_MSVS_VERSION: 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - - nodejs_version: 9 - GYP_MSVS_VERSION: 2015 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - nodejs_version: 10 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 11 - 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 - - nodejs_version: 13 - GYP_MSVS_VERSION: 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 14 + - nodejs_version: 14.5 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 From 90b1f03bcdcc00d21a480472f71b133c4dfbe736 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 26 Sep 2020 18:00:58 -0400 Subject: [PATCH 003/102] chore: Move Windows x64 to GitHub Actions --- .github/workflows/windows.yml | 38 +++++++++++++++++++++++++++++++++++ appveyor.yml | 1 - 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000..26fad7b2c --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,38 @@ +name: Build bindings for Windows releases + +on: [push, pull_request] + +jobs: + build: + runs-on: windows-2016 + + strategy: + fail-fast: false + matrix: + node: + - 10 + - 12 + - 14.5 + + steps: + - uses: actions/checkout@v2 + + - name: Setup Node.js environment + uses: actions/setup-node@v1.4.3 + with: + node-version: ${{ matrix.node }} + + - name: Install packages + run: npm install --unsafe-perm + env: + SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true + + - name: Run tests + run: npm test + + - uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.node }} + path: | + vendor/**/binding.node + build/Release/binding.pdb diff --git a/appveyor.yml b/appveyor.yml index f9de19af5..d362e3f0a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,7 +11,6 @@ configuration: release platform: - - x64 - x86 version: "{build}" From 1d10ec751f7f285f7826ee4a2be473732ab8224c Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 26 Sep 2020 18:10:36 -0400 Subject: [PATCH 004/102] chore: Move Linting to GitHub Actions --- .github/workflows/lint-js.yml | 34 ++++++++++++++++++++++++++++++++++ .travis.yml | 1 - 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint-js.yml diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml new file mode 100644 index 000000000..ee886c772 --- /dev/null +++ b/.github/workflows/lint-js.yml @@ -0,0 +1,34 @@ +name: Lint JS + +on: + push: + paths: + - "**/*.js" + - ".eslintrc.json" + - "package.json" + - "bin/node-sass" + - ".github/workflows/lint-js.yml" + pull_request: + paths: + - "**/*.js" + - ".eslintrc.json" + - "package.json" + - "bin/node-sass" + - ".github/workflows/lint-js.yml" + +jobs: + build: + runs-on: ubuntu-latest + env: + SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v1 + + - name: Install packages + run: npm install --unsafe-perm + + - name: Run Linting + run: npm run lint diff --git a/.travis.yml b/.travis.yml index 1e659541d..69030dda1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ jobs: - stage: test node_js: "14.5" os: linux - before_script: npm run lint || exit 1; after_success: npm run-script coverage; addons: apt: From 205cf8acb424f98b95b56f7bdbdfd73f3f9c09bb Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 26 Sep 2020 18:11:05 -0400 Subject: [PATCH 005/102] chore: Move Coverage to GitHub Actions --- .github/workflows/coverage.yml | 32 ++++++++++++++++++++++++++++++++ .travis.yml | 1 - 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..21867cd62 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,32 @@ +name: Coverage + +on: + push: + paths: + - "**/*.js" + - "test/**" + - "package.json" + - "bin/node-sass" + - ".github/workflows/coverage.yml" + pull_request: + paths: + - "**/*.js" + - "test/**" + - "package.json" + - "bin/node-sass" + - ".github/workflows/coverage.yml" + +jobs: + build: + runs-on: ubuntu-latest + env: + SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true + + steps: + - uses: actions/checkout@v2 + + - name: Install packages + run: npm install --unsafe-perm + + - name: Run Linting + run: npm run coverage diff --git a/.travis.yml b/.travis.yml index 69030dda1..51ae3cddc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ jobs: - stage: test node_js: "14.5" os: linux - after_success: npm run-script coverage; addons: apt: sources: From 6216587ce849f41819c25abf42a07686951b0158 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 26 Sep 2020 18:13:27 -0400 Subject: [PATCH 006/102] chore: Move Linux testing to GitHub Actions --- .github/workflows/linux.yml | 55 +++++++++++++++++++++++++++++++++++++ .travis.yml | 45 ------------------------------ 2 files changed, 55 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/linux.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 000000000..f18bcc5a6 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,55 @@ +name: Build bindings for Linux releases + +on: [push, pull_request] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + node: + - 10 + - 12 + - 14.5 + include: + - node: 10 + gcc: "gcc-4.9" + gpp: "g++-4.9" + os: ubuntu-16.04 + - node: 12 + gcc: "gcc-6" + gpp: "g++-6" + os: ubuntu-18.04 + - node: 14.5 + gcc: "gcc-6" + gpp: "g++-6" + os: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + + - name: Setup Node.js environment + uses: actions/setup-node@v1.4.3 + with: + node-version: ${{ matrix.node }} + + - name: Setup GCC/G++ + run: sudo apt-get install ${{ matrix.gcc }} ${{ matrix.gpp }} + + - name: Install packages + run: npm install --unsafe-perm + env: + SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true + CC: ${{ matrix.gcc }} + CXX: ${{ matrix.gpp }} + LINK: ${{ matrix.gcc }} + LINKXX: ${{ matrix.gpp }} + + - name: Run tests + run: npm test + + - uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.node }} + path: vendor/ diff --git a/.travis.yml b/.travis.yml index 51ae3cddc..55cc6dcb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,57 +8,12 @@ env: jobs: include: - - stage: test - node_js: "14.5" - os: linux - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-6 - - g++-6 - env: - - CC="gcc-6" - - CXX="g++-6" - - LINK="gcc-6" - - LINKXX="g++-6" - stage: platform-test node_js: "14.5" os: osx - - stage: platform-test - node_js: "12" - os: linux - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-6 - - g++-6 - env: - - CC="gcc-6" - - CXX="g++-6" - - LINK="gcc-6" - - LINKXX="g++-6" - stage: platform-test node_js: "12" os: osx - - stage: platform-test - node_js: "10" - os: linux - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-4.9 - - g++-4.9 - env: - - CC="gcc-4.9" - - CXX="g++-4.9" - - LINK="gcc-4.9" - - LINKXX="g++-4.9" - stage: platform-test node_js: "10" os: osx From c41205b8c76c545d13169ebc1b4007c4bc2c8be1 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 26 Sep 2020 18:15:50 -0400 Subject: [PATCH 007/102] chore: Move macOS to GitHub Actions --- .github/workflows/macos.yml | 36 ++++++++++++++++++++++++++++++++++++ .travis.yml | 36 ------------------------------------ 2 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/macos.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..88b20175d --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,36 @@ +name: Build bindings for macOS releases + +on: [push, pull_request] + +jobs: + build: + runs-on: macos-latest + + strategy: + fail-fast: false + matrix: + node: + - 10 + - 12 + - 14.5 + + steps: + - uses: actions/checkout@v2 + + - name: Setup Node.js environment + uses: actions/setup-node@v1.4.3 + with: + node-version: ${{ matrix.node }} + + - name: Install packages + run: npm install --unsafe-perm + env: + SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true + + - name: Run tests + run: npm test + + - uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.node }} + path: vendor/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 55cc6dcb0..000000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: node_js - -compiler: gcc - -env: - global: - - SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=true - -jobs: - include: - - stage: platform-test - node_js: "14.5" - os: osx - - stage: platform-test - node_js: "12" - os: osx - - stage: platform-test - node_js: "10" - os: osx - -before_install: - - npm config set python `which python` - - ${CC:-gcc} --version - - ${CXX:-g++} --version - -install: - - npm install - -script: - - npm test - -cache: - directories: - - $HOME/.node-gyp - - $HOME/.npm - - node_modules From 601d31fbbd20f1d7d5521fd4e4d4bf6552e44d74 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 26 Sep 2020 18:31:15 -0400 Subject: [PATCH 008/102] chore: Use action/upload-artifact@v2 for Alpine --- .github/workflows/alpine.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index bfd9275c9..35893191e 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -35,7 +35,7 @@ jobs: - name: Run tests run: npm test - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v2 with: name: ${{ matrix.node }} path: vendor/ From b895e5b2ea1116f6b263e5d856177265298b93ed Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 26 Sep 2020 23:52:14 -0400 Subject: [PATCH 009/102] chore: Drop sass-spec testing Was dropped in v5 branch before because this is better covered in libsass --- package.json | 2 - scripts/coverage.js | 3 +- test/spec.js | 192 -------------------------------------------- 3 files changed, 1 insertion(+), 196 deletions(-) delete mode 100644 test/spec.js diff --git a/package.json b/package.json index fc00cb5c7..8dad370f9 100644 --- a/package.json +++ b/package.json @@ -79,9 +79,7 @@ "mocha": "^3.1.2", "mocha-lcov-reporter": "^1.2.0", "object-merge": "^2.5.1", - "read-yaml": "^1.0.0", "rimraf": "^2.5.2", - "sass-spec": "https://github.com/sass/sass-spec.git#dc2d573", "unique-temp-dir": "^1.0.0" } } diff --git a/scripts/coverage.js b/scripts/coverage.js index 33836e9cf..dbd294916 100644 --- a/scripts/coverage.js +++ b/scripts/coverage.js @@ -55,8 +55,7 @@ function coverage() { if (instrumentedfiles.length === sourcefiles.length) { fs.readdirSync('test').filter(function(file){ return file.substr(-6) === 'api.js' || - file.substr(-11) === 'runtime.js' || - file.substr(-7) === 'spec.js'; + file.substr(-11) === 'runtime.js'; }).forEach(function(file){ mocha.addFile( path.join('test', file) diff --git a/test/spec.js b/test/spec.js deleted file mode 100644 index 1ccaa8da6..000000000 --- a/test/spec.js +++ /dev/null @@ -1,192 +0,0 @@ -var assert = require('assert'), - fs = require('fs'), - exists = fs.existsSync, - join = require('path').join, - read = fs.readFileSync, - sass = process.env.NODESASS_COV - ? require('../lib-cov') - : require('../lib'), - readYaml = require('read-yaml'), - mergeWith = require('lodash/mergeWith'), - assign = require('lodash/assign'), - glob = require('glob'), - specPath = require('sass-spec').dirname.replace(/\\/g, '/'), - impl = 'libsass', - version = 3.5; - -var normalize = function(str) { - // This should be /\r\n/g, '\n', but there seems to be some empty line issues - return str.replace(/\s+/g, ''); -}; - -var inputs = glob.sync(specPath + '/**/input.*'); - -var initialize = function(inputCss, options) { - var testCase = {}; - var folders = inputCss.split('/'); - var folder = join(inputCss, '..'); - testCase.folder = folder; - testCase.name = folders[folders.length - 2]; - testCase.inputPath = inputCss; - testCase.expectedPath = join(folder, 'expected_output.css'); - testCase.errorPath = join(folder, 'error'); - testCase.statusPath = join(folder, 'status'); - testCase.optionsPath = join(folder, 'options.yml'); - if (exists(testCase.optionsPath)) { - options = mergeWith(assign({}, options), readYaml.sync(testCase.optionsPath), customizer); - } - testCase.includePaths = [ - folder, - join(folder, 'sub') - ]; - testCase.precision = parseFloat(options[':precision']) || 5; - testCase.outputStyle = options[':output_style'] ? options[':output_style'].replace(':', '') : 'nested'; - testCase.todo = options[':todo'] !== undefined && options[':todo'] !== null && options[':todo'].indexOf(impl) !== -1; - testCase.only = options[':only_on'] !== undefined && options[':only_on'] !== null && options[':only_on']; - testCase.warningTodo = options[':warning_todo'] !== undefined && options[':warning_todo'] !== null && options[':warning_todo'].indexOf(impl) !== -1; - testCase.startVersion = parseFloat(options[':start_version']) || 0; - testCase.endVersion = parseFloat(options[':end_version']) || 99; - testCase.options = options; - testCase.result = false; - - // Probe filesystem once and cache the results - testCase.shouldFail = exists(testCase.statusPath) && !fs.statSync(testCase.statusPath).isDirectory(); - testCase.verifyStderr = exists(testCase.errorPath) && !fs.statSync(testCase.errorPath).isDirectory(); - return testCase; -}; - -var runTest = function(inputCssPath, options) { - var test = initialize(inputCssPath, options); - - it(test.name, function(done) { - if (test.todo || test.warningTodo) { - this.skip('Test marked with TODO'); - } else if (test.only && test.only.indexOf(impl) === -1) { - this.skip('Tests marked for only: ' + test.only.join(', ')); - } else if (version < test.startVersion) { - this.skip('Tests marked for newer Sass versions only'); - } else if (version > test.endVersion) { - this.skip('Tests marked for older Sass versions only'); - } else { - var expected = normalize(read(test.expectedPath, 'utf8')); - sass.render({ - file: test.inputPath, - includePaths: test.includePaths, - precision: test.precision, - outputStyle: test.outputStyle - }, function(error, result) { - if (test.shouldFail) { - // Replace 1, with parseInt(read(test.statusPath, 'utf8')) pending - // https://github.com/sass/libsass/issues/2162 - assert.equal(error.status, 1); - } else if (test.verifyStderr) { - var expectedError = read(test.errorPath, 'utf8'); - if (error === null) { - // Probably a warning - assert.ok(expectedError, 'Expected some sort of warning, but found none'); - } else { - // The error messages seem to have some differences in areas - // like line numbering, so we'll check the first line for the - // general errror message only - assert.equal( - error.formatted.toString().split('\n')[0], - expectedError.toString().split('\n')[0], - 'Should Error.\nOptions' + JSON.stringify(test.options)); - } - } else if (expected) { - assert.equal( - normalize(result.css.toString()), - expected, - 'Should equal with options ' + JSON.stringify(test.options) - ); - } - done(); - }); - } - }); -}; - -var specSuite = { - name: specPath.split('/').slice(-1)[0], - folder: specPath, - tests: [], - suites: [], - options: {} -}; - -function customizer(objValue, srcValue) { - if (Array.isArray(objValue)) { - return objValue.concat(srcValue); - } -} - -var executeSuite = function(suite, tests) { - var suiteFolderLength = suite.folder.split('/').length; - var optionsFile = join(suite.folder, 'options.yml'); - if (exists(optionsFile)) { - suite.options = mergeWith(assign({}, suite.options), readYaml.sync(optionsFile), customizer); - } - - // Push tests in the current suite - tests = tests.filter(function(test) { - var testSuiteFolder = test.split('/'); - var inputSass = testSuiteFolder[suiteFolderLength + 1]; - // Add the test if the specPath matches the testname - if (inputSass === 'input.scss' || inputSass === 'input.sass') { - suite.tests.push(test); - } else { - return test; - } - }); - - if (tests.length !== 0) { - var prevSuite = tests[0].split('/')[suiteFolderLength]; - var suiteName = ''; - var prevSuiteStart = 0; - for (var i = 0; i < tests.length; i++) { - var test = tests[i]; - suiteName = test.split('/')[suiteFolderLength]; - if (suiteName !== prevSuite) { - suite.suites.push( - executeSuite( - { - name: prevSuite, - folder: suite.folder + '/' + prevSuite, - tests: [], - suites: [], - options: assign({}, suite.options), - }, - tests.slice(prevSuiteStart, i) - ) - ); - prevSuite = suiteName; - prevSuiteStart = i; - } - } - suite.suites.push( - executeSuite( - { - name: suiteName, - folder: suite.folder + '/' + suiteName, - tests: [], - suites: [], - options: assign({}, suite.options), - }, - tests.slice(prevSuiteStart, tests.length) - ) - ); - } - return suite; -}; -var allSuites = executeSuite(specSuite, inputs); -var runSuites = function(suite) { - describe(suite.name, function(){ - suite.tests.forEach(function(test){ - runTest(test, suite.options); - }); - suite.suites.forEach(function(subsuite) { - runSuites(subsuite); - }); - }); -}; -runSuites(allSuites); From e3ed10befe5d5ca37433f6814da05f87c49f943a Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 27 Sep 2020 17:57:46 -0400 Subject: [PATCH 010/102] chore: Add GitHub Coveralls --- .github/workflows/coverage.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 21867cd62..8829043a2 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -19,8 +19,6 @@ on: jobs: build: runs-on: ubuntu-latest - env: - SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true steps: - uses: actions/checkout@v2 @@ -28,5 +26,10 @@ jobs: - name: Install packages run: npm install --unsafe-perm - - name: Run Linting + - name: Run Coverage run: npm run coverage + + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} From d1d95473539f2a317baa77cc8161436f8e5f270d Mon Sep 17 00:00:00 2001 From: xzyfer Date: Thu, 19 Jul 2018 18:46:18 +1000 Subject: [PATCH 011/102] Fix tests that have always been broke Four years ago there was a test that mutated `process.cwd` but didn't correctly reset it. The altered global state resulted in future tests having incorrect assetions. I only noticed this because for some reason it manifested in failures in only _some_ Node versions when N-API was being used. --- test/cli.js | 29 ++++++------------- .../include-files/expected-data-importer.css | 5 ++++ .../include-files/expected-file-importer.css | 2 ++ test/fixtures/source-map-embed/expected.css | 2 +- 4 files changed, 17 insertions(+), 21 deletions(-) create mode 100644 test/fixtures/include-files/expected-data-importer.css create mode 100644 test/fixtures/include-files/expected-file-importer.css diff --git a/test/cli.js b/test/cli.js index 78a80910c..e15fbb093 100644 --- a/test/cli.js +++ b/test/cli.js @@ -122,8 +122,6 @@ describe('cli', function() { describe('node-sass in.scss', function() { it('should compile a scss file', function(done) { - process.chdir(fixture('simple')); - var src = fixture('simple/index.scss'); var dest = fixture('simple/index.css'); var bin = spawn(cli, [src, dest]); @@ -131,14 +129,11 @@ describe('cli', function() { bin.once('close', function() { assert(fs.existsSync(dest)); fs.unlinkSync(dest); - process.chdir(__dirname); done(); }); }); it('should compile a scss file to custom destination', function(done) { - process.chdir(fixture('simple')); - var src = fixture('simple/index.scss'); var dest = fixture('simple/index-custom.css'); var bin = spawn(cli, [src, dest]); @@ -146,7 +141,6 @@ describe('cli', function() { bin.once('close', function() { assert(fs.existsSync(dest)); fs.unlinkSync(dest); - process.chdir(__dirname); done(); }); }); @@ -169,8 +163,6 @@ describe('cli', function() { }); it('should compile silently using the --quiet option', function(done) { - process.chdir(fixture('simple')); - var src = fixture('simple/index.scss'); var dest = fixture('simple/index.css'); var bin = spawn(cli, [src, dest, '--quiet']); @@ -183,14 +175,11 @@ describe('cli', function() { bin.once('close', function() { assert.equal(didEmit, false); fs.unlinkSync(dest); - process.chdir(__dirname); done(); }); }); it('should still report errors with the --quiet option', function(done) { - process.chdir(fixture('invalid')); - var src = fixture('invalid/index.scss'); var dest = fixture('invalid/index.css'); var bin = spawn(cli, [src, dest, '--quiet']); @@ -202,7 +191,6 @@ describe('cli', function() { bin.once('close', function() { assert.equal(didEmit, true); - process.chdir(__dirname); done(); }); }); @@ -644,7 +632,8 @@ describe('cli', function() { describe('importer', function() { var dest = fixture('include-files/index.css'); var src = fixture('include-files/index.scss'); - var expected = read(fixture('include-files/expected-importer.css'), 'utf8').trim().replace(/\r\n/g, '\n'); + var expectedData = read(fixture('include-files/expected-data-importer.css'), 'utf8').trim().replace(/\r\n/g, '\n'); + var expectedFile = read(fixture('include-files/expected-file-importer.css'), 'utf8').trim().replace(/\r\n/g, '\n'); it('should override imports and fire callback with file and contents', function(done) { var bin = spawn(cli, [ @@ -653,7 +642,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expected); + assert.equal(read(dest, 'utf8').trim(), expectedData); fs.unlinkSync(dest); done(); }); @@ -667,7 +656,7 @@ describe('cli', function() { bin.once('close', function() { if (fs.existsSync(dest)) { - assert.equal(read(dest, 'utf8').trim(), ''); + assert.equal(read(dest, 'utf8').trim(), expectedFile); fs.unlinkSync(dest); } @@ -682,7 +671,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expected); + assert.equal(read(dest, 'utf8').trim(), expectedData); fs.unlinkSync(dest); done(); }); @@ -695,7 +684,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expected); + assert.equal(read(dest, 'utf8').trim(), expectedData); fs.unlinkSync(dest); done(); }); @@ -709,7 +698,7 @@ describe('cli', function() { bin.once('close', function() { if (fs.existsSync(dest)) { - assert.equal(read(dest, 'utf8').trim(), ''); + assert.equal(read(dest, 'utf8').trim(), expectedFile); fs.unlinkSync(dest); } @@ -724,7 +713,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expected); + assert.equal(read(dest, 'utf8').trim(), expectedData); fs.unlinkSync(dest); done(); }); @@ -737,7 +726,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expected); + assert.equal(read(dest, 'utf8').trim(), expectedData); fs.unlinkSync(dest); done(); }); diff --git a/test/fixtures/include-files/expected-data-importer.css b/test/fixtures/include-files/expected-data-importer.css new file mode 100644 index 000000000..1925a6021 --- /dev/null +++ b/test/fixtures/include-files/expected-data-importer.css @@ -0,0 +1,5 @@ +div { + color: yellow; } + +div { + color: yellow; } diff --git a/test/fixtures/include-files/expected-file-importer.css b/test/fixtures/include-files/expected-file-importer.css new file mode 100644 index 000000000..326f694d5 --- /dev/null +++ b/test/fixtures/include-files/expected-file-importer.css @@ -0,0 +1,2 @@ +/* foo.scss */ +/* bar.scss */ diff --git a/test/fixtures/source-map-embed/expected.css b/test/fixtures/source-map-embed/expected.css index 56f2e59a3..a1e895f28 100644 --- a/test/fixtures/source-map-embed/expected.css +++ b/test/fixtures/source-map-embed/expected.css @@ -10,4 +10,4 @@ #navbar li a { font-weight: bold; } -/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAiZml4dHVyZXMvc291cmNlLW1hcC1lbWJlZC9pbmRleC5jc3MiLAoJInNvdXJjZXMiOiBbCgkJImZpeHR1cmVzL3NvdXJjZS1tYXAtZW1iZWQvaW5kZXguc2NzcyIKCV0sCgkibmFtZXMiOiBbXSwKCSJtYXBwaW5ncyI6ICJBQUFBLEFBQUEsT0FBTyxDQUFDO0VBQ04sS0FBSyxFQUFFLEdBQUc7RUFDVixNQUFNLEVBQUUsSUFBSSxHQUNiOztBQUVELEFBQUEsT0FBTyxDQUFDLEVBQUUsQ0FBQztFQUNULGVBQWUsRUFBRSxJQUFJLEdBQ3RCOztBQUVELEFBQUEsT0FBTyxDQUFDLEVBQUUsQ0FBQztFQUNULEtBQUssRUFBRSxJQUFJLEdBS1o7RUFORCxBQUdFLE9BSEssQ0FBQyxFQUFFLENBR1IsQ0FBQyxDQUFDO0lBQ0EsV0FBVyxFQUFFLElBQUksR0FDbEIiCn0= */ +/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAidGVzdC9maXh0dXJlcy9zb3VyY2UtbWFwLWVtYmVkL2luZGV4LmNzcyIsCgkic291cmNlcyI6IFsKCQkidGVzdC9maXh0dXJlcy9zb3VyY2UtbWFwLWVtYmVkL2luZGV4LnNjc3MiCgldLAoJIm5hbWVzIjogW10sCgkibWFwcGluZ3MiOiAiQUFBQSxBQUFBLE9BQU8sQ0FBQztFQUNOLEtBQUssRUFBRSxHQUFHO0VBQ1YsTUFBTSxFQUFFLElBQUksR0FDYjs7QUFFRCxBQUFBLE9BQU8sQ0FBQyxFQUFFLENBQUM7RUFDVCxlQUFlLEVBQUUsSUFBSSxHQUN0Qjs7QUFFRCxBQUFBLE9BQU8sQ0FBQyxFQUFFLENBQUM7RUFDVCxLQUFLLEVBQUUsSUFBSSxHQUtaO0VBTkQsQUFHRSxPQUhLLENBQUMsRUFBRSxDQUdSLENBQUMsQ0FBQztJQUNBLFdBQVcsRUFBRSxJQUFJLEdBQ2xCIgp9 */ From 4869f089c317b9a7b3231d5791fb98197056bf4b Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 17 Sep 2020 22:43:37 -0400 Subject: [PATCH 012/102] fix: Depreciate Assert equal to strictEqual --- test/api.js | 234 +++++++++++++++++++-------------------- test/cli.js | 58 +++++----- test/runtime.js | 36 +++--- test/types.js | 284 ++++++++++++++++++++++++------------------------ 4 files changed, 306 insertions(+), 306 deletions(-) diff --git a/test/api.js b/test/api.js index 5db31137d..7df608c78 100644 --- a/test/api.js +++ b/test/api.js @@ -25,7 +25,7 @@ describe('api', function() { sass.render({ file: fixture('simple/index.scss') }, function(error, result) { - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); }); @@ -36,7 +36,7 @@ describe('api', function() { sourceMap: true, outFile: fixture('simple/index-test.css') }, function(error, result) { - assert.equal(JSON.parse(result.map).file, 'index-test.css'); + assert.strictEqual(JSON.parse(result.map).file, 'index-test.css'); done(); }); }); @@ -47,7 +47,7 @@ describe('api', function() { sourceMap: true, outFile: './index-test.css' }, function(error, result) { - assert.equal(JSON.parse(result.map).file, 'index-test.css'); + assert.strictEqual(JSON.parse(result.map).file, 'index-test.css'); done(); }); }); @@ -58,7 +58,7 @@ describe('api', function() { sourceMap: './deep/nested/index.map', outFile: './index-test.css' }, function(error, result) { - assert.equal(JSON.parse(result.map).file, '../../index-test.css'); + assert.strictEqual(JSON.parse(result.map).file, '../../index-test.css'); done(); }); }); @@ -90,7 +90,7 @@ describe('api', function() { sourceMapRoot: 'http://test.com/', outFile: './index-test.css' }, function(error, result) { - assert.equal(JSON.parse(result.map).sourceRoot, 'http://test.com/'); + assert.strictEqual(JSON.parse(result.map).sourceRoot, 'http://test.com/'); done(); }); }); @@ -102,7 +102,7 @@ describe('api', function() { sass.render({ data: src }, function(error, result) { - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); }); @@ -115,7 +115,7 @@ describe('api', function() { data: src, indentedSyntax: true }, function(error, result) { - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); }); @@ -124,14 +124,14 @@ describe('api', function() { sass.render({ data: '' }, function(error) { - assert.equal(error.message, 'No input specified: provide a file name or a source string to process'); + assert.strictEqual(error.message, 'No input specified: provide a file name or a source string to process'); done(); }); }); it('should NOT compile without any input', function(done) { sass.render({ }, function(error) { - assert.equal(error.message, 'No input specified: provide a file name or a source string to process'); + assert.strictEqual(error.message, 'No input specified: provide a file name or a source string to process'); done(); }); }); @@ -141,7 +141,7 @@ describe('api', function() { data: '#navbar width 80%;' }, function(error) { assert(error.message); - assert.equal(error.status, 1); + assert.strictEqual(error.status, 1); done(); }); }); @@ -157,7 +157,7 @@ describe('api', function() { fixture('include-path/lib') ] }, function(error, result) { - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); }); @@ -172,7 +172,7 @@ describe('api', function() { file: src, includePaths: [] }, function(error, result) { - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); process.chdir(cwd); done(); @@ -194,7 +194,7 @@ describe('api', function() { data: src, includePaths: [] }, function(error, result) { - assert.equal(result.css.toString().trim(), expectedRed.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expectedRed.replace(/\r\n/g, '\n')); }); process.env.SASS_PATH = envIncludes.reverse().join(path.delimiter); @@ -202,7 +202,7 @@ describe('api', function() { data: src, includePaths: [] }, function(error, result) { - assert.equal(result.css.toString().trim(), expectedOrange.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expectedOrange.replace(/\r\n/g, '\n')); done(); }); }); @@ -221,13 +221,13 @@ describe('api', function() { data: src, includePaths: [] }, function(error, result) { - assert.equal(result.css.toString().trim(), expectedRed.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expectedRed.replace(/\r\n/g, '\n')); }); sass.render({ data: src, includePaths: [fixture('sass-path/orange')] }, function(error, result) { - assert.equal(result.css.toString().trim(), expectedOrange.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expectedOrange.replace(/\r\n/g, '\n')); done(); }); }); @@ -240,7 +240,7 @@ describe('api', function() { data: src, precision: 10 }, function(error, result) { - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); }); @@ -267,7 +267,7 @@ describe('api', function() { indentWidth: 7, indentType: 'tab' }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n\t\t\t\t\t\t\tcolor: transparent; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n\t\t\t\t\t\t\tcolor: transparent; }'); done(); }); }); @@ -277,7 +277,7 @@ describe('api', function() { data: 'div { color: transparent; }', linefeed: 'lfcr' }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n\r color: transparent; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n\r color: transparent; }'); done(); }); }); @@ -309,9 +309,9 @@ describe('api', function() { }); } }, function(err, data) { - assert.equal(err, null); + assert.strictEqual(err, null); - assert.equal( + assert.strictEqual( data.css.toString().trim(), 'body {\n color: "red"; }' ); @@ -330,7 +330,7 @@ describe('api', function() { contents: '@import "b"' }); } else { - assert.equal(prev, '/Users/me/sass/lib/a.scss'); + assert.strictEqual(prev, '/Users/me/sass/lib/a.scss'); done({ file: '/Users/me/sass/lib/b.scss', contents: 'div {color: yellow;}' @@ -352,7 +352,7 @@ describe('api', function() { }); } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); }); @@ -371,7 +371,7 @@ describe('api', function() { done(); } }, function(error, result) { - assert.equal(result.css.toString().trim(), expected); + assert.strictEqual(result.css.toString().trim(), expected); assert.deepEqual(actualImportOrder, expectedImportOrder); done(); }); @@ -387,7 +387,7 @@ describe('api', function() { }); } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); }); @@ -402,7 +402,7 @@ describe('api', function() { }; } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); }); @@ -417,7 +417,7 @@ describe('api', function() { }; } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); }); @@ -431,7 +431,7 @@ describe('api', function() { }); } }, function(error, result) { - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); }); @@ -445,7 +445,7 @@ describe('api', function() { }); } }, function(error, result) { - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); }); @@ -459,7 +459,7 @@ describe('api', function() { }; } }, function(error, result) { - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); }); @@ -473,7 +473,7 @@ describe('api', function() { }; } }, function(error, result) { - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); }); @@ -485,7 +485,7 @@ describe('api', function() { done(sass.NULL); } }, function(error, result) { - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); }); @@ -497,7 +497,7 @@ describe('api', function() { done(null); } }, function(error, result) { - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); }); @@ -509,7 +509,7 @@ describe('api', function() { done(undefined); } }, function(error, result) { - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); }); @@ -521,7 +521,7 @@ describe('api', function() { done(false); } }, function(error, result) { - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); }); @@ -535,7 +535,7 @@ describe('api', function() { }); } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); }); @@ -549,7 +549,7 @@ describe('api', function() { }); } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); }); @@ -563,7 +563,7 @@ describe('api', function() { }; } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); }); @@ -577,7 +577,7 @@ describe('api', function() { }; } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); }); @@ -596,7 +596,7 @@ describe('api', function() { } ] }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); }); @@ -606,11 +606,11 @@ describe('api', function() { sass.render({ file: fxt, importer: function() { - assert.equal(fxt, this.options.file); + assert.strictEqual(fxt, this.options.file); return {}; } }, function() { - assert.equal(fxt, this.options.file); + assert.strictEqual(fxt, this.options.file); done(); }); }); @@ -626,7 +626,7 @@ describe('api', function() { }; } }, function() { - assert.equal(this.state, 2); + assert.strictEqual(this.state, 2); done(); }); }); @@ -694,7 +694,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: 42px; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: 42px; }'); done(); }); }); @@ -708,7 +708,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: 126px; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: 126px; }'); done(); }); }); @@ -724,7 +724,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: 66em; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: 66em; }'); done(); }); }); @@ -743,7 +743,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n width: 42rem;\n height: 84px; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n width: 42rem;\n height: 84px; }'); done(); }); }); @@ -758,7 +758,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: "barbar"; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: "barbar"; }'); done(); }); }); @@ -774,7 +774,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n width: "barbar"; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n width: "barbar"; }'); done(); }); }); @@ -784,10 +784,10 @@ describe('api', function() { data: 'div { color: foo(#f00); background-color: bar(); border-color: baz(); }', functions: { 'foo($a)': function(color) { - assert.equal(color.getR(), 255); - assert.equal(color.getG(), 0); - assert.equal(color.getB(), 0); - assert.equal(color.getA(), 1.0); + assert.strictEqual(color.getR(), 255); + assert.strictEqual(color.getG(), 0); + assert.strictEqual(color.getB(), 0); + assert.strictEqual(color.getA(), 1.0); return new sass.types.Color(255, 255, 0, 0.5); }, @@ -799,7 +799,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal( + assert.strictEqual( result.css.toString().trim(), 'div {\n color: rgba(255, 255, 0, 0.5);' + '\n background-color: rgba(255, 0, 255, 0.2);' + @@ -819,7 +819,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: #000;\n background-color: #fff; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: #000;\n background-color: #fff; }'); done(); }); }); @@ -833,7 +833,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: #fff;\n background-color: #000; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: #fff;\n background-color: #000; }'); done(); }); }); @@ -843,16 +843,16 @@ describe('api', function() { data: '$test-list: (bar, #f00, 123em); @each $item in foo($test-list) { .#{$item} { color: #fff; } }', functions: { 'foo($l)': function(list) { - assert.equal(list.getLength(), 3); + assert.strictEqual(list.getLength(), 3); assert.ok(list.getValue(0) instanceof sass.types.String); - assert.equal(list.getValue(0).getValue(), 'bar'); + assert.strictEqual(list.getValue(0).getValue(), 'bar'); assert.ok(list.getValue(1) instanceof sass.types.Color); - assert.equal(list.getValue(1).getR(), 0xff); - assert.equal(list.getValue(1).getG(), 0); - assert.equal(list.getValue(1).getB(), 0); + assert.strictEqual(list.getValue(1).getR(), 0xff); + assert.strictEqual(list.getValue(1).getG(), 0); + assert.strictEqual(list.getValue(1).getB(), 0); assert.ok(list.getValue(2) instanceof sass.types.Number); - assert.equal(list.getValue(2).getValue(), 123); - assert.equal(list.getValue(2).getUnit(), 'em'); + assert.strictEqual(list.getValue(2).getValue(), 123); + assert.strictEqual(list.getValue(2).getUnit(), 'em'); var out = new sass.types.List(3); out.setValue(0, new sass.types.String('foo')); @@ -862,7 +862,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal( + assert.strictEqual( result.css.toString().trim(), '.foo {\n color: #fff; }\n\n.bar {\n color: #fff; }\n\n.baz {\n color: #fff; }' ); @@ -876,15 +876,15 @@ describe('api', function() { 'span { color: map-get($test-map, baz); }', functions: { 'foo($m)': function(map) { - assert.equal(map.getLength(), 2); + assert.strictEqual(map.getLength(), 2); assert.ok(map.getKey(0) instanceof sass.types.String); assert.ok(map.getKey(1) instanceof sass.types.Color); assert.ok(map.getValue(0) instanceof sass.types.Number); assert.ok(map.getValue(1) instanceof sass.types.Boolean); - assert.equal(map.getKey(0).getValue(), 'abc'); - assert.equal(map.getValue(0).getValue(), 123); - assert.equal(map.getKey(1).getR(), 0xdd); - assert.equal(map.getValue(1).getValue(), true); + assert.strictEqual(map.getKey(0).getValue(), 'abc'); + assert.strictEqual(map.getValue(0).getValue(), 123); + assert.strictEqual(map.getKey(1).getR(), 0xdd); + assert.strictEqual(map.getValue(1).getValue(), true); var out = new sass.types.Map(3); out.setKey(0, new sass.types.String('hello')); @@ -897,7 +897,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: #fff; }\n\nspan {\n color: qux; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: #fff; }\n\nspan {\n color: qux; }'); done(); }); }); @@ -916,7 +916,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal( + assert.strictEqual( result.css.toString().trim(), 'div {\n color: #000; }\n\nspan {\n color: #fff; }\n\ntable {\n color: #fff; }' ); @@ -947,7 +947,7 @@ describe('api', function() { } } }, function(errror, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: #112233;\n background-color: #ddeeff; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: #112233;\n background-color: #ddeeff; }'); done(); }); }); @@ -962,7 +962,7 @@ describe('api', function() { } } }, function(error, result) { - assert.equal(result.css.toString().trim(), 'div {\n color: 42em; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: 42em; }'); done(); }); }); @@ -1011,7 +1011,7 @@ describe('api', function() { it('should call custom functions with correct context', function(done) { function assertExpected(result) { - assert.equal(result.css.toString().trim(), 'div {\n foo1: 1;\n foo2: 2; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n foo1: 1;\n foo2: 2; }'); } var options = { data: 'div { foo1: foo(); foo2: foo(); }', @@ -1265,7 +1265,7 @@ describe('api', function() { }, function(error, result) { assert(!error); assert.strictEqual(typeof result.stats.duration, 'number'); - assert.equal(result.stats.end - result.stats.start, result.stats.duration); + assert.strictEqual(result.stats.end - result.stats.start, result.stats.duration); done(); }); }); @@ -1275,7 +1275,7 @@ describe('api', function() { file: fixture('include-files/index.scss') }, function(error, result) { assert(!error); - assert.equal(result.stats.entry, fixture('include-files/index.scss')); + assert.strictEqual(result.stats.entry, fixture('include-files/index.scss')); done(); }); }); @@ -1311,7 +1311,7 @@ describe('api', function() { sass.render({ data: read(fixture('simple/index.scss'), 'utf8') }, function(error, result) { - assert.equal(result.stats.entry, 'data'); + assert.strictEqual(result.stats.entry, 'data'); done(); }); }); @@ -1331,7 +1331,7 @@ describe('api', function() { var expected = read(fixture('simple/expected.css'), 'utf8').trim(); var result = sass.renderSync({ file: fixture('simple/index.scss') }); - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -1342,7 +1342,7 @@ describe('api', function() { outFile: fixture('simple/index-test.css') }); - assert.equal(JSON.parse(result.map).file, 'index-test.css'); + assert.strictEqual(JSON.parse(result.map).file, 'index-test.css'); done(); }); @@ -1353,7 +1353,7 @@ describe('api', function() { outFile: './index-test.css' }); - assert.equal(JSON.parse(result.map).file, 'index-test.css'); + assert.strictEqual(JSON.parse(result.map).file, 'index-test.css'); done(); }); @@ -1364,7 +1364,7 @@ describe('api', function() { outFile: './index-test.css' }); - assert.equal(JSON.parse(result.map).file, '../../index-test.css'); + assert.strictEqual(JSON.parse(result.map).file, '../../index-test.css'); done(); }); @@ -1396,7 +1396,7 @@ describe('api', function() { outFile: './index-test.css' }); - assert.equal(JSON.parse(result.map).sourceRoot, 'http://test.com/'); + assert.strictEqual(JSON.parse(result.map).sourceRoot, 'http://test.com/'); done(); }); @@ -1405,7 +1405,7 @@ describe('api', function() { var expected = read(fixture('simple/expected.css'), 'utf8').trim(); var result = sass.renderSync({ data: src }); - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -1417,7 +1417,7 @@ describe('api', function() { indentedSyntax: true }); - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -1457,7 +1457,7 @@ describe('api', function() { ] }); - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -1476,7 +1476,7 @@ describe('api', function() { }); process.chdir(cwd); - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -1496,7 +1496,7 @@ describe('api', function() { includePaths: [] }); - assert.equal(result.css.toString().trim(), expectedRed.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expectedRed.replace(/\r\n/g, '\n')); process.env.SASS_PATH = envIncludes.reverse().join(path.delimiter); result = sass.renderSync({ @@ -1504,7 +1504,7 @@ describe('api', function() { includePaths: [] }); - assert.equal(result.css.toString().trim(), expectedOrange.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expectedOrange.replace(/\r\n/g, '\n')); done(); }); @@ -1523,14 +1523,14 @@ describe('api', function() { includePaths: [] }); - assert.equal(result.css.toString().trim(), expectedRed.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expectedRed.replace(/\r\n/g, '\n')); result = sass.renderSync({ data: src, includePaths: [fixture('sass-path/orange')] }); - assert.equal(result.css.toString().trim(), expectedOrange.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expectedOrange.replace(/\r\n/g, '\n')); done(); }); @@ -1542,7 +1542,7 @@ describe('api', function() { precision: 10 }); - assert.equal(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(result.css.toString().trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -1569,7 +1569,7 @@ describe('api', function() { indentType: 'tab' }); - assert.equal(result.css.toString().trim(), 'div {\n\t\t\t\t\t\t\tcolor: transparent; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n\t\t\t\t\t\t\tcolor: transparent; }'); done(); }); @@ -1579,7 +1579,7 @@ describe('api', function() { linefeed: 'lfcr' }); - assert.equal(result.css.toString().trim(), 'div {\n\r color: transparent; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n\r color: transparent; }'); done(); }); }); @@ -1598,7 +1598,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); @@ -1613,7 +1613,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); @@ -1627,7 +1627,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); @@ -1641,7 +1641,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); @@ -1655,7 +1655,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); @@ -1669,7 +1669,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); @@ -1683,7 +1683,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); @@ -1695,7 +1695,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); @@ -1707,7 +1707,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); @@ -1719,7 +1719,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); + assert.strictEqual(result.css.toString().trim(), '/* foo.scss */\n/* bar.scss */'); done(); }); @@ -1738,7 +1738,7 @@ describe('api', function() { ] }); - assert.equal(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: yellow; }\n\ndiv {\n color: yellow; }'); done(); }); @@ -1748,12 +1748,12 @@ describe('api', function() { sass.renderSync({ file: fixture('include-files/index.scss'), importer: function() { - assert.equal(fxt, this.options.file); + assert.strictEqual(fxt, this.options.file); sync = true; return {}; } }); - assert.equal(sync, true); + assert.strictEqual(sync, true); done(); }); @@ -1798,7 +1798,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), 'div {\n width: 50px; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n width: 50px; }'); done(); }); @@ -1819,7 +1819,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), 'h2, h3, h4, h5 {\n color: #08c; }'); + assert.strictEqual(result.css.toString().trim(), 'h2, h3, h4, h5 {\n color: #08c; }'); done(); }); @@ -1833,7 +1833,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), 'div {\n color: 42em; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: 42em; }'); done(); }); @@ -1847,7 +1847,7 @@ describe('api', function() { } }); - assert.equal(result.css.toString().trim(), 'div {\n color: 42em; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n color: 42em; }'); done(); }); @@ -1926,7 +1926,7 @@ describe('api', function() { it('should call custom functions with correct context', function(done) { function assertExpected(result) { - assert.equal(result.css.toString().trim(), 'div {\n foo1: 1;\n foo2: 2; }'); + assert.strictEqual(result.css.toString().trim(), 'div {\n foo1: 1;\n foo2: 2; }'); } var options = { data: 'div { foo1: foo(); foo2: foo(); }', @@ -1964,12 +1964,12 @@ describe('api', function() { it('should provide a duration', function(done) { assert.strictEqual(typeof result.stats.duration, 'number'); - assert.equal(result.stats.end - result.stats.start, result.stats.duration); + assert.strictEqual(result.stats.end - result.stats.start, result.stats.duration); done(); }); it('should contain the given entry file', function(done) { - assert.equal(result.stats.entry, resolveFixture('include-files/index.scss')); + assert.strictEqual(result.stats.entry, resolveFixture('include-files/index.scss')); done(); }); @@ -1981,9 +1981,9 @@ describe('api', function() { ].sort(); var actual = result.stats.includedFiles.sort(); - assert.equal(actual[0], expected[0]); - assert.equal(actual[1], expected[1]); - assert.equal(actual[2], expected[2]); + assert.strictEqual(actual[0], expected[0]); + assert.strictEqual(actual[1], expected[1]); + assert.strictEqual(actual[2], expected[2]); done(); }); @@ -2003,7 +2003,7 @@ describe('api', function() { data: read(fixture('simple/index.scss'), 'utf8') }); - assert.equal(result.stats.entry, 'data'); + assert.strictEqual(result.stats.entry, 'data'); done(); }); diff --git a/test/cli.js b/test/cli.js index e15fbb093..f70f5386f 100644 --- a/test/cli.js +++ b/test/cli.js @@ -22,7 +22,7 @@ describe('cli', function() { bin.stdout.setEncoding('utf8'); bin.stdout.once('data', function(data) { - assert.equal(data.trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(data.trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -36,7 +36,7 @@ describe('cli', function() { bin.stdout.setEncoding('utf8'); bin.stdout.once('data', function(data) { - assert.equal(data.trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(data.trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -50,7 +50,7 @@ describe('cli', function() { bin.stdout.setEncoding('utf8'); bin.stdout.once('data', function(data) { - assert.equal(data.trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(data.trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -64,7 +64,7 @@ describe('cli', function() { bin.stdout.setEncoding('utf8'); bin.stdout.once('data', function(data) { - assert.equal(data.trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(data.trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -78,7 +78,7 @@ describe('cli', function() { bin.stdout.setEncoding('utf8'); bin.stdout.once('data', function(data) { - assert.equal(data.trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(data.trim(), expected.replace(/\r\n/g, '\n')); done(); }); @@ -95,7 +95,7 @@ describe('cli', function() { bin.stdout.setEncoding('utf8'); bin.stdout.once('data', function(data) { - assert.equal(data.trim(), 'div {\n\t\t\t\t\t\t\tcolor: transparent; }'); + assert.strictEqual(data.trim(), 'div {\n\t\t\t\t\t\t\tcolor: transparent; }'); done(); }); @@ -112,7 +112,7 @@ describe('cli', function() { bin.stdout.setEncoding('utf8'); bin.stdout.once('data', function(data) { - assert.equal(data.trim(), 'div {\n\r color: transparent; }'); + assert.strictEqual(data.trim(), 'div {\n\r color: transparent; }'); done(); }); @@ -157,7 +157,7 @@ describe('cli', function() { bin.stdout.setEncoding('utf8'); bin.stdout.once('data', function(data) { - assert.equal(data.trim(), expected.replace(/\r\n/g, '\n')); + assert.strictEqual(data.trim(), expected.replace(/\r\n/g, '\n')); done(); }); }); @@ -173,7 +173,7 @@ describe('cli', function() { }); bin.once('close', function() { - assert.equal(didEmit, false); + assert.strictEqual(didEmit, false); fs.unlinkSync(dest); done(); }); @@ -190,7 +190,7 @@ describe('cli', function() { }); bin.once('close', function() { - assert.equal(didEmit, true); + assert.strictEqual(didEmit, true); done(); }); }); @@ -249,7 +249,7 @@ describe('cli', function() { setTimeout(function() { fs.appendFileSync(src, 'body {}'); setTimeout(function() { - assert.equal(didEmit, false); + assert.strictEqual(didEmit, false); bin.kill(); done(); fs.unlinkSync(src); @@ -399,8 +399,8 @@ describe('cli', function() { var bin = spawn(cli, [src, '--output', path.dirname(destCss), '--source-map', destMap]); bin.once('close', function() { - assert.equal(read(destCss, 'utf8').trim(), expectedCss); - assert.equal(read(destMap, 'utf8').trim(), expectedMap); + assert.strictEqual(read(destCss, 'utf8').trim(), expectedCss); + assert.strictEqual(read(destMap, 'utf8').trim(), expectedMap); fs.unlinkSync(destCss); fs.unlinkSync(destMap); done(); @@ -438,8 +438,8 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(destCss, 'utf8').trim(), expectedCss); - assert.equal(JSON.parse(read(destMap, 'utf8')).sourceRoot, expectedUrl); + assert.strictEqual(read(destCss, 'utf8').trim(), expectedCss); + assert.strictEqual(JSON.parse(read(destMap, 'utf8')).sourceRoot, expectedUrl); fs.unlinkSync(destCss); fs.unlinkSync(destMap); done(); @@ -461,7 +461,7 @@ describe('cli', function() { }); bin.once('close', function() { - assert.equal(result.trim().replace(/\r\n/g, '\n'), expectedCss); + assert.strictEqual(result.trim().replace(/\r\n/g, '\n'), expectedCss); done(); }); }); @@ -504,7 +504,7 @@ describe('cli', function() { bin.once('close', function() { var map = JSON.parse(read(fixture('input-directory/map/nested/three.css.map'), 'utf8')); - assert.equal(map.file, '../../css/nested/three.css'); + assert.strictEqual(map.file, '../../css/nested/three.css'); rimraf.sync(dest); rimraf.sync(destMap); done(); @@ -518,7 +518,7 @@ describe('cli', function() { bin.once('close', function() { var files = fs.readdirSync(dest); - assert.equal(files.indexOf('_skipped.css'), -1); + assert.strictEqual(files.indexOf('_skipped.css'), -1); rimraf.sync(dest); done(); }); @@ -558,7 +558,7 @@ describe('cli', function() { bin.once('close', function(code) { assert.notStrictEqual(code, 0); - assert.equal(glob.sync(fixture('input-directory/**/*.css')).length, 0); + assert.strictEqual(glob.sync(fixture('input-directory/**/*.css')).length, 0); done(); }); }); @@ -642,7 +642,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expectedData); + assert.strictEqual(read(dest, 'utf8').trim(), expectedData); fs.unlinkSync(dest); done(); }); @@ -656,7 +656,7 @@ describe('cli', function() { bin.once('close', function() { if (fs.existsSync(dest)) { - assert.equal(read(dest, 'utf8').trim(), expectedFile); + assert.strictEqual(read(dest, 'utf8').trim(), expectedFile); fs.unlinkSync(dest); } @@ -671,7 +671,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expectedData); + assert.strictEqual(read(dest, 'utf8').trim(), expectedData); fs.unlinkSync(dest); done(); }); @@ -684,7 +684,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expectedData); + assert.strictEqual(read(dest, 'utf8').trim(), expectedData); fs.unlinkSync(dest); done(); }); @@ -698,7 +698,7 @@ describe('cli', function() { bin.once('close', function() { if (fs.existsSync(dest)) { - assert.equal(read(dest, 'utf8').trim(), expectedFile); + assert.strictEqual(read(dest, 'utf8').trim(), expectedFile); fs.unlinkSync(dest); } @@ -713,7 +713,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expectedData); + assert.strictEqual(read(dest, 'utf8').trim(), expectedData); fs.unlinkSync(dest); done(); }); @@ -726,7 +726,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expectedData); + assert.strictEqual(read(dest, 'utf8').trim(), expectedData); fs.unlinkSync(dest); done(); }); @@ -751,7 +751,7 @@ describe('cli', function() { ]); bin.stderr.once('data', function(code) { - assert.equal(JSON.parse(code).message, 'doesn\'t exist!'); + assert.strictEqual(JSON.parse(code).message, 'doesn\'t exist!'); done(); }); }); @@ -768,7 +768,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expected); + assert.strictEqual(read(dest, 'utf8').trim(), expected); fs.unlinkSync(dest); done(); }); @@ -784,7 +784,7 @@ describe('cli', function() { ]); bin.once('close', function() { - assert.equal(read(dest, 'utf8').trim(), expected); + assert.strictEqual(read(dest, 'utf8').trim(), expected); fs.unlinkSync(dest); done(); }); diff --git a/test/runtime.js b/test/runtime.js index c4ae9d557..37e12d7d7 100644 --- a/test/runtime.js +++ b/test/runtime.js @@ -26,25 +26,25 @@ describe('runtime parameters', function() { }); it('command line argument', function() { - assert.equal(sass.getBinaryName(), 'aaa_binding.node'); + assert.strictEqual(sass.getBinaryName(), 'aaa_binding.node'); }); it('environment variable', function() { process.argv = []; - assert.equal(sass.getBinaryName(), 'bbb_binding.node'); + assert.strictEqual(sass.getBinaryName(), 'bbb_binding.node'); }); it('npm config variable', function() { process.argv = []; process.env.SASS_BINARY_NAME = null; - assert.equal(sass.getBinaryName(), 'ccc_binding.node'); + assert.strictEqual(sass.getBinaryName(), 'ccc_binding.node'); }); it('package.json', function() { process.argv = []; process.env.SASS_BINARY_NAME = null; process.env.npm_config_sass_binary_name = null; - assert.equal(sass.getBinaryName(), 'ddd_binding.node'); + assert.strictEqual(sass.getBinaryName(), 'ddd_binding.node'); }); }); @@ -58,20 +58,20 @@ describe('runtime parameters', function() { it('command line argument', function() { var URL = 'http://aaa.example.com:9999'; - assert.equal(sass.getBinaryUrl().substr(0, URL.length), URL); + assert.strictEqual(sass.getBinaryUrl().substr(0, URL.length), URL); }); it('environment variable', function() { process.argv = []; var URL = 'http://bbb.example.com:8888'; - assert.equal(sass.getBinaryUrl().substr(0, URL.length), URL); + assert.strictEqual(sass.getBinaryUrl().substr(0, URL.length), URL); }); it('npm config variable', function() { process.argv = []; process.env.SASS_BINARY_SITE = null; var URL = 'http://ccc.example.com:7777'; - assert.equal(sass.getBinaryUrl().substr(0, URL.length), URL); + assert.strictEqual(sass.getBinaryUrl().substr(0, URL.length), URL); }); it('package.json', function() { @@ -79,7 +79,7 @@ describe('runtime parameters', function() { process.env.SASS_BINARY_SITE = null; process.env.npm_config_sass_binary_site = null; var URL = 'http://ddd.example.com:6666'; - assert.equal(sass.getBinaryUrl().substr(0, URL.length), URL); + assert.strictEqual(sass.getBinaryUrl().substr(0, URL.length), URL); }); }); @@ -92,25 +92,25 @@ describe('runtime parameters', function() { }); it('command line argument', function() { - assert.equal(sass.getBinaryDir(), 'aaa'); + assert.strictEqual(sass.getBinaryDir(), 'aaa'); }); it('environment variable', function() { process.argv = []; - assert.equal(sass.getBinaryDir(), 'bbb'); + assert.strictEqual(sass.getBinaryDir(), 'bbb'); }); it('npm config variable', function() { process.argv = []; process.env.SASS_BINARY_DIR = null; - assert.equal(sass.getBinaryDir(), 'ccc'); + assert.strictEqual(sass.getBinaryDir(), 'ccc'); }); it('package.json', function() { process.argv = []; process.env.SASS_BINARY_DIR = null; process.env.npm_config_sass_binary_dir = null; - assert.equal(sass.getBinaryDir(), 'ddd'); + assert.strictEqual(sass.getBinaryDir(), 'ddd'); }); }); @@ -123,25 +123,25 @@ describe('runtime parameters', function() { }); it('command line argument', function() { - assert.equal(sass.getBinaryPath(), 'aaa_binding.node'); + assert.strictEqual(sass.getBinaryPath(), 'aaa_binding.node'); }); it('environment variable', function() { process.argv = []; - assert.equal(sass.getBinaryPath(), 'bbb_binding.node'); + assert.strictEqual(sass.getBinaryPath(), 'bbb_binding.node'); }); it('npm config variable', function() { process.argv = []; process.env.SASS_BINARY_PATH = null; - assert.equal(sass.getBinaryPath(), 'ccc_binding.node'); + assert.strictEqual(sass.getBinaryPath(), 'ccc_binding.node'); }); it('package.json', function() { process.argv = []; process.env.SASS_BINARY_PATH = null; process.env.npm_config_sass_binary_path = null; - assert.equal(sass.getBinaryPath(), 'ddd_binding.node'); + assert.strictEqual(sass.getBinaryPath(), 'ddd_binding.node'); }); }); @@ -160,11 +160,11 @@ describe('runtime parameters', function() { it('npm config variable', function() { var overridenCachePath = '/foo/bar/'; process.env.npm_config_sass_binary_cache = overridenCachePath; - assert.equal(sass.getCachePath(), overridenCachePath); + assert.strictEqual(sass.getCachePath(), overridenCachePath); }); it('With no value, falls back to NPM cache', function() { - assert.equal(sass.getCachePath(), npmCacheDir); + assert.strictEqual(sass.getCachePath(), npmCacheDir); }); }); }); diff --git a/test/types.js b/test/types.js index b1863af3b..16de3f908 100644 --- a/test/types.js +++ b/test/types.js @@ -11,23 +11,23 @@ describe('sass.types', function() { }); it('names the constructor correctly', function() { - assert.equal(sass.types.Boolean.name, 'SassBoolean'); + assert.strictEqual(sass.types.Boolean.name, 'SassBoolean'); }); it('supports call constructor', function() { var t = sass.types.Boolean(true); - assert.equal(t.toString(), '[object SassBoolean]'); + assert.strictEqual(t.toString(), '[object SassBoolean]'); var f = sass.types.Boolean(false); - assert.equal(f.toString(), '[object SassBoolean]'); + assert.strictEqual(f.toString(), '[object SassBoolean]'); }); it('has true and false singletons', function() { - assert.equal(sass.types.Boolean(true), sass.types.Boolean(true)); - assert.equal(sass.types.Boolean(false), sass.types.Boolean(false)); - assert.notEqual(sass.types.Boolean(false), sass.types.Boolean(true)); - assert.equal(sass.types.Boolean(true), sass.types.Boolean.TRUE); - assert.equal(sass.types.Boolean(false), sass.types.Boolean.FALSE); + assert.strictEqual(sass.types.Boolean(true), sass.types.Boolean(true)); + assert.strictEqual(sass.types.Boolean(false), sass.types.Boolean(false)); + assert.notStrictEqual(sass.types.Boolean(false), sass.types.Boolean(true)); + assert.strictEqual(sass.types.Boolean(true), sass.types.Boolean.TRUE); + assert.strictEqual(sass.types.Boolean(false), sass.types.Boolean.FALSE); }); it('supports DOES NOT support new constructor', function() { @@ -35,7 +35,7 @@ describe('sass.types', function() { new sass.types.Boolean(true); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Cannot instantiate SassBoolean'); + assert.strictEqual(error.message, 'Cannot instantiate SassBoolean'); return true; }); }); @@ -45,7 +45,7 @@ describe('sass.types', function() { sass.types.Boolean(); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected one boolean argument'); + assert.strictEqual(error.message, 'Expected one boolean argument'); return true; }); @@ -54,7 +54,7 @@ describe('sass.types', function() { sass.types.Boolean(arg); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected one boolean argument'); + assert.strictEqual(error.message, 'Expected one boolean argument'); return true; }); }); @@ -63,19 +63,19 @@ describe('sass.types', function() { sass.types.Boolean(true, false); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected one boolean argument'); + assert.strictEqual(error.message, 'Expected one boolean argument'); return true; }); }); it('implements getValue', function() { var t = sass.types.Boolean(true); - assert.equal(typeof t.getValue, 'function'); - assert.equal(t.getValue(), true); + assert.strictEqual(typeof t.getValue, 'function'); + assert.strictEqual(t.getValue(), true); var f = sass.types.Boolean(false); - assert.equal(typeof f.getValue, 'function'); - assert.equal(f.getValue(), false); + assert.strictEqual(typeof f.getValue, 'function'); + assert.strictEqual(f.getValue(), false); }); }); @@ -85,61 +85,61 @@ describe('sass.types', function() { }); it('names the constructor correctly', function() { - assert.equal(sass.types.Color.name, 'SassColor'); + assert.strictEqual(sass.types.Color.name, 'SassColor'); }); it('supports call constructor', function() { var t = sass.types.Color(); - assert.equal(t.toString(), '[object SassColor]'); + assert.strictEqual(t.toString(), '[object SassColor]'); }); it('supports new constructor', function() { var t = new sass.types.Color(1); - assert.equal(t.toString(), '[object SassColor]'); + assert.strictEqual(t.toString(), '[object SassColor]'); }); it('supports variadic constructor args', function() { var a = new sass.types.Color(); - assert.equal(a.getR(), 0); - assert.equal(a.getG(), 0); - assert.equal(a.getB(), 0); - assert.equal(a.getA(), 1); + assert.strictEqual(a.getR(), 0); + assert.strictEqual(a.getG(), 0); + assert.strictEqual(a.getB(), 0); + assert.strictEqual(a.getA(), 1); var b = new sass.types.Color(1); - assert.equal(b.getR(), 0); - assert.equal(b.getG(), 0); - assert.equal(b.getB(), 1); - assert.equal(b.getA(), 0); // why ? + assert.strictEqual(b.getR(), 0); + assert.strictEqual(b.getG(), 0); + assert.strictEqual(b.getB(), 1); + assert.strictEqual(b.getA(), 0); // why ? assert.throws(function() { new sass.types.Color(1, 2); }, function(error) { // assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Constructor should be invoked with either 0, 1, 3 or 4 arguments.'); + assert.strictEqual(error.message, 'Constructor should be invoked with either 0, 1, 3 or 4 arguments.'); return true; }); var c = new sass.types.Color(1, 2, 3); - assert.equal(c.getR(), 1); - assert.equal(c.getG(), 2); - assert.equal(c.getB(), 3); - assert.equal(c.getA(), 1); + assert.strictEqual(c.getR(), 1); + assert.strictEqual(c.getG(), 2); + assert.strictEqual(c.getB(), 3); + assert.strictEqual(c.getA(), 1); var d = new sass.types.Color(1, 2, 3, 4); - assert.equal(d.getR(), 1); - assert.equal(d.getG(), 2); - assert.equal(d.getB(), 3); - assert.equal(d.getA(), 4); + assert.strictEqual(d.getR(), 1); + assert.strictEqual(d.getG(), 2); + assert.strictEqual(d.getB(), 3); + assert.strictEqual(d.getA(), 4); assert.throws(function() { new sass.types.Color(1, 2, 3, 4, 5); }, function(error) { // assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Constructor should be invoked with either 0, 1, 3 or 4 arguments.'); + assert.strictEqual(error.message, 'Constructor should be invoked with either 0, 1, 3 or 4 arguments.'); return true; }); }); @@ -147,38 +147,38 @@ describe('sass.types', function() { it('supports get{R,G,B,A} and set{R,G,B,A}', function() { var c = new sass.types.Color(); - assert.equal(c.getR(), 0); - assert.equal(c.getG(), 0); - assert.equal(c.getB(), 0); - assert.equal(c.getA(), 1); + assert.strictEqual(c.getR(), 0); + assert.strictEqual(c.getG(), 0); + assert.strictEqual(c.getB(), 0); + assert.strictEqual(c.getA(), 1); - assert.equal(c.setR(1), undefined); + assert.strictEqual(c.setR(1), undefined); - assert.equal(c.getR(), 1); - assert.equal(c.getG(), 0); - assert.equal(c.getB(), 0); - assert.equal(c.getA(), 1); + assert.strictEqual(c.getR(), 1); + assert.strictEqual(c.getG(), 0); + assert.strictEqual(c.getB(), 0); + assert.strictEqual(c.getA(), 1); - assert.equal(c.setG(1), undefined); + assert.strictEqual(c.setG(1), undefined); - assert.equal(c.getR(), 1); - assert.equal(c.getG(), 1); - assert.equal(c.getB(), 0); - assert.equal(c.getA(), 1); + assert.strictEqual(c.getR(), 1); + assert.strictEqual(c.getG(), 1); + assert.strictEqual(c.getB(), 0); + assert.strictEqual(c.getA(), 1); - assert.equal(c.setB(1), undefined); + assert.strictEqual(c.setB(1), undefined); - assert.equal(c.getR(), 1); - assert.equal(c.getG(), 1); - assert.equal(c.getB(), 1); - assert.equal(c.getA(), 1); + assert.strictEqual(c.getR(), 1); + assert.strictEqual(c.getG(), 1); + assert.strictEqual(c.getB(), 1); + assert.strictEqual(c.getA(), 1); - assert.equal(c.setA(0), undefined); + assert.strictEqual(c.setA(0), undefined); - assert.equal(c.getR(), 1); - assert.equal(c.getG(), 1); - assert.equal(c.getB(), 1); - assert.equal(c.getA(), 0); + assert.strictEqual(c.getR(), 1); + assert.strictEqual(c.getG(), 1); + assert.strictEqual(c.getB(), 1); + assert.strictEqual(c.getA(), 0); }); it('throws with incorrect set{R,G,B,A} arguments', function() { @@ -189,7 +189,7 @@ describe('sass.types', function() { cb(); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected just one argument'); + assert.strictEqual(error.message, 'Expected just one argument'); return true; }); @@ -200,7 +200,7 @@ describe('sass.types', function() { cb(); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Supplied value should be a number'); + assert.strictEqual(error.message, 'Supplied value should be a number'); return true; }, 'argument was: ' + arg); @@ -231,13 +231,13 @@ describe('sass.types', function() { }); it('has a correctly named constructor', function() { - assert.equal(sass.types.Error.name, 'SassError'); + assert.strictEqual(sass.types.Error.name, 'SassError'); }); it('supports call constructor', function() { var e = sass.types.Error('Such Error'); assert.ok(e instanceof sass.types.Error); - assert.equal(e.toString(), '[object SassError]'); + assert.strictEqual(e.toString(), '[object SassError]'); // TODO: I'm not sure this object works well, it likely needs to be fleshed out more... }); @@ -245,7 +245,7 @@ describe('sass.types', function() { it('supports new constructor', function() { var e = new sass.types.Error('Such Error'); assert.ok(e instanceof sass.types.Error); - assert.equal(e.toString(), '[object SassError]'); + assert.strictEqual(e.toString(), '[object SassError]'); // TODO: I'm not sure this object works well, it likely needs to be fleshed out more... }); }); @@ -256,43 +256,43 @@ describe('sass.types', function() { }); it('has a corectly named constructor', function() { - assert.equal(sass.types.List.name, 'SassList'); + assert.strictEqual(sass.types.List.name, 'SassList'); }); it('support call constructor', function() { var list = sass.types.List(); assert.ok(list instanceof sass.types.List); - assert.equal(list.toString(), '[object SassList]'); + assert.strictEqual(list.toString(), '[object SassList]'); }); it('support new constructor', function() { var list = new sass.types.List(); assert.ok(list instanceof sass.types.List); - assert.equal(list.toString(), '[object SassList]'); + assert.strictEqual(list.toString(), '[object SassList]'); }); it('support variadic constructor', function() { var a = new sass.types.List(); - assert.equal(a.getLength(), 0); - assert.equal(a.getSeparator(), true); + assert.strictEqual(a.getLength(), 0); + assert.strictEqual(a.getSeparator(), true); var b = new sass.types.List(1); - assert.equal(b.getSeparator(), true); - assert.equal(b.getLength(), 1); + assert.strictEqual(b.getSeparator(), true); + assert.strictEqual(b.getLength(), 1); var c = new sass.types.List(1, true); - assert.equal(b.getLength(), 1); - assert.equal(c.getSeparator(), true); + assert.strictEqual(b.getLength(), 1); + assert.strictEqual(c.getSeparator(), true); var d = new sass.types.List(1, false); - assert.equal(b.getLength(), 1); - assert.equal(d.getSeparator(), false); + assert.strictEqual(b.getLength(), 1); + assert.strictEqual(d.getSeparator(), false); var e = new sass.types.List(1, true, 2); - assert.equal(b.getLength(), 1); - assert.equal(e.getSeparator(), true); + assert.strictEqual(b.getLength(), 1); + assert.strictEqual(e.getSeparator(), true); assert.throws(function() { new sass.types.List('not-a-number'); }, function(error) { // TODO: TypeError - assert.equal(error.message, 'First argument should be an integer.'); + assert.strictEqual(error.message, 'First argument should be an integer.'); return true; }); @@ -300,24 +300,24 @@ describe('sass.types', function() { new sass.types.List(1, 'not-a-boolean'); }, function(error) { // TODO: TypeError - assert.equal(error.message, 'Second argument should be a boolean.'); + assert.strictEqual(error.message, 'Second argument should be a boolean.'); return true; }); }); it('supports {get,set}Separator', function() { var a = new sass.types.List(); - assert.equal(a.getSeparator(), true); - assert.equal(a.setSeparator(true), undefined); - assert.equal(a.getSeparator(), true); - assert.equal(a.setSeparator(false), undefined); - assert.equal(a.getSeparator(), false); + assert.strictEqual(a.getSeparator(), true); + assert.strictEqual(a.setSeparator(true), undefined); + assert.strictEqual(a.getSeparator(), true); + assert.strictEqual(a.setSeparator(false), undefined); + assert.strictEqual(a.getSeparator(), false); assert.throws(function() { a.setSeparator(); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected just one argument'); + assert.strictEqual(error.message, 'Expected just one argument'); return true; }); @@ -326,7 +326,7 @@ describe('sass.types', function() { a.setSeparator(arg); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Supplied value should be a boolean'); + assert.strictEqual(error.message, 'Supplied value should be a boolean'); return true; }, 'setSeparator(' + arg + ')'); }); @@ -339,7 +339,7 @@ describe('sass.types', function() { a.getValue(); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected just one argument'); + assert.strictEqual(error.message, 'Expected just one argument'); return true; }); @@ -349,7 +349,7 @@ describe('sass.types', function() { a.getValue(arg); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Supplied index should be an integer'); + assert.strictEqual(error.message, 'Supplied index should be an integer'); return true; }, 'getValue(' + arg + ')'); @@ -359,7 +359,7 @@ describe('sass.types', function() { a.getValue(0); }, function(error) { assert.ok(error instanceof RangeError); - assert.equal(error.message, 'Out of bound index'); + assert.strictEqual(error.message, 'Out of bound index'); return true; }); @@ -368,7 +368,7 @@ describe('sass.types', function() { a.getValue(-1); }, function(error) { assert.ok(error instanceof RangeError); - assert.equal(error.message, 'Out of bound index'); + assert.strictEqual(error.message, 'Out of bound index'); return true; }); @@ -377,7 +377,7 @@ describe('sass.types', function() { a.setValue(); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected two arguments'); + assert.strictEqual(error.message, 'Expected two arguments'); return true; }); @@ -385,7 +385,7 @@ describe('sass.types', function() { a.setValue(1); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected two arguments'); + assert.strictEqual(error.message, 'Expected two arguments'); return true; }); @@ -393,7 +393,7 @@ describe('sass.types', function() { a.setValue(0, 'no-a-sass-value'); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Supplied value should be a SassValue object'); + assert.strictEqual(error.message, 'Supplied value should be a SassValue object'); return true; }); }); @@ -407,17 +407,17 @@ describe('sass.types', function() { }); it('has a correctly named constructor', function() { - assert.equal(sass.types.Map.name, 'SassMap'); + assert.strictEqual(sass.types.Map.name, 'SassMap'); }); it('supports call constructor', function() { var x = sass.types.Map(); - assert.equal(x.toString(), '[object SassMap]'); + assert.strictEqual(x.toString(), '[object SassMap]'); }); it('supports new constructor', function() { var x = new sass.types.Map(); - assert.equal(x.toString(), '[object SassMap]'); + assert.strictEqual(x.toString(), '[object SassMap]'); }); it('supports an optional constructor argument', function() { @@ -428,23 +428,23 @@ describe('sass.types', function() { assert.throws(function() { new sass.types.Map('OMG'); }, function(error) { - assert.equal(error.message, 'First argument should be an integer.'); + assert.strictEqual(error.message, 'First argument should be an integer.'); // TODO: TypeError return true; }); - assert.equal(x.getLength(), 0); - assert.equal(y.getLength(), 1); - assert.equal(z.getLength(), 2); + assert.strictEqual(x.getLength(), 0); + assert.strictEqual(y.getLength(), 1); + assert.strictEqual(z.getLength(), 2); }); it('supports length', function() { var y = new sass.types.Map(1); var z = new sass.types.Map(2); - assert.equal(y.getLength(), 1); - assert.equal(z.getLength(), 2); + assert.strictEqual(y.getLength(), 1); + assert.strictEqual(z.getLength(), 2); }); it('supports {get,set}Value {get,set}Key', function() { @@ -461,7 +461,7 @@ describe('sass.types', function() { }); it('has a correctly named constructor', function() { - assert.equal(sass.types.Null.name, 'SassNull'); + assert.strictEqual(sass.types.Null.name, 'SassNull'); }); it('does not support new constructor', function() { @@ -469,14 +469,14 @@ describe('sass.types', function() { new sass.types.Null(); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Cannot instantiate SassNull'); + assert.strictEqual(error.message, 'Cannot instantiate SassNull'); return true; }); }); it('supports call constructor (and is a singleton)', function() { - assert.equal(sass.types.Null(), sass.types.Null()); - assert.equal(sass.types.Null(), sass.types.Null.NULL); + assert.strictEqual(sass.types.Null(), sass.types.Null()); + assert.strictEqual(sass.types.Null(), sass.types.Null.NULL); }); }); @@ -486,17 +486,17 @@ describe('sass.types', function() { }); it('has a correctly named constructor', function() { - assert.equal(sass.types.Number.name, 'SassNumber'); + assert.strictEqual(sass.types.Number.name, 'SassNumber'); }); it('supports new constructor', function() { var number = new sass.types.Number(); - assert.equal(number.toString(), '[object SassNumber]'); + assert.strictEqual(number.toString(), '[object SassNumber]'); }); it('supports call constructor', function() { var number = sass.types.Number(); - assert.equal(number.toString(), '[object SassNumber]'); + assert.strictEqual(number.toString(), '[object SassNumber]'); }); it('supports multiple constructor arguments', function() { @@ -508,7 +508,7 @@ describe('sass.types', function() { new sass.types.Number('OMG'); }, function(error) { // TODO: TypeError - assert.equal(error.message, 'First argument should be a number.'); + assert.strictEqual(error.message, 'First argument should be a number.'); return true; }); @@ -516,36 +516,36 @@ describe('sass.types', function() { new sass.types.Number(1, 2); }, function(error) { // TODO: TypeError - assert.equal(error.message, 'Second argument should be a string.'); + assert.strictEqual(error.message, 'Second argument should be a string.'); return true; }); - assert.equal(a.getValue(), 0); - assert.equal(a.getUnit(), ''); - assert.equal(b.getValue(), 1); - assert.equal(b.getUnit(), ''); - assert.equal(c.getValue(), 2); - assert.equal(c.getUnit(), 'px'); + assert.strictEqual(a.getValue(), 0); + assert.strictEqual(a.getUnit(), ''); + assert.strictEqual(b.getValue(), 1); + assert.strictEqual(b.getUnit(), ''); + assert.strictEqual(c.getValue(), 2); + assert.strictEqual(c.getUnit(), 'px'); }); it('supports get{Unit,Value}, set{Unit,Value}', function() { var number = new sass.types.Number(1, 'px'); - assert.equal(number.getValue(), 1); - assert.equal(number.getUnit(), 'px'); + assert.strictEqual(number.getValue(), 1); + assert.strictEqual(number.getUnit(), 'px'); number.setValue(2); - assert.equal(number.getValue(), 2); - assert.equal(number.getUnit(), 'px'); + assert.strictEqual(number.getValue(), 2); + assert.strictEqual(number.getUnit(), 'px'); number.setUnit('em'); - assert.equal(number.getValue(), 2); - assert.equal(number.getUnit(), 'em'); + assert.strictEqual(number.getValue(), 2); + assert.strictEqual(number.getUnit(), 'em'); assert.throws(function() { number.setValue('OMG'); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Supplied value should be a number'); + assert.strictEqual(error.message, 'Supplied value should be a number'); return true; }); @@ -553,7 +553,7 @@ describe('sass.types', function() { number.setValue(); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected just one argument'); + assert.strictEqual(error.message, 'Expected just one argument'); return true; }); @@ -561,7 +561,7 @@ describe('sass.types', function() { number.setUnit(); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected just one argument'); + assert.strictEqual(error.message, 'Expected just one argument'); return true; }); @@ -569,7 +569,7 @@ describe('sass.types', function() { number.setUnit(1); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Supplied value should be a string'); + assert.strictEqual(error.message, 'Supplied value should be a string'); return true; }); }); @@ -581,21 +581,21 @@ describe('sass.types', function() { }); it('has a properly named constructor', function() { - assert.equal(sass.types.String.name, 'SassString'); + assert.strictEqual(sass.types.String.name, 'SassString'); }); it('supports call constructor', function() { var x = sass.types.String('OMG'); - assert.equal(x.toString(), '[object SassString]'); - assert.equal(x.getValue(), 'OMG'); + assert.strictEqual(x.toString(), '[object SassString]'); + assert.strictEqual(x.getValue(), 'OMG'); }); it('supports new constructor', function() { var x = new sass.types.String('OMG'); - assert.equal(x.toString(), '[object SassString]'); - assert.equal(x.getValue(), 'OMG'); + assert.strictEqual(x.toString(), '[object SassString]'); + assert.strictEqual(x.getValue(), 'OMG'); }); it('supports multiple constructor arg combinations', function() { @@ -608,7 +608,7 @@ describe('sass.types', function() { new sass.types.String(arg); }, function(error) { // TODO: TypeError - assert.equal(error.message, 'Argument should be a string.'); + assert.strictEqual(error.message, 'Argument should be a string.'); return true; }); }); @@ -617,17 +617,17 @@ describe('sass.types', function() { it('supports {get,set}Value', function() { var x = new sass.types.String(); - assert.equal(x.getValue(), ''); - assert.equal(x.setValue('hi'), undefined); - assert.equal(x.getValue(), 'hi'); - assert.equal(x.setValue('bye'), undefined); - assert.equal(x.getValue(), 'bye'); + assert.strictEqual(x.getValue(), ''); + assert.strictEqual(x.setValue('hi'), undefined); + assert.strictEqual(x.getValue(), 'hi'); + assert.strictEqual(x.setValue('bye'), undefined); + assert.strictEqual(x.getValue(), 'bye'); assert.throws(function() { x.setValue(); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected just one argument'); + assert.strictEqual(error.message, 'Expected just one argument'); return true; }); @@ -635,7 +635,7 @@ describe('sass.types', function() { x.setValue('hi', 'hi'); }, function(error) { assert.ok(error instanceof TypeError); - assert.equal(error.message, 'Expected just one argument'); + assert.strictEqual(error.message, 'Expected just one argument'); return true; }); }); From 2be4c8db3479b8c007fe788e308be1384c1d7dda Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 17 Sep 2020 22:44:40 -0400 Subject: [PATCH 013/102] typo: corectly -> correctly --- test/types.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/types.js b/test/types.js index 16de3f908..7c1faf6a3 100644 --- a/test/types.js +++ b/test/types.js @@ -255,7 +255,7 @@ describe('sass.types', function() { assert(sass.types.List); }); - it('has a corectly named constructor', function() { + it('has a correctly named constructor', function() { assert.strictEqual(sass.types.List.name, 'SassList'); }); From 4f183c19a7eb6ff7bb2dc06b5dd5d3da71495ade Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 17 Sep 2020 23:12:48 -0400 Subject: [PATCH 014/102] fix: assert.deepEqual to strictDeepEqual --- test/api.js | 16 +++--- test/cli.js | 14 +++--- test/downloadoptions.js | 6 +-- test/watcher.js | 106 ++++++++++++++++++++-------------------- 4 files changed, 71 insertions(+), 71 deletions(-) diff --git a/test/api.js b/test/api.js index 7df608c78..1efaf9253 100644 --- a/test/api.js +++ b/test/api.js @@ -256,7 +256,7 @@ describe('api', function() { data: src, includePaths: [fixture('include-files')] }, function(error, result) { - assert.deepEqual(result.stats.includedFiles, expected); + assert.deepStrictEqual(result.stats.includedFiles, expected); done(); }); }); @@ -372,7 +372,7 @@ describe('api', function() { } }, function(error, result) { assert.strictEqual(result.css.toString().trim(), expected); - assert.deepEqual(actualImportOrder, expectedImportOrder); + assert.deepStrictEqual(actualImportOrder, expectedImportOrder); done(); }); }); @@ -1291,7 +1291,7 @@ describe('api', function() { file: fixture('include-files/index.scss') }, function(error, result) { assert(!error); - assert.deepEqual(result.stats.includedFiles.sort(), expected.sort()); + assert.deepStrictEqual(result.stats.includedFiles.sort(), expected.sort()); done(); }); }); @@ -1302,7 +1302,7 @@ describe('api', function() { sass.render({ file: fixture('simple/index.scss') }, function(error, result) { - assert.deepEqual(result.stats.includedFiles, [expected]); + assert.deepStrictEqual(result.stats.includedFiles, [expected]); done(); }); }); @@ -1320,7 +1320,7 @@ describe('api', function() { sass.render({ data: read(fixture('simple/index.scss'), 'utf8') }, function(error, result) { - assert.deepEqual(result.stats.includedFiles, []); + assert.deepStrictEqual(result.stats.includedFiles, []); done(); }); }); @@ -1558,7 +1558,7 @@ describe('api', function() { includePaths: [fixture('include-files')] }); - assert.deepEqual(result.stats.includedFiles, expected); + assert.deepStrictEqual(result.stats.includedFiles, expected); done(); }); @@ -1994,7 +1994,7 @@ describe('api', function() { file: fixture('simple/index.scss') }); - assert.deepEqual(result.stats.includedFiles, [expected]); + assert.deepStrictEqual(result.stats.includedFiles, [expected]); done(); }); @@ -2012,7 +2012,7 @@ describe('api', function() { data: read(fixture('simple/index.scss'), 'utf8') }); - assert.deepEqual(result.stats.includedFiles, []); + assert.deepStrictEqual(result.stats.includedFiles, []); done(); }); }); diff --git a/test/cli.js b/test/cli.js index f70f5386f..9b76b68fc 100644 --- a/test/cli.js +++ b/test/cli.js @@ -346,7 +346,7 @@ describe('cli', function() { setTimeout(function() { bin.kill(); var files = fs.readdirSync(destDir); - assert.deepEqual(files, ['index.css']); + assert.deepStrictEqual(files, ['index.css']); rimraf(destDir, done); }, 200); }, 500); @@ -370,7 +370,7 @@ describe('cli', function() { setTimeout(function () { bin.kill(); var files = fs.readdirSync(destDir); - assert.deepEqual(files, ['foo.css', 'index.css']); + assert.deepStrictEqual(files, ['foo.css', 'index.css']); rimraf(destDir, done); }, 200); }, 500); @@ -487,9 +487,9 @@ describe('cli', function() { bin.once('close', function() { var files = fs.readdirSync(dest).sort(); - assert.deepEqual(files, ['one.css', 'two.css', 'nested'].sort()); + assert.deepStrictEqual(files, ['one.css', 'two.css', 'nested'].sort()); var nestedFiles = fs.readdirSync(path.join(dest, 'nested')); - assert.deepEqual(nestedFiles, ['three.css']); + assert.deepStrictEqual(nestedFiles, ['three.css']); rimraf.sync(dest); done(); }); @@ -534,7 +534,7 @@ describe('cli', function() { bin.once('close', function() { var files = fs.readdirSync(dest); - assert.deepEqual(files, ['one.css', 'two.css']); + assert.deepStrictEqual(files, ['one.css', 'two.css']); rimraf.sync(dest); done(); }); @@ -573,9 +573,9 @@ describe('cli', function() { bin.once('close', function() { var files = fs.readdirSync(outputDir).sort(); - assert.deepEqual(files, ['one.css', 'two.css', 'nested'].sort()); + assert.deepStrictEqual(files, ['one.css', 'two.css', 'nested'].sort()); var nestedFiles = fs.readdirSync(path.join(outputDir, 'nested')); - assert.deepEqual(nestedFiles, ['three.css']); + assert.deepStrictEqual(nestedFiles, ['three.css']); rimraf.sync(outputDir); fs.unlinkSync(symlink); done(); diff --git a/test/downloadoptions.js b/test/downloadoptions.js index 18daeb9af..b0e4cf4bf 100644 --- a/test/downloadoptions.js +++ b/test/downloadoptions.js @@ -16,7 +16,7 @@ describe('util', function() { encoding: null, }; - assert.deepEqual(opts(), expected); + assert.deepStrictEqual(opts(), expected); }); }); @@ -42,7 +42,7 @@ describe('util', function() { encoding: null, }; - assert.deepEqual(opts(), expected); + assert.deepStrictEqual(opts(), expected); }); }); @@ -67,7 +67,7 @@ describe('util', function() { encoding: null, }; - assert.deepEqual(opts(), expected); + assert.deepStrictEqual(opts(), expected); }); }); }); diff --git a/test/watcher.js b/test/watcher.js index c96d39875..55ad148e8 100644 --- a/test/watcher.js +++ b/test/watcher.js @@ -30,7 +30,7 @@ describe('watcher', function() { it('should record its ancestors as changed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.changed, [ + assert.deepStrictEqual(files.changed, [ path.join(main, 'one.scss'), ]); }); @@ -38,7 +38,7 @@ describe('watcher', function() { it('should record its descendants as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.added, [ + assert.deepStrictEqual(files.added, [ path.join(main, 'partials', '_three.scss'), ]); }); @@ -46,7 +46,7 @@ describe('watcher', function() { it('should record nothing as removed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.removed, []); + assert.deepStrictEqual(files.removed, []); }); }); @@ -54,7 +54,7 @@ describe('watcher', function() { it('should record itself as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.changed, [ + assert.deepStrictEqual(files.changed, [ file, ]); }); @@ -62,7 +62,7 @@ describe('watcher', function() { it('should record its descendants as added', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.added, [ + assert.deepStrictEqual(files.added, [ path.join(main, 'partials', '_one.scss'), path.join(main, 'partials', '_three.scss'), ]); @@ -71,7 +71,7 @@ describe('watcher', function() { it('should record nothing as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.removed, []); + assert.deepStrictEqual(files.removed, []); }); }); }); @@ -81,7 +81,7 @@ describe('watcher', function() { it('should not record anything', function() { var file = path.join(sibling, 'partials', '_three.scss'); var files = watcher.changed(file); - assert.deepEqual(files, { + assert.deepStrictEqual(files, { added: [], changed: [], removed: [], @@ -93,7 +93,7 @@ describe('watcher', function() { it('should record itself as changed', function() { var file = path.join(sibling, 'three.scss'); var files = watcher.changed(file); - assert.deepEqual(files, { + assert.deepStrictEqual(files, { added: [], changed: [file], removed: [], @@ -109,13 +109,13 @@ describe('watcher', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); - assert.deepEqual(files.added, []); + assert.deepStrictEqual(files.added, []); }); it('should record its descendants as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.added(file); - assert.deepEqual(files.added, [ + assert.deepStrictEqual(files.added, [ path.join(main, 'partials', '_three.scss') ]); }); @@ -123,13 +123,13 @@ describe('watcher', function() { it('should record nothing as changed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); - assert.deepEqual(files.changed, []); + assert.deepStrictEqual(files.changed, []); }); it('should record nothing as removed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); - assert.deepEqual(files.removed, []); + assert.deepStrictEqual(files.removed, []); }); }); @@ -137,13 +137,13 @@ describe('watcher', function() { it('should record nothing as added', function() { var file = path.join(main, 'three.scss'); var files = watcher.added(file); - assert.deepEqual(files.added, []); + assert.deepStrictEqual(files.added, []); }); it('should record its descendants as added', function() { var file = path.join(main, 'one.scss'); var files = watcher.added(file); - assert.deepEqual(files.added, [ + assert.deepStrictEqual(files.added, [ path.join(main, 'partials', '_one.scss'), path.join(main, 'partials', '_three.scss'), ]); @@ -152,13 +152,13 @@ describe('watcher', function() { it('should record nothing as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.added(file); - assert.deepEqual(files.changed, []); + assert.deepStrictEqual(files.changed, []); }); it('should record nothing as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.added(file); - assert.deepEqual(files.removed, []); + assert.deepStrictEqual(files.removed, []); }); }); }); @@ -170,13 +170,13 @@ describe('watcher', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.added, []); + assert.deepStrictEqual(files.added, []); }); it('should record its ancestors as changed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.changed, [ + assert.deepStrictEqual(files.changed, [ path.join(main, 'one.scss'), ]); }); @@ -184,7 +184,7 @@ describe('watcher', function() { it('should record itself as removed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.removed, [file]); + assert.deepStrictEqual(files.removed, [file]); }); }); @@ -192,19 +192,19 @@ describe('watcher', function() { it('should record nothing as added', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.added, []); + assert.deepStrictEqual(files.added, []); }); it('should record nothing as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.changed, []); + assert.deepStrictEqual(files.changed, []); }); it('should record itself as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.removed, [file]); + assert.deepStrictEqual(files.removed, [file]); }); }); }); @@ -214,7 +214,7 @@ describe('watcher', function() { it('should record nothing', function() { var file = path.join(sibling, 'partials', '_three.scss'); var files = watcher.removed(file); - assert.deepEqual(files, { + assert.deepStrictEqual(files, { added: [], changed: [], removed: [], @@ -226,7 +226,7 @@ describe('watcher', function() { it('should record nothing', function() { var file = path.join(sibling, 'three.scss'); var files = watcher.removed(file); - assert.deepEqual(files, { + assert.deepStrictEqual(files, { added: [], changed: [], removed: [], @@ -251,7 +251,7 @@ describe('watcher', function() { it('should record its descendants as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.added, [ + assert.deepStrictEqual(files.added, [ path.join(main, 'partials', '_three.scss'), ]); }); @@ -259,7 +259,7 @@ describe('watcher', function() { it('should record its ancenstors as changed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.changed, [ + assert.deepStrictEqual(files.changed, [ path.join(main, 'one.scss'), ]); }); @@ -267,7 +267,7 @@ describe('watcher', function() { it('should record nothing as removed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.removed, []); + assert.deepStrictEqual(files.removed, []); }); }); @@ -275,7 +275,7 @@ describe('watcher', function() { it('should record its descendants as added', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.added, [ + assert.deepStrictEqual(files.added, [ path.join(main, 'partials', '_one.scss'), path.join(main, 'partials', '_three.scss'), ]); @@ -284,13 +284,13 @@ describe('watcher', function() { it('should record itself as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.changed, [file]); + assert.deepStrictEqual(files.changed, [file]); }); it('should record nothing as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); - assert.deepEqual(files.removed, []); + assert.deepStrictEqual(files.removed, []); }); }); }); @@ -300,7 +300,7 @@ describe('watcher', function() { it('should record nothing', function() { var file = path.join(sibling, 'partials', '_three.scss'); var files = watcher.changed(file); - assert.deepEqual(files, { + assert.deepStrictEqual(files, { added: [], changed: [], removed: [], @@ -312,19 +312,19 @@ describe('watcher', function() { it('should record nothing as added', function() { var file = path.join(sibling, 'three.scss'); var files = watcher.changed(file); - assert.deepEqual(files.added, []); + assert.deepStrictEqual(files.added, []); }); it('should record itself as changed', function() { var file = path.join(sibling, 'three.scss'); var files = watcher.changed(file); - assert.deepEqual(files.changed, [file]); + assert.deepStrictEqual(files.changed, [file]); }); it('should record nothing as removed', function() { var file = path.join(sibling, 'three.scss'); var files = watcher.changed(file); - assert.deepEqual(files.removed, []); + assert.deepStrictEqual(files.removed, []); }); }); }); @@ -335,13 +335,13 @@ describe('watcher', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); - assert.deepEqual(files.added, []); + assert.deepStrictEqual(files.added, []); }); it('should record its descendants as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.added(file); - assert.deepEqual(files.added, [ + assert.deepStrictEqual(files.added, [ path.join(main, 'partials', '_three.scss'), ]); }); @@ -349,13 +349,13 @@ describe('watcher', function() { it('should record nothing as changed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); - assert.deepEqual(files.changed, []); + assert.deepStrictEqual(files.changed, []); }); it('should record nothing as removed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); - assert.deepEqual(files.removed, []); + assert.deepStrictEqual(files.removed, []); }); }); @@ -371,7 +371,7 @@ describe('watcher', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); - assert.deepEqual(files.added, [ + assert.deepStrictEqual(files.added, [ file, ]); }); @@ -379,7 +379,7 @@ describe('watcher', function() { it('should not record its descendants as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.added(file); - assert.deepEqual(files.added, [ + assert.deepStrictEqual(files.added, [ file, ]); }); @@ -387,13 +387,13 @@ describe('watcher', function() { it('should record nothing as changed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); - assert.deepEqual(files.changed, []); + assert.deepStrictEqual(files.changed, []); }); it('should record nothing as removed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); - assert.deepEqual(files.removed, []); + assert.deepStrictEqual(files.removed, []); }); }); @@ -401,7 +401,7 @@ describe('watcher', function() { it('should record itself as added', function() { var file = path.join(main, 'three.scss'); var files = watcher.added(file); - assert.deepEqual(files.added, [ + assert.deepStrictEqual(files.added, [ file, ]); }); @@ -409,13 +409,13 @@ describe('watcher', function() { it('should record nothing as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.added(file); - assert.deepEqual(files.changed, []); + assert.deepStrictEqual(files.changed, []); }); it('should record nothing as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.added(file); - assert.deepEqual(files.removed, []); + assert.deepStrictEqual(files.removed, []); }); }); }); @@ -427,13 +427,13 @@ describe('watcher', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.added, []); + assert.deepStrictEqual(files.added, []); }); it('should record its ancestors as changed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.changed, [ + assert.deepStrictEqual(files.changed, [ path.join(main, 'one.scss'), ]); }); @@ -441,7 +441,7 @@ describe('watcher', function() { it('should record itself as removed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.removed, [file]); + assert.deepStrictEqual(files.removed, [file]); }); }); @@ -449,19 +449,19 @@ describe('watcher', function() { it('should record nothing as added', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.added, []); + assert.deepStrictEqual(files.added, []); }); it('should record nothing as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.changed, []); + assert.deepStrictEqual(files.changed, []); }); it('should record itself as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); - assert.deepEqual(files.removed, [file]); + assert.deepStrictEqual(files.removed, [file]); }); }); }); @@ -478,7 +478,7 @@ describe('watcher', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); - assert.deepEqual(files, { + assert.deepStrictEqual(files, { added: [], changed: [], removed: [], @@ -490,7 +490,7 @@ describe('watcher', function() { it('should record nothing', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); - assert.deepEqual(files, { + assert.deepStrictEqual(files, { added: [], changed: [], removed: [], From 7effa2fd3cd4ac52b9990bac9077cdd43a683a5f Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 27 Sep 2020 17:37:32 -0400 Subject: [PATCH 015/102] fix: Read fixture as utf-8 --- test/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/api.js b/test/api.js index 1efaf9253..bcc9e290a 100644 --- a/test/api.js +++ b/test/api.js @@ -362,7 +362,7 @@ describe('api', function() { var expectedImportOrder = [ 'a', '_common', 'vars', 'struct', 'a1', 'common', 'vars', 'struct', 'b', 'b1' ]; - var expected = read(fixture('depth-first/expected.css')); + var expected = read(fixture('depth-first/expected.css'), 'utf-8'); sass.render({ file: fixture('depth-first/index.scss'), From 988aac8e669a5edaf14dd1aeecb93787a2c27352 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 27 Sep 2020 17:40:38 -0400 Subject: [PATCH 016/102] chore: Drop object-merge used by old sass-spec --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 8dad370f9..56019467d 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,6 @@ "istanbul": "^0.4.2", "mocha": "^3.1.2", "mocha-lcov-reporter": "^1.2.0", - "object-merge": "^2.5.1", "rimraf": "^2.5.2", "unique-temp-dir": "^1.0.0" } From 1c5b52268f7faf7e1ebc914430d9644d81fa1449 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 27 Sep 2020 17:51:19 -0400 Subject: [PATCH 017/102] chore: Use strict assert --- test/api.js | 2 +- test/binding.js | 2 +- test/cli.js | 2 +- test/downloadoptions.js | 2 +- test/errors.js | 2 +- test/lowlevel.js | 2 +- test/runtime.js | 2 +- test/scripts/util/proxy.js | 4 ++-- test/types.js | 2 +- test/useragent.js | 2 +- test/watcher.js | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/api.js b/test/api.js index bcc9e290a..f63bd8ce3 100644 --- a/test/api.js +++ b/test/api.js @@ -1,6 +1,6 @@ /*eslint new-cap: ["error", {"capIsNewExceptions": ["Color"]}]*/ -var assert = require('assert'), +var assert = require('assert').strict, fs = require('fs'), path = require('path'), read = fs.readFileSync, diff --git a/test/binding.js b/test/binding.js index 200c7802b..bdaf64265 100644 --- a/test/binding.js +++ b/test/binding.js @@ -1,6 +1,6 @@ /*eslint new-cap: ["error", {"capIsNewExceptions": ["Color"]}]*/ -var assert = require('assert'), +var assert = require('assert').strict, path = require('path'), etx = require('../lib/extensions'), binding = process.env.NODESASS_COV diff --git a/test/cli.js b/test/cli.js index 9b76b68fc..c4d5e9504 100644 --- a/test/cli.js +++ b/test/cli.js @@ -1,4 +1,4 @@ -var assert = require('assert'), +var assert = require('assert').strict, fs = require('fs'), path = require('path'), read = require('fs').readFileSync, diff --git a/test/downloadoptions.js b/test/downloadoptions.js index b0e4cf4bf..de8963842 100644 --- a/test/downloadoptions.js +++ b/test/downloadoptions.js @@ -1,4 +1,4 @@ -var assert = require('assert'), +var assert = require('assert').strict, ua = require('../scripts/util/useragent'), opts = require('../scripts/util/downloadoptions'); diff --git a/test/errors.js b/test/errors.js index 4570c19df..537ebb6df 100644 --- a/test/errors.js +++ b/test/errors.js @@ -1,4 +1,4 @@ -var assert = require('assert'), +var assert = require('assert').strict, path = require('path'), errors = require('../lib/errors'); diff --git a/test/lowlevel.js b/test/lowlevel.js index a849a4601..d5d15c1d8 100644 --- a/test/lowlevel.js +++ b/test/lowlevel.js @@ -1,6 +1,6 @@ process.env.NODESASS_COV ? require('../lib-cov') : require('../lib'); -var assert = require('assert'), +var assert = require('assert').strict, sass = require('../lib/extensions'), binding = require(sass.getBinaryPath()); diff --git a/test/runtime.js b/test/runtime.js index 37e12d7d7..d45b638c2 100644 --- a/test/runtime.js +++ b/test/runtime.js @@ -1,4 +1,4 @@ -var assert = require('assert'), +var assert = require('assert').strict, sass = process.env.NODESASS_COV ? require('../lib-cov/extensions') : require('../lib/extensions'); diff --git a/test/scripts/util/proxy.js b/test/scripts/util/proxy.js index d829bdbc3..c01ddc13b 100644 --- a/test/scripts/util/proxy.js +++ b/test/scripts/util/proxy.js @@ -1,4 +1,4 @@ -var assert = require('assert'), +var assert = require('assert').strict, proxy = require('../../../scripts/util/proxy'); describe('proxy', function() { @@ -73,4 +73,4 @@ describe('proxy', function() { }); }); }); -}); \ No newline at end of file +}); diff --git a/test/types.js b/test/types.js index 7c1faf6a3..da42b5707 100644 --- a/test/types.js +++ b/test/types.js @@ -1,7 +1,7 @@ /*eslint new-cap: ["error", { "capIsNew": false }]*/ 'use strict'; -var assert = require('assert'); +var assert = require('assert').strict; var sass = require('../'); describe('sass.types', function() { diff --git a/test/useragent.js b/test/useragent.js index 27e4e784c..5578fd681 100644 --- a/test/useragent.js +++ b/test/useragent.js @@ -1,4 +1,4 @@ -var assert = require('assert'), +var assert = require('assert').strict, pkg = require('../package.json'), ua = require('../scripts/util/useragent'); diff --git a/test/watcher.js b/test/watcher.js index 55ad148e8..8c804256b 100644 --- a/test/watcher.js +++ b/test/watcher.js @@ -1,4 +1,4 @@ -var assert = require('assert'), +var assert = require('assert').strict, fs = require('fs-extra'), path = require('path'), temp = require('unique-temp-dir'), From 6308bd92b6d9bebee5fd9e1d126638afb1b2fdb4 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 17 Sep 2020 22:13:22 -0400 Subject: [PATCH 018/102] fix: Bump ESLint to 7.10 and fix new issues --- bin/node-sass | 4 ++-- lib/index.js | 4 ++-- package.json | 4 ++-- scripts/build.js | 6 +++--- scripts/coverage.js | 44 ++++++++++++++++++++++---------------------- scripts/install.js | 32 ++++++++++++++++---------------- test/api.js | 20 ++++++++++---------- test/binding.js | 4 ++-- test/lowlevel.js | 12 ++++++------ test/runtime.js | 6 +++--- 10 files changed, 68 insertions(+), 68 deletions(-) diff --git a/bin/node-sass b/bin/node-sass index 435849d4d..e948b66d1 100755 --- a/bin/node-sass +++ b/bin/node-sass @@ -300,7 +300,7 @@ function run(options, emitter) { } if (options.importer) { - if ((path.resolve(options.importer) === path.normalize(options.importer).replace(/(.+)([\/|\\])$/, '$1'))) { + if ((path.resolve(options.importer) === path.normalize(options.importer).replace(/(.+)([/|\\])$/, '$1'))) { options.importer = require(options.importer); } else { options.importer = require(path.resolve(options.importer)); @@ -308,7 +308,7 @@ function run(options, emitter) { } if (options.functions) { - if ((path.resolve(options.functions) === path.normalize(options.functions).replace(/(.+)([\/|\\])$/, '$1'))) { + if ((path.resolve(options.functions) === path.normalize(options.functions).replace(/(.+)([/|\\])$/, '$1'))) { options.functions = require(options.functions); } else { options.functions = require(path.resolve(options.functions)); diff --git a/lib/index.js b/lib/index.js index 3f20708f1..92f105d7c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -165,7 +165,7 @@ function getLinefeed(options) { function buildIncludePaths(options) { options.includePaths = options.includePaths || []; - if (process.env.hasOwnProperty('SASS_PATH')) { + if (Object.prototype.hasOwnProperty.call(process.env, 'SASS_PATH')) { options.includePaths = options.includePaths.concat( process.env.SASS_PATH.split(path.delimiter) ); @@ -193,7 +193,7 @@ function getOptions(opts, cb) { var options = clonedeep(opts || {}); options.sourceComments = options.sourceComments || false; - if (options.hasOwnProperty('file')) { + if (Object.prototype.hasOwnProperty.call(options, 'file')) { options.file = getInputFile(options); } options.outFile = getOutputFile(options); diff --git a/package.json b/package.json index 56019467d..ca113e7b5 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "coverage": "node scripts/coverage.js", "install": "node scripts/install.js", "postinstall": "node scripts/build.js", - "lint": "node_modules/.bin/eslint bin/node-sass lib scripts test", + "lint": "eslint bin/node-sass lib scripts test", "test": "node_modules/.bin/mocha test/{*,**/**}.js", "build": "node scripts/build.js --force", "prepublish": "not-in-install && node scripts/prepublish.js || in-install" @@ -73,7 +73,7 @@ }, "devDependencies": { "coveralls": "^3.0.2", - "eslint": "^3.4.0", + "eslint": "^7.10.0", "fs-extra": "^0.30.0", "istanbul": "^0.4.2", "mocha": "^3.1.2", diff --git a/scripts/build.js b/scripts/build.js index 7bbba5ee4..5dcdd4d70 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -19,9 +19,9 @@ function afterBuild(options) { var install = sass.getBinaryPath(); var target = path.join(__dirname, '..', 'build', options.debug ? 'Debug' : - process.config.target_defaults - ? process.config.target_defaults.default_configuration - : 'Release', + process.config.target_defaults + ? process.config.target_defaults.default_configuration + : 'Release', 'binding.node'); mkdir(path.dirname(install), function(err) { diff --git a/scripts/coverage.js b/scripts/coverage.js index dbd294916..29aa03241 100644 --- a/scripts/coverage.js +++ b/scripts/coverage.js @@ -29,7 +29,7 @@ function coverage() { fs.readFile(path.join('coverage', 'lcov.info'), function(err, data) { if (err) { console.error(err); } coveralls.handleInput(data.toString(), - function (err) { if (err) { console.error(err); } }); + function (err) { if (err) { console.error(err); } }); }); }); lcov.writeReport(collector, true); @@ -47,28 +47,28 @@ function coverage() { mkdirp('lib-cov', function(err) { if (err) { throw err; } fs.writeFile(path.join('lib-cov', source), - instrumenter.instrumentSync(data.toString(), - path.join('lib', source)), - function(err) { - if (err) { throw err; } - instrumentedfiles.push(source); - if (instrumentedfiles.length === sourcefiles.length) { - fs.readdirSync('test').filter(function(file){ - return file.substr(-6) === 'api.js' || + instrumenter.instrumentSync(data.toString(), + path.join('lib', source)), + function(err) { + if (err) { throw err; } + instrumentedfiles.push(source); + if (instrumentedfiles.length === sourcefiles.length) { + fs.readdirSync('test').filter(function(file){ + return file.substr(-6) === 'api.js' || file.substr(-11) === 'runtime.js'; - }).forEach(function(file){ - mocha.addFile( - path.join('test', file) - ); - }); - process.env.NODESASS_COV = 1; - mocha.reporter(rep).run(function(failures) { - process.on('exit', function () { - process.exit(failures); - }); - }); - } - }); + }).forEach(function(file){ + mocha.addFile( + path.join('test', file) + ); + }); + process.env.NODESASS_COV = 1; + mocha.reporter(rep).run(function(failures) { + process.on('exit', function () { + process.exit(failures); + }); + }); + } + }); }); }); }; diff --git a/scripts/install.js b/scripts/install.js index 6febbe498..73740d32d 100644 --- a/scripts/install.js +++ b/scripts/install.js @@ -68,22 +68,22 @@ function download(url, dest, cb) { } } }) - .on('response', function(response) { - var length = parseInt(response.headers['content-length'], 10); - var progress = log.newItem('', length); - - // The `progress` is true by default. However if it has not - // been explicitly set it's `undefined` which is considered - // as far as npm is concerned. - if (process.env.npm_config_progress === 'true') { - log.enableProgress(); - - response.on('data', function(chunk) { - progress.completeWork(chunk.length); - }) - .on('end', progress.finish); - } - }); + .on('response', function(response) { + var length = parseInt(response.headers['content-length'], 10); + var progress = log.newItem('', length); + + // The `progress` is true by default. However if it has not + // been explicitly set it's `undefined` which is considered + // as far as npm is concerned. + if (process.env.npm_config_progress === 'true') { + log.enableProgress(); + + response.on('data', function(chunk) { + progress.completeWork(chunk.length); + }) + .on('end', progress.finish); + } + }); } catch (err) { cb(err); } diff --git a/test/api.js b/test/api.js index f63bd8ce3..164a1c7f1 100644 --- a/test/api.js +++ b/test/api.js @@ -5,8 +5,8 @@ var assert = require('assert').strict, path = require('path'), read = fs.readFileSync, sassPath = process.env.NODESASS_COV - ? require.resolve('../lib-cov') - : require.resolve('../lib'), + ? require.resolve('../lib-cov') + : require.resolve('../lib'), sass = require(sassPath), fixture = path.join.bind(null, __dirname, 'fixtures'), resolveFixture = path.resolve.bind(null, __dirname, 'fixtures'); @@ -68,7 +68,7 @@ describe('api', function() { file: fixture('simple/index.scss'), sourceMap: false }, function(error, result) { - assert.strictEqual(result.hasOwnProperty('map'), false, 'result has a map property'); + assert.strictEqual(Object.prototype.hasOwnProperty.call(result, 'map'), false, 'result has a map property'); done(); }); }); @@ -78,7 +78,7 @@ describe('api', function() { file: fixture('simple/index.scss'), sourceMap: true }, function(error, result) { - assert.strictEqual(result.hasOwnProperty('map'), false, 'result has a map property'); + assert.strictEqual(Object.prototype.hasOwnProperty.call(result, 'map'), false, 'result has a map property'); done(); }); }); @@ -654,7 +654,7 @@ describe('api', function() { done(new Error('doesn\'t exist!')); } }, function(error) { - assert(/doesn\'t exist!/.test(error.message)); + assert(/doesn't exist!/.test(error.message)); done(); }); }); @@ -666,7 +666,7 @@ describe('api', function() { return new Error('doesn\'t exist!'); } }, function(error) { - assert(/doesn\'t exist!/.test(error.message)); + assert(/doesn't exist!/.test(error.message)); done(); }); }); @@ -1196,7 +1196,7 @@ describe('api', function() { }, bar: function(a) { assert.strictEqual(a, sass.NULL, - 'Supplied value should be the same instance as sass.NULL'); + 'Supplied value should be the same instance as sass.NULL'); assert.throws(function() { return new sass.types.Null(); @@ -1374,7 +1374,7 @@ describe('api', function() { sourceMap: false }); - assert.strictEqual(result.hasOwnProperty('map'), false, 'result has a map property'); + assert.strictEqual(Object.prototype.hasOwnProperty.call(result, 'map'), false, 'result has a map property'); done(); }); @@ -1384,7 +1384,7 @@ describe('api', function() { sourceMap: true }); - assert.strictEqual(result.hasOwnProperty('map'), false, 'result has a map property'); + assert.strictEqual(Object.prototype.hasOwnProperty.call(result, 'map'), false, 'result has a map property'); done(); }); @@ -1765,7 +1765,7 @@ describe('api', function() { return new Error('doesn\'t exist!'); } }); - }, /doesn\'t exist!/); + }, /doesn't exist!/); done(); }); diff --git a/test/binding.js b/test/binding.js index bdaf64265..59634633d 100644 --- a/test/binding.js +++ b/test/binding.js @@ -4,8 +4,8 @@ var assert = require('assert').strict, path = require('path'), etx = require('../lib/extensions'), binding = process.env.NODESASS_COV - ? require('../lib-cov/binding') - : require('../lib/binding'); + ? require('../lib-cov/binding') + : require('../lib/binding'); describe('binding', function() { describe('missing error', function() { diff --git a/test/lowlevel.js b/test/lowlevel.js index d5d15c1d8..a7aedf1dc 100644 --- a/test/lowlevel.js +++ b/test/lowlevel.js @@ -30,7 +30,7 @@ describe('lowlevel', function() { binding.renderSync(options); assert(/Data context created without a source string/.test(options.result.error), - 'Should fail with error message "Data context created without a source string"'); + 'Should fail with error message "Data context created without a source string"'); done(); }); @@ -51,7 +51,7 @@ describe('lowlevel', function() { binding.renderSync(options); assert(/Data context created without a source string/.test(options.result.error), - 'Should fail with error message "Data context created without a source string"'); + 'Should fail with error message "Data context created without a source string"'); done(); }); @@ -72,7 +72,7 @@ describe('lowlevel', function() { binding.renderFileSync(options); assert(/File context created without an input path/.test(options.result.error), - 'Should fail with error message "File context created without an input path"'); + 'Should fail with error message "File context created without an input path"'); done(); }); @@ -93,7 +93,7 @@ describe('lowlevel', function() { binding.renderFileSync(options); assert(/File context created without an input path/.test(options.result.error), - 'Should fail with error message "File context created without an input path"'); + 'Should fail with error message "File context created without an input path"'); done(); }); @@ -215,7 +215,7 @@ describe('lowlevel', function() { binding.renderSync(options); assert(/empty source string/.test(options.result.error), - 'Should fail with error message "Data context created with empty source string"'); + 'Should fail with error message "Data context created with empty source string"'); done(); }); @@ -236,7 +236,7 @@ describe('lowlevel', function() { binding.renderFileSync(options); assert(/empty input path/.test(options.result.error), - 'Should fail with error message "File context created with empty input path"'); + 'Should fail with error message "File context created with empty input path"'); done(); }); diff --git a/test/runtime.js b/test/runtime.js index d45b638c2..de0ee5a63 100644 --- a/test/runtime.js +++ b/test/runtime.js @@ -1,11 +1,11 @@ var assert = require('assert').strict, sass = process.env.NODESASS_COV - ? require('../lib-cov/extensions') - : require('../lib/extensions'); + ? require('../lib-cov/extensions') + : require('../lib/extensions'); describe('runtime parameters', function() { var pkg = require('../package'), - // Let's use JSON to fake a deep copy + // Let's use JSON to fake a deep copy savedArgv = JSON.stringify(process.argv), savedEnv = JSON.stringify(process.env); From feee44852def8183f654f434f387c048e83f8d9f Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 27 Sep 2020 18:42:51 -0400 Subject: [PATCH 019/102] chore: Remove disabled and recommended rules --- .eslintrc.json | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index d183f888b..7e98abbc4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,12 +1,12 @@ { "env": { + "es6": true, "node": true }, "globals": {}, "extends": "eslint:recommended", "rules": { "no-bitwise": 2, - "camelcase": 0, "curly": 2, "eqeqeq": 2, "no-unused-expressions": [ @@ -34,13 +34,7 @@ 2, "single" ], - "strict": 0, - "no-undef": 2, - "no-unused-vars": 2, "semi": 2, - "no-extra-semi": 2, - "no-redeclare": 2, - "block-scoped-var": 2, - "no-console": 0 + "block-scoped-var": 2 } } From ee3984dfdda0c0e68026cfc663030737c9ba9815 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 27 Sep 2020 18:47:52 -0400 Subject: [PATCH 020/102] chore: Hoist test ESLint config --- .eslintrc.json | 10 ++++++++++ test/.eslintrc | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 test/.eslintrc diff --git a/.eslintrc.json b/.eslintrc.json index 7e98abbc4..6dbc09318 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,6 +5,16 @@ }, "globals": {}, "extends": "eslint:recommended", + "overrides": [ + { + "files": [ + "test/**/*.js" + ], + "env": { + "mocha": true + } + } + ], "rules": { "no-bitwise": 2, "curly": 2, diff --git a/test/.eslintrc b/test/.eslintrc deleted file mode 100644 index 7eeefc33b..000000000 --- a/test/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "env": { - "mocha": true - } -} From d0d8865c89aa5727ce7654be6d5dd73bb2f033fe Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 27 Sep 2020 21:02:36 -0400 Subject: [PATCH 021/102] chore: Skip constructor tests on v14.6+ Related to tracking issue https://github.com/sass/node-sass/issues/2972 --- .github/workflows/alpine.yml | 4 +-- .github/workflows/linux.yml | 4 +-- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- appveyor.yml | 4 +-- test/types.js | 65 +++++++++++++++++++++++++++++++++++ 6 files changed, 73 insertions(+), 8 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 35893191e..7700babe8 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -15,13 +15,13 @@ jobs: node: - 10 - 12 - - 14.5 + - 14 include: - node: 10 alpine: "3.9" - node: 12 alpine: "3.9" - - node: 14.5 + - node: 14 alpine: "3.10" steps: - name: Install Alpine build tools diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f18bcc5a6..9e3184c3c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -12,7 +12,7 @@ jobs: node: - 10 - 12 - - 14.5 + - 14 include: - node: 10 gcc: "gcc-4.9" @@ -22,7 +22,7 @@ jobs: gcc: "gcc-6" gpp: "g++-6" os: ubuntu-18.04 - - node: 14.5 + - node: 14 gcc: "gcc-6" gpp: "g++-6" os: ubuntu-18.04 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 88b20175d..bdfeb0088 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,7 +12,7 @@ jobs: node: - 10 - 12 - - 14.5 + - 14 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 26fad7b2c..9724b096c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -12,7 +12,7 @@ jobs: node: - 10 - 12 - - 14.5 + - 14 steps: - uses: actions/checkout@v2 diff --git a/appveyor.yml b/appveyor.yml index d362e3f0a..c83e68fbb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -39,7 +39,7 @@ - nodejs_version: 12 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 14.5 + - nodejs_version: 14 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 @@ -115,7 +115,7 @@ - nodejs_version: 12 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 14.5 + - nodejs_version: 14 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 diff --git a/test/types.js b/test/types.js index da42b5707..4593b5356 100644 --- a/test/types.js +++ b/test/types.js @@ -3,6 +3,7 @@ var assert = require('assert').strict; var sass = require('../'); +var semver = require('semver'); describe('sass.types', function() { describe('Boolean', function() { @@ -15,6 +16,10 @@ describe('sass.types', function() { }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } var t = sass.types.Boolean(true); assert.strictEqual(t.toString(), '[object SassBoolean]'); @@ -89,11 +94,21 @@ describe('sass.types', function() { }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var t = sass.types.Color(); assert.strictEqual(t.toString(), '[object SassColor]'); }); it('supports new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var t = new sass.types.Color(1); assert.strictEqual(t.toString(), '[object SassColor]'); }); @@ -235,6 +250,11 @@ describe('sass.types', function() { }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var e = sass.types.Error('Such Error'); assert.ok(e instanceof sass.types.Error); assert.strictEqual(e.toString(), '[object SassError]'); @@ -243,6 +263,11 @@ describe('sass.types', function() { }); it('supports new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var e = new sass.types.Error('Such Error'); assert.ok(e instanceof sass.types.Error); assert.strictEqual(e.toString(), '[object SassError]'); @@ -260,12 +285,22 @@ describe('sass.types', function() { }); it('support call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var list = sass.types.List(); assert.ok(list instanceof sass.types.List); assert.strictEqual(list.toString(), '[object SassList]'); }); it('support new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var list = new sass.types.List(); assert.ok(list instanceof sass.types.List); assert.strictEqual(list.toString(), '[object SassList]'); @@ -411,11 +446,21 @@ describe('sass.types', function() { }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var x = sass.types.Map(); assert.strictEqual(x.toString(), '[object SassMap]'); }); it('supports new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var x = new sass.types.Map(); assert.strictEqual(x.toString(), '[object SassMap]'); }); @@ -490,11 +535,21 @@ describe('sass.types', function() { }); it('supports new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var number = new sass.types.Number(); assert.strictEqual(number.toString(), '[object SassNumber]'); }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var number = sass.types.Number(); assert.strictEqual(number.toString(), '[object SassNumber]'); }); @@ -585,6 +640,11 @@ describe('sass.types', function() { }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var x = sass.types.String('OMG'); assert.strictEqual(x.toString(), '[object SassString]'); @@ -592,6 +652,11 @@ describe('sass.types', function() { }); it('supports new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var x = new sass.types.String('OMG'); assert.strictEqual(x.toString(), '[object SassString]'); From d63b5bfd00d89844ad3b6ec9ea23fda62c35f327 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 27 Sep 2020 19:57:43 -0400 Subject: [PATCH 022/102] chore: Bump mocha to v8.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ca113e7b5..4782e3627 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "eslint": "^7.10.0", "fs-extra": "^0.30.0", "istanbul": "^0.4.2", - "mocha": "^3.1.2", + "mocha": "^8.1.3", "mocha-lcov-reporter": "^1.2.0", "rimraf": "^2.5.2", "unique-temp-dir": "^1.0.0" From 38b96337936ad27c22cda98ed862ee3b18f9dc3e Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 15 May 2019 02:57:39 -0400 Subject: [PATCH 023/102] chore: Update Istanbul to NYC --- .github/workflows/coverage.yml | 2 + .gitignore | 3 +- .nycrc.json | 14 ++++++ package.json | 8 ++-- scripts/coverage.js | 84 ---------------------------------- 5 files changed, 21 insertions(+), 90 deletions(-) create mode 100644 .nycrc.json delete mode 100644 scripts/coverage.js diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 8829043a2..fdd8df9bd 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -3,6 +3,7 @@ name: Coverage on: push: paths: + - ".nycrc.json" - "**/*.js" - "test/**" - "package.json" @@ -10,6 +11,7 @@ on: - ".github/workflows/coverage.yml" pull_request: paths: + - ".nycrc.json" - "**/*.js" - "test/**" - "package.json" diff --git a/.gitignore b/.gitignore index 24e13692a..091361b8b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ test/lcov.info test/fixtures/watching-css-out-01 test/fixtures/watching-css-out-02 coverage -package-lock.json \ No newline at end of file +package-lock.json +.nyc_output diff --git a/.nycrc.json b/.nycrc.json new file mode 100644 index 000000000..014b18450 --- /dev/null +++ b/.nycrc.json @@ -0,0 +1,14 @@ +{ + "all": true, + "include": [ + "bin/*", + "lib/*.js", + "scripts/**/*.js" + ], + "extension": [ + "node-sass" + ], + "reporter": [ + "lcovonly" + ] +} diff --git a/package.json b/package.json index 4782e3627..5f4cce373 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,11 @@ }, "gypfile": true, "scripts": { - "coverage": "node scripts/coverage.js", + "coverage": "nyc npm run test", "install": "node scripts/install.js", "postinstall": "node scripts/build.js", "lint": "eslint bin/node-sass lib scripts test", - "test": "node_modules/.bin/mocha test/{*,**/**}.js", + "test": "mocha test/{*,**/**}.js", "build": "node scripts/build.js --force", "prepublish": "not-in-install && node scripts/prepublish.js || in-install" }, @@ -72,12 +72,10 @@ "true-case-path": "^1.0.2" }, "devDependencies": { - "coveralls": "^3.0.2", "eslint": "^7.10.0", "fs-extra": "^0.30.0", - "istanbul": "^0.4.2", "mocha": "^8.1.3", - "mocha-lcov-reporter": "^1.2.0", + "nyc": "^15.1.0", "rimraf": "^2.5.2", "unique-temp-dir": "^1.0.0" } diff --git a/scripts/coverage.js b/scripts/coverage.js deleted file mode 100644 index 29aa03241..000000000 --- a/scripts/coverage.js +++ /dev/null @@ -1,84 +0,0 @@ -/*! - * node-sass: scripts/coverage.js - */ - -var Mocha = require('mocha'), - fs = require('fs'), - path = require('path'), - mkdirp = require('mkdirp'), - coveralls = require('coveralls'), - istanbul = require('istanbul'), - sourcefiles = ['index.js', 'binding.js', 'extensions.js', 'render.js', 'errors.js'], - summary= istanbul.Report.create('text-summary'), - lcov = istanbul.Report.create('lcovonly', { dir: path.join('coverage') }), - html = istanbul.Report.create('html', { dir: path.join('coverage', 'html') }); - -function coverage() { - var mocha = new Mocha(); - var rep = function(runner) { - runner.on('end', function(){ - var cov = global.__coverage__, - collector = new istanbul.Collector(); - if (cov) { - mkdirp(path.join('coverage', 'html'), function(err) { - if (err) { throw err; } - collector.add(cov); - summary.writeReport(collector, true); - html.writeReport(collector, true); - lcov.on('done', function() { - fs.readFile(path.join('coverage', 'lcov.info'), function(err, data) { - if (err) { console.error(err); } - coveralls.handleInput(data.toString(), - function (err) { if (err) { console.error(err); } }); - }); - }); - lcov.writeReport(collector, true); - }); - } else { - console.warn('No coverage'); - } - }); - }; - var instrumenter = new istanbul.Instrumenter(); - var instrumentedfiles = []; - var processfile = function(source) { - fs.readFile(path.join('lib', source), function(err, data) { - if (err) { throw err; } - mkdirp('lib-cov', function(err) { - if (err) { throw err; } - fs.writeFile(path.join('lib-cov', source), - instrumenter.instrumentSync(data.toString(), - path.join('lib', source)), - function(err) { - if (err) { throw err; } - instrumentedfiles.push(source); - if (instrumentedfiles.length === sourcefiles.length) { - fs.readdirSync('test').filter(function(file){ - return file.substr(-6) === 'api.js' || - file.substr(-11) === 'runtime.js'; - }).forEach(function(file){ - mocha.addFile( - path.join('test', file) - ); - }); - process.env.NODESASS_COV = 1; - mocha.reporter(rep).run(function(failures) { - process.on('exit', function () { - process.exit(failures); - }); - }); - } - }); - }); - }); - }; - for (var i in sourcefiles) { - processfile(sourcefiles[i]); - } -} - -/** - * Run - */ - -coverage(); From 2c5b110a626f11a605a723b01f4061fcf14fcbec Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 27 Sep 2020 23:47:28 -0400 Subject: [PATCH 024/102] chore: Bump cross-spawn to v7.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5f4cce373..8deaf7686 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "dependencies": { "async-foreach": "^0.1.3", "chalk": "^1.1.1", - "cross-spawn": "^3.0.0", + "cross-spawn": "^7.0.3", "gaze": "^1.0.0", "get-stdin": "^4.0.1", "glob": "^7.0.3", From db257365bc5c289f4f064d67ad7d19f8d452f46c Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 28 Sep 2020 21:05:20 -0400 Subject: [PATCH 025/102] chore: Bump node-gyp to 7.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8deaf7686..5ec1c89b9 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "meow": "^3.7.0", "mkdirp": "^0.5.1", "nan": "^2.13.2", - "node-gyp": "^3.8.0", + "node-gyp": "^7.1.0", "npmlog": "^4.0.0", "request": "^2.88.0", "sass-graph": "2.2.5", From d185440bf9b9375b3e6b5d98244377be4eaa771f Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 28 Sep 2020 21:43:38 -0400 Subject: [PATCH 026/102] chore: Add basic Node version support policy --- README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index aac88e139..6ca582b50 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,23 @@ # node-sass -#### Supported Node.js versions vary by release, please consult the [releases page](https://github.com/sass/node-sass/releases). Below is a quick guide for minimum support: - -NodeJS | Minimum node-sass version | Node Module ---------|--------------------------|------------ -Node 14 | 4.14+ | 83 -Node 13 | 4.13+ | 79 -Node 12 | 4.12+ | 72 -Node 11 | 4.10+ | 67 -Node 10 | 4.9+ | 64 -Node 8 | 4.5.3+ | 57 +## Node version support policy + +1. Supported Node.js versions vary by release, please consult the [releases page](https://github.com/sass/node-sass/releases). +1. Node versions that hit end of life , will be dropped from support at each node-sass release (major, minor). +1. We will stop building binaries for unsupported releases, testing for breakages in dependency compatibility, but we will not block installations for those that want to support themselves. +1. New node release require minor internal changes along with support from CI providers (AppVeyor, GitHub Actions). We will open a single issue for interested parties to subscribe to, and close additional issues. + +Below is a quick guide for minimum and maximum support supported version of node-sass: + +NodeJS | Supported node-sass version | Node Module +--------|-----------------------------|------------ +Node 14 | 4.14+ | 83 +Node 13 | 4.13+, <5.0 | 79 +Node 12 | 4.12+ | 72 +Node 11 | 4.10+, <5.0 | 67 +Node 10 | 4.9+ | 64 +Node 8 | 4.5.3+, <5.0 | 57 +Node <8 | <5.0 | <57 From fb1109c6f25c913e9d48ca6d24b6913565c458f4 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 28 Sep 2020 21:44:00 -0400 Subject: [PATCH 027/102] chore: Bump minimum engine version to v10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5ec1c89b9..d1ead2fcd 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "url": "http://andrew.github.com" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" }, "main": "lib/index.js", "nodeSassConfig": { From 6853a80642628a1abbc8edfddd5032c5709394e8 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 28 Sep 2020 21:49:19 -0400 Subject: [PATCH 028/102] chore: Cleanup status badges --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6ca582b50..69c95fa91 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,14 @@ Node <8 | <5.0 | <57
-[![Build Status](https://travis-ci.org/sass/node-sass.svg?branch=master&style=flat)](https://travis-ci.org/sass/node-sass) -[![Build status](https://ci.appveyor.com/api/projects/status/22mjbk59kvd55m9y/branch/master?svg=true)](https://ci.appveyor.com/project/sass/node-sass/branch/master) +![Alpine](https://github.com/sass/node-sass/workflows/Build%20bindings%20for%20Alpine%20releases/badge.svg) +![Linux](https://github.com/sass/node-sass/workflows/Build%20bindings%20for%20Linux%20releases/badge.svg) +![macOS](https://github.com/sass/node-sass/workflows/Build%20bindings%20for%20macOS%20releases/badge.svg) +![Windows x64](https://github.com/sass/node-sass/workflows/Build%20bindings%20for%20Windows%20releases/badge.svg) +![Linting](https://github.com/sass/node-sass/workflows/Lint%20JS/badge.svg) +[![Windows x86](https://ci.appveyor.com/api/projects/status/22mjbk59kvd55m9y/branch/master?svg=true)](https://ci.appveyor.com/project/sass/node-sass/branch/master) [![npm version](https://badge.fury.io/js/node-sass.svg)](http://badge.fury.io/js/node-sass) -[![Dependency Status](https://david-dm.org/sass/node-sass.svg?theme=shields.io)](https://david-dm.org/sass/node-sass) -[![devDependency Status](https://david-dm.org/sass/node-sass/dev-status.svg?theme=shields.io)](https://david-dm.org/sass/node-sass#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/sass/node-sass/badge.svg?branch=master)](https://coveralls.io/r/sass/node-sass?branch=master) -[![Inline docs](http://inch-ci.org/github/sass/node-sass.svg?branch=master)](http://inch-ci.org/github/sass/node-sass) [![Join us in Slack](https://libsass-slack.herokuapp.com/badge.svg)](https://libsass-slack.herokuapp.com/) Node-sass is a library that provides binding for Node.js to [LibSass], the C version of the popular stylesheet preprocessor, Sass. From ab91bf62362a1e89104d1148c712665309a38d4d Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 28 Sep 2020 22:10:53 -0400 Subject: [PATCH 029/102] chore: Remove Slack badge --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 69c95fa91..ac7630c4e 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,6 @@ Node <8 | <5.0 | <57 [![Windows x86](https://ci.appveyor.com/api/projects/status/22mjbk59kvd55m9y/branch/master?svg=true)](https://ci.appveyor.com/project/sass/node-sass/branch/master) [![npm version](https://badge.fury.io/js/node-sass.svg)](http://badge.fury.io/js/node-sass) [![Coverage Status](https://coveralls.io/repos/sass/node-sass/badge.svg?branch=master)](https://coveralls.io/r/sass/node-sass?branch=master) -[![Join us in Slack](https://libsass-slack.herokuapp.com/badge.svg)](https://libsass-slack.herokuapp.com/) Node-sass is a library that provides binding for Node.js to [LibSass], the C version of the popular stylesheet preprocessor, Sass. From 40e0f00dec9b17c4e885b6d13aaafbc3d04c8d97 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 28 Sep 2020 22:11:30 -0400 Subject: [PATCH 030/102] chore: Remove second NPM badge Larger on in table above --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index ac7630c4e..8125eb164 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,6 @@ Node <8 | <5.0 | <57 ![Windows x64](https://github.com/sass/node-sass/workflows/Build%20bindings%20for%20Windows%20releases/badge.svg) ![Linting](https://github.com/sass/node-sass/workflows/Lint%20JS/badge.svg) [![Windows x86](https://ci.appveyor.com/api/projects/status/22mjbk59kvd55m9y/branch/master?svg=true)](https://ci.appveyor.com/project/sass/node-sass/branch/master) -[![npm version](https://badge.fury.io/js/node-sass.svg)](http://badge.fury.io/js/node-sass) [![Coverage Status](https://coveralls.io/repos/sass/node-sass/badge.svg?branch=master)](https://coveralls.io/r/sass/node-sass?branch=master) Node-sass is a library that provides binding for Node.js to [LibSass], the C version of the popular stylesheet preprocessor, Sass. From 522828ad314e61ed5d2fe4314ed20f746ed11a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rouven=20We=C3=9Fling?= Date: Wed, 4 Apr 2018 11:21:20 +0200 Subject: [PATCH 031/102] Remove workarounds for old Node.js versions --- lib/extensions.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index 1d1528e68..0a4d2938d 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -310,10 +310,6 @@ function getBinaryPath() { binaryPath = path.join(getBinaryDir(), getBinaryName().replace(/_(?=binding\.node)/, '/')); } - if (process.versions.modules < 46) { - return binaryPath; - } - try { return trueCasePathSync(binaryPath) || binaryPath; } catch (e) { @@ -434,12 +430,6 @@ function getPlatformVariant() { try { contents = fs.readFileSync(process.execPath); - // Buffer.indexOf was added in v1.5.0 so cast to string for old node - // Delay contents.toStrings because it's expensive - if (!contents.indexOf) { - contents = contents.toString(); - } - if (contents.indexOf('libc.musl-x86_64.so.1') !== -1) { return 'musl'; } From 1f6df866f34e797df236e38fa181994ab4ca7ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rouven=20We=C3=9Fling?= Date: Thu, 7 Dec 2017 16:17:53 +0000 Subject: [PATCH 032/102] Replace lodash/assign in favor of the native Object.assign --- lib/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index 92f105d7c..2e83c8d2b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4,7 +4,6 @@ var path = require('path'), clonedeep = require('lodash/cloneDeep'), - assign = require('lodash/assign'), sass = require('./extensions'); /** @@ -288,7 +287,7 @@ module.exports.render = function(opts, cb) { // options.error and options.success are for libsass binding options.error = function(err) { - var payload = assign(new Error(), JSON.parse(err)); + var payload = Object.assign(new Error(), JSON.parse(err)); if (cb) { options.context.callback.call(options.context, payload, null); @@ -438,7 +437,7 @@ module.exports.renderSync = function(opts) { return result; } - throw assign(new Error(), JSON.parse(result.error)); + throw Object.assign(new Error(), JSON.parse(result.error)); }; /** From 91c40a0bf0a3923ab9f91b82dcd479c25486235a Mon Sep 17 00:00:00 2001 From: xzyfer Date: Tue, 3 Apr 2018 23:34:52 +1000 Subject: [PATCH 033/102] Remove deprecated process.sass API --- lib/index.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/index.js b/lib/index.js index 2e83c8d2b..10062803e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -456,21 +456,3 @@ module.exports.types = binding.types; module.exports.TRUE = binding.types.Boolean.TRUE; module.exports.FALSE = binding.types.Boolean.FALSE; module.exports.NULL = binding.types.Null.NULL; - -/** - * Polyfill the old API - * - * TODO: remove for 4.0 - */ - -function processSassDeprecationMessage() { - console.log('Deprecation warning: `process.sass` is an undocumented internal that will be removed in future versions of Node Sass.'); -} - -process.sass = process.sass || { - get versionInfo() { processSassDeprecationMessage(); return module.exports.info; }, - get binaryName() { processSassDeprecationMessage(); return sass.getBinaryName(); }, - get binaryUrl() { processSassDeprecationMessage(); return sass.getBinaryUrl(); }, - get binaryPath() { processSassDeprecationMessage(); return sass.getBinaryPath(); }, - get getBinaryPath() { processSassDeprecationMessage(); return sass.getBinaryPath; }, -}; From b48fac449ad6cda8332f89ef83625d5bb6e33e4d Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 20 Oct 2020 19:47:16 -0400 Subject: [PATCH 034/102] chore: Add weekly DependaBot updates --- .github/dependabot.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..5944b06f4 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" From f877689ab1904ff896691f6adba4f2c7932186be Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 20 Oct 2020 20:13:40 -0400 Subject: [PATCH 035/102] chore: Don't double build DependaBot PRs These are submitted by PR, so branches don't need to build --- .github/workflows/alpine.yml | 6 +++++- .github/workflows/coverage.yml | 2 ++ .github/workflows/lint-js.yml | 2 ++ .github/workflows/linux.yml | 6 +++++- .github/workflows/macos.yml | 6 +++++- .github/workflows/windows.yml | 6 +++++- 6 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 7700babe8..7701bd0f9 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -1,6 +1,10 @@ name: Build bindings for Alpine releases -on: [push, pull_request] +on: + push: + branches-ignore: + - "dependabot/**" + pull_request: jobs: build: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index fdd8df9bd..0eb4509a9 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -2,6 +2,8 @@ name: Coverage on: push: + branches-ignore: + - "dependabot/**" paths: - ".nycrc.json" - "**/*.js" diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index ee886c772..b1e44eae2 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -2,6 +2,8 @@ name: Lint JS on: push: + branches-ignore: + - "dependabot/**" paths: - "**/*.js" - ".eslintrc.json" diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 9e3184c3c..323e2c00d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,6 +1,10 @@ name: Build bindings for Linux releases -on: [push, pull_request] +on: + push: + branches-ignore: + - "dependabot/**" + pull_request: jobs: build: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index bdfeb0088..baae382b9 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,6 +1,10 @@ name: Build bindings for macOS releases -on: [push, pull_request] +on: + push: + branches-ignore: + - "dependabot/**" + pull_request: jobs: build: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 9724b096c..2c072ce28 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,6 +1,10 @@ name: Build bindings for Windows releases -on: [push, pull_request] +on: + push: + branches-ignore: + - "dependabot/**" + pull_request: jobs: build: From 2bebe054fd1429d2aec2280f28f0ebeb9481897c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 00:09:31 +0000 Subject: [PATCH 036/102] build(deps-dev): bump rimraf from 2.7.1 to 3.0.2 Bumps [rimraf](https://github.com/isaacs/rimraf) from 2.7.1 to 3.0.2. - [Release notes](https://github.com/isaacs/rimraf/releases) - [Changelog](https://github.com/isaacs/rimraf/blob/master/CHANGELOG.md) - [Commits](https://github.com/isaacs/rimraf/compare/v2.7.1...v3.0.2) Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d1ead2fcd..a02bf1bb1 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "fs-extra": "^0.30.0", "mocha": "^8.1.3", "nyc": "^15.1.0", - "rimraf": "^2.5.2", + "rimraf": "^3.0.2", "unique-temp-dir": "^1.0.0" } } From d4ebe7236df425aa7482115be7df00e10f0e3f9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Oct 2020 23:57:39 +0000 Subject: [PATCH 037/102] build(deps): update actions/setup-node requirement to v2.1.2 Updates the requirements on [actions/setup-node](https://github.com/actions/setup-node) to permit the latest version. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/commits/c6fd00ceb9747fb23ffdf72987450a2664414867) Signed-off-by: dependabot[bot] --- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index b1e44eae2..befa5529e 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2.1.2 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 323e2c00d..4e60f0a46 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v1.4.3 + uses: actions/setup-node@v2.1.2 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index baae382b9..9bdf993c4 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v1.4.3 + uses: actions/setup-node@v2.1.2 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2c072ce28..dd75e4d19 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v1.4.3 + uses: actions/setup-node@v2.1.2 with: node-version: ${{ matrix.node }} From d7635068b41a9cceeab4fadd195eea47d507c34c Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 20 Oct 2020 21:09:19 -0400 Subject: [PATCH 038/102] chore: Only run coverage on main repo --- .github/workflows/coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 0eb4509a9..ccd70311a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -23,6 +23,7 @@ on: jobs: build: runs-on: ubuntu-latest + if: github.repository_owner == 'sass' steps: - uses: actions/checkout@v2 From 6a33e5318b7e89316dab947e8697818e45530907 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 20 Oct 2020 21:10:25 -0400 Subject: [PATCH 039/102] chore: Don't upload artifacts on PRs --- .github/workflows/alpine.yml | 1 + .github/workflows/linux.yml | 1 + .github/workflows/macos.yml | 1 + .github/workflows/windows.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 7701bd0f9..d95a1f53d 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -40,6 +40,7 @@ jobs: run: npm test - uses: actions/upload-artifact@v2 + if: github.repository_owner == 'sass' && github.event_name != 'pull_request' with: name: ${{ matrix.node }} path: vendor/ diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4e60f0a46..2aff8b056 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -54,6 +54,7 @@ jobs: run: npm test - uses: actions/upload-artifact@v2 + if: github.repository_owner == 'sass' && github.event_name != 'pull_request' with: name: ${{ matrix.node }} path: vendor/ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9bdf993c4..5d80a66e2 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -35,6 +35,7 @@ jobs: run: npm test - uses: actions/upload-artifact@v2 + if: github.repository_owner == 'sass' && github.event_name != 'pull_request' with: name: ${{ matrix.node }} path: vendor/ diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index dd75e4d19..4267e3dd3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -35,6 +35,7 @@ jobs: run: npm test - uses: actions/upload-artifact@v2 + if: github.repository_owner == 'sass' && github.event_name != 'pull_request' with: name: ${{ matrix.node }} path: | From e2391c259167a9692f2c23b0c91caa37502334ca Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 26 Oct 2020 18:20:33 -0700 Subject: [PATCH 040/102] Add a deprecation message to the readme (#3011) Closes #2952 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 8125eb164..8a0a3f7aa 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # node-sass +**Warning:** [LibSass and Node Sass are deprecated](https://sass-lang.com/blog/libsass-is-deprecated). +While they will continue to receive maintenance releases indefinitely, there are no +plans to add additional features or compatibility with any new CSS or Sass features. +Projects that still use it should move onto +[Dart Sass](https://sass-lang.com/dart-sass). + ## Node version support policy 1. Supported Node.js versions vary by release, please consult the [releases page](https://github.com/sass/node-sass/releases). From 0648b5a59df693686e745d3690fc73e768200c47 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 27 Oct 2020 01:25:54 -0400 Subject: [PATCH 041/102] chore: Add Node 15 support (#2983) --- .github/workflows/alpine.yml | 9 +++++++-- .github/workflows/linux.yml | 7 +++++++ .github/workflows/macos.yml | 1 + .github/workflows/windows.yml | 13 ++++++++++++- README.md | 1 + appveyor.yml | 6 ++++++ lib/extensions.js | 1 + package.json | 3 +-- 8 files changed, 36 insertions(+), 5 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index d95a1f53d..adb941a98 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest container: image: node:${{ matrix.node }}-alpine${{ matrix.alpine }} - env: - SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true strategy: fail-fast: false matrix: @@ -20,6 +18,8 @@ jobs: - 10 - 12 - 14 + - 15 + include: - node: 10 alpine: "3.9" @@ -27,6 +27,9 @@ jobs: alpine: "3.9" - node: 14 alpine: "3.10" + - node: 15 + alpine: "3.10" + steps: - name: Install Alpine build tools run: apk add --no-cache python make git gcc g++ @@ -35,6 +38,8 @@ jobs: - name: Install packages run: npm install --unsafe-perm + env: + SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true - name: Run tests run: npm test diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2aff8b056..a6320cb04 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -17,6 +17,8 @@ jobs: - 10 - 12 - 14 + - 15 + include: - node: 10 gcc: "gcc-4.9" @@ -30,6 +32,11 @@ jobs: gcc: "gcc-6" gpp: "g++-6" os: ubuntu-18.04 + - node: 15 + gcc: "gcc-6" + gpp: "g++-6" + os: ubuntu-18.04 + steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 5d80a66e2..9cf377924 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -17,6 +17,7 @@ jobs: - 10 - 12 - 14 + - 15 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4267e3dd3..8b96f8da7 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: windows-2016 + runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -17,6 +17,17 @@ jobs: - 10 - 12 - 14 + - 15 + + include: + - node: 10 + os: windows-2016 + - node: 12 + os: windows-2016 + - node: 14 + os: windows-2016 + - node: 15 + os: windows-2019 steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index 8a0a3f7aa..639bd3a70 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Below is a quick guide for minimum and maximum support supported version of node NodeJS | Supported node-sass version | Node Module --------|-----------------------------|------------ +Node 15 | 5.0+ | 88 Node 14 | 4.14+ | 83 Node 13 | 4.13+, <5.0 | 79 Node 12 | 4.12+ | 72 diff --git a/appveyor.yml b/appveyor.yml index c83e68fbb..14dcb2713 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,6 +42,9 @@ - nodejs_version: 14 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + - nodejs_version: 15 + GYP_MSVS_VERSION: 2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 install: # https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs @@ -118,6 +121,9 @@ - nodejs_version: 14 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + - nodejs_version: 15 + GYP_MSVS_VERSION: 2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 install: # https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs diff --git a/lib/extensions.js b/lib/extensions.js index 0a4d2938d..b6f2a5667 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -80,6 +80,7 @@ function getHumanNodeVersion(abi) { case 72: return 'Node.js 12.x'; case 79: return 'Node.js 13.x'; case 83: return 'Node.js 14.x'; + case 88: return 'Node.js 15.x'; default: return false; } } diff --git a/package.json b/package.json index a02bf1bb1..fafe2923d 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "lint": "eslint bin/node-sass lib scripts test", "test": "mocha test/{*,**/**}.js", "build": "node scripts/build.js --force", - "prepublish": "not-in-install && node scripts/prepublish.js || in-install" + "prepublishOnly ": "scripts/prepublish.js" }, "files": [ "bin", @@ -59,7 +59,6 @@ "gaze": "^1.0.0", "get-stdin": "^4.0.1", "glob": "^7.0.3", - "in-publish": "^2.0.0", "lodash": "^4.17.15", "meow": "^3.7.0", "mkdirp": "^0.5.1", From 7105b0abd35377a52a7df8994aa45aa8395a18e4 Mon Sep 17 00:00:00 2001 From: Michael Mifsud Date: Sun, 1 Nov 2020 00:52:51 +1100 Subject: [PATCH 042/102] 5.0.0 (#3015) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fafe2923d..bd26cb1af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-sass", - "version": "4.14.1", + "version": "5.0.0", "libsass": "3.5.5", "description": "Wrapper around libsass", "license": "MIT", From a2a3a78802bf11287fcc012e60749bfde0aeff1f Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Fri, 11 Dec 2020 00:51:02 -0500 Subject: [PATCH 043/102] chore: Bump dependabot limit --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5944b06f4..e8188beee 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,9 +7,11 @@ version: 2 updates: - package-ecosystem: "npm" directory: "/" + open-pull-requests-limit: 99 schedule: interval: "weekly" - package-ecosystem: "github-actions" directory: "/" + open-pull-requests-limit: 99 schedule: interval: "weekly" From 769f3a6f5a3949bd8e69c6b0a5d385a9c07924b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Dec 2020 06:53:52 +0000 Subject: [PATCH 044/102] build(deps): bump actions/setup-node from v2.1.2 to v2.1.3 Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.1.2 to v2.1.3. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.1.2...27082cecf3ff7a1742dbd5e12605f0cb59dce2d9) Signed-off-by: dependabot[bot] --- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index befa5529e..4e519edef 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.1.2 + - uses: actions/setup-node@v2.1.3 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a6320cb04..33abebe13 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.3 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9cf377924..aa1eae44c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.3 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8b96f8da7..f7f10c15b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v2.1.3 with: node-version: ${{ matrix.node }} From c1cb367d599bc32539325f14949b7f857451965a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Dec 2020 06:25:04 +0000 Subject: [PATCH 045/102] build(deps): bump actions/setup-node from v2.1.3 to v2.1.4 Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.1.3 to v2.1.4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.1.3...c46424eee26de4078d34105d3de3cc4992202b1e) Signed-off-by: dependabot[bot] --- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 4e519edef..2a849e1b9 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.1.3 + - uses: actions/setup-node@v2.1.4 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 33abebe13..73e5e5607 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.3 + uses: actions/setup-node@v2.1.4 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index aa1eae44c..4b5ee78c8 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.3 + uses: actions/setup-node@v2.1.4 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f7f10c15b..0849e8002 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.3 + uses: actions/setup-node@v2.1.4 with: node-version: ${{ matrix.node }} From 06f3ab47297fbad5e81244c909afec596d8a1635 Mon Sep 17 00:00:00 2001 From: independencyinjection <56411706+independencyinjection@users.noreply.github.com> Date: Tue, 22 Dec 2020 12:15:45 -0600 Subject: [PATCH 046/102] Update TROUBLESHOOTING.md --- TROUBLESHOOTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 6326ddfe1..cd2554542 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -20,7 +20,7 @@ should always follow these steps before opening a new issue. ### 404s -If you see a 404 when trying to install node-sass, this indicates that your trying +If you see a 404 when trying to install node-sass, this indicates that you're trying to install a version of node-sass that doesn't support your version of NodeJS, or uses an alternate V8 environment (Meteor, Electron, etc...) that isn't supported by node-sass. From 4115e9de35a26a6c27604e22c9c1981bf19b0f5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 06:15:06 +0000 Subject: [PATCH 047/102] build(deps): bump actions/setup-node from v2.1.4 to v2.1.5 Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.1.4 to v2.1.5. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.1.4...46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea) Signed-off-by: dependabot[bot] --- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 2a849e1b9..21b60786b 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.1.4 + - uses: actions/setup-node@v2.1.5 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 73e5e5607..f7a496978 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4b5ee78c8..92a8ade4f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 0849e8002..41a16a12b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.4 + uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node }} From 3d7b9d05a7627c11bbe883a55ce068c8dbbfffac Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 20 Apr 2021 12:38:04 -0400 Subject: [PATCH 048/102] chore: Add Node 16 support - Bump to 5.1.0 - Add CI builds for 16 - Add extension lookup for module 93 --- .github/workflows/alpine.yml | 3 +++ .github/workflows/linux.yml | 6 ++++++ .github/workflows/macos.yml | 1 + .github/workflows/windows.yml | 3 +++ README.md | 1 + appveyor.yml | 6 ++++++ lib/extensions.js | 1 + package.json | 2 +- 8 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index adb941a98..65e20a7db 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -19,6 +19,7 @@ jobs: - 12 - 14 - 15 + - 16 include: - node: 10 @@ -29,6 +30,8 @@ jobs: alpine: "3.10" - node: 15 alpine: "3.10" + - node: 16 + alpine: "3.11" steps: - name: Install Alpine build tools diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f7a496978..1f9ce3bb8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,6 +18,7 @@ jobs: - 12 - 14 - 15 + - 16 include: - node: 10 @@ -36,6 +37,11 @@ jobs: gcc: "gcc-6" gpp: "g++-6" os: ubuntu-18.04 + - node: 16 + gcc: "gcc-8" + gpp: "g++-8" + os: ubuntu-18.04 + steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 92a8ade4f..2143cf410 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,6 +18,7 @@ jobs: - 12 - 14 - 15 + - 16 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 41a16a12b..318aaf496 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,6 +18,7 @@ jobs: - 12 - 14 - 15 + - 16 include: - node: 10 @@ -28,6 +29,8 @@ jobs: os: windows-2016 - node: 15 os: windows-2019 + - node: 16 + os: windows-2019 steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index 639bd3a70..aaf13cf78 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Below is a quick guide for minimum and maximum support supported version of node NodeJS | Supported node-sass version | Node Module --------|-----------------------------|------------ +Node 16 | 6.0+ | 93 Node 15 | 5.0+ | 88 Node 14 | 4.14+ | 83 Node 13 | 4.13+, <5.0 | 79 diff --git a/appveyor.yml b/appveyor.yml index 14dcb2713..52ed9016d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -45,6 +45,9 @@ - nodejs_version: 15 GYP_MSVS_VERSION: 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + - nodejs_version: 16 + GYP_MSVS_VERSION: 2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 install: # https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs @@ -124,6 +127,9 @@ - nodejs_version: 15 GYP_MSVS_VERSION: 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + - nodejs_version: 16 + GYP_MSVS_VERSION: 2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 install: # https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs diff --git a/lib/extensions.js b/lib/extensions.js index b6f2a5667..b18fd27ac 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -81,6 +81,7 @@ function getHumanNodeVersion(abi) { case 79: return 'Node.js 13.x'; case 83: return 'Node.js 14.x'; case 88: return 'Node.js 15.x'; + case 93: return 'Node.js 16.x'; default: return false; } } diff --git a/package.json b/package.json index bd26cb1af..b60dc46cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-sass", - "version": "5.0.0", + "version": "6.0.0", "libsass": "3.5.5", "description": "Wrapper around libsass", "license": "MIT", From 8ab02da95e0ad3a9a48cbd06b7bb2a7ce9a91966 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 25 Apr 2021 12:58:33 -0400 Subject: [PATCH 049/102] fix: Remove old compiler gyp settings - VS2015 isn't supported anymore - CPP11 flags cause issues on modern tooling --- binding.gyp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/binding.gyp b/binding.gyp index 8b3415293..2233ca285 100644 --- a/binding.gyp +++ b/binding.gyp @@ -28,7 +28,6 @@ } }, 'xcode_settings': { - 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', 'CLANG_CXX_LIBRARY': 'libc++', 'OTHER_LDFLAGS': [], 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', @@ -68,21 +67,6 @@ '<(libsass_library)', ], } - }], - ['OS=="win" and MSVS_VERSION == "2015"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'AdditionalOptions': [ - # disable Thread-Safe "Magic" for local static variables - '/Zc:threadSafeInit-', - ], - }, - }, - }], - ['OS!="win"', { - 'cflags_cc+': [ - '-std=c++0x' - ] }] ] } From c908f4f9b602dcfea81847144cfd4e43fe308798 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 25 Apr 2021 13:06:10 -0400 Subject: [PATCH 050/102] fix: Bump OSX minimum to 10.11 This is the minimum for Node 10 which is the oldest supported version https://github.com/nodejs/node/blob/19f3e1702e9e732462fcf83939b99d3bd0587ed2/BUILDING.md --- binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index 2233ca285..bb87e6c5c 100644 --- a/binding.gyp +++ b/binding.gyp @@ -31,7 +31,7 @@ 'CLANG_CXX_LIBRARY': 'libc++', 'OTHER_LDFLAGS': [], 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', - 'MACOSX_DEPLOYMENT_TARGET': '10.7' + 'MACOSX_DEPLOYMENT_TARGET': '10.11' }, 'include_dirs': [ ' Date: Sat, 1 May 2021 11:06:48 -0400 Subject: [PATCH 051/102] chore: Drop Node 10 support --- .github/workflows/alpine.yml | 3 --- .github/workflows/linux.yml | 5 ----- .github/workflows/macos.yml | 1 - .github/workflows/windows.yml | 3 --- README.md | 2 +- appveyor.yml | 6 ------ package.json | 2 +- 7 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 65e20a7db..6e3d58667 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -15,15 +15,12 @@ jobs: fail-fast: false matrix: node: - - 10 - 12 - 14 - 15 - 16 include: - - node: 10 - alpine: "3.9" - node: 12 alpine: "3.9" - node: 14 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1f9ce3bb8..f82ae516f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -14,17 +14,12 @@ jobs: fail-fast: false matrix: node: - - 10 - 12 - 14 - 15 - 16 include: - - node: 10 - gcc: "gcc-4.9" - gpp: "g++-4.9" - os: ubuntu-16.04 - node: 12 gcc: "gcc-6" gpp: "g++-6" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2143cf410..cadeff24a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -14,7 +14,6 @@ jobs: fail-fast: false matrix: node: - - 10 - 12 - 14 - 15 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 318aaf496..2d4a8db89 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -14,15 +14,12 @@ jobs: fail-fast: false matrix: node: - - 10 - 12 - 14 - 15 - 16 include: - - node: 10 - os: windows-2016 - node: 12 os: windows-2016 - node: 14 diff --git a/README.md b/README.md index aaf13cf78..f19667a70 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Node 14 | 4.14+ | 83 Node 13 | 4.13+, <5.0 | 79 Node 12 | 4.12+ | 72 Node 11 | 4.10+, <5.0 | 67 -Node 10 | 4.9+ | 64 +Node 10 | 4.9+, <6.0 | 64 Node 8 | 4.5.3+, <5.0 | 57 Node <8 | <5.0 | <57 diff --git a/appveyor.yml b/appveyor.yml index 52ed9016d..540a5f61e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,9 +33,6 @@ environment: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true matrix: - - nodejs_version: 10 - 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 @@ -115,9 +112,6 @@ environment: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true matrix: - - nodejs_version: 10 - 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 diff --git a/package.json b/package.json index b60dc46cb..265cbf476 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "url": "http://andrew.github.com" }, "engines": { - "node": ">=10" + "node": ">=12" }, "main": "lib/index.js", "nodeSassConfig": { From cfcbb2c1c3eda3c4b42c9d29e980a46c02403a1a Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 2 Jun 2021 12:54:31 -0400 Subject: [PATCH 052/102] chore: Use default Apline version from docker-node (#3121) * chore: Use default Apline version from docker-node * chore: Add python version to CI matrix * chore: Use default Alpine image for each version --- .github/workflows/alpine.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 6e3d58667..f46d8772e 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -10,7 +10,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: node:${{ matrix.node }}-alpine${{ matrix.alpine }} + image: node:${{ matrix.node }}-alpine strategy: fail-fast: false matrix: @@ -22,17 +22,17 @@ jobs: include: - node: 12 - alpine: "3.9" + python: python2 - node: 14 - alpine: "3.10" + python: python3 - node: 15 - alpine: "3.10" + python: python3 - node: 16 - alpine: "3.11" + python: python3 steps: - name: Install Alpine build tools - run: apk add --no-cache python make git gcc g++ + run: apk add --no-cache ${{ matrix.python }} make git gcc g++ - uses: actions/checkout@v2 From 7e08463d225cd3f44504dbb377799c45845fa52c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Jun 2021 05:03:33 +0000 Subject: [PATCH 053/102] build(deps-dev): bump mocha from 8.4.0 to 9.0.1 Bumps [mocha](https://github.com/mochajs/mocha) from 8.4.0 to 9.0.1. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v8.4.0...v9.0.1) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 265cbf476..fee02180c 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "devDependencies": { "eslint": "^7.10.0", "fs-extra": "^0.30.0", - "mocha": "^8.1.3", + "mocha": "^9.0.1", "nyc": "^15.1.0", "rimraf": "^3.0.2", "unique-temp-dir": "^1.0.0" From 30a52f7e837593bd74b476c4cd8b327bb176e7d2 Mon Sep 17 00:00:00 2001 From: Iaroslav Kolbin Date: Mon, 7 Jun 2021 19:03:49 +0100 Subject: [PATCH 054/102] build(deps): bump meow from 3.7.0 to 9.0.0 --- bin/node-sass | 206 +++++++++++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 120 insertions(+), 88 deletions(-) diff --git a/bin/node-sass b/bin/node-sass index e948b66d1..7645ecbfd 100755 --- a/bin/node-sass +++ b/bin/node-sass @@ -18,91 +18,127 @@ var Emitter = require('events').EventEmitter, * Initialize CLI */ -var cli = meow({ - pkg: '../package.json', +var cli = meow(` + Usage: + node-sass [options] + cat | node-sass [options] > output.css + + Example: Compile foobar.scss to foobar.css + node-sass --output-style compressed foobar.scss > foobar.css + cat foobar.scss | node-sass --output-style compressed > foobar.css + + Example: Watch the sass directory for changes, compile with sourcemaps to the css directory + node-sass --watch --recursive --output css + --source-map true --source-map-contents sass + + Options + -w, --watch Watch a directory or file + -r, --recursive Recursively watch directories or files + -o, --output Output directory + -x, --omit-source-map-url Omit source map URL comment from output + -i, --indented-syntax Treat data from stdin as sass code (versus scss) + -q, --quiet Suppress log output except on error + -v, --version Prints version info + --output-style CSS output style (nested | expanded | compact | compressed) + --indent-type Indent type for output CSS (space | tab) + --indent-width Indent width; number of spaces or tabs (maximum value: 10) + --linefeed Linefeed style (cr | crlf | lf | lfcr) + --source-comments Include debug info in output + --source-map Emit source map (boolean, or path to output .map file) + --source-map-contents Embed include contents in map + --source-map-embed Embed sourceMappingUrl as data URI + --source-map-root Base path, will be emitted in source-map as is + --include-path Path to look for imported files + --follow Follow symlinked directories + --precision The amount of precision allowed in decimal numbers + --error-bell Output a bell character on errors + --importer Path to .js file containing custom importer + --functions Path to .js file containing custom functions + --help Print usage info +`, { version: sass.info, - help: [ - 'Usage:', - ' node-sass [options] ', - ' cat | node-sass [options] > output.css', - '', - 'Example: Compile foobar.scss to foobar.css', - ' node-sass --output-style compressed foobar.scss > foobar.css', - ' cat foobar.scss | node-sass --output-style compressed > foobar.css', - '', - 'Example: Watch the sass directory for changes, compile with sourcemaps to the css directory', - ' node-sass --watch --recursive --output css', - ' --source-map true --source-map-contents sass', - '', - 'Options', - ' -w, --watch Watch a directory or file', - ' -r, --recursive Recursively watch directories or files', - ' -o, --output Output directory', - ' -x, --omit-source-map-url Omit source map URL comment from output', - ' -i, --indented-syntax Treat data from stdin as sass code (versus scss)', - ' -q, --quiet Suppress log output except on error', - ' -v, --version Prints version info', - ' --output-style CSS output style (nested | expanded | compact | compressed)', - ' --indent-type Indent type for output CSS (space | tab)', - ' --indent-width Indent width; number of spaces or tabs (maximum value: 10)', - ' --linefeed Linefeed style (cr | crlf | lf | lfcr)', - ' --source-comments Include debug info in output', - ' --source-map Emit source map (boolean, or path to output .map file)', - ' --source-map-contents Embed include contents in map', - ' --source-map-embed Embed sourceMappingUrl as data URI', - ' --source-map-root Base path, will be emitted in source-map as is', - ' --include-path Path to look for imported files', - ' --follow Follow symlinked directories', - ' --precision The amount of precision allowed in decimal numbers', - ' --error-bell Output a bell character on errors', - ' --importer Path to .js file containing custom importer', - ' --functions Path to .js file containing custom functions', - ' --help Print usage info' - ].join('\n') -}, { - boolean: [ - 'error-bell', - 'follow', - 'indented-syntax', - 'omit-source-map-url', - 'quiet', - 'recursive', - 'source-map-embed', - 'source-map-contents', - 'source-comments', - 'watch' - ], - string: [ - 'functions', - 'importer', - 'include-path', - 'indent-type', - 'linefeed', - 'output', - 'output-style', - 'precision', - 'source-map-root' - ], - alias: { - c: 'source-comments', - i: 'indented-syntax', - q: 'quiet', - o: 'output', - r: 'recursive', - x: 'omit-source-map-url', - v: 'version', - w: 'watch' + flags: { + errorBell: { + type: 'boolean', + }, + functions: { + type: 'string', + }, + follow: { + type: 'boolean', + }, + importer: { + type: 'string', + }, + includePath: { + type: 'string', + default: [process.cwd()], + isMultiple: true, + }, + indentType: { + type: 'string', + default: 'space', + }, + indentWidth: { + type: 'number', + default: 2, + }, + indentedSyntax: { + type: 'boolean', + alias: 'i', + }, + linefeed: { + type: 'string', + default: 'lf', + }, + omitSourceMapUrl: { + type: 'boolean', + alias: 'x', + }, + output: { + type: 'string', + alias: 'o', + }, + outputStyle: { + type: 'string', + default: 'nested', + }, + precision: { + type: 'number', + default: 5, + }, + quiet: { + type: 'boolean', + default: false, + alias: 'q', + }, + recursive: { + type: 'boolean', + default: true, + alias: 'r', + }, + sourceMapContents: { + type: 'boolean', + }, + sourceMapEmbed: { + type: 'boolean', + }, + sourceMapRoot: { + type: 'string', + }, + sourceComments: { + type: 'boolean', + alias: 'c', + }, + version: { + type: 'boolean', + alias: 'v', + }, + watch: { + type: 'boolean', + alias: 'w', + }, }, - default: { - 'include-path': process.cwd(), - 'indent-type': 'space', - 'indent-width': 2, - linefeed: 'lf', - 'output-style': 'nested', - precision: 5, - quiet: false, - recursive: true - } }); /** @@ -282,10 +318,6 @@ function watch(options, emitter) { */ function run(options, emitter) { - if (!Array.isArray(options.includePath)) { - options.includePath = [options.includePath]; - } - if (options.directory) { if (!options.output) { emitter.emit('error', 'An output directory must be specified when compiling a directory'); diff --git a/package.json b/package.json index fee02180c..504449366 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "get-stdin": "^4.0.1", "glob": "^7.0.3", "lodash": "^4.17.15", - "meow": "^3.7.0", + "meow": "^9.0.0", "mkdirp": "^0.5.1", "nan": "^2.13.2", "node-gyp": "^7.1.0", From 911d4db581727ffb0659f54c0ed5560d31da9586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20W=C3=A4rting?= Date: Thu, 24 Jun 2021 10:22:17 +0200 Subject: [PATCH 055/102] remove mkdirp dep (#3108) Co-authored-by: Michael Mifsud --- lib/extensions.js | 9 ++++----- lib/render.js | 5 ++--- package.json | 1 - scripts/build.js | 3 +-- scripts/install.js | 7 +++---- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index b18fd27ac..ce4b17a56 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -4,11 +4,10 @@ var eol = require('os').EOL, fs = require('fs'), - pkg = require('../package.json'), - mkdir = require('mkdirp'), path = require('path'), - defaultBinaryDir = path.join(__dirname, '..', 'vendor'), - trueCasePathSync = require('true-case-path'); + trueCasePathSync = require('true-case-path'), + pkg = require('../package.json'), + defaultBinaryDir = path.join(__dirname, '..', 'vendor'); /** * Get the human readable name of the Platform that is running @@ -352,7 +351,7 @@ function getBinaryCachePath() { cachePath = path.join(cachePathCandidates[i], pkg.name, pkg.version); try { - mkdir.sync(cachePath); + fs.mkdirSync(cachePath, {recursive: true}); return cachePath; } catch (e) { // Directory is not writable, try another diff --git a/lib/render.js b/lib/render.js index 858e02e74..3539a9a16 100644 --- a/lib/render.js +++ b/lib/render.js @@ -4,7 +4,6 @@ var chalk = require('chalk'), fs = require('fs'), - mkdirp = require('mkdirp'), path = require('path'), sass = require('./'); @@ -66,7 +65,7 @@ module.exports = function(options, emitter) { emitter.emit('info', chalk.green('Rendering Complete, saving .css file...')); - mkdirp(path.dirname(destination), function(err) { + fs.mkdir(path.dirname(destination), {recursive: true}, function(err) { if (err) { return emitter.emit('error', chalk.red(err)); } @@ -85,7 +84,7 @@ module.exports = function(options, emitter) { if (sourceMap) { todo++; - mkdirp(path.dirname(sourceMap), function(err) { + fs.mkdir(path.dirname(sourceMap), {recursive: true}, function(err) { if (err) { return emitter.emit('error', chalk.red(err)); } diff --git a/package.json b/package.json index 504449366..4bf517dc7 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,6 @@ "glob": "^7.0.3", "lodash": "^4.17.15", "meow": "^9.0.0", - "mkdirp": "^0.5.1", "nan": "^2.13.2", "node-gyp": "^7.1.0", "npmlog": "^4.0.0", diff --git a/scripts/build.js b/scripts/build.js index 5dcdd4d70..5c8a42b6e 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -3,7 +3,6 @@ */ var fs = require('fs'), - mkdir = require('mkdirp'), path = require('path'), spawn = require('cross-spawn'), sass = require('../lib/extensions'); @@ -24,7 +23,7 @@ function afterBuild(options) { : 'Release', 'binding.node'); - mkdir(path.dirname(install), function(err) { + fs.mkdir(path.dirname(install), {recursive: true}, function(err) { if (err && err.code !== 'EEXIST') { console.error(err.message); return; diff --git a/scripts/install.js b/scripts/install.js index 73740d32d..2cef34f7d 100644 --- a/scripts/install.js +++ b/scripts/install.js @@ -4,11 +4,10 @@ var fs = require('fs'), eol = require('os').EOL, - mkdir = require('mkdirp'), path = require('path'), - sass = require('../lib/extensions'), request = require('request'), log = require('npmlog'), + sass = require('../lib/extensions'), downloadOptions = require('./util/downloadoptions'); /** @@ -111,7 +110,7 @@ function checkAndDownloadBinary() { } try { - mkdir.sync(path.dirname(binaryPath)); + fs.mkdirSync(path.dirname(binaryPath), {recursive: true}); } catch (err) { console.error('Unable to save binary', path.dirname(binaryPath), ':', err); return; @@ -137,7 +136,7 @@ function checkAndDownloadBinary() { console.log('Caching binary to', cachedBinary); try { - mkdir.sync(path.dirname(cachedBinary)); + fs.mkdirSync(path.dirname(cachedBinary), {recursive: true}); fs.createReadStream(binaryPath) .pipe(fs.createWriteStream(cachedBinary)) .on('error', function (err) { From c167004da6cbf0fb1fdc3406073eaff48bea2b51 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Thu, 24 Jun 2021 18:22:58 +1000 Subject: [PATCH 056/102] 6.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4bf517dc7..fa3e86528 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-sass", - "version": "6.0.0", + "version": "6.0.1", "libsass": "3.5.5", "description": "Wrapper around libsass", "license": "MIT", From 16b8d4b2d731714fd5fdb579183387601a0ef4d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jul 2021 05:01:51 +0000 Subject: [PATCH 057/102] build(deps): bump coverallsapp/github-action from 1.1.2 to 1.1.3 Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 1.1.2 to 1.1.3. - [Release notes](https://github.com/coverallsapp/github-action/releases) - [Commits](https://github.com/coverallsapp/github-action/compare/v1.1.2...1.1.3) --- updated-dependencies: - dependency-name: coverallsapp/github-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ccd70311a..67a6ecd14 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -35,6 +35,6 @@ jobs: run: npm run coverage - name: Coveralls GitHub Action - uses: coverallsapp/github-action@v1.1.2 + uses: coverallsapp/github-action@1.1.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} From eaf791ae356d9416c41cfd42fa1626b146c212ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jul 2021 05:01:52 +0000 Subject: [PATCH 058/102] build(deps): bump actions/setup-node from 2.1.5 to 2.3.0 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.1.5 to 2.3.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.1.5...v2.3.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 21b60786b..a6c84b595 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.1.5 + - uses: actions/setup-node@v2.3.0 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f82ae516f..4c22dd33a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.5 + uses: actions/setup-node@v2.3.0 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index cadeff24a..f6eff58c3 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.5 + uses: actions/setup-node@v2.3.0 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2d4a8db89..16a00015c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.5 + uses: actions/setup-node@v2.3.0 with: node-version: ${{ matrix.node }} From 6200b2139f5327e3c403189daccec66d3de52e13 Mon Sep 17 00:00:00 2001 From: Peter Schmidt Date: Thu, 29 Jul 2021 00:01:06 +1000 Subject: [PATCH 059/102] docs: Double word "support" (#3159) * docs: Fix README.md typo * docs: README.md use plural --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f19667a70..11f080963 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Projects that still use it should move onto 1. We will stop building binaries for unsupported releases, testing for breakages in dependency compatibility, but we will not block installations for those that want to support themselves. 1. New node release require minor internal changes along with support from CI providers (AppVeyor, GitHub Actions). We will open a single issue for interested parties to subscribe to, and close additional issues. -Below is a quick guide for minimum and maximum support supported version of node-sass: +Below is a quick guide for minimum and maximum supported versions of node-sass: NodeJS | Supported node-sass version | Node Module --------|-----------------------------|------------ From fca52573dd923f6043282ae31537a834cae21692 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Aug 2021 05:01:31 +0000 Subject: [PATCH 060/102] build(deps): bump actions/setup-node from 2.3.0 to 2.4.0 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.3.0 to 2.4.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.3.0...v2.4.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index a6c84b595..e1d9864f3 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.3.0 + - uses: actions/setup-node@v2.4.0 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4c22dd33a..44ec2b1de 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.3.0 + uses: actions/setup-node@v2.4.0 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f6eff58c3..205da615c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.3.0 + uses: actions/setup-node@v2.4.0 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 16a00015c..799ca57df 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.3.0 + uses: actions/setup-node@v2.4.0 with: node-version: ${{ matrix.node }} From 2efb38f5d6d159d3d234ef681838998ffc66b151 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 21:19:31 +1000 Subject: [PATCH 061/102] build(deps): bump chalk from 1.1.3 to 4.1.2 (#3161) Bumps [chalk](https://github.com/chalk/chalk) from 1.1.3 to 4.1.2. - [Release notes](https://github.com/chalk/chalk/releases) - [Commits](https://github.com/chalk/chalk/compare/v1.1.3...v4.1.2) --- updated-dependencies: - dependency-name: chalk dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fa3e86528..bef5f0e5a 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ ], "dependencies": { "async-foreach": "^0.1.3", - "chalk": "^1.1.1", + "chalk": "^4.1.2", "cross-spawn": "^7.0.3", "gaze": "^1.0.0", "get-stdin": "^4.0.1", From 7bb51573b6dff3b160a1389cf040eb77086fad22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 21:20:02 +1000 Subject: [PATCH 062/102] build(deps): bump npmlog from 4.1.2 to 5.0.0 (#3156) Bumps [npmlog](https://github.com/npm/npmlog) from 4.1.2 to 5.0.0. - [Release notes](https://github.com/npm/npmlog/releases) - [Changelog](https://github.com/npm/npmlog/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/npmlog/compare/v4.1.2...v5.0.0) --- updated-dependencies: - dependency-name: npmlog dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bef5f0e5a..96d2b5ea6 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "meow": "^9.0.0", "nan": "^2.13.2", "node-gyp": "^7.1.0", - "npmlog": "^4.0.0", + "npmlog": "^5.0.0", "request": "^2.88.0", "sass-graph": "2.2.5", "stdout-stream": "^1.4.0", From 566dc276991bc074eb9243cd205b7e94c2e9d0f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 21:21:06 +1000 Subject: [PATCH 063/102] build(deps-dev): bump fs-extra from 0.30.0 to 10.0.0 (#3102) Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 0.30.0 to 10.0.0. - [Release notes](https://github.com/jprichardson/node-fs-extra/releases) - [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md) - [Commits](https://github.com/jprichardson/node-fs-extra/compare/0.30.0...10.0.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 96d2b5ea6..3a8adde69 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ }, "devDependencies": { "eslint": "^7.10.0", - "fs-extra": "^0.30.0", + "fs-extra": "^10.0.0", "mocha": "^9.0.1", "nyc": "^15.1.0", "rimraf": "^3.0.2", From 80d6c004b1b2416424326c12ad047d1c6d9d154e Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 24 Aug 2021 22:15:34 -0400 Subject: [PATCH 064/102] chore: Windows x86 on GitHub Actions (#3041) --- .github/workflows/windows.yml | 9 ++++-- appveyor.yml | 58 ----------------------------------- 2 files changed, 7 insertions(+), 60 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 799ca57df..f53c4891f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -19,6 +19,10 @@ jobs: - 15 - 16 + architecture: + - x64 + - x86 + include: - node: 12 os: windows-2016 @@ -36,9 +40,10 @@ jobs: uses: actions/setup-node@v2.4.0 with: node-version: ${{ matrix.node }} + architecture: ${{ matrix.architecture }} - name: Install packages - run: npm install --unsafe-perm + run: npm install env: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true @@ -48,7 +53,7 @@ jobs: - uses: actions/upload-artifact@v2 if: github.repository_owner == 'sass' && github.event_name != 'pull_request' with: - name: ${{ matrix.node }} + name: ${{ matrix.node }}-${{ matrix.architecture }} path: | vendor/**/binding.node build/Release/binding.pdb diff --git a/appveyor.yml b/appveyor.yml index 540a5f61e..97bd89919 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -77,61 +77,3 @@ secure: IZIifH990iABY3PQUtkRscTU/NOyYYwptGB6B1y2b618vpphV/2KD/4IWJzSAYAi on: appveyor_repo_tag: true # deploy on tag push only - -- - branches: - except: - - release - - /v\d\.\d\.\d/ - - skip_branch_with_pr: true - skip_tags: true - - os: Visual Studio 2017 - - configuration: testing - - platform: - - x86 - - version: "{build}" - - build: off - - clone_folder: c:\projects\node_modules\node-sass - - init: - - cmd: >- - subst s: c:\projects - - ps: set-location -path s:\node_modules\node-sass - - cache: - - '%userprofile%\.node-gyp' - - '%AppData%\npm-cache' - - environment: - SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true - matrix: - - nodejs_version: 12 - GYP_MSVS_VERSION: 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 14 - GYP_MSVS_VERSION: 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 15 - GYP_MSVS_VERSION: 2019 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - - nodejs_version: 16 - GYP_MSVS_VERSION: 2019 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - - install: - # 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 - - test_script: - - ps: set-location -path c:\projects\node_modules\node-sass - - npm test From bfa1a3c7765158717b0da2a07daa04357c851302 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 05:02:16 +0000 Subject: [PATCH 065/102] build(deps): bump actions/setup-node from 2.4.0 to 2.4.1 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.4.0...v2.4.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index e1d9864f3..320af3fee 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.4.0 + - uses: actions/setup-node@v2.4.1 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 44ec2b1de..034f4b05e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.4.0 + uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 205da615c..7adeb9600 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.4.0 + uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f53c4891f..b3ff60a32 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.4.0 + uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node }} architecture: ${{ matrix.architecture }} From dcf2e75bba4be787970c903072cc5485505a5b41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Oct 2021 05:02:43 +0000 Subject: [PATCH 066/102] build(deps-dev): bump eslint from 7.32.0 to 8.0.0 Bumps [eslint](https://github.com/eslint/eslint) from 7.32.0 to 8.0.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.32.0...v8.0.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3a8adde69..163b794ee 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "true-case-path": "^1.0.2" }, "devDependencies": { - "eslint": "^7.10.0", + "eslint": "^8.0.0", "fs-extra": "^10.0.0", "mocha": "^9.0.1", "nyc": "^15.1.0", From d7533977a0b5b299203517d962b24d8ece51d7bd Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 21 Oct 2021 22:28:38 -0400 Subject: [PATCH 067/102] feat: Add Node 17 support (#3195) * feat: Add Node 17 support * fix: Version range for 17 Co-authored-by: Michael Mifsud Co-authored-by: Michael Mifsud --- .github/workflows/alpine.yml | 3 +++ .github/workflows/linux.yml | 5 +++++ .github/workflows/macos.yml | 1 + .github/workflows/windows.yml | 3 +++ README.md | 1 + appveyor.yml | 3 +++ lib/extensions.js | 1 + package.json | 2 +- 8 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index f46d8772e..450e8fef7 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -19,6 +19,7 @@ jobs: - 14 - 15 - 16 + - 17 include: - node: 12 @@ -29,6 +30,8 @@ jobs: python: python3 - node: 16 python: python3 + - node: 17 + python: python3 steps: - name: Install Alpine build tools diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 034f4b05e..83b99bcf5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,6 +18,7 @@ jobs: - 14 - 15 - 16 + - 17 include: - node: 12 @@ -36,6 +37,10 @@ jobs: gcc: "gcc-8" gpp: "g++-8" os: ubuntu-18.04 + - node: 17 + gcc: "gcc-8" + gpp: "g++-8" + os: ubuntu-18.04 steps: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7adeb9600..e0f030838 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,6 +18,7 @@ jobs: - 14 - 15 - 16 + - 17 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b3ff60a32..f00fa7885 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,6 +18,7 @@ jobs: - 14 - 15 - 16 + - 17 architecture: - x64 @@ -32,6 +33,8 @@ jobs: os: windows-2019 - node: 16 os: windows-2019 + - node: 17 + os: windows-2019 steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index 11f080963..402db427b 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Below is a quick guide for minimum and maximum supported versions of node-sass: NodeJS | Supported node-sass version | Node Module --------|-----------------------------|------------ +Node 17 | 7.0+ | 102 Node 16 | 6.0+ | 93 Node 15 | 5.0+ | 88 Node 14 | 4.14+ | 83 diff --git a/appveyor.yml b/appveyor.yml index 97bd89919..aaefbae68 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -45,6 +45,9 @@ - nodejs_version: 16 GYP_MSVS_VERSION: 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + - nodejs_version: 17 + GYP_MSVS_VERSION: 2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 install: # https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs diff --git a/lib/extensions.js b/lib/extensions.js index ce4b17a56..8f31450a3 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -81,6 +81,7 @@ function getHumanNodeVersion(abi) { case 83: return 'Node.js 14.x'; case 88: return 'Node.js 15.x'; case 93: return 'Node.js 16.x'; + case 102: return 'Node.js 17.x'; default: return false; } } diff --git a/package.json b/package.json index 163b794ee..f6297a1a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-sass", - "version": "6.0.1", + "version": "7.0.0", "libsass": "3.5.5", "description": "Wrapper around libsass", "license": "MIT", From e80d4afbce7ee10447535dbf5723cd405c80acd8 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 21 Oct 2021 22:41:10 -0400 Subject: [PATCH 068/102] chore: Drop EOL Node 15 (#3122) * chore: Drop EOL Node 15 --- .github/workflows/alpine.yml | 3 --- .github/workflows/linux.yml | 5 ----- .github/workflows/macos.yml | 1 - .github/workflows/windows.yml | 3 --- README.md | 2 +- appveyor.yml | 3 --- 6 files changed, 1 insertion(+), 16 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 450e8fef7..958549725 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -17,7 +17,6 @@ jobs: node: - 12 - 14 - - 15 - 16 - 17 @@ -26,8 +25,6 @@ jobs: python: python2 - node: 14 python: python3 - - node: 15 - python: python3 - node: 16 python: python3 - node: 17 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 83b99bcf5..e05b4f4f3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -16,7 +16,6 @@ jobs: node: - 12 - 14 - - 15 - 16 - 17 @@ -29,10 +28,6 @@ jobs: gcc: "gcc-6" gpp: "g++-6" os: ubuntu-18.04 - - node: 15 - gcc: "gcc-6" - gpp: "g++-6" - os: ubuntu-18.04 - node: 16 gcc: "gcc-8" gpp: "g++-8" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e0f030838..23959ab53 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -16,7 +16,6 @@ jobs: node: - 12 - 14 - - 15 - 16 - 17 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f00fa7885..d3a7aa849 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -16,7 +16,6 @@ jobs: node: - 12 - 14 - - 15 - 16 - 17 @@ -29,8 +28,6 @@ jobs: os: windows-2016 - node: 14 os: windows-2016 - - node: 15 - os: windows-2019 - node: 16 os: windows-2019 - node: 17 diff --git a/README.md b/README.md index 402db427b..b0cb5b78d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ NodeJS | Supported node-sass version | Node Module --------|-----------------------------|------------ Node 17 | 7.0+ | 102 Node 16 | 6.0+ | 93 -Node 15 | 5.0+ | 88 +Node 15 | 5.0+, <7.0 | 88 Node 14 | 4.14+ | 83 Node 13 | 4.13+, <5.0 | 79 Node 12 | 4.12+ | 72 diff --git a/appveyor.yml b/appveyor.yml index aaefbae68..c489a298c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -39,9 +39,6 @@ - nodejs_version: 14 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 15 - GYP_MSVS_VERSION: 2019 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - nodejs_version: 16 GYP_MSVS_VERSION: 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 From 0a21792803639851b480fbd8cbcb5540ef974387 Mon Sep 17 00:00:00 2001 From: Scott Anderson <87314430+scott-ut@users.noreply.github.com> Date: Sun, 28 Nov 2021 11:54:40 +0000 Subject: [PATCH 069/102] Set rejectUnauthorized to true by default (#3149) Resolve CVE-2020-240-25 by setting rejectUnauthorized to true by default. Add configuration flag to override this to false if necessary. extract rejectUnauthorized download option to its own file. Add doc option to README.md. --- README.md | 15 ++++--- scripts/util/downloadoptions.js | 5 ++- scripts/util/rejectUnauthorized.js | 46 +++++++++++++++++++++ test/downloadoptions.js | 65 +++++++++++++++++++++++++++++- 4 files changed, 121 insertions(+), 10 deletions(-) create mode 100644 scripts/util/rejectUnauthorized.js diff --git a/README.md b/README.md index b0cb5b78d..a1da0f363 100644 --- a/README.md +++ b/README.md @@ -596,12 +596,13 @@ When compiling a directory `--source-map` can either be a boolean value or a dir node-sass supports different configuration parameters to change settings related to the sass binary such as binary name, binary path or alternative download path. Following parameters are supported by node-sass: -Variable name | .npmrc parameter | Process argument | Value ------------------|------------------|--------------------|------ -SASS_BINARY_NAME | sass_binary_name | --sass-binary-name | path -SASS_BINARY_SITE | sass_binary_site | --sass-binary-site | URL -SASS_BINARY_PATH | sass_binary_path | --sass-binary-path | path -SASS_BINARY_DIR | sass_binary_dir | --sass-binary-dir | path +Variable name | .npmrc parameter | Process argument | Value +-------------------------|--------------------------|----------------------------|------ +SASS_BINARY_NAME | sass_binary_name | --sass-binary-name | path +SASS_BINARY_SITE | sass_binary_site | --sass-binary-site | URL +SASS_BINARY_PATH | sass_binary_path | --sass-binary-path | path +SASS_BINARY_DIR | sass_binary_dir | --sass-binary-dir | path +SASS_REJECT_UNAUTHORIZED | sass_reject_unauthorized | --sass-reject-unauthorized | value These parameters can be used as environment variable: @@ -615,6 +616,8 @@ As a process argument: * E.g. `npm install node-sass --sass-binary-site=http://example.com/` +If you are using self-signed certificates for your binary then `SASS_REJECT_UNAUTHORIZED` will override (rejectUnauthorized)[https://nodejs.org/docs/latest/api/tls.html#tls_tls_createserver_options_secureconnectionlistener]. + ## Post-install Build Install runs only two Mocha tests to see if your machine can use the pre-built [LibSass] which will save some time during install. If any tests fail it will build from source. diff --git a/scripts/util/downloadoptions.js b/scripts/util/downloadoptions.js index 23529716f..e9056b10e 100644 --- a/scripts/util/downloadoptions.js +++ b/scripts/util/downloadoptions.js @@ -1,5 +1,6 @@ var proxy = require('./proxy'), - userAgent = require('./useragent'); + userAgent = require('./useragent'), + rejectUnauthorized = require('./rejectUnauthorized'); /** * The options passed to request when downloading the bibary @@ -14,7 +15,7 @@ var proxy = require('./proxy'), */ module.exports = function() { var options = { - rejectUnauthorized: false, + rejectUnauthorized: rejectUnauthorized(), timeout: 60000, headers: { 'User-Agent': userAgent(), diff --git a/scripts/util/rejectUnauthorized.js b/scripts/util/rejectUnauthorized.js new file mode 100644 index 000000000..a1c801073 --- /dev/null +++ b/scripts/util/rejectUnauthorized.js @@ -0,0 +1,46 @@ +var pkg = require('../../package.json'); + +/** + * Get the value of a CLI argument + * + * @param {String} name + * @param {Array} args + * @api private + */ + function getArgument(name, args) { + var flags = args || process.argv.slice(2), + index = flags.lastIndexOf(name); + + if (index === -1 || index + 1 >= flags.length) { + return null; + } + + return flags[index + 1]; +} + +/** + * Get the value of reject-unauthorized + * If environment variable SASS_REJECT_UNAUTHORIZED is non-zero, + * .npmrc variable sass_reject_unauthorized or + * process argument --sass-reject_unauthorized is provided, + * set rejectUnauthorized to true + * Else set to false by default + * + * @return {Boolean} The value of rejectUnauthorized + * @api private + */ +module.exports = function() { + var rejectUnauthorized = false; + + if (getArgument('--sass-reject-unauthorized')) { + rejectUnauthorized = getArgument('--sass-reject-unauthorized'); + } else if (process.env.SASS_REJECT_UNAUTHORIZED !== '0') { + rejectUnauthorized = true; + } else if (process.env.npm_config_sass_reject_unauthorized) { + rejectUnauthorized = process.env.npm_config_sass_reject_unauthorized; + } else if (pkg.nodeSassConfig && pkg.nodeSassConfig.rejectUnauthorized) { + rejectUnauthorized = pkg.nodeSassConfig.rejectUnauthorized; + } + + return rejectUnauthorized; +}; diff --git a/test/downloadoptions.js b/test/downloadoptions.js index de8963842..a6e2d9bae 100644 --- a/test/downloadoptions.js +++ b/test/downloadoptions.js @@ -8,7 +8,7 @@ describe('util', function() { describe('without a proxy', function() { it('should look as we expect', function() { var expected = { - rejectUnauthorized: false, + rejectUnauthorized: true, timeout: 60000, headers: { 'User-Agent': ua(), @@ -33,7 +33,7 @@ describe('util', function() { it('should look as we expect', function() { var expected = { - rejectUnauthorized: false, + rejectUnauthorized: true, proxy: proxy, timeout: 60000, headers: { @@ -57,6 +57,25 @@ describe('util', function() { delete process.env.HTTP_PROXY; }); + it('should look as we expect', function() { + var expected = { + rejectUnauthorized: true, + timeout: 60000, + headers: { + 'User-Agent': ua(), + }, + encoding: null, + }; + + assert.deepStrictEqual(opts(), expected); + }); + }); + + describe('with SASS_REJECT_UNAUTHORIZED set to false', function() { + beforeEach(function() { + process.env.SASS_REJECT_UNAUTHORIZED = '0'; + }); + it('should look as we expect', function() { var expected = { rejectUnauthorized: false, @@ -70,5 +89,47 @@ describe('util', function() { assert.deepStrictEqual(opts(), expected); }); }); + + describe('with SASS_REJECT_UNAUTHORIZED set to true', function() { + beforeEach(function() { + process.env.SASS_REJECT_UNAUTHORIZED = '1'; + }); + + it('should look as we expect', function() { + var expected = { + rejectUnauthorized: true, + timeout: 60000, + headers: { + 'User-Agent': ua(), + }, + encoding: null, + }; + + assert.deepStrictEqual(opts(), expected); + }); + }); + + describe('with npm_config_sass_reject_unauthorized set to true', function() { + beforeEach(function() { + process.env.npm_config_sass_reject_unauthorized = true; + }); + + it('should look as we expect', function() { + var expected = { + rejectUnauthorized: true, + timeout: 60000, + headers: { + 'User-Agent': ua(), + }, + encoding: null, + }; + + assert.deepStrictEqual(opts(), expected); + }); + + afterEach(function() { + process.env.npm_config_sass_reject_unauthorized = undefined; + }); + }); }); }); From 918dcb3a7712a02578947b0354b9f109656f7abf Mon Sep 17 00:00:00 2001 From: Michael Mifsud Date: Sun, 28 Nov 2021 22:59:51 +1100 Subject: [PATCH 070/102] Lint fix Fix lint issue introduced in #3149. --- scripts/util/rejectUnauthorized.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/util/rejectUnauthorized.js b/scripts/util/rejectUnauthorized.js index a1c801073..43d8373a6 100644 --- a/scripts/util/rejectUnauthorized.js +++ b/scripts/util/rejectUnauthorized.js @@ -7,7 +7,7 @@ var pkg = require('../../package.json'); * @param {Array} args * @api private */ - function getArgument(name, args) { +function getArgument(name, args) { var flags = args || process.argv.slice(2), index = flags.lastIndexOf(name); From c929f25058da07849e6ffcc0f93087c060c297f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Dec 2021 16:49:42 +1100 Subject: [PATCH 071/102] build(deps): bump node-gyp from 7.1.2 to 8.4.1 (#3209) Bumps [node-gyp](https://github.com/nodejs/node-gyp) from 7.1.2 to 8.4.1. - [Release notes](https://github.com/nodejs/node-gyp/releases) - [Changelog](https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodejs/node-gyp/compare/v7.1.2...v8.4.1) --- updated-dependencies: - dependency-name: node-gyp dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6297a1a8..d59c5b81d 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "lodash": "^4.17.15", "meow": "^9.0.0", "nan": "^2.13.2", - "node-gyp": "^7.1.0", + "node-gyp": "^8.4.1", "npmlog": "^5.0.0", "request": "^2.88.0", "sass-graph": "2.2.5", From 77049d166e112a03c39e2d16cbbcbd4342e3304c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Dec 2021 17:18:29 +1100 Subject: [PATCH 072/102] build(deps): bump sass-graph from 2.2.5 to 4.0.0 (#3224) Bumps [sass-graph](https://github.com/xzyfer/sass-graph) from 2.2.5 to 4.0.0. - [Release notes](https://github.com/xzyfer/sass-graph/releases) - [Changelog](https://github.com/xzyfer/sass-graph/blob/master/CHANGELOG.md) - [Commits](https://github.com/xzyfer/sass-graph/compare/v2.2.5...v4.0.0) --- updated-dependencies: - dependency-name: sass-graph dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d59c5b81d..2058000eb 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "node-gyp": "^8.4.1", "npmlog": "^5.0.0", "request": "^2.88.0", - "sass-graph": "2.2.5", + "sass-graph": "4.0.0", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" }, From 99242d756d746c6f3c01f39ff081b08f979d3975 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Mon, 27 Dec 2021 17:20:06 +1100 Subject: [PATCH 073/102] 7.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2058000eb..e2e111d0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-sass", - "version": "7.0.0", + "version": "7.0.1", "libsass": "3.5.5", "description": "Wrapper around libsass", "license": "MIT", From c818907550103d64202898025402ba99d3acb549 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Dec 2021 10:50:30 -0500 Subject: [PATCH 074/102] ci: unpin actions/setup-node to v2 * build(deps): bump actions/setup-node from 2.4.1 to 2.5.0 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.4.1 to 2.5.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.4.1...v2.5.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * ci: unpin actions/setup-node to v2 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nick Schonning --- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 320af3fee..2d605e603 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2.4.1 + - uses: actions/setup-node@v2 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e05b4f4f3..1a0ef3ce9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.4.1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 23959ab53..fd8ba580e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.4.1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d3a7aa849..a4546246f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2.4.1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} architecture: ${{ matrix.architecture }} From 308d533c25d2b7e182b32ab86d50a7975fe50ab3 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 27 Dec 2021 10:53:07 -0500 Subject: [PATCH 075/102] ci: use Python 3 for Node 12 New node-gyp no longer supports Python 2 --- .github/workflows/alpine.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 958549725..3b359a365 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -22,7 +22,7 @@ jobs: include: - node: 12 - python: python2 + python: python3 - node: 14 python: python3 - node: 16 From 77d12f090e2c7e08dad6568f818f918f2339238b Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 27 Dec 2021 11:14:00 -0500 Subject: [PATCH 076/102] chore: disable Apline for Node 16/17 builds Inlined the python 3 since that is the only version used now --- .github/workflows/alpine.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 3b359a365..acb69da58 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -17,22 +17,13 @@ jobs: node: - 12 - 14 - - 16 - - 17 - - include: - - node: 12 - python: python3 - - node: 14 - python: python3 - - node: 16 - python: python3 - - node: 17 - python: python3 + # Node 16 and 17 are perma-red for the tests right now + # - 16 + # - 17 steps: - name: Install Alpine build tools - run: apk add --no-cache ${{ matrix.python }} make git gcc g++ + run: apk add --no-cache python3 make git gcc g++ - uses: actions/checkout@v2 From adc2f8b3d36ad152ab5ed857f1e32db2e1afa6e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Dec 2021 17:56:31 +1100 Subject: [PATCH 077/102] build(deps): bump true-case-path from 1.0.3 to 2.2.1 (#3000) * build(deps): bump true-case-path from 1.0.3 to 2.2.1 Bumps [true-case-path](https://github.com/Profiscience/true-case-path) from 1.0.3 to 2.2.1. - [Release notes](https://github.com/Profiscience/true-case-path/releases) - [Changelog](https://github.com/Profiscience/true-case-path/blob/master/CHANGELOG.md) - [Commits](https://github.com/Profiscience/true-case-path/commits/v2.2.1) Signed-off-by: dependabot[bot] * Update extensions.js Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Mifsud --- lib/extensions.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index 8f31450a3..fcfffdc19 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -5,7 +5,7 @@ var eol = require('os').EOL, fs = require('fs'), path = require('path'), - trueCasePathSync = require('true-case-path'), + trueCasePathSync = require('true-case-path').trueCasePathSync, pkg = require('../package.json'), defaultBinaryDir = path.join(__dirname, '..', 'vendor'); diff --git a/package.json b/package.json index e2e111d0e..a71f18043 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "request": "^2.88.0", "sass-graph": "4.0.0", "stdout-stream": "^1.4.0", - "true-case-path": "^1.0.2" + "true-case-path": "^2.2.1" }, "devDependencies": { "eslint": "^8.0.0", From 3bb51da32957812f1ffc780fc803cf2fb3d5847b Mon Sep 17 00:00:00 2001 From: Camille Drapier Date: Wed, 29 Dec 2021 17:34:49 +0900 Subject: [PATCH 078/102] Use make-fetch-happen instead of request (#3193) Fixes #3206 Co-authored-by: Camille Drapier Co-authored-by: Michael Mifsud --- package.json | 3 +- scripts/install.js | 57 ++++++--------------------------- scripts/util/downloadoptions.js | 12 ++----- test/downloadoptions.js | 18 ++++------- 4 files changed, 20 insertions(+), 70 deletions(-) diff --git a/package.json b/package.json index a71f18043..623c4268e 100644 --- a/package.json +++ b/package.json @@ -60,11 +60,10 @@ "get-stdin": "^4.0.1", "glob": "^7.0.3", "lodash": "^4.17.15", + "make-fetch-happen": "^9.1.0", "meow": "^9.0.0", "nan": "^2.13.2", "node-gyp": "^8.4.1", - "npmlog": "^5.0.0", - "request": "^2.88.0", "sass-graph": "4.0.0", "stdout-stream": "^1.4.0", "true-case-path": "^2.2.1" diff --git a/scripts/install.js b/scripts/install.js index 2cef34f7d..e474506ff 100644 --- a/scripts/install.js +++ b/scripts/install.js @@ -5,8 +5,7 @@ var fs = require('fs'), eol = require('os').EOL, path = require('path'), - request = require('request'), - log = require('npmlog'), + fetch = require('make-fetch-happen'), sass = require('../lib/extensions'), downloadOptions = require('./util/downloadoptions'); @@ -21,21 +20,8 @@ var fs = require('fs'), function download(url, dest, cb) { var reportError = function(err) { - var timeoutMessge; - - if (err.code === 'ETIMEDOUT') { - if (err.connect === true) { - // timeout is hit while your client is attempting to establish a connection to a remote machine - timeoutMessge = 'Timed out attemping to establish a remote connection'; - } else { - timeoutMessge = 'Timed out whilst downloading the prebuilt binary'; - // occurs any time the server is too slow to send back a part of the response - } - - } cb(['Cannot download "', url, '": ', eol, eol, typeof err.message === 'string' ? err.message : err, eol, eol, - timeoutMessge ? timeoutMessge + eol + eol : timeoutMessge, 'Hint: If github.com is not accessible in your location', eol, ' try setting a proxy via HTTP_PROXY, e.g. ', eol, eol, ' export HTTP_PROXY=http://example.com:1234',eol, eol, @@ -44,45 +30,22 @@ function download(url, dest, cb) { }; var successful = function(response) { - return response.statusCode >= 200 && response.statusCode < 300; + return response.status >= 200 && response.status < 300; }; console.log('Downloading binary from', url); try { - request(url, downloadOptions(), function(err, response, buffer) { - if (err) { - reportError(err); - } else if (!successful(response)) { - reportError(['HTTP error', response.statusCode, response.statusMessage].join(' ')); + fetch(url, downloadOptions()).then(function (response) { + fs.createWriteStream(dest).on('error', cb).end(response.data, cb); + console.log('Download complete'); + }).catch(function(err) { + if(!successful(err)) { + reportError(['HTTP error', err.code, err.message].join(' ')); } else { - console.log('Download complete'); - - if (successful(response)) { - fs.createWriteStream(dest) - .on('error', cb) - .end(buffer, cb); - } else { - cb(); - } + reportError(err); } - }) - .on('response', function(response) { - var length = parseInt(response.headers['content-length'], 10); - var progress = log.newItem('', length); - - // The `progress` is true by default. However if it has not - // been explicitly set it's `undefined` which is considered - // as far as npm is concerned. - if (process.env.npm_config_progress === 'true') { - log.enableProgress(); - - response.on('data', function(chunk) { - progress.completeWork(chunk.length); - }) - .on('end', progress.finish); - } - }); + }); } catch (err) { cb(err); } diff --git a/scripts/util/downloadoptions.js b/scripts/util/downloadoptions.js index e9056b10e..6add52a10 100644 --- a/scripts/util/downloadoptions.js +++ b/scripts/util/downloadoptions.js @@ -3,24 +3,18 @@ var proxy = require('./proxy'), rejectUnauthorized = require('./rejectUnauthorized'); /** - * The options passed to request when downloading the bibary + * The options passed to make-fetch-happen when downloading the binary * - * There some nuance to how request handles options. Specifically - * we've been caught by their usage of `hasOwnProperty` rather than - * falsey checks. By moving the options generation into a util helper - * we can test for regressions. - * - * @return {Object} an options object for request + * @return {Object} an options object for make-fetch-happen * @api private */ module.exports = function() { var options = { - rejectUnauthorized: rejectUnauthorized(), + strictSSL: rejectUnauthorized(), timeout: 60000, headers: { 'User-Agent': userAgent(), }, - encoding: null, }; var proxyConfig = proxy(); diff --git a/test/downloadoptions.js b/test/downloadoptions.js index a6e2d9bae..968213e3c 100644 --- a/test/downloadoptions.js +++ b/test/downloadoptions.js @@ -8,12 +8,11 @@ describe('util', function() { describe('without a proxy', function() { it('should look as we expect', function() { var expected = { - rejectUnauthorized: true, + strictSSL: true, timeout: 60000, headers: { 'User-Agent': ua(), }, - encoding: null, }; assert.deepStrictEqual(opts(), expected); @@ -33,13 +32,12 @@ describe('util', function() { it('should look as we expect', function() { var expected = { - rejectUnauthorized: true, + strictSSL: true, proxy: proxy, timeout: 60000, headers: { 'User-Agent': ua(), }, - encoding: null, }; assert.deepStrictEqual(opts(), expected); @@ -59,12 +57,11 @@ describe('util', function() { it('should look as we expect', function() { var expected = { - rejectUnauthorized: true, + strictSSL: true, timeout: 60000, headers: { 'User-Agent': ua(), }, - encoding: null, }; assert.deepStrictEqual(opts(), expected); @@ -78,12 +75,11 @@ describe('util', function() { it('should look as we expect', function() { var expected = { - rejectUnauthorized: false, + strictSSL: false, timeout: 60000, headers: { 'User-Agent': ua(), }, - encoding: null, }; assert.deepStrictEqual(opts(), expected); @@ -97,12 +93,11 @@ describe('util', function() { it('should look as we expect', function() { var expected = { - rejectUnauthorized: true, + strictSSL: true, timeout: 60000, headers: { 'User-Agent': ua(), }, - encoding: null, }; assert.deepStrictEqual(opts(), expected); @@ -116,12 +111,11 @@ describe('util', function() { it('should look as we expect', function() { var expected = { - rejectUnauthorized: true, + strictSSL: true, timeout: 60000, headers: { 'User-Agent': ua(), }, - encoding: null, }; assert.deepStrictEqual(opts(), expected); From 85b0d221a93a7f9e707220e61f05f430c9399460 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 05:01:58 +0000 Subject: [PATCH 079/102] build(deps): bump actions/setup-node from 2 to 3 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2 to 3. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 2d605e603..7aa551d87 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1a0ef3ce9..32591a14e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,7 +42,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index fd8ba580e..fc93cb871 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index a4546246f..1def76e70 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Node.js environment - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} architecture: ${{ matrix.architecture }} From 29e2344bc1700d44274192a3ca3352ec66451d23 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 05:02:11 +0000 Subject: [PATCH 080/102] build(deps): bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/alpine.yml | 2 +- .github/workflows/coverage.yml | 2 +- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index acb69da58..8b505349f 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -25,7 +25,7 @@ jobs: - name: Install Alpine build tools run: apk add --no-cache python3 make git gcc g++ - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 67a6ecd14..c66735b2b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -26,7 +26,7 @@ jobs: if: github.repository_owner == 'sass' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 7aa551d87..2c6ba3b0a 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -25,7 +25,7 @@ jobs: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-node@v3 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 32591a14e..690dfeb89 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -39,7 +39,7 @@ jobs: steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Node.js environment uses: actions/setup-node@v3 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index fc93cb871..16988f34d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -20,7 +20,7 @@ jobs: - 17 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Node.js environment uses: actions/setup-node@v3 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1def76e70..378a1134b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -34,7 +34,7 @@ jobs: os: windows-2019 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Node.js environment uses: actions/setup-node@v3 From 4edf5947ac0e703f988c6de89440db096080b3fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 05:03:00 +0000 Subject: [PATCH 081/102] build(deps): bump node-gyp from 8.4.1 to 9.0.0 Bumps [node-gyp](https://github.com/nodejs/node-gyp) from 8.4.1 to 9.0.0. - [Release notes](https://github.com/nodejs/node-gyp/releases) - [Changelog](https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodejs/node-gyp/compare/v8.4.1...v9.0.0) --- updated-dependencies: - dependency-name: node-gyp dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 623c4268e..89e5f144e 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "make-fetch-happen": "^9.1.0", "meow": "^9.0.0", "nan": "^2.13.2", - "node-gyp": "^8.4.1", + "node-gyp": "^9.0.0", "sass-graph": "4.0.0", "stdout-stream": "^1.4.0", "true-case-path": "^2.2.1" From e6194b1c148bf2b1f46aed4fc9453f8ef28e6d08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 06:38:02 +0000 Subject: [PATCH 082/102] build(deps): bump make-fetch-happen from 9.1.0 to 10.0.4 Bumps [make-fetch-happen](https://github.com/npm/make-fetch-happen) from 9.1.0 to 10.0.4. - [Release notes](https://github.com/npm/make-fetch-happen/releases) - [Changelog](https://github.com/npm/make-fetch-happen/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/make-fetch-happen/compare/v9.1.0...v10.0.4) --- updated-dependencies: - dependency-name: make-fetch-happen dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 89e5f144e..680c38899 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "get-stdin": "^4.0.1", "glob": "^7.0.3", "lodash": "^4.17.15", - "make-fetch-happen": "^9.1.0", + "make-fetch-happen": "^10.0.4", "meow": "^9.0.0", "nan": "^2.13.2", "node-gyp": "^9.0.0", From b465b69777c073fbf5bffde69c5757d657e72a6e Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 13 Apr 2022 10:31:44 -0400 Subject: [PATCH 083/102] chore: bump GitHub Actions to Windows 2019 (#3254) --- .github/workflows/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 378a1134b..c4799e8e1 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -25,9 +25,9 @@ jobs: include: - node: 12 - os: windows-2016 + os: windows-2019 - node: 14 - os: windows-2016 + os: windows-2019 - node: 16 os: windows-2019 - node: 17 From 145611489d7f873582c80c6cd73d50ee1997b0ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Apr 2022 14:35:29 +0000 Subject: [PATCH 084/102] build(deps): bump actions/upload-artifact from 2 to 3 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/alpine.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 8b505349f..4198573be 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -35,7 +35,7 @@ jobs: - name: Run tests run: npm test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: github.repository_owner == 'sass' && github.event_name != 'pull_request' with: name: ${{ matrix.node }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 690dfeb89..3fcddc01a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -61,7 +61,7 @@ jobs: - name: Run tests run: npm test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: github.repository_owner == 'sass' && github.event_name != 'pull_request' with: name: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 16988f34d..cd65d5231 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -35,7 +35,7 @@ jobs: - name: Run tests run: npm test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: github.repository_owner == 'sass' && github.event_name != 'pull_request' with: name: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c4799e8e1..0c40a7a3f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -50,7 +50,7 @@ jobs: - name: Run tests run: npm test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: github.repository_owner == 'sass' && github.event_name != 'pull_request' with: name: ${{ matrix.node }}-${{ matrix.architecture }} From 365d357a8b720d3a2ba9b7f662e2d75d1e6a85b2 Mon Sep 17 00:00:00 2001 From: NPM Mirror Bot Date: Sat, 12 Feb 2022 03:53:34 +0000 Subject: [PATCH 085/102] update https://registry.npm.taobao.org to https://registry.npmmirror.com --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a1da0f363..0bc783b8f 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ SyntaxError: Use of const in strict mode. ### Install from mirror in China ```shell -npm install -g mirror-config-china --registry=http://registry.npm.taobao.org +npm install -g mirror-config-china --registry=https://registry.npmmirror.com npm install node-sass ``` From 15233309452f1a33896fe08fcbd3cdc0294c7818 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 11 Apr 2022 14:18:40 -0400 Subject: [PATCH 086/102] feat: Drop Node 12 Fixes #3250 --- .github/workflows/alpine.yml | 1 - .github/workflows/linux.yml | 5 ----- .github/workflows/macos.yml | 1 - .github/workflows/windows.yml | 3 --- README.md | 4 ++-- appveyor.yml | 3 --- package.json | 2 +- 7 files changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 4198573be..2681f40d3 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -15,7 +15,6 @@ jobs: fail-fast: false matrix: node: - - 12 - 14 # Node 16 and 17 are perma-red for the tests right now # - 16 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3fcddc01a..822fda14d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -14,16 +14,11 @@ jobs: fail-fast: false matrix: node: - - 12 - 14 - 16 - 17 include: - - node: 12 - gcc: "gcc-6" - gpp: "g++-6" - os: ubuntu-18.04 - node: 14 gcc: "gcc-6" gpp: "g++-6" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index cd65d5231..a88065864 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -14,7 +14,6 @@ jobs: fail-fast: false matrix: node: - - 12 - 14 - 16 - 17 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 0c40a7a3f..41dea8f93 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -14,7 +14,6 @@ jobs: fail-fast: false matrix: node: - - 12 - 14 - 16 - 17 @@ -24,8 +23,6 @@ jobs: - x86 include: - - node: 12 - os: windows-2019 - node: 14 os: windows-2019 - node: 16 diff --git a/README.md b/README.md index 0bc783b8f..e80b14094 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ NodeJS | Supported node-sass version | Node Module --------|-----------------------------|------------ Node 17 | 7.0+ | 102 Node 16 | 6.0+ | 93 -Node 15 | 5.0+, <7.0 | 88 +Node 15 | 5.0+, <7.0 | 88 Node 14 | 4.14+ | 83 Node 13 | 4.13+, <5.0 | 79 -Node 12 | 4.12+ | 72 +Node 12 | 4.12+, <8.0 | 72 Node 11 | 4.10+, <5.0 | 67 Node 10 | 4.9+, <6.0 | 64 Node 8 | 4.5.3+, <5.0 | 57 diff --git a/appveyor.yml b/appveyor.yml index c489a298c..a7b3a0565 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,9 +33,6 @@ environment: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true matrix: - - nodejs_version: 12 - GYP_MSVS_VERSION: 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - nodejs_version: 14 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 diff --git a/package.json b/package.json index 680c38899..424970f79 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "url": "http://andrew.github.com" }, "engines": { - "node": ">=12" + "node": ">=14" }, "main": "lib/index.js", "nodeSassConfig": { From 24741b351cb046c4548e77886647cd4c89b48c66 Mon Sep 17 00:00:00 2001 From: Jamie King Date: Thu, 18 Aug 2022 15:59:23 -0700 Subject: [PATCH 087/102] docs(readme): fix docpad plugin link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e80b14094..51f5864e9 100644 --- a/README.md +++ b/README.md @@ -491,7 +491,7 @@ This functionality has been moved to [`node-sass-middleware`](https://github.com ### DocPad Plugin -[@10xLaCroixDrinker](https://github.com/10xLaCroixDrinker) wrote a [DocPad](http://docpad.org/) plugin that compiles `.scss` files using node-sass: +[@10xLaCroixDrinker](https://github.com/10xLaCroixDrinker) wrote a [DocPad](http://docpad.org/) plugin that compiles `.scss` files using node-sass: ### Duo.js extension From c7163594c339942d2732c513b6c68f03af070a3a Mon Sep 17 00:00:00 2001 From: Akhil G Krishnan Date: Thu, 8 Sep 2022 07:50:27 +0530 Subject: [PATCH 088/102] Bump sass-graph@^4.0.1 (#3292) * Bump scss-graph@^4.0.1 * Added circumflex(^) to the sass-graph version. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 424970f79..546d351d7 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "meow": "^9.0.0", "nan": "^2.13.2", "node-gyp": "^9.0.0", - "sass-graph": "4.0.0", + "sass-graph": "^4.0.1", "stdout-stream": "^1.4.0", "true-case-path": "^2.2.1" }, From 3b556c1c9a79e87fd54fdaa9a1a18741a7616025 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Thu, 8 Sep 2022 12:30:17 +1000 Subject: [PATCH 089/102] 7.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 546d351d7..0e6034090 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-sass", - "version": "7.0.1", + "version": "7.0.2", "libsass": "3.5.5", "description": "Wrapper around libsass", "license": "MIT", From d595abf2ed3e8013509c04b1205005e95d3fcc2e Mon Sep 17 00:00:00 2001 From: xzyfer Date: Thu, 8 Sep 2022 18:16:02 +1000 Subject: [PATCH 090/102] 7.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e6034090..768109f21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-sass", - "version": "7.0.2", + "version": "7.0.3", "libsass": "3.5.5", "description": "Wrapper around libsass", "license": "MIT", From ab7840b335d58f59731315354f2ea18d6bdf8fd6 Mon Sep 17 00:00:00 2001 From: Michael Mifsud Date: Tue, 8 Nov 2022 22:08:33 +1100 Subject: [PATCH 091/102] Fix binaries being partially downloaded (#3313) --- scripts/install.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install.js b/scripts/install.js index e474506ff..42511b393 100644 --- a/scripts/install.js +++ b/scripts/install.js @@ -37,7 +37,9 @@ function download(url, dest, cb) { try { fetch(url, downloadOptions()).then(function (response) { - fs.createWriteStream(dest).on('error', cb).end(response.data, cb); + return response.buffer(); + }).then(function (buffer) { + fs.createWriteStream(dest).on('error', cb).end(buffer, cb); console.log('Download complete'); }).catch(function(err) { if(!successful(err)) { From e9bb866b0cfec9f9f98c370be325289d25be5c62 Mon Sep 17 00:00:00 2001 From: Michael Mifsud Date: Tue, 8 Nov 2022 22:40:22 +1100 Subject: [PATCH 092/102] Bump node-gyp and nan for node 19 support (#3314) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 768109f21..fc05a93f2 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,8 @@ "lodash": "^4.17.15", "make-fetch-happen": "^10.0.4", "meow": "^9.0.0", - "nan": "^2.13.2", - "node-gyp": "^9.0.0", + "nan": "^2.17.0", + "node-gyp": "^8.4.1", "sass-graph": "^4.0.1", "stdout-stream": "^1.4.0", "true-case-path": "^2.2.1" From 98e75b39e22ba2fdf7726eefa23ba5f7247540c4 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 9 Nov 2022 04:56:43 -0500 Subject: [PATCH 093/102] feat: Node 18 and 19 support and drop Node 17 (#3257) Fixes https://github.com/sass/node-sass/issues/3251 --- .github/workflows/alpine.yml | 5 +++-- .github/workflows/linux.yml | 10 +++++++--- .github/workflows/macos.yml | 3 ++- .github/workflows/windows.yml | 13 +++---------- README.md | 4 +++- appveyor.yml | 6 +++++- lib/extensions.js | 2 ++ 7 files changed, 25 insertions(+), 18 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 2681f40d3..c918e3e69 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -16,9 +16,10 @@ jobs: matrix: node: - 14 - # Node 16 and 17 are perma-red for the tests right now + # Node 16+ are perma-red for the tests right now # - 16 - # - 17 + # - 18 + # - 19 steps: - name: Install Alpine build tools diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 822fda14d..4d41f6567 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -16,7 +16,7 @@ jobs: node: - 14 - 16 - - 17 + - 18 include: - node: 14 @@ -27,10 +27,14 @@ jobs: gcc: "gcc-8" gpp: "g++-8" os: ubuntu-18.04 - - node: 17 + - node: 18 gcc: "gcc-8" gpp: "g++-8" - os: ubuntu-18.04 + os: ubuntu-20.04 + - node: 19 + gcc: "gcc-8" + gpp: "g++-8" + os: ubuntu-20.04 steps: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a88065864..e03df1faa 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -16,7 +16,8 @@ jobs: node: - 14 - 16 - - 17 + - 18 + - 19 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 41dea8f93..0ee040ef0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: ${{ matrix.os }} + runs-on: windows-2019 strategy: fail-fast: false @@ -16,20 +16,13 @@ jobs: node: - 14 - 16 - - 17 + - 18 + - 19 architecture: - x64 - x86 - include: - - node: 14 - os: windows-2019 - - node: 16 - os: windows-2019 - - node: 17 - os: windows-2019 - steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index 51f5864e9..f08caf777 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,9 @@ Below is a quick guide for minimum and maximum supported versions of node-sass: NodeJS | Supported node-sass version | Node Module --------|-----------------------------|------------ -Node 17 | 7.0+ | 102 +Node 19 | 8.0+ | 111 +Node 18 | 8.0+ | 108 +Node 17 | 7.0+, <8.0 | 102 Node 16 | 6.0+ | 93 Node 15 | 5.0+, <7.0 | 88 Node 14 | 4.14+ | 83 diff --git a/appveyor.yml b/appveyor.yml index a7b3a0565..4a6837ddd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -39,9 +39,13 @@ - nodejs_version: 16 GYP_MSVS_VERSION: 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - - nodejs_version: 17 + - nodejs_version: 18 GYP_MSVS_VERSION: 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + - nodejs_version: 19 + GYP_MSVS_VERSION: 2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + install: # https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs diff --git a/lib/extensions.js b/lib/extensions.js index fcfffdc19..4622f5dc5 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -82,6 +82,8 @@ function getHumanNodeVersion(abi) { case 88: return 'Node.js 15.x'; case 93: return 'Node.js 16.x'; case 102: return 'Node.js 17.x'; + case 108: return 'Node.js 18.x'; + case 111: return 'Node.js 19.x'; default: return false; } } From ee13eb9c62449d1e535189a063cbdd15583ebf32 Mon Sep 17 00:00:00 2001 From: xzyfer Date: Wed, 9 Nov 2022 20:56:32 +1100 Subject: [PATCH 094/102] 8.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc05a93f2..7139aa80e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-sass", - "version": "7.0.3", + "version": "8.0.0", "libsass": "3.5.5", "description": "Wrapper around libsass", "license": "MIT", From c34837d7bfab1ef86a8d9989e83602895373a0a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 05:56:36 +0000 Subject: [PATCH 095/102] build(deps): bump coverallsapp/github-action from 1.1.3 to 1.2.0 Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 1.1.3 to 1.2.0. - [Release notes](https://github.com/coverallsapp/github-action/releases) - [Commits](https://github.com/coverallsapp/github-action/compare/1.1.3...v1.2.0) --- updated-dependencies: - dependency-name: coverallsapp/github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index c66735b2b..361a711b1 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -35,6 +35,6 @@ jobs: run: npm run coverage - name: Coveralls GitHub Action - uses: coverallsapp/github-action@1.1.3 + uses: coverallsapp/github-action@v1.2.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} From e069f7356b76b286a51d0c4a48f93fb14bd0bdfc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 05:56:44 +0000 Subject: [PATCH 096/102] build(deps): bump coverallsapp/github-action from 1.2.0 to 2.0.0 Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 1.2.0 to 2.0.0. - [Release notes](https://github.com/coverallsapp/github-action/releases) - [Commits](https://github.com/coverallsapp/github-action/compare/v1.2.0...v2.0.0) --- updated-dependencies: - dependency-name: coverallsapp/github-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 361a711b1..71bb5240e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -35,6 +35,6 @@ jobs: run: npm run coverage - name: Coveralls GitHub Action - uses: coverallsapp/github-action@v1.2.0 + uses: coverallsapp/github-action@v2.0.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} From 06ae4c70f792287c28bb765811014c7c56012d72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:21:47 -0400 Subject: [PATCH 097/102] build(deps): bump coverallsapp/github-action from 2.0.0 to 2.1.0 (#3350) * build(deps): bump coverallsapp/github-action from 2.0.0 to v2 Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/coverallsapp/github-action/releases) - [Commits](https://github.com/coverallsapp/github-action/compare/v2.0.0...v2.1.0) --- updated-dependencies: - dependency-name: coverallsapp/github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update .github/workflows/coverage.yml --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nick Schonning --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 71bb5240e..58dc4286b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -35,6 +35,6 @@ jobs: run: npm run coverage - name: Coveralls GitHub Action - uses: coverallsapp/github-action@v2.0.0 + uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} From 87f38998da059d13a87a7fc9f3d29d5728128e2c Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sat, 20 May 2023 01:26:12 -0400 Subject: [PATCH 098/102] feat: Node 20 support (#3355) * feat: Node 20 support * ci: update stalled Alpine/Linux jobs * feat: drop Node 14 --- .github/workflows/alpine.yml | 9 ++++----- .github/workflows/linux.yml | 15 +++++---------- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- README.md | 3 ++- appveyor.yml | 6 +++--- lib/extensions.js | 1 + package.json | 4 ++-- 8 files changed, 19 insertions(+), 23 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index c918e3e69..188076059 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -15,11 +15,10 @@ jobs: fail-fast: false matrix: node: - - 14 - # Node 16+ are perma-red for the tests right now - # - 16 - # - 18 - # - 19 + - 16 + - 18 + - 19 + - 20 steps: - name: Install Alpine build tools diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4d41f6567..b0b3fc9dc 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -13,20 +13,11 @@ jobs: strategy: fail-fast: false matrix: - node: - - 14 - - 16 - - 18 - include: - - node: 14 - gcc: "gcc-6" - gpp: "g++-6" - os: ubuntu-18.04 - node: 16 gcc: "gcc-8" gpp: "g++-8" - os: ubuntu-18.04 + os: ubuntu-20.04 - node: 18 gcc: "gcc-8" gpp: "g++-8" @@ -35,6 +26,10 @@ jobs: gcc: "gcc-8" gpp: "g++-8" os: ubuntu-20.04 + - node: 20 + gcc: "gcc-10" + gpp: "g++-10" + os: ubuntu-22.04 steps: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e03df1faa..a3135c242 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -14,10 +14,10 @@ jobs: fail-fast: false matrix: node: - - 14 - 16 - 18 - 19 + - 20 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 0ee040ef0..a546e872f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -14,10 +14,10 @@ jobs: fail-fast: false matrix: node: - - 14 - 16 - 18 - 19 + - 20 architecture: - x64 diff --git a/README.md b/README.md index f08caf777..125dee83f 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,13 @@ Below is a quick guide for minimum and maximum supported versions of node-sass: NodeJS | Supported node-sass version | Node Module --------|-----------------------------|------------ +Node 20 | 9.0+ | 115 Node 19 | 8.0+ | 111 Node 18 | 8.0+ | 108 Node 17 | 7.0+, <8.0 | 102 Node 16 | 6.0+ | 93 Node 15 | 5.0+, <7.0 | 88 -Node 14 | 4.14+ | 83 +Node 14 | 4.14+, <9.0 | 83 Node 13 | 4.13+, <5.0 | 79 Node 12 | 4.12+, <8.0 | 72 Node 11 | 4.10+, <5.0 | 67 diff --git a/appveyor.yml b/appveyor.yml index 4a6837ddd..17e95edc6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,9 +33,6 @@ environment: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true matrix: - - nodejs_version: 14 - GYP_MSVS_VERSION: 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - nodejs_version: 16 GYP_MSVS_VERSION: 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 @@ -45,6 +42,9 @@ - nodejs_version: 19 GYP_MSVS_VERSION: 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + - nodejs_version: 20 + GYP_MSVS_VERSION: 2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 install: diff --git a/lib/extensions.js b/lib/extensions.js index 4622f5dc5..24314b8bd 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -84,6 +84,7 @@ function getHumanNodeVersion(abi) { case 102: return 'Node.js 17.x'; case 108: return 'Node.js 18.x'; case 111: return 'Node.js 19.x'; + case 115: return 'Node.js 20.x'; default: return false; } } diff --git a/package.json b/package.json index 7139aa80e..6abfe1dc5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-sass", - "version": "8.0.0", + "version": "9.0.0", "libsass": "3.5.5", "description": "Wrapper around libsass", "license": "MIT", @@ -16,7 +16,7 @@ "url": "http://andrew.github.com" }, "engines": { - "node": ">=14" + "node": ">=16" }, "main": "lib/index.js", "nodeSassConfig": { From 884547b6c5d55da27e879e2dd774971203e45221 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 06:50:17 +0000 Subject: [PATCH 099/102] build(deps): bump node-gyp from 8.4.1 to 10.0.1 Bumps [node-gyp](https://github.com/nodejs/node-gyp) from 8.4.1 to 10.0.1. - [Release notes](https://github.com/nodejs/node-gyp/releases) - [Changelog](https://github.com/nodejs/node-gyp/blob/main/CHANGELOG.md) - [Commits](https://github.com/nodejs/node-gyp/compare/v8.4.1...v10.0.1) --- updated-dependencies: - dependency-name: node-gyp dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6abfe1dc5..cb533412b 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "make-fetch-happen": "^10.0.4", "meow": "^9.0.0", "nan": "^2.17.0", - "node-gyp": "^8.4.1", + "node-gyp": "^10.0.1", "sass-graph": "^4.0.1", "stdout-stream": "^1.4.0", "true-case-path": "^2.2.1" From 62c0f46cf9172edde00df8b62843bbfad8ae5007 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 06:41:13 +0000 Subject: [PATCH 100/102] build(deps): bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/alpine.yml | 2 +- .github/workflows/coverage.yml | 2 +- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 188076059..7aaf451dc 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -24,7 +24,7 @@ jobs: - name: Install Alpine build tools run: apk add --no-cache python3 make git gcc g++ - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 58dc4286b..ae683e16e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -26,7 +26,7 @@ jobs: if: github.repository_owner == 'sass' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 2c6ba3b0a..4d4c9cc6f 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -25,7 +25,7 @@ jobs: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v3 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index b0b3fc9dc..7883bc01e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -33,7 +33,7 @@ jobs: steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node.js environment uses: actions/setup-node@v3 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a3135c242..a7f4194de 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -20,7 +20,7 @@ jobs: - 20 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node.js environment uses: actions/setup-node@v3 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index a546e872f..c50e4ddb1 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,7 +24,7 @@ jobs: - x86 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node.js environment uses: actions/setup-node@v3 From 6081731aac89ce4612fe4839d4c6329539c0d8e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 07:09:59 +0000 Subject: [PATCH 101/102] build(deps): bump actions/setup-node from 3 to 4 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/lint-js.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 4d4c9cc6f..cd948fa49 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 - name: Install packages run: npm install --unsafe-perm diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7883bc01e..3f8939cc1 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a7f4194de..056e1cf3b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c50e4ddb1..50528faec 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} architecture: ${{ matrix.architecture }} From 107ded9434cfca43dbd9dfbaeb5c349228bf5cee Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Wed, 24 Jul 2024 14:59:18 -0700 Subject: [PATCH 102/102] Mark end-of-life --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 125dee83f..a7b18a686 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # node-sass -**Warning:** [LibSass and Node Sass are deprecated](https://sass-lang.com/blog/libsass-is-deprecated). -While they will continue to receive maintenance releases indefinitely, there are no -plans to add additional features or compatibility with any new CSS or Sass features. -Projects that still use it should move onto +**Warning:** [Node Sass has reached end of life]. It will receive no more +releases, even for security fixes. Projects that still use it should move onto [Dart Sass](https://sass-lang.com/dart-sass). +[Node Sass has reached end of life]: https://sass-lang.com/blog/node-sass-is-end-of-life + ## Node version support policy 1. Supported Node.js versions vary by release, please consult the [releases page](https://github.com/sass/node-sass/releases).