diff --git a/package.json b/package.json index b707709..ff991fe 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "private": true, + "type": "module", "scripts": { "start": "vite build -m development --watch", "start:chromium": "VITE_BROWSER=chromium pnpm start", @@ -37,14 +38,14 @@ "xo": "^0.53.1" }, "ava": { - "extensions": [ - "ts" - ], + "extensions": { + "ts": "module" + }, "files": [ "tests/**/*.test.ts" ], - "require": [ - "ts-node/register" + "nodeArguments": [ + "--loader=ts-node/esm" ], "snapshotDir": "tests/snapshots" }, @@ -65,7 +66,6 @@ "files": "tests/**/*.test.ts", "rules": { "@typescript-eslint/triple-slash-reference": "off", - "import/extensions": "off", "no-await-in-loop": "off" } } diff --git a/tests/migrations.test.ts b/tests/migrations.test.ts index 6558fe2..6f74412 100644 --- a/tests/migrations.test.ts +++ b/tests/migrations.test.ts @@ -6,7 +6,7 @@ import { dataMigrations, deserializeQueue, serializeQueue, -} from '../source/settings/migrations'; +} from '../source/settings/migrations.js'; const queueItemSample: Queue.Item = { added: new Date('2022-03-02T16:00:00Z'), diff --git a/tsconfig.json b/tsconfig.json index 48115cf..1481641 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ "moduleResolution": "Node", "noEmit": true, "outDir": "build", + "skipLibCheck": true, "strict": true, "target": "ESNext" }, @@ -15,10 +16,5 @@ "source/**/*.ts", "tests/**/*.ts", "vite.config.ts" - ], - "ts-node": { - "compilerOptions": { - "module": "CommonJS" - } - } + ] }