Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serialport

Package Overview
Dependencies
Maintainers
3
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serialport - npm Package Compare versions

Comparing version 3.1.2-beta2 to 3.1.2-beta3

.pre-publish-info

6

changelog.md

@@ -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 @@ -------------

31

lib/serialport.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc