Merge branch 'master' into greenkeeper/async-3.0.1

This commit is contained in:
Andrey Sidorov 2020-05-21 20:16:03 +10:00 committed by GitHub
commit 4ece7f2b0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 20 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
*.log
yarn.lock
package-lock.json
node_modules

View file

@ -12,7 +12,5 @@ env:
language: node_js language: node_js
node_js: node_js:
- '4.2' - '12'
- '5' - '14'
- '6'
- '7'

View file

@ -7,7 +7,7 @@ var xclient = x11.createClient(function(err, display) {
display.client.require('render', function(err, Render) { display.client.require('render', function(err, Render) {
var wid = X.AllocID(); var wid = X.AllocID();
var white = display.screen[0].white_pixel; 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.CreateWindow(wid, root, 10, 10, 400, 300, 0, 0, 0, 0, { backgroundPixel: white, eventMask: PointerMotion });
X.MapWindow(wid); X.MapWindow(wid);

View file

@ -50,7 +50,7 @@ function parseXauth( buf )
return auth; return auth;
} }
var homedir = require('os-homedir'); var homedir = require('os').homedir();
var path = require('path'); var path = require('path');
function readXauthority(cb) { function readXauthority(cb) {

View file

@ -217,25 +217,26 @@ function packValueMask(reqname, values)
{ {
var v = reqValueMask[value]; var v = reqValueMask[value];
if (v) { if (v) {
var valueBit = v.mask; var valueBit = v.mask;
if (!valueBit) if (!valueBit)
throw new Error(reqname + ': incorrect value param ' + value); throw new Error(reqname + ': incorrect value param ' + value);
masksList.push(valueBit); masksList.push(valueBit);
bitmask |= valueBit; bitmask |= valueBit;
} }
} }
/* numeric sort */ /* numeric sort */
masksList.sort(function(a, b) { masksList.sort(function(a, b) {
return a - b; return a - b;
}); });
var args = []; var args = [];
for (m in masksList) for (var i=0,length=masksList.length;i<length;i++)
{ {
var valueName = reqValueMaskName[masksList[m]]; var value = masksList[i];
format += reqValueMask[valueName].format var valueName = reqValueMaskName[value];
args.push( values[valueName] ); format += reqValueMask[valueName].format
args.push( values[valueName] );
} }
return [format, bitmask, args] return [format, bitmask, args]
} }

View file

@ -41,7 +41,7 @@
}, },
"devDependencies": { "devDependencies": {
"async": "^3.0.1", "async": "^3.0.1",
"mocha": "^5.0.0", "mocha": "^7.1.2",
"sax": "^1.2.4", "sax": "^1.2.4",
"should": "^13.2.1", "should": "^13.2.1",
"sinon": "^6.0.0" "sinon": "^6.0.0"
@ -50,7 +50,5 @@
"test": "node test-runner.js", "test": "node test-runner.js",
"prepublish": "npm prune" "prepublish": "npm prune"
}, },
"dependencies": { "dependencies": {}
"os-homedir": "^1.0.1"
}
} }