Socket
Socket
Sign inDemoInstall

usb

Package Overview
Dependencies
Maintainers
3
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

usb - npm Package Compare versions

Comparing version 2.4.2 to 2.4.3

5

CHANGELOG.md
# Changelog
## [2.4.3] - 2022-06-21
### Fixed
- Fixed poll transfer tracking - [`522`](https://github.com/node-usb/node-usb/pull/522) ([Rob Moran](https://github.com/thegecko))
## [2.4.2] - 2022-05-27

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

2

dist/usb/endpoint.d.ts

@@ -35,3 +35,3 @@ /// <reference types="node" />

direction: 'in' | 'out';
protected pollTransfers: Transfer[] | undefined;
protected pollTransfers: Transfer[];
protected pollTransferSize: number;

@@ -38,0 +38,0 @@ protected pollPending: number;

@@ -61,2 +61,3 @@ "use strict";

_this.direction = 'in';
_this.pollTransfers = [];
_this.pollTransferSize = 0;

@@ -119,2 +120,3 @@ _this.pollPending = 0;

_this.pollTransfers = [];
_this.pollActive = false;
_this.emit('end');

@@ -145,3 +147,3 @@ }

if (transferSize === void 0) { transferSize = this.descriptor.wMaxPacketSize; }
if (this.pollTransfers) {
if (this.pollActive) {
throw new Error('Polling already active');

@@ -168,3 +170,3 @@ }

InEndpoint.prototype.stopPoll = function (callback) {
if (!this.pollTransfers) {
if (!this.pollActive) {
throw new Error('Polling is not active.');

@@ -171,0 +173,0 @@ }

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "2.4.2",
"version": "2.4.3",
"main": "dist/index.js",

@@ -8,0 +8,0 @@ "engines": {

@@ -55,3 +55,3 @@ import { EventEmitter } from 'events';

protected pollTransfers: Transfer[] | undefined;
protected pollTransfers: Transfer[] = [];
protected pollTransferSize = 0;

@@ -117,2 +117,3 @@ protected pollPending = 0;

this.pollTransfers = [];
this.pollActive = false;
this.emit('end');

@@ -143,3 +144,3 @@ }

protected startPollTransfers(nTransfers = 3, transferSize = this.descriptor.wMaxPacketSize, callback: (error: LibUSBException | undefined, buffer: Buffer, actualLength: number) => void): Transfer[] {
if (this.pollTransfers) {
if (this.pollActive) {
throw new Error('Polling already active');

@@ -169,3 +170,3 @@ }

public stopPoll(callback?: () => void): void {
if (!this.pollTransfers) {
if (!this.pollActive) {
throw new Error('Polling is not active.');

@@ -172,0 +173,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