Commit Graph
91 Commits
Author SHA1 Message Date
github-actions[bot] 9ae45b9b39 test(query): normalize matcher inputs in unit test (#2942)
test(query): normalize matcher inputs in unit test
2026-08-07 12:05:05 +09:00
github-actions[bot]andCopilot c7a6d20e62 [repo-assist] Ignore unknown Lua search-filter results (#2930)
fix(query): ignore unknown search filter results

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-31 02:57:21 +09:00
github-actions[bot]andCopilot caab26bfda [repo-assist] test(query): cover multi-term search matching (#2938)
test(query): cover multi-term search matching

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-31 02:56:18 +09:00
github-actions[bot]andCopilot 63f162762b [repo-assist] perf(query): normalize search terms once per query (#2928)
perf(query): normalize search terms once per query

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-31 02:55:56 +09:00
Jo 4a5a0f3d33 fix(query): improve multi-term search ranking and filtering (#2926)
- Join search terms with space instead of empty separator so Jaro-Winkler
  similarity compares against realistic strings (e.g. 'linux ck' vs 'linuxck')
- Change matchesSearch symbol check from early return to continue so non-symbol
  terms in multi-term queries are still filtered instead of being bypassed
2026-07-21 21:40:51 +00:00
github-actions[bot] 29f7ed87c4 perf(query): normalize package fields once per search (#2922)
perf(query): normalize package fields once per search
2026-07-20 10:50:41 +02:00
Jo 4869306719 feat(search): implement render-hooks for search (#2896)
* add render hooks

* re-render hook per event

* add example with single_line and simplify built rendering

* update docs availability

* remove comments
2026-07-06 14:15:57 +02:00
Jo 19cd422953 query: precompute metricScore and update deps (#2893)
* query: precompute metricScore once per result

Normalize the search term and name/provider/desc at the metric boundary, drop the per-comparison distance cache, and score each result via prepareMetrics before sorting. Adds a search-flow benchmark to track regressions.

* update deps
2026-06-27 16:47:41 +02:00
Jo 02fb6ba948 fix(search): fix clober of packages from different sources with the same name (#2882) 2026-06-19 22:39:39 +02:00
Jo 8fcaff9e6f fix(depgraph): reduce memory allocations (#2875)
* cleanup mem allocs

* lint
2026-06-18 19:58:23 +02:00
Jo 70d7a0f0a8 fix(lua): Reduce event size of PostInstall and SearchFilter hooks (#2871)
* remove fields from events that might not be needed yet

* reduce event size
2026-06-17 21:40:02 +02:00
Jo 15057c8dab misc(ci): add modernize linter and update versioning (#2870)
* add modernize linter

* lint unused

* update imports

* ignore agent info
2026-06-17 21:09:53 +02:00
Jo 3b3a2b1dcc fix: search filter hooking and multierror cleanup (#2868)
* fix search filtering pass along

* prepare inclusion 'modernize' linter and use errors.join instead
2026-06-17 19:34:33 +02:00
Jo 4dbf124c51 feat(lua): add search filter and post install hooks (#2867)
* search filter and post install

add examples

* add tag
2026-06-16 23:35:18 +02:00
rebel onion 977c9562ce feat: Show AUR Package Age (#2846)
* feat: show AUR package age
2026-06-12 11:11:50 +02:00
Jo ac83d3fb06 Switch to JaroWinkler distance and reweight package search scores (#2840)
fix(query): use JaroWinkler distance and reweight metric components

Switch from Hamming to JaroWinkler distance for package name matching,
as JaroWinkler handles variable-length strings and gives a prefix-match
bonus better suited to package search.

Reweight the score components from sim*0.50 + simDesc*0.20 + popularity*0.30
to sim*0.35 + simDesc*0.15 + popularity*0.50 to better surface popular
packages when name similarity is moderate.

Roll back the unreleased version target from 13.0.0 to 12.6.0 to align
with the next minor release after v12.5.7.

Fix scanner.Err() check in parseStdin to surface I/O errors that were
previously silently dropped.
2026-06-07 18:16:46 +02:00
TurtleRuss 412c145eb4 fix(query): incorporate AUR popularity into search metric (#2789)
Replace vote-only sigmoid with a blended votes+popularity score in
aurSortByMetric. AUR's Popularity field (already stored and populated
from the API) is a time-decayed vote score that better reflects current
relevance than raw NumVotes alone.

Falls back to votes-only when popularity <= 0 (brand-new packages).
Uses the same sigmoid normalization pattern as the existing minVotes
constant (minPopularity = 0.5).

Side effect: AUR packages no longer artificially outscore repo packages
via historical vote counts when separateSources is disabled. Updated
two noseparatesources test expectations accordingly.
2026-03-15 23:14:54 +01:00
Jo 0a928ba9f4 feat(yay): use dyalpm for alpm usage (#2769)
* squash: dyalpm integration

* fix vercmp

* fix linting
2026-01-22 16:46:55 +01:00
Joey Holtzman 733e6a6b17 Add support for all sortyby options (#2747)
* Add all sortyby options

Previously, only 'name' was a supported sortby option. Now, all sortby
options are supported.

Whenever there is a tie, the metric is used as a tiebreaker (it is also
the default when sortby is not specified). The only behavior that
changed is that packages with the same metric are sorted oppositely when
sorting bottomUp. This was actually a bug in the previous implementation
which inverts the `cmpResult` for bottomUp which returns true if the
metrics are the same. According to the docs for Less
(https://pkg.go.dev/sort#Interface), Less(i, i) should be false (the
same element cannot sort before itself).

I mainly structured the code for efficiency by creating the sortby
function once rather than checking `separateSources` and `bottomUp`
every comparison, but I also think this improves readability compared to
having a switch-case in the comparison function.

* Fix separating sources on ties and improve test coverage

* Remove 'id' and 'baseid' in sortby options
2026-01-22 09:26:35 +01:00
LordBeerus c466b96b94 fix: Correctly return exit status 1 when no packages are found (#2705)
* fix: Correctly return exit status 1 when no packages are found

* add testing for targets not found
2025-12-21 15:54:23 +01:00
Jo df80f397af feat(repo): Sort repository results by pacman.conf repo order (#2740)
* ci(yay): update packages on builder before building release

* respect other repos in order

* ensure repo ends on top in case of tie

* revert dockerfile change
2025-12-19 21:13:47 +01:00
Jo 81440e54a4 chore(go): modernize syntax (#2672)
* modernize go syntax

* fix lint
2025-09-18 18:05:58 +02:00
Tamim Baschour 570b524f88 Turn search results into clickable links to their repo pages (#2653)
* Make package names clickable links to their repo pages using OSC 8 sequences (official arch repos and AUR only)

* fmt

* Map "devel" repo to AUR when creating package links

* Revert pkg/upgrade/upgrade.go This wasn't supposed to be here yet.
2025-08-13 15:16:26 +01:00
Jo b745f87210 chore(ci): update golangci lint v2.1.5 (#2615)
* chore(ci): update golangci-lint to v2.1.5 in ci.Dockerfile

* add golangci

* fix lint

* fix lint pkg/upgrade

* reenable lint
2025-05-01 10:00:10 +02:00
Jo 26aa171b2b fix(query): remove -debug packages from missing list if base package is installed (#2372)
* chore(yay): fix pre-commit

* chore(yay): fix git ignore
2024-02-19 10:29:47 +00:00
Jo 8916cd174b refactor(yay): move cfg inside of runtime (#2259)
* rework relationship between runtime and cfg

* separate runtime from cfg

* simplify instantiation logic

* move installer to appropriate package

* move operator to sync package

* add tests for srcinfo service

* consolidate srcinfo service in sync

* add logger to srcinfo

* add logger to preparer

* remove unused text functions

* remove remaining text.* from srcinfo

* remove global logger parts

* remove global org method exports

* remove global logger

* move text->input

* add rule to prevent fmt.Print

* update golangci go version

* remove outdated FAQs

* remove outdated FAQs
2023-08-06 21:39:41 +02:00
Jo 04c82b8112 chore(yay): replace custom set package with dep (#2249)
* replace string set with dep

* remove unused field

* remove custom string set package
2023-07-23 17:29:01 +00:00
smolx 12282fb28a Fix sorting by name in package search (#2198)
Slightly reorganize and add more tests for SourceQueryBuilder.
2023-06-03 14:01:17 +00:00
Jo e28319fece chore(yay): lift legacy engine (#2189)
* remove legacy engine

* remove legacy dep handlers

* use prepare for gendb

* remove unused method

* remove aur client old interface

* remove unused menu fns

* remove inactive upgrademenu option

* unexport printInfo
2023-05-24 08:22:18 +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
Tanmay Chaudhry 4832ec59db Fix version diff word detection (#2124)
* Fix version diff word detection

* remove double negation

* preserve text color after tests
2023-04-27 07:23:25 +00:00
Jo 49267b9cd9 feat(upgrade): separate menu for pulled along dependencies (#2141)
try separate menu for pulled along

use installed as term

fix order gap

fix tests

add aur db + aur scenario
2023-04-27 07:20:21 +00:00
Jo 83214fbc1c chore(yay): add local newer to AUR warnings (#2113) 2023-04-11 21:15:47 +00:00
Jo 26c9ab5a87 fix(yay): fix panic -Si when package is missing (#2111)
fix panic -Si
2023-04-11 16:45:20 +00:00
adasauce 76e5ee1fa6 fix: querybuilder GetTargets start iteration at 1, when include is 0 causes a crash (#2109) 2023-04-11 16:23:19 +00:00
Jo c7a51a1614 fix(text): ensure error logs go to stderr (#2105)
ensure Error logs go to stderr
2023-04-10 16:26:09 +00:00
Jo 1ee94f28d3 fix(new_engine): add missing warnings to AUR updates (#2087)
* add missing warnings to AUR updates

* fix tests
2023-04-06 17:06:46 +00:00
Jo c63576c36d fix(search): always trust search if there's only one term (#2046)
always trust search if there's only one term
2023-04-03 07:16:03 +00:00
Jo dd42593ba1 fix(search): only do exact trim in certain modes (#2045)
only do exact trim in certain modes
2023-04-02 17:50:35 +00:00
Jo d13bdb0ce1 feat(search): improve exact match for separate source (#2044)
* unify query builder

* remove uneeded code

* reorganize code
2023-04-02 00:23:02 +00:00
Jo 6390d1c2b0 chore(query_builder): tweak mixed sources similarity matcher. related to #1719 (#2043)
tweak mixed sources similarity matcher. related to #1719
2023-04-01 13:30:50 +00:00
Jo 5d1c54413c fix(query_builder): use correct aur client for mixed query builder (#2041)
* use same repo search as pacman

use logger child from runtime

* use common interface for aur clients
2023-04-01 10:33:05 +00:00
Jo 3d5a43c294 chore(yay): bump version (#1949)
bump major
2023-03-07 21:04:06 +00:00
Jo fa2e726ca6 chore(text): use logger in new engine services (#1939)
* use logger in vcs

* use logger in query builder

* use logger in migrations
2023-02-25 19:03:27 +00:00
Jo f0433cc339 feat(metadata): respect regex in search (#1922)
respect regex in search
2023-02-21 01:24:48 +00:00
Jo 7490836991 fix(new_engine): respect --needed on target gathering (fixes #1552) (#1920)
* use logger in dep graph

* use logger in dep graph

* use logger in dep graph

* only query for AUR packages once per tier. useful for rpc

* fix performance regression for ros-melodic

* prefer name search first

* implement needed at target gathering

* set default config

* fixup tests for needed
2023-02-20 23:14:59 +00:00
Jo 8d18f1be18 fix(new_engine): add aur client support to mixed source display (#1919)
* update aur client and use correct aur client

* add aur query client support for mixed source engine
2023-02-20 12:14:16 +00:00
Jo f1d086df1d Allow use of rpc client as an alternative to the metadata client (#1918)
* use updated aur client

* add logger to rpc client

* update go.mod
2023-02-20 11:20:48 +00:00
Jo 0bf4c2e502 feat(new_install): show (#1915)
* show new packages in upgrade form if they exist

* refactor up select

* remove unused graph parts

* readd len

* Complete upgrade graphing

* Extract to upgrade pkg

* remove unused dep method

* remove uneeded dep

* cleanup method

* specify io Reader for testing

* use specified input vector

* fix non-active devel

* test base cases

* add devel test cases

* add range tests

* add logger struct

* use logger struct in upgrade

* follow golangci recommendations

* update deps

* update golangci
2023-02-17 19:01:26 +00:00
Jo 4f50b799ef feat(local_install): add choice menu for yay -Bi (#1903)
add choice menu for yay -Bi
2023-01-23 23:54:15 +00:00