@meteorjs/babel 7.19.0-beta.2 → 7.19.0-beta.3
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 +1 -4
- package/package.json +2 -2
- package/plugins/async-await.js +5 -1
package/options.js
CHANGED
|
@@ -186,11 +186,8 @@ function getDefaultsForNode8(features) {
|
|
|
186
186
|
require("@babel/plugin-syntax-object-rest-spread"),
|
|
187
187
|
require("@babel/plugin-proposal-object-rest-spread")
|
|
188
188
|
);
|
|
189
|
-
// TODO [fibers]: instead of removing the code below, consider this comment:
|
|
190
|
-
// https://github.com/meteor/meteor/pull/12471/files#r1089610144
|
|
191
|
-
const ignoreAsyncPlugin = process.env.IGNORE_ASYNC_PLUGIN === '1';
|
|
192
189
|
|
|
193
|
-
if (
|
|
190
|
+
if (features.useNativeAsyncAwait === false) {
|
|
194
191
|
combined.plugins.push([
|
|
195
192
|
require('./plugins/async-await.js'),
|
|
196
193
|
{
|
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.19.0-beta.
|
|
4
|
+
"version": "7.19.0-beta.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Babel wrapper package for use with Meteor",
|
|
7
7
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@babel/template": "^7.16.7",
|
|
42
42
|
"@babel/traverse": "^7.17.0",
|
|
43
43
|
"@babel/types": "^7.17.0",
|
|
44
|
-
"@meteorjs/reify": "https://github.com/meteor/reify/tarball/
|
|
44
|
+
"@meteorjs/reify": "https://github.com/meteor/reify/tarball/cf61c57c6c4fefcbf164bf63d3c12fda1924b3d2",
|
|
45
45
|
"babel-preset-meteor": "^7.10.0",
|
|
46
46
|
"babel-preset-minify": "^0.5.1",
|
|
47
47
|
"convert-source-map": "^1.6.0",
|
package/plugins/async-await.js
CHANGED
|
@@ -8,6 +8,10 @@ module.exports = function (babel) {
|
|
|
8
8
|
visitor: {
|
|
9
9
|
Function: {
|
|
10
10
|
exit: function (path) {
|
|
11
|
+
if (this.opts.useNativeAsyncAwait !== false) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
const node = path.node;
|
|
12
16
|
if (!node.async) {
|
|
13
17
|
return;
|
|
@@ -53,7 +57,7 @@ module.exports = function (babel) {
|
|
|
53
57
|
},
|
|
54
58
|
|
|
55
59
|
AwaitExpression: function (path) {
|
|
56
|
-
if (this.opts.useNativeAsyncAwait) {
|
|
60
|
+
if (this.opts.useNativeAsyncAwait !== false) {
|
|
57
61
|
// No need to transform await expressions if we have native
|
|
58
62
|
// support for them.
|
|
59
63
|
return;
|