Removes support for node.js 0.8.x.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Sun, 12 Oct 2014 09:39:41 +0000 (10:39 +0100)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Sun, 12 Oct 2014 09:43:57 +0000 (10:43 +0100)
* 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
History.md
README.md
lib/imports/inliner.js
package.json
test/binary-test.js

index ecc2854..3c6757d 100644 (file)
@@ -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
index b2e8e6f..8498c60 100644 (file)
@@ -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`.
index 7288a72..358ead5 100644 (file)
--- 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?
index 99e52a9..ec2b67a 100644 (file)
@@ -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);
   };
index 919e553..8b13d8c 100644 (file)
     "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"
   }
 }
index be2d415..d139978 100644 (file)
@@ -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) {