Merge branch 'release-3.0' into 322-fix-promise-rejection-several

# Conflicts:
#	packages/ddp-client/client/queueStubsHelpers.js
This commit is contained in:
Nacho Codoñer
2024-03-12 15:24:17 +01:00
371 changed files with 24337 additions and 1712 deletions

View File

@@ -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 ../../

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

6
.gitmodules vendored
View File

@@ -1,3 +1,7 @@
[submodule "packages/non-core/blaze"]
path = packages/non-core/blaze
url = https://github.com/meteor/blaze.git
url = https://github.com/meteor/blaze.git
[submodule "npm-packages/cordova-plugin-meteor-webapp/src/ios/GCDWebServer"]
path = npm-packages/cordova-plugin-meteor-webapp/src/ios/GCDWebServer
url = https://github.com/meteor/GCDWebServer.git
branch = master

View File

@@ -4,7 +4,7 @@ dist: jammy
sudo: required
services: xvfb
node_js:
- "18.16.0"
- "20.10.0"
cache:
directories:
- ".meteor"

View File

@@ -10,7 +10,9 @@
[![Travis CI Status](https://api.travis-ci.com/meteor/meteor.svg?branch=devel)](https://app.travis-ci.com/github/meteor/meteor)
[![CircleCI Status](https://circleci.com/gh/meteor/meteor.svg?style=svg)](https://app.circleci.com/pipelines/github/meteor/meteor?branch=devel)
[![built with Meteor](https://img.shields.io/badge/Meteor-2.14-green?logo=meteor&logoColor=white)](https://meteor.com)
[![built with Meteor](https://img.shields.io/badge/Meteor-2.15-green?logo=meteor&logoColor=white)](https://meteor.com)
[![built with Meteor](https://img.shields.io/badge/Meteor-3.0_beta-yellow?logo=meteor&logoColor=white)](https://guide.meteor.com/3.0-migration)
</div>

View File

@@ -5,8 +5,7 @@
| Version | Support Status
| ------- | --------------
| 2.x.y | ✅ all security issues
| 1.12.x | 🚧 only critical security issues
| <= 1.11.x | ❌ no longer supportted
| <= 1.12.x | no longer supported
## Reporting a Vulnerability

View File

@@ -1,6 +1,7 @@
title: Meteor API Docs
subtitle: API Docs
versions:
- '2.15'
- '2.14'
- '2.13'
- '2.12'

View File

@@ -0,0 +1,57 @@
## v2.15.0, 2024-02-05
### Highlights
* Bumps embedded MongoDB to 7.0.5.
#### Breaking Changes
N/A
#### Internal API changes
N/A
#### Migration Steps
In development, if you're using Linux, you might get an error like `version GLIBCXX_3.4.26 not found` or something related to g++.
This is related to your g++ version. With MongoDB 7, you need to have g++ 11 or higher. So make sure to have this updated.
This will happen only if you are trying to run your Meteor application with a MongoDB 7 version. If you run your app with a MONGO_URL pointing to a different MongoDB version, you won't have this issue.
```bash
meteor update --release 2.15
```
#### Meteor Version Release
* `Command line`:
- The bundle version was changed to include embedded MongoDB to 7.0.5.
- Fix cordova launch screen warnings on 2.15 [PR #12971]
* `underscore@get-version`:
- A test related to [PR #12798] to see if the tests can manage the first update step. [PR #12912]
* `service-configuration@get-version`:
- added new types* [PR #12922]
* `meteor@get-version`:
- added new types [PR #12922]
* `accounts-base@get-version`:
- Added missing type for createUserVerifyingEmail [PR #12919]
#### Special thanks to
- [@Grubba27](https://github.com/Grubba27).
- [@denihs](https://github.com/denihs).
- [@mcorbelli](https://github.com/mcorbelli).
- [@matheusccastroo](https://github.com/matheusccastroo).
- [@StorytellerCZ](https://github.com/StorytellerCZ).
- [@ebroder](https://github.com/ebroder).
- [@nachocodoner](https://github.com/nachocodoner).
For making this great framework even better!

View File

@@ -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`:

View File

@@ -723,6 +723,63 @@
For making this great framework even better!
## v2.15.0, 2024-02-05
### Highlights
* Bumps embedded MongoDB to 7.0.5.
#### Breaking Changes
N/A
#### Internal API changes
N/A
#### Migration Steps
In development, if you're using Linux, you might get an error like `version GLIBCXX_3.4.26 not found` or something related to g++.
This is related to your g++ version. With MongoDB 7, you need to have g++ 11 or higher. So make sure to have this updated.
This will happen only if you are trying to run your Meteor application with a MongoDB 7 version. If you run your app with a MONGO_URL pointing to a different MongoDB version, you won't have this issue.
```bash
meteor update --release 2.15
```
#### Meteor Version Release
* `Command line`:
- The bundle version was changed to include embedded MongoDB to 7.0.5.
- Fix cordova launch screen warnings on 2.15 [PR](https://github.com/meteor/meteor/pull/12971)
* `underscore@1.6.0`:
- A test related to [PR](https://github.com/meteor/meteor/pull/12798) to see if the tests can manage the first update step. [PR](https://github.com/meteor/meteor/pull/12912)
* `service-configuration@1.3.3`:
- added new types* [PR](https://github.com/meteor/meteor/pull/12922)
* `meteor@1.11.5`:
- added new types [PR](https://github.com/meteor/meteor/pull/12922)
* `accounts-base@2.2.10`:
- Added missing type for createUserVerifyingEmail [PR](https://github.com/meteor/meteor/pull/12919)
#### Special thanks to
- [@Grubba27](https://github.com/Grubba27).
- [@denihs](https://github.com/denihs).
- [@mcorbelli](https://github.com/mcorbelli).
- [@matheusccastroo](https://github.com/matheusccastroo).
- [@StorytellerCZ](https://github.com/StorytellerCZ).
- [@ebroder](https://github.com/ebroder).
- [@nachocodoner](https://github.com/nachocodoner).
For making this great framework even better!
## v2.14.0, 2023-12-12
@@ -788,7 +845,7 @@ For more information you can check our [Migration Guide](https://guide.meteor.co
## Meteor Version Release
* `accounts-base@2.2.9`
* `accounts-base@2.2.10`
- Ensure that `onLogin` callback fires properly
- Indexes are now created asynchronously
@@ -845,7 +902,7 @@ For more information you can check our [Migration Guide](https://guide.meteor.co
* `logic-solver@2.0.9`
- Removed Underscore dependency
* `meteor@1.11.4`:
* `meteor@1.11.5`:
- Improve TS types
* `mobile-experience@1.1.1`:
@@ -874,7 +931,7 @@ For more information you can check our [Migration Guide](https://guide.meteor.co
* `react-fast-refresh@0.2.8`:
- Updated `semver` to version 7.5.4
* `service-configuration@1.3.2`
* `service-configuration@1.3.3`
- Indexes are now created asynchronously
- Add types for ConfigError
@@ -900,7 +957,7 @@ For more information you can check our [Migration Guide](https://guide.meteor.co
* `typescript@4.9.5`:
- Updated to 4.9.5
* `webapp@1.13.6`
* `webapp@1.13.8`
- Updated `cordova-plugin-meteor-webapp` to v2.0.3
- Updated `cookie-parser` to v1.4.6
- Updated `send` to v0.18.0

View File

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

View File

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

View File

@@ -37,7 +37,7 @@ id.
On the client, you must pass `password` and at least one of `username` or `email` &mdash; 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" %}

View File

@@ -90,13 +90,13 @@ Tracker.autorun(async function example1(computation) {
// Code before the first await will stay reactive.
reactiveVar1.get(); // This will trigger a rerun.
let links = await LinksCollection.findAsync({}).fetch(); // First async call will stay reactive.
let links = await LinksCollection.find({}).fetchAsync(); // First async call will stay reactive.
// Code after the first await looses Tracker.currentComputation: no reactivity.
reactiveVar2.get(); // This won't trigger a rerun.
// You can bring back reactivity with the Tracker.withCompuation wrapper:
let users = await Tracker.withComputation(computation, () => Meteor.users.findAsync({}).fetch());
let users = await Tracker.withComputation(computation, () => Meteor.users.find({}).fetchAsync());
// Code below will again not be reactive, so you will need another Tracker.withComputation.
const value = Tracker.withComputation(computation, () => reactiveVar3.get()); // This will trigger a rerun.

View File

@@ -5,6 +5,7 @@ edit_branch: 'devel'
edit_path: 'guide'
content_root: 'source'
versions:
- '2.15'
- '2.14'
- '2.13'
- '2.12'

View File

@@ -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` <br/>
**Node.js version:** `20.9.0 LTS`
**Latest version:** `3.0-beta.6` <br/>
**Node.js version:** `20.11.1 LTS` <br />
**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.

2
meteor
View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
BUNDLE_VERSION=20.9.0.3
BUNDLE_VERSION=20.11.1.1
# OS Check. Put here because here is where we download the precompiled

View File

@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-meteor-webapp",
"version": "2.0.0",
"version": "2.0.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-meteor-webapp",
"version": "2.0.3",
"version": "2.0.4",
"description": "Cordova plugin that serves a Meteor web app through a local server and implements hot code push",
"cordova": {
"id": "cordova-plugin-meteor-webapp",

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "@meteorjs/babel",
"author": "Meteor <dev@meteor.com>",
"version": "7.19.0-beta.3",
"version": "7.19.0-beta.4",
"license": "MIT",
"type": "commonjs",
"description": "Babel wrapper package for use with Meteor",
@@ -48,7 +48,7 @@
"convert-source-map": "^1.6.0",
"lodash": "^4.17.21",
"meteor-babel-helpers": "0.0.3",
"typescript": "~4.9.5"
"typescript": "~5.3.3"
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "7.14.5",

View File

@@ -14,6 +14,7 @@ npm install -g meteor
| NPM Package | Meteor Official Release |
|-------------|-------------------------|
| 2.15.0 | 2.15.0 |
| 2.14.0 | 2.14.0 |
| 2.13.3 | 2.13.3 |
| 2.13.1 | 2.13.1 |

View File

@@ -1,7 +1,7 @@
const os = require('os');
const path = require('path');
const METEOR_LATEST_VERSION = '2.14';
const METEOR_LATEST_VERSION = '3.0-beta.6';
const sudoUser = process.env.SUDO_USER || '';
function isRoot() {
return process.getuid && process.getuid() === 0;

View File

@@ -1,6 +1,6 @@
{
"name": "meteor",
"version": "2.14.0",
"version": "3.0.0-beta.6",
"description": "Install Meteor",
"main": "install.js",
"scripts": {
@@ -24,7 +24,7 @@
"meteor-installer": "cli.js"
},
"engines": {
"node": "<=14.x",
"npm": "<=6.x"
"node": "<=20.x",
"npm": "<=10.x"
}
}

View File

@@ -2,9 +2,9 @@
"lockfileVersion": 4,
"dependencies": {
"@types/node": {
"version": "20.11.13",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.13.tgz",
"integrity": "sha512-5G4zQwdiQBSWYTDAH1ctw2eidqdhMJaNsiIDKHFr55ihz5Trl2qqR8fdrT732yPBho5gkNxXm67OxWFBqX9aPg=="
"version": "20.11.19",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz",
"integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ=="
},
"@types/notp": {
"version": "2.0.5",

View File

@@ -1,5 +1,5 @@
Package.describe({
version: '3.0.0-beta300.0',
version: '3.0.0-beta300.6',
summary:
'Package used to enable two factor authentication through OTP protocol',
});

View File

@@ -48,6 +48,16 @@ export namespace Accounts {
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
): Promise<string>;
function createUserVerifyingEmail(
options: {
username?: string | undefined;
email?: string | undefined;
password?: string | undefined;
profile?: Meteor.UserProfile | undefined;
},
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
): Promise<string>;
function config(options: {
sendVerificationEmail?: boolean | undefined;
forbidClientAccountCreation?: boolean | undefined;
@@ -191,12 +201,6 @@ export namespace Accounts {
function setUsername(userId: string, newUsername: string): void;
function setPassword(
userId: string,
newPassword: string,
options?: { logout?: boolean | undefined }
): void;
function setPasswordAsync(
userId: string,
newPassword: string,
@@ -324,9 +328,9 @@ export namespace Accounts {
type Password =
| string
| {
digest: string;
algorithm: 'sha-256';
};
digest: string;
algorithm: 'sha-256';
};
/**
*
@@ -336,7 +340,7 @@ export namespace Accounts {
* properties `digest` and `algorithm` (in which case we bcrypt
* `password.digest`).
*/
function _checkPassword(
function _checkPasswordAsync(
user: Meteor.User,
password: Password
): { userId: string; error?: any };

View File

@@ -365,12 +365,18 @@ export class AccountsClient extends AccountsCommon {
// Make the client logged in. (The user data should already be loaded!)
this.makeClientLoggedIn(result.id, result.token, result.tokenExpires);
// TODO [FIBERS]: this is a big workaround. The Tracker is now receiving promises,
// so it's finishing before time. Hopefully this PR will fix this behavior
// https://github.com/meteor/meteor/pull/12294
Meteor.setTimeout(() => {
loginCallbacks({ loginDetails: result });
}, 100);
// use Tracker to make we sure have a user before calling the callbacks
Tracker.autorun(async function (computation) {
const user = await Tracker.withComputation(computation, () =>
Meteor.userAsync(),
);
if (user) {
loginCallbacks({ loginDetails: result })
}
});
};
if (!options._suppressLoggingIn) {

View File

@@ -203,7 +203,7 @@ export class AccountsCommon {
// A collection name or a Mongo.Collection object to hold the users.
// - passwordResetTokenExpirationInDays {Number}
// Number of days since password reset token creation until the
// token cannt be used any longer (password reset token expires).
// token can't be used any longer (password reset token expires).
// - ambiguousErrorMessages {Boolean}
// Return ambiguous error messages from login failures to prevent
// user enumeration.
@@ -225,7 +225,7 @@ export class AccountsCommon {
* @param {Number} options.passwordResetTokenExpiration The number of milliseconds from when a link to reset password is sent until token expires and user can't reset password with the link anymore. If `passwordResetTokenExpirationInDays` is set, it takes precedent.
* @param {Number} options.passwordEnrollTokenExpirationInDays The number of days from when a link to set initial password is sent until token expires and user can't set password with the link anymore. Defaults to 30.
* @param {Number} options.passwordEnrollTokenExpiration The number of milliseconds from when a link to set initial password is sent until token expires and user can't set password with the link anymore. If `passwordEnrollTokenExpirationInDays` is set, it takes precedent.
* @param {Boolean} options.ambiguousErrorMessages Return ambiguous error messages from login failures to prevent user enumeration. Defaults to false.
* @param {Boolean} options.ambiguousErrorMessages Return ambiguous error messages from login failures to prevent user enumeration. Defaults to `false`, but in production environments it is recommended it defaults to `true`.
* @param {MongoFieldSpecifier} options.defaultFieldSelector To exclude by default large custom fields from `Meteor.user()` and `Meteor.findUserBy...()` functions when called without a field selector, and all `onLogin`, `onLoginFailure` and `onLogout` callbacks. Example: `Accounts.config({ defaultFieldSelector: { myBigArray: 0 }})`. Beware when using this. If, for instance, you do not include `email` when excluding the fields, you can have problems with functions like `forgotPassword` that will break because they won't have the required data available. It's recommend that you always keep the fields `_id`, `username`, and `email`.
* @param {String|Mongo.Collection} options.collection A collection name or a Mongo.Collection object to hold the users.
* @param {Number} options.loginTokenExpirationHours When using the package `accounts-2fa`, use this to set the amount of time a token sent is valid. As it's just a number, you can use, for example, 0.5 to make the token valid for just half hour. The default is 1 hour.
@@ -419,14 +419,14 @@ export class AccountsCommon {
/**
* @summary Get the current user id, or `null` if no user is logged in. A reactive data source.
* @locus Anywhere but publish functions
* @locus Anywhere
* @importFromPackage meteor
*/
Meteor.userId = () => Accounts.userId();
/**
* @summary Get the current user record, or `null` if no user is logged in. A reactive data source.
* @locus Anywhere but publish functions
* @locus Anywhere
* @importFromPackage meteor
* @param {Object} [options]
* @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude.
@@ -435,7 +435,7 @@ Meteor.user = options => Accounts.user(options);
/**
* @summary Get the current user record, or `null` if no user is logged in. A reactive data source.
* @locus Anywhere but publish functions
* @locus Anywhere
* @importFromPackage meteor
* @param {Object} [options]
* @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude.

View File

@@ -181,7 +181,7 @@ export class AccountsServer extends AccountsCommon {
}
this._onCreateLoginTokenHook = func;
};
}
/**
* @summary Customize new user creation.
@@ -1518,9 +1518,10 @@ export class AccountsServer extends AccountsCommon {
}
_handleError = (msg, throwError = true, errorCode = 403) => {
const isErrorAmbiguous = this._options.ambiguousErrorMessages ?? Meteor.isProduction;
const error = new Meteor.Error(
errorCode,
this._options.ambiguousErrorMessages
isErrorAmbiguous
? "Something went wrong. Please check your credentials."
: msg
);

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'A user account system',
version: '3.0.0-beta300.0',
version: '3.0.0-beta300.6',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Login service for Facebook accounts",
version: "1.3.4-beta300.0",
version: "1.3.4-beta300.6",
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Login service for Github accounts',
version: '1.5.1-beta300.0',
version: '1.5.1-beta300.6',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Login service for Google accounts",
version: "1.4.1-beta300.0",
version: "1.4.1-beta300.6",
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Login service for Meetup accounts',
version: '1.5.1-beta300.0',
version: '1.5.1-beta300.6',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Login service for Meteor developer accounts',
version: '1.5.1-beta300.0',
version: '1.5.1-beta300.6',
});
Package.onUse(api => {

View File

@@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor';
// Listen to calls to `login` with an oauth option set. This is where
// users actually get logged in to meteor via oauth.
Accounts.registerLoginHandler(options => {
Accounts.registerLoginHandler(async options => {
if (!options.oauth)
return undefined; // don't handle
@@ -15,7 +15,7 @@ Accounts.registerLoginHandler(options => {
credentialSecret: Match.OneOf(null, String)
});
const result = OAuth.retrieveCredential(options.oauth.credentialToken,
const result = await OAuth.retrieveCredential(options.oauth.credentialToken,
options.oauth.credentialSecret);
if (!result) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Common code for OAuth-based login services",
version: "1.4.3-beta300.0",
version: "1.4.3-beta300.6",
});
Package.onUse(api => {

View File

@@ -238,9 +238,9 @@
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"semver": {
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA=="
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
"integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg=="
},
"set-blocking": {
"version": "2.0.0",

View File

@@ -5,7 +5,7 @@ Package.describe({
// 2.2.x in the future. The version was also bumped to 2.0.0 temporarily
// during the Meteor 1.5.1 release process, so versions 2.0.0-beta.2
// through -beta.5 and -rc.0 have already been published.
version: '3.0.0-beta300.0',
version: '3.0.0-beta300.6',
});
Npm.depends({

View File

@@ -100,11 +100,6 @@ const checkPasswordAsync = async (user, password) => {
return result;
};
const checkPassword = (user, password) => {
return Promise.await(checkPasswordAsync(user, password));
};
Accounts._checkPassword = checkPassword;
Accounts._checkPasswordAsync = checkPasswordAsync;
///
@@ -113,7 +108,7 @@ Accounts._checkPasswordAsync = checkPasswordAsync;
/**
* @summary Finds the user with the specified username.
* @summary Finds the user asynchronously with the specified username.
* First tries to match username case sensitively; if that fails, it
* tries case insensitively; but if more than one user matches the case
* insensitive search, it returns null.
@@ -121,7 +116,7 @@ Accounts._checkPasswordAsync = checkPasswordAsync;
* @param {String} username The username to look for
* @param {Object} [options]
* @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude.
* @returns {Object} A user if found, else null
* @returns {Promise<Object>} A user if found, else null
* @importFromPackage accounts-base
*/
Accounts.findUserByUsername =
@@ -129,7 +124,7 @@ Accounts.findUserByUsername =
await Accounts._findUserByQuery({ username }, options);
/**
* @summary Finds the user with the specified email.
* @summary Finds the user asynchronously with the specified email.
* First tries to match email case sensitively; if that fails, it
* tries case insensitively; but if more than one user matches the case
* insensitive search, it returns null.
@@ -137,7 +132,7 @@ Accounts.findUserByUsername =
* @param {String} email The email address to look for
* @param {Object} [options]
* @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude.
* @returns {Object} A user if found, else null
* @returns {Promise<Object>} A user if found, else null
* @importFromPackage accounts-base
*/
Accounts.findUserByEmail =
@@ -224,7 +219,7 @@ Accounts.registerLoginHandler("password", async options => {
///
/**
* @summary Change a user's username. Use this instead of updating the
* @summary Change a user's username asynchronously. Use this instead of updating the
* database directly. The operation will fail if there is an existing user
* with a username only differing in case.
* @locus Server
@@ -356,20 +351,6 @@ Accounts.setPasswordAsync =
await Meteor.users.updateAsync({_id: user._id}, update);
};
/**
* @summary Forcibly change the password for a user.
* @locus Server
* @param {String} userId The id of the user to update.
* @param {String} newPassword A new password for the user.
* @param {Object} [options]
* @param {Object} options.logout Logout all current connections with this userId (default: true)
* @importFromPackage accounts-base
*/
Accounts.setPassword = (userId, newPlaintextPassword, options) => {
return Promise.await(Accounts.setPasswordAsync(userId, newPlaintextPassword, options));
};
///
/// RESETTING VIA EMAIL
///
@@ -397,13 +378,13 @@ Meteor.methods({forgotPassword: async options => {
}});
/**
* @summary Generates a reset token and saves it into the database.
* @summary Asynchronously generates a reset token and saves it into the database.
* @locus Server
* @param {String} userId The id of the user to generate the reset token for.
* @param {String} email Which address of the user to generate the reset token for. This address must be in the user's `emails` list. If `null`, defaults to the first email in the list.
* @param {String} reason `resetPassword` or `enrollAccount`.
* @param {Object} [extraTokenData] Optional additional data to be added into the token record.
* @returns {Object} Object with {email, user, token} values.
* @returns {Promise<Object>} Promise of an object with {email, user, token} values.
* @importFromPackage accounts-base
*/
Accounts.generateResetToken =
@@ -471,12 +452,12 @@ Accounts.generateResetToken =
};
/**
* @summary Generates an e-mail verification token and saves it into the database.
* @summary Generates asynchronously an e-mail verification token and saves it into the database.
* @locus Server
* @param {String} userId The id of the user to generate the e-mail verification token for.
* @param {String} email Which address of the user to generate the e-mail verification token for. This address must be in the user's `emails` list. If `null`, defaults to the first unverified email in the list.
* @param {Object} [extraTokenData] Optional additional data to be added into the token record.
* @returns {Object} Object with {email, user, token} values.
* @returns {Promise<Object>} Promise of an object with {email, user, token} values.
* @importFromPackage accounts-base
*/
Accounts.generateVerificationToken =
@@ -536,13 +517,13 @@ Accounts.generateVerificationToken =
// to set a new password, without the old password.
/**
* @summary Send an email with a link the user can use to reset their password.
* @summary Send an email asynchronously with a link the user can use to reset their password.
* @locus Server
* @param {String} userId The id of the user to send email to.
* @param {String} [email] Optional. Which address of the user's to send the email to. This address must be in the user's `emails` list. Defaults to the first email in the list.
* @param {Object} [extraTokenData] Optional additional data to be added into the token record.
* @param {Object} [extraParams] Optional additional params to be added to the reset url.
* @returns {Object} Object with {email, user, token, url, options} values.
* @returns {Promise<Object>} Promise of an object with {email, user, token, url, options} values.
* @importFromPackage accounts-base
*/
Accounts.sendResetPasswordEmail =
@@ -568,13 +549,13 @@ Accounts.sendResetPasswordEmail =
// want to use enrollment emails.
/**
* @summary Send an email with a link the user can use to set their initial password.
* @summary Send an email asynchronously with a link the user can use to set their initial password.
* @locus Server
* @param {String} userId The id of the user to send email to.
* @param {String} [email] Optional. Which address of the user's to send the email to. This address must be in the user's `emails` list. Defaults to the first email in the list.
* @param {Object} [extraTokenData] Optional additional data to be added into the token record.
* @param {Object} [extraParams] Optional additional params to be added to the enrollment url.
* @returns {Object} Object with {email, user, token, url, options} values.
* @returns {Promise<Object>} Promise of an object {email, user, token, url, options} values.
* @importFromPackage accounts-base
*/
Accounts.sendEnrollmentEmail =
@@ -747,14 +728,13 @@ Meteor.methods(
// address as verified
/**
* @summary Send an email with a link the user can use verify their email address.
* @summary Send an email asynchronously with a link the user can use verify their email address.
* @locus Server
* @param {String} userId The id of the user to send email to.
* @param {String} [email] Optional. Which address of the user's to send the email to. This address must be in the user's `emails` list. Defaults to the first unverified email in the list.
* @param {Object} [extraTokenData] Optional additional data to be added into the token record.
* @param {Object} [extraParams] Optional additional params to be added to the verification url.
*
* @returns {Object} Object with {email, user, token, url, options} values.
* @returns {Promise<Object>} Promise of an object with {email, user, token, url, options} values.
* @importFromPackage accounts-base
*/
Accounts.sendVerificationEmail =
@@ -850,7 +830,7 @@ Meteor.methods(
});
/**
* @summary Add an email address for a user. Use this instead of directly
* @summary Add an email asynchronously address for a user. Use this instead of directly
* updating the database. The operation will fail if there is a different user
* with an email only differing in case. If the specified user has an existing
* email only differing in case however, we replace it.
@@ -950,7 +930,7 @@ Accounts.addEmail =
}
/**
* @summary Remove an email address for a user. Use this instead of updating
* @summary Remove an email address asynchronously for a user. Use this instead of updating
* the database directly.
* @locus Server
* @param {String} userId The ID of the user to update.
@@ -1030,7 +1010,7 @@ Meteor.methods(
});
/**
* @summary Creates an user and sends an email if `options.email` is informed.
* @summary Creates an user asynchronously and sends an email if `options.email` is informed.
* Then if the `sendVerificationEmail` option from the `Accounts` package is
* enabled, you'll send a verification email if `options.password` is informed,
* otherwise you'll send an enrollment email.
@@ -1105,12 +1085,7 @@ Accounts.createUserAsync =
// method calling Accounts.createUser could set?
//
Accounts.createUser =
!Meteor._isFibersEnabled
? Accounts.createUserAsync
: (options, callback) =>
Promise.await(Accounts.createUserAsync(options, callback));
Accounts.createUser = Accounts.createUserAsync;
///
/// PASSWORD-SPECIFIC INDEXES ON USERS

View File

@@ -714,16 +714,7 @@ if (Meteor.isClient) (() => {
// Test that even with no published fields, we still have a document.
await Accounts.connection.callAsync('clearUsernameAndProfile');
test.isTrue(Meteor.userId());
// TODO [FIBERS]: this is a big workaround. The Tracker is now receiving promises,
// so it's finishing before time. Hopefully this PR will fix this behavior
// https://github.com/meteor/meteor/pull/12294
let resolve;
const promise = new Promise(res => resolve = res);
Meteor.setTimeout(() => {
test.equal(Meteor.user(), { _id: Meteor.userId() });
resolve();
}, 100);
return promise;
test.equal(await Meteor.userAsync(), { _id: Meteor.userId() });
},
logoutStep,
function (test, expect) {
@@ -1419,17 +1410,17 @@ if (Meteor.isServer) (() => {
},
);
Accounts._options.ambiguousErrorMessages = true
Accounts._options.ambiguousErrorMessages = true;
await test.throwsAsync(
async () => await Meteor.callAsync('forgotPassword', wrongOptions),
'Something went wrong. Please check your credentials'
)
);
Accounts._options.ambiguousErrorMessages = false
Accounts._options.ambiguousErrorMessages = false;
await test.throwsAsync(
async () => await Meteor.callAsync('forgotPassword', wrongOptions),
/User not found/
)
);
// return accounts as it were
Accounts._options = options
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'No-password login/sign-up support for accounts',
version: '3.0.0-beta300.0',
version: '3.0.0-beta300.6',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Login service for Twitter accounts",
version: "1.5.1-beta300.0",
version: "1.5.1-beta300.6",
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Unstyled version of login widgets',
version: '1.7.1-beta300.0',
version: '1.7.1-beta300.6',
});
Package.onUse(function(api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Simple templates to add login widgets to an app",
version: "1.4.3-beta300.0",
version: "1.4.3-beta300.6",
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Login service for Sina Weibo accounts",
version: "1.4.1-beta300.0",
version: "1.4.1-beta300.6",
});
Package.onUse(api => {

View File

@@ -619,9 +619,9 @@ CollectionPrototype._callMutatorMethodAsync = function _callMutatorMethodAsync(n
const mutatorMethodName = this._prefix + name;
return this._connection.applyAsync(mutatorMethodName, args, {
returnStubValue: true,
returnStubValue: this.resolverType === 'stub' || this.resolverType == null,
// StubStream is only used for testing where you don't care about the server
returnServerResultPromise: !this._connection._stream._isStub,
returnServerResultPromise: !this._connection._stream._isStub && this.resolverType !== 'stub',
...options,
});
}

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'allow-deny',
version: '2.0.0-beta300.0',
version: '2.0.0-beta300.6',
// Brief, one-line summary of the package.
summary: 'Implements functionality for allow/deny and client-side db operations',
// URL to the Git repository containing the source code for this package.

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Try to detect inadequate input sanitization",
version: '1.0.8-beta300.0'
version: '1.0.8-beta300.6'
});
// This package is empty; its presence is detected by livedata.

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "(For prototyping only) Publish the entire database to all clients",
version: '1.0.8-beta300.0'
version: '1.0.8-beta300.6'
});
// This package is empty; its presence is detected by several other packages

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Update the client when new client code is available',
version: '2.0.0-beta300.0',
version: '2.0.0-beta300.6',
});
Package.onUse(function(api) {

View File

@@ -1,11 +1,11 @@
Package.describe({
name: "babel-compiler",
summary: "Parser/transpiler for ECMAScript 2015+ syntax",
version: '7.11.0-beta300.0',
version: '7.11.0-beta300.6',
});
Npm.depends({
'@meteorjs/babel': '7.19.0-beta.3',
'@meteorjs/babel': '7.19.0-beta.4',
'json5': '2.1.1',
'semver': '7.3.8'
});

View File

@@ -1,7 +1,7 @@
Package.describe({
name: "babel-runtime",
summary: "Runtime support for output of Babel transpiler",
version: '1.5.2-beta300.0',
version: '1.5.2-beta300.6',
documentation: 'README.md'
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Base64 encoding and decoding",
version: '1.0.13-beta300.0',
version: '1.0.13-beta300.6',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Binary Heap datastructure implementation",
version: '1.0.12-beta300.0'
version: '1.0.12-beta300.6'
});
Package.onUse(api => {

View File

@@ -2,7 +2,7 @@ Package.describe({
// These tests are in a separate package so that we can Npm.depend on
// parse5, a html parsing library.
summary: "Tests for the boilerplate-generator package",
version: '1.5.2-beta300.0',
version: '1.5.2-beta300.6',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Generates the boilerplate html from program's manifest",
version: '2.0.0-beta300.0',
version: '2.0.0-beta300.6',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Common code for browser-policy packages",
version: '1.0.13-beta300.0',
version: '1.0.13-beta300.6',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Configure content security policies",
version: '2.0.0-beta300.0',
version: '2.0.0-beta300.6',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Restrict which websites can frame your app",
version: '1.1.3-beta300.0'
version: '1.1.3-beta300.6'
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Configure security policies enforced by the browser",
version: '1.1.3-beta300.0'
version: '1.1.3-beta300.6'
});
Package.onUse(function (api) {

View File

@@ -324,7 +324,7 @@ CachingCompiler = class CachingCompiler extends CachingCompilerBase {
} else {
const result = await getResult();
if (result) {
this.addCompileResult(inputFile, result);
await this.addCompileResult(inputFile, result);
}
}
}

View File

@@ -166,7 +166,7 @@ extends CachingCompilerBase {
} else if (this.isRoot(inputFile)) {
const result = await getResult();
if (result) {
this.addCompileResult(inputFile, result);
await this.addCompileResult(inputFile, result);
}
}
}

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'caching-compiler',
version: '2.0.0-beta300.0',
version: '2.0.0-beta300.6',
summary: 'An easy way to make compiler plugins cache',
documentation: 'README.md'
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Register callbacks on a hook",
version: '1.6.0-beta300.0',
version: '1.6.0-beta300.6',
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Check whether a value matches a pattern',
version: '1.3.3-beta300.0',
version: '1.3.3-beta300.6',
});
Package.onUse(api => {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Given the set of the constraints, picks a satisfying configuration",
version: '2.0.0-beta300.0',
version: '2.0.0-beta300.6',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Core runtime to load packages and the app",
version: '1.0.0-beta300.0',
version: '1.0.0-beta300.6',
documentation: null
});

View File

@@ -1,7 +1,7 @@
Package.describe({
summary: "Makes your Cordova application use the Crosswalk WebView \
instead of the System WebView on Android",
version: '1.7.2-beta300.0',
version: '1.7.2-beta300.6',
documentation: null
});

View File

@@ -20,7 +20,7 @@ export const loadAsyncStubHelpers = () => {
queue = queue.finally(() => {
fn(resolve, reject);
return promise.catch(() => {});
return promise.stubPromise;
});
promise.finally(() => {
@@ -89,25 +89,30 @@ export const loadAsyncStubHelpers = () => {
return queueFunction(
(resolve, reject) => {
let hasStub = false;
let finished = false;
Meteor._setImmediate(() => {
const applyAsyncPromise = oldApplyAsync.apply(this, args);
stubPromiseResolver(applyAsyncPromise.stubPromise);
serverPromiseResolver(applyAsyncPromise.serverPromise);
hasStub = !!applyAsyncPromise.stubPromise;
if (hasStub) {
applyAsyncPromise.stubPromise.finally(() => {
finished = true;
});
}
applyAsyncPromise
.then((result) => {
finished = true;
resolve(result);
})
.catch((err) => {
finished = true;
reject(err);
});
});
Meteor._setImmediate(() => {
if (!finished) {
if (hasStub && !finished) {
console.warn(
`Method stub (${name}) took too long and could cause unexpected problems. Learn more at https://github.com/zodern/fix-async-stubs/#limitations`
);

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Meteor's latency-compensated distributed data client",
version: '3.0.0-beta300.0',
version: '3.0.0-beta300.6',
documentation: null
});

View File

@@ -320,3 +320,22 @@ Tinytest.addAsync(
test.equal(serverEvents, ["server-only-sync", "publication"]);
}
);
Tinytest.addAsync(
"method interaction with unblocking mechanism",
async function (test) {
await Meteor.callAsync("getAndResetEvents");
await Promise.all([
Meteor.callAsync("unblockedMethod", { delay: 200 }), // unblock + sleep for 200 milliseconds
Meteor.callAsync("blockingMethod"), // run straight + block
]);
let serverEvents = await Meteor.callAsync("getAndResetEvents");
test.equal(
serverEvents,
["unblock start", "blockingMethod", "unblock end"],
"should have properly executed the unblocking mechanism"
);
}
);

View File

@@ -40,7 +40,16 @@ Meteor.methods({
events.push('callAsyncStubFromAsyncStub');
return 'server result';
}
},
async 'unblockedMethod'({ delay }) {
events.push('unblock start');
this.unblock();
await Meteor._sleepForMs(delay);
events.push('unblock end');
},
'blockingMethod'() {
events.push('blockingMethod');
},
});
Meteor.publish("simple-publication", function () {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Code shared beween ddp-client and ddp-server",
version: '1.4.1-beta300.0',
version: '1.4.1-beta300.6',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'ddp-rate-limiter',
version: '1.2.1-beta300.0',
version: '1.2.1-beta300.6',
// Brief, one-line summary of the package.
summary: 'The DDPRateLimiter allows users to add rate limits to DDP' +
' methods and subscriptions.',

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Meteor's latency-compensated distributed data server",
version: '3.0.0-beta300.0',
version: '3.0.0-beta300.6',
documentation: null
});

View File

@@ -4,6 +4,7 @@ export namespace DDP {
interface DDPStatic {
subscribe(name: string, ...rest: any[]): Meteor.SubscriptionHandle;
call(method: string, ...parameters: any[]): any;
callAsync(method: string, ...parameters: any[]): Promise<any>;
apply(method: string, ...parameters: any[]): any;
methods(IMeteorMethodsDictionary: any): any;
status(): DDPStatus;

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Meteor's latency-compensated distributed data framework",
version: '1.4.2-beta300.0'
version: '1.4.2-beta300.6'
});
Package.onUse(function (api) {

View File

@@ -1,5 +1,5 @@
# appcache
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/appcache) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/appcache)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/appcache) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/appcache)
***
The `appcache` package, part of

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Enable the application cache in the browser",
version: '1.2.9-beta300.0',
version: '1.2.9-beta300.6',
deprecated: true,
});

View File

@@ -1,5 +1,5 @@
# code-prettify
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/code-prettify) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/code-prettify)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/code-prettify) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/code-prettify)
***
This internal Meteor package is now unnecessary and has been deprecated. To

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "context",
version: '1.0.0-beta300.0',
version: '1.0.0-beta300.6',
summary: "Manage contextual information without passing objects around",
documentation: "README.md",
deprecated: 'You should not be needing this package in Meteor 3'

View File

@@ -1,5 +1,5 @@
# deps
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deps) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deps)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/deps) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/deps)
***
This is an internal Meteor package.
This is an internal Meteor package.

View File

@@ -1,5 +1,5 @@
# facebook
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/facebook) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/facebook)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/facebook) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/facebook)
***
** Deprecated, use facebook-oauth instead**

View File

@@ -1,5 +1,5 @@
# facts
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/facts) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/facts)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/facts) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/facts)
***
This is a legacy internal Meteor package. Use facts-ui or facts-base instead.

View File

@@ -1,5 +1,5 @@
# fastclick
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/fastclick) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/fastclick)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/fastclick) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/fastclick)
***
> **Warning:** As of late 2015 most mobile browsers - notably Chrome and Safari - no longer have a 300ms touch delay, so fastclick offers no benefit on newer browsers, and risks introducing [bugs](https://github.com/ftlabs/fastclick/issues) into your application. Consider carefully whether you really need to use it.

View File

@@ -1,5 +1,5 @@
# github
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/github) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/github)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/github) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/github)
***
**Deprecated, use github-oauth instead.**

View File

@@ -1,5 +1,5 @@
# google-oauth
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/google) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/google)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/google) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/google)
***
** Deprecated, use google-oauth instead**

View File

@@ -1,5 +1,5 @@
# handlebars
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/handlebars) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/handlebars)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/handlebars) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/handlebars)
***
This is an internal Meteor package.
This is an internal Meteor package.

View File

@@ -1,15 +1,15 @@
Package.describe({
summary: "Make HTTP calls to remote servers",
version: '3.0.0-beta300.0',
version: '3.0.0-beta300.6',
deprecated: 'Please use the fetch package'
});
Package.onUse(function (api) {
api.use([
'url@1.3.2',
'ecmascript@0.16.8-beta300.0',
'fetch@0.1.4-beta300.0',
'modules@0.19.1-beta300.0'
'ecmascript@0.16.8-beta300.6',
'fetch@0.1.4-beta300.6',
'modules@0.19.1-beta300.6'
]);
api.mainModule('httpcall_client.js', 'client');

View File

@@ -1,7 +1,7 @@
# jquery-waypoints
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/jquery-waypoints) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/jquery-waypoints)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/jquery-waypoints) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/jquery-waypoints)
***
This is a wrapper package for the JQuery Waypoints library. You can use it to add callbacks that fire when the user scrolls to certain elements on a page, for example to implement table of contents highlighting.
See the [JQuery Waypoints docs](http://imakewebthings.com/jquery-waypoints/) for more details.
See the [JQuery Waypoints docs](http://imakewebthings.com/jquery-waypoints/) for more details.

View File

@@ -1,5 +1,5 @@
# jshint
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/jshint) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/jshint)
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/deprecated/jshint) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/deprecated/jshint)
***
JSHint for Meteor

Some files were not shown because too many files have changed in this diff Show More