
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
mongoose-archive
Advanced tools
Mongoose archive plugin.
Yet another softdelete plugin, but with this one you will not be querying archived documents by default.
Adds archive([callback]) and restore([callback]) methods to the documents.
If archive or restore may be called without callback if used with Mongoose 4.x.
In this case, they will return a Promise.
archive([callback]) creates archivedAt property with timestamp of the moment
when the method was called.
restore([callback]) removes archivedAt field.
Plugin also patches find, findOne, findOneAndRemove and findOneAndUpdate
methods to add { archivedAt: { $exists: false } } to the query object in case
condition for archivedAt wasn't specified. This way you will not be querying
archived documents (unless you specified archivedAt condition by yourself) as
they were actually removed.
Install
npm install mongoose-archive
Just require and register plugin for a desired Schema.
import mongooseArchive from 'mongoose-archive';
Model.plugin(mongooseArchive);
After, you can call archive and restore methods on your Model instances.
instance.archive();
// instance will not be queriable with Model.find(), unless you will be querying
// archived documents by specifying proper archivedAt filter
instance.restore();
// now the document was "restored" from archive
// to query archived documents simply add { archivedAt: { $exists: true } } to your query
Model.find().where('archivedAt').exists();
FAQs
Mongoose archive plugin
We found that mongoose-archive demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.