Make it ESM only

This commit is contained in:
Fabian Stamm 2023-11-22 22:23:28 +01:00
parent c29837d850
commit 69143a96d0
4 changed files with 17 additions and 21 deletions

View File

@ -1,13 +1,14 @@
{ {
"name": "@hibas123/utils", "name": "@hibas123/utils",
"version": "2.2.18", "version": "3.0.0",
"description": "Different Utilities, that are not worth own packages", "description": "Different Utilities, that are not worth own packages",
"main": "lib/index.js", "type": "module",
"types": "lib/index.d.ts", "main": "esm/index.js",
"types": "esm/index.d.ts",
"module": "esm/index.js", "module": "esm/index.js",
"scripts": { "scripts": {
"prepublishOnly": "npm run build", "prepublishOnly": "npm run build",
"build": "tsc && tsc -p tsconfig.esm.json", "build": "tsc",
"watch-ts": "tsc -w", "watch-ts": "tsc -w",
"postpublish": "denreg publish" "postpublish": "denreg publish"
}, },
@ -22,11 +23,9 @@
}, },
"files": [ "files": [
"src/", "src/",
"lib/",
"esm/", "esm/",
"tsconfig.esm.json",
"tsconfig.json", "tsconfig.json",
"readme.md" "readme.md"
], ],
"private": false "private": false
} }

View File

@ -1,10 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "classic",
"outDir": "esm",
"target": "es2015",
"lib": ["ES2018.AsyncIterable", "ES2015", "DOM"]
}
}

View File

@ -1,14 +1,13 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "esnext", "target": "esnext",
"module": "commonjs", "module": "esnext",
"moduleResolution": "node", "moduleResolution": "Node",
"outDir": "lib", "outDir": "esm",
"preserveWatchOutput": true, "preserveWatchOutput": true,
"declaration": true, "declaration": true,
"sourceMap": true, "sourceMap": true,
"strict": true, "strict": true,
"importsNotUsedAsValues": "error",
"isolatedModules": true "isolatedModules": true
}, },
"include": ["./src"] "include": ["./src"]

8
yarn.lock Normal file
View File

@ -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==