- Node.js 16 or higher required, lower versions will not work
config.db2.addDebouncereplaced 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.indexandencrypted.indexwere renamed todecrypted.indexandencrypted-box2.indexrespectively. 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.publishAsare marked as obsolete, in favor ofonMsgAddedandcreate(), 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/postandssb-db2/compat/publish.
- JITDB indexes are now stored in
db2/jitwhile 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*.indexfiles (exceptcanDecrypt.indexandencrypted.index) fromdb2/indexes/todb2/jit/.
- Previously, ssb-db2 emitted events on the secret-stack event emitter with event names
ssb:db2:indexing:progressandssb:db2:migrate:progress. From version 3.0.0 those have been replaced by conventional muxrpcsourceAPIs atsbot.db2.indexingProgress()andsbot.db2migrate.progress(), respectively.
- ssb-db2 now uses
jitdb@3with the newwhere()operator. All your queries will have to be updated to usewhere(), even though it's straightforward to adopt this new operator.