blob: fce522d7c0fbf59a859353e5613929376ac89843 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/**
* @fileoverview Vanadium.js promise implementation.
*
* Currently this is just bluebird promises.
*
* We'd like our promise implementation to follow the es6/A+ promise spec, but
* the "es6-promises" module eats errors, so we are using bluebird.
*
* See for reference:
* http://blog.soareschen.com/the-problem-with-es6-promises
* https://github.com/soareschen/es6-promise-debugging
* https://github.com/petkaantonov/bluebird#error-handling
*
* TODO(nlacasse): Wrap bluebird promises to only expose es6/A+ promise API.
* Otherwise users might rely on non-A+ parts of the bluebird API, preventing us
* from switching in the future.
* @private
*/
var Promise = require('bluebird');
Promise.longStackTraces();
module.exports = Promise;