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

Commit 7c24716

Browse files
committed
Merge pull request #1430 from xzyfer/feat/process-sass-deprecation-warning
Ouptut a deprecation warning to stdout when using process.sass
2 parents d76923b + adb6166 commit 7c24716

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/index.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,14 @@ module.exports.NULL = binding.types.Null.NULL;
441441
* TODO: remove for 4.0
442442
*/
443443

444+
function processSassDeprecationMessage() {
445+
console.log('Deprecation warning: `process.sass` is an undocumented internal that will be removed in future versions of Node Sass.');
446+
}
447+
444448
process.sass = process.sass || {
445-
versionInfo: module.exports.info,
446-
binaryName: sass.getBinaryName(),
447-
binaryUrl: sass.getBinaryUrl(),
448-
binaryPath: sass.getBinaryPath(),
449-
getBinaryPath: sass.getBinaryPath,
449+
get versionInfo() { processSassDeprecationMessage(); return module.exports.info; },
450+
get binaryName() { processSassDeprecationMessage(); return sass.getBinaryName(); },
451+
get binaryUrl() { processSassDeprecationMessage(); return sass.getBinaryUrl(); },
452+
get binaryPath() { processSassDeprecationMessage(); return sass.getBinaryPath(); },
453+
get getBinaryPath() { processSassDeprecationMessage(); return sass.getBinaryPath; },
450454
};

0 commit comments

Comments
 (0)