mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Remove IGNORE_ASYNC_PLUGIN flag from @meteorjs/babel npm-package and bump the version.
This commit is contained in:
@@ -186,11 +186,8 @@ function getDefaultsForNode8(features) {
|
||||
require("@babel/plugin-syntax-object-rest-spread"),
|
||||
require("@babel/plugin-proposal-object-rest-spread")
|
||||
);
|
||||
// TODO [fibers]: instead of removing the code below, consider this comment:
|
||||
// https://github.com/meteor/meteor/pull/12471/files#r1089610144
|
||||
const ignoreAsyncPlugin = process.env.IGNORE_ASYNC_PLUGIN === '1';
|
||||
|
||||
if (!features.useNativeAsyncAwait && !ignoreAsyncPlugin) {
|
||||
if (features.useNativeAsyncAwait === false) {
|
||||
combined.plugins.push([
|
||||
require('./plugins/async-await.js'),
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@meteorjs/babel",
|
||||
"author": "Meteor <dev@meteor.com>",
|
||||
"version": "7.19.0-beta.2",
|
||||
"version": "7.19.0-beta.3",
|
||||
"license": "MIT",
|
||||
"description": "Babel wrapper package for use with Meteor",
|
||||
"keywords": [
|
||||
|
||||
@@ -8,6 +8,10 @@ module.exports = function (babel) {
|
||||
visitor: {
|
||||
Function: {
|
||||
exit: function (path) {
|
||||
if (this.opts.useNativeAsyncAwait !== false) {
|
||||
return;
|
||||
}
|
||||
|
||||
const node = path.node;
|
||||
if (!node.async) {
|
||||
return;
|
||||
@@ -53,7 +57,7 @@ module.exports = function (babel) {
|
||||
},
|
||||
|
||||
AwaitExpression: function (path) {
|
||||
if (this.opts.useNativeAsyncAwait) {
|
||||
if (this.opts.useNativeAsyncAwait !== false) {
|
||||
// No need to transform await expressions if we have native
|
||||
// support for them.
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user