Socket
Socket
Sign inDemoInstall

@serialport/bindings

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serialport/bindings - npm Package Compare versions

Comparing version 3.0.0 to 8.0.1

80

CHANGELOG.md

@@ -6,3 +6,3 @@ # Change Log

# [3.0.0](https://github.com/node-serialport/node-serialport/compare/@serialport/bindings@2.0.8...@serialport/bindings@3.0.0) (2019-05-16)
## [8.0.1](https://github.com/serialport/node-serialport/compare/v6.2.2...v8.0.1) (2019-09-18)

@@ -12,4 +12,14 @@

* remove PURGE_RXABORT flag on flush for Windows ([#1817](https://github.com/node-serialport/node-serialport/issues/1817)) ([1daa919](https://github.com/node-serialport/node-serialport/commit/1daa919))
* RTS/CTS flow control for Windows ([#1809](https://github.com/node-serialport/node-serialport/issues/1809)) ([cd112ca](https://github.com/node-serialport/node-serialport/commit/cd112ca))
* bindings now error when closed during empty writes ([#1872](https://github.com/serialport/node-serialport/issues/1872)) ([9d01492](https://github.com/serialport/node-serialport/commit/9d01492))
* deprecated c++ functions for update to Node v12 ([#1743](https://github.com/serialport/node-serialport/issues/1743)) ([1eecd60](https://github.com/serialport/node-serialport/commit/1eecd60))
* make node 12 work! ([00dc272](https://github.com/serialport/node-serialport/commit/00dc272))
* prebuild now pays attention to lerna tags ([#1639](https://github.com/serialport/node-serialport/issues/1639)) ([d3d553f](https://github.com/serialport/node-serialport/commit/d3d553f))
* prebuild on mojave ([#1759](https://github.com/serialport/node-serialport/issues/1759)) ([d4f5128](https://github.com/serialport/node-serialport/commit/d4f5128)), closes [/github.com/nodejs/node/pull/23685#issuecomment-430408541](https://github.com//github.com/nodejs/node/pull/23685/issues/issuecomment-430408541)
* propagate async context in callbacks ([#1765](https://github.com/serialport/node-serialport/issues/1765)) ([9b5dbdb](https://github.com/serialport/node-serialport/commit/9b5dbdb)), closes [#1751](https://github.com/serialport/node-serialport/issues/1751)
* remove PURGE_RXABORT flag on flush for Windows ([#1817](https://github.com/serialport/node-serialport/issues/1817)) ([1daa919](https://github.com/serialport/node-serialport/commit/1daa919))
* RTS/CTS flow control for Windows ([#1809](https://github.com/serialport/node-serialport/issues/1809)) ([cd112ca](https://github.com/serialport/node-serialport/commit/cd112ca))
* stream read not working past 1 read ([#1925](https://github.com/serialport/node-serialport/issues/1925)) ([3a13279](https://github.com/serialport/node-serialport/commit/3a13279))
* use correct casts to/from HANDLE/int ([#1766](https://github.com/serialport/node-serialport/issues/1766)) ([ce503b3](https://github.com/serialport/node-serialport/commit/ce503b3))
* **packages/bindings#write:** do not call native binding for empty buffers ([d347f3b](https://github.com/serialport/node-serialport/commit/d347f3b))
* writing issue on Linux ([#1908](https://github.com/serialport/node-serialport/issues/1908)) ([a7d1937](https://github.com/serialport/node-serialport/commit/a7d1937))

@@ -19,5 +29,12 @@

* remove node6 support and upgrade codebase ([#1851](https://github.com/node-serialport/node-serialport/issues/1851)) ([d4f15c0](https://github.com/node-serialport/node-serialport/commit/d4f15c0))
* remove node6 support and upgrade codebase ([#1851](https://github.com/serialport/node-serialport/issues/1851)) ([d4f15c0](https://github.com/serialport/node-serialport/commit/d4f15c0))
### Features
* add eslint mocha ([#1922](https://github.com/serialport/node-serialport/issues/1922)) ([afbc431](https://github.com/serialport/node-serialport/commit/afbc431))
* Make it possible to compile on vanilla Android ([#1912](https://github.com/serialport/node-serialport/issues/1912)) ([ba2b69c](https://github.com/serialport/node-serialport/commit/ba2b69c))
* support Exar ttyXRUSB ([#1893](https://github.com/serialport/node-serialport/issues/1893)) ([3d34d0f](https://github.com/serialport/node-serialport/commit/3d34d0f))
### BREAKING CHANGES

@@ -32,3 +49,3 @@

## [2.0.8](https://github.com/node-serialport/node-serialport/compare/@serialport/bindings@2.0.7...@serialport/bindings@2.0.8) (2019-04-27)
# [3.0.0](https://github.com/serialport/node-serialport/compare/@serialport/bindings@2.0.8...@serialport/bindings@3.0.0) (2019-05-16)

@@ -38,10 +55,33 @@

* make node 12 work! ([00dc272](https://github.com/node-serialport/node-serialport/commit/00dc272))
* remove PURGE_RXABORT flag on flush for Windows ([#1817](https://github.com/serialport/node-serialport/issues/1817)) ([1daa919](https://github.com/serialport/node-serialport/commit/1daa919))
* RTS/CTS flow control for Windows ([#1809](https://github.com/serialport/node-serialport/issues/1809)) ([cd112ca](https://github.com/serialport/node-serialport/commit/cd112ca))
### chore
* remove node6 support and upgrade codebase ([#1851](https://github.com/serialport/node-serialport/issues/1851)) ([d4f15c0](https://github.com/serialport/node-serialport/commit/d4f15c0))
## [2.0.7](https://github.com/node-serialport/node-serialport/compare/@serialport/bindings@2.0.6...@serialport/bindings@2.0.7) (2019-01-24)
### BREAKING CHANGES
* flush behavior on windows no longer cancels inflight reads
* bindings now use async functions so they’ll never throw, only reject
## [2.0.8](https://github.com/serialport/node-serialport/compare/@serialport/bindings@2.0.7...@serialport/bindings@2.0.8) (2019-04-27)
### Bug Fixes
* make node 12 work! ([00dc272](https://github.com/serialport/node-serialport/commit/00dc272))
## [2.0.7](https://github.com/serialport/node-serialport/compare/@serialport/bindings@2.0.6...@serialport/bindings@2.0.7) (2019-01-24)
**Note:** Version bump only for package @serialport/bindings

@@ -53,10 +93,10 @@

## [2.0.6](https://github.com/node-serialport/node-serialport/compare/@serialport/bindings@2.0.5...@serialport/bindings@2.0.6) (2019-01-12)
## [2.0.6](https://github.com/serialport/node-serialport/compare/@serialport/bindings@2.0.5...@serialport/bindings@2.0.6) (2019-01-12)
### Bug Fixes
* fix crash at port open ([#1772](https://github.com/node-serialport/node-serialport/issues/1772)) ([415891c](https://github.com/node-serialport/node-serialport/commit/415891c))
* fix crash at port open ([#1772](https://github.com/serialport/node-serialport/issues/1772)) ([415891c](https://github.com/serialport/node-serialport/commit/415891c))
## [2.0.5](https://github.com/node-serialport/node-serialport/compare/@serialport/bindings@2.0.4...@serialport/bindings@2.0.5) (2019-01-08)
## [2.0.5](https://github.com/serialport/node-serialport/compare/@serialport/bindings@2.0.4...@serialport/bindings@2.0.5) (2019-01-08)

@@ -66,5 +106,5 @@

* prebuild on mojave ([#1759](https://github.com/node-serialport/node-serialport/issues/1759)) ([d4f5128](https://github.com/node-serialport/node-serialport/commit/d4f5128)), closes [/github.com/nodejs/node/pull/23685#issuecomment-430408541](https://github.com//github.com/nodejs/node/pull/23685/issues/issuecomment-430408541)
* propagate async context in callbacks ([#1765](https://github.com/node-serialport/node-serialport/issues/1765)) ([9b5dbdb](https://github.com/node-serialport/node-serialport/commit/9b5dbdb)), closes [#1751](https://github.com/node-serialport/node-serialport/issues/1751)
* use correct casts to/from HANDLE/int ([#1766](https://github.com/node-serialport/node-serialport/issues/1766)) ([ce503b3](https://github.com/node-serialport/node-serialport/commit/ce503b3))
* prebuild on mojave ([#1759](https://github.com/serialport/node-serialport/issues/1759)) ([d4f5128](https://github.com/serialport/node-serialport/commit/d4f5128)), closes [/github.com/nodejs/node/pull/23685#issuecomment-430408541](https://github.com//github.com/nodejs/node/pull/23685/issues/issuecomment-430408541)
* propagate async context in callbacks ([#1765](https://github.com/serialport/node-serialport/issues/1765)) ([9b5dbdb](https://github.com/serialport/node-serialport/commit/9b5dbdb)), closes [#1751](https://github.com/serialport/node-serialport/issues/1751)
* use correct casts to/from HANDLE/int ([#1766](https://github.com/serialport/node-serialport/issues/1766)) ([ce503b3](https://github.com/serialport/node-serialport/commit/ce503b3))

@@ -75,3 +115,3 @@

## [2.0.4](https://github.com/node-serialport/node-serialport/compare/@serialport/bindings@2.0.3...@serialport/bindings@2.0.4) (2018-12-19)
## [2.0.4](https://github.com/serialport/node-serialport/compare/@serialport/bindings@2.0.3...@serialport/bindings@2.0.4) (2018-12-19)

@@ -81,3 +121,3 @@

* deprecated c++ functions for update to Node v12 ([#1743](https://github.com/node-serialport/node-serialport/issues/1743)) ([1eecd60](https://github.com/node-serialport/node-serialport/commit/1eecd60))
* deprecated c++ functions for update to Node v12 ([#1743](https://github.com/serialport/node-serialport/issues/1743)) ([1eecd60](https://github.com/serialport/node-serialport/commit/1eecd60))

@@ -88,3 +128,3 @@

## [2.0.3](https://github.com/node-serialport/node-serialport/compare/@serialport/bindings@2.0.2...@serialport/bindings@2.0.3) (2018-11-27)
## [2.0.3](https://github.com/serialport/node-serialport/compare/@serialport/bindings@2.0.2...@serialport/bindings@2.0.3) (2018-11-27)

@@ -94,3 +134,3 @@

* **packages/bindings#write:** do not call native binding for empty buffers ([d347f3b](https://github.com/node-serialport/node-serialport/commit/d347f3b))
* **packages/bindings#write:** do not call native binding for empty buffers ([d347f3b](https://github.com/serialport/node-serialport/commit/d347f3b))

@@ -102,3 +142,3 @@

<a name="2.0.2"></a>
## [2.0.2](https://github.com/node-serialport/node-serialport/compare/@serialport/bindings@2.0.1...@serialport/bindings@2.0.2) (2018-08-29)
## [2.0.2](https://github.com/serialport/node-serialport/compare/@serialport/bindings@2.0.1...@serialport/bindings@2.0.2) (2018-08-29)

@@ -112,3 +152,3 @@ **Note:** Version bump only for package @serialport/bindings

<a name="2.0.1"></a>
## [2.0.1](https://github.com/node-serialport/node-serialport/compare/@serialport/bindings@2.0.0...@serialport/bindings@2.0.1) (2018-08-29)
## [2.0.1](https://github.com/serialport/node-serialport/compare/@serialport/bindings@2.0.0...@serialport/bindings@2.0.1) (2018-08-29)

@@ -118,3 +158,3 @@

* prebuild now pays attention to lerna tags ([#1639](https://github.com/node-serialport/node-serialport/issues/1639)) ([d3d553f](https://github.com/node-serialport/node-serialport/commit/d3d553f))
* prebuild now pays attention to lerna tags ([#1639](https://github.com/serialport/node-serialport/issues/1639)) ([d3d553f](https://github.com/serialport/node-serialport/commit/d3d553f))

@@ -121,0 +161,0 @@

@@ -68,9 +68,11 @@ const { promisify } = require('util')

async write(buffer) {
if (buffer.length === 0) {
return
}
this.writeOperation = super
.write(buffer)
.then(() => unixWrite.call(this, buffer))
.then(() => {
if (buffer.length === 0) {
return
}
return unixWrite.call(this, buffer)
})
.then(() => {
this.writeOperation = null

@@ -77,0 +79,0 @@ })

@@ -6,3 +6,3 @@ const childProcess = require('child_process')

function checkPathOfDevice(path) {
return /(tty(S|WCH|ACM|USB|AMA|MFD|O)|rfcomm)/.test(path) && path
return /(tty(S|WCH|ACM|USB|AMA|MFD|O|XRUSB)|rfcomm)/.test(path) && path
}

@@ -9,0 +9,0 @@

@@ -68,9 +68,11 @@ const { promisify } = require('util')

async write(buffer) {
if (buffer.length === 0) {
return
}
this.writeOperation = super
.write(buffer)
.then(() => unixWrite.call(this, buffer))
.then(() => {
if (buffer.length === 0) {
return
}
return unixWrite.call(this, buffer)
})
.then(() => {
this.writeOperation = null

@@ -77,0 +79,0 @@ })

@@ -22,3 +22,3 @@ const fs = require('fs')

try {
const bytesWritten = await writeAsync(this.fd, buffer, offset, bytesToWrite)
const { bytesWritten } = await writeAsync(this.fd, buffer, offset, bytesToWrite)
logger('write returned: wrote', bytesWritten, 'bytes')

@@ -29,3 +29,3 @@ if (bytesWritten + offset < buffer.length) {

}
return resolve(unixWrite.call(this, buffer, bytesWritten + offset))
return unixWrite.call(this, buffer, bytesWritten + offset)
}

@@ -32,0 +32,0 @@

@@ -68,3 +68,6 @@ const binding = require('bindings')('bindings.node')

await super.read(buffer, offset, length)
return asyncRead(this.fd, buffer, offset, length).catch(err => {
try {
const bytesRead = await asyncRead(this.fd, buffer, offset, length)
return { bytesRead, buffer }
} catch (err) {
if (!this.isOpen) {

@@ -74,13 +77,15 @@ err.canceled = true

throw err
})
}
}
async write(buffer) {
if (buffer.length === 0) {
return
}
this.writeOperation = super
.write(buffer)
.then(() => asyncWrite(this.fd, buffer))
.then(() => {
if (buffer.length === 0) {
return
}
return asyncWrite(this.fd, buffer)
})
.then(() => {
this.writeOperation = null

@@ -87,0 +92,0 @@ })

{
"name": "@serialport/bindings",
"version": "3.0.0",
"version": "8.0.1",
"main": "lib",

@@ -9,4 +9,4 @@ "keywords": [

"dependencies": {
"@serialport/binding-abstract": "^3.0.0",
"@serialport/parser-readline": "^3.0.0",
"@serialport/binding-abstract": "^8.0.1",
"@serialport/parser-readline": "^8.0.1",
"bindings": "^1.5.0",

@@ -18,3 +18,3 @@ "debug": "^4.1.1",

"devDependencies": {
"@serialport/binding-mock": "^3.0.0"
"@serialport/binding-mock": "^8.0.1"
},

@@ -36,3 +36,3 @@ "engines": {

"type": "git",
"url": "git://github.com/node-serialport/node-serialport.git"
"url": "git://github.com/serialport/node-serialport.git"
},

@@ -51,3 +51,3 @@ "gypfile": true,

},
"gitHead": "524a2729003a94c9575904448d878a151f4f3790"
"gitHead": "eae28d4a00df1cc44e054acd34b530377cdc62c6"
}

@@ -6,1 +6,9 @@ # @serialport/Bindings

Learn more at our [bindings documentation](https://serialport.io/docs/api-bindings) page.
# Android users
When using termux there is a way to compile serialport to be used under Android
```sh
CFLAGS=-fPIC CXXFLAGS=-fPIC yarn rebuild
```

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