diff --git a/package-lock.json b/package-lock.json index 9ef479082..3e73a522e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "MIT", "devDependencies": { - "@serialport/bindings-cpp": "^10.6.1", + "@serialport/bindings-cpp": "^10.6.2", "@tsconfig/node12": "^1.0.9", "@types/chai": "^4.3.0", "@types/chai-subset": "^1.3.3", @@ -1924,14 +1924,14 @@ } }, "node_modules/@serialport/bindings-cpp": { - "version": "10.6.1", - "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.1.tgz", - "integrity": "sha512-wlgiCoImyA0siK0Z1ziXFDv6Ua3Tko9vMyNPAMW/Ywk18vKVKPYvvGlYxhbdK9LGzGdqVXGWmEW15R/S+anzQQ==", + "version": "10.6.2", + "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.2.tgz", + "integrity": "sha512-vhId2K4Y4WOgy/UJE8NOHX6GZpozORCCMh6GM5UQeIzXihoYLxt4eomgl1eXasFipcRs06n71lAToqixb7NPpA==", "dev": true, "hasInstallScript": true, "dependencies": { - "@serialport/bindings-interface": "1.2.0", - "@serialport/parser-readline": "10.0.1", + "@serialport/bindings-interface": "1.2.1", + "@serialport/parser-readline": "^10.2.1", "debug": "^4.3.2", "node-addon-api": "^4.3.0", "node-gyp-build": "^4.3.0" @@ -1944,18 +1944,18 @@ } }, "node_modules/@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", + "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==", "dev": true, "engines": { "node": "^12.22 || ^14.13 || >=16" } }, "node_modules/@serialport/parser-delimiter": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.0.1.tgz", - "integrity": "sha512-B0c6dm9UCpRU/LhkvRFL3OSbs69VqWU7mjW7tM109JDNS+vw8uJPumXz8Giub6D0xl90J7euH6tBTqERk7048Q==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.2.1.tgz", + "integrity": "sha512-aBLgoLuqmBWddm1qxlqTagVSXe8DJqrMDYjCaVlyyCOj125EOCJBbKtMTkE58QP7Pv6pLAFb0OQ8kzgPKK7yXQ==", "dev": true, "engines": { "node": ">=12.0.0" @@ -1965,12 +1965,12 @@ } }, "node_modules/@serialport/parser-readline": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.0.1.tgz", - "integrity": "sha512-jdKPNka/Nn17k89T5UIyis39EaZHQCmq+83s0icBt2iPBlX8+BrJAUBe8myFpuT22qskTVNzFoTMPOp8pjK/yw==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.2.1.tgz", + "integrity": "sha512-cUU2X8zBGq8o4H468QWQSTeMhpMSAtUREwqi8t3lWhO64T3Fu6dHMri/ebDy3kod4V+gT7hWe9Dc20/WUJpSCA==", "dev": true, "dependencies": { - "@serialport/parser-delimiter": "10.0.1" + "@serialport/parser-delimiter": "10.2.1" }, "engines": { "node": ">=12.0.0" @@ -12587,37 +12587,37 @@ } }, "@serialport/bindings-cpp": { - "version": "10.6.1", - "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.1.tgz", - "integrity": "sha512-wlgiCoImyA0siK0Z1ziXFDv6Ua3Tko9vMyNPAMW/Ywk18vKVKPYvvGlYxhbdK9LGzGdqVXGWmEW15R/S+anzQQ==", + "version": "10.6.2", + "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.2.tgz", + "integrity": "sha512-vhId2K4Y4WOgy/UJE8NOHX6GZpozORCCMh6GM5UQeIzXihoYLxt4eomgl1eXasFipcRs06n71lAToqixb7NPpA==", "dev": true, "requires": { - "@serialport/bindings-interface": "1.2.0", - "@serialport/parser-readline": "10.0.1", + "@serialport/bindings-interface": "1.2.1", + "@serialport/parser-readline": "^10.2.1", "debug": "^4.3.2", "node-addon-api": "^4.3.0", "node-gyp-build": "^4.3.0" } }, "@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", + "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==", "dev": true }, "@serialport/parser-delimiter": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.0.1.tgz", - "integrity": "sha512-B0c6dm9UCpRU/LhkvRFL3OSbs69VqWU7mjW7tM109JDNS+vw8uJPumXz8Giub6D0xl90J7euH6tBTqERk7048Q==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.2.1.tgz", + "integrity": "sha512-aBLgoLuqmBWddm1qxlqTagVSXe8DJqrMDYjCaVlyyCOj125EOCJBbKtMTkE58QP7Pv6pLAFb0OQ8kzgPKK7yXQ==", "dev": true }, "@serialport/parser-readline": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.0.1.tgz", - "integrity": "sha512-jdKPNka/Nn17k89T5UIyis39EaZHQCmq+83s0icBt2iPBlX8+BrJAUBe8myFpuT22qskTVNzFoTMPOp8pjK/yw==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.2.1.tgz", + "integrity": "sha512-cUU2X8zBGq8o4H468QWQSTeMhpMSAtUREwqi8t3lWhO64T3Fu6dHMri/ebDy3kod4V+gT7hWe9Dc20/WUJpSCA==", "dev": true, "requires": { - "@serialport/parser-delimiter": "10.0.1" + "@serialport/parser-delimiter": "10.2.1" } }, "@sinonjs/commons": { diff --git a/package.json b/package.json index 68dcda837..08ba9e4a1 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "url": "git://github.com/serialport/node-serialport.git" }, "devDependencies": { - "@serialport/bindings-cpp": "^10.6.1", + "@serialport/bindings-cpp": "^10.6.2", "@tsconfig/node12": "^1.0.9", "@types/chai": "^4.3.0", "@types/chai-subset": "^1.3.3", diff --git a/packages/binding-mock/.npmignore b/packages/binding-mock/.npmignore deleted file mode 100644 index df4db6a44..000000000 --- a/packages/binding-mock/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -.DS_Store -*.test.js -CHANGELOG.md -lib -tsconfig.json -tsconfig-build.json -tsconfig-build.tsbuildinfo diff --git a/packages/binding-mock/CHANGELOG.md b/packages/binding-mock/CHANGELOG.md deleted file mode 100644 index 5889a485d..000000000 --- a/packages/binding-mock/CHANGELOG.md +++ /dev/null @@ -1,118 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [10.2.1](https://github.com/serialport/node-serialport/compare/v10.2.0...v10.2.1) (2022-02-03) - -**Note:** Version bump only for package @serialport/binding-mock - - - - - -# [10.2.0](https://github.com/serialport/node-serialport/compare/v10.1.0...v10.2.0) (2022-02-03) - - -### Features - -* Typescript everything ([#2406](https://github.com/serialport/node-serialport/issues/2406)) ([7ae6e51](https://github.com/serialport/node-serialport/commit/7ae6e51a84738da1999863a80f4ec8ce7acd953a)) - - - - - -# [10.1.0](https://github.com/serialport/node-serialport/compare/v10.0.2...v10.1.0) (2022-01-23) - -**Note:** Version bump only for package @serialport/binding-mock - - - - - -## [10.0.1](https://github.com/serialport/node-serialport/compare/v10.0.0...v10.0.1) (2021-12-25) - -**Note:** Version bump only for package @serialport/binding-mock - - - - - -# [10.0.0](https://github.com/serialport/node-serialport/compare/v9.2.8...v10.0.0) (2021-12-11) - - -### Features - -* Node-API migration ([#2305](https://github.com/serialport/node-serialport/issues/2305)) ([2fe7d43](https://github.com/serialport/node-serialport/commit/2fe7d434ca087f95a09ed9a3274d8b5f24e09ab4)) - - -### BREAKING CHANGES - -* This release switches to NAPI which changes how many binaries are released and will potentially break your build system - - - - - -## [9.2.4](https://github.com/serialport/node-serialport/compare/v9.2.3...v9.2.4) (2021-09-28) - -**Note:** Version bump only for package @serialport/binding-mock - - - - - -## [9.2.3](https://github.com/serialport/node-serialport/compare/v9.2.1...v9.2.3) (2021-09-24) - -**Note:** Version bump only for package @serialport/binding-mock - - - - - -## [9.2.2](https://github.com/serialport/node-serialport/compare/v9.2.1...v9.2.2) (2021-09-24) - -**Note:** Version bump only for package @serialport/binding-mock - - - - - -## [9.0.7](https://github.com/serialport/node-serialport/compare/v9.0.6...v9.0.7) (2021-02-22) - -**Note:** Version bump only for package @serialport/binding-mock - - - - - -## [9.0.2](https://github.com/serialport/node-serialport/compare/v9.0.1...v9.0.2) (2020-10-16) - -**Note:** Version bump only for package @serialport/binding-mock - - - - - -## [9.0.1](https://github.com/serialport/node-serialport/compare/v9.0.0...v9.0.1) (2020-08-08) - -**Note:** Version bump only for package @serialport/binding-mock - - - - - -# [9.0.0](https://github.com/serialport/node-serialport/compare/v8.0.8...v9.0.0) (2020-05-10) - -**Note:** Version bump only for package @serialport/binding-mock - - - - - -## [8.0.6](https://github.com/serialport/node-serialport/compare/v8.0.5...v8.0.6) (2019-12-25) - - -### Bug Fixes - -* bindings.close() should cause a canceled read error ([#1972](https://github.com/serialport/node-serialport/issues/1972)) ([50f967e](https://github.com/serialport/node-serialport/commit/50f967e788f362da57d782829712542c8f15f8c8)) diff --git a/packages/binding-mock/README.md b/packages/binding-mock/README.md index 9040ea9c5..053558a9e 100644 --- a/packages/binding-mock/README.md +++ b/packages/binding-mock/README.md @@ -1,6 +1,3 @@ # @serialport/binding-mock -```ts -import { MockBinding } from '@serialport/binding-mock' -const MockBinding = new MockBinding() -``` +The code for this package has been moved out of the monorepo to it's [own repository](https://github.com/serialport/binding-mock/). diff --git a/packages/binding-mock/lib/index.test.ts b/packages/binding-mock/lib/index.test.ts deleted file mode 100644 index 766e4d781..000000000 --- a/packages/binding-mock/lib/index.test.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { MockBinding } from './' -import { OpenOptions } from '@serialport/bindings-interface' -import { assert, shouldReject } from '../../../test/assert' - -const openOptions: OpenOptions = { - path: '/dev/exists', - baudRate: 9600, - dataBits: 8, - lock: false, - stopBits: 1, - parity: 'none', - rtscts: false, - xon: false, - xoff: false, - xany: false, - hupcl: false, -} - -describe('MockBinding', () => { - afterEach(() => { - MockBinding.reset() - }) - - describe('instance method', () => { - describe('open', () => { - describe('when phony port not created', () => { - it('should reject', async () => { - await shouldReject(MockBinding.open(openOptions)) - }) - }) - - describe('when phony port created', () => { - beforeEach(() => { - MockBinding.createPort('/dev/exists') - }) - - it('should open the phony port', async () => { - const port = await MockBinding.open(openOptions) - assert.isTrue(port.isOpen) - }) - - it('should have a "port" prop with "info.serialNumber" prop', async () => { - const port = await MockBinding.open(openOptions) - assert.strictEqual(port.port.info.serialNumber, '1') - }) - }) - }) - }) - - describe('static method', () => { - describe('createPort', () => { - it('should increment the serialNumber', async () => { - MockBinding.createPort('/dev/exists') - MockBinding.createPort('/dev/ttyUSB1') - const port1 = await MockBinding.open(openOptions) - const port2 = await MockBinding.open({ ...openOptions, path: '/dev/ttyUSB1' }) - assert.strictEqual(port1.port.info.serialNumber, '1') - assert.strictEqual(port2.port.info.serialNumber, '2') - }) - }) - describe('reset', () => { - beforeEach(async () => { - MockBinding.createPort('/dev/exists') - const port = await MockBinding.open(openOptions) - assert.strictEqual(port.port?.info.serialNumber, '1') - await port.close() - }) - - it('should delete any configured phony ports', async () => { - MockBinding.reset() - await shouldReject(MockBinding.open(openOptions)) - }) - - it('should reset the serialNumber assigned to the phony port', async () => { - MockBinding.reset() - MockBinding.createPort('/dev/exists') - const port = await MockBinding.open(openOptions) - assert.strictEqual(port.port.info.serialNumber, '1') - }) - }) - }) -}) diff --git a/packages/binding-mock/lib/index.ts b/packages/binding-mock/lib/index.ts deleted file mode 100644 index 100c4de89..000000000 --- a/packages/binding-mock/lib/index.ts +++ /dev/null @@ -1,373 +0,0 @@ -import debugFactory from 'debug' -import { BindingInterface, BindingPortInterface, PortStatus, SetOptions, UpdateOptions, OpenOptions, PortInfo } from '@serialport/bindings-interface' -const debug = debugFactory('serialport/binding-mock') - -interface MockPortInternal { - data: Buffer - echo: boolean - record: boolean - info: PortInfo - maxReadSize: number - readyData?: Buffer - openOpt?: OpenOptions -} - -interface CreatePortOptions { - echo?: boolean - record?: boolean - readyData?: Buffer - maxReadSize?: number - manufacturer?: string - vendorId?: string - productId?: string -} - -let ports: { - [key: string]: MockPortInternal -} = {} -let serialNumber = 0 - -function resolveNextTick() { - return new Promise(resolve => process.nextTick(() => resolve())) -} - -export class CanceledError extends Error { - canceled: true - constructor(message: string) { - super(message) - this.canceled = true - } -} - -export interface MockBindingInterface extends BindingInterface { - reset(): void - createPort(path: string, opt?: CreatePortOptions): void -} - -export const MockBinding: MockBindingInterface = { - reset() { - ports = {} - serialNumber = 0 - }, - - // Create a mock port - createPort(path: string, options: CreatePortOptions = {}) { - serialNumber++ - const optWithDefaults = { - echo: false, - record: false, - manufacturer: 'The J5 Robotics Company', - vendorId: undefined, - productId: undefined, - maxReadSize: 1024, - ...options, - } - - ports[path] = { - data: Buffer.alloc(0), - echo: optWithDefaults.echo, - record: optWithDefaults.record, - readyData: optWithDefaults.readyData, - maxReadSize: optWithDefaults.maxReadSize, - info: { - path, - manufacturer: optWithDefaults.manufacturer, - serialNumber: `${serialNumber}`, - pnpId: undefined, - locationId: undefined, - vendorId: optWithDefaults.vendorId, - productId: optWithDefaults.productId, - }, - } - debug(serialNumber, 'created port', JSON.stringify({ path, opt: options })) - }, - - async list() { - debug(null, 'list') - return Object.values(ports).map(port => port.info) - }, - - async open(options) { - if (!options || typeof options !== 'object' || Array.isArray(options)) { - throw new TypeError('"options" is not an object') - } - - if (!options.path) { - throw new TypeError('"path" is not a valid port') - } - - if (!options.baudRate) { - throw new TypeError('"baudRate" is not a valid baudRate') - } - - const openOptions: Required = { - dataBits: 8, - lock: true, - stopBits: 1, - parity: 'none', - rtscts: false, - xon: false, - xoff: false, - xany: false, - hupcl: true, - ...options, - } - const { path } = openOptions - - debug(null, `open: opening path ${path}`) - - const port = ports[path] - await resolveNextTick() - if (!port) { - throw new Error(`Port does not exist - please call MockBinding.createPort('${path}') first`) - } - - const serialNumber = port.info.serialNumber - - if (port.openOpt?.lock) { - debug(serialNumber, `open: Port is locked cannot open`) - throw new Error('Port is locked cannot open') - } - - debug(serialNumber, `open: opened path ${path}`) - - port.openOpt = { ...openOptions } - - return new MockPortBinding(port, openOptions) - }, -} - -/** - * Mock bindings for pretend serialport access - */ -export class MockPortBinding implements BindingPortInterface { - readonly openOptions: Required - readonly port: MockPortInternal - private pendingRead: null | ((err: null | Error) => void) - lastWrite: null | Buffer - recording: Buffer - writeOperation: null | Promise - isOpen: boolean - serialNumber?: string - - constructor(port: MockPortInternal, openOptions: Required) { - this.port = port - this.openOptions = openOptions - this.pendingRead = null - this.isOpen = true - this.lastWrite = null - this.recording = Buffer.alloc(0) - this.writeOperation = null // in flight promise or null - this.serialNumber = port.info.serialNumber - - if (port.readyData) { - const data = port.readyData - process.nextTick(() => { - if (this.isOpen) { - debug(this.serialNumber, 'emitting ready data') - this.emitData(data) - } - }) - } - } - - // Emit data on a mock port - emitData(data: Buffer | string) { - if (!this.isOpen || !this.port) { - throw new Error('Port must be open to pretend to receive data') - } - const bufferData = Buffer.isBuffer(data) ? data : Buffer.from(data) - debug(this.serialNumber, 'emitting data - pending read:', Boolean(this.pendingRead)) - this.port.data = Buffer.concat([this.port.data, bufferData]) - if (this.pendingRead) { - process.nextTick(this.pendingRead) - this.pendingRead = null - } - } - - async close(): Promise { - debug(this.serialNumber, 'close') - if (!this.isOpen) { - throw new Error('Port is not open') - } - - const port = this.port - if (!port) { - throw new Error('already closed') - } - - port.openOpt = undefined - // reset data on close - port.data = Buffer.alloc(0) - debug(this.serialNumber, 'port is closed') - this.serialNumber = undefined - this.isOpen = false - if (this.pendingRead) { - this.pendingRead(new CanceledError('port is closed')) - } - } - - async read( - buffer: Buffer, - offset: number, - length: number - ): Promise<{ - buffer: Buffer - bytesRead: number - }> { - if (!Buffer.isBuffer(buffer)) { - throw new TypeError('"buffer" is not a Buffer') - } - - if (typeof offset !== 'number' || isNaN(offset)) { - throw new TypeError(`"offset" is not an integer got "${isNaN(offset) ? 'NaN' : typeof offset}"`) - } - - if (typeof length !== 'number' || isNaN(length)) { - throw new TypeError(`"length" is not an integer got "${isNaN(length) ? 'NaN' : typeof length}"`) - } - - if (buffer.length < offset + length) { - throw new Error('buffer is too small') - } - - if (!this.isOpen) { - throw new Error('Port is not open') - } - - debug(this.serialNumber, 'read', length, 'bytes') - await resolveNextTick() - if (!this.isOpen || !this.port) { - throw new CanceledError('Read canceled') - } - if (this.port.data.length <= 0) { - return new Promise((resolve, reject) => { - this.pendingRead = err => { - if (err) { - return reject(err) - } - this.read(buffer, offset, length).then(resolve, reject) - } - }) - } - - const lengthToRead = this.port.maxReadSize > length ? length : this.port.maxReadSize - - const data = this.port.data.slice(0, lengthToRead) - const bytesRead = data.copy(buffer, offset) - this.port.data = this.port.data.slice(lengthToRead) - debug(this.serialNumber, 'read', bytesRead, 'bytes') - return { bytesRead, buffer } - } - - async write(buffer: Buffer): Promise { - if (!Buffer.isBuffer(buffer)) { - throw new TypeError('"buffer" is not a Buffer') - } - - if (!this.isOpen || !this.port) { - debug('write', 'error port is not open') - throw new Error('Port is not open') - } - - debug(this.serialNumber, 'write', buffer.length, 'bytes') - if (this.writeOperation) { - throw new Error('Overlapping writes are not supported and should be queued by the serialport object') - } - this.writeOperation = (async () => { - await resolveNextTick() - if (!this.isOpen || !this.port) { - 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 - } - - async update(options: UpdateOptions): Promise { - if (typeof options !== 'object') { - throw TypeError('"options" is not an object') - } - - if (typeof options.baudRate !== 'number') { - throw new TypeError('"options.baudRate" is not a number') - } - - debug(this.serialNumber, 'update') - if (!this.isOpen || !this.port) { - throw new Error('Port is not open') - } - await resolveNextTick() - if (this.port.openOpt) { - this.port.openOpt.baudRate = options.baudRate - } - } - - async set(options: SetOptions): Promise { - if (typeof options !== 'object') { - throw new TypeError('"options" is not an object') - } - debug(this.serialNumber, 'set') - if (!this.isOpen) { - throw new Error('Port is not open') - } - await resolveNextTick() - } - - async get(): Promise { - debug(this.serialNumber, 'get') - if (!this.isOpen) { - throw new Error('Port is not open') - } - await resolveNextTick() - return { - cts: true, - dsr: false, - dcd: false, - } - } - - async getBaudRate(): Promise<{ baudRate: number }> { - debug(this.serialNumber, 'getBaudRate') - if (!this.isOpen || !this.port) { - throw new Error('Port is not open') - } - await resolveNextTick() - if (!this.port.openOpt?.baudRate) { - throw new Error('Internal Error') - } - return { - baudRate: this.port.openOpt.baudRate, - } - } - - async flush(): Promise { - debug(this.serialNumber, 'flush') - if (!this.isOpen || !this.port) { - throw new Error('Port is not open') - } - await resolveNextTick() - this.port.data = Buffer.alloc(0) - } - - async drain(): Promise { - debug(this.serialNumber, 'drain') - if (!this.isOpen) { - throw new Error('Port is not open') - } - await this.writeOperation - await resolveNextTick() - } -} diff --git a/packages/binding-mock/package-lock.json b/packages/binding-mock/package-lock.json deleted file mode 100644 index fc70271ef..000000000 --- a/packages/binding-mock/package-lock.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "@serialport/binding-mock", - "version": "10.2.1", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@serialport/binding-mock", - "version": "10.1.0", - "license": "MIT", - "dependencies": { - "@serialport/bindings-interface": "1.2.0", - "debug": "^4.3.2" - }, - "devDependencies": { - "typescript": "^4.5.5" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://opencollective.com/serialport/donate" - } - }, - "node_modules/@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==", - "engines": { - "node": "^12.22 || ^14.13 || >=16" - } - }, - "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - } - }, - "dependencies": { - "@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==" - }, - "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true - } - } -} diff --git a/packages/binding-mock/package.json b/packages/binding-mock/package.json deleted file mode 100644 index 991a9999d..000000000 --- a/packages/binding-mock/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@serialport/binding-mock", - "version": "10.2.1", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "keywords": [ - "serialport-binding", - "debug" - ], - "dependencies": { - "@serialport/bindings-interface": "1.2.0", - "debug": "^4.3.2" - }, - "devDependencies": { - "typescript": "^4.5.5" - }, - "engines": { - "node": ">=12.0.0" - }, - "publishConfig": { - "access": "public" - }, - "license": "MIT", - "scripts": { - "build": "tsc --build tsconfig-build.json" - }, - "repository": { - "type": "git", - "url": "git://github.com/serialport/node-serialport.git" - }, - "funding": "https://opencollective.com/serialport/donate" -} diff --git a/packages/binding-mock/tsconfig-build.json b/packages/binding-mock/tsconfig-build.json deleted file mode 100644 index 5442270f0..000000000 --- a/packages/binding-mock/tsconfig-build.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig-build.json", - "compilerOptions": { - "rootDir": "lib", - "outDir": "dist", - }, - "exclude": [ - "node_modules", - "**/*.test.ts", - "dist", - ] -} diff --git a/packages/binding-mock/tsconfig.json b/packages/binding-mock/tsconfig.json deleted file mode 100644 index 4082f16a5..000000000 --- a/packages/binding-mock/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.json" -} diff --git a/packages/list/package-lock.json b/packages/list/package-lock.json index 115d89e14..cd990609b 100644 --- a/packages/list/package-lock.json +++ b/packages/list/package-lock.json @@ -6,10 +6,10 @@ "packages": { "": { "name": "@serialport/list", - "version": "10.1.0", + "version": "10.2.1", "license": "MIT", "dependencies": { - "@serialport/bindings-cpp": "10.6.1", + "@serialport/bindings-cpp": "10.6.2", "commander": "^9.0.0" }, "bin": { @@ -26,13 +26,13 @@ } }, "node_modules/@serialport/bindings-cpp": { - "version": "10.6.1", - "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.1.tgz", - "integrity": "sha512-wlgiCoImyA0siK0Z1ziXFDv6Ua3Tko9vMyNPAMW/Ywk18vKVKPYvvGlYxhbdK9LGzGdqVXGWmEW15R/S+anzQQ==", + "version": "10.6.2", + "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.2.tgz", + "integrity": "sha512-vhId2K4Y4WOgy/UJE8NOHX6GZpozORCCMh6GM5UQeIzXihoYLxt4eomgl1eXasFipcRs06n71lAToqixb7NPpA==", "hasInstallScript": true, "dependencies": { - "@serialport/bindings-interface": "1.2.0", - "@serialport/parser-readline": "10.0.1", + "@serialport/bindings-interface": "1.2.1", + "@serialport/parser-readline": "^10.2.1", "debug": "^4.3.2", "node-addon-api": "^4.3.0", "node-gyp-build": "^4.3.0" @@ -45,17 +45,17 @@ } }, "node_modules/@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", + "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==", "engines": { "node": "^12.22 || ^14.13 || >=16" } }, "node_modules/@serialport/parser-delimiter": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.0.1.tgz", - "integrity": "sha512-B0c6dm9UCpRU/LhkvRFL3OSbs69VqWU7mjW7tM109JDNS+vw8uJPumXz8Giub6D0xl90J7euH6tBTqERk7048Q==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.2.1.tgz", + "integrity": "sha512-aBLgoLuqmBWddm1qxlqTagVSXe8DJqrMDYjCaVlyyCOj125EOCJBbKtMTkE58QP7Pv6pLAFb0OQ8kzgPKK7yXQ==", "engines": { "node": ">=12.0.0" }, @@ -64,11 +64,11 @@ } }, "node_modules/@serialport/parser-readline": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.0.1.tgz", - "integrity": "sha512-jdKPNka/Nn17k89T5UIyis39EaZHQCmq+83s0icBt2iPBlX8+BrJAUBe8myFpuT22qskTVNzFoTMPOp8pjK/yw==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.2.1.tgz", + "integrity": "sha512-cUU2X8zBGq8o4H468QWQSTeMhpMSAtUREwqi8t3lWhO64T3Fu6dHMri/ebDy3kod4V+gT7hWe9Dc20/WUJpSCA==", "dependencies": { - "@serialport/parser-delimiter": "10.0.1" + "@serialport/parser-delimiter": "10.2.1" }, "engines": { "node": ">=12.0.0" @@ -137,33 +137,33 @@ }, "dependencies": { "@serialport/bindings-cpp": { - "version": "10.6.1", - "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.1.tgz", - "integrity": "sha512-wlgiCoImyA0siK0Z1ziXFDv6Ua3Tko9vMyNPAMW/Ywk18vKVKPYvvGlYxhbdK9LGzGdqVXGWmEW15R/S+anzQQ==", + "version": "10.6.2", + "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.2.tgz", + "integrity": "sha512-vhId2K4Y4WOgy/UJE8NOHX6GZpozORCCMh6GM5UQeIzXihoYLxt4eomgl1eXasFipcRs06n71lAToqixb7NPpA==", "requires": { - "@serialport/bindings-interface": "1.2.0", - "@serialport/parser-readline": "10.0.1", + "@serialport/bindings-interface": "1.2.1", + "@serialport/parser-readline": "^10.2.1", "debug": "^4.3.2", "node-addon-api": "^4.3.0", "node-gyp-build": "^4.3.0" } }, "@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", + "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==" }, "@serialport/parser-delimiter": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.0.1.tgz", - "integrity": "sha512-B0c6dm9UCpRU/LhkvRFL3OSbs69VqWU7mjW7tM109JDNS+vw8uJPumXz8Giub6D0xl90J7euH6tBTqERk7048Q==" + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.2.1.tgz", + "integrity": "sha512-aBLgoLuqmBWddm1qxlqTagVSXe8DJqrMDYjCaVlyyCOj125EOCJBbKtMTkE58QP7Pv6pLAFb0OQ8kzgPKK7yXQ==" }, "@serialport/parser-readline": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.0.1.tgz", - "integrity": "sha512-jdKPNka/Nn17k89T5UIyis39EaZHQCmq+83s0icBt2iPBlX8+BrJAUBe8myFpuT22qskTVNzFoTMPOp8pjK/yw==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.2.1.tgz", + "integrity": "sha512-cUU2X8zBGq8o4H468QWQSTeMhpMSAtUREwqi8t3lWhO64T3Fu6dHMri/ebDy3kod4V+gT7hWe9Dc20/WUJpSCA==", "requires": { - "@serialport/parser-delimiter": "10.0.1" + "@serialport/parser-delimiter": "10.2.1" } }, "commander": { diff --git a/packages/list/package.json b/packages/list/package.json index 184f7dbd6..cda523c73 100644 --- a/packages/list/package.json +++ b/packages/list/package.json @@ -10,7 +10,7 @@ "build": "tsc --build tsconfig-build.json" }, "dependencies": { - "@serialport/bindings-cpp": "10.6.1", + "@serialport/bindings-cpp": "10.6.2", "commander": "^9.0.0" }, "engines": { diff --git a/packages/parser-byte-length/package-lock.json b/packages/parser-byte-length/package-lock.json index 54865ecdb..814846434 100644 --- a/packages/parser-byte-length/package-lock.json +++ b/packages/parser-byte-length/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/parser-byte-length", - "version": "10.0.1", + "version": "10.2.1", "license": "MIT", "devDependencies": { "typescript": "^4.5.5" diff --git a/packages/parser-cctalk/package-lock.json b/packages/parser-cctalk/package-lock.json index fa1dd512f..24dad5c28 100644 --- a/packages/parser-cctalk/package-lock.json +++ b/packages/parser-cctalk/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/parser-cctalk", - "version": "10.0.1", + "version": "10.2.1", "license": "MIT", "devDependencies": { "typescript": "^4.5.5" diff --git a/packages/parser-delimiter/package-lock.json b/packages/parser-delimiter/package-lock.json index e6ed63323..ae658afe2 100644 --- a/packages/parser-delimiter/package-lock.json +++ b/packages/parser-delimiter/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/parser-delimiter", - "version": "10.0.1", + "version": "10.2.1", "license": "MIT", "devDependencies": { "typescript": "^4.5.5" diff --git a/packages/parser-inter-byte-timeout/package-lock.json b/packages/parser-inter-byte-timeout/package-lock.json index 976e801eb..d30ecc5f3 100644 --- a/packages/parser-inter-byte-timeout/package-lock.json +++ b/packages/parser-inter-byte-timeout/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/parser-inter-byte-timeout", - "version": "10.0.1", + "version": "10.2.1", "license": "MIT", "devDependencies": { "typescript": "^4.5.5" diff --git a/packages/parser-packet-length/package-lock.json b/packages/parser-packet-length/package-lock.json index d2b99ce1d..a63f87c9d 100644 --- a/packages/parser-packet-length/package-lock.json +++ b/packages/parser-packet-length/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/parser-packet-length", - "version": "10.0.0", + "version": "10.2.1", "license": "MIT", "devDependencies": { "typescript": "^4.5.5" diff --git a/packages/parser-readline/package-lock.json b/packages/parser-readline/package-lock.json index 9cec53a30..8b930c480 100644 --- a/packages/parser-readline/package-lock.json +++ b/packages/parser-readline/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/parser-readline", - "version": "10.0.1", + "version": "10.2.1", "license": "MIT", "devDependencies": { "typescript": "^4.5.5" diff --git a/packages/parser-ready/package-lock.json b/packages/parser-ready/package-lock.json index 6b124c04c..e92b82c7e 100644 --- a/packages/parser-ready/package-lock.json +++ b/packages/parser-ready/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/parser-ready", - "version": "10.0.1", + "version": "10.2.1", "license": "MIT", "devDependencies": { "typescript": "^4.5.5" diff --git a/packages/parser-regex/package-lock.json b/packages/parser-regex/package-lock.json index 91c1e9e80..ccb9d3278 100644 --- a/packages/parser-regex/package-lock.json +++ b/packages/parser-regex/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/parser-regex", - "version": "10.0.1", + "version": "10.2.1", "license": "MIT", "devDependencies": { "typescript": "^4.5.5" diff --git a/packages/parser-slip-encoder/package-lock.json b/packages/parser-slip-encoder/package-lock.json index 684a76e54..553bd2052 100644 --- a/packages/parser-slip-encoder/package-lock.json +++ b/packages/parser-slip-encoder/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/parser-slip-encoder", - "version": "10.0.1", + "version": "10.2.1", "license": "MIT", "devDependencies": { "typescript": "^4.5.5" diff --git a/packages/parser-spacepacket/package-lock.json b/packages/parser-spacepacket/package-lock.json index a73e9d055..266538c89 100644 --- a/packages/parser-spacepacket/package-lock.json +++ b/packages/parser-spacepacket/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/parser-spacepacket", - "version": "10.0.1", + "version": "10.2.1", "license": "MIT", "devDependencies": { "typescript": "^4.5.5" diff --git a/packages/repl/package-lock.json b/packages/repl/package-lock.json index ead1d6f0a..8c6e13765 100644 --- a/packages/repl/package-lock.json +++ b/packages/repl/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@serialport/repl", - "version": "10.1.0", + "version": "10.2.1", "license": "MIT", "dependencies": { "promirepl": "^2.0.1" diff --git a/packages/serialport/package-lock.json b/packages/serialport/package-lock.json index 90786a6f4..d34a04cae 100644 --- a/packages/serialport/package-lock.json +++ b/packages/serialport/package-lock.json @@ -6,10 +6,11 @@ "packages": { "": { "name": "serialport", - "version": "10.1.0", + "version": "10.2.1", "license": "MIT", "dependencies": { - "@serialport/bindings-cpp": "10.6.1", + "@serialport/binding-mock": "10.2.2", + "@serialport/bindings-cpp": "10.6.2", "debug": "^4.3.2" }, "devDependencies": { @@ -22,14 +23,26 @@ "url": "https://opencollective.com/serialport/donate" } }, + "node_modules/@serialport/binding-mock": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-10.2.2.tgz", + "integrity": "sha512-HAFzGhk9OuFMpuor7aT5G1ChPgn5qSsklTFOTUX72Rl6p0xwcSVsRtG/xaGp6bxpN7fI9D/S8THLBWbBgS6ldw==", + "dependencies": { + "@serialport/bindings-interface": "^1.2.1", + "debug": "^4.3.3" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/@serialport/bindings-cpp": { - "version": "10.6.1", - "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.1.tgz", - "integrity": "sha512-wlgiCoImyA0siK0Z1ziXFDv6Ua3Tko9vMyNPAMW/Ywk18vKVKPYvvGlYxhbdK9LGzGdqVXGWmEW15R/S+anzQQ==", + "version": "10.6.2", + "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.2.tgz", + "integrity": "sha512-vhId2K4Y4WOgy/UJE8NOHX6GZpozORCCMh6GM5UQeIzXihoYLxt4eomgl1eXasFipcRs06n71lAToqixb7NPpA==", "hasInstallScript": true, "dependencies": { - "@serialport/bindings-interface": "1.2.0", - "@serialport/parser-readline": "10.0.1", + "@serialport/bindings-interface": "1.2.1", + "@serialport/parser-readline": "^10.2.1", "debug": "^4.3.2", "node-addon-api": "^4.3.0", "node-gyp-build": "^4.3.0" @@ -42,17 +55,17 @@ } }, "node_modules/@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", + "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==", "engines": { "node": "^12.22 || ^14.13 || >=16" } }, "node_modules/@serialport/parser-delimiter": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.0.1.tgz", - "integrity": "sha512-B0c6dm9UCpRU/LhkvRFL3OSbs69VqWU7mjW7tM109JDNS+vw8uJPumXz8Giub6D0xl90J7euH6tBTqERk7048Q==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.2.1.tgz", + "integrity": "sha512-aBLgoLuqmBWddm1qxlqTagVSXe8DJqrMDYjCaVlyyCOj125EOCJBbKtMTkE58QP7Pv6pLAFb0OQ8kzgPKK7yXQ==", "engines": { "node": ">=12.0.0" }, @@ -61,11 +74,11 @@ } }, "node_modules/@serialport/parser-readline": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.0.1.tgz", - "integrity": "sha512-jdKPNka/Nn17k89T5UIyis39EaZHQCmq+83s0icBt2iPBlX8+BrJAUBe8myFpuT22qskTVNzFoTMPOp8pjK/yw==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.2.1.tgz", + "integrity": "sha512-cUU2X8zBGq8o4H468QWQSTeMhpMSAtUREwqi8t3lWhO64T3Fu6dHMri/ebDy3kod4V+gT7hWe9Dc20/WUJpSCA==", "dependencies": { - "@serialport/parser-delimiter": "10.0.1" + "@serialport/parser-delimiter": "10.2.1" }, "engines": { "node": ">=12.0.0" @@ -125,34 +138,43 @@ } }, "dependencies": { + "@serialport/binding-mock": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-10.2.2.tgz", + "integrity": "sha512-HAFzGhk9OuFMpuor7aT5G1ChPgn5qSsklTFOTUX72Rl6p0xwcSVsRtG/xaGp6bxpN7fI9D/S8THLBWbBgS6ldw==", + "requires": { + "@serialport/bindings-interface": "^1.2.1", + "debug": "^4.3.3" + } + }, "@serialport/bindings-cpp": { - "version": "10.6.1", - "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.1.tgz", - "integrity": "sha512-wlgiCoImyA0siK0Z1ziXFDv6Ua3Tko9vMyNPAMW/Ywk18vKVKPYvvGlYxhbdK9LGzGdqVXGWmEW15R/S+anzQQ==", + "version": "10.6.2", + "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.2.tgz", + "integrity": "sha512-vhId2K4Y4WOgy/UJE8NOHX6GZpozORCCMh6GM5UQeIzXihoYLxt4eomgl1eXasFipcRs06n71lAToqixb7NPpA==", "requires": { - "@serialport/bindings-interface": "1.2.0", - "@serialport/parser-readline": "10.0.1", + "@serialport/bindings-interface": "1.2.1", + "@serialport/parser-readline": "^10.2.1", "debug": "^4.3.2", "node-addon-api": "^4.3.0", "node-gyp-build": "^4.3.0" } }, "@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", + "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==" }, "@serialport/parser-delimiter": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.0.1.tgz", - "integrity": "sha512-B0c6dm9UCpRU/LhkvRFL3OSbs69VqWU7mjW7tM109JDNS+vw8uJPumXz8Giub6D0xl90J7euH6tBTqERk7048Q==" + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.2.1.tgz", + "integrity": "sha512-aBLgoLuqmBWddm1qxlqTagVSXe8DJqrMDYjCaVlyyCOj125EOCJBbKtMTkE58QP7Pv6pLAFb0OQ8kzgPKK7yXQ==" }, "@serialport/parser-readline": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.0.1.tgz", - "integrity": "sha512-jdKPNka/Nn17k89T5UIyis39EaZHQCmq+83s0icBt2iPBlX8+BrJAUBe8myFpuT22qskTVNzFoTMPOp8pjK/yw==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.2.1.tgz", + "integrity": "sha512-cUU2X8zBGq8o4H468QWQSTeMhpMSAtUREwqi8t3lWhO64T3Fu6dHMri/ebDy3kod4V+gT7hWe9Dc20/WUJpSCA==", "requires": { - "@serialport/parser-delimiter": "10.0.1" + "@serialport/parser-delimiter": "10.2.1" } }, "debug": { diff --git a/packages/serialport/package.json b/packages/serialport/package.json index 529a2a4ec..fcc7991ad 100644 --- a/packages/serialport/package.json +++ b/packages/serialport/package.json @@ -50,8 +50,8 @@ } ], "dependencies": { - "@serialport/binding-mock": "10.2.1", - "@serialport/bindings-cpp": "10.6.1", + "@serialport/binding-mock": "10.2.2", + "@serialport/bindings-cpp": "10.6.2", "@serialport/parser-byte-length": "10.2.1", "@serialport/parser-cctalk": "10.2.1", "@serialport/parser-delimiter": "10.2.1", diff --git a/packages/serialport/tsconfig-build.json b/packages/serialport/tsconfig-build.json index 8284cd1f2..09cc9bab9 100644 --- a/packages/serialport/tsconfig-build.json +++ b/packages/serialport/tsconfig-build.json @@ -13,7 +13,6 @@ "dist", ], "references": [ - { "path": "../binding-mock/tsconfig-build.json"}, { "path": "../parser-byte-length/tsconfig-build.json"}, { "path": "../parser-cctalk/tsconfig-build.json"}, { "path": "../parser-delimiter/tsconfig-build.json"}, diff --git a/packages/stream/package-lock.json b/packages/stream/package-lock.json index 736323510..b6883cca0 100644 --- a/packages/stream/package-lock.json +++ b/packages/stream/package-lock.json @@ -1,94 +1,118 @@ { - "name": "@serialport/stream", - "version": "10.2.1", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@serialport/stream", - "version": "10.1.0", - "license": "MIT", - "dependencies": { - "@serialport/bindings-interface": "1.2.0", - "debug": "^4.3.2" - }, - "devDependencies": { - "typescript": "^4.5.5" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://opencollective.com/serialport/donate" - } - }, - "node_modules/@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==", - "engines": { - "node": "^12.22 || ^14.13 || >=16" - } - }, - "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - } - }, - "dependencies": { - "@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==" - }, - "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", - "dev": true - } - } + "name": "@serialport/stream", + "version": "10.2.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "@serialport/stream", + "version": "10.2.1", + "license": "MIT", + "dependencies": { + "@serialport/bindings-interface": "1.2.1", + "debug": "^4.3.2" + }, + "devDependencies": { + "@serialport/binding-mock": "^10.2.2", + "typescript": "^4.5.5" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/serialport/donate" + } + }, + "node_modules/@serialport/binding-mock": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-10.2.2.tgz", + "integrity": "sha512-HAFzGhk9OuFMpuor7aT5G1ChPgn5qSsklTFOTUX72Rl6p0xwcSVsRtG/xaGp6bxpN7fI9D/S8THLBWbBgS6ldw==", + "dev": true, + "dependencies": { + "@serialport/bindings-interface": "^1.2.1", + "debug": "^4.3.3" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@serialport/bindings-interface": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", + "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==", + "engines": { + "node": "^12.22 || ^14.13 || >=16" + } + }, + "node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + } + }, + "dependencies": { + "@serialport/binding-mock": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-10.2.2.tgz", + "integrity": "sha512-HAFzGhk9OuFMpuor7aT5G1ChPgn5qSsklTFOTUX72Rl6p0xwcSVsRtG/xaGp6bxpN7fI9D/S8THLBWbBgS6ldw==", + "dev": true, + "requires": { + "@serialport/bindings-interface": "^1.2.1", + "debug": "^4.3.3" + } + }, + "@serialport/bindings-interface": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", + "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==" + }, + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true + } + } } diff --git a/packages/stream/package.json b/packages/stream/package.json index de94b25fc..c8b487183 100644 --- a/packages/stream/package.json +++ b/packages/stream/package.json @@ -7,10 +7,11 @@ "build": "tsc --build tsconfig-build.json" }, "dependencies": { - "@serialport/bindings-interface": "1.2.0", + "@serialport/bindings-interface": "1.2.1", "debug": "^4.3.2" }, "devDependencies": { + "@serialport/binding-mock": "^10.2.2", "typescript": "^4.5.5" }, "engines": { diff --git a/packages/terminal/lib/index.ts b/packages/terminal/lib/index.ts index 890a46b9d..7dba606db 100755 --- a/packages/terminal/lib/index.ts +++ b/packages/terminal/lib/index.ts @@ -2,9 +2,9 @@ import Enquirer from 'enquirer' import { program } from 'commander' -import { SerialPortStream } from '@serialport/stream' +import { SerialPortStream, OpenOptions } from '@serialport/stream' import { OutputTranslator } from './output-translator' -import { autoDetect } from '@serialport/bindings-cpp' +import { autoDetect, AutoDetectTypes } from '@serialport/bindings-cpp' const { version } = require('../package.json') const binding = autoDetect() @@ -31,7 +31,7 @@ const args = program.opts<{ baud: number databits: 8 | 7 | 6 | 5 parity: string - stopbits: 1 | 2 | 3 + stopbits: 1 | 1.5 | 2 echo: boolean flowCtl?: string }>() @@ -67,7 +67,7 @@ const askForPort = async () => { const createPort = (path: string) => { console.log(`Opening serial port: ${path} echo: ${args.echo}`) - const openOptions = { + const openOptions: OpenOptions = { path, binding, baudRate: args.baud, diff --git a/packages/terminal/package-lock.json b/packages/terminal/package-lock.json index d480b7c38..3a48840cc 100644 --- a/packages/terminal/package-lock.json +++ b/packages/terminal/package-lock.json @@ -6,10 +6,10 @@ "packages": { "": { "name": "@serialport/terminal", - "version": "10.1.0", + "version": "10.2.1", "license": "MIT", "dependencies": { - "@serialport/bindings-cpp": "10.6.1", + "@serialport/bindings-cpp": "10.6.2", "commander": "9.0.0", "enquirer": "2.3.6" }, @@ -27,13 +27,13 @@ } }, "node_modules/@serialport/bindings-cpp": { - "version": "10.6.1", - "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.1.tgz", - "integrity": "sha512-wlgiCoImyA0siK0Z1ziXFDv6Ua3Tko9vMyNPAMW/Ywk18vKVKPYvvGlYxhbdK9LGzGdqVXGWmEW15R/S+anzQQ==", + "version": "10.6.2", + "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.2.tgz", + "integrity": "sha512-vhId2K4Y4WOgy/UJE8NOHX6GZpozORCCMh6GM5UQeIzXihoYLxt4eomgl1eXasFipcRs06n71lAToqixb7NPpA==", "hasInstallScript": true, "dependencies": { - "@serialport/bindings-interface": "1.2.0", - "@serialport/parser-readline": "10.0.1", + "@serialport/bindings-interface": "1.2.1", + "@serialport/parser-readline": "^10.2.1", "debug": "^4.3.2", "node-addon-api": "^4.3.0", "node-gyp-build": "^4.3.0" @@ -46,17 +46,17 @@ } }, "node_modules/@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", + "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==", "engines": { "node": "^12.22 || ^14.13 || >=16" } }, "node_modules/@serialport/parser-delimiter": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.0.1.tgz", - "integrity": "sha512-B0c6dm9UCpRU/LhkvRFL3OSbs69VqWU7mjW7tM109JDNS+vw8uJPumXz8Giub6D0xl90J7euH6tBTqERk7048Q==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.2.1.tgz", + "integrity": "sha512-aBLgoLuqmBWddm1qxlqTagVSXe8DJqrMDYjCaVlyyCOj125EOCJBbKtMTkE58QP7Pv6pLAFb0OQ8kzgPKK7yXQ==", "engines": { "node": ">=12.0.0" }, @@ -65,11 +65,11 @@ } }, "node_modules/@serialport/parser-readline": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.0.1.tgz", - "integrity": "sha512-jdKPNka/Nn17k89T5UIyis39EaZHQCmq+83s0icBt2iPBlX8+BrJAUBe8myFpuT22qskTVNzFoTMPOp8pjK/yw==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.2.1.tgz", + "integrity": "sha512-cUU2X8zBGq8o4H468QWQSTeMhpMSAtUREwqi8t3lWhO64T3Fu6dHMri/ebDy3kod4V+gT7hWe9Dc20/WUJpSCA==", "dependencies": { - "@serialport/parser-delimiter": "10.0.1" + "@serialport/parser-delimiter": "10.2.1" }, "engines": { "node": ">=12.0.0" @@ -157,33 +157,33 @@ }, "dependencies": { "@serialport/bindings-cpp": { - "version": "10.6.1", - "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.1.tgz", - "integrity": "sha512-wlgiCoImyA0siK0Z1ziXFDv6Ua3Tko9vMyNPAMW/Ywk18vKVKPYvvGlYxhbdK9LGzGdqVXGWmEW15R/S+anzQQ==", + "version": "10.6.2", + "resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-10.6.2.tgz", + "integrity": "sha512-vhId2K4Y4WOgy/UJE8NOHX6GZpozORCCMh6GM5UQeIzXihoYLxt4eomgl1eXasFipcRs06n71lAToqixb7NPpA==", "requires": { - "@serialport/bindings-interface": "1.2.0", - "@serialport/parser-readline": "10.0.1", + "@serialport/bindings-interface": "1.2.1", + "@serialport/parser-readline": "^10.2.1", "debug": "^4.3.2", "node-addon-api": "^4.3.0", "node-gyp-build": "^4.3.0" } }, "@serialport/bindings-interface": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.0.tgz", - "integrity": "sha512-TLg6z0wyEdfVBIGmRwv0oru7Ijdc3VhH5SDv+q7UXuXvNh+mEpsFedHG205GSGVXbnF1xlCN5cBSMloI74N/gQ==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.1.tgz", + "integrity": "sha512-63Dyqz2gtryRDDckFusOYqLYhR3Hq/M4sEdbF9i/VsvDb6T+tNVgoAKUZ+FMrXXKnCSu+hYbk+MTc0XQANszxw==" }, "@serialport/parser-delimiter": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.0.1.tgz", - "integrity": "sha512-B0c6dm9UCpRU/LhkvRFL3OSbs69VqWU7mjW7tM109JDNS+vw8uJPumXz8Giub6D0xl90J7euH6tBTqERk7048Q==" + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.2.1.tgz", + "integrity": "sha512-aBLgoLuqmBWddm1qxlqTagVSXe8DJqrMDYjCaVlyyCOj125EOCJBbKtMTkE58QP7Pv6pLAFb0OQ8kzgPKK7yXQ==" }, "@serialport/parser-readline": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.0.1.tgz", - "integrity": "sha512-jdKPNka/Nn17k89T5UIyis39EaZHQCmq+83s0icBt2iPBlX8+BrJAUBe8myFpuT22qskTVNzFoTMPOp8pjK/yw==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.2.1.tgz", + "integrity": "sha512-cUU2X8zBGq8o4H468QWQSTeMhpMSAtUREwqi8t3lWhO64T3Fu6dHMri/ebDy3kod4V+gT7hWe9Dc20/WUJpSCA==", "requires": { - "@serialport/parser-delimiter": "10.0.1" + "@serialport/parser-delimiter": "10.2.1" } }, "ansi-colors": { diff --git a/packages/terminal/package.json b/packages/terminal/package.json index eaa3a3873..aa03ab11b 100644 --- a/packages/terminal/package.json +++ b/packages/terminal/package.json @@ -10,7 +10,7 @@ "serialport-terminal": "./dist/index.js" }, "dependencies": { - "@serialport/bindings-cpp": "10.6.1", + "@serialport/bindings-cpp": "10.6.2", "@serialport/stream": "10.2.1", "commander": "9.0.0", "enquirer": "2.3.6"