From 509c864c3f53f29a6863a7a535a20bf9595029e3 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Thu, 31 Oct 2024 22:53:03 +0100 Subject: [PATCH] fix: Use regular import to reference package.json --- packages/snaps-utils/src/platform-version.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/snaps-utils/src/platform-version.ts b/packages/snaps-utils/src/platform-version.ts index c2880ebe2a..140c18bea3 100644 --- a/packages/snaps-utils/src/platform-version.ts +++ b/packages/snaps-utils/src/platform-version.ts @@ -1,3 +1,5 @@ +import packageJson from '@metamask/snaps-sdk/package.json'; + /** * Get the current supported platform version. * @@ -8,6 +10,5 @@ * @returns The platform version. */ export function getPlatformVersion() { - // eslint-disable-next-line import/no-dynamic-require, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires - return require('@metamask/snaps-sdk/package.json').version; + return packageJson.version; }