github-archiver 1.0.7 → 1.0.9

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,30 +1,41 @@
1
- ## [1.0.7](https://github.com/mynameistito/github-archiver/compare/v1.0.6...v1.0.7) (2026-01-11)
1
+ ## [1.0.8](https://github.com/mynameistito/github-archiver/compare/v1.0.7...v1.0.8) (2026-01-11)
2
+
3
+ ## 1.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`230c310`](https://github.com/mynameistito/github-archiver/commit/230c3106625c6b4170aff58dc8a79ed78f7a6938) Thanks [@mynameistito](https://github.com/mynameistito)! - Migrate from semantic-release to @changesets/cli for better release control
8
+
9
+ - Replace semantic-release with @changesets/cli for explicit version management
10
+ - Add GitHub-linked changelog generation with PR/commit references
11
+ - Update to two-step release process (Version Packages PR + manual merge)
12
+ - Integrate with bun for improved package management
13
+ - Update Node requirement to 22+ (aligns with actual dependencies)
14
+ - Update CI/CD workflows to use bun exclusively
2
15
 
16
+ ## [1.0.7](https://github.com/mynameistito/github-archiver/compare/v1.0.6...v1.0.7) (2026-01-11)
3
17
 
4
18
  ### Bug Fixes
5
19
 
6
- * update version number in source code to match package.json ([f9ef48c](https://github.com/mynameistito/github-archiver/commit/f9ef48c344cf46e2ebb37141a9db211bddf57d47))
20
+ - update version number in source code to match package.json ([f9ef48c](https://github.com/mynameistito/github-archiver/commit/f9ef48c344cf46e2ebb37141a9db211bddf57d47))
7
21
 
8
22
  ## [1.0.6](https://github.com/mynameistito/github-archiver/compare/v1.0.5...v1.0.6) (2026-01-11)
9
23
 
10
-
11
24
  ### Bug Fixes
12
25
 
13
- * ensure ESM output in bundled dist file ([48a242a](https://github.com/mynameistito/github-archiver/commit/48a242ad0b15c16e78c66aafab69ba84b64590b9))
26
+ - ensure ESM output in bundled dist file ([48a242a](https://github.com/mynameistito/github-archiver/commit/48a242ad0b15c16e78c66aafab69ba84b64590b9))
14
27
 
15
28
  ## [1.0.5](https://github.com/mynameistito/github-archiver/compare/v1.0.4...v1.0.5) (2026-01-11)
16
29
 
17
-
18
30
  ### Bug Fixes
19
31
 
20
- * build output as ESM to match package.json type ([e0aadd7](https://github.com/mynameistito/github-archiver/commit/e0aadd740c559333375e57b0f34e7e2d6a04240c))
32
+ - build output as ESM to match package.json type ([e0aadd7](https://github.com/mynameistito/github-archiver/commit/e0aadd740c559333375e57b0f34e7e2d6a04240c))
21
33
 
22
34
  ## [1.0.4](https://github.com/mynameistito/github-archiver/compare/v1.0.3...v1.0.4) (2026-01-11)
23
35
 
24
-
25
36
  ### Bug Fixes
26
37
 
27
- * add repository URL to package.json for npm provenance ([02ddb1c](https://github.com/mynameistito/github-archiver/commit/02ddb1c9f4b6a7b7ca91497b2633011accf94356))
38
+ - add repository URL to package.json for npm provenance ([02ddb1c](https://github.com/mynameistito/github-archiver/commit/02ddb1c9f4b6a7b7ca91497b2633011accf94356))
28
39
 
29
40
  ## [1.0.3](https://github.com/mynameistito/github-archiver/compare/v1.0.2...v1.0.3) (2026-01-11)
30
41
 
@@ -32,17 +43,15 @@
32
43
 
33
44
  ## [1.0.1](https://github.com/mynameistito/github-archiver/compare/v1.0.0...v1.0.1) (2026-01-11)
34
45
 
35
-
36
46
  ### Bug Fixes
37
47
 
38
- * correct relative import path in CLI wrapper ([cc64796](https://github.com/mynameistito/github-archiver/commit/cc64796d2d0a06175faf053d63e9c1e8ffe0d371))
48
+ - correct relative import path in CLI wrapper ([cc64796](https://github.com/mynameistito/github-archiver/commit/cc64796d2d0a06175faf053d63e9c1e8ffe0d371))
39
49
 
40
50
  # 1.0.0 (2026-01-11)
41
51
 
42
-
43
52
  ### Bug Fixes
44
53
 
45
- * separate CLI wrapper to resolve ESM shebang conflict ([fc9918a](https://github.com/mynameistito/github-archiver/commit/fc9918a46953634b1ad15a0f64175937acb4f29b))
54
+ - separate CLI wrapper to resolve ESM shebang conflict ([fc9918a](https://github.com/mynameistito/github-archiver/commit/fc9918a46953634b1ad15a0f64175937acb4f29b))
46
55
 
47
56
  # Changelog
48
57
 
@@ -54,6 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
54
63
  ## [1.0.0] - 2025-01-11
55
64
 
56
65
  ### Added
66
+
57
67
  - Initial release of GitHub Archiver CLI
58
68
  - Mass archive GitHub repositories with parallel processing
59
69
  - Three input methods: editor, file, and stdin
@@ -75,6 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
75
85
  - Biome formatting and linting enforcement
76
86
 
77
87
  ### Commands
88
+
78
89
  - `auth login` - Authenticate with GitHub
79
90
  - `auth logout` - Remove stored token
80
91
  - `auth status` - Check authentication status
@@ -82,6 +93,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
82
93
  - `archive` - Archive repositories with multiple options
83
94
 
84
95
  ### Features
96
+
85
97
  - Parallel processing with p-queue
86
98
  - Retry logic with exponential backoff (1s → 2s → 4s)
87
99
  - Repository validation (exists, permissions, already archived)
@@ -91,6 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
91
103
  - Support for configuration files and comments in input
92
104
 
93
105
  ### Documentation
106
+
94
107
  - Comprehensive README with quick start guide
95
108
  - Installation instructions
96
109
  - Command reference with examples
@@ -99,6 +112,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
112
  - Architecture overview
100
113
 
101
114
  ### Testing
115
+
102
116
  - 34 unit tests covering:
103
117
  - URL parsing (20+ tests)
104
118
  - Output formatting (15+ tests)
@@ -106,6 +120,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
106
120
  - Vitest configuration for fast testing
107
121
 
108
122
  ### Code Quality
123
+
109
124
  - TypeScript strict mode enabled
110
125
  - 0 compilation errors
111
126
  - 0 implicit any types
@@ -117,6 +132,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
117
132
  ## Unreleased
118
133
 
119
134
  ### Planned Features
135
+
120
136
  - [ ] Batch progress reporting with live updates
121
137
  - [ ] Support for organization-wide archiving
122
138
  - [ ] Integration tests for archive command
@@ -128,6 +144,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
128
144
  - [ ] Undo/rollback capability (unarchive)
129
145
 
130
146
  ### Under Consideration
147
+
131
148
  - Docker image distribution
132
149
  - NPX support for one-time use
133
150
  - Scheduled archiving via cron
package/README.md CHANGED
@@ -4,23 +4,21 @@
4
4
  [![npm](https://img.shields.io/npm/v/github-archiver)](https://www.npmjs.com/package/github-archiver)
5
5
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6
6
 
7
- A powerful command-line tool for mass archiving GitHub repositories with parallel processing, comprehensive error handling, and user-friendly feedback.
7
+ A powerful CLI for mass archiving GitHub repositories with parallel processing and comprehensive error handling.
8
8
 
9
9
  ## Features
10
10
 
11
- ✨ **Mass Archive Repositories** - Archive multiple GitHub repositories in parallel
12
- 🔐 **Secure Authentication** - Token stored locally in `~/.github-archiver/config.json`
13
- ⚡ **Parallel Processing** - Archive multiple repos simultaneously (configurable 1-50 concurrency)
14
- 📋 **Multiple Input Methods** - Load repos from editor, file, or stdin
15
- 🔍 **Validation** - Dry-run mode to validate without archiving
16
- 📊 **Progress Tracking** - Real-time progress bars and ETA
17
- 🛡️ **Error Recovery** - Comprehensive error handling with helpful guidance
18
- 📝 **Detailed Logging** - Structured logging to files and console
11
+ - ✨ **Mass Archive** - Archive multiple repositories in parallel
12
+ - 🔐 **Secure Auth** - Token stored locally at `~/.github-archiver/config.json`
13
+ - ⚡ **Parallel Processing** - Configurable concurrency (1-50)
14
+ - 📋 **Flexible Input** - Load repos from editor, file, or stdin
15
+ - 🔍 **Validation** - Dry-run mode to validate without archiving
16
+ - 📊 **Progress Tracking** - Real-time progress bars and ETA
17
+ - 🛡️ **Error Recovery** - Comprehensive error handling with helpful guidance
18
+ - 📝 **Detailed Logging** - Structured logging to files and console
19
19
 
20
20
  ## Installation
21
21
 
22
- ### npm
23
-
24
22
  ```bash
25
23
  npm install -g github-archiver
26
24
  ```
@@ -30,8 +28,7 @@ npm install -g github-archiver
30
28
  ```bash
31
29
  git clone https://github.com/mynameistito/github-archiver.git
32
30
  cd github-archiver
33
- npm install
34
- npm run build
31
+ npm install && npm run build
35
32
  npm install -g .
36
33
  ```
37
34
 
@@ -44,18 +41,12 @@ npm run dev -- <command>
44
41
 
45
42
  ## Quick Start
46
43
 
47
- ### 1. Authenticate with GitHub
48
-
49
44
  ```bash
45
+ # Authenticate
50
46
  github-archiver auth login
51
- # Paste your GitHub Personal Access Token when prompted
52
- ```
53
47
 
54
- ### 2. Archive Repositories
55
-
56
- ```bash
48
+ # Archive (opens editor to input repos)
57
49
  github-archiver archive
58
- # Opens your default text editor to enter repository URLs
59
50
  ```
60
51
 
61
52
  ## Commands
@@ -64,101 +55,61 @@ github-archiver archive
64
55
 
65
56
  Manage GitHub authentication.
66
57
 
67
- #### `auth login`
68
- Authenticate with GitHub using a Personal Access Token.
69
-
70
- ```bash
71
- github-archiver auth login
72
- ```
73
-
74
- #### `auth logout`
75
- Remove stored GitHub token.
76
-
77
- ```bash
78
- github-archiver auth logout
79
- ```
80
-
81
- #### `auth status`
82
- Check current authentication status.
83
-
84
- ```bash
85
- github-archiver auth status
86
- ```
58
+ | Command | Description |
59
+ |---------|-------------|
60
+ | `auth login` | Authenticate with Personal Access Token |
61
+ | `auth logout` | Remove stored token |
62
+ | `auth status` | Check authentication status |
87
63
 
88
64
  ### `archive`
89
65
 
90
- Archive multiple GitHub repositories.
66
+ Archive multiple repositories.
91
67
 
92
68
  ```bash
93
69
  github-archiver archive [options]
94
70
  ```
95
71
 
96
- #### Options
97
-
98
72
  | Option | Default | Description |
99
73
  |--------|---------|-------------|
100
74
  | `--file <path>` | - | Read repository URLs from file |
101
- | `--stdin` | - | Read repository URLs from stdin |
75
+ | `--stdin` | - | Read from stdin |
102
76
  | `--dry-run` | false | Validate without archiving |
103
- | `--concurrency <n>` | 3 | Number of parallel operations (1-50) |
77
+ | `--concurrency <n>` | 3 | Parallel operations (1-50) |
104
78
  | `--timeout <n>` | 300 | API timeout in seconds (10-3600) |
105
79
  | `--verbose` | false | Enable verbose logging |
106
80
  | `--force` | false | Skip confirmation prompts |
107
81
 
108
- #### Examples
82
+ **Examples:**
109
83
 
110
- **Interactive (opens editor):**
111
84
  ```bash
85
+ # Interactive (opens editor)
112
86
  github-archiver archive
113
- ```
114
87
 
115
- **From file:**
116
- ```bash
88
+ # From file
117
89
  github-archiver archive --file repos.txt
118
- ```
119
90
 
120
- **From stdin:**
121
- ```bash
91
+ # From stdin
122
92
  cat repos.txt | github-archiver archive --stdin
123
- ```
124
93
 
125
- **Dry-run (validate only):**
126
- ```bash
94
+ # Dry-run
127
95
  github-archiver archive --file repos.txt --dry-run
128
- ```
129
96
 
130
- **Fast processing (higher concurrency):**
131
- ```bash
97
+ # High concurrency
132
98
  github-archiver archive --file repos.txt --concurrency 10
133
- ```
134
99
 
135
- **Force without confirmation:**
136
- ```bash
100
+ # Force without confirmation
137
101
  github-archiver archive --file repos.txt --force
138
102
  ```
139
103
 
140
104
  ## Input Format
141
105
 
142
- Repository URLs can be specified in three formats:
106
+ Supported formats:
143
107
 
144
- ### HTTPS Format
145
- ```
146
- https://github.com/owner/repo
147
- https://github.com/owner/repo.git
148
- ```
149
-
150
- ### SSH Format
151
- ```
152
- git@github.com:owner/repo.git
153
- git@github.com:owner/repo
154
- ```
155
-
156
- ### Shorthand Format
157
- ```
158
- owner/repo
159
- ```
108
+ - HTTPS: `https://github.com/owner/repo` or `https://github.com/owner/repo.git`
109
+ - SSH: `git@github.com:owner/repo.git` or `git@github.com:owner/repo`
110
+ - Shorthand: `owner/repo`
160
111
 
161
- ### File Example
112
+ **File Example:**
162
113
 
163
114
  ```
164
115
  # Repositories to archive
@@ -166,22 +117,16 @@ https://github.com/facebook/react
166
117
  torvalds/linux
167
118
  owner/private-repo
168
119
 
169
- # Comments are ignored
120
+ # Comments ignored
170
121
  https://github.com/nodejs/node
171
122
  ```
172
123
 
173
124
  ## GitHub Token Requirements
174
125
 
175
- You need a GitHub Personal Access Token with the following:
176
-
177
126
  - **Scope**: `repo` (Full control of private repositories)
178
- - **Minimum Permissions**: Push access to repositories you want to archive
179
-
180
- ### How to Generate a Token
127
+ - **Minimum Permissions**: Push access to target repositories
181
128
 
182
- 1. Go to https://github.com/settings/tokens/new
183
- 2. Create a new token with `repo` scope
184
- 3. Copy the token and run `github-archiver auth login`
129
+ **Generate token:** https://github.com/settings/tokens/new → Create with `repo` scope → Run `github-archiver auth login`
185
130
 
186
131
  ## Output Example
187
132
 
@@ -219,225 +164,108 @@ Starting to archive repositories... (concurrency: 3)
219
164
 
220
165
  ## Troubleshooting
221
166
 
222
- ### Authentication Issues
167
+ ### Authentication
223
168
 
224
- **Error: No GitHub token found**
225
- - Run: `github-archiver auth login`
226
- - Ensure you have a valid Personal Access Token with `repo` scope
169
+ **No token found**: Run `github-archiver auth login`
227
170
 
228
- **Error: Invalid or expired token**
229
- - Generate a new token at https://github.com/settings/tokens
230
- - Run: `github-archiver auth logout` then `github-archiver auth login`
171
+ **Invalid/expired token**: Generate new token at https://github.com/settings/tokens → `auth logout` → `auth login`
231
172
 
232
- ### Permission Issues
173
+ ### Permissions
233
174
 
234
- **Error: Permission denied for owner/repo**
235
- - Verify you are the repository owner or have push access
236
- - Check that your token has the `repo` scope
237
- - The repository must not be archived yet
175
+ **Permission denied**: Verify repo ownership/push access, check `repo` scope, ensure repo isn't already archived
238
176
 
239
177
  ### Rate Limiting
240
178
 
241
- **Error: GitHub API rate limit exceeded**
242
- - Wait a few minutes (rate limit resets hourly)
243
- - Use lower concurrency: `--concurrency 1`
244
- - Increase timeout: `--timeout 600`
179
+ **Rate limit exceeded**: Wait (resets hourly), lower `--concurrency 1`, increase `--timeout 600`
245
180
 
246
- ### Network Issues
181
+ ### Network
247
182
 
248
- **Error: Network error or timeout**
249
- - Check your internet connection
250
- - GitHub API may be temporarily unavailable
251
- - Try again in a moment
252
- - Increase timeout: `--timeout 600`
183
+ **Network error/timeout**: Check connection, GitHub API may be unavailable, retry with `--timeout 600`
253
184
 
254
185
  ### Repository Not Found
255
186
 
256
- **Error: Repository not found**
257
- - Verify the repository URL is correct
258
- - The repository may have been deleted
259
- - Check your GitHub access to the repository
187
+ **Repository not found**: Verify URL, check if deleted, confirm GitHub access
260
188
 
261
189
  ## Configuration
262
190
 
263
- Configuration is stored at:
264
- - **Linux/macOS**: `~/.github-archiver/config.json`
265
- - **Windows**: `%USERPROFILE%\.github-archiver\config.json`
191
+ **Config**: `~/.github-archiver/config.json` (Linux/macOS) or `%USERPROFILE%\.github-archiver\config.json` (Windows)
266
192
 
267
- Logs are stored at:
268
- - **Linux/macOS**: `~/.github-archiver/logs/`
269
- - **Windows**: `%USERPROFILE%\.github-archiver\logs\`
193
+ **Logs**: `~/.github-archiver/logs/` (Linux/macOS) or `%USERPROFILE%\.github-archiver\logs\` (Windows)
270
194
 
271
195
  ## Architecture
272
196
 
273
197
  ```
274
198
  src/
275
- ├── commands/ # CLI commands (auth, archive)
276
- ├── services/ # GitHub API, archiving, auth management
277
- ├── utils/ # Utilities (parsing, formatting, logging)
278
- ├── types/ # TypeScript type definitions
279
- └── constants/ # Configuration constants and messages
199
+ ├── commands/ # CLI commands (auth, archive)
200
+ ├── services/ # GitHub API, archiving, auth management
201
+ ├── utils/ # Parsing, formatting, logging
202
+ ├── types/ # TypeScript definitions
203
+ └── constants/ # Configuration constants
280
204
 
281
205
  tests/
282
- └── unit/ # Unit tests for utilities
206
+ └── unit/ # Unit tests
283
207
  ```
284
208
 
285
- ### Core Services
209
+ **Core Services:**
286
210
 
287
- - **GitHubService**: Handles GitHub API interactions with retry logic
288
- - **Archiver**: Manages parallel repository archiving with p-queue
289
- - **AuthManager**: Manages secure token storage
290
- - **InputHandler**: Handles input from editor, file, or stdin
291
- - **ProgressDisplay**: Manages progress bar and summary output
211
+ - **GitHubService**: GitHub API interactions with retry logic
212
+ - **Archiver**: Parallel archiving with p-queue
213
+ - **AuthManager**: Secure token storage
214
+ - **InputHandler**: Input from editor, file, or stdin
215
+ - **ProgressDisplay**: Progress bar and summary output
292
216
 
293
217
  ## Development
294
218
 
295
- ### Setup
296
-
297
219
  ```bash
298
220
  npm install
299
- npm run typecheck
300
- npm run test
301
- npm run build
221
+ npm run typecheck # Check TypeScript
222
+ npm run test # Run unit tests
223
+ npm run build # Build production bundle
224
+ npm run lint # Check code style
225
+ npm run format # Auto-format code
302
226
  ```
303
227
 
304
- ### Commands
305
-
306
- | Command | Description |
307
- |---------|-------------|
308
- | `npm run dev -- <cmd>` | Run CLI in development mode |
309
- | `npm run typecheck` | Check TypeScript compilation |
310
- | `npm run test` | Run unit tests |
311
- | `npm run build` | Build production bundle |
312
- | `npm run lint` | Check code style |
313
- | `npm run format` | Auto-format code |
314
-
315
228
  ### Code Standards
316
229
 
317
- This project uses **Ultracite**, a zero-config preset that enforces:
318
-
319
- - Strict TypeScript with no implicit `any`
320
- - Accessibility, performance, and security best practices
321
- - Consistent formatting via Biome
230
+ This project uses **Ultracite** (Biome) for:
231
+ - Strict TypeScript (no implicit `any`)
232
+ - Accessibility, performance, security best practices
233
+ - Consistent formatting
322
234
  - Comprehensive error handling
323
235
 
324
- See `AGENTS.md` for detailed standards.
325
-
326
- ### Testing
327
-
328
- ```bash
329
- npm run test # Run all tests
330
- npm run test:coverage # Run with coverage report
331
- ```
236
+ See `AGENTS.md` for details.
332
237
 
333
238
  ## Release Process
334
239
 
335
- This project uses **semantic-release** for automated versioning and publishing to npm.
336
-
337
- ### How Releases Work
338
-
339
- 1. **Commit Format**: Use [Conventional Commits](https://www.conventionalcommits.org/):
340
- - `feat:` - New features → **minor** version bump (1.0.0 → 1.1.0)
341
- - `fix:` - Bug fixes → **patch** version bump (1.0.0 → 1.0.1)
342
- - `BREAKING CHANGE:` - Breaking changes → **major** version bump (1.0.0 → 2.0.0)
343
- - `chore:`, `docs:`, `test:` - No version bump
344
-
345
- 2. **Automatic Trigger**:
346
- - Push to `main` branch triggers the release workflow
347
- - Semantic release analyzes commits and determines version bump
348
- - Package version is updated, published to npm
349
- - GitHub release is created with changelog
350
- - Git tag is created automatically
351
-
352
- 3. **Trusted Publishing**:
353
- - Uses OpenID Connect (OIDC) for secure, tokenless authentication
354
- - No npm tokens required - eliminates security risks
355
- - Short-lived, cryptographically-signed tokens for each publish
356
- - Works with personal GitHub accounts
357
-
358
- 4. **Node Version Requirements**:
359
- - Package runs on Node 18+ (see `package.json` engines)
360
- - Release workflow uses Node 22+ (semantic-release requirement)
361
- - CI tests on Node 18 and 22 for maximum compatibility
362
-
363
- 5. **Example Workflow**:
364
- ```bash
365
- git checkout main
366
- git pull
367
- # Make your commits with conventional format
368
- git commit -m "feat: add support for custom config file"
369
- git push
370
- # Release happens automatically!
371
- ```
372
-
373
- ### Trusted Publishing Setup
374
-
375
- This project uses npm's **Trusted Publishing** feature for secure, tokenless package publishing.
376
-
377
- **Setup (one-time):**
378
- 1. Go to https://www.npmjs.com/package/github-archiver/settings
379
- 2. Under **Trusted Publisher**, click **GitHub Actions**
380
- 3. Fill in:
381
- - **Organization or user**: `mynameistito`
382
- - **Repository**: `github-archiver`
383
- - **Workflow filename**: `release.yml`
384
- 4. Click **Set up connection**
385
- 5. (Recommended) Enable **"Require two-factor authentication and disallow tokens"**
386
-
387
- That's it! No tokens to manage, rotate, or worry about.</think></tool_call>
388
-
389
- ### Commit Message Examples
240
+ This project uses **semantic-release** for automated versioning and publishing.
390
241
 
391
- ```bash
392
- # Feature (minor version bump)
393
- git commit -m "feat: add support for custom config file"
394
-
395
- # Bug fix (patch version bump)
396
- git commit -m "fix: handle empty repository list gracefully"
242
+ **Commit format** (Conventional Commits):
243
+ - `feat:` minor bump
244
+ - `fix:` patch bump
245
+ - `BREAKING CHANGE:` → major bump
246
+ - `chore:`, `docs:`, `test:` no bump
397
247
 
398
- # Breaking change (major version bump)
399
- git commit -m "feat!: change CLI command structure
400
-
401
- BREAKING CHANGE: The 'auth' subcommand is now required"
402
-
403
- # No release
404
- git commit -m "chore: update dependencies"
405
- git commit -m "docs: clarify installation steps"
406
- git commit -m "test: add unit tests for parser"
407
- ```
408
-
409
- ### Manual Releases
410
-
411
- If you need to publish without merging to main:
412
- ```bash
413
- npm run release -- --no-ci
414
- ```
248
+ Pushing to `main` triggers automatic release. See [docs/RELEASE.md](docs/RELEASE.md) for detailed setup and workflow.
415
249
 
416
250
  ## Contributing
417
251
 
418
- Contributions are welcome! Please:
419
-
420
- 1. Follow the code standards (run `npm run format`)
252
+ 1. Follow code standards (`npm run format`)
421
253
  2. Add tests for new features
422
254
  3. Ensure `npm run typecheck` and `npm run test` pass
423
- 4. Create a pull request with a clear description
255
+ 4. Create pull request with clear description
424
256
 
425
257
  ## License
426
258
 
427
- MIT - See LICENSE file for details
259
+ MIT - See LICENSE file for details.
428
260
 
429
261
  ## Support
430
262
 
431
- Having issues? Check the [Troubleshooting](#troubleshooting) section or open an issue on GitHub.
263
+ Check the [Troubleshooting](#troubleshooting) section or open an issue on GitHub.
432
264
 
433
265
  ## Acknowledgments
434
266
 
435
- - Built with TypeScript, Commander.js, Octokit, and Winston
436
- - Uses Biome for code formatting and linting
437
- - Inspired by the need for efficient GitHub repository management
438
-
439
- ## Version
267
+ Built with TypeScript, Commander.js, Octokit, Winston, and Biome.
440
268
 
441
- Current version: 1.0.0
269
+ ---
442
270
 
443
- For the latest updates and release notes, visit: https://github.com/mynameistito/github-archiver/releases
271
+ Current version: 1.0.0 | [Releases](https://github.com/mynameistito/github-archiver/releases)
@@ -0,0 +1,177 @@
1
+ # Release Process
2
+
3
+ This project uses **Changesets** for version management and publishing.
4
+
5
+ ## Overview
6
+
7
+ The release process is **two-step and automated**:
8
+
9
+ 1. **Developer creates changesets** - Explicit intent for what's being released
10
+ 2. **GitHub Actions automates the rest** - Creates version PR, then publishes
11
+
12
+ ## For Contributors
13
+
14
+ ### Creating a Changeset
15
+
16
+ When you've made changes that should be included in a release:
17
+
18
+ 1. **Create a changeset file:**
19
+ ```bash
20
+ bun run changeset:add
21
+ ```
22
+
23
+ 2. **Answer the prompts:**
24
+ - Which packages are affected? → Select `github-archiver`
25
+ - What's the type of change? → Choose:
26
+ - `patch` - bug fixes (1.0.0 → 1.0.1)
27
+ - `minor` - new features (1.0.0 → 1.1.0)
28
+ - `major` - breaking changes (1.0.0 → 2.0.0)
29
+ - Write a description of your change
30
+
31
+ 3. **Commit the generated changeset file:**
32
+ ```bash
33
+ git add .changeset/*.md
34
+ git commit -m "docs: add changeset for feature X"
35
+ ```
36
+
37
+ 4. **Push your branch and open a PR as usual**
38
+
39
+ ### Automated Release
40
+
41
+ Once your PR is merged to `main`:
42
+
43
+ 1. GitHub Actions detects the changeset files
44
+ 2. Creates a "Version Packages" PR with:
45
+ - Updated `package.json` version
46
+ - Updated `CHANGELOG.md` with your descriptions
47
+ - GitHub links to commits and PRs
48
+ 3. Merge the "Version Packages" PR
49
+ 4. GitHub Actions automatically:
50
+ - Publishes to npm
51
+ - Creates a GitHub release
52
+ - Tags the commit with the version
53
+
54
+ ### Changeset File Format
55
+
56
+ Example: `.changeset/excited-newts-talk.md`
57
+
58
+ ```markdown
59
+ ---
60
+ "github-archiver": minor
61
+ ---
62
+
63
+ Add support for custom GitHub token configuration in config file
64
+ ```
65
+
66
+ **Note:** Changeset filenames are auto-generated with whimsical names (e.g., `silly-cats-dance.md`). Edit the description after generation if needed.
67
+
68
+ ## For Maintainers
69
+
70
+ ### Understanding Releases
71
+
72
+ **What triggers a release?**
73
+ - Any changeset file committed to main
74
+ - Automatic via GitHub Actions (no manual intervention needed)
75
+
76
+ **What happens?**
77
+ 1. Action detects changeset files
78
+ 2. Runs validation (tests, lint, typecheck, build)
79
+ 3. Creates "Version Packages" PR with:
80
+ - Version bumps in `package.json`
81
+ - Updated `CHANGELOG.md` with GitHub links
82
+ - Changeset files consumed
83
+ 4. After PR merge: Automatically publishes to npm
84
+
85
+ ### Merging the "Version Packages" PR
86
+
87
+ When GitHub Actions creates a "Version Packages" PR:
88
+ - Review the version bump (patch/minor/major)
89
+ - Review the changelog entries with GitHub links
90
+ - Merge to trigger automatic publish
91
+
92
+ ### Release Changelog
93
+
94
+ The changelog is auto-generated with GitHub links:
95
+
96
+ ```markdown
97
+ ## 1.1.0
98
+
99
+ ### Minor Changes
100
+
101
+ - [abc123d](https://github.com/mynameistito/github-archiver/commit/abc123d) ([#42](https://github.com/mynameistito/github-archiver/pull/42)): Add custom token config support
102
+ ```
103
+
104
+ ### Manual Publishing (if needed)
105
+
106
+ If automation fails, you can publish manually on the commit with updated versions:
107
+
108
+ ```bash
109
+ bun run changeset:publish
110
+ ```
111
+
112
+ ### Troubleshooting
113
+
114
+ **Action not creating PR?**
115
+ - Check that changesets exist in `.changeset/` directory
116
+ - Verify `GITHUB_TOKEN` and `NPM_TOKEN` secrets are configured
117
+ - Review workflow logs in GitHub Actions
118
+
119
+ **Publish failed?**
120
+ - Verify `NPM_TOKEN` has publish permissions
121
+ - Check npm registry status
122
+ - Review the error in GitHub Actions logs
123
+
124
+ **Version bump incorrect?**
125
+ - Verify correct changeset type was selected (patch/minor/major)
126
+ - Check that description was provided
127
+ - Ensure changeset file syntax is valid (YAML front matter)
128
+
129
+ ## Versioning Strategy
130
+
131
+ This project uses **Semantic Versioning**:
132
+
133
+ - **patch**: Bug fixes, minor improvements (1.0.0 → 1.0.1)
134
+ - **minor**: New features, backward compatible (1.0.0 → 1.1.0)
135
+ - **major**: Breaking changes, incompatible updates (1.0.0 → 2.0.0)
136
+
137
+ Choose the appropriate type when creating your changeset.
138
+
139
+ ## GitHub Releases
140
+
141
+ After publishing, a GitHub Release is automatically created with:
142
+ - Release notes generated from CHANGELOG.md
143
+ - Direct link to the npm package
144
+ - Git tag for the release (v1.1.0, etc.)
145
+
146
+ ## Environment & CI/CD
147
+
148
+ **Required Secrets:**
149
+ - `GITHUB_TOKEN` - Auto-provided by GitHub Actions
150
+ - `NPM_TOKEN` - Set in repository settings with publish permissions
151
+
152
+ **Node Version:** 22.x (tested on 24.x and 25.x in CI)
153
+ **Package Manager:** Bun
154
+
155
+ **Publishing Method:** OIDC trusted publishing with npm
156
+
157
+ ## Trusted Publishing Setup
158
+
159
+ This project uses npm's **Trusted Publishing** feature for secure, tokenless package publishing.
160
+
161
+ ### Setup (one-time)
162
+
163
+ 1. Go to https://www.npmjs.com/package/github-archiver/settings
164
+ 2. Under **Trusted Publisher**, click **GitHub Actions**
165
+ 3. Fill in:
166
+ - **Organization or user**: `mynameistito`
167
+ - **Repository**: `github-archiver`
168
+ - **Workflow filename**: `release.yml`
169
+ 4. Click **Set up connection**
170
+ 5. (Recommended) Enable **"Require two-factor authentication and disallow tokens"**
171
+
172
+ That's it! No tokens to manage, rotate, or worry about.
173
+
174
+ ## See Also
175
+
176
+ - [Contributing Guidelines](../CONTRIBUTING.md#release-process)
177
+ - [Changesets Documentation](https://github.com/changesets/changesets)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-archiver",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Archive GitHub repositories via CLI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -8,7 +8,8 @@
8
8
  "github-archiver": "bin/github-archiver.js"
9
9
  },
10
10
  "engines": {
11
- "node": ">=18.0.0"
11
+ "node": ">=22.0.0",
12
+ "bun": ">=1.0.0"
12
13
  },
13
14
  "scripts": {
14
15
  "build": "tsx scripts/build.ts",
@@ -20,7 +21,11 @@
20
21
  "tsc": "tsc --noEmit",
21
22
  "test": "vitest",
22
23
  "test:coverage": "vitest --coverage",
23
- "release": "semantic-release",
24
+ "changeset": "changeset",
25
+ "changeset:add": "changeset add",
26
+ "changeset:version": "changeset version",
27
+ "changeset:publish": "changeset publish",
28
+ "release": "changeset publish",
24
29
  "prepublishOnly": "npm run build && npm run typecheck && npm run lint"
25
30
  },
26
31
  "dependencies": {
@@ -31,11 +36,11 @@
31
36
  },
32
37
  "devDependencies": {
33
38
  "@biomejs/biome": "^2.3.11",
34
- "@semantic-release/changelog": "^6.0.3",
35
- "@semantic-release/git": "^10.0.1",
39
+ "@changesets/changelog-github": "^0.5.2",
40
+ "@changesets/cli": "^2.29.8",
41
+ "@changesets/get-github-info": "^0.7.0",
36
42
  "@types/node": "^25.0.6",
37
43
  "esbuild": "^0.27.2",
38
- "semantic-release": "^25.0.2",
39
44
  "tsx": "^4.21.0",
40
45
  "typescript": "^5.9.3",
41
46
  "ultracite": "^7.0.11",
@@ -52,6 +57,10 @@
52
57
  "license": "MIT",
53
58
  "repository": {
54
59
  "type": "git",
55
- "url": "https://github.com/mynameistito/github-archiver"
60
+ "url": "git+https://github.com/mynameistito/github-archiver.git"
61
+ },
62
+ "publishConfig": {
63
+ "access": "public",
64
+ "registry": "https://registry.npmjs.org/"
56
65
  }
57
66
  }