Skip to content

Commit

Permalink
Remove individual per-method lodash deps (this is already done on v1.…
Browse files Browse the repository at this point in the history
…0, just backportin')
  • Loading branch information
mikermcneil committed Nov 19, 2016
1 parent 223567c commit d37ee13
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
10 changes: 5 additions & 5 deletions lib/hooks/blueprints/actionUtil.js
Expand Up @@ -3,11 +3,11 @@
*/

var util = require('util');
var isString = require('lodash.isstring');
var isArray = require('lodash.isarray');
var isObject = require('lodash.isobject');
var isUndefined = require('lodash.isundefined');
var _ = require('lodash'); // TODO: replace lodash with individual per-method packages
var _ = require('lodash');
var isString = _.isString;
var isArray = _.isArray;
var isObject = _.isObject;
var isUndefined = _.isUndefined;
var mergeDefaults = require('merge-defaults');
var validateWhereClauseStrict = require('./criteria-validator/validate-where-clause-strict');

Expand Down
8 changes: 0 additions & 8 deletions package.json
Expand Up @@ -64,14 +64,6 @@
"i18n": "0.8.1",
"include-all": "^1.0.0",
"lodash": "3.10.1",
"lodash.isarray": "3.0.4",
"lodash.iserror": "3.1.1",
"lodash.isfunction": "3.0.8",
"lodash.isnull": "3.0.0",
"lodash.isobject": "3.0.2",
"lodash.isregexp": "3.0.5",
"lodash.isstring": "3.0.1",
"lodash.isundefined": "3.0.1",
"merge-defaults": "~0.2.1",
"method-override": "2.3.5",
"mock-req": "0.2.0",
Expand Down
13 changes: 5 additions & 8 deletions test/helpers/test-spawning-sails-lift-child-process-in-cwd.js
Expand Up @@ -3,10 +3,7 @@
*/

var path = require('path');
var isString = require('lodash.isstring');
var isUndefined = require('lodash.isundefined');
var isFunction = require('lodash.isfunction');
var isArray = require('lodash.isarray');
var _ = require('lodash');
var request = require('request');
var MProcess = require('machinepack-process');

Expand Down Expand Up @@ -42,10 +39,10 @@ var MProcess = require('machinepack-process');
*/
module.exports = function testSpawningSailsLiftChildProcessInCwd (opts){

if (!isArray(opts.liftCliArgs)){
if (!_.isArray(opts.liftCliArgs)){
throw new Error('Consistency violation: Missing or invalid option (`liftCliArgs` should be an array) in `testSpawningSailsLiftChildProcessInCwd()`. I may just be a test helper, but I\'m serious about assertions!!!');
}
if (!isString(opts.pathToSailsCLI)){
if (!_.isString(opts.pathToSailsCLI)){
throw new Error('Consistency violation: Missing or invalid option (`pathToSailsCLI` should be a string) in `testSpawningSailsLiftChildProcessInCwd()`. I may just be a test helper, but I\'m serious about assertions!!!');
}

Expand Down Expand Up @@ -116,7 +113,7 @@ module.exports = function testSpawningSailsLiftChildProcessInCwd (opts){
// Now if httpRequestInstructions were provided, we ping to the server to see whether this puppy
// is ready to handle all those hot hot HTTP requests we have planned for it.
// (expectations of response vary based on options passed to this helper)
if (!isUndefined(opts.httpRequestInstructions)){
if (!_.isUndefined(opts.httpRequestInstructions)){
// If the `opts.expectFailedLift` flag was provided, we're actually expecting an error here.
if (opts.expectFailedLift) {
it('should FAIL when a `'+opts.httpRequestInstructions.method+'` request is sent to `'+opts.httpRequestInstructions.uri+', because we\'re expecting Sails to have failed when attempting to lift`', function(done) {
Expand Down Expand Up @@ -149,7 +146,7 @@ module.exports = function testSpawningSailsLiftChildProcessInCwd (opts){

// Now run any additional tests.
// (i.e. this function contains `it` blocks)
if (isFunction(opts.fnWithAdditionalTests)) {
if (_.isFunction(opts.fnWithAdditionalTests)) {
opts.fnWithAdditionalTests();
}

Expand Down

1 comment on commit d37ee13

@mikermcneil
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is setup for #3863 (comment)

Please sign in to comment.