aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core
Commit message (Collapse)AuthorAgeFilesLines
...
* refactor(receipt): change receipt structure and remove old builder APIs (#1521)William Boman2025-02-165-100/+49
|
* fix(package): support older receipt structures (#1520)William Boman2025-02-161-1/+5
|
* fix(installer): schedule back to main loop before executing installer ↵William Boman2025-02-161-0/+1
| | | | functions (#1516)
* refactor!: consolidate Lua registry sources and the Package API (#1498)William Boman2025-02-166-193/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | **This removes the following APIs:** - `Package:check_new_version()`. Instead use the new `Package:get_latest_version()`. **This has a breaking change in the following APIs:** - `Package:get_installed_version()` now no longer takes a callback but instead returns the installed version or `nil` if not installed. <details> <summary>To handle these breaking changes in plugins, leverage the `mason.version` module, for example:</summary> ```lua local mason_version = require("mason.version") local registry = require("mason-registry") local pkg = registry.get_package("rust-analyzer") if mason_version.MAJOR_VERSION < 2 then -- before pkg:check_new_version(function (success, new_version) -- … end) pkg:get_installed_version(function (success, installed_version) -- … end) else -- after local new_version = pkg:get_latest_version() local installed_version = pkg:get_installed_version() fi ``` </details> --- <details> <summary>This change also introduces breaking changes for Lua registry sources, by consolidating the package schema with the registry.</summary> The following is an example of a package defined in a Lua registry, following the new schema: ```lua local Pkg = require("mason-core.package") return Pkg.new { schema = "registry+v1", name = "ripgrep", description = "ripgrep recursively searches directories for a regex pattern while respecting your gitignore.", homepage = "https://github.com/BurntSushi/ripgrep", licenses = { Pkg.License.MIT }, languages = {}, categories = {}, source = { id = "pkg:mason/ripgrep@13.0.0", ---@param ctx InstallContext ---@param purl Purl install = function(ctx, purl) -- Arbitrary installation code. end, }, bin = { rg = "./bin/rg", }, } ``` </details>
* refactor!: remove old managers (#1497)William Boman2025-02-1620-1809/+15
|
* feat(ui): add backdrop (#1759)Hung Vu2025-02-151-18/+51
| | | | | | | | | | | | | | | Adds a backdrop for the Mason window. Can be disabled by setting the `ui.backdrop` option: ```lua require("mason").setup { ui = { backdrop = 100 } } ``` The backdrop is not displayed if `'termguicolors'` is not enabled or if Neovim is transparent. Co-authored-by: William Boman <william@redwill.se>
* fix(fs): fall back to `fs_stat` if entry type is not returned by ↵Nicolas Thierry2025-02-151-0/+7
| | | | | `fs_readdir` (#1783) Co-authored-by: William Boman <william@redwill.se>
* fix: avoid calling vim.fn in fast event (#1878)William Boman2025-02-152-3/+5
|
* fix(ui): reposition window if border is different than "none" (#1859)Pedro Gabriel de Morais Ribeiro2025-02-151-5/+7
| | | Co-authored-by: William Boman <william@redwill.se>
* fix: replace deprecated calls to vim.validate (#1876)Mark Sommers2025-02-151-20/+23
| | | Co-authored-by: William Boman <william@redwill.se>
* fix(pypi): prefer stock python3 if it satisfies version requirement (#1736)Inhyuk Cho2024-07-091-2/+4
|
* fix(pypi): allow access to system site packages by default (#1584)Silico_Biomancer2024-07-071-1/+2
| | | Co-authored-by: William Boman <william@redwill.se>
* feat(pypi): improve resolving suitable python version (#1725)William Boman2024-06-014-17/+140
|
* fix(pypi): exclude python3.12 from candidate list (#1722)William Boman2024-05-311-1/+0
| | | Support for python3.12 among pypi packages is pretty poor, this limits the upper bound to python3.11 instead.
* fix: avoid calling vim.fn.has inside fast event (#1705)William Boman2024-05-121-3/+1
| | | | When this module is lazily required inside functional/init.lua we may be inside a fast event, causing the module to fail to load due to the top-level call to vim.fn.has.
* fix: fix usage of deprecated Neovim APIs (#1703)William Boman2024-05-116-4/+29
|
* fix(pypi): fix variable shadowing (#1610)William Boman2024-01-291-1/+3
|
* feat(pypi): attempt more python3 candidates (#1608)William Boman2024-01-251-12/+59
|
* fix(golang): fix fetching package versions for packages containing subpath ↵William Boman2024-01-221-1/+1
| | | | specifier (#1607)
* feat: don't use vim.g.python3_host_prog as a candidate for python (#1606)William Boman2024-01-212-10/+2
| | | | This is inconsistent with how other system dependencies are resolved and is not documented anywhere.
* fix(ui): don't indent empty lines (#1597)Will Lillis2024-01-211-9/+10
|
* feat: add support for openvsx sources (#1589)William Boman2024-01-0613-143/+232
|
* fix(cargo): don't attempt to fetch versions when version targets commit SHA ↵William Boman2023-12-291-0/+7
| | | | (#1585)
* fix(pypi): support MSYS2 virtual environments on Windows (#1547)William Boman2023-11-081-17/+26
|
* chore: decrease log level (#1467)William Boman2023-08-251-1/+1
|
* fix(std): use gtar if available (#1433)3uryd1ce2023-08-191-1/+4
| | | Closes #1415.
* feat(cargo): support fetching versions for git crates hosted on github (#1459)William Boman2023-08-191-0/+14
|
* chore(async): add Channel (#1456)William Boman2023-08-171-2/+60
|
* chore(logging): fix log string (#1444)William Boman2023-08-091-1/+1
|
* fix(installer): retain unmapped source fields (#1399)William Boman2023-07-211-2/+1
| | | Fixes #1398.
* feat(ui): display package deprecation message (#1391)William Boman2023-07-041-0/+5
|
* fix(purl): percent-encoding is case insensitive (#1382)William Boman2023-06-291-1/+7
|
* fix(linker): ensure exec wrapper target is executable (#1380)William Boman2023-06-282-19/+21
| | | Fixes #1368.
* feat(installer): write more installation output to stdout (#1376)William Boman2023-06-2812-5/+20
| | | This should give better insights into the installation progress.
* chore(ci): upgrade linter versions (#1377)William Boman2023-06-281-10/+16
|
* fix(installer): timeout schema download after 5s (#1374)William Boman2023-06-281-1/+10
| | | Closes #1361.
* feat(fetch): add explicit default timeout to requests (#1364)William Boman2023-06-221-2/+8
|
* feat(fetch): include mason.nvim version in User-Agent (#1362)William Boman2023-06-211-1/+2
|
* refactor(installer): hoist version validation to the compiled installation ↵William Boman2023-06-179-54/+22
| | | | entrypoint (#1357)
* feat(command): improve completion for :MasonInstall (#1353)William Boman2023-06-1313-6/+101
| | | | Now also supports completing versions if completion is triggered when specifying a version, e.g. "rust-analyzer@".
* fix(functional): strip_prefix and strip_suffix should not use patterns (#1352)William Boman2023-06-131-8/+14
|
* fix(async): always check channel state (#1351)William Boman2023-06-131-6/+7
|
* feat(installer): lock package installation (#1290)William Boman2023-05-182-43/+78
|
* feat(ui): add search mode (#1306)William Boman2023-05-172-0/+26
|
* chore(Optional): add :and_then() (#1270)William Boman2023-04-281-0/+10
|
* fix(pypi): also provide install_extra_args to pypi.install (#1263)William Boman2023-04-261-0/+1
| | | Closes #1224.
* fix(context): don't write exec wrapper file if it already exists (#1261)William Boman2023-04-261-0/+3
|
* feat(linker): add ruby exec wrapper delegate (#1260)William Boman2023-04-263-3/+26
|
* refactor(linker): copy_file instead of rename on Windows (#1254)William Boman2023-04-232-4/+12
| | | | | | | | Renaming the file will move it from its original installation directory. While reaching into package installation directories is unsupported and not recommended, it seems to be done pretty broadly. In order to avoid unnecessarily breaking people's configs we copy the file instead, for now. (tip: use the stable locations inside $MASON/share $MASON/opt $MASON/bin, if a package is missing a link please open an issue/PR). This will be reversed back to use uv_fs_rename() in 1.x.x.
* fix(linker): don't symlink on Windows (#1253)William Boman2023-04-231-15/+25
| | | | | | | | | | | | | | | | | 1) FAT (FAT32, exFAT, etc.) file systems doesn't support symlinks. 2) You need administrator access in order to create symlinks. This was working for me locally because I'm running a NTFS fs with "Developer Mode" enabled in Windows 10, which bypasses administrator requirement for mklink. Instead we uv_fs_rename() links. This should effectively be the same, but will require special handling down the road if/when for example multiple package versions can be installed at the same time. When unlinking a package the renamed files should me moved back into the package installation directory, instead of simply being unlinked (i.e. removed). Closes #1251.