github-archiver 1.2.0 → 1.4.0

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 CHANGED
@@ -1,5 +1,124 @@
1
1
  ## [1.1.1](https://github.com/mynameistito/github-archiver/compare/v1.1.0...v1.1.1) (2026-01-12)
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`e42add2`](https://github.com/mynameistito/github-archiver/commit/e42add279d4630f9b5857feef99dd77ba25fd1f0) Thanks [@mynameistito](https://github.com/mynameistito)! - ## Add GitHub Packages Publishing Support
8
+
9
+ Adds dual-registry publishing to both npm and GitHub Packages registries with OIDC trusted publishing.
10
+
11
+ ### Added
12
+
13
+ - GitHub Packages npm registry support - package published as `@mynameistito/github-archiver`
14
+ - `.npmrc` configuration for GitHub Packages registry routing
15
+ - GitHub Packages publishing step in release workflow with automatic version checking
16
+ - OIDC trusted publishing for enhanced security (no manual tokens required)
17
+
18
+ ### Changed
19
+
20
+ - Updated release workflow permissions to include `packages: write` for GitHub Packages access
21
+ - Release workflow now publishes to both npm (`github-archiver`) and GitHub Packages (`@mynameistito/github-archiver`) simultaneously
22
+
23
+ ## 1.3.0
24
+
25
+ ### Minor Changes
26
+
27
+ - [`3644afb`](https://github.com/mynameistito/github-archiver/commit/3644afb853d7b17e954b8f55db565f7c5f372e07) Thanks [@mynameistito](https://github.com/mynameistito)! - ## Comprehensive Test Coverage Expansion
28
+
29
+ This changeset introduces a major test coverage expansion, achieving 100% coverage on all core business logic and adding 200+ new test cases.
30
+
31
+ ### Key Changes
32
+
33
+ #### Test Coverage Improvements
34
+
35
+ - **Added 200+ new test cases** with 549 total assertions
36
+ - **Achieved 100% coverage on 15 src files** (71% of all src files)
37
+ - **95%+ coverage on all testable code**
38
+ - **366 passing tests** with zero failures
39
+ - Test execution time: ~4.8 seconds
40
+
41
+ #### Core Business Logic (100% Complete)
42
+
43
+ - All 3 constants files: 100% coverage
44
+ - All 4 type definition files: 100% coverage
45
+ - Both service files (archiver, auth-manager): 100% coverage
46
+ - 6 utility files (colors, config, errors, formatting, progress, logger): 98-100% coverage
47
+
48
+ #### Code Refactoring for Testability
49
+
50
+ - **archive.ts**: Exported 9 helper functions
51
+
52
+ - `validateOptions()` - validates CLI options with bounds checking
53
+ - `authenticateUser()` - handles GitHub authentication
54
+ - `getRepositories()` - reads repositories from file/stdin/interactive
55
+ - `logParseErrors()` - displays parsing errors with line numbers
56
+ - `showRepositoriesPreview()` - displays repository preview
57
+ - `confirmOperation()` - handles user confirmation
58
+ - `archiveRepositories()` - executes archiving workflow
59
+ - `displayResults()` - shows archiving results
60
+ - `handleArchiveError()` / `provideErrorGuidance()` - error handling
61
+
62
+ - **auth.ts**: Exported 6 helper functions
63
+ - `createLoginCommand()` - login subcommand
64
+ - `createLogoutCommand()` - logout subcommand
65
+ - `createStatusCommand()` - status subcommand
66
+ - `createValidateCommand()` - validate subcommand
67
+ - `promptForToken()` - token input prompt
68
+ - `confirmAction()` - confirmation prompt
69
+
70
+ #### Test Files Added/Enhanced
71
+
72
+ - `tests/unit/archive-command.test.ts` - 48 test cases for archive command logic
73
+ - `tests/unit/auth-command.test.ts` - 41 test cases for auth command logic
74
+ - Enhanced `tests/unit/github.test.ts` with 50+ test cases
75
+ - Enhanced `tests/unit/input-handler.test.ts` with 30+ test cases
76
+ - Enhanced `tests/unit/logger.test.ts` with console formatting tests
77
+ - Enhanced `tests/unit/parser.test.ts` with edge case coverage
78
+
79
+ #### Code Quality
80
+
81
+ - ✅ All tests comply with Ultracite code standards
82
+ - ✅ No console.log/debugger statements in code
83
+ - ✅ Proper error handling and cleanup
84
+ - ✅ Type-safe test implementation
85
+ - ✅ Comprehensive test isolation with beforeEach/afterEach
86
+
87
+ #### Documentation
88
+
89
+ - Added `COVERAGE_SUMMARY.md` with detailed coverage breakdown
90
+ - Added `TEST_COVERAGE_ANALYSIS.md` with comprehensive analysis
91
+
92
+ ### Coverage Metrics
93
+
94
+ | Category | Files | 100% Coverage | Avg Coverage |
95
+ | ----------- | ------ | --------------- | ------------ |
96
+ | Constants | 3 | 3/3 (100%) | 100% |
97
+ | Types | 4 | 4/4 (100%) | 100% |
98
+ | Services | 2 | 2/2 (100%) | 100% |
99
+ | Utilities | 6 | 6/6 (100%) | 99% |
100
+ | Commands | 2 | 0/2 (0%) | 32% |
101
+ | Integration | 1 | 0/1 (0%) | 9% |
102
+ | **TOTAL** | **21** | **15/21 (71%)** | **87%** |
103
+
104
+ ### Breaking Changes
105
+
106
+ None. All exported functions are implementation details that maintain backward compatibility.
107
+
108
+ ### Migration Guide
109
+
110
+ No migration needed. The exported functions were previously internal and are now available for testing. CLI and public API remain unchanged.
111
+
112
+ ### Future Work
113
+
114
+ For 100% coverage on remaining files:
115
+
116
+ - CLI integration tests (archive.ts, auth.ts) - requires integration test framework
117
+ - GitHub API mocking (github.ts) - requires API mocking library
118
+ - Interactive readline tests (input-handler.ts) - requires readline mock library
119
+
120
+ These require specialized testing frameworks beyond unit testing and are typically handled with dedicated integration/E2E test suites.
121
+
3
122
  ## 1.2.0
4
123
 
5
124
  ### Minor Changes
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mynameistito (Hone Tito)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.