From a5ed0c9fb87d821c054c4d63d1f78c9374c5c54f Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Fri, 21 Jun 2024 12:36:45 +0530 Subject: [PATCH] feat(consts): move constants from toml into module --- package/js/consts.toml | 3 --- package/js/consts.ts | 17 +++++------------ 2 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 package/js/consts.toml diff --git a/package/js/consts.toml b/package/js/consts.toml deleted file mode 100644 index 17b0078..0000000 --- a/package/js/consts.toml +++ /dev/null @@ -1,3 +0,0 @@ -name = "lune" -version = "0.8.5" -api_url = "https://api.github.com/repos/lune-org/lune/releases" \ No newline at end of file diff --git a/package/js/consts.ts b/package/js/consts.ts index b924a1a..b0ae26a 100644 --- a/package/js/consts.ts +++ b/package/js/consts.ts @@ -1,12 +1,5 @@ -import { parse as parseToml } from "jsr:@std/toml"; -import * as path from "jsr:@std/path"; - -export const BASE_PATH = path.dirname(path.fromFileUrl(import.meta.url)); - -export default parseToml( - Deno.readTextFileSync(path.join(BASE_PATH, "consts.toml")), -) as { - name: string; - api_url: string; - version: string; -}; +export default { + name: "lune", + version: "0.8.5", + api_url: "https://api.github.com/repos/lune-org/lune/releases" +} as const; \ No newline at end of file