From 6275a3b7a59685696c08ad0c742893b43acfeb89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=95=B7=EF=B8=8F?= <3756473+zendive@users.noreply.github.com> Date: Mon, 7 Apr 2025 22:11:51 +0300 Subject: [PATCH 1/5] remove `@` alias --- src/api/clone.ts | 6 +++--- src/api/diffApi.ts | 2 +- 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 | 4 ++-- src/jsdiff-proxy.ts | 2 +- src/stores/compare.store.ts | 8 ++++---- src/stores/search.store.ts | 2 +- src/view/panel.badge.vue | 2 +- src/view/panel.empty.vue | 4 ++-- src/view/panel.header.vue | 28 ++++++++++++++-------------- src/view/panel.search.vue | 12 ++++++------ src/view/panel.timer.vue | 4 ++-- src/view/panel.vue | 12 ++++++------ tsconfig.json | 5 +---- webpack.config.ts | 3 --- 18 files changed, 48 insertions(+), 54 deletions(-) diff --git a/src/api/clone.ts b/src/api/clone.ts index 89f4f23..d9290ba 100644 --- a/src/api/clone.ts +++ b/src/api/clone.ts @@ -1,4 +1,4 @@ -import { hashString } from '@/api/toolkit.ts'; +import { hashString } from './toolkit.ts'; import { TAG_EXCEPTION, TAG_EXCEPTION_FALLBACK, @@ -16,12 +16,12 @@ import { TAG_DOM_ELEMENT, TAG_GLOBAL_SYMBOL, TAG_URL, -} from '@/api/const.ts'; +} from './const.ts'; import { UniqueLookupCatalog, CommonLookupCatalog, type TCommonInstanceTag, -} from '@/api/cloneCatalog.ts'; +} from './cloneCatalog.ts'; interface ISerializeToObject { [key: string]: any; diff --git a/src/api/diffApi.ts b/src/api/diffApi.ts index ba3d3f4..d3eac1c 100644 --- a/src/api/diffApi.ts +++ b/src/api/diffApi.ts @@ -1,4 +1,4 @@ -import { hasValue } from '@/api/toolkit.ts'; +import { hasValue } from './toolkit.ts'; import DiffMatchPatch from 'diff-match-patch'; import * as jsondiffpatch from 'jsondiffpatch'; export type { Delta } from 'jsondiffpatch'; diff --git a/src/api/proxy.ts b/src/api/proxy.ts index 287619b..3757dd2 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 '@/api/const.ts'; +} from './const.ts'; export function proxyMessageGate( callbackInprogress: (e: MessageEvent) => void, diff --git a/src/api/useRuntime.ts b/src/api/useRuntime.ts index b0efbbb..8ced453 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 '@/api/const.ts'; +} from './const.ts'; type TRuntimeListener = (...args: any[]) => void; diff --git a/src/firefox/background-script.ts b/src/firefox/background-script.ts index 417b795..86fb794 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.ts'; +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 a3485da..35663e4 100644 --- a/src/jsdiff-console.ts +++ b/src/jsdiff-console.ts @@ -1,4 +1,4 @@ -import { post } from '@/api/clone.ts'; +import { post } from './api/clone.ts'; const consoleAPI = { diff: (...args: unknown[]) => { diff --git a/src/jsdiff-panel.js b/src/jsdiff-panel.js index fa84317..0e355a4 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 Panel from './view/panel.vue'; import { createPinia } from 'pinia'; -import { compareStoreRuntimeService } from '@/stores/compare.store.ts'; +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 5fa2324..701eacb 100644 --- a/src/jsdiff-proxy.ts +++ b/src/jsdiff-proxy.ts @@ -2,7 +2,7 @@ import { proxyMessageGate, proxyInprogressHandler, proxyCompareHandler, -} from '@/api/proxy.ts'; +} from './api/proxy.ts'; window.addEventListener( 'message', diff --git a/src/stores/compare.store.ts b/src/stores/compare.store.ts index 801abb3..788bae6 100644 --- a/src/stores/compare.store.ts +++ b/src/stores/compare.store.ts @@ -1,9 +1,9 @@ -import { diff, type Delta } from '@/api/diffApi.ts'; -import { hasValue } from '@/api/toolkit.ts'; +import { diff, 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.ts'; -import { useSearchStore } from '@/stores/search.store.ts'; +import { useRuntime } from '../api/useRuntime.ts'; +import { useSearchStore } from './search.store.ts'; function defaultCompareState(): ICompareState { return { diff --git a/src/stores/search.store.ts b/src/stores/search.store.ts index efc194f..ec6a8ce 100644 --- a/src/stores/search.store.ts +++ b/src/stores/search.store.ts @@ -1,4 +1,4 @@ -import { UPPERCASE_PATTERN } from '@/api/const.ts'; +import { UPPERCASE_PATTERN } from '../api/const.ts'; import { defineStore } from 'pinia'; import { markRaw } from 'vue'; diff --git a/src/view/panel.badge.vue b/src/view/panel.badge.vue index 93b01e8..00ec33a 100644 --- a/src/view/panel.badge.vue +++ b/src/view/panel.badge.vue @@ -8,7 +8,7 @@