From 770e49d98a53f50c0b7596f34d9c972333b2fd9f Mon Sep 17 00:00:00 2001 From: "M.Schirmer" Date: Tue, 12 May 2026 08:35:05 +0200 Subject: [PATCH] fix bugs after upgrading to neovim 0.12 --- lua/test-samurai-vitest-runner/init.lua | 4 ++-- tests/test_vitest_runner_spec.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/test-samurai-vitest-runner/init.lua b/lua/test-samurai-vitest-runner/init.lua index a56ec57..f6c7ce4 100644 --- a/lua/test-samurai-vitest-runner/init.lua +++ b/lua/test-samurai-vitest-runner/init.lua @@ -543,7 +543,7 @@ function runner.build_failed_command(last_command, failures, _scope_kind) if last_command and last_command.cmd then return { cmd = last_command.cmd, cwd = last_command.cwd } end - local cwd = vim.loop.cwd() + local cwd = vim.uv.cwd() return { cmd = base_cmd(cwd), cwd = cwd } end @@ -568,7 +568,7 @@ function runner.build_failed_command(last_command, failures, _scope_kind) end end if #cmd == 0 then - cmd = base_cmd(last_command and last_command.cwd or vim.loop.cwd()) + cmd = base_cmd(last_command and last_command.cwd or vim.uv.cwd()) end table.insert(cmd, "--testNamePattern") table.insert(cmd, pattern) diff --git a/tests/test_vitest_runner_spec.lua b/tests/test_vitest_runner_spec.lua index 01af7ec..4381b19 100644 --- a/tests/test_vitest_runner_spec.lua +++ b/tests/test_vitest_runner_spec.lua @@ -9,7 +9,7 @@ end local function with_project(package_json, fn) local root = vim.fn.tempname() vim.fn.mkdir(root, "p") - root = vim.loop.fs_realpath(root) or root + root = vim.uv.fs_realpath(root) or root if package_json then write_file(root .. "/package.json", package_json) end