Skip to content

Commit

Permalink
Merge f7a0c95 into 8e23dcb
Browse files Browse the repository at this point in the history
  • Loading branch information
kibertoad committed Dec 15, 2018
2 parents 8e23dcb + f7a0c95 commit d53a1f7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
@@ -1,10 +1,14 @@
# Master (Unreleased)

### Bug fixes:

- @babel/polyfill loaded multiple times #2955

# 0.16.2 - 10 Dec, 2018

### Bug fixes:

- Add TypeScript types to the "files" entry so they are properly included in the release.
- Add TypeScript types to the "files" entry so they are properly included in the release #2943

# 0.16.1 - 28 Nov, 2018

Expand Down
18 changes: 12 additions & 6 deletions knex.js
Expand Up @@ -5,14 +5,20 @@
// For details and documentation:
// http://knexjs.org

const oldPromise = global.Promise;

// Should be safe to remove after support for Node.js 6 is dropped
require('@babel/polyfill');
if (
process.versions &&
process.versions.node &&
process.versions.node.startsWith('6.')
) {
const oldPromise = global.Promise;

require('@babel/polyfill');

// Preserve any Promise overrides set globally prior to importing knex
if (oldPromise) {
global.Promise = oldPromise;
// Preserve any Promise overrides set globally prior to importing knex
if (oldPromise) {
global.Promise = oldPromise;
}
}

module.exports = require('./lib/index');
8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@babel/polyfill": "^7.0.0",
"@types/bluebird": "^3.5.3",
"@types/bluebird": "^3.5.25",
"bluebird": "^3.5.3",
"chalk": "2.4.1",
"commander": "^2.19.0",
Expand All @@ -34,7 +34,7 @@
},
"devDependencies": {
"@babel/cli": "^7.2.0",
"@babel/core": "^7.2.0",
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.0",
"@types/node": "*",
"JSONStream": "^1.3.5",
Expand All @@ -48,7 +48,7 @@
"eslint": "5.10.0",
"eslint-config-prettier": "^3.3.0",
"eslint-plugin-import": "^2.14.0",
"husky": "^1.2.0",
"husky": "^1.2.1",
"jake": "^8.0.19",
"json-loader": "^0.5.7",
"lint-staged": "^8.1.0",
Expand All @@ -62,7 +62,7 @@
"pg-query-stream": "^1.1.2",
"prettier": "^1.15.3",
"rimraf": "^2.6.2",
"sinon": "^7.1.1",
"sinon": "^7.2.2",
"sinon-chai": "^3.3.0",
"source-map-support": "^0.5.9",
"sqlite3": "^4.0.4",
Expand Down

0 comments on commit d53a1f7

Please sign in to comment.