Skip to content

Commit

Permalink
Switch to sailshq/lodash which patched security vulnerabilities (#1)
Browse files Browse the repository at this point in the history
* Switch to @sailshq/lodash

* Actually use the right lodash

* Switch to released versions of the forks
  • Loading branch information
barryhammen authored Jan 13, 2021
1 parent 2cffb0c commit d404117
Show file tree
Hide file tree
Showing 84 changed files with 97 additions and 97 deletions.
4 changes: 2 additions & 2 deletions example/express/express-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

var express = require('express'),
_ = require('lodash'),
_ = require('@sailshq/lodash'),
app = express(),
Waterline = require('waterline'),
bodyParser = require('body-parser'),
Expand Down Expand Up @@ -154,6 +154,6 @@ orm.initialize(config, function(err, models) {

// Start Server
app.listen(3000);

console.log("To see saved users, visit http://localhost:3000/users");
});
4 changes: 2 additions & 2 deletions example/raw/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash')
var _ = require('@sailshq/lodash')
, Waterline = require('../../lib/waterline');


Expand Down Expand Up @@ -36,7 +36,7 @@ module.exports = function bootstrap( options, cb ) {
// Make sure our adapter defs have `identity` properties
def.identity = def.identity || identity;
});


var extendedCollections = [];
_(collections).each(function (def, identity) {
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var async = require('async');
var Schema = require('waterline-schema');
var Connections = require('./waterline/connections');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/aggregateQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Aggregate Queries Adapter Normalization
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var async = require('async');
var normalize = require('../utils/normalize');
var hasOwnProperty = require('../utils/helpers').object.hasOwnProperty;
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/compoundQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compound Queries Adapter Normalization
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var normalize = require('../utils/normalize');
var hasOwnProperty = require('../utils/helpers').object.hasOwnProperty;

Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/ddl/alter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var async = require('async');
var normalize = require('../../../utils/normalize');
var hasOwnProperty = require('../../../utils/helpers').object.hasOwnProperty;
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/ddl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var normalize = require('../../utils/normalize');
var getRelations = require('../../utils/getRelations');
var hasOwnProperty = require('../../utils/helpers').object.hasOwnProperty;
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/dql.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var normalize = require('../utils/normalize');
var schema = require('../utils/schema');
var hasOwnProperty = require('../utils/helpers').object.hasOwnProperty;
var _ = require('lodash');
var _ = require('@sailshq/lodash');


/**
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/errors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Module dependencies
*/
var _ = require('lodash');
var _ = require('@sailshq/lodash');


/**
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Base Adapter Definition
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');

var Adapter = module.exports = function(options) {

Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/sync/strategies/alter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var async = require('async');
var getRelations = require('../../../utils/getRelations');

Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/sync/strategies/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var async = require('async');
var hasOwnProperty = require('../../../utils/helpers').object.hasOwnProperty;

Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/sync/strategies/drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var getRelations = require('../../../utils/getRelations');


Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/adapter/sync/strategies/safe.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');


/**
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/collection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var extend = require('../utils/extend');
var inherits = require('util').inherits;

Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/connections/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Module Dependencies
*/
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var util = require('util');
var hasOwnProperty = require('../utils/helpers').object.hasOwnProperty;
var API_VERSION = require('../VERSION');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/core/dictionary.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _ = require('lodash');
var _ = require('@sailshq/lodash');

/**
* Handle Building an Adapter/Connection dictionary
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var schemaUtils = require('../utils/schema');
var COLLECTION_DEFAULTS = require('../collection/defaults');
var Model = require('../model');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/core/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var types = require('../utils/types');
var utils = require('../utils/helpers');
var hasOwnProperty = utils.object.hasOwnProperty;
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/core/transformations.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var utils = require('../utils/helpers');
var hasOwnProperty = utils.object.hasOwnProperty;

Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/core/typecast.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var types = require('../utils/types');
var utils = require('../utils/helpers');
var hasOwnProperty = utils.object.hasOwnProperty;
var _ = require('lodash');
var _ = require('@sailshq/lodash');

/**
* Cast Types
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/core/validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* https://github.com/balderdashy/anchor
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var anchor = require('anchor');
var async = require('async');
var utils = require('../utils/helpers');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/error/WLError.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var util = require('util');
var _ = require('lodash');
var _ = require('@sailshq/lodash');

/**
* WLError
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/error/WLValidationError.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var WLError = require('./WLError');
var WLUsageError = require('./WLUsageError');
var util = require('util');
var _ = require('lodash');
var _ = require('@sailshq/lodash');


/**
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/error/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

var util = require('util');
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var WLError = require('./WLError');
var WLValidationError = require('./WLValidationError');

Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var Bluebird = require('bluebird');
var Model = require('./lib/model');
var defaultMethods = require('./lib/defaultMethods');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/model/lib/associationMethods/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var async = require('async');
var utils = require('../../../utils/helpers');
var hasOwnProperty = utils.object.hasOwnProperty;
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/model/lib/associationMethods/remove.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var async = require('async');
var utils = require('../../../utils/helpers');
var hasOwnProperty = utils.object.hasOwnProperty;
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/model/lib/associationMethods/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var utils = require('../../../utils/helpers');
var nestedOperations = require('../../../utils/nestedOperations');
var hop = utils.object.hasOwnProperty;
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/model/lib/defaultMethods/save.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var async = require('async');
var deep = require('deep-diff');
var updateInstance = require('../associationMethods/update');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/model/lib/defaultMethods/toObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var utils = require('../../../utils/helpers');
var hasOwnProperty = utils.object.hasOwnProperty;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Module dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var Association = require('../association');
var utils = require('../../../utils/helpers');
var hasOwnProperty = utils.object.hasOwnProperty;
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/model/lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

var extend = require('../../utils/extend');
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var util = require('util');

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/aggregate.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

var async = require('async');
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var usageError = require('../utils/usageError');
var utils = require('../utils/helpers');
var normalize = require('../utils/normalize');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/composite.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

var async = require('async');
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var usageError = require('../utils/usageError');
var utils = require('../utils/helpers');
var normalize = require('../utils/normalize');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/deferred.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

var util = require('util');
var Promise = require('bluebird');
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var normalize = require('../utils/normalize');
var utils = require('../utils/helpers');
var acyclicTraversal = require('../utils/acyclicTraversal');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/dql/count.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module Dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var usageError = require('../../utils/usageError');
var utils = require('../../utils/helpers');
var normalize = require('../../utils/normalize');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/dql/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

var async = require('async');
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var utils = require('../../utils/helpers');
var Deferred = require('../deferred');
var callbacks = require('../../utils/callbacksRunner');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/dql/destroy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

var async = require('async');
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var usageError = require('../../utils/usageError');
var utils = require('../../utils/helpers');
var normalize = require('../../utils/normalize');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/dql/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

var async = require('async');
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var usageError = require('../../utils/usageError');
var utils = require('../../utils/helpers');
var normalize = require('../../utils/normalize');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/finders/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var Joins = require('./joins');
var Operations = require('./operations');
var Integrator = require('../integrator');
var waterlineCriteria = require('waterline-criteria');
var _ = require('lodash');
var _ = require('@sailshq/lodash');
var async = require('async');
var hasOwnProperty = utils.object.hasOwnProperty;

Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/finders/dynamicFinders.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Query the collection using the name of the attribute directly
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var usageError = require('../../utils/usageError');
var utils = require('../../utils/helpers');
var normalize = require('../../utils/normalize');
Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/finders/joins.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Module Dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var utils = require('../../utils/helpers');
var hop = utils.object.hasOwnProperty;

Expand Down
2 changes: 1 addition & 1 deletion lib/waterline/query/finders/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Module Dependencies
*/

var _ = require('lodash');
var _ = require('@sailshq/lodash');
var async = require('async');
var utils = require('../../utils/helpers');
var normalize = require('../../utils/normalize');
Expand Down
Loading

0 comments on commit d404117

Please sign in to comment.