From 9d35b5150085d108bc857bc863d542658a44b381 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Sat, 30 Jun 2012 18:57:59 +0200 Subject: [PATCH 1/4] Replace path.exists with fs.exists --- src/node/utils/caching_middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/utils/caching_middleware.js b/src/node/utils/caching_middleware.js index ba2b462dfcb..bfe6a6be22f 100644 --- a/src/node/utils/caching_middleware.js +++ b/src/node/utils/caching_middleware.js @@ -23,7 +23,7 @@ var util = require('util'); var settings = require('./Settings'); var CACHE_DIR = path.normalize(path.join(settings.root, 'var/')); -CACHE_DIR = path.existsSync(CACHE_DIR) ? CACHE_DIR : undefined; +CACHE_DIR = fs.existsSync(CACHE_DIR) ? CACHE_DIR : undefined; var responseCache = {}; From 02ce537c68083517eee010eee14d11a79a0b7306 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Sat, 30 Jun 2012 20:20:05 +0200 Subject: [PATCH 2/4] Use node v0.8.1 / allow node v0.8 --- bin/installDeps.sh | 4 ++-- bin/installOnWindows.bat | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/installDeps.sh b/bin/installDeps.sh index 2acebd82e55..256bc55c995 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -35,8 +35,8 @@ fi #check node version NODE_VERSION=$(node --version) -if [ ! $(echo $NODE_VERSION | cut -d "." -f 1-2) = "v0.6" ]; then - echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.6.x" >&2 +if [ ! $(echo $NODE_VERSION | cut -d "." -f 1-2) = "v0.8" ]; then + echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.8.x" >&2 exit 1 fi diff --git a/bin/installOnWindows.bat b/bin/installOnWindows.bat index 0e3e209962b..826867aac50 100644 --- a/bin/installOnWindows.bat +++ b/bin/installOnWindows.bat @@ -1,5 +1,5 @@ @echo off -set NODE_VERSION=0.6.5 +set NODE_VERSION=0.8.1 set JQUERY_VERSION=1.7 :: change directory to etherpad-lite root @@ -22,8 +22,8 @@ echo _ echo Copying custom templates... set custom_dir=node_modules\ep_etherpad-lite\static\custom FOR %%f IN (index pad timeslider) DO ( - if NOT EXIST %custom_dir%\%%f.js copy %custom_dir%\js.template %custom_dir%\%%f.js - if NOT EXIST %custom_dir%\%%f.css copy %custom_dir%\css.template %custom_dir%\%%f.css + if NOT EXIST "%custom_dir%\%%f.js" copy "%custom_dir%\js.template" "%custom_dir%\%%f.js" + if NOT EXIST "%custom_dir%\%%f.css" copy "%custom_dir%\css.template" "%custom_dir%\%%f.css" ) echo _ From c01aaeefc1eb6a7796b17c6873d5718b73c1ac4d Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 5 Jul 2012 17:34:23 +0200 Subject: [PATCH 3/4] Allow node v0.6.x and 0.8.x --- src/node/utils/caching_middleware.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node/utils/caching_middleware.js b/src/node/utils/caching_middleware.js index bfe6a6be22f..1f53367331c 100644 --- a/src/node/utils/caching_middleware.js +++ b/src/node/utils/caching_middleware.js @@ -21,9 +21,12 @@ var path = require('path'); var zlib = require('zlib'); var util = require('util'); var settings = require('./Settings'); +var semver = require('semver'); + +var existsSync = (semver.satisfies(process.version, '>=0.8.0')) ? fs.existsSync : path.existsSync var CACHE_DIR = path.normalize(path.join(settings.root, 'var/')); -CACHE_DIR = fs.existsSync(CACHE_DIR) ? CACHE_DIR : undefined; +CACHE_DIR = existsSync(CACHE_DIR) ? CACHE_DIR : undefined; var responseCache = {}; From 42bbbd426f0b4036fb0b4e89a765e2495476e09d Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 5 Jul 2012 18:11:18 +0200 Subject: [PATCH 4/4] Add latest versions of async, express and connect. --- src/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/package.json b/src/package.json index 48750fbcb1b..002d05aba18 100644 --- a/src/package.json +++ b/src/package.json @@ -16,9 +16,9 @@ "resolve" : "0.2.1", "socket.io" : "0.9.6", "ueberDB" : "0.1.7", - "async" : "0.1.18", - "express" : "2.5.8", - "connect" : "1.8.7", + "async" : "0.1.x", + "express" : "2.5.x", + "connect" : "1.x", "clean-css" : "0.3.2", "uglify-js" : "1.2.5", "formidable" : "1.0.9",