Skip to content

Commit

Permalink
chore: enhance changelog and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Nov 17, 2023
1 parent fd7c91f commit bf9aa91
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 27 deletions.
33 changes: 6 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,32 @@
# [0.5.0](https://github.com/ulivz/unport/compare/v0.3.1...v0.5.0) (2023-11-17)


### Features

* support manual `channel.pipe` ([#2](https://github.com/ulivz/unport/issues/2)) ([b8ef448](https://github.com/ulivz/unport/commit/b8ef4482088e994eef37823a6991a67a93c5c77c))


To streamline usage, we have implemented a significant update: the basic concept `UnportChannel` has been renamed to `Channel`, see [3e2bcc7](https://github.com/web-infra-dev/unport/commit/3e2bcc73bb97e7d46b7c7f79a1b9481c98157bdc).

# [0.4.0](https://github.com/ulivz/unport/compare/v0.3.1...v0.4.0) (2023-11-17)


### Features

* support manual `channel.pipe` ([c342e2b](https://github.com/ulivz/unport/commit/c342e2bbdc886da5458f18217d80395110df9fe0))
To support `one-to-many` scenarios and avoid creating multiple Unport instances, we have introduced the [Channel.pipe](https://github.com/web-infra-dev/unport#pipe) method. This allows users to manually send messages through the intermediary pipeline, enhancing efficiency and flexibility, see [b8ef448](https://github.com/web-infra-dev/unport/commit/b8ef4482088e994eef37823a6991a67a93c5c77c).



## [0.3.1](https://github.com/ulivz/unport/compare/v0.3.0...v0.3.1) (2023-11-17)

This is a patch release where we have removed some unnecessary logs


# [0.3.0](https://github.com/ulivz/unport/compare/v0.2.0...v0.3.0) (2023-11-17)


### Features

* support watch message multiple times and allow user to destroy a port ([#1](https://github.com/ulivz/unport/issues/1)) ([a179e61](https://github.com/ulivz/unport/commit/a179e616983004f04e40ae9b85ea73cbe81d9083))

Added support for watching messages multiple times and provided users with the ability to destroy a port ([#1](https://github.com/ulivz/unport/issues/1)) ([a179e61](https://github.com/ulivz/unport/commit/a179e616983004f04e40ae9b85ea73cbe81d9083))


# [0.2.0](https://github.com/ulivz/unport/compare/v0.1.0...v0.2.0) (2023-11-17)

Renamed the exported `UnPort` to `Unport` for consistency and ease of use, see [b1b8b56](b1b8b5694043f1bccbe3f86b78b20351988c0d4f).


# [0.1.0](https://github.com/ulivz/unport/compare/93c89d960e8dab105e5e1b46df2b2179bdb1c945...v0.1.0) (2023-11-16)


### Features

* first implementation ([fbc6daa](https://github.com/ulivz/unport/commit/fbc6daa6eabc1264416a4dbe2998c4aa429bba0c))
* init prototype ([93c89d9](https://github.com/ulivz/unport/commit/93c89d960e8dab105e5e1b46df2b2179bdb1c945))
* protect message ([9521bc9](https://github.com/ulivz/unport/commit/9521bc9f2b5430cbcf69eedcaa80d149ddd52102))
* simplify channel api ([37ddb50](https://github.com/ulivz/unport/commit/37ddb50c69bffd0ad06df53ca6c85248494121d1))
* simplify port definitiom ([5620d05](https://github.com/ulivz/unport/commit/5620d0521f678fcb9d45a124e70b4e1a884adc68))


### Performance Improvements

* **examples:** improve performance for child-process ([5d08f65](https://github.com/ulivz/unport/commit/5d08f65f90f7fe196c99638d03197d287ae56347))

This is the inaugural release of Unport. It encapsulates the core concept of Unport: `TypedPort = f(types, channel)`. We have successfully implemented the fundamental functionalities.


9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

**Unport is a fully type-inferred IPC (Inter-Process Communication) library**. It ensures robust and reliable cross-context communication with strict type checking, enhancing the predictability and stability of your application.

```math
Port = f(types, channel)
```

Unport is designed to simplify the complexity revolving around various JSContext environments. These environments encompass a wide range of technologies, including [Node.js](https://nodejs.org/), [ChildProcess](https://nodejs.org/api/child_process.html), [Webview](https://en.wikipedia.org/wiki/WebView), [Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers), [worker_threads](https://nodejs.org/api/worker_threads.html), [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API), [iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe), [MessageChannel](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel), [ServiceWorker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API), and much more.

Each of these JSContexts exhibits distinct methods of communicating with the external world. Still, the lack of defined types can make handling the code for complex projects an arduous task. In the context of intricate and large-scale projects, it's often challenging to track the message's trajectory and comprehend the fields that the recipient necessitates.
Expand All @@ -29,6 +33,7 @@ Each of these JSContexts exhibits distinct methods of communicating with the ext
- [.implementChannel()](#implementchannel)
- [.postMessage()](#postmessage)
- [.onMessage()](#onmessage)
- [Channel](#channel-1)
- [.pipe()](#pipe)
- [ChannelMessage](#channelmessage)
- [🤝 Contributing](#-contributing)
Expand Down Expand Up @@ -261,6 +266,10 @@ parentPort.onMessage('ack', payload => {
});
```

### Channel

When you invoke the [.implementChannel()](#implementchannel) to implement an intermediary pipeline, you will receive a `Channel` instance. This instance comes with several useful methods that enhance the functionality and usability of the pipeline.

#### .pipe()

- Type: `(message: ChannelMessage) => void`
Expand Down

0 comments on commit bf9aa91

Please sign in to comment.