feat(wakatime): split sections into independent per-facet keys#35
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splits the coupled
last30andallTimeWakaTime section keys into fully independent per-facet keys so each Total / Languages / Editors block is toggleable and orderable viaPLUGIN_CONFIG.New section keys (9 total)
last30Total- Last 30 Days total + daily average headlinelast30Languages- Last 30 Days top languageslast30Editors- Last 30 Days top editorsallTimeTotal- lifetime total headlineallTimeLanguages- lifetime top languagesallTimeEditors- lifetime top editorssinceToday- all-time-total one-liner (unchanged)insightsLanguages- last-year languages (unchanged)insightsEditors- last-year editors (unchanged)Breaking change
The previous bundled
last30andallTimekeys are removed (no aliases).DEFAULT_SECTIONSis now['last30Languages'].Implementation notes
last30*keys all read/stats/last_30_days) fetch it only once.renderSectionremains an exhaustive switch over the 9 keys (no default).Verification
npm run buildexit 0npx tsc --noEmitexit 0 (strict tsconfig satisfied)