Skip to content

fix(extension): stabilize update marker#332

Open
iFwu wants to merge 2 commits into
antfu:mainfrom
iFwu:fix/stable-update-marker
Open

fix(extension): stabilize update marker#332
iFwu wants to merge 2 commits into
antfu:mainfrom
iFwu:fix/stable-update-marker

Conversation

@iFwu
Copy link
Copy Markdown

@iFwu iFwu commented Apr 28, 2026

Description

Use the timestamp embedded in the upstream README config block for the generated explorer.fileNesting.patterns["//"] marker instead of formatting the local update time with toLocaleString().

Before this change, the extension rewrote the marker with each machine's local locale, for example:

"//": "Last update at 2026/4/23 22:05:30"
"//": "Last update at 4/27/2026, 4:01:10 PM"

When VS Code/Cursor settings are synced across Windows and macOS (via Settings Sync, dotfiles, or a git-tracked settings.json), the same upstream file-nesting config can therefore create platform-specific churn and merge conflicts even when the actual nesting patterns are identical.

This keeps the previous marker shape (Last update at ...) but makes the value deterministic by reusing the upstream README timestamp, for example:

"//": "Last update at 2026-04-20 00:47 UTC"

The marker is not used for file-nesting parsing or config comparison: the extension already removes the "//" marker before comparing local patterns, while the upstream README parser strips JSONC comment lines before JSON.parse.

Linked Issues

N/A. No exact existing issue/PR was found for the locale-specific update marker; related updater behavior discussions include #127 and #218.

Verification

  • git diff --check
  • Parsed the current README config block with Node to verify the upstream timestamp and JSON extraction still work.

fuxiao and others added 2 commits April 28, 2026 13:29
Use the upstream README timestamp for the generated settings marker instead of formatting the local update time. This keeps the marker deterministic across operating systems and avoids locale-specific settings churn.

Co-authored-by: Codex <noreply@openai.com>
Keep the generated marker compatible with the previous text shape while making the timestamp deterministic. This limits the change to the timestamp source and reduces risk for ad-hoc readers.

Co-authored-by: Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant