@meteorjs/babel 7.16.0-beta.5 → 7.16.0-beta.6
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 +7 -5
- package/package.json +3 -3
- package/runtime.js +13 -11
package/options.js
CHANGED
|
@@ -185,11 +185,13 @@ 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
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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
|
+
}
|
|
193
195
|
|
|
194
196
|
// Enable async generator functions proposal.
|
|
195
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.16.0-beta.
|
|
4
|
+
"version": "7.16.0-beta.6",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Babel wrapper package for use with Meteor",
|
|
7
7
|
"keywords": [
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@babel/template": "^7.16.7",
|
|
42
42
|
"@babel/traverse": "^7.17.0",
|
|
43
43
|
"@babel/types": "^7.17.0",
|
|
44
|
-
"@meteorjs/reify": "0.
|
|
45
|
-
"babel-preset-meteor": "^7.10.
|
|
44
|
+
"@meteorjs/reify": "0.23.0",
|
|
45
|
+
"babel-preset-meteor": "^7.10.0",
|
|
46
46
|
"babel-preset-minify": "^0.5.1",
|
|
47
47
|
"convert-source-map": "^1.6.0",
|
|
48
48
|
"lodash": "^4.17.21",
|
package/runtime.js
CHANGED
|
@@ -11,19 +11,21 @@ Module.prototype.resolve = function (id) {
|
|
|
11
11
|
|
|
12
12
|
require("@meteorjs/reify/lib/runtime").enable(Module.prototype);
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
)
|
|
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
|
+
);
|
|
19
20
|
|
|
20
21
|
// If Promise.asyncApply is defined, use it to wrap calls to
|
|
21
22
|
// regeneratorRuntime.async so that the entire async function will run in
|
|
22
23
|
// its own Fiber, not just the code that comes after the first await.
|
|
23
|
-
if (typeof Promise.asyncApply === "function") {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
+
}
|
|
29
31
|
}
|