Skip to content

Commit

Permalink
chore(release): v0.18.0-dev.11
Browse files Browse the repository at this point in the history
  • Loading branch information
jost-s committed Sep 27, 2024
1 parent 21aeeba commit ce92234
Show file tree
Hide file tree
Showing 11 changed files with 112 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
### Removed

## 2024-09-26: v0.18.0-dev.11
### Added
- Util function to compare two cell ids `isSameCell`.
### Changed
- **BREAKING**: Clone cell ids have changed from accepting a `CellId` to a `DnaHash`.

## 2024-08-05: v0.18.0-dev.10
### Changed
- Signal listeners changed from only returning an `AppSignal` to a `Signal` which can be either an app or system signal.
Expand Down
2 changes: 1 addition & 1 deletion docs/client.deleteclonecellrequest.clone_cell_id.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The clone id or cell id of the clone cell
**Signature:**

```typescript
clone_cell_id: RoleName | CellId;
clone_cell_id: RoleName | DnaHash;
```
2 changes: 1 addition & 1 deletion docs/client.deleteclonecellrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The app id that the clone cell belongs to

</td><td>

[RoleName](./client.rolename.md) \| [CellId](./client.cellid.md)
[RoleName](./client.rolename.md) \| [DnaHash](./client.dnahash.md)


</td><td>
Expand Down
2 changes: 1 addition & 1 deletion docs/client.disableclonecellrequest.clone_cell_id.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ The clone id or cell id of the clone cell
**Signature:**

```typescript
clone_cell_id: RoleName | CellId;
clone_cell_id: RoleName | DnaHash;
```
2 changes: 1 addition & 1 deletion docs/client.disableclonecellrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Description

</td><td>

[RoleName](./client.rolename.md) \| [CellId](./client.cellid.md)
[RoleName](./client.rolename.md) \| [DnaHash](./client.dnahash.md)


</td><td>
Expand Down
71 changes: 71 additions & 0 deletions docs/client.issamecell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@holochain/client](./client.md) &gt; [isSameCell](./client.issamecell.md)

## isSameCell() function

Check if two cell ids are identical.

**Signature:**

```typescript
isSameCell: (cellId1: CellId, cellId2: CellId) => boolean
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

cellId1


</td><td>

[CellId](./client.cellid.md)


</td><td>

Cell id 1 to compare.


</td></tr>
<tr><td>

cellId2


</td><td>

[CellId](./client.cellid.md)


</td><td>

Cell id 1 to compare.


</td></tr>
</tbody></table>
**Returns:**

boolean

True if the cell ids are identical.

11 changes: 11 additions & 0 deletions docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,17 @@ From https://github.com/holochain/holochain/blob/develop/crates/holo\_hash/src/h
Check if a cell's role name is a valid clone id.


</td></tr>
<tr><td>

[isSameCell(cellId1, cellId2)](./client.issamecell.md)


</td><td>

Check if two cell ids are identical.


</td></tr>
<tr><td>

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@holochain/client",
"version": "0.18.0-dev.10",
"version": "0.18.0-dev.11",
"description": "A JavaScript client for the Holochain Conductor API",
"author": "Holochain Foundation <[email protected]> (https://holochain.org)",
"license": "CAL-1.0",
Expand Down
16 changes: 8 additions & 8 deletions src/api/app/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,22 +249,22 @@ export const SignalType = {
*/
export type RawSignal =
| {
[SignalType.App]: EncodedAppSignal;
}
[SignalType.App]: EncodedAppSignal;
}
| {
[SignalType.System]: SystemSignal;
};
[SignalType.System]: SystemSignal;
};

/**
* @public
*/
export type Signal =
| {
[SignalType.App]: AppSignal;
}
[SignalType.App]: AppSignal;
}
| {
[SignalType.System]: SystemSignal;
};
[SignalType.System]: SystemSignal;
};

/**
* @public
Expand Down
9 changes: 9 additions & 0 deletions src/utils/cell.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import { CellId } from "../types.js";
import { encodeHashToBase64 } from "./base64.js";

/**
* Check if two cell ids are identical.
*
* @param cellId1 - Cell id 1 to compare.
* @param cellId2 - Cell id 1 to compare.
* @returns True if the cell ids are identical.
*
* @public
*/
export const isSameCell = (cellId1: CellId, cellId2: CellId) => {
const dnaHashB64_1 = encodeHashToBase64(cellId1[0]);
const agentPubKeyB64_1 = encodeHashToBase64(cellId1[1]);
Expand Down

0 comments on commit ce92234

Please sign in to comment.