aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix(pypi): also provide install_extra_args to pypi.install (#1263)William Boman2023-04-261-1/+5
| | | Closes #1224.
* fix(context): don't write exec wrapper file if it already exists (#1261)William Boman2023-04-261-0/+44
|
* refactor(linker): copy_file instead of rename on Windows (#1254)William Boman2023-04-231-7/+8
| | | | | | | | 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-2/+54
| | | | | | | | | | | | | | | | | 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.
* fix(expr): fix strip_{prefix,suffix} (#1249)William Boman2023-04-221-0/+20
|
* refactor(schemas): don't vendor schemas in mason.nvim (#1248)William Boman2023-04-221-4/+14
| | | | | Instead, schemas are now defined in the package registry and downloaded during installation. See https://github.com/mason-org/mason-registry/pull/1319.
* feat(registry): add .get_all_package_specs() (#1247)William Boman2023-04-221-0/+4
| | | | This is a faster method than .get_all_packages() due to the fact that it only loads package specifications without instantiating mason-core.package instances. Useful for situations where one only needs to read spec data.
* feat(installer): add generic build provider (#1228)William Boman2023-04-186-53/+371
|
* refactor(expr): remove redundant core filters and always stringify reduced ↵William Boman2023-04-182-0/+114
| | | | | value (#1227) The removed filters are not used by mason-registry and are too Lua-specific in nature.
* feat: add require("mason").has_setup flag (#1226)William Boman2023-04-181-0/+8
|
* feat(github): add $MASON_VERSION to build context (#1218)William Boman2023-04-161-1/+7
|
* fix(github): use evaluated out_file as asset file value (#1208)William Boman2023-04-121-1/+63
| | | | | | | | | | | | | | | | | This makes it so that after parsing the source, the `{{source.asset.file}}` context value points to the downloaded file, rather than the raw value. This is helpful for source definitions such as: ```yaml source: id: pkg:github/mrjosh/helm-ls@v0.0.3 asset: - target: win_x64 file: helm_ls_windows_amd64:helm_ls_windows_amd64.exe # … bin: # This now evaluates to "helm_ls_windows_amd64.exe" rather than "helm_ls_windows_amd64:helm_ls_windows_amd64.exe". helm_ls: "{{source.asset.file}}" ```
* fix(powershell): close stdin (#1197)William Boman2023-04-081-1/+24
|
* refactor(std): quiet git checkout (#1186)William Boman2023-04-061-1/+1
|
* fix(github): fall back to curl/wget if gh is not available (#1181)William Boman2023-04-051-13/+13
|
* fix(npm): set install-strategy on npm >= 9 (#1179)William Boman2023-04-041-1/+29
| | | Closes #1175.
* test(async): add tests for control mechanisms (#1176)William Boman2023-04-031-0/+110
|
* refactor: only schedule in a.scheduler() when in fast event (#1170)William Boman2023-04-025-12/+11
| | | Explicitly schedule via `a.wait(vim.schedule)` instead.
* fix(async): early return if no suspend functions (#1165)William Boman2023-04-011-0/+5
|
* feat: add registry.refresh() method (#1096)William Boman2023-03-141-0/+41
|
* style: enforce import order (#1092)William Boman2023-03-1259-163/+163
| | | | | * chore(workflows): update dependencies * style: enforce import order
* feat: add github registry source capabilities (#1091)William Boman2023-03-1233-8/+2388
|
* fix: fix writing pyvenv module wrapper (#1073)William Boman2023-03-061-1/+1
| | | Closes #1071.
* refactor(powershell): remove .script and fix fast API error (#1057)William Boman2023-03-051-46/+2
| | | | Calling vim.fn.executable in the module scope has potential to error if the module is required outside of the main loop.
* refactor(expr): better handling of nil values (#1056)William Boman2023-03-051-8/+11
|
* feat(InstallContext): add strict_mode flag (#1055)William Boman2023-03-053-5/+24
| | | Also add some more ctx.fs methods.
* refactor: don't set MANPATH explicitly (#1042)William Boman2023-03-021-13/+0
| | | After reading through `manpath(1)` a bit more thoroughly, this should not be needed due to `PATH` already being set.
* feat: set $MASON and $MANPATH (#1041)William Boman2023-03-021-0/+22
|
* refactor: simplify linker & receipt writing (#1033)William Boman2023-02-262-6/+21
|
* tests: add LuaRegistrySource spec (#1027)William Boman2023-02-231-0/+50
|
* feat(providers): add more endpoints (#1013)William Boman2023-02-191-0/+4
|
* feat(installer): add share links (#965)William Boman2023-02-1715-37/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat(installer): add share links Adds the ability to symlink share files to ~/.local/share/nvim/mason/share (default location). This is currently not used by any packages but will be soon (e.g. linking .jar files to a canonical location on the fs). This also includes the following changes: - fix(windows): correctly unlink executables Prior to this change, executables on Windows would not be removed when uninstalling a package. - refactor(installer): use Result interfaces The motivation behind this is to move away from exceptions and pcalls to leverage the Result interface. This allows for better error messaging during installation, as well as improved composability of actions that may or may not fail. - refactor(bin): use absolute paths in exec wrapper scripts While relative paths are preferred and will end up returning in the future, they i) cannot be guaranteed for all packages, and ii) is somewhat complicated to produce due to lack of std APIs. Moving the entire Mason installation directory was never officially supported anyway. - feat(installer): add "force" flag When this flag is true, any existing executables or share files will be overridden if they exist (i.e. mangle another package installation). * refactor(result): always return Result objects in Result.try The rationale here used to be that exceptions in Result.try() blocks were treated truly as exceptions that should interrupt code execution per Lua's traditional error handling semantics. However, Lua code is somewhat prone to raise exceptions when you don't expect it to (especially when interacting with loosely documented external APIs). Combine this with the fact that code that invokes Result.try() blocks generally doesn't `pcall` and only relies on the Result API to handle errors, you end up with code that only gracefully handles one class of errors (the well-known ones). * test(terminator): sleep in tests to avoid race condition I've no idea why this doesn't pass in CI, works just fine locally.
* chore: fix some typosZhizhen He2023-02-151-1/+1
|
* refactor(api): %s,\v(api/)repo,\1github (#981)William Boman2023-02-111-2/+2
|
* feat(functional): add list.index_by (#882)William Boman2023-01-101-0/+13
|
* feat(registry): add has_package() method (#847)William Boman2023-01-041-0/+20
|
* refactor(expr): rename to interpolate (#836)William Boman2023-01-021-10/+12
|
* feat(functional): add split_every and default_to (#835)William Boman2023-01-022-0/+21
|
* feat(dotnet): ignore failed sources (#792)Stone Lasley2022-12-301-0/+1
|
* fix(powershell): terminate stdin with newline (#818)William Boman2022-12-281-1/+2
| | | | | Powershell doesn't seem to be closing the process after commands finsh executing and stdin is closed, not entirely sure why. This seems to fix the issue.
* refactor: interact with libuv pipes in async context (#808)William Boman2022-12-261-2/+6
| | | Also now properly close pipes (shutdown -> close).
* feat(powershell): set $ErrorActionPreference = "Stop"; (#807)William Boman2022-12-261-9/+18
| | | Also write to stdin pipe asynchronously.
* refactor(installer): write debug log file after installation finishes (#806)William Boman2022-12-261-0/+19
|
* feat(expr): add tbl_interpolate() (#805)William Boman2022-12-261-3/+39
|
* feat(result): add .try() interface (#804)William Boman2022-12-261-0/+107
|
* feat(functional): add strip_{prefix,suffix} (#803)William Boman2022-12-262-3/+18
|
* refactor(installer): introduce PackageInstallOpts class (#802)William Boman2022-12-2611-21/+21
|
* refactor(async): error with stack level 0 (#801)William Boman2022-12-261-1/+1
|
* Revert "fix(spawn): always expand cmd if PATH is not modified (#773)" (#783)William Boman2022-12-211-47/+15
| | | This reverts commit dd04b4105e84620685c37efb6ca935d282e11465.
* fix(powershell): use pwsh if available (#782)William Boman2022-12-211-0/+97
|