diff --git a/docs/_config.yml b/docs/_config.yml index 7a70499147..1bd31f0460 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,6 +1,7 @@ title: Meteor API Docs subtitle: API Docs versions: + - '2.9' - '2.8' - '2.7' - '2.6' diff --git a/docs/history.md b/docs/history.md index cf797a4e59..2c41408d65 100644 --- a/docs/history.md +++ b/docs/history.md @@ -31,8 +31,18 @@ by [henriquealbert](https://github.com/henriquealbert). #### Breaking Changes + N/A -* Most of OAuth related code has been moved from `accounts-base` to `accounts-oauth`. +#### Internal API changes +* Internal methods from `OAuth` that are now async: + - _attemptLogin + - _loginMethod + - _runLoginHandlers + - OAuth.registerService now accepts async functions + +OAuth related code has been moved from `accounts-base` to `accounts-oauth`, removing the dependency on `service-configuration` +more can be seen in this [discussion](https://github.com/meteor/meteor/discussions/12171) and in the [PR](https://github.com/meteor/meteor/pull/12202). +This means that if you don’t use third-party login on your project, you don’t need to add the package service-configuration anymore. #### Migration Steps diff --git a/meteor b/meteor index be2307e734..b99b7aedde 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=14.21.1.4 +BUNDLE_VERSION=14.21.1.7 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. diff --git a/npm-packages/meteor-babel/options.js b/npm-packages/meteor-babel/options.js index 93bb21b905..4454148783 100644 --- a/npm-packages/meteor-babel/options.js +++ b/npm-packages/meteor-babel/options.js @@ -185,14 +185,16 @@ function getDefaultsForNode8(features) { // Ensure that async functions run in a Fiber, while also taking // full advantage of native async/await support in Node 8. + const isFiberDisabled = process.env.DISABLE_FIBERS === '1'; + const ignoreAsyncPlugin = process.env.IGNORE_ASYNC_PLUGIN === '1'; - combined.plugins.push([require("./plugins/async-await.js"), { - // Do not transform `await x` to `Promise.await(x)`, since Node - // 8 has native support for await expressions. - useNativeAsyncAwait: !process.env.DISABLE_FIBERS, - isFiberDisabled: process.env.DISABLE_FIBERS, - }]); - + if (!ignoreAsyncPlugin) { + combined.plugins.push([require("./plugins/async-await.js"), { + // Do not transform `await x` to `Promise.await(x)`, since Node + // 8 has native support for await expressions. + useNativeAsyncAwait: isFiberDisabled, + }]); + } // Enable async generator functions proposal. combined.plugins.push(require("@babel/plugin-proposal-async-generator-functions")); } diff --git a/npm-packages/meteor-babel/package.json b/npm-packages/meteor-babel/package.json index f3b5642e8a..56a18465f3 100644 --- a/npm-packages/meteor-babel/package.json +++ b/npm-packages/meteor-babel/package.json @@ -1,7 +1,7 @@ { "name": "@meteorjs/babel", "author": "Meteor ", - "version": "7.18.0-beta.1", + "version": "7.18.0-beta.4", "license": "MIT", "description": "Babel wrapper package for use with Meteor", "keywords": [ diff --git a/npm-packages/meteor-babel/plugins/async-await.js b/npm-packages/meteor-babel/plugins/async-await.js index 2d1de3e9e1..9110ae383a 100644 --- a/npm-packages/meteor-babel/plugins/async-await.js +++ b/npm-packages/meteor-babel/plugins/async-await.js @@ -9,7 +9,7 @@ module.exports = function (babel) { Function: { exit: function (path) { const node = path.node; - if (!node.async || !this.opts.isFiberDisabled) { + if (!node.async) { return; } diff --git a/packages/ddp-server/livedata_server_async_tests.js b/packages/ddp-server/livedata_server_async_tests.js index c2ca9fcdee..e326a59a0a 100644 --- a/packages/ddp-server/livedata_server_async_tests.js +++ b/packages/ddp-server/livedata_server_async_tests.js @@ -166,8 +166,8 @@ Tinytest.addAsync('livedata server - async publish cursor', function( const remoteCollection = new Mongo.Collection('names', { connection: clientConn, }); - clientConn.subscribe('asyncPublishCursor', () => { - const actual = remoteCollection.find().fetch(); + clientConn.subscribe('asyncPublishCursor', async () => { + const actual = await remoteCollection.find().fetch(); test.equal(actual[0].name, 'async'); onComplete(); }); diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 9fb98228b9..13c5ba5771 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -15,7 +15,7 @@ var packageJson = { "node-gyp": "8.0.0", "node-pre-gyp": "0.15.0", typescript: "4.5.4", - "@meteorjs/babel": "7.18.0-beta.1", + "@meteorjs/babel": "7.18.0-beta.4", // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.9.0",