@risleylima/escpos 0.2.0 → 0.2.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 +6 -0
- package/docs/README.md +3 -0
- package/docs/VERSIONING.md +102 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.1] - 2025-11-23
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Versioning documentation (`docs/VERSIONING.md`) with explicit semantic versioning rules
|
|
12
|
+
|
|
8
13
|
## [0.2.0] - 2025-11-23
|
|
9
14
|
|
|
10
15
|
### Added
|
|
@@ -62,6 +67,7 @@ Initial stable release with USB and Serial adapter support.
|
|
|
62
67
|
|
|
63
68
|
## Version History
|
|
64
69
|
|
|
70
|
+
- **0.2.1** - Added versioning documentation
|
|
65
71
|
- **0.2.0** - Added `Serial.listSerial()` method for listing available serial ports
|
|
66
72
|
- **0.1.0** - Major dependency updates, 100% test coverage, complete documentation
|
|
67
73
|
- **0.0.14** - Initial stable release
|
package/docs/README.md
CHANGED
|
@@ -28,6 +28,9 @@ Complete review of JSDoc documentation coverage across the library.
|
|
|
28
28
|
### [Public API Analysis](./PUBLIC_API_ANALYSIS.md)
|
|
29
29
|
Detailed analysis of the public API and exported modules, including breaking changes impact assessment.
|
|
30
30
|
|
|
31
|
+
### [Versioning Rules](./VERSIONING.md) ⚠️
|
|
32
|
+
Explicit semantic versioning rules for the project. **Read this before publishing any version update.**
|
|
33
|
+
|
|
31
34
|
## Main Documentation
|
|
32
35
|
|
|
33
36
|
- **README.md** (root) - Main project documentation with installation, usage examples, and API reference
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Semantic Versioning Rules
|
|
2
|
+
|
|
3
|
+
This document defines the explicit versioning rules for this project.
|
|
4
|
+
|
|
5
|
+
## Version Format
|
|
6
|
+
|
|
7
|
+
Following [Semantic Versioning](https://semver.org/spec/v2.0.0.html): `MAJOR.MINOR.PATCH`
|
|
8
|
+
|
|
9
|
+
## Versioning Rules
|
|
10
|
+
|
|
11
|
+
### Starting from `0.0.0`:
|
|
12
|
+
|
|
13
|
+
#### MINOR Update: `0.0.0` → `0.0.1`
|
|
14
|
+
- **When to use**: Adding new features, functions, or methods
|
|
15
|
+
- **Examples**:
|
|
16
|
+
- Adding a new function like `Serial.listSerial()`
|
|
17
|
+
- Adding a new method to an existing class
|
|
18
|
+
- Adding new functionality that doesn't break existing code
|
|
19
|
+
- **Rule**: New features = increment MINOR (third number)
|
|
20
|
+
|
|
21
|
+
#### MAJOR Update: `0.0.0` → `0.1.0`
|
|
22
|
+
- **When to use**: Significant changes, major updates, or substantial improvements
|
|
23
|
+
- **Examples**:
|
|
24
|
+
- Major dependency updates (e.g., `usb@^1.9.1` → `usb@^2.16.0`)
|
|
25
|
+
- Major refactoring
|
|
26
|
+
- Significant architectural changes
|
|
27
|
+
- Multiple new features bundled together
|
|
28
|
+
- **Rule**: Major changes = increment MAJOR (second number) when in `0.x.x` range
|
|
29
|
+
|
|
30
|
+
#### BREAKING CHANGES: `0.0.0` → `1.0.0`
|
|
31
|
+
- **When to use**: Breaking changes to the public API
|
|
32
|
+
- **Examples**:
|
|
33
|
+
- Removing or renaming public methods
|
|
34
|
+
- Changing method signatures in a way that breaks existing code
|
|
35
|
+
- Removing exported modules
|
|
36
|
+
- Changing behavior in a way that breaks backward compatibility
|
|
37
|
+
- **Rule**: Breaking changes = increment to `1.0.0` (first number)
|
|
38
|
+
|
|
39
|
+
## Examples from This Project
|
|
40
|
+
|
|
41
|
+
### `0.0.14` → `0.0.15` (MINOR)
|
|
42
|
+
- Adding a single new function: `Serial.listSerial()`
|
|
43
|
+
- This is a **MINOR** update (patch increment)
|
|
44
|
+
|
|
45
|
+
### `0.0.14` → `0.1.0` (MAJOR)
|
|
46
|
+
- Major dependency updates (usb v1 → v2, serialport v12 → v13)
|
|
47
|
+
- Complete test suite addition
|
|
48
|
+
- Comprehensive documentation
|
|
49
|
+
- Multiple significant improvements bundled together
|
|
50
|
+
- This is a **MAJOR** update (minor increment in 0.x.x range)
|
|
51
|
+
|
|
52
|
+
### Future: `0.x.x` → `1.0.0` (BREAKING)
|
|
53
|
+
- If we remove `USB.listUSB()` method
|
|
54
|
+
- If we change `Printer` constructor signature
|
|
55
|
+
- If we remove support for a feature
|
|
56
|
+
- This would be a **BREAKING** change (major increment to 1.0.0)
|
|
57
|
+
|
|
58
|
+
## Decision Tree
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Is it a bug fix or small correction?
|
|
62
|
+
YES → PATCH (0.0.0 → 0.0.1)
|
|
63
|
+
|
|
64
|
+
Is it a single new feature/function?
|
|
65
|
+
YES → MINOR (0.0.0 → 0.0.1)
|
|
66
|
+
|
|
67
|
+
Is it multiple features or major updates?
|
|
68
|
+
YES → MAJOR (0.0.0 → 0.1.0)
|
|
69
|
+
|
|
70
|
+
Does it break existing code/API?
|
|
71
|
+
YES → BREAKING (0.0.0 → 1.0.0)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Important Notes
|
|
75
|
+
|
|
76
|
+
1. **In `0.x.x` range**:
|
|
77
|
+
- The second number (MINOR) acts as MAJOR
|
|
78
|
+
- The third number (PATCH) acts as MINOR
|
|
79
|
+
- This is standard Semantic Versioning behavior for pre-1.0.0 versions
|
|
80
|
+
|
|
81
|
+
2. **After `1.0.0`**:
|
|
82
|
+
- Standard semver rules apply
|
|
83
|
+
- MAJOR.MINOR.PATCH
|
|
84
|
+
- Breaking changes = MAJOR increment
|
|
85
|
+
- New features = MINOR increment
|
|
86
|
+
- Bug fixes = PATCH increment
|
|
87
|
+
|
|
88
|
+
3. **Always consider**:
|
|
89
|
+
- Impact on users
|
|
90
|
+
- Backward compatibility
|
|
91
|
+
- Number of changes
|
|
92
|
+
- Significance of changes
|
|
93
|
+
|
|
94
|
+
## Summary Table
|
|
95
|
+
|
|
96
|
+
| Change Type | From `0.0.0` | Example |
|
|
97
|
+
|-------------|--------------|---------|
|
|
98
|
+
| Bug fix | `0.0.1` | Fix typo, fix error handling |
|
|
99
|
+
| New function/method | `0.0.1` | Add `Serial.listSerial()` |
|
|
100
|
+
| Major updates | `0.1.0` | Dependency updates, major refactoring |
|
|
101
|
+
| Breaking changes | `1.0.0` | Remove API, change signatures |
|
|
102
|
+
|