不要怂,就是干,撸起袖子干!

Commit e46c0007 by overlookmotel Committed by Jan Aagaard Meier

Use independent copy of bluebird (closes #5974) (#6135)

1 parent 66ba1666
......@@ -11,10 +11,12 @@
- [ADDED] `DEBUG` support [#2852](https://github.com/sequelize/sequelize/issues/2852)
- [ADDED] Intensive connection logging [#851](https://github.com/sequelize/sequelize/issues/851)
- [FIXED] Only `belongsTo` uses `as` to construct foreign key - revert of [#5957](https://github.com/sequelize/sequelize/pull/5957) introduced in 4.0.0-0
- [CHANGED] `Sequelize.Promise` is now an independent copy of `bluebird` library [#5974](https://github.com/sequelize/sequelize/issues/5974)
## BC breaks:
- Range type bounds now default to [postgres default](https://www.postgresql.org/docs/9.5/static/rangetypes.html#RANGETYPES-CONSTRUCT) `[)` (inclusive, exclusive), previously was `()` (exclusive, exclusive)
- Only `belongsTo` uses `as` to construct foreign key - revert of [#5957](https://github.com/sequelize/sequelize/pull/5957) introduced in 4.0.0-0
- Sequelize uses an independent copy of `bluebird` library. This means (1) promises returned from Sequelize methods are instances of `Sequelize.Promise` but not global `Bluebird` and (2) the CLS patch does not affect global `Bluebird`.
# 4.0.0-0
- [FIXED] Pass ResourceLock instead of raw connection in MSSQL disconnect handling
......
'use strict';
const Promise = require('bluebird');
const Promise = require('bluebird').getNewLibraryCopy();
const shimmer = require('shimmer');
// functionName: The Promise function that should be shimmed
......
......@@ -36,7 +36,7 @@
"url": "https://github.com/sequelize/sequelize/issues"
},
"dependencies": {
"bluebird": "^3.4.0",
"bluebird": "^3.4.1",
"debug": "^2.2.0",
"depd": "^1.1.0",
"dottie": "^1.0.0",
......
'use strict';
/* jshint -W030 */
var chai = require('chai')
, expect = chai.expect
, Support = require(__dirname + '/support')
, Sequelize = Support.Sequelize
, Promise = Sequelize.Promise
, Bluebird = require('bluebird');
describe('Promise', function() {
it('should be an independent copy of bluebird library', function() {
expect(Promise.prototype.then).to.be.a('function');
expect(Promise).to.not.equal(Bluebird);
expect(Promise.prototype).to.not.equal(Bluebird.prototype);
});
});
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!