Skip to content

Commit

Permalink
fix rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjg committed Jul 26, 2024
1 parent 3836fc7 commit 71a5cd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/automerge-repo/src/Repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import { CollectionSynchronizer } from "./synchronizer/CollectionSynchronizer.js
import { SyncStatePayload } from "./synchronizer/Synchronizer.js"
import type { AnyDocumentId, DocumentId, PeerId } from "./types.js"

function randomPeerId() {
return "peer-" + Math.random().toString(36).slice(4) as PeerId
}

/** A Repo is a collection of documents with networking, syncing, and storage capabilities. */
/** The `Repo` is the main entry point of this library
*
Expand Down Expand Up @@ -61,7 +65,7 @@ export class Repo extends EventEmitter<RepoEvents> {
constructor({
storage,
network = [],
peerId,
peerId = randomPeerId(),
sharePolicy,
isEphemeral = storage === undefined,
enableRemoteHeadsGossiping = false,
Expand Down
1 change: 0 additions & 1 deletion packages/automerge-repo/test/Repo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,6 @@ describe("Repo", () => {
aliceDoc.change((doc: any) => (doc.text = "Hello world"))

const bobDoc = bobRepo.find(aliceDoc.url)
bobDoc.unavailable()
await eventPromise(bobDoc, "unavailable")

aliceAdapter.peerCandidate(bob)
Expand Down

0 comments on commit 71a5cd7

Please sign in to comment.