Skip to content

Commit

Permalink
adjust to moduleResolution:NodeNext
Browse files Browse the repository at this point in the history
  • Loading branch information
zendive committed Feb 2, 2024
1 parent 82694cc commit 5f7e63c
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 25 deletions.
4 changes: 2 additions & 2 deletions src/api/clone.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SHA256 } from '@/api/toolkit';
import { SHA256 } from '@/api/toolkit.ts';
import {
TAG_EXCEPTION,
TAG_EXCEPTION_FALLBACK,
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/api/diffApi.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -40,7 +40,7 @@ export default {
},

format(delta: Delta, left: unknown) {
return format(delta, left);
return format(delta, left) || '';
},

showUnchanged(show: boolean, el: HTMLElement) {
Expand Down
2 changes: 1 addition & 1 deletion src/api/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<IProgressMessage>) => void,
Expand Down
2 changes: 1 addition & 1 deletion src/api/useRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import {
BACKGROUND_SCRIPT_CONNECTION_NAME,
BACKGROUND_SCRIPT_CONNECTION_INTERVAL,
} from './const';
} from '@/api/const.ts';

type TRuntimeListener = (...args: any[]) => void;

Expand Down
2 changes: 1 addition & 1 deletion src/firefox/background-script.ts
Original file line number Diff line number Diff line change
@@ -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<number, browser.runtime.Port>();

Expand Down
2 changes: 1 addition & 1 deletion src/jsdiff-console.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { post, nativeClone, customClone } from '@/api/clone';
import { post, nativeClone, customClone } from '@/api/clone.ts';

const consoleAPI = {
diff: (...args: unknown[]) => {
Expand Down
2 changes: 1 addition & 1 deletion src/jsdiff-panel.js
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/jsdiff-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
proxyMessageGate,
proxyInprogressHandler,
proxyCompareHandler,
} from '@/api/proxy';
} from '@/api/proxy.ts';

window.addEventListener(
'message',
Expand Down
10 changes: 5 additions & 5 deletions src/stores/compare.store.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/view/panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

<script setup lang="ts">
import { watch, onUnmounted, ref, watchEffect } from 'vue';
import { useCompareStore } from '@/stores/compare.store';
import { useSearchStore } from '@/stores/search.store';
import { useCompareStore } from '@/stores/compare.store.ts';
import { useSearchStore } from '@/stores/search.store.ts';
import PanelHeader from '@/view/panel.header.vue';
import PanelEmpty from '@/view/panel.empty.vue';
import { onColourSchemeChange } from '@/api/onColourSchemeChange';
import diffApi from '@/api/diffApi';
import { onColourSchemeChange } from '@/api/onColourSchemeChange.ts';
import diffApi from '@/api/diffApi.ts';
const compareStore = useCompareStore();
const searchStore = useSearchStore();
Expand Down
14 changes: 8 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"compilerOptions": {
"target": "ES2022",
"strict": true,
"strictNullChecks": true,
"noImplicitAny": true,
"moduleResolution": "Bundler",
"module": "ES2022",
"lib": ["ESNext", "DOM"],
"strictNullChecks": true,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noEmit": true,
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"typeRoots": ["node_modules/@types", "src/@types"],
"lib": ["ESNext", "DOM"],
"types": ["chrome", "firefox-webext-browser"],
"typeRoots": ["node_modules/@types", "src/@types"],
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
Expand Down

0 comments on commit 5f7e63c

Please sign in to comment.