fix: hardening round from code review (4 P1 + 15 P2)
CI / typecheck + test + build (windows) (push) Canceled after 0s
CI / typecheck + test + build (windows) (push) Canceled after 0s
P1: - settingsStore: back up an unparseable settings.json to .bak before falling back to defaults, so the next mutation can no longer silently wipe custom themes/highlight rules - ptyDispatcher: fan out per-session data/exit handlers (Set instead of a single slot) so SSH split panes stop stealing each other's stream - FilePanel: monotonic refresh token keeps stale listings from painting over a newer navigation; upload finish no longer yanks the panel back - settings.css: active settings-tab label derives from --chrome-fg so it stays visible on the shipped light themes P2 (main/renderer): - paste guard: a paste ending in a newline always confirms - Workspace: closing an SSH pane no longer seeds the local cwd with a remote path - tray: skip close-dialog continuation on a destroyed window - commands: close zombie 'in-progress' session logs at hydrate - zmodem: clear the stale offer timer before arming a new one - connectionsStore: coerce/validate renderer input before persisting - sftp: OperationError marker class keeps translated errors out of the transport-retry classifier - CommandsPanel: surface save failures inside the dialog - ConnectionSidebar: drop a tautological tooltip condition P2 (i18n/tooling/tests): - localize the 16 ANSI color labels and the highlight sample text (21 new keys across zh-CN/zh-TW/en/ja) - sync-changelog: keep ### subheadings, normalize CRLF notes - release.cjs: GitHub release reuse-by-tag (idempotent re-runs); fail loudly on a failed Gitea asset listing - commands-store test: absent historyEnabled now truly tests absence
This commit is contained in:
1 parent
33efbe921e
commit
4e5377f49c
27 files changed
+356
-83
No files matched your search
@@ -33,10 +33,15 @@ const sync = ({ notes, changelog, header, required }) => {
|
||||
|
||||
const body = fs
|
||||
.readFileSync(notesPath, 'utf8')
|
||||
// Drop the notes' own title / `## vX` heading: the section heading is built
|
||||
// here so every changelog stays uniform (`## vX.Y.Z - date`).
|
||||
.replace(/^#.*\n/gm, '')
|
||||
.replace(new RegExp(`^## v${pkgVersion}.*\\n`), '')
|
||||
// Normalize newlines first: a CRLF notes file would otherwise keep its `\r`
|
||||
// in every line, and the join below re-adds the changelog's ending on top —
|
||||
// every line of the merged section rendering as `\r\r\n` (doubled blanks).
|
||||
.replace(/\r\n/g, '\n')
|
||||
// Drop only the notes' own title and the `## v<pkgVersion>` heading: the
|
||||
// section heading is built here so every changelog stays uniform
|
||||
// (`## vX.Y.Z - date`). Stripping every `#`-line (the old behaviour) also
|
||||
// removed `###` subheadings, merging 新功能/修复 groups into one flat list.
|
||||
.replace(new RegExp(`^# .*\\n|^## v${pkgVersion}.*\\n`, 'gm'), '')
|
||||
.replace(/^\s+/, '')
|
||||
.trimEnd()
|
||||
|
||||
|
||||
Reference in new issue
Block a user