From 394f9995e1ea282aa0614fb04c0c6f6c3a3004b0 Mon Sep 17 00:00:00 2001 From: 21e8 Date: Sat, 7 Dec 2024 11:51:41 +0100 Subject: [PATCH] fix --- package.json | 15 ++++++++------- src/index.ts | 7 +------ tsconfig.json | 14 ++++++-------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 3a589a0..8559275 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,14 @@ "description": "Batched Telegram notification bot for 0xAlice", "main": "dist/index.js", "types": "dist/index.d.ts", + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "require": "./dist/index.js" + } + }, "scripts": { "build": "tsc", "test": "NODE_OPTIONS=--experimental-vm-modules jest", @@ -17,13 +25,6 @@ "dist/**/*", "README.md" ], - "type": "module", - "exports": { - ".": { - "import": "./dist/index.js", - "require": "./dist/index.js" - } - }, "repository": { "type": "git", "url": "git+https://github.com/21e8/telegram-batch-bot.git" diff --git a/src/index.ts b/src/index.ts index 6bfb711..112d3d8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,3 @@ +export * from './types'; export { MessageBatcher } from './batcher'; export { TelegramBatcher } from './telegram'; -export type { - NotificationLevel, - TelegramConfig, - Message, - BatcherConfig, -} from './types'; diff --git a/tsconfig.json b/tsconfig.json index 86e260b..add5704 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,18 @@ { "compilerOptions": { "target": "ES2020", - "module": "ESNext", - "lib": ["ES2020", "DOM"], + "module": "ES2020", + "moduleResolution": "node", "declaration": true, + "declarationMap": true, + "sourceMap": true, "outDir": "./dist", - "rootDir": "./src", "strict": true, - "moduleResolution": "node", "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "isolatedModules": true, - "preserveSymlinks": true + "resolveJsonModule": true }, "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "**/__tests__/**"] + "exclude": ["node_modules", "dist", "src/**/*.test.ts"] }