node-serialport-bindings-cpp/package.json
Linus Wallgren 090b26b58b Bugfixes around JS handling of file descriptors
This patch combines #586 and #686

 - A closed serialport now uses fd = null
 - Emulate a proper fd in mock hardware
 - Instead of using the device path as the file descriptor, use a generated
integer as the fd.

This have to use a starting fd of 1 as there are bugs when the fd is 0.
The open(2) manpage states that the file descriptor will be a small
nonnegative integer.

Checking if the fd is falsey leads to the incorrect classification of the
fd 0 as invalid. That is not the case, open(2) specifies the fd as "a
small, nonnegative integer".

This also adds tests for all the cases where the fd was previously
incorrectly considered invalid, which required adding three more methods
to the mock-hardware (update, set and drain).

This solves issue #472
2016-03-28 19:41:34 -04:00

88 lines
2.2 KiB
JSON

{
"name": "serialport",
"version": "2.0.7-beta1",
"description": "Welcome your robotic javascript overlords. Better yet, program them!",
"author": {
"name": "Chris Williams",
"email": "voodootikigod@gmail.com",
"url": "http://www.voodootikigod.com"
},
"binary": {
"module_name": "serialport",
"module_path": "./build/{configuration}/{node_abi}-{platform}-{arch}/",
"package_name": "{node_abi}-{platform}-{arch}.tar.gz",
"host": "https://github.com/voodootikigod/node-serialport/releases/download/2.0.7-beta1"
},
"main": "./serialport",
"repository": {
"type": "git",
"url": "git://github.com/voodootikigod/node-serialport.git"
},
"maintainers": [
{
"name": "Jacob Rosenthal",
"email": "jakerosenthal@gmail.com"
},
{
"name": "Chris Williams",
"email": "voodootikigod@gmail.com"
},
{
"name": "Joe Ferner",
"email": "joe.ferner@nearinfinity.com"
},
{
"name": "Jay Beavers",
"email": "jay@hikinghomeschoolers.org"
},
{
"name": "Rob Giseburt",
"email": "giseburt@gmail.com"
},
{
"name": "Francis Gulotta",
"email": "wizard@roborooter.com"
}
],
"dependencies": {
"async": "0.9.0",
"bindings": "1.2.1",
"debug": "^2.1.1",
"nan": "~2.0.0",
"node-pre-gyp": "0.6.x",
"node-pre-gyp-github": "^1.1.0",
"optimist": "~0.6.1",
"sf": "0.1.7"
},
"bundledDependencies": [
"node-pre-gyp",
"node-pre-gyp-github"
],
"devDependencies": {
"chai": "*",
"eslint-config-standard": "^5.1.0",
"eslint-plugin-promise": "^1.1.0",
"eslint-plugin-standard": "^1.3.2",
"grunt": "*",
"grunt-cli": "*",
"grunt-mocha-test": "*",
"gruntify-eslint": "^2.0.0",
"mocha": "*",
"sandboxed-module": "~0.3.0",
"sinon": "*",
"sinon-chai": "*"
},
"engines": {
"node": ">= 0.10.0"
},
"bin": {
"serialportlist": "./bin/serialportList.js",
"serialportterm": "./bin/serialportTerminal.js"
},
"license": "MIT",
"scripts": {
"install": "node-pre-gyp install --fallback-to-build",
"rebuild": "node-pre-gyp rebuild",
"test": "grunt --verbose"
}
}