From 0728077cb0254bf2cb8cfc920a20f184a1a73fde Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 1 Jul 2018 16:54:25 -0300 Subject: manifest: add 'namespace' to the type checker --- src/luarocks/type/manifest.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/luarocks/type/manifest.lua b/src/luarocks/type/manifest.lua index 407428b2..bf985ad3 100644 --- a/src/luarocks/type/manifest.lua +++ b/src/luarocks/type/manifest.lua @@ -3,7 +3,7 @@ local type_manifest = {} local type_check = require("luarocks.type_check") local manifest_formats = type_check.declare_schemas({ - ["1.0"] = { + ["3.0"] = { repository = { _mandatory = true, -- packages @@ -45,6 +45,7 @@ local manifest_formats = type_check.declare_schemas({ -- each dependency _any = { name = { _type = "string" }, + namespace = { _type = "string" }, constraints = { _any = { no_upgrade = { _type = "boolean" }, @@ -70,10 +71,10 @@ local manifest_formats = type_check.declare_schemas({ -- succeeded, or nil and an error message if it failed. function type_manifest.check(manifest, globals) assert(type(manifest) == "table") - local format = manifest_formats["1.0"] + local format = manifest_formats["3.0"] local ok, err = type_check.check_undeclared_globals(globals, format) if not ok then return nil, err end - return type_check.type_check_table("1.0", manifest, format, "") + return type_check.type_check_table("3.0", manifest, format, "") end return type_manifest -- cgit v1.2.3-55-g6feb