Skip to content

Commit

Permalink
fix: Replace lodash submodules by entire lodash but using only needed…
Browse files Browse the repository at this point in the history
… functions on require
  • Loading branch information
ivanportillo committed Feb 19, 2024
1 parent 9949164 commit 3396c1e
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 36 deletions.
4 changes: 2 additions & 2 deletions lib/i18n/v2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ var _createClass = function () { function defineProperties(target, props) { for

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var includes = require('lodash.includes');
var keys = require('lodash.keys');
var includes = require('lodash/includes');
var keys = require('lodash/keys');
var dictionaries = require('./dictionaries');

var I18nData = function () {
Expand Down
4 changes: 2 additions & 2 deletions lib/i18n/v3/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ var _createClass = function () { function defineProperties(target, props) { for

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var includes = require('lodash.includes');
var keys = require('lodash.keys');
var includes = require('lodash/includes');
var keys = require('lodash/keys');
var dictionaries = require('./dictionaries');

var I18nData = function () {
Expand Down
2 changes: 1 addition & 1 deletion lib/index-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var pick = require('lodash.pick');
var pick = require('lodash/pick');
var I18nDataV2 = require('./i18n/v2');
var PersonalityProfileV2 = require('./profiles/v2/index');
var TextSummaryImpl = require('./text-summary');
Expand Down
2 changes: 1 addition & 1 deletion lib/index-v3.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var pick = require('lodash.pick');
var pick = require('lodash/pick');
var I18nDataV3 = require('./i18n/v3');
var PersonalityProfileV3 = require('./profiles/v3/index');
var TextSummaryImpl = require('./text-summary');
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var pick = require('lodash.pick');
var pick = require('lodash/pick');
var I18nDataV2 = require('./i18n/v2');
var I18nDataV3 = require('./i18n/v3');
var PersonalityProfileV2 = require('./profiles/v2/index');
Expand Down
22 changes: 3 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
"ibm watson"
],
"dependencies": {
"lodash.includes": "^4.3.0",
"lodash.keys": "^4.2.0",
"lodash.pick": "^4.4.0"
"lodash": "^4.17.21"
},
"devDependencies": {
"babel-preset-es2015": "^6.22.0",
Expand Down
4 changes: 2 additions & 2 deletions src/i18n/v2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

'use strict';

const includes = require('lodash.includes');
const keys = require('lodash.keys');
const includes = require('lodash/includes');
const keys = require('lodash/keys');
const dictionaries = require('./dictionaries');

class I18nData {
Expand Down
4 changes: 2 additions & 2 deletions src/i18n/v3/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

'use strict';

const includes = require('lodash.includes');
const keys = require('lodash.keys');
const includes = require('lodash/includes');
const keys = require('lodash/keys');
const dictionaries = require('./dictionaries');

class I18nData {
Expand Down
2 changes: 1 addition & 1 deletion src/index-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'use strict';

const pick = require('lodash.pick');
const pick = require('lodash/pick');
const I18nDataV2 = require('./i18n/v2');
const PersonalityProfileV2 = require('./profiles/v2/index');
const TextSummaryImpl = require('./text-summary');
Expand Down
2 changes: 1 addition & 1 deletion src/index-v3.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'use strict';

const pick = require('lodash.pick');
const pick = require('lodash/pick');
const I18nDataV3 = require('./i18n/v3');
const PersonalityProfileV3 = require('./profiles/v3/index');
const TextSummaryImpl = require('./text-summary');
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

'use strict';

const pick = require('lodash.pick');
const pick = require('lodash/pick');
const I18nDataV2 = require('./i18n/v2');
const I18nDataV3 = require('./i18n/v3');
const PersonalityProfileV2 = require('./profiles/v2/index');
Expand Down

0 comments on commit 3396c1e

Please sign in to comment.