From a669686b16740f6b6b289bd2d07cf1449e68acb5 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 8 Jan 2025 16:14:25 -0800 Subject: [PATCH] fix(js): move require to top of file --- web/utils/apis.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/utils/apis.ts b/web/utils/apis.ts index ca7248e89..23542c60c 100644 --- a/web/utils/apis.ts +++ b/web/utils/apis.ts @@ -1,3 +1,5 @@ +const semverGt = require('semver/functions/gt'); + /* eslint-disable prefer-destructuring */ const ADMIN_USERNAME = process.env.NEXT_PUBLIC_ADMIN_USERNAME; const ADMIN_STREAMKEY = process.env.NEXT_PUBLIC_ADMIN_STREAMKEY; @@ -181,7 +183,6 @@ export async function getGithubRelease() { } function upToDate(local, remote) { - const semverGt = require('semver/functions/gt'); return !semverGt(remote, local); }