Skip to content

Commit 697827a

Browse files
committed
chore: latest url
1 parent 75276dd commit 697827a

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

lua/fzf-lua-extra/previewers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function M.store:parse_entry(entry_str, cb)
188188
lines[#lines + 1] = ''
189189
end
190190
lines[#lines + 1] = {
191-
{ '' .. repo.stars, 'FleMagenta' },
191+
{ '' .. repo.stars.curr, 'FleMagenta' },
192192
' ',
193193
{ '🚨' .. repo.issues, 'FleMagenta' },
194194
}

lua/fzf-lua-extra/providers/store.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ local function format_repository_info(repo, compact)
6262
parts[#parts + 1] = repo.full_name
6363
parts[#parts + 1] = '\t'
6464
-- Format stars: Truncate if longer than 8 bytes, then left-align to 8 bytes.
65-
local stars_str = '' .. repo.stars
65+
local stars_str = '' .. repo.stars.curr
6666
local display_stars = stars_str
6767
if #display_stars > 8 then display_stars = string.sub(display_stars, 1, 8) end
6868
parts[#parts + 1] = magenta(string.format('%-8s', display_stars))
@@ -86,10 +86,10 @@ local state = require('fzf-lua-extra.lib.state').new()
8686
state:put('fmt', 'detail', function(p) return format_repository_info(p) end)
8787
state:put('fmt', 'compat', function(p) return format_repository_info(p, true) end)
8888
local sort_by_stars = function(a, b)
89-
return a.stars > b.stars or (a.stars == b.stars and a.issues > b.issues)
89+
return a.stars.curr > b.stars.curr or (a.stars.curr == b.stars.curr and a.issues > b.issues)
9090
end
9191
local sort_by_issues = function(a, b)
92-
return a.issues > b.issues or (a.issues == b.issues and a.stars > b.stars)
92+
return a.issues > b.issues or (a.issues == b.issues and a.stars.curr > b.stars.curr)
9393
end
9494

9595
state:put('sort', 'no_sort', false)
@@ -100,9 +100,9 @@ state:put('sort', 'issues', sort_by_issues)
100100
local __DEFAULT__ = {
101101
-- https://github.com/alex-popov-tech/store.nvim/blob/43e574b5aac28891fe50316fc69727cfc27727a4/lua/store/config.lua#L186
102102
urls = {
103-
store = 'https://gist.githubusercontent.com/alex-popov-tech/92d1366bfeb168d767153a24be1475b5/raw/db.json', -- URL for plugin data
104-
['lazy.nvim'] = 'https://gist.githubusercontent.com/alex-popov-tech/6629a59e7910aa08b1aa5cdc0519b8b4/raw/lazy.nvim.json',
105-
['vim.pack'] = 'https://gist.githubusercontent.com/alex-popov-tech/18a46177d6473e12bc2c854e2548f127/raw/vim.pack.json',
103+
store = 'https://github.com/alex-popov-tech/store.nvim.crawler/releases/latest/download/db_minified.json', -- URL for plugin data
104+
['lazy.nvim'] = 'https://github.com/alex-popov-tech/store.nvim.crawler/releases/latest/download/lazy_db_minified.json',
105+
['vim.pack'] = 'https://github.com/alex-popov-tech/store.nvim.crawler/releases/latest/download/vimpack_db_minified.json',
106106
},
107107
---@param path string
108108
---@return boolean
@@ -170,7 +170,7 @@ local __DEFAULT__ = {
170170
---@field url string Repository URL
171171
---@field description string Repository description
172172
---@field tags string[] Array of topic tags
173-
---@field stars number Number of stars
173+
---@field stars {curr: number, weekly: number, monthly: number} Star counts
174174
---@field issues number Number of open issues
175175
---@field created_at string Creation timestamp (ISO format)
176176
---@field updated_at string Last update timestamp (ISO format)

0 commit comments

Comments
 (0)