Compare commits

..

4 Commits

Author SHA1 Message Date
semantic-release-bot 807d9376a0 chore(release): 0.0.2-develop.12 [skip ci]
## [0.0.2-develop.12](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/compare/v0.0.2-develop.11...v0.0.2-develop.12) (2023-07-22)

### Bug Fixes

* change on to always return an instance of emittery unsubscribe function ([0c18c92](0c18c92521))
* return type required ([7eabf6a](7eabf6a05d))
2023-07-22 10:12:23 +00:00
Derrick Hammer 7eabf6a05d
fix: return type required 2023-07-22 06:11:18 -04:00
Derrick Hammer 50335dd062
Merge remote-tracking branch 'origin/develop' into develop 2023-07-22 06:03:48 -04:00
Derrick Hammer 0c18c92521
fix: change on to always return an instance of emittery unsubscribe function 2023-07-22 06:03:44 -04:00
4 changed files with 16 additions and 8 deletions

View File

@ -1,3 +1,11 @@
## [0.0.2-develop.12](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/compare/v0.0.2-develop.11...v0.0.2-develop.12) (2023-07-22)
### Bug Fixes
* change on to always return an instance of emittery unsubscribe function ([0c18c92](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/commit/0c18c92521de8b8685882b88ad8efa74a76617c6))
* return type required ([7eabf6a](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/commit/7eabf6a05da9dcd833b55f386896a70fa6ec736d))
## [0.0.2-develop.11](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/compare/v0.0.2-develop.10...v0.0.2-develop.11) (2023-07-22)
## [0.0.2-develop.10](https://git.lumeweb.com/LumeWeb/kernel-swarm-client/compare/v0.0.2-develop.9...v0.0.2-develop.10) (2023-07-22)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/kernel-swarm-client",
"version": "0.0.2-develop.11",
"version": "0.0.2-develop.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/kernel-swarm-client",
"version": "0.0.2-develop.11",
"version": "0.0.2-develop.12",
"dependencies": {
"@lumeweb/libkernel": "^0.1.0-develop.9",
"async-mutex": "^0.4.0",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/kernel-swarm-client",
"version": "0.0.2-develop.11",
"version": "0.0.2-develop.12",
"type": "module",
"main": "lib/index.js",
"repository": {

View File

@ -8,6 +8,7 @@ import b4a from "b4a";
import Backoff from "backoff.js";
// @ts-ignore
import Protomux from "protomux";
import { UnsubscribeFn } from "emittery";
export class SwarmClient extends Client {
private useDefaultSwarm: boolean;
@ -188,10 +189,10 @@ export class Socket extends Client {
await this.swarm.emit("setup", this);
}
// @ts-ignore
on(event: any, listener: any): this {
on(event: any, listener: any): UnsubscribeFn {
const parentOn = super.on(event, listener);
if (this.eventUpdates[event]?.has(listener)) {
return this;
return parentOn;
}
const [update, promise] = this.connectModule(
@ -207,8 +208,7 @@ export class Socket extends Client {
this.off(event as string, listener);
});
super.on(event, listener);
return this;
return parentOn;
}
off(event: any, listener: any): this {