mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Ensure only one Promise constructor is ever used by tools code.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
// Note that this file is required before we install our Babel hooks in
|
||||
// ../tool-env/install-babel.js, so we can't use ES2015+ syntax here.
|
||||
|
||||
var Promise = global.Promise || require("promise/lib/es6-extensions");
|
||||
|
||||
var win32Extensions = {
|
||||
node: ".exe",
|
||||
npm: ".cmd"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var rootDir = path.resolve(__dirname, "..", "..");
|
||||
var Promise = global.Promise || require("promise/lib/es6-extensions");
|
||||
var defaultDevBundlePromise =
|
||||
Promise.resolve(path.join(rootDir, "dev_bundle"));
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
// Install a global ES2015-compliant Promise constructor that knows how to
|
||||
// run all its callbacks in Fibers.
|
||||
var Promise = global.Promise = global.Promise ||
|
||||
require("promise/lib/es6-extensions");
|
||||
require("meteor-promise").makeCompatible(Promise, require("fibers"));
|
||||
|
||||
require("./cli/dev-bundle-bin-commands.js").then(function (child) {
|
||||
if (! child) {
|
||||
// Use process.nextTick here to prevent the Promise from swallowing
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
// Symbol, Map, and Set, patching the native implementations if available.
|
||||
require("meteor-ecmascript-runtime");
|
||||
|
||||
// Install a global ES2015-compliant Promise constructor that knows how to
|
||||
// run all its callbacks in Fibers.
|
||||
var Promise = global.Promise = global.Promise ||
|
||||
require("promise/lib/es6-extensions");
|
||||
require("meteor-promise").makeCompatible(Promise, require("fibers"));
|
||||
|
||||
// Verify that the babel-runtime package is available to be required.
|
||||
// The .join("/") prevents babel-plugin-transform-runtime from
|
||||
// "intelligently" converting this to an import statement.
|
||||
|
||||
Reference in New Issue
Block a user