@risleylima/escpos 0.0.14 → 0.1.1
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/CHANGELOG.md +60 -0
- package/README.md +798 -8
- package/docs/COVERAGE_ANALYSIS.md +98 -0
- package/docs/DEPENDENCIES_REVIEW.md +127 -0
- package/docs/JSDOC_REVIEW.md +122 -0
- package/docs/LIBRARY_OVERVIEW.md +383 -0
- package/docs/PRE_PUBLISH_CHECKLIST.md +331 -0
- package/docs/PUBLIC_API_ANALYSIS.md +223 -0
- package/docs/README.md +34 -0
- package/docs/SERIALPORT_V13_MIGRATION_COMPLETE.md +127 -0
- package/docs/TESTS_IMPLEMENTED.md +129 -0
- package/docs/USB_V2_REVIEW.md +148 -0
- package/docs/VERIFICATION_RESULTS.md +172 -0
- package/jest.config.js +16 -0
- package/package.json +11 -6
- package/src/adapter/index.js +37 -0
- package/src/printer/commands.js +6 -4
- package/src/printer/image.js +28 -7
- package/src/printer/index.js +7 -2
- package/src/printer/utils.js +21 -14
- package/src/serial-adapter/index.js +133 -84
- package/src/usb-adapter/index.js +157 -43
- package/tests/README.md +67 -0
- package/tests/integration/printer-flow.test.js +128 -0
- package/tests/unit/adapters/adapter.test.js +49 -0
- package/tests/unit/adapters/serial-adapter.test.js +224 -0
- package/tests/unit/adapters/usb-adapter.test.js +319 -0
- package/tests/unit/image/image.test.js +157 -0
- package/tests/unit/printer/buffer.test.js +60 -0
- package/tests/unit/printer/commands.test.js +109 -0
- package/tests/unit/printer/printer.test.js +405 -0
- package/tests/unit/utils/utils.test.js +96 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2025-11-23
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Complete JSDoc documentation for all public APIs
|
|
12
|
+
- Comprehensive test suite with 145+ tests achieving 100% coverage
|
|
13
|
+
- Detailed documentation in `docs/` folder:
|
|
14
|
+
- Library Overview
|
|
15
|
+
- USB v2 Migration Review
|
|
16
|
+
- SerialPort v13 Migration Complete
|
|
17
|
+
- Test Coverage Analysis
|
|
18
|
+
- JSDoc Review
|
|
19
|
+
- Public API Analysis
|
|
20
|
+
- Enhanced README with complete installation, usage examples, and API documentation
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- **BREAKING (Internal)**: Updated `usb` from `^1.9.1` to `^2.16.0`
|
|
24
|
+
- Migrated from callback-based to Promise-based API
|
|
25
|
+
- Improved error handling and interface management
|
|
26
|
+
- Note: Public API remains unchanged, no breaking changes for library users
|
|
27
|
+
- **BREAKING (Internal)**: Updated `serialport` from `^12.0.0` to `^13.0.0`
|
|
28
|
+
- Migrated from callback-based to Promise-based API
|
|
29
|
+
- Improved connection handling and error management
|
|
30
|
+
- Note: Public API remains unchanged, no breaking changes for library users
|
|
31
|
+
- Updated `debug` from `^4.3.1` to `^4.4.3`
|
|
32
|
+
- Updated `iconv-lite` from `^0.6.3` to `^0.7.0`
|
|
33
|
+
- Updated `jest` from `^29.7.0` to `^30.2.0`
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
- Fixed event emission consistency in USB and Serial adapters
|
|
37
|
+
- Fixed adapter instantiation in Printer class to maintain consistency
|
|
38
|
+
- Improved error handling in adapter close/disconnect methods
|
|
39
|
+
- Fixed test coverage gaps in commands and printer utilities
|
|
40
|
+
|
|
41
|
+
### Improved
|
|
42
|
+
- Architecture improvements for better event handling
|
|
43
|
+
- Enhanced error messages and debugging information
|
|
44
|
+
- Better interface release logic in USB adapter
|
|
45
|
+
- Improved test isolation and reliability
|
|
46
|
+
|
|
47
|
+
### Security
|
|
48
|
+
- Updated dependencies to latest versions with security patches
|
|
49
|
+
|
|
50
|
+
## [0.0.14] - Previous Release
|
|
51
|
+
|
|
52
|
+
Initial stable release with USB and Serial adapter support.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Version History
|
|
57
|
+
|
|
58
|
+
- **0.1.0** - Major dependency updates, 100% test coverage, complete documentation
|
|
59
|
+
- **0.0.14** - Initial stable release
|
|
60
|
+
|