From ca240ab795f705ed8e0c1b9cccf0d3723b6a0ce1 Mon Sep 17 00:00:00 2001 From: Jason Buchanan Date: Sun, 24 Mar 2024 13:05:22 -0600 Subject: [PATCH] fix: es modules syntax for buffer deps instead of commonjs require --- src/libs/util.ts | 3 +-- src/views/ContactQRScanShowView.vue | 4 +--- src/views/ContactsView.vue | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/libs/util.ts b/src/libs/util.ts index 99c51ec14..598b8ff24 100644 --- a/src/libs/util.ts +++ b/src/libs/util.ts @@ -12,8 +12,7 @@ import { deriveAddress, generateSeed, newIdentifier } from "@/libs/crypto"; import { GenericServerRecord, containsHiddenDid } from "@/libs/endorserServer"; import * as serverUtil from "@/libs/endorserServer"; -// eslint-disable-next-line @typescript-eslint/no-var-requires -const Buffer = require("buffer/").Buffer; +import { Buffer } from "buffer/"; // If you edit this, check that the numbers still line up on the side in the alert (on mobile, too), // and make sure they can take all actions while the notification shows. diff --git a/src/views/ContactQRScanShowView.vue b/src/views/ContactQRScanShowView.vue index b02625573..72cbc9585 100644 --- a/src/views/ContactQRScanShowView.vue +++ b/src/views/ContactQRScanShowView.vue @@ -88,9 +88,7 @@ import { CONTACT_URL_PREFIX, ENDORSER_JWT_URL_LOCATION, } from "@/libs/endorserServer"; - -// eslint-disable-next-line @typescript-eslint/no-var-requires -const Buffer = require("buffer/").Buffer; +import { Buffer } from "buffer/"; @Component({ components: { diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index b866e5e24..5cf644d4d 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -313,8 +313,8 @@ import QuickNav from "@/components/QuickNav.vue"; import EntityIcon from "@/components/EntityIcon.vue"; import { Account } from "@/db/tables/accounts"; -// eslint-disable-next-line @typescript-eslint/no-var-requires -const Buffer = require("buffer/").Buffer; +import { Buffer } from "buffer/"; + @Component({ components: { QuickNav, EntityIcon },