New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mongoose-autopopulate

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-autopopulate - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

test/bugs.test.js

5

History.md

@@ -0,1 +1,6 @@

0.5.0 / 2016-11-29
==================
* feat: support lean #27 #14 [siboulet](https://github.com/siboulet)
* feat: support virtual autopopulate #24 [siboulet](https://github.com/siboulet)
0.4.0 / 2015-09-03

@@ -2,0 +7,0 @@ ==================

@@ -5,2 +5,3 @@ var mongoose = require('mongoose');

var pathsToPopulate = [];
eachPathRecursive(schema, function(pathname, schemaType) {

@@ -26,3 +27,15 @@ var option;

if (schema.virtuals) {
Object.keys(schema.virtuals).forEach(function(pathname) {
if (schema.virtuals[pathname].options.autopopulate) {
pathsToPopulate.push({
options: defaultOptions(pathname, schema.virtuals[pathname].options),
autopopulate: schema.virtuals[pathname].options.autopopulate,
});
}
});
}
var autopopulateHandler = function() {
if (this._mongooseOptions && this._mongooseOptions.lean) return;
var numPaths = pathsToPopulate.length;

@@ -29,0 +42,0 @@ for (var i = 0; i < numPaths; ++i) {

15

package.json
{
"name": "mongoose-autopopulate",
"version": "0.4.0",
"version": "0.5.0",
"description": "Always populate() certain fields in your mongoose schemas",
"main": "index.js",
"scripts": {
"test": "mocha ./test/unit.js",
"test-all": "mocha ./test/*.js",
"test": "mocha ./test/*.js",
"test-integration": "mocha ./test/integration.js",

@@ -23,7 +22,7 @@ "test-travis": "istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/*"

"devDependencies": {
"acquit": "0.0.3",
"istanbul": "0.3.2",
"mocha": "2.2.5",
"mongoose": "4.0.6",
"underscore": "1.5.2"
"acquit": "0.4.1",
"istanbul": "0.4.5",
"mocha": "3.2.0",
"mongoose": "4.x",
"underscore": "1.8.3"
},

@@ -30,0 +29,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc