All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Ensure that slugger functionality is applied on first
save
invocation (before, the necessary hook would only be installed aftersave
or corresponding functions were called once).
- Mongoose 8 compatibility
- Mongoose 7 compatibility
- Require Mongoose 7+
- Require at least NodeJS 16
- Restructure plugin options –
SluggerOptions
is an interface instead of a class now - Rename exports:
plugin
becomessluggerPlugin
wrap
function is no longer neeeded
- Mongoose 6 compatibility
- Require Mongoose 6+
- Different fix for
Already attempted slug '…' before. Giving up.
- Prevent error
Already attempted slug '…' before. Giving up.
which happened for strings ending in a numeric suffix
- Require at least MongoDB 4.2.0 (main motivation: consistent duplicate key error messages between WiredTiger and In-Memory engine - which in turn allows to run integration tests with the In-Memory engine now)
- Add maxLength for the slug
- Update dependencies
- Proper generic return type for
wrap
function (see #21)
- Replace underscores with hyphens