Skip to content

Conversation

@Cellivar
Copy link
Owner

@Cellivar Cellivar commented Jan 2, 2025

In prep for v2.0 of the WebZLP library I've made significant alterations to the structure of that project. The goal was to improve the modularity of the code and promote more sustainable patterns based on lessons learned writing this library.

The primary focus has been on making the library more async-friendly, and generally easier to integrate within UI frameworks such as React.

These changes in this PR are mostly about shuffling things around instead of visible changes, and the effects on actual consumers are fairly limited. For an example of such changes see the demo.html page for the changes you'll need to make.

@github-actions
Copy link

github-actions bot commented Jan 2, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 10.22% 697 / 6819
🔵 Statements 10.22% 697 / 6819
🔵 Functions 26.8% 26 / 97
🔵 Branches 60.52% 69 / 114
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/ReceiptPrinter.ts 0% 0% 0% 0% 1-378
src/index.ts 0% 0% 0% 0% 1-8
src/Commands/CommandSet.ts 10.56% 75% 28.57% 10.56% 91-210, 216-217, 220-232, 239-240, 243-255
src/Commands/Commands.ts 76% 50% 0% 76% 110-115, 120-125
src/Commands/Messages.ts 45.32% 76.92% 41.17% 45.32% 38-39, 42-43, 53-54, 56-57, 64-67, 72, 76-77, 81-91, 226-231, 234-298, 310-323, 329-350
src/Commands/PrinterConfig.ts 20.68% 100% 0% 20.68% 7-8, 12-28, 31-37
src/Commands/TranspileCommand.ts 10.34% 0% 0% 10.34% 31-48, 52-61
src/Commands/index.ts 100% 100% 100% 100%
src/Configs/BasePrinterConfig.ts 3.07% 100% 0% 3.07% 8-82
src/Configs/ConfigurationTypes.ts 100% 100% 100% 100%
src/Configs/Languages.ts 100% 100% 100% 100%
src/Configs/index.ts 100% 100% 100% 100%
src/Documents/Document.ts 0% 0% 0% 0% 1-25
src/Documents/DocumentTranspiler.ts 0% 0% 0% 0% 1-271
src/Documents/index.ts 0% 0% 0% 0% 1-2
src/Languages/PrinterCommandLanguage.ts 0% 0% 0% 0% 1-21
src/Languages/index.ts 0% 0% 0% 0% 1
src/Languages/EscPos/BasicCommands.ts 0% 0% 0% 0% 1-263
src/Languages/EscPos/CmdSetAutoStatusBack.ts 18.46% 80% 25% 18.46% 15-30, 39-52, 76-166
src/Languages/EscPos/EscPos.ts 0% 0% 0% 0% 1-145
src/Languages/EscPos/Messages.ts 35.63% 100% 66.66% 35.63% 85-163
src/Languages/EscPos/index.ts 0% 0% 0% 0% 1
src/ReceiptLine/Parser.ts 0% 0% 0% 0% 1-1074
src/ReceiptLine/RECEIPTLINE.js 0% 0% 0% 0% 1-2695
src/Util/EnumUtils.ts 100% 100% 100% 100%
src/Util/StringUtils.ts 79.03% 100% 66.66% 79.03% 11-24
src/Util/index.ts 100% 100% 100% 100%
Generated in workflow #27 for commit 2a58fb5 by the Vitest Coverage Report Action

@Cellivar Cellivar merged commit 0a2680f into main Jan 2, 2025
1 check passed
@Cellivar Cellivar deleted the feature/backport-webzlp branch January 2, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants