* feat(lua): add lua-language-server type stubs for the yay global
Ship a meta/yay.meta.lua definition file that declares the `yay` global,
all yay.opt fields, and every autocmd event payload so lua-language-server
users get completion, hover docs, and typo detection without an
"Undefined global `yay`" warning.
- meta/yay.meta.lua: 232-line stub covering opt (45 fields), log, abort,
create_autocmd with per-event overloads, and 14 payload classes for the
5 autocmd events (AURPreInstall, AURPostDownload, UpgradeSelect,
PostInstall, SearchFilter). Return contracts for UpgradeSelect and
SearchFilter are annotated.
- doc/lua.md: add "Editor support" section with .luarc.json setup.
- doc/init.lua: fix PostInstall example referencing pkg.installed, a
field that does not exist on PostInstallPackage.
- Makefile: install/uninstall meta/yay.meta.lua to
$(PREFIX)/share/yay/meta/ so the documented /usr/share/yay/meta path
exists on installed systems.
Closes#2876
* doc(lua): fix api-since version to v13.0.1
* feat(lua): apply review feedback on type stubs
Type opt fields as string unions with descriptions, rename to yay.d.lua
per LuaLS docs, strip redundant comments from doc/init.lua, bump to v13.0.2.
Tested everything again: go build, go test, lua-language-server, gendocs.
* doc(lua): move "editor support", add hyperlinks
added link to `init.lua` example in "location" paragraph
having "editor support" paragraph at the very bottom of document didn't make any sense. user would want to have lsp editor support right after creating a file in config dir if ever.
removed useless paragraph about `.luarc.json` location that already been explained aboved.
added hyperlinks for luals extensions. couldn't find any special info for helix (unlike jetbrains), but it should be already covered by "other editors"
---------
Co-authored-by: danielwerg <35052399+danielwerg@users.noreply.github.com>
* improve topo performance
* fix: Resolve data race in dep_graph_test and clean up local mods
* cleanup
* feat(dep): add split functionality
* cleanup mem allocs
* fix: propagate Maintainer field through dep graph and upgrade service
Add Maintainer to InstallInfo and propagate it through the dependency
graph (dep_resolve, dep_visual) and UpgradeService. Update docs
generator with TOC support and Lua page builder.
* lint
* docs: add static docs site generator and Pages deployment
Render doc/ (man page, Lua API, init.lua template) into a static HTML site via scripts/gendocs and publish it to GitHub Pages on push to next.
* update gendoc
* add upgrade hook structure
* remove extra field
* feat: Add UpgradeSelect hook logging and security example
Add yay.log API to UpgradeSelect hooks for informational and warning messages.
- Add yay.log.info() and yay.log.warn() for hook logging
- Add doc/examples/recently_modified.lua: practical example to pre-exclude
recently-modified AUR packages (supply chain attack mitigation)
- Update doc/init.lua with improved UpgradeSelect example
- Update doc/lua.md with logging API documentation
- Refactor autocmd and load modules for cleaner log integration
- Add comprehensive unit tests for logging functionality
* lint
* Translate po/en.po in id
100% translated source file: 'po/en.po'
on 'id'.
* Translate po/en.po in id
100% translated source file: 'po/en.po'
on 'id'.
* Translate po/en.po in id
100% translated source file: 'po/en.po'
on 'id'.
* Translate po/en.po in id
100% translated source file: 'po/en.po'
on 'id'.
* Translate po/en.po in id
100% translated source file: 'po/en.po'
on 'id'.
* Translate po/en.po in id
100% translated source file: 'po/en.po'
on 'id'.
* Translate po/en.po in id
100% translated source file: 'po/en.po'
on 'id'.
* Translate po/en.po in id
100% translated source file: 'po/en.po'
on 'id'.
* Translate po/en.po in id
100% translated source file: 'po/en.po'
on 'id'.
* Translate po/en.po in id
100% translated source file: 'po/en.po'
on 'id'.
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
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.
* Translate po/en.po in es
100% translated source file: 'po/en.po'
on 'es'.
* Translate po/en.po in es
100% translated source file: 'po/en.po'
on 'es'.
---------
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* Test coverage hardening and parallel-safe refactors
Add focused test coverage for under-tested operational paths, edge branches,
and make key table-driven suites parallel-safe. Also fixed flaky installer
test execution under repeated/parallel runs.
* chore: fix goimports ordering for golangci-lint
* Test(download): expand integration coverage for download paths
Add integration scenarios for force/pull repo updates, repo-only and skip semantics,
and direct AUR download/scanner coverage used by getpkgbuild and package preparation.
* Test(exe): relax systemd-run path assertion
Fix flaky TestBuildGitCmd by accepting an absolute systemd-run path while still
asserting the expected binary is used.
* Test(text): avoid race in color tests
Remove parallel execution from TestColorHash so global UseColor writes do not
overlap with color consumers in parallel tests and trigger race detector
failures.
* fix potential race conditions
Translate po/en.po in da
100% translated source file: 'po/en.po'
on 'da'.
Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
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.