diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..49b66ea --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.log +yarn.lock +package-lock.json +node_modules \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index d12d0af..85b8890 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,5 @@ env: language: node_js node_js: - - '4.2' - - '5' - - '6' - - '7' + - '12' + - '14' diff --git a/examples/simple/render.js b/examples/simple/render.js index c0f046f..a7cdba3 100644 --- a/examples/simple/render.js +++ b/examples/simple/render.js @@ -7,7 +7,7 @@ var xclient = x11.createClient(function(err, display) { display.client.require('render', function(err, Render) { var wid = X.AllocID(); var white = display.screen[0].white_pixel; - varblack = display.screen[0].black_pixel; + var black = display.screen[0].black_pixel; X.CreateWindow(wid, root, 10, 10, 400, 300, 0, 0, 0, 0, { backgroundPixel: white, eventMask: PointerMotion }); X.MapWindow(wid); diff --git a/lib/auth.js b/lib/auth.js index 1546e5d..afd7f59 100644 --- a/lib/auth.js +++ b/lib/auth.js @@ -50,7 +50,7 @@ function parseXauth( buf ) return auth; } -var homedir = require('os-homedir'); +var homedir = require('os').homedir(); var path = require('path'); function readXauthority(cb) { diff --git a/lib/corereqs.js b/lib/corereqs.js index 81ffdef..c1fe028 100644 --- a/lib/corereqs.js +++ b/lib/corereqs.js @@ -217,25 +217,26 @@ function packValueMask(reqname, values) { var v = reqValueMask[value]; if (v) { - var valueBit = v.mask; - if (!valueBit) - throw new Error(reqname + ': incorrect value param ' + value); - masksList.push(valueBit); - bitmask |= valueBit; + var valueBit = v.mask; + if (!valueBit) + throw new Error(reqname + ': incorrect value param ' + value); + masksList.push(valueBit); + bitmask |= valueBit; } } /* numeric sort */ masksList.sort(function(a, b) { - return a - b; + return a - b; }); var args = []; - for (m in masksList) + for (var i=0,length=masksList.length;i