paymongo-cli 1.4.2 → 1.4.4

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.
@@ -64,7 +64,7 @@ npm run lint:fix # ESLint auto-fix
64
64
 
65
65
  ### Testing Strategy
66
66
  - **Mocking ESM**: Use `jest.unstable_mockModule()` before dynamic imports
67
- - Structure: `tests/unit/`, `tests/integration/`, `tests/e2e/`
67
+ - Structure: `tests/unit/`, `tests/integration/`
68
68
  - Mock external services (axios, ngrok, filesystem)
69
69
 
70
70
  Example test pattern:
package/AGENTS.md CHANGED
@@ -167,7 +167,6 @@ const config = validateConfig(input);
167
167
  tests/
168
168
  ├── unit/ # Unit tests (single functions/classes)
169
169
  ├── integration/ # Integration tests (command end-to-end)
170
- └── e2e/ # End-to-end tests (full CLI workflows)
171
170
  ```
172
171
 
173
172
  ### Mocking ESM Modules
package/CHANGELOG.md CHANGED
@@ -7,12 +7,66 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.4.4] - 2026-01-27
11
+
12
+ ### Changed
13
+
14
+ - **Codebase Modularization** - Refactored large command files into modular components for better maintainability:
15
+ - `dev.ts`: Extracted `DevServer` class and subcommands (`status`, `stop`, `logs`) into separate files.
16
+ - `generate.ts`: Extracted code generation templates into modular template files organized by type and language.
17
+ - Reduced main command file sizes significantly (`dev.ts`: 735 -> ~330 lines, `generate.ts`: 1261 -> ~250 lines).
18
+
19
+ - **Integration Testing** - Expanded integration test coverage:
20
+ - Added `dev-server.test.ts` for DevServer lifecycle and process management.
21
+ - Added `generate-templates.test.ts` for comprehensive template generation verification.
22
+ - Achieved pass on all 387 tests across 25 test suites.
23
+
24
+ ### Fixed
25
+
26
+ - **Type Safety** - Resolved TypeScript errors in integration tests by adding proper type definitions for mock objects.
27
+
28
+ ## [1.4.3] - 2026-01-26
29
+
30
+ ### Added
31
+
32
+ - **Enhanced Error Handling** - Improved error messages in `init`, `login`, and `env` commands with specific error types:
33
+ - `ApiKeyError`: Invalid or unauthorized API keys
34
+ - `NetworkError`: Connection and timeout issues
35
+ - `PayMongoError`: API-specific errors with status codes
36
+ - Actionable error messages with troubleshooting guidance
37
+
38
+ ### Changed
39
+
40
+ - **Test Output Cleanup** - Suppressed verbose console output and Node.js warnings in test runs:
41
+ - Added `silent: true` to Jest configuration to hide CLI command output
42
+ - Added `NODE_NO_WARNINGS=1` to test scripts to suppress experimental VM warnings
43
+ - Cleaner test output focused on results rather than implementation details
44
+
45
+ - **API Client Consolidation** - Merged `UndiciClient` into main `ApiClient` class:
46
+ - Removed separate `undici-client.ts` file
47
+ - Updated all imports and tests to use unified `ApiClient`
48
+ - Maintained all existing functionality (caching, rate limiting, error handling)
49
+
50
+ ### Removed
51
+
52
+ - **E2E Test Suite** - Removed `tests/e2e/` folder and associated files:
53
+ - Deleted `tests/e2e/login.test.ts` and `tests/e2e/README.md`
54
+ - Removed e2e references from documentation (`CONTRIBUTING.md`, `AGENTS.md`, `.github/copilot-instructions.md`)
55
+ - Unit tests provide equivalent coverage without requiring real API credentials
56
+
57
+ ### Fixed
58
+
59
+ - **Test Compatibility** - Updated test mocks to work with new error handling:
60
+ - Changed `validateApiKey()` from boolean return to void (throws on error)
61
+ - Updated test expectations for error throwing instead of boolean returns
62
+ - Maintained test coverage while improving error handling consistency
63
+
10
64
  ## [1.4.1] - 2026-01-26
11
65
 
12
66
  ### Added
13
67
 
14
68
  - **Comprehensive Test Coverage** - Added 380 unit tests across 23 test suites:
15
- - Complete test coverage for 9 CLI command files (init, config, login, dev, payments, env, gui, trigger, webhooks)
69
+ - Complete test coverage for 8 CLI command files (init, config, login, dev, payments, env, trigger, webhooks)
16
70
  - 100% coverage for each tested command with comprehensive error handling and edge cases
17
71
  - Established testing patterns for Commander.js commands with ESM module mocking
18
72
  - Mock implementations for all external dependencies (axios, ngrok, filesystem operations)
@@ -234,6 +288,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
234
288
 
235
289
  | Version | Release Date | Highlights |
236
290
  | ------- | ------------ | -------------------------------------------------------------------- |
291
+ | [1.4.3] | 2026-01-26 | Enhanced error handling, test output cleanup, API client consolidation |
237
292
  | [1.4.1] | 2026-01-26 | Test coverage completion, ESLint compliance, documentation updates |
238
293
  | [1.4.0] | 2026-01-26 | Code generation, HTTP client migration, GUI removal, performance optimization |
239
294
  | [1.3.0] | 2026-01-25 | Rate limiting protection, bulk operations, team collaboration |
@@ -244,6 +299,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
244
299
  ---
245
300
 
246
301
  ## Upgrade Guide
302
+ ### Upgrading to 1.4.3
303
+
304
+ ```bash
305
+ npm install -g paymongo-cli@latest
306
+ ```
307
+
308
+ **Breaking Changes:** None. This is a backward-compatible patch release.
309
+
310
+ **New Features:**
311
+ - Enhanced error handling with specific error types and actionable messages
312
+ - Cleaner test output with suppressed console logs and warnings
313
+ - Consolidated API client implementation
314
+
247
315
  ### Upgrading to 1.4.1
248
316
 
249
317
  ```bash
@@ -322,7 +390,9 @@ npm install -g paymongo-cli
322
390
  - [Issue Tracker](https://github.com/leodyversemilla07/paymongo-cli/issues)
323
391
  - [PayMongo API Documentation](https://developers.paymongo.com/)
324
392
 
325
- [Unreleased]: https://github.com/leodyversemilla07/paymongo-cli/compare/v1.4.1...HEAD
393
+ [Unreleased]: https://github.com/leodyversemilla07/paymongo-cli/compare/v1.4.4...HEAD
394
+ [1.4.4]: https://github.com/leodyversemilla07/paymongo-cli/compare/v1.4.3...v1.4.4
395
+ [1.4.3]: https://github.com/leodyversemilla07/paymongo-cli/compare/v1.4.1...v1.4.3
326
396
  [1.4.1]: https://github.com/leodyversemilla07/paymongo-cli/compare/v1.4.0...v1.4.1
327
397
  [1.4.0]: https://github.com/leodyversemilla07/paymongo-cli/compare/v1.3.0...v1.4.0
328
398
  [1.3.0]: https://github.com/leodyversemilla07/paymongo-cli/compare/v1.2.0...v1.3.0