Socket
Socket
Sign inDemoInstall

@serialport/binding-mock

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@serialport/binding-mock - npm Package Compare versions

Comparing version 8.0.3 to 8.0.4

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

## [8.0.4](https://github.com/serialport/node-serialport/compare/v8.0.3...v8.0.4) (2019-10-27)
### Bug Fixes
* learn now needs the package-lock.json files ([4b8fc24](https://github.com/serialport/node-serialport/commit/4b8fc248778b69f7afde17ab9ef791ef8867c4a5))
* npmignore should ignore .DS_Store files ([#1954](https://github.com/serialport/node-serialport/issues/1954)) ([eb6b57b](https://github.com/serialport/node-serialport/commit/eb6b57bffe33c9bc7775bb6b0fdf1081db86ebcc))
## [8.0.3](https://github.com/serialport/node-serialport/compare/v8.0.2...v8.0.3) (2019-10-03)

@@ -8,0 +20,0 @@

40

lib/index.js

@@ -163,23 +163,21 @@ const AbstractBinding = require('@serialport/binding-abstract')

}
this.writeOperation = super
.write(buffer)
.then(resolveNextTick)
.then(async () => {
if (!this.isOpen) {
throw new Error('Write canceled')
}
const data = (this.lastWrite = Buffer.from(buffer)) // copy
if (this.port.record) {
this.recording = Buffer.concat([this.recording, data])
}
if (this.port.echo) {
process.nextTick(() => {
if (this.isOpen) {
this.emitData(data)
}
})
}
this.writeOperation = null
debug(this.serialNumber, 'writing finished')
})
this.writeOperation = super.write(buffer).then(async () => {
await resolveNextTick()
if (!this.isOpen) {
throw new Error('Write canceled')
}
const data = (this.lastWrite = Buffer.from(buffer)) // copy
if (this.port.record) {
this.recording = Buffer.concat([this.recording, data])
}
if (this.port.echo) {
process.nextTick(() => {
if (this.isOpen) {
this.emitData(data)
}
})
}
this.writeOperation = null
debug(this.serialNumber, 'writing finished')
})
return this.writeOperation

@@ -186,0 +184,0 @@ }

{
"name": "@serialport/binding-mock",
"version": "8.0.3",
"version": "8.0.4",
"main": "lib",

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

"dependencies": {
"@serialport/binding-abstract": "^8.0.3",
"@serialport/binding-abstract": "^8.0.4",
"debug": "^4.1.1"

@@ -24,3 +24,3 @@ },

},
"gitHead": "6a73db38345ef4193b1c68495519ca999cd8411f"
"gitHead": "db21188f86f958cb53b39e753c5cf019965e0695"
}
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