Socket
Socket
Sign inDemoInstall

node-sass

Package Overview
Dependencies
Maintainers
3
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-sass - npm Package Compare versions

Comparing version 4.14.1 to 5.0.0

test/fixtures/include-files/expected-data-importer.css

13

lib/extensions.js

@@ -83,2 +83,3 @@ /*!

case 83: return 'Node.js 14.x';
case 88: return 'Node.js 15.x';
default: return false;

@@ -138,3 +139,3 @@ }

/**
* 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

@@ -315,6 +316,2 @@ *

if (process.versions.modules < 46) {
return binaryPath;
}
try {

@@ -440,8 +437,2 @@ return trueCasePathSync(binaryPath) || binaryPath;

// 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) {

@@ -448,0 +439,0 @@ return 'musl';

@@ -7,3 +7,2 @@ /*!

clonedeep = require('lodash/cloneDeep'),
assign = require('lodash/assign'),
sass = require('./extensions');

@@ -169,3 +168,3 @@

if (process.env.hasOwnProperty('SASS_PATH')) {
if (Object.prototype.hasOwnProperty.call(process.env, 'SASS_PATH')) {
options.includePaths = options.includePaths.concat(

@@ -198,3 +197,3 @@ process.env.SASS_PATH.split(path.delimiter)

options.sourceComments = options.sourceComments || false;
if (options.hasOwnProperty('file')) {
if (Object.prototype.hasOwnProperty.call(options, 'file')) {
options.file = getInputFile(options);

@@ -294,3 +293,3 @@ }

options.error = function(err) {
var payload = assign(new Error(), JSON.parse(err));
var payload = Object.assign(new Error(), JSON.parse(err));

@@ -445,3 +444,3 @@ if (cb) {

throw assign(new Error(), JSON.parse(result.error));
throw Object.assign(new Error(), JSON.parse(result.error));
};

@@ -465,19 +464,1 @@

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; },
};
{
"name": "node-sass",
"version": "4.14.1",
"version": "5.0.0",
"libsass": "3.5.5",

@@ -19,3 +19,3 @@ "description": "Wrapper around libsass",

"engines": {
"node": ">=0.10.0"
"node": ">=10"
},

@@ -31,9 +31,9 @@ "main": "lib/index.js",

"scripts": {
"coverage": "node scripts/coverage.js",
"coverage": "nyc npm run test",
"install": "node scripts/install.js",
"postinstall": "node scripts/build.js",
"lint": "node_modules/.bin/eslint bin/node-sass lib scripts test",
"test": "node_modules/.bin/mocha test/{*,**/**}.js",
"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"
},

@@ -60,7 +60,6 @@ "files": [

"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",
"in-publish": "^2.0.0",
"lodash": "^4.17.15",

@@ -70,3 +69,3 @@ "meow": "^3.7.0",

"nan": "^2.13.2",
"node-gyp": "^3.8.0",
"node-gyp": "^7.1.0",
"npmlog": "^4.0.0",

@@ -79,14 +78,9 @@ "request": "^2.88.0",

"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",
"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",
"mocha": "^8.1.3",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"unique-temp-dir": "^1.0.0"
}
}
# 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:
**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).
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 <https://github.com/nodejs/Release>, 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 15 | 5.0+ | 88
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
<table>

@@ -27,10 +42,9 @@ <tr>

[![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)
[![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)
![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)
[![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/)

@@ -37,0 +51,0 @@ Node-sass is a library that provides binding for Node.js to [LibSass], the C version of the popular stylesheet preprocessor, Sass.

@@ -22,5 +22,5 @@ /*!

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');

@@ -27,0 +27,0 @@

@@ -71,18 +71,18 @@ /*!

})
.on('response', function(response) {
var length = parseInt(response.headers['content-length'], 10);
var progress = log.newItem('', length);
.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();
// 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);
}
});
response.on('data', function(chunk) {
progress.completeWork(chunk.length);
})
.on('end', progress.finish);
}
});
} catch (err) {

@@ -89,0 +89,0 @@ cb(err);

/*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
? require('../lib-cov/binding')
: require('../lib/binding');
? require('../lib-cov/binding')
: require('../lib/binding');

@@ -10,0 +10,0 @@ describe('binding', function() {

@@ -1,2 +0,2 @@

var assert = require('assert'),
var assert = require('assert').strict,
fs = require('fs'),

@@ -25,3 +25,3 @@ path = require('path'),

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();

@@ -40,3 +40,3 @@ });

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();

@@ -55,3 +55,3 @@ });

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();

@@ -70,3 +70,3 @@ });

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();

@@ -85,3 +85,3 @@ });

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();

@@ -103,3 +103,3 @@ });

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();

@@ -121,3 +121,3 @@ });

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();

@@ -132,4 +132,2 @@ });

it('should compile a scss file', function(done) {
process.chdir(fixture('simple'));
var src = fixture('simple/index.scss');

@@ -142,3 +140,2 @@ var dest = fixture('simple/index.css');

fs.unlinkSync(dest);
process.chdir(__dirname);
done();

@@ -149,4 +146,2 @@ });

it('should compile a scss file to custom destination', function(done) {
process.chdir(fixture('simple'));
var src = fixture('simple/index.scss');

@@ -159,3 +154,2 @@ var dest = fixture('simple/index-custom.css');

fs.unlinkSync(dest);
process.chdir(__dirname);
done();

@@ -177,3 +171,3 @@ });

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();

@@ -184,4 +178,2 @@ });

it('should compile silently using the --quiet option', function(done) {
process.chdir(fixture('simple'));
var src = fixture('simple/index.scss');

@@ -197,5 +189,4 @@ var dest = fixture('simple/index.css');

bin.once('close', function() {
assert.equal(didEmit, false);
assert.strictEqual(didEmit, false);
fs.unlinkSync(dest);
process.chdir(__dirname);
done();

@@ -206,4 +197,2 @@ });

it('should still report errors with the --quiet option', function(done) {
process.chdir(fixture('invalid'));
var src = fixture('invalid/index.scss');

@@ -219,4 +208,3 @@ var dest = fixture('invalid/index.css');

bin.once('close', function() {
assert.equal(didEmit, true);
process.chdir(__dirname);
assert.strictEqual(didEmit, true);
done();

@@ -280,3 +268,3 @@ });

setTimeout(function() {
assert.equal(didEmit, false);
assert.strictEqual(didEmit, false);
bin.kill();

@@ -378,3 +366,3 @@ done();

var files = fs.readdirSync(destDir);
assert.deepEqual(files, ['index.css']);
assert.deepStrictEqual(files, ['index.css']);
rimraf(destDir, done);

@@ -403,3 +391,3 @@ }, 200);

var files = fs.readdirSync(destDir);
assert.deepEqual(files, ['foo.css', 'index.css']);
assert.deepStrictEqual(files, ['foo.css', 'index.css']);
rimraf(destDir, done);

@@ -433,4 +421,4 @@ }, 200);

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);

@@ -473,4 +461,4 @@ fs.unlinkSync(destMap);

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);

@@ -497,3 +485,3 @@ fs.unlinkSync(destMap);

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();

@@ -524,5 +512,5 @@ });

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);

@@ -542,3 +530,3 @@ done();

assert.equal(map.file, '../../css/nested/three.css');
assert.strictEqual(map.file, '../../css/nested/three.css');
rimraf.sync(dest);

@@ -557,3 +545,3 @@ rimraf.sync(destMap);

var files = fs.readdirSync(dest);
assert.equal(files.indexOf('_skipped.css'), -1);
assert.strictEqual(files.indexOf('_skipped.css'), -1);
rimraf.sync(dest);

@@ -574,3 +562,3 @@ done();

var files = fs.readdirSync(dest);
assert.deepEqual(files, ['one.css', 'two.css']);
assert.deepStrictEqual(files, ['one.css', 'two.css']);
rimraf.sync(dest);

@@ -599,3 +587,3 @@ done();

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();

@@ -615,5 +603,5 @@ });

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);

@@ -675,3 +663,4 @@ fs.unlinkSync(symlink);

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');

@@ -685,3 +674,3 @@ it('should override imports and fire callback with file and contents', function(done) {

bin.once('close', function() {
assert.equal(read(dest, 'utf8').trim(), expected);
assert.strictEqual(read(dest, 'utf8').trim(), expectedData);
fs.unlinkSync(dest);

@@ -700,3 +689,3 @@ done();

if (fs.existsSync(dest)) {
assert.equal(read(dest, 'utf8').trim(), '');
assert.strictEqual(read(dest, 'utf8').trim(), expectedFile);
fs.unlinkSync(dest);

@@ -716,3 +705,3 @@ }

bin.once('close', function() {
assert.equal(read(dest, 'utf8').trim(), expected);
assert.strictEqual(read(dest, 'utf8').trim(), expectedData);
fs.unlinkSync(dest);

@@ -730,3 +719,3 @@ done();

bin.once('close', function() {
assert.equal(read(dest, 'utf8').trim(), expected);
assert.strictEqual(read(dest, 'utf8').trim(), expectedData);
fs.unlinkSync(dest);

@@ -745,3 +734,3 @@ done();

if (fs.existsSync(dest)) {
assert.equal(read(dest, 'utf8').trim(), '');
assert.strictEqual(read(dest, 'utf8').trim(), expectedFile);
fs.unlinkSync(dest);

@@ -761,3 +750,3 @@ }

bin.once('close', function() {
assert.equal(read(dest, 'utf8').trim(), expected);
assert.strictEqual(read(dest, 'utf8').trim(), expectedData);
fs.unlinkSync(dest);

@@ -775,3 +764,3 @@ done();

bin.once('close', function() {
assert.equal(read(dest, 'utf8').trim(), expected);
assert.strictEqual(read(dest, 'utf8').trim(), expectedData);
fs.unlinkSync(dest);

@@ -801,3 +790,3 @@ done();

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();

@@ -819,3 +808,3 @@ });

bin.once('close', function() {
assert.equal(read(dest, 'utf8').trim(), expected);
assert.strictEqual(read(dest, 'utf8').trim(), expected);
fs.unlinkSync(dest);

@@ -836,3 +825,3 @@ done();

bin.once('close', function() {
assert.equal(read(dest, 'utf8').trim(), expected);
assert.strictEqual(read(dest, 'utf8').trim(), expected);
fs.unlinkSync(dest);

@@ -839,0 +828,0 @@ done();

@@ -1,2 +0,2 @@

var assert = require('assert'),
var assert = require('assert').strict,
ua = require('../scripts/util/useragent'),

@@ -19,3 +19,3 @@ opts = require('../scripts/util/downloadoptions');

assert.deepEqual(opts(), expected);
assert.deepStrictEqual(opts(), expected);
});

@@ -46,3 +46,3 @@ });

assert.deepEqual(opts(), expected);
assert.deepStrictEqual(opts(), expected);
});

@@ -72,3 +72,3 @@ });

assert.deepEqual(opts(), expected);
assert.deepStrictEqual(opts(), expected);
});

@@ -75,0 +75,0 @@ });

@@ -1,2 +0,2 @@

var assert = require('assert'),
var assert = require('assert').strict,
path = require('path'),

@@ -3,0 +3,0 @@ errors = require('../lib/errors');

process.env.NODESASS_COV ? require('../lib-cov') : require('../lib');
var assert = require('assert'),
var assert = require('assert').strict,
sass = require('../lib/extensions'),

@@ -33,3 +33,3 @@ binding = require(sass.getBinaryPath());

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();

@@ -55,3 +55,3 @@ });

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();

@@ -77,3 +77,3 @@ });

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();

@@ -99,3 +99,3 @@ });

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();

@@ -222,3 +222,3 @@ });

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();

@@ -244,3 +244,3 @@ });

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();

@@ -247,0 +247,0 @@ });

@@ -1,9 +0,9 @@

var assert = require('assert'),
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),

@@ -29,3 +29,3 @@ savedEnv = JSON.stringify(process.env);

it('command line argument', function() {
assert.equal(sass.getBinaryName(), 'aaa_binding.node');
assert.strictEqual(sass.getBinaryName(), 'aaa_binding.node');
});

@@ -35,3 +35,3 @@

process.argv = [];
assert.equal(sass.getBinaryName(), 'bbb_binding.node');
assert.strictEqual(sass.getBinaryName(), 'bbb_binding.node');
});

@@ -42,3 +42,3 @@

process.env.SASS_BINARY_NAME = null;
assert.equal(sass.getBinaryName(), 'ccc_binding.node');
assert.strictEqual(sass.getBinaryName(), 'ccc_binding.node');
});

@@ -50,3 +50,3 @@

process.env.npm_config_sass_binary_name = null;
assert.equal(sass.getBinaryName(), 'ddd_binding.node');
assert.strictEqual(sass.getBinaryName(), 'ddd_binding.node');
});

@@ -65,3 +65,3 @@ });

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);
});

@@ -72,3 +72,3 @@

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);
});

@@ -80,3 +80,3 @@

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);
});

@@ -89,3 +89,3 @@

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);
});

@@ -103,3 +103,3 @@ });

it('command line argument', function() {
assert.equal(sass.getBinaryDir(), 'aaa');
assert.strictEqual(sass.getBinaryDir(), 'aaa');
});

@@ -109,3 +109,3 @@

process.argv = [];
assert.equal(sass.getBinaryDir(), 'bbb');
assert.strictEqual(sass.getBinaryDir(), 'bbb');
});

@@ -116,3 +116,3 @@

process.env.SASS_BINARY_DIR = null;
assert.equal(sass.getBinaryDir(), 'ccc');
assert.strictEqual(sass.getBinaryDir(), 'ccc');
});

@@ -124,3 +124,3 @@

process.env.npm_config_sass_binary_dir = null;
assert.equal(sass.getBinaryDir(), 'ddd');
assert.strictEqual(sass.getBinaryDir(), 'ddd');
});

@@ -138,3 +138,3 @@ });

it('command line argument', function() {
assert.equal(sass.getBinaryPath(), 'aaa_binding.node');
assert.strictEqual(sass.getBinaryPath(), 'aaa_binding.node');
});

@@ -144,3 +144,3 @@

process.argv = [];
assert.equal(sass.getBinaryPath(), 'bbb_binding.node');
assert.strictEqual(sass.getBinaryPath(), 'bbb_binding.node');
});

@@ -151,3 +151,3 @@

process.env.SASS_BINARY_PATH = null;
assert.equal(sass.getBinaryPath(), 'ccc_binding.node');
assert.strictEqual(sass.getBinaryPath(), 'ccc_binding.node');
});

@@ -159,3 +159,3 @@

process.env.npm_config_sass_binary_path = null;
assert.equal(sass.getBinaryPath(), 'ddd_binding.node');
assert.strictEqual(sass.getBinaryPath(), 'ddd_binding.node');
});

@@ -179,7 +179,7 @@ });

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);
});

@@ -186,0 +186,0 @@ });

@@ -1,2 +0,2 @@

var assert = require('assert'),
var assert = require('assert').strict,
proxy = require('../../../scripts/util/proxy');

@@ -76,2 +76,2 @@

});
});
});
/*eslint new-cap: ["error", { "capIsNew": false }]*/
'use strict';
var assert = require('assert');
var assert = require('assert').strict;
var sass = require('../');
var semver = require('semver');

@@ -14,19 +15,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() {
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.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);
});

@@ -39,3 +44,3 @@

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Cannot instantiate SassBoolean');
assert.strictEqual(error.message, 'Cannot instantiate SassBoolean');
return true;

@@ -50,3 +55,3 @@ });

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected one boolean argument');
assert.strictEqual(error.message, 'Expected one boolean argument');
return true;

@@ -60,3 +65,3 @@ });

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected one boolean argument');
assert.strictEqual(error.message, 'Expected one boolean argument');
return true;

@@ -70,3 +75,3 @@ });

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected one boolean argument');
assert.strictEqual(error.message, 'Expected one boolean argument');
return true;

@@ -78,8 +83,8 @@ });

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);
});

@@ -94,13 +99,23 @@ });

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() {
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.equal(t.toString(), '[object SassColor]');
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.equal(t.toString(), '[object SassColor]');
assert.strictEqual(t.toString(), '[object SassColor]');
});

@@ -111,13 +126,13 @@

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 ?

@@ -128,3 +143,3 @@ assert.throws(function() {

// 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;

@@ -135,13 +150,13 @@ });

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);

@@ -152,3 +167,3 @@ assert.throws(function() {

// 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;

@@ -161,34 +176,34 @@ });

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);
});

@@ -204,3 +219,3 @@

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected just one argument');
assert.strictEqual(error.message, 'Expected just one argument');

@@ -216,3 +231,3 @@ return true;

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');

@@ -248,9 +263,14 @@ return true;

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() {
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.equal(e.toString(), '[object SassError]');
assert.strictEqual(e.toString(), '[object SassError]');

@@ -261,5 +281,10 @@ // TODO: I'm not sure this object works well, it likely needs to be fleshed out more...

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.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...

@@ -274,16 +299,26 @@ });

it('has a corectly named constructor', function() {
assert.equal(sass.types.List.name, 'SassList');
it('has a correctly named constructor', function() {
assert.strictEqual(sass.types.List.name, 'SassList');
});
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.equal(list.toString(), '[object SassList]');
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.equal(list.toString(), '[object SassList]');
assert.strictEqual(list.toString(), '[object SassList]');
});

@@ -293,16 +328,16 @@

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);

@@ -313,3 +348,3 @@ assert.throws(function() {

// TODO: TypeError
assert.equal(error.message, 'First argument should be an integer.');
assert.strictEqual(error.message, 'First argument should be an integer.');
return true;

@@ -322,3 +357,3 @@ });

// TODO: TypeError
assert.equal(error.message, 'Second argument should be a boolean.');
assert.strictEqual(error.message, 'Second argument should be a boolean.');
return true;

@@ -330,7 +365,7 @@ });

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);

@@ -341,3 +376,3 @@ assert.throws(function() {

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected just one argument');
assert.strictEqual(error.message, 'Expected just one argument');
return true;

@@ -351,3 +386,3 @@ });

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;

@@ -365,3 +400,3 @@ }, 'setSeparator(' + arg + ')');

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected just one argument');
assert.strictEqual(error.message, 'Expected just one argument');

@@ -376,3 +411,3 @@ return true;

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');

@@ -387,3 +422,3 @@ return true;

assert.ok(error instanceof RangeError);
assert.equal(error.message, 'Out of bound index');
assert.strictEqual(error.message, 'Out of bound index');

@@ -397,3 +432,3 @@ return true;

assert.ok(error instanceof RangeError);
assert.equal(error.message, 'Out of bound index');
assert.strictEqual(error.message, 'Out of bound index');

@@ -407,3 +442,3 @@ return true;

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected two arguments');
assert.strictEqual(error.message, 'Expected two arguments');
return true;

@@ -416,3 +451,3 @@ });

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected two arguments');
assert.strictEqual(error.message, 'Expected two arguments');
return true;

@@ -425,3 +460,3 @@ });

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;

@@ -440,13 +475,23 @@ });

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() {
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.equal(x.toString(), '[object SassMap]');
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.equal(x.toString(), '[object SassMap]');
assert.strictEqual(x.toString(), '[object SassMap]');
});

@@ -462,3 +507,3 @@

}, function(error) {
assert.equal(error.message, 'First argument should be an integer.');
assert.strictEqual(error.message, 'First argument should be an integer.');
// TODO: TypeError

@@ -469,5 +514,5 @@

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);
});

@@ -479,4 +524,4 @@

assert.equal(y.getLength(), 1);
assert.equal(z.getLength(), 2);
assert.strictEqual(y.getLength(), 1);
assert.strictEqual(z.getLength(), 2);
});

@@ -498,3 +543,3 @@

it('has a correctly named constructor', function() {
assert.equal(sass.types.Null.name, 'SassNull');
assert.strictEqual(sass.types.Null.name, 'SassNull');
});

@@ -507,3 +552,3 @@

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Cannot instantiate SassNull');
assert.strictEqual(error.message, 'Cannot instantiate SassNull');
return true;

@@ -514,4 +559,4 @@ });

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);
});

@@ -526,13 +571,23 @@ });

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() {
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.equal(number.toString(), '[object SassNumber]');
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.equal(number.toString(), '[object SassNumber]');
assert.strictEqual(number.toString(), '[object SassNumber]');
});

@@ -549,3 +604,3 @@

// TODO: TypeError
assert.equal(error.message, 'First argument should be a number.');
assert.strictEqual(error.message, 'First argument should be a number.');
return true;

@@ -558,12 +613,12 @@ });

// 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');
});

@@ -573,12 +628,12 @@

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');

@@ -589,3 +644,3 @@ assert.throws(function() {

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;

@@ -598,3 +653,3 @@ });

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected just one argument');
assert.strictEqual(error.message, 'Expected just one argument');
return true;

@@ -607,3 +662,3 @@ });

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected just one argument');
assert.strictEqual(error.message, 'Expected just one argument');
return true;

@@ -616,3 +671,3 @@ });

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;

@@ -629,17 +684,27 @@ });

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() {
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.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() {
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.equal(x.toString(), '[object SassString]');
assert.equal(x.getValue(), 'OMG');
assert.strictEqual(x.toString(), '[object SassString]');
assert.strictEqual(x.getValue(), 'OMG');
});

@@ -657,3 +722,3 @@

// TODO: TypeError
assert.equal(error.message, 'Argument should be a string.');
assert.strictEqual(error.message, 'Argument should be a string.');
return true;

@@ -667,7 +732,7 @@ });

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');

@@ -678,3 +743,3 @@ assert.throws(function() {

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected just one argument');
assert.strictEqual(error.message, 'Expected just one argument');
return true;

@@ -687,3 +752,3 @@ });

assert.ok(error instanceof TypeError);
assert.equal(error.message, 'Expected just one argument');
assert.strictEqual(error.message, 'Expected just one argument');
return true;

@@ -690,0 +755,0 @@ });

@@ -1,2 +0,2 @@

var assert = require('assert'),
var assert = require('assert').strict,
pkg = require('../package.json'),

@@ -3,0 +3,0 @@ ua = require('../scripts/util/useragent');

@@ -1,2 +0,2 @@

var assert = require('assert'),
var assert = require('assert').strict,
fs = require('fs-extra'),

@@ -33,3 +33,3 @@ path = require('path'),

var files = watcher.changed(file);
assert.deepEqual(files.changed, [
assert.deepStrictEqual(files.changed, [
path.join(main, 'one.scss'),

@@ -42,3 +42,3 @@ ]);

var files = watcher.changed(file);
assert.deepEqual(files.added, [
assert.deepStrictEqual(files.added, [
path.join(main, 'partials', '_three.scss'),

@@ -51,3 +51,3 @@ ]);

var files = watcher.changed(file);
assert.deepEqual(files.removed, []);
assert.deepStrictEqual(files.removed, []);
});

@@ -60,3 +60,3 @@ });

var files = watcher.changed(file);
assert.deepEqual(files.changed, [
assert.deepStrictEqual(files.changed, [
file,

@@ -69,3 +69,3 @@ ]);

var files = watcher.changed(file);
assert.deepEqual(files.added, [
assert.deepStrictEqual(files.added, [
path.join(main, 'partials', '_one.scss'),

@@ -79,3 +79,3 @@ path.join(main, 'partials', '_three.scss'),

var files = watcher.changed(file);
assert.deepEqual(files.removed, []);
assert.deepStrictEqual(files.removed, []);
});

@@ -90,3 +90,3 @@ });

var files = watcher.changed(file);
assert.deepEqual(files, {
assert.deepStrictEqual(files, {
added: [],

@@ -103,3 +103,3 @@ changed: [],

var files = watcher.changed(file);
assert.deepEqual(files, {
assert.deepStrictEqual(files, {
added: [],

@@ -120,3 +120,3 @@ changed: [file],

var files = watcher.added(file);
assert.deepEqual(files.added, []);
assert.deepStrictEqual(files.added, []);
});

@@ -127,3 +127,3 @@

var files = watcher.added(file);
assert.deepEqual(files.added, [
assert.deepStrictEqual(files.added, [
path.join(main, 'partials', '_three.scss')

@@ -136,3 +136,3 @@ ]);

var files = watcher.added(file);
assert.deepEqual(files.changed, []);
assert.deepStrictEqual(files.changed, []);
});

@@ -143,3 +143,3 @@

var files = watcher.added(file);
assert.deepEqual(files.removed, []);
assert.deepStrictEqual(files.removed, []);
});

@@ -152,3 +152,3 @@ });

var files = watcher.added(file);
assert.deepEqual(files.added, []);
assert.deepStrictEqual(files.added, []);
});

@@ -159,3 +159,3 @@

var files = watcher.added(file);
assert.deepEqual(files.added, [
assert.deepStrictEqual(files.added, [
path.join(main, 'partials', '_one.scss'),

@@ -169,3 +169,3 @@ path.join(main, 'partials', '_three.scss'),

var files = watcher.added(file);
assert.deepEqual(files.changed, []);
assert.deepStrictEqual(files.changed, []);
});

@@ -176,3 +176,3 @@

var files = watcher.added(file);
assert.deepEqual(files.removed, []);
assert.deepStrictEqual(files.removed, []);
});

@@ -189,3 +189,3 @@ });

var files = watcher.removed(file);
assert.deepEqual(files.added, []);
assert.deepStrictEqual(files.added, []);
});

@@ -196,3 +196,3 @@

var files = watcher.removed(file);
assert.deepEqual(files.changed, [
assert.deepStrictEqual(files.changed, [
path.join(main, 'one.scss'),

@@ -205,3 +205,3 @@ ]);

var files = watcher.removed(file);
assert.deepEqual(files.removed, [file]);
assert.deepStrictEqual(files.removed, [file]);
});

@@ -214,3 +214,3 @@ });

var files = watcher.removed(file);
assert.deepEqual(files.added, []);
assert.deepStrictEqual(files.added, []);
});

@@ -221,3 +221,3 @@

var files = watcher.removed(file);
assert.deepEqual(files.changed, []);
assert.deepStrictEqual(files.changed, []);
});

@@ -228,3 +228,3 @@

var files = watcher.removed(file);
assert.deepEqual(files.removed, [file]);
assert.deepStrictEqual(files.removed, [file]);
});

@@ -239,3 +239,3 @@ });

var files = watcher.removed(file);
assert.deepEqual(files, {
assert.deepStrictEqual(files, {
added: [],

@@ -252,3 +252,3 @@ changed: [],

var files = watcher.removed(file);
assert.deepEqual(files, {
assert.deepStrictEqual(files, {
added: [],

@@ -278,3 +278,3 @@ changed: [],

var files = watcher.changed(file);
assert.deepEqual(files.added, [
assert.deepStrictEqual(files.added, [
path.join(main, 'partials', '_three.scss'),

@@ -287,3 +287,3 @@ ]);

var files = watcher.changed(file);
assert.deepEqual(files.changed, [
assert.deepStrictEqual(files.changed, [
path.join(main, 'one.scss'),

@@ -296,3 +296,3 @@ ]);

var files = watcher.changed(file);
assert.deepEqual(files.removed, []);
assert.deepStrictEqual(files.removed, []);
});

@@ -305,3 +305,3 @@ });

var files = watcher.changed(file);
assert.deepEqual(files.added, [
assert.deepStrictEqual(files.added, [
path.join(main, 'partials', '_one.scss'),

@@ -315,3 +315,3 @@ path.join(main, 'partials', '_three.scss'),

var files = watcher.changed(file);
assert.deepEqual(files.changed, [file]);
assert.deepStrictEqual(files.changed, [file]);
});

@@ -322,3 +322,3 @@

var files = watcher.changed(file);
assert.deepEqual(files.removed, []);
assert.deepStrictEqual(files.removed, []);
});

@@ -333,3 +333,3 @@ });

var files = watcher.changed(file);
assert.deepEqual(files, {
assert.deepStrictEqual(files, {
added: [],

@@ -346,3 +346,3 @@ changed: [],

var files = watcher.changed(file);
assert.deepEqual(files.added, []);
assert.deepStrictEqual(files.added, []);
});

@@ -353,3 +353,3 @@

var files = watcher.changed(file);
assert.deepEqual(files.changed, [file]);
assert.deepStrictEqual(files.changed, [file]);
});

@@ -360,3 +360,3 @@

var files = watcher.changed(file);
assert.deepEqual(files.removed, []);
assert.deepStrictEqual(files.removed, []);
});

@@ -372,3 +372,3 @@ });

var files = watcher.added(file);
assert.deepEqual(files.added, []);
assert.deepStrictEqual(files.added, []);
});

@@ -379,3 +379,3 @@

var files = watcher.added(file);
assert.deepEqual(files.added, [
assert.deepStrictEqual(files.added, [
path.join(main, 'partials', '_three.scss'),

@@ -388,3 +388,3 @@ ]);

var files = watcher.added(file);
assert.deepEqual(files.changed, []);
assert.deepStrictEqual(files.changed, []);
});

@@ -395,3 +395,3 @@

var files = watcher.added(file);
assert.deepEqual(files.removed, []);
assert.deepStrictEqual(files.removed, []);
});

@@ -412,3 +412,3 @@ });

var files = watcher.added(file);
assert.deepEqual(files.added, [
assert.deepStrictEqual(files.added, [
file,

@@ -421,3 +421,3 @@ ]);

var files = watcher.added(file);
assert.deepEqual(files.added, [
assert.deepStrictEqual(files.added, [
file,

@@ -430,3 +430,3 @@ ]);

var files = watcher.added(file);
assert.deepEqual(files.changed, []);
assert.deepStrictEqual(files.changed, []);
});

@@ -437,3 +437,3 @@

var files = watcher.added(file);
assert.deepEqual(files.removed, []);
assert.deepStrictEqual(files.removed, []);
});

@@ -446,3 +446,3 @@ });

var files = watcher.added(file);
assert.deepEqual(files.added, [
assert.deepStrictEqual(files.added, [
file,

@@ -455,3 +455,3 @@ ]);

var files = watcher.added(file);
assert.deepEqual(files.changed, []);
assert.deepStrictEqual(files.changed, []);
});

@@ -462,3 +462,3 @@

var files = watcher.added(file);
assert.deepEqual(files.removed, []);
assert.deepStrictEqual(files.removed, []);
});

@@ -475,3 +475,3 @@ });

var files = watcher.removed(file);
assert.deepEqual(files.added, []);
assert.deepStrictEqual(files.added, []);
});

@@ -482,3 +482,3 @@

var files = watcher.removed(file);
assert.deepEqual(files.changed, [
assert.deepStrictEqual(files.changed, [
path.join(main, 'one.scss'),

@@ -491,3 +491,3 @@ ]);

var files = watcher.removed(file);
assert.deepEqual(files.removed, [file]);
assert.deepStrictEqual(files.removed, [file]);
});

@@ -500,3 +500,3 @@ });

var files = watcher.removed(file);
assert.deepEqual(files.added, []);
assert.deepStrictEqual(files.added, []);
});

@@ -507,3 +507,3 @@

var files = watcher.removed(file);
assert.deepEqual(files.changed, []);
assert.deepStrictEqual(files.changed, []);
});

@@ -514,3 +514,3 @@

var files = watcher.removed(file);
assert.deepEqual(files.removed, [file]);
assert.deepStrictEqual(files.removed, [file]);
});

@@ -532,3 +532,3 @@ });

var files = watcher.removed(file);
assert.deepEqual(files, {
assert.deepStrictEqual(files, {
added: [],

@@ -545,3 +545,3 @@ changed: [],

var files = watcher.removed(file);
assert.deepEqual(files, {
assert.deepStrictEqual(files, {
added: [],

@@ -548,0 +548,0 @@ changed: [],

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc