Change package to ES module.

This commit is contained in:
Bauke 2023-03-26 14:32:57 +02:00
parent 6383e77609
commit 2e1c7edfa1
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
3 changed files with 9 additions and 13 deletions

View File

@ -1,5 +1,6 @@
{ {
"private": true, "private": true,
"type": "module",
"scripts": { "scripts": {
"start": "vite build -m development --watch", "start": "vite build -m development --watch",
"start:chromium": "VITE_BROWSER=chromium pnpm start", "start:chromium": "VITE_BROWSER=chromium pnpm start",
@ -37,14 +38,14 @@
"xo": "^0.53.1" "xo": "^0.53.1"
}, },
"ava": { "ava": {
"extensions": [ "extensions": {
"ts" "ts": "module"
], },
"files": [ "files": [
"tests/**/*.test.ts" "tests/**/*.test.ts"
], ],
"require": [ "nodeArguments": [
"ts-node/register" "--loader=ts-node/esm"
], ],
"snapshotDir": "tests/snapshots" "snapshotDir": "tests/snapshots"
}, },
@ -65,7 +66,6 @@
"files": "tests/**/*.test.ts", "files": "tests/**/*.test.ts",
"rules": { "rules": {
"@typescript-eslint/triple-slash-reference": "off", "@typescript-eslint/triple-slash-reference": "off",
"import/extensions": "off",
"no-await-in-loop": "off" "no-await-in-loop": "off"
} }
} }

View File

@ -6,7 +6,7 @@ import {
dataMigrations, dataMigrations,
deserializeQueue, deserializeQueue,
serializeQueue, serializeQueue,
} from '../source/settings/migrations'; } from '../source/settings/migrations.js';
const queueItemSample: Queue.Item = { const queueItemSample: Queue.Item = {
added: new Date('2022-03-02T16:00:00Z'), added: new Date('2022-03-02T16:00:00Z'),

View File

@ -8,6 +8,7 @@
"moduleResolution": "Node", "moduleResolution": "Node",
"noEmit": true, "noEmit": true,
"outDir": "build", "outDir": "build",
"skipLibCheck": true,
"strict": true, "strict": true,
"target": "ESNext" "target": "ESNext"
}, },
@ -15,10 +16,5 @@
"source/**/*.ts", "source/**/*.ts",
"tests/**/*.ts", "tests/**/*.ts",
"vite.config.ts" "vite.config.ts"
], ]
"ts-node": {
"compilerOptions": {
"module": "CommonJS"
}
}
} }