From 25d507fcea5ed5add77bc3a87a1f851bb53f57a5 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Thu, 17 Apr 2025 16:20:02 +0200 Subject: [PATCH] Move _VERSION field --- errors.lua | 4 +++- init.lua | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/errors.lua b/errors.lua index 48e868b..7a35ab3 100644 --- a/errors.lua +++ b/errors.lua @@ -2,6 +2,8 @@ -- -- Lua library for advanced error handling. +local _VERSION = '0.5.5' + local string_dist do local this_path = ... and (...):match('.+%.') or '' @@ -133,7 +135,7 @@ end local ErrorHandler_mt = {__call = function (self, ...) internal_error(self, '', ...) end} -local errors = {} +local errors = {_VERSION=_VERSION} function errors.new(module_name) assert(type(module_name) == 'string') diff --git a/init.lua b/init.lua index 8d0e920..8bfd36b 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,2 @@ -local _VERSION = '0.5.5' - local errors = require (((...) ~= 'init' and (...) .. '.' or '') .. 'errors') -errors._VERSION = _VERSION return errors