serialport
Advanced tools
Comparing version 3.1.2-beta2 to 3.1.2-beta3
@@ -0,1 +1,7 @@ | ||
Version 3.1.2-beta3 | ||
------------- | ||
- Add some pre-publish warnings to help bad builds from being published | ||
- Add some pre-publish logging | ||
- Refactor setBaudrate for Unix making it easier for custom baudRate support | ||
Version 3.1.2-beta2 | ||
@@ -2,0 +8,0 @@ ------------- |
@@ -227,3 +227,3 @@ 'use strict'; | ||
this.emit('open'); | ||
if (callback) { callback() } | ||
if (callback) { callback(null) } | ||
}.bind(this)); | ||
@@ -249,4 +249,3 @@ }; | ||
} | ||
this.emit('open'); | ||
if (callback) { callback() } | ||
if (callback) { callback(null) } | ||
}.bind(this)); | ||
@@ -433,19 +432,13 @@ }; | ||
} | ||
try { | ||
SerialPortBinding.close(fd, function (err) { | ||
this.closing = false; | ||
if (err) { | ||
debug('SerialPortBinding.close had an error', err); | ||
return this._error(err, callback); | ||
} | ||
SerialPortBinding.close(fd, function (err) { | ||
this.closing = false; | ||
if (err) { | ||
debug('SerialPortBinding.close had an error', err); | ||
return this._error(err, callback); | ||
} | ||
this.fd = null; | ||
this.emit('close'); | ||
if (callback) { callback() } | ||
}.bind(this)); | ||
} catch (err) { | ||
this.closing = false; | ||
debug('SerialPortBinding.close had an throwing error', err); | ||
return this._error(err, callback); | ||
} | ||
this.fd = null; | ||
this.emit('close'); | ||
if (callback) { callback(null) } | ||
}.bind(this)); | ||
}; | ||
@@ -452,0 +445,0 @@ |
{ | ||
"name": "serialport", | ||
"version": "3.1.2-beta2", | ||
"version": "3.1.2-beta3", | ||
"description": "Node.js package to access serial ports. Welcome your robotic javascript overlords. Better yet, program them!", | ||
@@ -13,3 +13,3 @@ "author": { | ||
"module_path": "build/{configuration}/", | ||
"host": "https://github.com/voodootikigod/node-serialport/releases/download/3.1.2-beta2" | ||
"host": "https://github.com/voodootikigod/node-serialport/releases/download/3.1.2-beta3" | ||
}, | ||
@@ -76,6 +76,8 @@ "main": "./lib/serialport", | ||
"sandboxed-module": "^2.0.3", | ||
"semver": "^5.1.0", | ||
"sinon": "^1.17.3", | ||
"sinon-chai": "^2.8.0" | ||
"sinon-chai": "^2.8.0", | ||
"spawn-sync": "^1.0.15" | ||
}, | ||
"bundledDependencies":[ | ||
"bundledDependencies": [ | ||
"node-pre-gyp" | ||
@@ -93,9 +95,10 @@ ], | ||
"install": "node-pre-gyp install --fallback-to-build", | ||
"rebuild-all": "npm rebuild && node-pre-gyp rebuild", | ||
"rebuild-all": "npm rebuild && node-gyp rebuild", | ||
"gyp-rebuild": "node-gyp rebuild", | ||
"stress": "mocha --no-timeouts test/arduinoTest/stress.js", | ||
"grunt": "grunt", | ||
"test": "grunt --verbose", | ||
"prepublish": "npm ls" | ||
"prepublish": "node bin/pre-publish.js" | ||
}, | ||
"gypfile": true | ||
} |
@@ -46,10 +46,12 @@ # Node Serialport | ||
* [SerialPort](#serialport-path-options-openimmediately-callback) | ||
* [close()](#close-callback) | ||
* [drain()](#drain-callback) | ||
* [flush()](#flush-callback) | ||
* [isOpen()](#isopen) | ||
* [open()](#open-callback) | ||
* [isOpen()](#isopen) | ||
* [write()](#write-buffer-callback) | ||
* [pause()](#pause-) | ||
* [resume()](#resume-) | ||
* [flush()](#flush-callback) | ||
* [drain()](#drain-callback) | ||
* [close()](#close-callback) | ||
* [set()](#set-options-callback) | ||
* [update()](#update-options-callback) | ||
* [write()](#write-buffer-callback) | ||
* [Events](#events) | ||
@@ -314,3 +316,3 @@ * [Command Line Tools](#command-line-tools) | ||
* `baudRate` Baud Rate, defaults to 9600. Should be one of: 115200, 57600, 38400, 19200, 9600, 4800, 2400, 1800, 1200, 600, 300, 200, 150, 134, 110, 75, or 50. Custom rates as allowed by hardware is supported. | ||
* `baudRate` Baud Rate, defaults to 9600. Should be one of: 115200, 57600, 38400, 19200, 9600, 4800, 2400, 1800, 1200, 600, 300, 200, 150, 134, 110, 75, or 50. Custom rates as allowed by hardware is supported. Windows doesn't support custom baud rates. | ||
* `dataBits` Data Bits, defaults to 8. Must be one of: 8, 7, 6, or 5. | ||
@@ -437,2 +439,16 @@ * `stopBits` Stop Bits, defaults to 1. Must be one of: 1 or 2. | ||
### .update (options, callback) | ||
Changes the baudrate for an open port. Doesn't yet work on windows. | ||
**_options_** | ||
* `baudRate` Baud Rate should be one of: 115200, 57600, 38400, 19200, 9600, 4800, 2400, 1800, 1200, 600, 300, 200, 150, 134, 110, 75, or 50. Custom rates as allowed by hardware is supported. | ||
**_callback (optional)_** | ||
`callback: function(err)` | ||
Called once the port's baud rate has been changed. If `.update` is called without an callback and there is an error, an error event will be emitted. | ||
## Events | ||
@@ -439,0 +455,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
494023
59
3292
526
4
15
36