tag:github.com,2008:https://github.com/earthstar-project/earthstar/releasesRelease notes from earthstar2024-06-14T10:09:27Ztag:github.com,2008:Repository/266444815/11.0.0-beta.42024-06-14T10:09:27Z11.0.0-beta.4<p>11.0.0-beta.4</p>sgwilymtag:github.com,2008:Repository/266444815/11.0.0-beta.32024-05-22T07:51:34Z11.0.0-beta.3<p>Update version</p>sgwilymtag:github.com,2008:Repository/266444815/11.0.0-beta.22024-05-21T07:29:24Z11.0.0 beta - Earthstar × Willow<p>Good morning! The day for an Willow-powered Earthstar 11 beta is finally here. This is a big experiment: a new protocol underpinning everything, complementary new APIs, and of course, the greatest adventure of them all: getting it all to work in JavaScript.</p>
<p>Another experiment is how Earthstar will be distributed. A beta release of <code>@earthstar/earthstar</code> is available from JSR. <a href="https://jsr.io/@earthstar/earthstar@11.0.0-beta.2" rel="nofollow">https://jsr.io/@earthstar/earthstar@11.0.0-beta.2</a>. You can find installation instructions for your favourite runtime (yes, Node too) on there. Hopefully JSR will save us from lots of cross-runtime publishing headaches, let’s see.</p>
<p>The README is very much in progress (<a href="https://github.com/earthstar-project/earthstar/tree/willow">https://github.com/earthstar-project/earthstar/tree/willow</a>), but there is already very descriptive API documentation available in your IDE and viewable here: <a href="https://jsr.io/@earthstar/earthstar@11.0.0-beta.2/doc" rel="nofollow">https://jsr.io/@earthstar/earthstar@11.0.0-beta.2/doc</a>. A great place to start is the <code>Peer</code> class: <a href="https://jsr.io/@earthstar/earthstar@11.0.0-beta.2/doc/~/Peer" rel="nofollow">https://jsr.io/@earthstar/earthstar@11.0.0-beta.2/doc/~/Peer</a></p>
<p>This beta phase serves the purpose of making sure @earthstar/earthstar can really be used to build apps for the browser, Deno, and Node; that the APIs are as ergonomic as they should be; and to get the docs up to snuff. Your feedback — no matter how nitpicky — is now key! Issues, ideas, and PRs are all welcome on the Earthstar repo.</p>sgwilymtag:github.com,2008:Repository/266444815/v10.2.22023-08-31T09:09:10Zv10.2.2 - Dependency fixes<p>This is a patch release which fixes two dependencies that began to fail: <code>better-sqlite3</code> and <code>fast-stable-json-stringify</code>. The former was breaking NPM installs, the latter was breaking Deno installs. Now both are fixed.</p>sgwilymtag:github.com,2008:Repository/266444815/v10.2.12023-06-15T14:23:42Zv10.2.1 Fixed invitation redemption in Chrome and Firefox<p>This release fixes a bug where invitation URLS could not be redeemed in Chrome or Firefox (thanks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tripledoublev/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tripledoublev">@tripledoublev</a>!)</p>sgwilymtag:github.com,2008:Repository/266444815/v10.2.02023-05-16T11:46:24Zv10.2.0: LAN peer discovery and sync<p>This is a feature release adding APIs to <strong>automatically discover and sync with peers on the local network</strong>. Automatically find and sync with friends at a café, or with your own devices at home.</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Start a new discovery service, and advertise ourselves as "My Computer".
const discoveryLan = new DiscoveryLAN({ name: "My Computer" });
// Wait for new discovery service events...
for await (const discoveryEvent of peer.discover(discoveryLan)) {
if (discoveryEvent.kind === "PEER DISCOVERED") {
// We'll sync with everyone we find!
discoveryEvent.sync();
}
}"><pre><span class="pl-c">// Start a new discovery service, and advertise ourselves as "My Computer".</span>
<span class="pl-k">const</span> <span class="pl-s1">discoveryLan</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">DiscoveryLAN</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"My Computer"</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// Wait for new discovery service events...</span>
<span class="pl-k">for</span> <span class="pl-k">await</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">discoveryEvent</span> <span class="pl-k">of</span> <span class="pl-s1">peer</span><span class="pl-kos">.</span><span class="pl-en">discover</span><span class="pl-kos">(</span><span class="pl-s1">discoveryLan</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">discoveryEvent</span><span class="pl-kos">.</span><span class="pl-c1">kind</span> <span class="pl-c1">===</span> <span class="pl-s">"PEER DISCOVERED"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-c">// We'll sync with everyone we find!</span>
<span class="pl-s1">discoveryEvent</span><span class="pl-kos">.</span><span class="pl-en">sync</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p>Discovery is powered by <a href="https://github.com/earthstar-project/dns_sd">dns_sd</a>, and sync itself is powered by a new fully encrypted TCP transport driver.</p>
<ul>
<li>(Feature) Added <code>Peer.discover</code>, a new method for automatically discovering other peers. <em>How</em> it does that it left to the <code>DiscoveryService</code> you provide it.</li>
<li>(Feature) Added <code>DiscoveryLAN</code>, a discovery service for finding and advertising yourself to other peers on the local network. Works for both Node and Deno, requires <code>--unstable</code> on Deno.</li>
</ul>sgwilymtag:github.com,2008:Repository/266444815/v10.1.02023-04-14T12:37:53Zv10.1.0: Invitations<p>This is a feature release which adds support for invitation URLs.</p>
<p>Copying and pasting many addresses, secrets, and URLs is tedious. Copying and pasting a <em>single</em> address which your app already knows what to do with is much better.</p>
<p>They look like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="earthstar://+shareaddress.xxx/?invite&server=https://server.com&server=https://server2.com&secret=bxxx&v=2"><pre class="notranslate"><code>earthstar://+shareaddress.xxx/?invite&server=https://server.com&server=https://server2.com&secret=bxxx&v=2
</code></pre></div>
<ul>
<li>(Feature) Added <code>SharedSettings#redeemInvitationURL</code>, which adds the share, secret, and servers from an Earthstar invitation URL.</li>
<li>(Feature) Added <code>createInvitationURL</code> and <code>parseInvitationURL</code> utilities for creating and parsing Earthstar invitation URLs.</li>
<li>(Fix) <code>parseShareAddress</code> now validates share addresses more strictly so as to ensure their suffix is a pubkey.</li>
<li>(Fix) Deprecate <code>generateShareAddress</code></li>
<li>(Fix) Fixed some issues <code>ExtensionServerSettings</code> when ephemeral and<br>
non-ephemeral settings for a hosted share existed at the same time.</li>
<li>(Chore) Update <code>range_reconcile</code> to 1.0.2, which makes sync slightly more<br>
efficient.</li>
</ul>sgwilymtag:github.com,2008:Repository/266444815/v10.0.22023-02-13T13:28:57Zv10.0.2 - Updated Deno SqliteFFI driver, animal story<h2>Fixes</h2>
<ul>
<li><code>DocDriverSqliteFfi</code> has been updated to use <code>https://deno.land/x/sqlite3@0.7.3</code> which has compatibility with Deno 1.30.0 and up. This driver uses unstable APIs and will not work with previous versions of Deno.</li>
</ul>
<h2>Docs</h2>
<ul>
<li>Updated the example 'animal story' script to showcase Earthstar's ephemeral document features. Thank you <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/johanbove/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/johanbove">@johanbove</a>!</li>
<li>Updated the README to make it clear that certain APIs like <code>ReplicaDriverWeb</code> are only available through different namespaces in the NPM distribution.</li>
</ul>
<h2>Chores</h2>
<ul>
<li>Upgraded <a href="https://github.com/earthstar-project/range-reconcile">range-reconcile</a> to version 1.0.1.</li>
</ul>sgwilymtag:github.com,2008:Repository/266444815/v10.0.12023-01-18T15:01:58Zv10.0.1: Syncing fixes and improved errors<p>This is a patch release focused on resolving errors encountered during syncing, and making other issues encountered during syncing easier to diagnose.</p>
<p>Thank you to everyone who helped me put together the clues to find these bugs!</p>
<ul>
<li>(Fix) - Peers will now only initiate a single transfer for many documents with the same attachment, fixing a case which could cause syncing to hang indefinitely.</li>
<li>(Fix) - Peers will now attempt to download attachments for documents which they already possess prior to syncing but are missing attachments for.</li>
<li>(Improvement) - Syncer will cancel itself if it does not receive anything from the other peer within a ten second window.</li>
<li>(Improvement) - Syncer will cancel an attachment transfer if it doesn't receive anything from the other side within a ten second window.</li>
<li>(Improvement) - Warn in the console when a replica could not ingest an attachment during sync.</li>
<li>(Improvement) - Better error messages for web syncing failures (e.g. 404, wrong endpoint).</li>
</ul>sgwilymtag:github.com,2008:Repository/266444815/v10.0.02023-01-02T12:32:09Zv10: Attachments, Read-only shares, and Efficient Sync<h2>v10.0.0 - Squirrel</h2>
<blockquote>
<p>🐿 Cute, fast, and likes to store things.</p>
</blockquote>
<p>This is a major release which introduces <strong>attachments</strong>, <strong>share keypairs</strong>, <strong>efficient<br>
sync</strong>, and much much more. It is the biggest release of Earthstar ever.</p>
<p>As such, this version breaks compatibility with previous versions of Earthstar.</p>
<p>Here are the headline features:</p>
<ul>
<li><strong>Attachments</strong>. When a new document is written to a Replica you can attach<br>
arbitary binary data to it. This can be used for sharing large images, music,<br>
video, anything. There is no size limit.</li>
<li><strong>Shares with granular read / write access</strong>. Share addresses are now the<br>
public key of a share keypair. The public key grants discovery and read<br>
access, the secret key grants write access to the replica.</li>
<li><strong>Efficient sync</strong>. Syncing has been completely overhauled to use a new<br>
efficient reconclition mechanism powered by<br>
<a href="/earthstar-project/earthstar/blob/v10.0.0/earthstar-project/range-reconcile">range-reconcile</a> and<br>
push-pull-push-multicast trees.</li>
</ul>
<p>The server APIs have also been moved into this repo.</p>
<p>In addition to new features, many APIs have been tweaked or changed entirely.<br>
Please see the API documentation and the README to see what these new API<br>
changes are like.</p>
<h2>Server</h2>
<ul>
<li>Moved existing server APIs into the core module, available as <code>Server</code>.</li>
</ul>
<h2>Peer</h2>
<ul>
<li>Added <code>Peer.onReplicasChange</code></li>
<li>Added <code>Peer.onSyncersChange</code></li>
</ul>
<h2>Replica</h2>
<ul>
<li>Significantly improved the performance of querying documents.</li>
<li>Replicas now can create documents with attachments with <code>Replica.set</code></li>
<li>Added <code>Replica.ingestAttachment</code></li>
<li>Added <code>Replica.getAttachment</code></li>
<li>Added <code>Replica.addAttachments</code></li>
<li>Added <code>Replica.wipeDocAtPath</code></li>
<li>Added <code>Replica.getEventStream</code></li>
<li>Added <code>Replica.getQueryStream</code></li>
<li>Added <code>Replica.onEvent</code></li>
<li>Added <code>MultiformatReplica</code>, a Replica which is able to read, write, and sync<br>
documents of different formats.</li>
<li>Added <code>FormatEs5</code>, which supports share keypairs and attachments</li>
<li>Added <code>ReplicaDriverWeb</code></li>
<li>Added <code>ReplicaDriverFs</code></li>
<li>Added <code>RelpicaDriverMemory</code></li>
<li>Added <code>DocDriverSqliteFFI</code>, which uses an FFI implemetation of Sqlite.<br>
Requires the <code>--unstable</code> flag on Deno.</li>
<li>Updated <code>syncReplicaAndFsDir</code> to use attachments for large files.</li>
<li><code>ReplicaCache</code> now has attachment methods</li>
</ul>
<h2>Syncing</h2>
<ul>
<li>
<p>Added <code>PartnerLocal</code>, for syncing with local peers.</p>
</li>
<li>
<p>Added <code>PartnerWebServer</code>, for syncing with servers.</p>
</li>
<li>
<p>Added <code>PartnerWebClient</code>, for syncing with web clients.</p>
</li>
<li>
<p><strong>Removed</strong> earthstar_streaming_rpc as a dependency.</p>
</li>
</ul>
<h2>Queries</h2>
<ul>
<li>
<p><strong>Removed</strong> the <code>contentLength</code> options on <code>QueryFilter</code>.</p>
</li>
<li>
<p><strong>Removed</strong> <code>QueryFollower</code>. Use <code>Replica.getQueryStream</code> instead.</p>
</li>
<li>
<p><code>queryByTemplateAsync</code> and <code>queryByGlobAsync</code> have had the redundant <code>async</code><br>
taken out of their name.</p>
</li>
</ul>
<h2>Cryptography</h2>
<ul>
<li>Added <code>Crypto.generateShareKeypair</code></li>
<li>Added <code>CryptoDriverSodium</code> which uses a WASM version of libsodium for very<br>
fast operations. This is now the default driver on Deno.</li>
<li>Updated <code>CryptoDriverNoble</code> to use a new, faster, audited version.</li>
</ul>
<h2>Other</h2>
<ul>
<li>Added a new <code>SharedSettings</code> class for easily saving and retrieving an author<br>
keypair, shares and secrets, and favourite servers.</li>
<li>Added parseAuthorOrShareAddress</li>
<li>Added a new minified web bundle, available from<br>
<code>https://cdn.earthstar-project.org/js/earthstar.web.v10.0.0.js</code></li>
<li>Added ARCHITECTURE.md</li>
<li>Added CONTRIBUTING.md</li>
<li>Added CODE_OF_CONDUCT.md</li>
</ul>sgwilym