Skip to content

Commit

Permalink
fix: Use regular import to reference package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding committed Oct 31, 2024
1 parent 965b265 commit 509c864
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/snaps-utils/src/platform-version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import packageJson from '@metamask/snaps-sdk/package.json';

/**
* Get the current supported platform version.
*
Expand All @@ -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;
}

0 comments on commit 509c864

Please sign in to comment.