• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nightconcept / almandine / 14715174283

28 Apr 2025 06:32PM UTC coverage: 37.748%. First build
14715174283

push

github

web-flow
Merge 789647aa5 into 78f97e22e

477 of 566 new or added lines in 14 files covered. (84.28%)

1693 of 4485 relevant lines covered (37.75%)

11.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.67
/src/modules/list.lua
1
--[[
2
  List Command Module
3

4
  Provides functionality to list all installed dependencies and their versions as recorded in the lockfile
5
  (almd-lock.lua) or manifest (project.lua).
6
]]--
7

8
--- Lists installed dependencies and their versions.
9
-- @param load_manifest function Function to load the manifest.
10
-- @param load_lockfile function Function to load the lockfile.
11
local function list_dependencies(load_manifest, load_lockfile)
12
  local lockfile = nil
3✔
13
  local lockfile_exists = false
3✔
14
  if type(load_lockfile) == "function" then
3✔
15
    lockfile = load_lockfile()
2✔
16
    lockfile_exists = lockfile ~= nil
2✔
17
  end
18
  local dependencies = {}
3✔
19
  if lockfile_exists and type(lockfile) == "table" and lockfile.dependencies then
3✔
20
    dependencies = lockfile.dependencies
1✔
21
  else
22
    local manifest = load_manifest()
2✔
23
    if type(manifest) == "table" and manifest.dependencies then
2✔
24
      dependencies = manifest.dependencies
1✔
25
    end
26
  end
27
  if next(dependencies) == nil then
3✔
28
    print("No dependencies found.")
1✔
29
    return
1✔
30
  end
31
  print("Installed dependencies:")
2✔
32
  for name, dep in pairs(dependencies) do
5✔
33
    local version = dep.version or (dep.hash and "#" .. dep.hash) or "(unknown)"
3✔
34
    print(string.format("  %s\t%s", name, version))
3✔
35
  end
36
end
37

38
---
39
-- Prints usage/help information for the `list` command.
40
-- Usage: almd list
41
-- Lists all installed dependencies and their versions.
42
local function help_info()
NEW
43
  print([[\nUsage: almd list
×
44

45
Lists all installed dependencies and their versions as recorded in the lockfile or project.lua.
46
Example:
NEW
47
  almd list]])
×
48
end
49

50
return {
1✔
51
  list_dependencies = list_dependencies,
1✔
52
  help_info = help_info
1✔
53
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc