- Node.js 16 or higher required, lower versions will not work
config.db2.addDebounce
replaced withconfig.db2.addBatchThrottle
logStats()
isPrivate()
operator
We brought back isPrivate()
which is just a shortcut operator that does the
same as or(isEncryted(), isDecrypted())
.
create()
onMsgAdded()
installFeedFormat()
installEncryptionFormat()
Check the README for more details on these APIs.
- The operator
isPrivate()
removed in favor of two new operators:isDecrypted()
andisEncrypted()
, both support the encryption format name as an optional argument, e.g.isDecrypted('box')
andisEncrypted('box2')
ssb.db.publish()
no longer supports box2 recipients such as private-groups. You need to usessb.db.create()
for that.
- The indexes
canDecrypt.index
andencrypted.index
were renamed todecrypted.index
andencrypted-box2.index
respectively. You can either let ssb-db2 recreate these indexes with the new names, or you can manually rename them before ssb-db2 loads. - Deprecated APIs:
ssb.db.post
,ssb.db.publish
,ssb.db.publishAs
are marked as obsolete, in favor ofonMsgAdded
andcreate()
, but still supported as before. In a future version they may be removed from the default setup and you'll have to manually import them fromssb-db2/compat/post
andssb-db2/compat/publish
.
- JITDB indexes are now stored in
db2/jit
while previously they were stored indb2/indexes
. Updating ssb-db2 from 3.0.0 to 4.0.0 requires no changes in your code, but if you want to avoid the JITDB indexes being rebuilt from scratch, then you'll have to move all*.32prefix
,*.32prefixmap
, and*.index
files (exceptcanDecrypt.index
andencrypted.index
) fromdb2/indexes/
todb2/jit/
.
- Previously, ssb-db2 emitted events on the secret-stack event emitter with event names
ssb:db2:indexing:progress
andssb:db2:migrate:progress
. From version 3.0.0 those have been replaced by conventional muxrpcsource
APIs atsbot.db2.indexingProgress()
andsbot.db2migrate.progress()
, respectively.
- ssb-db2 now uses
jitdb@3
with the newwhere()
operator. All your queries will have to be updated to usewhere()
, even though it's straightforward to adopt this new operator.