@meteorjs/babel 7.17.1-beta.0 → 7.18.0-beta.0

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.
package/options.js CHANGED
@@ -80,11 +80,7 @@ exports.getDefaults = function getDefaults(features) {
80
80
 
81
81
  function maybeAddReactPlugins(features, options) {
82
82
  if (features && features.react) {
83
- options.presets.push(
84
- [require("@babel/preset-react"), {
85
- runtime: "automatic"
86
- }]
87
- );
83
+ options.presets.push(require("@babel/preset-react"));
88
84
  options.plugins.push(
89
85
  [require("@babel/plugin-proposal-class-properties"), {
90
86
  loose: true
@@ -189,13 +185,13 @@ function getDefaultsForNode8(features) {
189
185
 
190
186
  // Ensure that async functions run in a Fiber, while also taking
191
187
  // full advantage of native async/await support in Node 8.
192
- if (!process.env.DISABLE_FIBERS) {
193
- combined.plugins.push([require("./plugins/async-await.js"), {
194
- // Do not transform `await x` to `Promise.await(x)`, since Node
195
- // 8 has native support for await expressions.
196
- useNativeAsyncAwait: false
197
- }]);
198
- }
188
+
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: !process.env.DISABLE_FIBERS,
193
+ isFiberDisabled: process.env.DISABLE_FIBERS,
194
+ }]);
199
195
 
200
196
  // Enable async generator functions proposal.
201
197
  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.17.1-beta.0",
4
+ "version": "7.18.0-beta.0",
5
5
  "license": "MIT",
6
6
  "description": "Babel wrapper package for use with Meteor",
7
7
  "keywords": [
@@ -9,7 +9,7 @@ module.exports = function (babel) {
9
9
  Function: {
10
10
  exit: function (path) {
11
11
  const node = path.node;
12
- if (! node.async) {
12
+ if (!node.async || this.opts.isFiberDisabled) {
13
13
  return;
14
14
  }
15
15
 
package/runtime.js CHANGED
@@ -29,3 +29,4 @@ if (!process.env.DISABLE_FIBERS) {
29
29
  };
30
30
  }
31
31
  }
32
+