2.2.2 (2025-01-08)
- update query helper to match any query operation (a939e4b)
2.2.1 (2025-01-03)
- github action to publish to npm (cc98304)
2.2.0 (2025-01-03)
- upgrade to latest mongoose (17ceae6)
2.1.0 (2024-04-10)
- update mongoose/mongodb dependencies (408cf68)
2.0.0 (2024-03-14)
- dropping support for Node 14, 16
- dropping support for MongoDB 4
- upgrade to mongoose 8
- dropping support for MongoDB 4 (09883d3)
- dropping support for Node 14, 16 (09883d3)
- removing support for query option
{ withDeleted: true }
(usedeleted: { $in: [true, false] }
in query instead) (09883d3) - renaming query helper functions
withDeleted()
->allDocuments()
,onlyDeleted()
->deletedDocuments()
(09883d3) - upgrade to mongoose 8 (09883d3)
December 28, 2022
- Only add alias if name is different
August 25, 2022
- Make delete attributes optional
August 16, 2022
- Change type definition to not extend Document
July 14, 2022
- Add missing export for DeleteQuery
July 14, 2022
- Add support for custom schema definition for deleted
- Improved query helper typescript interface for proper chaining
- Update dependencies and add support for node 18 and mongodb 5
November 24, 2021
- Completely re-written in TypeScript
- Only support for Mongoose 6
- Removed typeKey option, will use typeKey from schema instead
- Removed deletedByType option, use custom schema type instead
- Removed use$neOperator option, will always use equal for performance
August 31, 2021
- Upgrade all test to support mongoose 5.x and 6.x
- Stop using TravicCI as test runner
- Setup GitHub action for tests
- Node: 12, 14, 16
- MongoDB: 4.0, 4.2, 4.4
- Upgrade Mongoose ^6 in
devDependencies
- Add Mongoose 6 into
peerDependencies
#105 (@Paso)
November 19, 2020
- Add option to
populate
deleted documents #40 (@sven) - Update documentation for
aggregate
(@Jericho1060) - Update
mocha
->8.x
- fix: deprecation warning for collection.update when user overrides update method #81 #78 (@nsine)
- fix:
nyc
moved intodevDependencies
#80 (@isikhi)
April 1, 2020
- Add option to override
aggregate
(@shimonbrandsdorfer) - Upgrade all
devDependencies
to latest versions - Remove Istanbul coverage tool
September 3, 2019
- Add option to disable use of
$ne
operator using{use$neOperator: false}
(@bdelville, @gabzim) #50 - Fix Mongoose DeprecationWarning: collection.update is deprecated (@cardimajs, @jebarjonet)
- Upgrade all
devDependencies
to latest versions - Fix security vulnerabilities in dependencies
- Add additional tests for
updateMany
,countDocuments
,use$neOperator
- Setup
.travis.yml
to test plugin on Node: 12, 11, 10, 9, 8, 7, 6, 5, 4
December 10, 2018
- Add support to mongoose 5.x (@joelmukuthu, @gforge)
- Add
deleteById
static method #16 - Add
countDocuments
method with related override methods (only for v5 Mongoose) #45 - Upgrade all
devDependencies
to latest versions - Setup
.travis.yml
to test plugin on Node: 10, 9, 8, 7, 6, 5, 4 - Setup
.travis.yml
to usecoveralls@3.0.2
- Add additional tests
July 10, 2016
- Add custom typeKey support #22
- Add option to set custom type for deletedBy
- Support instance method delete promise
- Add specification about remove() to README
June 20, 2016
- Methods override fix for existent DB #11
- Option to create indexes for deleted, deletedAt, deletedBy, related to #12
July 1, 2016
- Default delete set to
false
#10
April 26, 2016
- Correct field name into documentation,
validateBeforeDelete
April 20, 2016
- Add option to disable validation on delete #6
Mar 11, 2016
- Bulk delete and restore
- Remove requirement for callback in delete() and restore()
Feb 1, 2016
- Add option to override static model methods (
count
,find
,findOne
,findOneAndUpdate
,update
) - Add additional methods for overridden static methods:
only not deleted documents | only deleted documents | all documents |
---|---|---|
count() | countDeleted | countWithDeleted |
find() | findDeleted | findWithDeleted |
findOne() | findOneDeleted | findOneWithDeleted |
findOneAndUpdate() | findOneAndUpdateDeleted | findOneAndUpdateWithDeleted |
update() | updateDeleted | updateWithDeleted |
Aug 1, 2014
- Initial version
- Add
deleted
(true-false) key on document - Add
deletedAt
key to store time of deletion - Add
deletedBy
key to record who deleted document - Restore deleted documents,
restore()
method