Releases: tr3v3r/react-native-esc-pos-printer
Releases · tr3v3r/react-native-esc-pos-printer
Release 3.1.1
3.1.1 (2024-05-11)
Release 4.0.0-beta.6
4.0.0-beta.6 (2024-05-07)
Features
- added: docs for Printer constructor and connect method, allow to disconnect in case connection has lost (9da6f38)
Release 4.0.0-beta.5
4.0.0-beta.5 (2024-04-26)
Bug Fixes
- fixed: fix Android blocking thread, increase timeout for discovery and connect to fix Android timeout error (ec510ef)
Release 4.0.0-beta.3
4.0.0-beta.3 (2024-04-05)
Breaking:
- add initQueue and addQueueTask to Printer class
So now, to use your queue engine, or remove it completely, you can extend from the Printer class and override two methods:
initQueue and addQueueTask
For instance, with this code, the p-queue won't be bundled.
class CustomQueuPrinter extends Printer {
initQueue() {} // keep init clear
addQueueTask<T>(task: () => Promise<T>) { noop function
return task(); //
}
}
Or you can implement these two methods with your engine:
class CustomQueuPrinter extends Printer {
initQueue() {
this.queue = new CustomQueue()
}
addQueueTask<T>(task: () => Promise<T>) {
return this.queue.push(task) // or any other logic you need
}
}
Fixes
- add all printer constants to be possible to import from the lib
Release 4.0.0-beta.2
4.0.0-beta.2 (2024-03-28)
Breaking:
- Moved print helpers to Printer static methods.
Before:
import { tryToConnectUntil } from 'react-native-esc-pos-printer'
...
tryToConnectUntil(
printerInstance,
(status) => status.online.statusCode === PrinterConstants.TRUE
)
After:
import { Printer } from 'react-native-esc-pos-printer'
...
Printer.tryToConnectUntil(
printerInstance,
(status) => status.online.statusCode === PrinterConstants.TRUE
)
- Moved pairBluetoothDevice to Discovery class
Refactoring:
- Move native constants to StringHelpers class
- Clean up Printer native classes on Android and iOS from redundant code
Release 4.0.0-beta.1
4.0.0-beta.1 (2024-03-17)
Features
Release 4.0.0-beta.0
4.0.0-beta.0 (2024-03-14)
To be updated...
Release 4.0.0-beta.4
4.0.0-beta.4 (2024-04-26)
Bug Fixes
- fixed: fix Android blocking thread, increase timeout for discovery and connect to fix Android timeout error (ec510ef)