Releases: jacobobryant/biff
Releases · jacobobryant/biff
v0.5.6
Upgrade instructions:
- Follow the upgrade instructions for any previous releases.
- Update your Biff dependency in
deps.edn
andtasks/deps.edn
to{:tag "v0.5.6", :sha "88af473", ...}
. - Optionally, remove the
:biff.tasks/main-ns
,:biff.tasks/deploy-from
and:biff.tasks/deploy-to
options fromconfig.edn
, and replace them with the new:biff.tasks/clj-args
and:biff.tasks/deploy-cmd
options as in 750d989#diff-457a8574a0772bef7ce54f354ba6ce1a73dd8203d548152ed53b517cf136a63e.
Added:
- There are two new config options:
:biff.tasks/clj-args
and:biff.tasks/deploy-cmd
. See 750d989#diff-457a8574a0772bef7ce54f354ba6ce1a73dd8203d548152ed53b517cf136a63e. The:biff.tasks/main-ns
,:biff.tasks/deploy-from
and:biff.tasks/deploy-to
options are now deprecated.
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 asudo: 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
to1.22.1
. - The nREPL server Biff starts now includes refactor-nrepl middleware.
- New projects use the abbreviated
:tag "...", :sha "..."
dependency format.
v0.5.5
Upgrade instructions:
- Follow the upgrade instructions for any previous releases.
- Change Biff's
:sha
value indeps.edn
andtasks/deps.edn
to9c11643516e8526a75c761f77139014241d5f114
. - If you'd like to use database fixtures, copy and paste the code from this commit into your project.
Added:
lookup-all
andlookup-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 usessummary_large_image
instead ofsummary
for the Twitter card format.
v0.5.4
Upgrade instructions:
- Follow the upgrade instructions for any previous releases.
- Change Biff's
:sha
value indeps.edn
andtasks/deps.edn
to540dc03e6494c2ef6534bcf6023e08215f7cc3dc
.
Fixed:
:db/default
operations actually work now (#140 -- thanks @AndreasEdvardsson)
For the record, I do occasionally test new features before shipping them.
v0.5.3
Upgrade instructions:
- Follow the upgrade instructions for any previous releases.
- Change Biff's
:sha
value indeps.edn
andtasks/deps.edn
to92a03324f98836d579878fc669eb702746551858
.
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
toExecStart
insetup.sh
. - Continue running
:on-tx
functions even if one of them fails.
v0.5.2
Upgrade instructions:
- Change Biff's
:sha
value indeps.edn
to780d76fde5adbd3d7edd3e3e2020b77ddcef513f
. - 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 runbb 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
anduse-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 abiff/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, iffalse
, will return immediately instead of awaiting the tx and retrying on contention (defaulttrue
).- The
biff/lookup
andbiff/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, andbiff/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
Upgrade instructions:
- Change Biff's
:sha
value indeps.edn
todafe73f32d8019417905d356c93c7050f43b4bee
.
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
Upgrade instructions:
- Change Biff's
:sha
value indeps.edn
to0895b1d71c3b1e7fe64943a8c3289cf566899c4a
- 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
to1.22.0
. See the XTDB release notes. This upgrade requires you to re-index. Runrm -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 ofjava.util.concurrent.BlockingQueue
s, 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 comprehensiveuse-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 indeps.edn
will be passed toadd-libs
.
v0.4.4-beta
Upgrade instructions:
- Change Biff's
:sha
value indeps.edn
to6bf7d470a55f88172ccf80c92df6564987f37bf1
- 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
nil
s 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
Upgrade instructions:
- Change Biff's
:sha
value indeps.edn
toe1f5a466becd532cff633234a9b4c576d2d9072b
Added:
com.biffweb/use-beholder
for watching file changes. The example project now uses this by default, andcom.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 runscljfmt
. 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
Upgrade instructions:
- Change Biff's
:sha
value indeps.edn
to951ad0b7d6f31408c82996cbcfd105d6be7e00e7
. (Or use{:mvn/version "0.4.2-beta"}
.) - Add
org.slf4j/slf4j-simple {:mvn/version "2.0.0-alpha5"}
todeps.edn
.
Breaking:
- Removed
slf4j-nop
from the Biff lib's dependencies. Also started usingclojure.tools.logging
instead ofprintln
. To see the logs, you must addslf4j-simple
(or another logging implementation) to yourdeps.edn
as described above. See #114
Changes:
- Made it easier to use LMDB instead of RocksDB. See https://biffweb.com/docs/#unsatisfiedlinkerror
Bugs:
- Fixed
biff/crop-day
. See #116 - Added
:hx-swap "outerHTML"
tocom.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.