Skip to content

Releases: jacobobryant/biff

v0.5.6

31 Dec 05:20
Compare
Choose a tag to compare

Upgrade instructions:

Added:

Fixed:

  • Java version detection in new-project.clj is more reliable (thanks @PavlosMelissinos).
  • Added a temporary workaround to biff/submit-tx until xtdb/xtdb@33474ce is released.
  • Fixed a bug that in some cases could cause biff/submit-tx to return successfully even if the transaction failed due to contention.
  • bb deploy no longer fails with a sudo: a terminal is required to read the password error message (thanks @kyptin).

Changed:

  • Refactored the :biff/ensure-unique transaction function to be slightly faster.
  • Bumped XT from 1.22.0 to 1.22.1.
  • The nREPL server Biff starts now includes refactor-nrepl middleware.
  • New projects use the abbreviated :tag "...", :sha "..." dependency format.

v0.5.5

10 Dec 05:59
Compare
Choose a tag to compare

Upgrade instructions:

  • Follow the upgrade instructions for any previous releases.
  • Change Biff's :sha value in deps.edn and tasks/deps.edn to 9c11643516e8526a75c761f77139014241d5f114.
  • If you'd like to use database fixtures, copy and paste the code from this commit into your project.

Added:

  • lookup-all and lookup-id-all functions. See API docs.
  • Biff transactions will now replace any :db.id/* keywords with random UUIDs. See reference docs.
  • New projects now include database fixtures.

Changed:

  • Biff now mostly works on plain Windows (i.e. without WSL). See the new create project commands, and the note about Windows. Anyone know how to turn those PowerShell commands into a one-liner?
  • lookup now accepts a custom pull expression (see API docs).
  • The recommended email service for new projects is now Postmark instead of MailerSend.
  • Removed :com.example/enable-{web,worker} config keys from new projects. These were intended to illustrate how to run Biff on separate web server/worker machines, but I decided better to leave that to a how-to article.
  • submit-tx now uses jitter in its backoff + retry algorithm.
  • base-html now uses summary_large_image instead of summary for the Twitter card format.

v0.5.4

22 Oct 00:10
Compare
Choose a tag to compare

Upgrade instructions:

  • Follow the upgrade instructions for any previous releases.
  • Change Biff's :sha value in deps.edn and tasks/deps.edn to 540dc03e6494c2ef6534bcf6023e08215f7cc3dc.

Fixed:

For the record, I do occasionally test new features before shipping them.

v0.5.3

13 Oct 00:55
Compare
Choose a tag to compare

Upgrade instructions:

  • Follow the upgrade instructions for any previous releases.
  • Change Biff's :sha value in deps.edn and tasks/deps.edn to 92a03324f98836d579878fc669eb702746551858.

Added:

  • Added :db.op/upsert and :db/unique operations to Biff transactions. db.op/upsert is like :db/lookup, but implemented with a transaction function. See the transaction docs. In addition, biff/submit-tx has been refactored further to make it easier to extend. This isn't yet documented, but see the :biff.xtdb/transformers option.

Fixed:

  • Changed Execstart to ExecStart in setup.sh.
  • Continue running :on-tx functions even if one of them fails.

v0.5.2

12 Oct 01:45
Compare
Choose a tag to compare

Upgrade instructions:

  • Change Biff's :sha value in deps.edn to 780d76fde5adbd3d7edd3e3e2020b77ddcef513f.
  • Apply the changes in these commits: 2733f75, 580adb4, and be7aeef (see the comment). Note that the changes in setup.sh will need to be done on the server.
  • Install Babashka if you haven't already.

Changed:

  • The task shell script has been replaced with Babashka tasks. e.g. now you'll run bb dev instead of ./task dev, etc. The task implementations are now stored as library code, so if they need to be updated in future releases, it will not require any manual changes to upgrade.
  • use-chime and use-tx-listener now take a :biff/features option instead of :biff.chime/tasks and :biff.xtdb/on-tx options, respectively. This eliminates the need for some of the code in your project's main namespace. (The previous options are still recognized for backwards compatibility.)
  • use-xt now accepts a :biff.xtdb/tx-fns option, for creating transaction functions on startup. There is also a biff/tx-fns value which contains a :biff/ensure-unique transaction function.
  • biff/submit-tx is more flexible: (1) XT operations can be mixed in with Biff operations (useful for calling transaction functions); (2) you can provide a function that returns a Biff transaction, which will be called again each time the transaction is retried (i.e. if there's contention); (3) there is a :biff.xtdb/retry option which, if false, will return immediately instead of awaiting the tx and retrying on contention (default true).
  • The biff/lookup and biff/lookup-id functions now take a variable number of key-value pairs.

Added:

  • biff/submit-tx's implementation has been broken up into two new functions: biff/biff-tx->xt, which converts a Biff transaction to an XT transaction, and biff/submit-with-retries, which submits an XT transaction and retries if there's contention.

Deprecated:

  • :db/lookup operations should be replaced with transaction functions. See 580adb4. I decided that I prefer to use a transaction function for uniqueness checks because using match operations could fail to enforce uniqueness if you e.g. previously created a document without using :db/lookup. Transaction functions will always work.

In addition, the reference documentation is all up to date, and I have even added a test 🙂.

v0.5.1

04 Oct 19:38
Compare
Choose a tag to compare

Upgrade instructions:

  • Change Biff's :sha value in deps.edn to dafe73f32d8019417905d356c93c7050f43b4bee.

Fixes:

  • Call the stop function for biff/use-queues correctly. Previously, an exception was thrown if you tried to refresh the system (i.e. (biff/refresh)).

v0.5.0

01 Oct 02:12
Compare
Choose a tag to compare

Upgrade instructions:

  • Change Biff's :sha value in deps.edn to 0895b1d71c3b1e7fe64943a8c3289cf566899c4a
  • Delete the storage/xtdb/index directory (See breaking changes)
  • Apply the changes in example.clj of this commit if you would like to start using queues
  • Apply this change if you would like to use add-libs

Breaking:

  • Upgraded XTDB from 1.21.0-beta2 to 1.22.0. See the XTDB release notes. This upgrade requires you to re-index. Run rm -r storage/xtdb/index/, and then re-indexing will occur next time you start your application.

Added:

  • In-memory job queues. Feature maps may now have a :queues key. If set, Biff will create a set of java.util.concurrent.BlockingQueues, each with its own fixed-size consumer thread pool. There is not yet a section for queues in the Reference documentation, but there is a comprehensive use-queues doc string. Queues do not (yet) include persistence or retry logic. I may add that on top of these in-memory queues in a future release, but you can also do so in your own application code if needed.
  • Add new dependencies without restarting the REPL (via clojure.tools.deps.alpha.repl/add-libs). Whenever you save a file, any new dependencies in deps.edn will be passed to add-libs.

v0.4.4-beta

02 Sep 20:54
Compare
Choose a tag to compare

Upgrade instructions:

  • Change Biff's :sha value in deps.edn to 6bf7d470a55f88172ccf80c92df6564987f37bf1
  • Apply this small bug fix to your project's main .clj file

Added:

  • The example project now includes the frontend code needed for Recaptcha. So now all you need to do to enable it on new projects is to add your Recaptcha site key and secret key to your config.edn file. If you'd like to apply the changes to an existing project, see these changes in home.clj.
  • Some code previously in the example project has been moved into a new com.biffweb/delete-old-files function.
  • Biff transactions now support a :db/op :create operation which will cause the transaction to fail if the document in question already exists. Thanks to @N-litened for the PR.

Bugs:

  • Remove some nils from the Reitit routes, which were causing errors in some situations. See "Upgrade instructions" above.
  • Fixed some redirect issues that were causing problems with htmx.
  • com.biffweb/lookup previously did not work... at all... and now it does.

v0.4.3-beta

08 Aug 20:02
Compare
Choose a tag to compare

Upgrade instructions:

  • Change Biff's :sha value in deps.edn to e1f5a466becd532cff633234a9b4c576d2d9072b

Added:

  • com.biffweb/use-beholder for watching file changes. The example project now uses this by default, and com.biffweb/use-hawk is deprecated. Hawk uses an out-of-date library and was causing problems on M1 Macs. See e1f5a46 if you'd like to switch to Beholder in an existing project.
  • ./task format command in the example project, which runs cljfmt. See edac3d4 if you'd like to add it to an existing project.

Bugs/breaking:

  • Make com.biffweb/select-ns-as work with nil (or empty string) arguments. e.g. (select-ns-as {:a "b"} nil "foo") now returns {:foo/a "b"} instead of {}.

v0.4.2-beta

17 Apr 01:16
Compare
Choose a tag to compare

Upgrade instructions:

  • Change Biff's :sha value in deps.edn to 951ad0b7d6f31408c82996cbcfd105d6be7e00e7. (Or use {:mvn/version "0.4.2-beta"}.)
  • Add org.slf4j/slf4j-simple {:mvn/version "2.0.0-alpha5"} to deps.edn.

Breaking:

  • Removed slf4j-nop from the Biff lib's dependencies. Also started using clojure.tools.logging instead of println. To see the logs, you must add slf4j-simple (or another logging implementation) to your deps.edn as described above. See #114

Changes:

Bugs:

  • Fixed biff/crop-day. See #116
  • Added :hx-swap "outerHTML" to com.example.feat.app/bar-form. Previously, form elements became nested in the DOM whenever you submitted the bar form in the example app. If you want to apply this fix to an existing project, copy the code from d35efd6.

Thank you to those who submitted issues and PRs.