Skip to content

Conversation

el-j
Copy link

@el-j el-j commented Oct 3, 2025

image

this pr moves to typescript, works with node20+ and has no vulnerabilities in build dependencies.

el-j added 3 commits October 3, 2025 23:18
- Added TelegramBot class to handle Telegram Bot API interactions.
- Implemented message processing, event emitting, and regex matching for text messages.
- Introduced methods for starting/stopping polling and opening/closing webhooks.
- Added support for file uploads with proper formatting and handling.
- Included error handling for API requests and response parsing.

chore: add TypeScript configuration files

- Created tsconfig.json for TypeScript compiler options.
- Added tsconfig.build.json for build-specific configurations.
- Moved TelegramBot and related utilities to src directory.
- Updated import paths in examples and tests accordingly.
- Added TypeScript definitions and source maps for examples and tests.
- Replaced deprecated request-promise with node-fetch in tests and examples.
- Enhanced test coverage for TelegramBot methods.
- Updated build scripts to accommodate new directory structure.
- Added utility functions for testing purposes.
@@ -0,0 +1,2 @@
export {};
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the .d.ts files?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry y there was something wrong in build config. i had another look and fixed all this fail output

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yagop can u please check the new structure of the package. i had to really define the lib and the dist output folders and remove the package index.js entrypoint in the root to avoid compilation in the root folder completly. now there is the lib folder that holds the lib-bundle and the dist folder that holds the exmaples bundle.

el-j added 2 commits October 12, 2025 12:22
- Deleted test files: telegram.test.d.ts, telegram.test.d.ts.map, telegram.test.js, test.format-send-data.js, utils.d.ts, and utils.js.
- Updated tsconfig.build.json to exclude test files from the build process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants