@risleylima/escpos 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
File without changes
package/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,23 +1,26 @@
1
1
  {
2
2
  "name": "@risleylima/escpos",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Library to deal with ESCPOS using some adapters",
5
5
  "main": "index.js",
6
6
  "author": "Rlima Info",
7
7
  "license": "MIT",
8
8
  "private": false,
9
+ "engines": {
10
+ "node": ">=18.0.0"
11
+ },
9
12
  "dependencies": {
10
13
  "debug": "^4.3.1",
11
14
  "get-pixels": "^3.3.2",
12
15
  "iconv-lite": "^0.6.3",
13
- "serialport": "^9.2.0",
14
- "usb": "^1.7.1"
16
+ "serialport": "^12.0.0",
17
+ "usb": "^1.9.1"
15
18
  },
16
19
  "directories": {
17
20
  "example": "examples"
18
21
  },
19
22
  "scripts": {
20
- "test": "echo \"Error: no test specified\" && exit 1"
23
+ "test": "echo \"Error: no test specified\" "
21
24
  },
22
25
  "repository": {
23
26
  "type": "git",
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
- const SerialPort = require('serialport');
2
+ const { SerialPort } = require('serialport');
3
3
  const EventEmitter = require('events');
4
4
  const Adapter = require('../adapter');
5
5
 
@@ -24,7 +24,7 @@ Serial.connect = (port, options) => {
24
24
  Serial.removeListener('close', connectListener);
25
25
  scope.verifyPort(port).catch(e => reject(e)).then((portVerified) => {
26
26
  if (portVerified) {
27
- scope.port = new SerialPort(portVerified, Object.assign(options || {}, { autoOpen: true }), (err) => {
27
+ scope.port = new SerialPort(Object.assign(options || {}, { path: portVerified, autoOpen: true }), (err) => {
28
28
  if (err) {
29
29
  debug('Error Opening the Selected Port: ', err);
30
30
  if (scope.port) {
@@ -75,7 +75,6 @@ USB.connect = async (vid, pid) => {
75
75
  scope.device = usb.findByIds(vid, pid);
76
76
  }else{
77
77
  let devices = await USB.listUSB();
78
- console.log(devices);
79
78
  if(devices && devices.length)
80
79
  scope.device = devices[0];
81
80
  }