Skip to content

Commit

Permalink
updated to latest hjson
Browse files Browse the repository at this point in the history
  • Loading branch information
cryi committed Jan 7, 2025
1 parent aabd49f commit 617324f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ami/internals/cli.lua
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ function ami_cli.print_help(ami, options)
print(ami.help_message)
else
if am.options.OUTPUT_FORMAT == "json" then
print(require "hjson".stringify(ami.commands, { invalidObjectsAsType = true, indent = false }))
print(require "hjson".stringify(ami.commands, { invalid_objects_as_type = true, indent = false }))
else
-- collect and print help
if type(title) == "string" then
Expand Down
2 changes: 1 addition & 1 deletion src/version-info.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local AM_VERSION = "0.31.0"
local AM_VERSION = "0.31.1"

return {
VERSION = AM_VERSION,
Expand Down
4 changes: 2 additions & 2 deletions tests/test/am.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ test["parse_args"] = function()
am.__set_interface(interface)

local args = { "test", "-to=randomOption" }
test.assert(hash.sha256_sum(hjson.stringify({ am.parse_args(args) }, { invalidObjectsAsType = true, indent = false, sortKeys = true }), true) ==
test.assert(hash.sha256_sum(hjson.stringify({ am.parse_args(args) }, { invalid_objects_as_type = true, indent = false, sort_keys = true }), true) ==
"39e8e5febeee2a65653b97914971cf0269ba34ce8a801851f10ec9be3d7992a1")
local args = { "test", "-to=randomOption", "test2", "--test3=xxx" }
test.assert(hash.sha256_sum(hjson.stringify({ am.parse_args(args) }, { invalidObjectsAsType = true, indent = false, sortKeys = true }), true) ==
test.assert(hash.sha256_sum(hjson.stringify({ am.parse_args(args) }, { invalid_objects_as_type = true, indent = false, sort_keys = true }), true) ==
"173e8397066e26357a14d99eb49de241dc52e2862ea7f403d4ab1fce2ab1262b")

local args = { "-to=randomOption", "test2", "--test3=xxx" }
Expand Down
2 changes: 1 addition & 1 deletion tests/test/app.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ test["load app model"] = function()
am.options.APP_CONFIGURATION_PATH = "app.json"
os.chdir("tests/app/app_details/2")
pcall(am.app.load_configuration)
local result = hash.sha256_sum(stringify(am.app.get_model(), { sortKeys = true, indent = " " }), true)
local result = hash.sha256_sum(stringify(am.app.get_model(), { sort_keys = true, indent = " " }), true)
os.chdir(default_cwd)
test.assert(result == "4042b5f3b3dd1463d55166db96f3b17ecfe08b187fecfc7fb53860a478ed0844")
end
Expand Down

0 comments on commit 617324f

Please sign in to comment.