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
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
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
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
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
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
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
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
+4
-4
| { | ||
| "name": "node-hid", | ||
| "description": "USB HID device access library", | ||
| "version": "0.7.3", | ||
| "version": "0.7.4", | ||
| "author": "Hans Hübner <hans.huebner@gmail.com> (https://github.com/hanshuebner)", | ||
@@ -36,3 +36,3 @@ "bugs": "https://github.com/node-hid/node-hid/issues", | ||
| "engines": { | ||
| "node": ">=4.0.0" | ||
| "node": ">=6.0.0" | ||
| }, | ||
@@ -43,6 +43,6 @@ "license": "(MIT OR X11)", | ||
| "nan": "^2.10.0", | ||
| "prebuild-install": "^4.0.0" | ||
| "prebuild-install": "^5.2.1" | ||
| }, | ||
| "devDependencies": { | ||
| "prebuild": "^7.6.0", | ||
| "prebuild": "^8.1.2", | ||
| "prebuild-ci": "^2.2.3", | ||
@@ -49,0 +49,0 @@ "rimraf": "^2.6.2" |
+3
-1
@@ -6,3 +6,5 @@ How to publish node-hid | ||
| On MacOSX, Windows, Linux, do: | ||
| First, make sure version is bumped to new version. (if code change) | ||
| Then, on each of MacOSX, Windows, Linux, do: | ||
| ``` | ||
@@ -9,0 +11,0 @@ git clone https://github.com/node-hid/node-hid.git |
+30
-14
@@ -16,2 +16,3 @@ # node-hid - Access USB HID devices from Node.js # | ||
| * [List all HID devices connected](#list-all-hid-devices-connected) | ||
| * [Cost of HID.devices() and new HID.HID()](#cost-of-hiddevices-and-new-hidhid-for-detecting-device-plugunplug) | ||
| * [Opening a device](#opening-a-device) | ||
@@ -66,14 +67,14 @@ * [Picking a device from the device list](#picking-a-device-from-the-device-list) | ||
| | Platform / Arch | Node v4.x | Node v6.x | Node v7.x | Node v8.x | Node v9.x | Node v10.x | ||
| | --- | --- | --- | --- | --- | --- | --- | | ||
| | Windows / x86 | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ | | ||
| | Windows / x64 | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ | | ||
| | Mac OSX / x64 | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ | | ||
| | Linux / x64 | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ | | ||
| | Linux / ia32¹ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Linux / ARM v6¹ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Linux / ARM v7¹ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Linux / ARM v8¹ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Linux / MIPSel¹ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Linux / PPC64¹ | ☐ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Platform / Arch | Node v6.x | Node v7.x | Node v8.x | Node v9.x | Node v10.x | ||
| | --- | --- | --- | --- | --- | --- | | ||
| | Windows / x86 | ☑ | ☑ | ☑ | ☑ | ☑ | | ||
| | Windows / x64 | ☑ | ☑ | ☑ | ☑ | ☑ | | ||
| | Mac OSX / x64 | ☑ | ☑ | ☑ | ☑ | ☑ | | ||
| | Linux / x64 | ☑ | ☑ | ☑ | ☑ | ☑ | | ||
| | Linux / ia32¹ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Linux / ARM v6¹ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Linux / ARM v7¹ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Linux / ARM v8¹ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Linux / MIPSel¹ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
| | Linux / PPC64¹ | ☐ | ☐ | ☐ | ☐ | ☐ | | ||
@@ -174,2 +175,7 @@ ¹ ia32, ARM, MIPSel and PPC64 platforms are known to work but are not currently part of our test or build matrix. ARM v4 and v5 was dropped from Node.js after Node v0.10. | ||
| #### Cost of `HID.devices()` and `new HID.HID()` for detecting device plug/unplug | ||
| Both `HID.devices()` and `new HID.HID()` are relatively costly, each causing a USB (and potentially Bluetooth) enumeration. This takes time and OS resources. Doing either can slow down the read/write that you do in parallel with a device, and cause other USB devices to slow down too. This is how USB works. | ||
| If you are polling `HID.devices()` or doing repeated `new HID.HID(vid,pid)` to detect device plug / unplug, consider instead using [node-usb-detection](https://github.com/MadLittleMods/node-usb-detection). `node-usb-detection` uses OS-specific, non-bus enumeration ways to detect device plug / unplug. | ||
| ### Opening a device | ||
@@ -194,2 +200,9 @@ | ||
| A `node-hid` device is an `EventEmitter`. | ||
| While it shares some method names and usage patterns with | ||
| `Readable` and `Writable` streams, it is not a stream and the semantics vary. | ||
| For example, `device.write` does not take encoding or callback args and | ||
| `device.pause` does not do the same thing as `readable.pause`. | ||
| There is also no `pipe` method. | ||
| ### Picking a device from the device list | ||
@@ -237,4 +250,5 @@ If you need to filter down the `HID.devices()` list, you can use | ||
| - To remove an event handler, close the device with `device.close()` | ||
| - When there is not yet a data handler or no data handler exists, | ||
| data is not read at all -- there is no buffer. | ||
| ### Writing to a device | ||
@@ -298,3 +312,5 @@ | ||
| - Pauses reading and the emission of `data` events. | ||
| - Pauses reading and the emission of `data` events. | ||
| This means the underlying device is _silenced_ until resumption -- | ||
| it is not like pausing a stream, where data continues to accumulate. | ||
@@ -301,0 +317,0 @@ ### `device.resume()` |
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1297715
199%118
37.21%501
3.3%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated