Comparing version 0.1.2 to 0.1.3
11
build.js
@@ -13,3 +13,4 @@ #!/usr/bin/env node | ||
platform = process.platform, | ||
nodeV = /[0-9]+\.[0-9]+/.exec(process.versions.node)[0]; | ||
nodeV = /[0-9]+\.[0-9]+/.exec(process.versions.node)[0], | ||
nodeVM = /[0-9]+/.exec(process.versions.node)[0]; | ||
var args = process.argv.slice(2).filter(function(arg) { | ||
@@ -41,3 +42,9 @@ if (arg === '-f') { | ||
try { | ||
fs.statSync(path.join(__dirname, 'bin', modPath, 'deasync.node')); | ||
try{ | ||
fs.statSync(path.join(__dirname, 'bin', modPath, 'deasync.node')); | ||
} | ||
catch(ex){ | ||
modPath = platform + '-' + arch + '-node-' + nodeVM; | ||
fs.statSync(path.join(__dirname, 'bin', modPath, 'deasync.node')); | ||
} | ||
console.log('`' + modPath + '` exists; testing'); | ||
@@ -44,0 +51,0 @@ cp.execFile(process.execPath, ['quick-test.js'], function(err, stdout, stderr) { |
@@ -10,5 +10,12 @@ var fs = require('fs'), | ||
var nodeV = 'node-' + /[0-9]+\.[0-9]+/.exec(process.versions.node)[0]; | ||
var nodeVM = 'node-' + /[0-9]+/.exec(process.versions.node)[0]; | ||
var modPath = path.join(__dirname, 'bin', process.platform + '-' + process.arch + '-' + nodeV, 'deasync'); | ||
try { | ||
fs.statSync(modPath + '.node'); | ||
try{ | ||
fs.statSync(modPath + '.node'); | ||
} | ||
catch(ex){ | ||
modPath = path.join(__dirname, 'bin', process.platform + '-' + process.arch + '-' + nodeVM, 'deasync'); | ||
fs.statSync(modPath + '.node'); | ||
} | ||
binding = require(modPath); | ||
@@ -15,0 +22,0 @@ } |
{ | ||
"name": "deasync", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Turns async function into sync via JavaScript wrapper of Node event loop", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -73,2 +73,9 @@ deasync | ||
## Support | ||
Pull requests and issue reporting are welcome. For issues to be considered by maintainer: | ||
1. they must be reproducible. | ||
2. there must be evidence the issue is related to `deasync`. | ||
To that end, the issue should contain platform information, error message relevant to `deasync`, and preferably code snippet. If code snippet is supplied, it must be self-contained, i.e. independent from your runtime environment or other modules not explictly specified via `require` in the code snippet. | ||
## License | ||
@@ -75,0 +82,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
787081
190
103