From f301c1f97ff129106f9b51eae5a572e23e6b08aa Mon Sep 17 00:00:00 2001 From: Jakub Pawlowicz Date: Sun, 12 Oct 2014 10:39:41 +0100 Subject: [PATCH] Removes support for node.js 0.8.x. * Although 0.12 is not ready yet, support for 0.8 among libraries is waning. * Bumps browserify dev dependency to 6.x. * Bumps nock dev dependency to 0.48. --- .travis.yml | 7 ------- History.md | 1 + README.md | 2 +- lib/imports/inliner.js | 6 ------ package.json | 6 +++--- test/binary-test.js | 2 +- 6 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index ecc2854c..3c6757d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,4 @@ language: node_js node_js: - - '0.8' - '0.10' - '0.11' -matrix: - allow_failures: - - node_js: '0.11' -install: - - npm update npm -g - - npm install diff --git a/History.md b/History.md index b2e8e6f4..8498c609 100644 --- a/History.md +++ b/History.md @@ -5,6 +5,7 @@ * Breaks 2.x compatibility for using CleanCSS as a function. * Reworks minification to tokenize first then minify. See [changes](https://github.com/jakubpawlowicz/clean-css/compare/b06f37d...dd8c14a). +* Removes support for node.js 0.8.x. * Renames `noAdvanced` option into `advanced`. * Renames `noAggressiveMerging` option into `aggressiveMerging`. * Renames `noRebase` option into `rebase`. diff --git a/README.md b/README.md index 7288a72a..358ead5c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ According to [tests](http://goalsmashers.github.io/css-minification-benchmark/) ### What are the requirements? ``` -Node.js 0.8.0+ (tested on CentOS, Ubuntu, OS X 10.6+, and Windows 7+) +Node.js 0.10.0+ (tested on CentOS, Ubuntu, OS X 10.6+, and Windows 7+) ``` ### How to install clean-css? diff --git a/lib/imports/inliner.js b/lib/imports/inliner.js index 99e52a98..ec2b67ab 100644 --- a/lib/imports/inliner.js +++ b/lib/imports/inliner.js @@ -225,7 +225,6 @@ module.exports = function Inliner(context, options) { http.get : https.get; - var timedOut = false; var handleError = function(message) { context.errors.push('Broken @import declaration of "' + importedUrl + '" - ' + message); restoreImport(importedUrl, mediaQuery, options); @@ -268,12 +267,7 @@ module.exports = function Inliner(context, options) { handleError(res.message); }) .on('timeout', function() { - // FIX: node 0.8 fires this event twice - if (timedOut) - return; - handleError('timeout'); - timedOut = true; }) .setTimeout(inlinerOptions.timeout); }; diff --git a/package.json b/package.json index 919e5532..8b13d8ce 100644 --- a/package.json +++ b/package.json @@ -38,13 +38,13 @@ "commander": "2.3.x" }, "devDependencies": { - "browserify": "5.x", + "browserify": "6.x", "jshint": "2.5.x", - "nock": "0.28.x", + "nock": "0.48.x", "uglify-js": "2.4.x", "vows": "0.7.x" }, "engines": { - "node": ">=0.8.0" + "node": ">=0.10.0" } } diff --git a/test/binary-test.js b/test/binary-test.js index be2d4155..d139978f 100644 --- a/test/binary-test.js +++ b/test/binary-test.js @@ -34,7 +34,7 @@ var unixOnlyContext = function(context) { }; var readFile = function(filename) { - return fs.readFileSync(filename, 'utf-8').replace(lineBreak, ''); + return fs.readFileSync(filename, { encoding: 'utf-8' }).replace(lineBreak, ''); }; var deleteFile = function(filename) { -- 2.34.1