Skip to content

Commit

Permalink
Remove babel-plugin-lodash (#2634)
Browse files Browse the repository at this point in the history
While in theory, this may reduce the bundle size,
in practice it adds a ton of overhead during startup
due to the number of additional requires. Bundle
size also shouldn't matter for server side modules.
  • Loading branch information
tgriesser committed May 29, 2018
1 parent 05e9150 commit 5f8584c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .babelconfig.js
Expand Up @@ -8,8 +8,7 @@ var presets = [
module.exports = {
"presets": presets,
"plugins": [
"lodash",
"transform-runtime",
"add-module-exports"
]
};
};
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -17,7 +17,7 @@ matrix:
env: DB="maria mysql mysql2 postgres sqlite3" CXX=g++-4.8 KNEX_TEST_TIMEOUT=60000

before_install:
- if [ ! -z $TEST_ORACLEDB ]; then wget https://raw.githubusercontent.com/Vincit/travis-oracledb-xe/master/accept_the_license_agreement_for_oracledb_xe_11g_and_install.sh; fi
- if [ ! -z $TEST_ORACLEDB ]; then wget -q https://raw.githubusercontent.com/Vincit/travis-oracledb-xe/master/accept_the_license_agreement_for_oracledb_xe_11g_and_install.sh; fi

This comment has been minimized.

Copy link
@kibertoad

kibertoad May 29, 2018

Collaborator

any particular reason for adding the -q ?

- if [ ! -z $TEST_ORACLEDB ]; then bash ./accept_the_license_agreement_for_oracledb_xe_11g_and_install.sh; fi
- if [ ! -z $TEST_ORACLEDB ]; then npm install oracledb; fi

Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -32,7 +32,6 @@
"babel-cli": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-lodash": "3.3.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
"chai": "^4.1.2",
Expand Down
3 changes: 1 addition & 2 deletions src/client.js
Expand Up @@ -33,6 +33,7 @@ const debugBindings = require('debug')('knex:bindings')
// for a dialect specific client object.
function Client(config = {}) {
this.config = config
this.logger = new Logger(config);

//Client is a required field, so throw error if it's not supplied.
//If 'this.dialect' is set, then this is a 'super()' call, in which case
Expand All @@ -52,8 +53,6 @@ function Client(config = {}) {
if (config.useNullAsDefault) {
this.valueForUndefined = null
}

this.logger = new Logger(config);
}
inherits(Client, EventEmitter)

Expand Down

0 comments on commit 5f8584c

Please sign in to comment.