-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
- Converts to typescript - Only named exports - No more CJS, only ESM - Runs tests on all supported environments - Adds auto-publish - Adds dependabot - Drops dependency on simple-peer as it has deps on Buffer, node streams, etc BREAKING CHANGE: switch to named exports, ESM only
TODO:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: how come aegir eslint or tsconfig doesn't enforce explicit return types. Feels like it could help readability?
src/index.ts
Outdated
/** | ||
* Stream to ids map | ||
*/ | ||
initiators: new Map<number, any>(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is value actually MuxedStream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, well, a Stream
rather than a MuxedStream
now - the idea being the muxing should be transparent to the caller. I've updated the types for the map to reflect this.
Co-authored-by: Marin Petrunić <mpetrunic@users.noreply.github.com>
It was a conscious choice to let That said I'm not averse to requiring return types though I'd like to leave that for the next breaking aegir release as we're quite a way down the ts conversion. |
Yeah totally fine leaving it for next release. Since I was looking at this code for the first time, I realized how hard is to dig down to figure out what is return type. That said it's not major problem because if you review in IDE, it can figure it out for you anyways. btw sorry about double comments not sure how that happened 😅 |
## [1.0.0](v0.10.7...v1.0.0) (2022-02-14) ### ⚠ BREAKING CHANGES * switch to named exports, ESM only Co-authored-by: Marin Petrunić <mpetrunic@users.noreply.github.com> ### Features * convert to typescript ([#158](#158)) ([0cf727a](0cf727a))
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
BREAKING CHANGE: switch to named exports, ESM only