Skip to content

Commit 5f8584c

Browse files
authored
Remove babel-plugin-lodash (knex#2634)
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.
1 parent 05e9150 commit 5f8584c

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

.babelconfig.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ var presets = [
88
module.exports = {
99
"presets": presets,
1010
"plugins": [
11-
"lodash",
1211
"transform-runtime",
1312
"add-module-exports"
1413
]
15-
};
14+
};

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ matrix:
1717
env: DB="maria mysql mysql2 postgres sqlite3" CXX=g++-4.8 KNEX_TEST_TIMEOUT=60000
1818

1919
before_install:
20-
- 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
20+
- 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
2121
- if [ ! -z $TEST_ORACLEDB ]; then bash ./accept_the_license_agreement_for_oracledb_xe_11g_and_install.sh; fi
2222
- if [ ! -z $TEST_ORACLEDB ]; then npm install oracledb; fi
2323

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"babel-cli": "^6.26.0",
3333
"babel-eslint": "^8.2.2",
3434
"babel-plugin-add-module-exports": "^0.2.1",
35-
"babel-plugin-lodash": "3.3.2",
3635
"babel-plugin-transform-runtime": "^6.23.0",
3736
"babel-preset-env": "^1.6.1",
3837
"chai": "^4.1.2",

src/client.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const debugBindings = require('debug')('knex:bindings')
3333
// for a dialect specific client object.
3434
function Client(config = {}) {
3535
this.config = config
36+
this.logger = new Logger(config);
3637

3738
//Client is a required field, so throw error if it's not supplied.
3839
//If 'this.dialect' is set, then this is a 'super()' call, in which case
@@ -52,8 +53,6 @@ function Client(config = {}) {
5253
if (config.useNullAsDefault) {
5354
this.valueForUndefined = null
5455
}
55-
56-
this.logger = new Logger(config);
5756
}
5857
inherits(Client, EventEmitter)
5958

0 commit comments

Comments
 (0)