From f85af8f4fd29501698ca3d87876de7b50486a76d Mon Sep 17 00:00:00 2001 From: Renaat De Muynck Date: Wed, 14 Jun 2017 14:27:24 +0200 Subject: [PATCH] Stop using deprecated node modules The `sys` module became deprecated in node 0.4.x, and `util.print` in node 6.0.0. While you can still use `util.print`, it's best to make the code future proof and simply use `process.stdout.write()`. --- src/Assetic/Filter/LessFilter.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Assetic/Filter/LessFilter.php b/src/Assetic/Filter/LessFilter.php index 7ca5cd735..7d3dceaa9 100644 --- a/src/Assetic/Filter/LessFilter.php +++ b/src/Assetic/Filter/LessFilter.php @@ -105,7 +105,6 @@ public function filterLoad(AssetInterface $asset) { static $format = <<<'EOF' var less = require('less'); -var sys = require(process.binding('natives').util ? 'util' : 'sys'); less.render(%s, %s, function(error, css) { if (error) { @@ -114,9 +113,9 @@ public function filterLoad(AssetInterface $asset) } try { if (typeof css == 'string') { - sys.print(css); + process.stdout.write(css); } else { - sys.print(css.css); + process.stdout.write(css.css); } } catch (e) { less.writeError(error);