diff --git a/.circleci/config.yml b/.circleci/config.yml
index edea04ebbf..8daa41611a 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -178,7 +178,7 @@ jobs:
command: |
eval $PRE_TEST_COMMANDS;
cd dev_bundle/lib
- ../../meteor npm install @types/node@20.9.0 --save-dev
+ ../../meteor npm install @types/node@20.10.5 --save-dev
# Ensure that meteor/tools has no TypeScript errors.
../../meteor npm install -g typescript
cd ../../
diff --git a/.github/workflows/check-code-style.yml b/.github/workflows/check-code-style.yml
index 0a136db59a..5b7dbbac4c 100644
--- a/.github/workflows/check-code-style.yml
+++ b/.github/workflows/check-code-style.yml
@@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v4
with:
- node-version: 14.x
+ node-version: 20.x
- run: npm ci
- name: Run ESLint@8
run: npx eslint@8 "./npm-packages/meteor-installer/**/*.js"
diff --git a/.github/workflows/check-syntax.yml b/.github/workflows/check-syntax.yml
index 91051b2789..1f9f151c94 100644
--- a/.github/workflows/check-syntax.yml
+++ b/.github/workflows/check-syntax.yml
@@ -7,9 +7,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v4
with:
- node-version: 18.x
+ node-version: 20.x
- run: cd scripts/admin/check-legacy-syntax && npm ci
- name: Check syntax
- run: cd scripts/admin/check-legacy-syntax && node check-syntax.js
+ run: cd scripts/admin/check-legacy-syntax && node check-syntax.js
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 3c7f7d5ec9..0b03766fce 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -11,7 +11,7 @@ jobs:
working-directory: docs/
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v4
with:
node-version: 12.x
- name: Build the Docs
diff --git a/.github/workflows/guide.yml b/.github/workflows/guide.yml
index bbc5bbd023..4cb09a3b97 100644
--- a/.github/workflows/guide.yml
+++ b/.github/workflows/guide.yml
@@ -11,7 +11,7 @@ jobs:
working-directory: guide/
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v4
with:
node-version: 12.x
- name: Build the Guide
diff --git a/.github/workflows/npm-eslint-plugin-meteor.yml b/.github/workflows/npm-eslint-plugin-meteor.yml
index 4361b5a788..f94c4786d9 100644
--- a/.github/workflows/npm-eslint-plugin-meteor.yml
+++ b/.github/workflows/npm-eslint-plugin-meteor.yml
@@ -18,11 +18,11 @@ jobs:
working-directory: npm-packages/eslint-plugin-meteor
strategy:
matrix:
- node-version: [16.x, 18.x]
+ node-version: 20.x
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
diff --git a/.github/workflows/npm-meteor-babel.yml b/.github/workflows/npm-meteor-babel.yml
index f9dc6f3a5f..b1b9220002 100644
--- a/.github/workflows/npm-meteor-babel.yml
+++ b/.github/workflows/npm-meteor-babel.yml
@@ -18,11 +18,11 @@ jobs:
working-directory: npm-packages/meteor-babel
strategy:
matrix:
- node-version: [16.x, 18.x]
+ node-version: 20.x
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
diff --git a/.github/workflows/npm-meteor-promise.yml b/.github/workflows/npm-meteor-promise.yml
index 4ad4f6df7c..fe25249075 100644
--- a/.github/workflows/npm-meteor-promise.yml
+++ b/.github/workflows/npm-meteor-promise.yml
@@ -18,11 +18,11 @@ jobs:
working-directory: npm-packages/meteor-promise
strategy:
matrix:
- node-version: [12.x, 14.x]
+ node-version: [14.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
diff --git a/.travis.yml b/.travis.yml
index 860714f517..339caa097b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,7 +4,7 @@ dist: jammy
sudo: required
services: xvfb
node_js:
- - "18.16.0"
+ - "20.10.0"
cache:
directories:
- ".meteor"
diff --git a/docs/generators/changelog/versions/3.0.md b/docs/generators/changelog/versions/3.0.md
index 0fdd7b8ad6..bf6e90d74a 100644
--- a/docs/generators/changelog/versions/3.0.md
+++ b/docs/generators/changelog/versions/3.0.md
@@ -389,6 +389,7 @@
if the cursor is ready and if the callbacks are have been called.
If you only use it in the `Client` or as a `LocalCollection` things have not
changed.
+ - `cursor.observeChangesAsync` and `cursor.observeAsync` are added and resolve as promises, returning results similar to their synchronous counterparts.
- `mobile-experience@2.0.0`:
@@ -431,6 +432,7 @@
- Updated to unify methods, `update`,`insert`,`remove`, `fetch` are now async, they are
the same as their `*Async` counterpart.
- `ensureIndex` and `createIndex` are now async.
+ - `observeChangesAsync` and `observeAsync` are added and resolve as promises, returning results similar to their synchronous counterparts.
- `npm-mongo@5.0.0`:
diff --git a/docs/source/api/assets.md b/docs/source/api/assets.md
index e748b5b49d..af4cd86124 100644
--- a/docs/source/api/assets.md
+++ b/docs/source/api/assets.md
@@ -10,8 +10,8 @@ assets, which are located in the `private` subdirectory of an application's
tree. Assets are not processed as source files and are copied directly
into your application's bundle.
-{% apibox "Assets.getText" %}
-{% apibox "Assets.getBinary" %}
+{% apibox "Assets.getTextAsync" %}
+{% apibox "Assets.getBinaryAsync" %}
{% apibox "Assets.absoluteFilePath" %}
Static server assets are included by placing them in the application's `private`
@@ -20,7 +20,7 @@ directory called `nested` with a file called `data.txt` inside it, then server
code can read `data.txt` by running:
```js
-const data = Assets.getText('nested/data.txt');
+const data = await Assets.getTextAsync('nested/data.txt');
```
Note: Packages can only access their own assets. If you need to read the assets of a different package, or of the enclosing app, you need to get a reference to that package's `Assets` object.
diff --git a/docs/source/api/packagejs.md b/docs/source/api/packagejs.md
index 7cc521073f..9feb02877f 100644
--- a/docs/source/api/packagejs.md
+++ b/docs/source/api/packagejs.md
@@ -80,7 +80,7 @@ package) so that Meteor will pick up the local dependency.
> In a lifecycle of a package there might come time to end the development for various reasons, or
it gets superseded. In either case Meteor allows you to easily notify the users of the package by
setting the deprecated flag to true: `deprecated: true` in the package description. In addition, you
-replace it with a string that tells the users where to find replacement or what to do.
+replace it with a string that tells the users where to find replacement or what to do.
Provide basic package information with `Package.describe(options)`. To publish a
package, you must define `summary` and `version`.
@@ -97,7 +97,7 @@ package is exported to.
{% apibox "PackageAPI#versionsFrom" %}
> Choose Meteor versions carefully. First determine the minimum version of Meteor you need for the API you use in your package.
- This should be based on specific needs of your package like needed the *Async calls, which would require minimum version to be
+ This should be based on specific needs of your package like needed the *Async calls, which would require minimum version to be
at least 2.8. Another example are where packages had a major version bump, for example this has happened with the accounts packages
in Meteor 2.3. If you want to be backward and forward compatible it is good to include Meteor version before 2.3 and then 2.3.6 in the array.
A general recommendation for most compatibility for accounts packages (unless you need API that was affected in Meteor 2.3) is to have the following
@@ -315,7 +315,7 @@ methods are available:
- `addAsset` - Add a file to serve as-is to the browser or to include on the
browser, depending on the target. On the web, it will be served at the exact
path requested. For server targets, it can be retrieved using
- `Assets.getText` or `Assets.getBinary`.
+ `Assets.getTextAsync` or `Assets.getBinaryAsync`.
- `addHtml` - Works in web targets only. Add markup to the `head` or `body`
section of the document.
- `hmrAvailable` - Returns true if the file can be updated with HMR. Among other things,
diff --git a/docs/source/api/passwords.md b/docs/source/api/passwords.md
index 0a643930d7..107b38d45a 100644
--- a/docs/source/api/passwords.md
+++ b/docs/source/api/passwords.md
@@ -37,7 +37,7 @@ id.
On the client, you must pass `password` and at least one of `username` or `email` — enough information for the user to be able to log in again later. If there are existing users with a username or email only differing in case, `createUser` will fail. The callback's `error.reason` will be `'Username already exists.'` or `'Email already exists.'` In the latter case, the user can then either [login](accounts.html#Meteor-loginWithPassword) or [reset their password](#Accounts-resetPassword).
-On the server, you do not need to specify `password`, but the user will not be able to log in until it has a password (eg, set with [`Accounts.setPassword`](#accounts_setpassword)). To create an account without a password on the server and still let the user pick their own password, call `createUser` with the `email` option and then call [`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail). This will send the user an email with a link to set their initial password.
+On the server, you do not need to specify `password`, but the user will not be able to log in until it has a password (eg, set with [`Accounts.setPasswordAsync`](#accounts_setpasswordasync)). To create an account without a password on the server and still let the user pick their own password, call `createUser` with the `email` option and then call [`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail). This will send the user an email with a link to set their initial password.
By default the `profile` option is added directly to the new user document. To
override this behavior, use [`Accounts.onCreateUser`](#accounts_oncreateuser).
@@ -100,7 +100,7 @@ This function accepts tokens passed into the callbacks registered with
If the user trying to reset the password has 2FA enabled, this error will be thrown:
* "Changed password, but user not logged in because 2FA is enabled [2fa-enabled]": No longer signing in the user automatically if the user has 2FA enabled.
-{% apibox "Accounts.setPassword" %}
+{% apibox "Accounts.setPasswordAsync" %}
{% apibox "Accounts.sendResetPasswordEmail" %}
diff --git a/guide/source/3.0-migration.md b/guide/source/3.0-migration.md
index 7591356327..946dfcec26 100644
--- a/guide/source/3.0-migration.md
+++ b/guide/source/3.0-migration.md
@@ -3,19 +3,27 @@ title: Migrating to Meteor 3.0
description: How to migrate your application to Meteor 3.0.
---
-> **This guide will be created as we get closer to the Meteor 3.0 beta release.** We are also evaluating new documentation platforms to improve our users' experience.
+> This guide will be created as we approach the Meteor 3.0 release.
+> We're in the process of moving our documentation to Vitepress,
+> and updating the Meteor API docs for version 3.0. For the latest updates,
+> visit https://v3-docs.meteor.com/.
## What's the status of version 3.0?
-**Latest version:** `3.0-beta.0`
-**Node.js version:** `20.9.0 LTS`
+**Latest version:** `3.0-beta.6`
+**Node.js version:** `20.11.1 LTS`
+**NPM version:** `10.2.4`
-Meteor 3.0 is in alpha and not recommended for production. You can check the "[Release 3.0 Pull Request](https://github.com/meteor/meteor/pull/12359)" to see what is being changed.
+Meteor 3.0 is in beta and not recommended for production. You can check the "[Release 3.0 Pull Request](https://github.com/meteor/meteor/pull/12359)" to see what is being changed.
## How to prepare for version 3.0?
You can follow the guide "[How to migrate to Meteor Async in Meteor 2.x](/prepare-meteor-3.0.html)" to help you prepare your application for the new version by starting to use async methods.
+## How to follow the progress on version 3?
+
+The best way to follow the progress is by checking the "[What's left until an official Meteor 3.0?](https://github.com/meteor/meteor/discussions/12865)" discussion. We have also been sharing constant updates on [this topic](https://forums.meteor.com/t/fibers-public-roadmap-and-meteor-3-0/59627/84) in our forum.
+
## Frequently Asked Questions
### What is Fibers?
@@ -112,7 +120,7 @@ findOne is not available on the server. Please use findOneAsync instead.
You can create a new Meteor 3.0 project by running the command below:
```bash
-meteor create my-new-project --release 3.0-beta.0
+meteor create my-new-project --release 3.0-beta.6
```
### How to update from version 2?
@@ -120,13 +128,9 @@ meteor create my-new-project --release 3.0-beta.0
You can update your Meteor 2.x project by running the command below inside your project folder:
```bash
-meteor update --release 3.0-beta.0
+meteor update --release 3.0-beta.6
```
-### How to follow the progress on version 3?
-
-The best way to follow the progress is by checking the "[What's left until an official Meteor 3.0?](https://github.com/meteor/meteor/discussions/12865)" discussion. We have also been sharing constant updates on [this topic](https://forums.meteor.com/t/fibers-public-roadmap-and-meteor-3-0/59627/84) in our forum.
-
### When will Meteor 3.0 be ready?
We plan to release the beta version by the end of Q4 2023. An official version will depend a lot on user feedback, but we aim to release it by the end of Q1 2024.
diff --git a/packages/underscore/package.js b/packages/underscore/package.js
index 4af51fd167..ca8b3d2b1b 100644
--- a/packages/underscore/package.js
+++ b/packages/underscore/package.js
@@ -1,7 +1,7 @@
Package.describe({
summary: "Collection of small helpers: _.map, _.each, ...",
- version: '1.0.14-beta300.6',
+ version: '1.0.14-beta300.6', // next beta should go to 1.6.2-beta.300.7
});
Npm.depends({
diff --git a/packages/underscore/underscore.js b/packages/underscore/underscore.js
index b7788b3a4b..6a9e39fe09 100644
--- a/packages/underscore/underscore.js
+++ b/packages/underscore/underscore.js
@@ -529,7 +529,7 @@
var rest = slice.call(arguments, 1);
return _.filter(_.uniq(array), function(item) {
return _.every(rest, function(other) {
- return _.contains(other, item) >= 0;
+ return _.contains(other, item);
});
});
};