From 69143a96d0d7685618fd83fe7985837254435c79 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Wed, 22 Nov 2023 22:23:28 +0100 Subject: [PATCH] Make it ESM only --- package.json | 13 ++++++------- tsconfig.esm.json | 10 ---------- tsconfig.json | 7 +++---- yarn.lock | 8 ++++++++ 4 files changed, 17 insertions(+), 21 deletions(-) delete mode 100644 tsconfig.esm.json create mode 100644 yarn.lock diff --git a/package.json b/package.json index b78c862..c6a42c0 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "name": "@hibas123/utils", - "version": "2.2.18", + "version": "3.0.0", "description": "Different Utilities, that are not worth own packages", - "main": "lib/index.js", - "types": "lib/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", + "build": "tsc", "watch-ts": "tsc -w", "postpublish": "denreg publish" }, @@ -22,11 +23,9 @@ }, "files": [ "src/", - "lib/", "esm/", - "tsconfig.esm.json", "tsconfig.json", "readme.md" ], "private": false -} +} \ No newline at end of file diff --git a/tsconfig.esm.json b/tsconfig.esm.json deleted file mode 100644 index fbf91c2..0000000 --- a/tsconfig.esm.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "ESNext", - "moduleResolution": "classic", - "outDir": "esm", - "target": "es2015", - "lib": ["ES2018.AsyncIterable", "ES2015", "DOM"] - } -} diff --git a/tsconfig.json b/tsconfig.json index 67d1912..9a213f3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,13 @@ { "compilerOptions": { "target": "esnext", - "module": "commonjs", - "moduleResolution": "node", - "outDir": "lib", + "module": "esnext", + "moduleResolution": "Node", + "outDir": "esm", "preserveWatchOutput": true, "declaration": true, "sourceMap": true, "strict": true, - "importsNotUsedAsValues": "error", "isolatedModules": true }, "include": ["./src"] diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..94ff201 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +typescript@^4.0.5: + version "4.9.5" + resolved "https://npm.hibas123.de/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==