|
1 | 1 | # Release Notes |
2 | 2 |
|
| 3 | +## v3.1.0 |
| 4 | + |
| 5 | +> **Release Date**: 2026-05-01 |
| 6 | +> **Focus**: LeetCode China (leetcode.cn) Full Support + Credential UX |
| 7 | +
|
| 8 | +### 🌏 LeetCode China Support |
| 9 | + |
| 10 | +- Full `leetcode.cn` integration across CLI and TUI. |
| 11 | +- New `LeetCodeSite` type with site utility helpers (`normalizeLeetCodeSiteInput`, `getLeetCodeSiteLabel`). |
| 12 | +- GraphQL query packs split into site-specific files (`queries.global.ts`, `queries.cn.ts`) — CN uses the correct native schema for problem list, daily, and problem detail. |
| 13 | +- CN-specific Zod schemas for type-safe response parsing. |
| 14 | +- CN response adapters that normalize China API responses into the shared CLI data model. |
| 15 | +- `LeetCodeClient` is now fully site-aware: switches base URL, query pack, and cookie headers automatically. |
| 16 | +- Site selection available in `login`, `config`, and `workspace` commands. |
| 17 | +- Site preference persisted per workspace in config file. |
| 18 | +- TUI Config screen: site switching with a mandatory confirmation modal that forces an immediate session logout and redirect to login. |
| 19 | + |
| 20 | +### 🔐 Credential & Auth UX |
| 21 | + |
| 22 | +- `leetcode login --help` now documents all three credential storage backends: |
| 23 | + 1. **System Keychain** (default) — macOS/Windows/Linux OS-native secure storage via `keytar`. |
| 24 | + 2. **Encrypted File** — AES-256-GCM via `LEETCODECLI_CREDENTIAL_BACKEND=file` + `LEETCODECLI_MASTER_KEY`. |
| 25 | + 3. **Environment Variables** — read-only headless mode via `LEETCODE_SESSION` + `LEETCODE_CSRF_TOKEN`. |
| 26 | +- TUI site switch now correctly wipes the in-memory session (not just persisted config), ensuring users are immediately signed out and redirected to the login screen. |
| 27 | + |
| 28 | +### 🧪 Test Stability |
| 29 | + |
| 30 | +- Mocked `versionStorage` in update/changelog tests to prevent phantom `999.0.0` update cache leakage into real environments. |
| 31 | +- Mocked outbound `got` network requests in changelog tests to prevent rate-limit failures in CI. |
| 32 | +- All 283 tests pass cleanly across Node 20/22/24 on Ubuntu and macOS. |
| 33 | + |
| 34 | +### ⚙️ CI |
| 35 | + |
| 36 | +- CI and CodeQL workflows now also run on `dev` branch pushes. |
| 37 | + |
| 38 | +--- |
| 39 | + |
3 | 40 | ## v3.0.1 |
4 | 41 |
|
5 | 42 | > **Release Date**: 2026-04-20 |
|
0 commit comments