From 5f7e63c554698aec25c7957b8835d8ba1c10b4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=95=B7?= <3756473+zendive@users.noreply.github.com> Date: Fri, 2 Feb 2024 20:31:39 +0200 Subject: [PATCH] adjust to moduleResolution:NodeNext --- src/api/clone.ts | 4 ++-- src/api/diffApi.ts | 4 ++-- src/api/proxy.ts | 2 +- src/api/useRuntime.ts | 2 +- src/firefox/background-script.ts | 2 +- src/jsdiff-console.ts | 2 +- src/jsdiff-panel.js | 2 +- src/jsdiff-proxy.ts | 2 +- src/stores/compare.store.ts | 10 +++++----- src/view/panel.vue | 8 ++++---- tsconfig.json | 14 ++++++++------ 11 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/api/clone.ts b/src/api/clone.ts index b21f269..b1b1bdd 100644 --- a/src/api/clone.ts +++ b/src/api/clone.ts @@ -1,4 +1,4 @@ -import { SHA256 } from '@/api/toolkit'; +import { SHA256 } from '@/api/toolkit.ts'; import { TAG_EXCEPTION, TAG_EXCEPTION_FALLBACK, @@ -13,7 +13,7 @@ import { TAG_SYMBOL, TAG_UNDEFINED, TAG_UNSERIALIZABLE, -} from './const'; +} from '@/api/const.ts'; type TInstanceBadgeTag = (id: string) => string; type TSymbolBadgeTag = (symbolName: string, symbolId: string) => string; diff --git a/src/api/diffApi.ts b/src/api/diffApi.ts index a2ad17c..f01e35f 100644 --- a/src/api/diffApi.ts +++ b/src/api/diffApi.ts @@ -1,4 +1,4 @@ -import { hasValue } from './toolkit'; +import { hasValue } from '@/api/toolkit.ts'; import DiffMatchPatch from 'diff-match-patch'; import * as jsondiffpatch from 'jsondiffpatch'; export type { Delta } from 'jsondiffpatch'; @@ -40,7 +40,7 @@ export default { }, format(delta: Delta, left: unknown) { - return format(delta, left); + return format(delta, left) || ''; }, showUnchanged(show: boolean, el: HTMLElement) { diff --git a/src/api/proxy.ts b/src/api/proxy.ts index 205c60b..287619b 100644 --- a/src/api/proxy.ts +++ b/src/api/proxy.ts @@ -3,7 +3,7 @@ import { ERROR_PORT_CLOSED, ERROR_QUOTA_EXCEEDED, TAG_EMPTY, -} from './const'; +} from '@/api/const.ts'; export function proxyMessageGate( callbackInprogress: (e: MessageEvent) => void, diff --git a/src/api/useRuntime.ts b/src/api/useRuntime.ts index e7cbfc0..b0efbbb 100644 --- a/src/api/useRuntime.ts +++ b/src/api/useRuntime.ts @@ -13,7 +13,7 @@ import { BACKGROUND_SCRIPT_CONNECTION_NAME, BACKGROUND_SCRIPT_CONNECTION_INTERVAL, -} from './const'; +} from '@/api/const.ts'; type TRuntimeListener = (...args: any[]) => void; diff --git a/src/firefox/background-script.ts b/src/firefox/background-script.ts index a640e00..417b795 100644 --- a/src/firefox/background-script.ts +++ b/src/firefox/background-script.ts @@ -1,6 +1,6 @@ // background script for firefox's partial(?) MV3 implementation -import { BACKGROUND_SCRIPT_CONNECTION_NAME } from '@/api/const'; +import { BACKGROUND_SCRIPT_CONNECTION_NAME } from '@/api/const.ts'; const ports = new Map(); diff --git a/src/jsdiff-console.ts b/src/jsdiff-console.ts index f6e2864..466e7c9 100644 --- a/src/jsdiff-console.ts +++ b/src/jsdiff-console.ts @@ -1,4 +1,4 @@ -import { post, nativeClone, customClone } from '@/api/clone'; +import { post, nativeClone, customClone } from '@/api/clone.ts'; const consoleAPI = { diff: (...args: unknown[]) => { diff --git a/src/jsdiff-panel.js b/src/jsdiff-panel.js index fcd74d0..fa84317 100644 --- a/src/jsdiff-panel.js +++ b/src/jsdiff-panel.js @@ -1,7 +1,7 @@ import { createApp } from 'vue'; import Panel from '@/view/panel.vue'; import { createPinia } from 'pinia'; -import { compareStoreRuntimeService } from '@/stores/compare.store'; +import { compareStoreRuntimeService } from '@/stores/compare.store.ts'; import 'jsondiffpatch/formatters/styles/html.css'; createApp(Panel) diff --git a/src/jsdiff-proxy.ts b/src/jsdiff-proxy.ts index 3097ecf..5fa2324 100644 --- a/src/jsdiff-proxy.ts +++ b/src/jsdiff-proxy.ts @@ -2,7 +2,7 @@ import { proxyMessageGate, proxyInprogressHandler, proxyCompareHandler, -} from '@/api/proxy'; +} from '@/api/proxy.ts'; window.addEventListener( 'message', diff --git a/src/stores/compare.store.ts b/src/stores/compare.store.ts index d654bdb..1a4a214 100644 --- a/src/stores/compare.store.ts +++ b/src/stores/compare.store.ts @@ -1,10 +1,10 @@ -import diffApi from '@/api/diffApi'; -import type { Delta } from '@/api/diffApi'; -import { hasValue } from '@/api/toolkit'; +import diffApi from '@/api/diffApi.ts'; +import type { Delta } from '@/api/diffApi.ts'; +import { hasValue } from '@/api/toolkit.ts'; import { defineStore } from 'pinia'; import { markRaw } from 'vue'; -import { useRuntime } from '@/api/useRuntime'; -import { useSearchStore } from './search.store'; +import { useRuntime } from '@/api/useRuntime.ts'; +import { useSearchStore } from '@/stores/search.store.ts'; function defaultCompareState(): ICompareState { return { diff --git a/src/view/panel.vue b/src/view/panel.vue index ab6e56f..15d1daf 100644 --- a/src/view/panel.vue +++ b/src/view/panel.vue @@ -19,12 +19,12 @@