@meteorjs/babel 7.16.0-beta.6 → 7.17.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/options.js +5 -7
  2. package/package.json +1 -1
  3. package/runtime.js +11 -13
package/options.js CHANGED
@@ -185,13 +185,11 @@ function getDefaultsForNode8(features) {
185
185
 
186
186
  // Ensure that async functions run in a Fiber, while also taking
187
187
  // full advantage of native async/await support in Node 8.
188
- if (!process.env.DISABLE_FIBERS) {
189
- combined.plugins.push([require("./plugins/async-await.js"), {
190
- // Do not transform `await x` to `Promise.await(x)`, since Node
191
- // 8 has native support for await expressions.
192
- useNativeAsyncAwait: false
193
- }]);
194
- }
188
+ combined.plugins.push([require("./plugins/async-await.js"), {
189
+ // Do not transform `await x` to `Promise.await(x)`, since Node
190
+ // 8 has native support for await expressions.
191
+ useNativeAsyncAwait: false
192
+ }]);
195
193
 
196
194
  // Enable async generator functions proposal.
197
195
  combined.plugins.push(require("@babel/plugin-proposal-async-generator-functions"));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meteorjs/babel",
3
3
  "author": "Meteor <dev@meteor.com>",
4
- "version": "7.16.0-beta.6",
4
+ "version": "7.17.0-beta.1",
5
5
  "license": "MIT",
6
6
  "description": "Babel wrapper package for use with Meteor",
7
7
  "keywords": [
package/runtime.js CHANGED
@@ -11,21 +11,19 @@ Module.prototype.resolve = function (id) {
11
11
 
12
12
  require("@meteorjs/reify/lib/runtime").enable(Module.prototype);
13
13
 
14
- if (!process.env.DISABLE_FIBERS) {
15
- require("meteor-promise").makeCompatible(
16
- global.Promise = global.Promise ||
17
- require("promise/lib/es6-extensions"),
18
- require("fibers")
19
- );
14
+ require("meteor-promise").makeCompatible(
15
+ global.PromiseFiber = global.PromiseFiber ||
16
+ require("promise/lib/es6-extensions"),
17
+ require("fibers")
18
+ );
20
19
 
21
20
  // If Promise.asyncApply is defined, use it to wrap calls to
22
21
  // regeneratorRuntime.async so that the entire async function will run in
23
22
  // its own Fiber, not just the code that comes after the first await.
24
- if (typeof Promise.asyncApply === "function") {
25
- var regeneratorRuntime = require("@babel/runtime/regenerator");
26
- var realAsync = regeneratorRuntime.async;
27
- regeneratorRuntime.async = function (innerFn) {
28
- return Promise.asyncApply(realAsync, regeneratorRuntime, arguments);
29
- };
30
- }
23
+ if (typeof PromiseFiber.asyncApply === "function") {
24
+ var regeneratorRuntime = require("@babel/runtime/regenerator");
25
+ var realAsync = regeneratorRuntime.async;
26
+ regeneratorRuntime.async = function (innerFn) {
27
+ return PromiseFiber.asyncApply(realAsync, regeneratorRuntime, arguments);
28
+ };
31
29
  }