jitterbug 1.0.0-alpha.3 → 1.0.0-alpha.5
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/README.md +5 -93
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,104 +71,16 @@ Creates a retry wrapper function.
|
|
|
71
71
|
import type { RetryOptions, BackoffStrategy } from 'jitterbug';
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
## Development
|
|
75
|
-
|
|
76
|
-
### Building
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# Build the project
|
|
80
|
-
npm run build
|
|
81
|
-
|
|
82
|
-
# Build in watch mode
|
|
83
|
-
npm run dev
|
|
84
|
-
|
|
85
|
-
# Type check without building
|
|
86
|
-
npm run typecheck
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Running Tests
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
# Run tests in watch mode
|
|
93
|
-
npm test
|
|
94
|
-
|
|
95
|
-
# Run tests once
|
|
96
|
-
npm run test:run
|
|
97
|
-
|
|
98
|
-
# Run tests with coverage
|
|
99
|
-
npm run test:coverage
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Publishing
|
|
103
|
-
|
|
104
|
-
Publishing to npm is automated via GitHub Actions. To publish a new version:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
# Choose one based on the type of change:
|
|
108
|
-
npm version patch # Bug fixes: 0.1.0 -> 0.1.1
|
|
109
|
-
npm version minor # New features: 0.1.0 -> 0.2.0
|
|
110
|
-
npm version major # Breaking changes: 0.1.0 -> 1.0.0
|
|
111
|
-
|
|
112
|
-
# This automatically:
|
|
113
|
-
# - Updates package.json version
|
|
114
|
-
# - Builds the project (via version script)
|
|
115
|
-
# - Creates a git commit
|
|
116
|
-
# - Creates a git tag (v0.1.1, v0.2.0, etc.)
|
|
117
|
-
|
|
118
|
-
# Then push both the commit and tags:
|
|
119
|
-
git push && git push --tags
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
**Publishing alpha/beta versions:**
|
|
123
|
-
|
|
124
|
-
For pre-release versions (alpha, beta, rc):
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
# Create an alpha version
|
|
128
|
-
npm version prepatch --preid=alpha # 0.1.0 -> 0.1.1-alpha.0
|
|
129
|
-
npm version preminor --preid=alpha # 0.1.0 -> 0.2.0-alpha.0
|
|
130
|
-
npm version premajor --preid=alpha # 0.1.0 -> 1.0.0-alpha.0
|
|
131
|
-
|
|
132
|
-
# Increment alpha version
|
|
133
|
-
npm version prerelease --preid=alpha # 0.1.1-alpha.0 -> 0.1.1-alpha.1
|
|
134
|
-
|
|
135
|
-
# Push the commit and tag
|
|
136
|
-
git push && git push --tags
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
The CI/CD pipeline will automatically:
|
|
140
|
-
- Run all tests
|
|
141
|
-
- Build the project
|
|
142
|
-
- Verify version matches the tag
|
|
143
|
-
- Publish to npm (if tests pass)
|
|
144
|
-
|
|
145
|
-
**Note:** `NPM_TOKEN` secret needs to be setupas a GitHub secret with your npm access token.
|
|
146
|
-
|
|
147
|
-
### Project Structure
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
jitterbug/
|
|
151
|
-
├── src/ # TypeScript source code
|
|
152
|
-
│ ├── retry.ts # Core retry implementation
|
|
153
|
-
│ └── index.ts # Main entry point
|
|
154
|
-
├── dist/ # Built output (ESM + CJS + types)
|
|
155
|
-
├── test/ # Test files
|
|
156
|
-
│ └── retry.test.js
|
|
157
|
-
├── tsconfig.json # TypeScript configuration
|
|
158
|
-
├── tsup.config.ts # Build configuration
|
|
159
|
-
└── package.json
|
|
160
|
-
```
|
|
161
|
-
|
|
162
74
|
## Test Coverage
|
|
163
75
|
|
|
164
|
-

|
|
165
77
|
|
|
166
78
|
| Metric | Coverage |
|
|
167
79
|
|--------|----------|
|
|
168
|
-
| Statements |
|
|
169
|
-
| Branches |
|
|
170
|
-
| Functions |
|
|
171
|
-
| Lines |
|
|
80
|
+
| Statements | 100.00% |
|
|
81
|
+
| Branches | 95.00% |
|
|
82
|
+
| Functions | 100.00% |
|
|
83
|
+
| Lines | 100.00% |
|
|
172
84
|
|
|
173
85
|
|
|
174
86
|
## License
|
package/package.json
CHANGED