1
0
mirror of https://github.com/Jguer/yay.git synced 2025-12-25 03:11:48 +01:00

25 Commits

Author SHA1 Message Date
Jo
aecd78040c
chore(completion): refactor and increase coverage (#2722)
* refactor(completion): separate cache validation from update logic

- Add NeedsUpdate() to check if completion cache is stale
- Rename Update() to UpdateCache() and make it unconditional
- Move caching decision to call sites (Show and sync.Run)
- Improve error handling with proper defer for file close

* increase completion coverage

* launch goroutine if update is needed

* remove user dependent test
2025-12-06 13:20:13 +01:00
Edwin Peer
3629c0a1ff
Don't rely on transparent decompression in sync list (#2710)
* Don't rely on transparent decompression in sync list

The current sync list code relies on the HTTP client library transparently
decompressing the packages.gz file. This only works if the server provides
the 'Content-Encoding: gzip" HTTP header, which has apparently changed
recently.

This patch explicitly decompresses the package list if no encoding
information is provided by the server.

Fixes: https://github.com/Jguer/yay/issues/2709

v2: added gzip closer and added error handling

v3: blindly attempt to decompress, since the content encoding is
stripped by the HTTP client when transparently decompressing.

v4: also fix the fetch in command completion using common interface

Signed-off-by: Edwin Peer <espeer@gmail.com>

* fix failing tests, add fallback logging, add gz testcase

* fix lint

---------

Signed-off-by: Edwin Peer <espeer@gmail.com>
2025-11-28 18:00:03 +01:00
eveneast
61dd708a4a
chore: fix function name in comment (#2430)
Signed-off-by: eveneast <qcqs@foxmail.com>
2024-05-02 10:54:16 +00:00
Jo
fdcf6ef664
ci(yay): add integration test framework (#2178)
* add integration test framework

* fix integration tests

* fix integration tests
2023-05-22 21:38:02 +00:00
Jo
3d5a43c294
chore(yay): bump version (#1949)
bump major
2023-03-07 21:04:06 +00:00
Jo
b8debd1ae7
chore(yay): fix small linting issues (#1885)
* replace context.TODO() in tests context.Background()

* remove mock TODOs

* prettier

* apply missing linting
2023-01-03 21:43:56 +00:00
jguer
1a52da5891
Make provides disabled by default. Add Migration to set provides to disabled 2022-08-05 22:55:54 +02:00
Jguer
44a0a243ed
remove gock from completion package (#1764)
* remove gock from completion package

* fix ci builder

* undo changes to default flow
2022-06-17 16:49:41 +00:00
jguer
1c22cc491c chore(linting): code lint 2022-01-03 13:46:52 +00:00
jguer
555d1ead95
chore(version): bump major version 2021-09-08 22:28:08 +02:00
jguer
e231b2b02d chore(yay): modernize exec commands 2021-08-14 00:10:43 +02:00
jguer
cb4b57f6d8 chore(golangci): add new linters 2021-08-11 22:19:55 +02:00
jguer
a37f4efd73 chore(http): use client for pkg completions 2021-06-09 03:57:37 +02:00
Jannis M. Hoffmann
34f7dbc7fc Narrow interface in completion 2021-03-12 18:11:30 +01:00
jguer
7a3794ae75
feat(interface): interface dbexecutor 2020-08-16 23:42:00 +02:00
jguer
005b29373d
fix(install): remove alpmHandle 2020-08-16 23:41:55 +02:00
jguer
cd8fb7143c
test(completion): add basic AUR tests 2020-07-25 00:55:46 +02:00
jguer
2f88858ce6
fix(parser): squash globals into options 2020-07-06 02:02:12 +02:00
jguer
2dc01d8a3e
fix(init): refactor init to use runtime 2020-07-05 09:36:27 +02:00
jguer
5734faf33b
fix(completions): fix path join not making a proper packages url .fixes #1287 2020-06-13 18:47:42 +02:00
jguer
0c45a390a2
fix(locale): make install with locale 2020-05-30 00:43:18 +02:00
jguer
9fccdcb30f
fix(ci): implement stricter linting settings 2020-05-02 16:17:20 +02:00
Jguer
077b1092fd
pkg/completion interfaces more strict 2019-10-16 00:03:58 +01:00
Jguer
a591b33262
Add errguards throughout the code to enable golangci-lint 2019-10-13 20:56:27 +01:00
Jguer
c5c2e906d3
Move completion to submodule 2019-10-05 02:02:30 +01:00