Remove IGNORE_ASYNC_PLUGIN flag from @meteorjs/babel npm-package and bump the version.

This commit is contained in:
matheusccastro
2023-05-01 21:21:04 -03:00
parent 16d3a65a24
commit 20058ef16d
3 changed files with 7 additions and 6 deletions

View File

@@ -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'),
{

View File

@@ -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": [

View File

@@ -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;