Skip to content

v10.0.0: 🎉 General Availability 🎉

Latest
Compare
Choose a tag to compare
@aboodman aboodman released this 07 May 01:42
bbb6928

🌁 Summary

After more than 2 years of development and iteration with customers, we are extremely pleased to share the first General Availability (non-beta) release of Replicache.

This marks the point at which we recommend Replicache for use in production systems.

To install:

npm upgrade replicache-react && npm install [email protected]

Important: Replicache Now Requires a License Key

Getting a key is easy — run the command below and follow the prompts.

npx [email protected] get-license

For details on pricing see Commercial Pricing. For details on how the licensing system works, see the Licensing Documentation.

License Change

Together with General Availability, we are moving from the BSL license (a middle ground between open and closed source) to a more traditional closed-source model. This will not affect most users because the npm packages will remain publicly available, containing minified code. Only the availability of the source is changing.

See Replicache Licensing Update for more information.

🎁 Features

  • Introduce the concept of a Release Build and disable some expensive asserts in it (#876)
    • You now need to make sure your build tools substitutes process.env.NODE_ENV to "production"
  • Expose the profileID used for licensing on Replicache and in push/pull requests (#838)
  • Export makeIDBName as a convenience (#883)
  • New Phone, Who Dis? — Graceful recovery when server doesn’t recognize client (#335)
  • Enable custom log handling by adding logSinks to [ReplicacheOptions]
  • Export makeScanResult — a way to more easily implement scan() server-side (#607)
  • Export watch as experimentalWatch — allowing you to only be notified about the exact keys that changed. (#839)
  • Export version const containing Replicache version number (#991)

🧰 Fixes

  • Send errors from subscribe functions to console.log if no onError specified (#862)
  • Recover gracefully from case where a tab gets backgrounded for a long time (weeks), gets frozen, and thus its Replicache state gets GC’d. (#784)
  • Fix spurious subscription re-fire in edge case (#841)
  • Prevent concurrent pulls and persists. This was causing errors in the console such as "Wrong Sync Head". These errors were harmless, but annoying.

⚠️ Breaking Changes

  • The licenseKey parameter to the Replicache constructor is now required. See Licensing Docs for more information.
  • Removed top-level scan, has, isEmpty, get methods from Replicache. These have been deprecates since v8. Please use Replicache.query() instead. (#878729)
  • The entries returned from scan().entries() are now readonly tuples.
  • We now ship code with process.env.NODE_ENV in it. This does not work in a browser out of the box. You need to either define that or ensure your build tools (esbuild, rollup, webpack, parcel) does the correct substitution. (#876)
  • AsyncIterableIteratorToArray is now an interface not a class. This was causing problems with reusing Replicache on the server.

🚀 Performance

  • Scan speed improved about 79% (from ~350 MB/s to ~625 MB/s on our benchmark) in the new release build.