From e0b51625d8da74d06b1efaed3e7af1e3b583314c Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Wed, 22 Nov 2023 22:18:40 +0100 Subject: [PATCH] Make it ESM only --- package.json | 14 +++++++------- tsconfig.esm.json | 11 ----------- tsconfig.json | 11 +++++------ 3 files changed, 12 insertions(+), 24 deletions(-) delete mode 100644 tsconfig.esm.json diff --git a/package.json b/package.json index 49a07bc..16b6eed 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,15 @@ { "name": "@hibas123/logging", - "version": "3.1.2", + "version": "4.0.0", "description": "", - "main": "out/index.js", - "types": "out/index.d.ts", + "type": "module", + "main": "esm/index.js", + "types": "esm/index.d.ts", "module": "esm/index.js", "scripts": { "prepublishOnly": "npm run build", - "build": "tsc && tsc -p tsconfig.esm.json", - "test": "tsc && node out/test.js", + "build": "tsc", + "test": "tsc && node esm/test.js", "postpublish": "denreg publish", "bench": "tsc && node benchmark.js", "prof": "tsc && ndb --prof benchmark.js" @@ -21,7 +22,6 @@ "license": "MIT", "files": [ "src/", - "out/", "esm/", "tsconfig.json", "readme.md" @@ -33,4 +33,4 @@ "ts-node": "^9.1.1", "typescript": "^4.2.4" } -} +} \ No newline at end of file diff --git a/tsconfig.esm.json b/tsconfig.esm.json deleted file mode 100644 index 54e0427..0000000 --- a/tsconfig.esm.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "ESNext", - "target": "ES2017", - "moduleResolution": "node", - "outDir": "esm" - }, - "exclude": ["node_modules"], - "include": ["src"] -} diff --git a/tsconfig.json b/tsconfig.json index 5065743..b79f543 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,11 @@ { "compilerOptions": { - "module": "commonjs", - "target": "esnext", + "module": "ESNext", + "target": "ESNext", + "moduleResolution": "node", + "outDir": "esm", "noImplicitAny": false, - "sourceMap": true, - "outDir": "out", - "declaration": true, - "typeRoots": ["node_modules/@types"] + "sourceMap": true }, "exclude": ["node_modules"], "include": ["src"]