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

nightconcept / almandine / 14716629923

28 Apr 2025 07:54PM UTC coverage: 95.996%. First build
14716629923

push

github

web-flow
feat: Initial features (#1)

863 of 899 new or added lines in 16 files covered. (96.0%)

863 of 899 relevant lines covered (96.0%)

1.99 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

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

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

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

51
return {
1✔
52
  list_dependencies = list_dependencies,
1✔
53
  help_info = help_info,
1✔
54
}
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