grammyjs / grammY

The Telegram Bot Framework.
https://grammy.dev
MIT License
2.17k stars 110 forks source link

fix: properly define the subpath ./types in exports #517

Closed Satont closed 8 months ago

Satont commented 8 months ago

Should fix

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './types' is not defined by "exports"
codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9c625cb) 46.05% compared to head (f0efb01) 46.05%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #517 +/- ## ======================================= Coverage 46.05% 46.05% ======================================= Files 19 19 Lines 6051 6051 Branches 266 266 ======================================= Hits 2787 2787 Misses 3261 3261 Partials 3 3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

KnorpelSenf commented 8 months ago

This PQ made me remember what is going on. Thanks!

We should only allow type imports via /types. This PQ is not going in the right direction.

Instead, the plugin needs to be fixed. It crashes because it uses export * from while it should only use export type * from. https://github.com/grammyjs/hydrate/pull/25 Fixes that.