mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge branch 'release-2.14' into underscore/constraint-solver
This commit is contained in:
2
.github/workflows/check-code-style.yml
vendored
2
.github/workflows/check-code-style.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
check-code-style:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14.x
|
||||
|
||||
2
.github/workflows/check-syntax.yml
vendored
2
.github/workflows/check-syntax.yml
vendored
@@ -6,7 +6,7 @@ jobs:
|
||||
check-code-style:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
|
||||
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
run:
|
||||
working-directory: docs/
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 12.x
|
||||
|
||||
2
.github/workflows/guide.yml
vendored
2
.github/workflows/guide.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
run:
|
||||
working-directory: guide/
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 12.x
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
|
||||
2
.github/workflows/npm-meteor-babel.yml
vendored
2
.github/workflows/npm-meteor-babel.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
|
||||
2
.github/workflows/npm-meteor-promise.yml
vendored
2
.github/workflows/npm-meteor-promise.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
matrix:
|
||||
node-version: [12.x, 14.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
|
||||
@@ -29,9 +29,9 @@ Are you new here? Please [check](https://github.com/meteor/meteor/labels/good%20
|
||||
|
||||
We curate specific issues that would make great pull requests for community contributors by applying the `ready` label.
|
||||
|
||||
Any issue which does not have the `ready` label still requires discussion on implementation details but input and positive commentary is welcome! Any pull request opened on an issue which is not `confirmed` is still welcome, however the pull-request is more likely to be sent back for reworking than a `ready` issue.
|
||||
Any issue that does not have the `ready` label still requires discussion on implementation details, but input and positive commentary are welcome! Any pull request opened on an issue that is not `confirmed` is still welcome. However, the pull request is more likely to be sent back for reworking than a `ready` issue.
|
||||
|
||||
If in doubt about the best way to implement something, please create additional conversation on the issue. You can also reach one of the [core committers](https://github.com/meteor/meteor/blob/devel/CONTRIBUTING.md#core-committer) and they will help you to find something interesting to work on.
|
||||
If in doubt about the best way to implement something, please create additional conversation on the issue. You can also reach one of the [core committers](https://github.com/meteor/meteor/blob/devel/CONTRIBUTING.md#core-committer), and they will help you to find something interesting to work on.
|
||||
|
||||
### Project roles
|
||||
|
||||
@@ -39,7 +39,7 @@ Here are descriptions of the existing project roles, along with the current cont
|
||||
|
||||
#### Reviewer
|
||||
|
||||
Reviwers are members of the community that help with Pull Requests reviews.
|
||||
Reviewers are members of the community who help with Pull Requests reviews.
|
||||
|
||||
Current Reviewers:
|
||||
- [meteor](https://github.com/meteor/meteor)
|
||||
@@ -56,9 +56,9 @@ Current Reviewers:
|
||||
|
||||
#### Core Committer
|
||||
|
||||
The contributors with commit access to meteor/meteor are employees of Meteor Software LP or community members who have distinguished themselves in other contribution areas or members of partner companies. If you want to become a core committer please start writing PRs.
|
||||
The contributors with commit access to meteor/meteor are employees of Meteor Software LP or community members who have distinguished themselves in other contribution areas or members of partner companies. If you want to become a core committer, please start writing PRs.
|
||||
|
||||
Current Core Committers:
|
||||
Current Core Team:
|
||||
- [@denihs](https://github.com/denihs)
|
||||
- [@zodern](https://github.com/zodern)
|
||||
- [@filipenevola](https://github.com/filipenevola)
|
||||
@@ -68,10 +68,7 @@ Current Core Committers:
|
||||
- [@StorytellerCZ](https://github.com/StorytellerCZ)
|
||||
- [@CaptainN](https://github.com/CaptainN)
|
||||
- [@radekmie](https://github.com/radekmie)
|
||||
- [@piotrpospiech](https://github.com/piotrpospiech)
|
||||
- [@edimarlnx](https://github.com/edimarlnx)
|
||||
- [@matheusccastroo](https://github.com/matheusccastroo)
|
||||
- [@eduwr](https://github.com/eduwr)
|
||||
|
||||
### Tracking project work
|
||||
|
||||
|
||||
14
README.md
14
README.md
@@ -82,7 +82,7 @@ meteor
|
||||
**Building an application with Meteor?**
|
||||
|
||||
* Deploy on [Meteor Cloud](https://www.meteor.com/cloud)
|
||||
* Discussion [Forums](https://forums.meteor.com/)
|
||||
* Discuss on [Forums](https://forums.meteor.com/)
|
||||
* Join the Meteor community Slack by clicking this [invite link](https://join.slack.com/t/meteor-community/shared_invite/enQtODA0NTU2Nzk5MTA3LWY5NGMxMWRjZDgzYWMyMTEyYTQ3MTcwZmU2YjM5MTY3MjJkZjQ0NWRjOGZlYmIxZjFlYTA5Mjg4OTk3ODRiOTc).
|
||||
* Announcement list. Subscribe in the [footer](https://www.meteor.com/).
|
||||
|
||||
@@ -94,4 +94,14 @@ Interested in helping or contributing to Meteor? These resources will help:
|
||||
* [Feature requests](https://github.com/meteor/meteor/discussions/)
|
||||
* [Issue tracker](https://github.com/meteor/meteor/issues)
|
||||
|
||||
To uninstall Meteor [read here](https://docs.meteor.com/install.html#uninstall).
|
||||
To uninstall Meteor:
|
||||
- If installed via npm, run:
|
||||
```shell
|
||||
meteor-installer uninstall
|
||||
```
|
||||
- If installed via curl, run:
|
||||
```shell
|
||||
rm -rf ~/.meteor
|
||||
sudo rm /usr/local/bin/meteor
|
||||
```
|
||||
To find more information about installation, [read here](https://docs.meteor.com/install.html#uninstall).
|
||||
|
||||
@@ -1,36 +1,50 @@
|
||||
## vX.XX.X, 2023-XX-XX
|
||||
|
||||
### Highlights
|
||||
|
||||
## Highlights
|
||||
List the most important changes to catch people's attention.
|
||||
Are there breaking changes? Mention it here and link them.
|
||||
Are there exciting new features? Mention it here and link them.
|
||||
For example:
|
||||
* MongoDB Server 6.x Support
|
||||
* Embedded Mongo now uses MongoDB 6.0.3
|
||||
* Some pr [GH someone] [PR #number] // this will become -> [someone](https://github.com/someone) [PR](https://github.com/meteor/meteor/pull/number)
|
||||
#### Breaking Changes
|
||||
|
||||
N/A
|
||||
|
||||
#### Internal API changes
|
||||
|
||||
N/A
|
||||
|
||||
#### Migration Steps
|
||||
|
||||
TODO
|
||||
|
||||
#### Meteor Version Release
|
||||
|
||||
|
||||
* `Command line`:
|
||||
- Corrected typo in XX XX
|
||||
## Migration Steps
|
||||
Steps to migrate to this version. If it's a long one, we should have a migration guide page.
|
||||
|
||||
* `npm mongo @4.13.0`: // You can use @get-version to get the version of the package
|
||||
## New Features
|
||||
- Feature 1 description. PR Link.
|
||||
- Feature 2 description. PR Link.
|
||||
- Some feature. pr [GH someone] [PR #number] // this will become -> [someone](https://github.com/someone) [PR](https://github.com/meteor/meteor/pull/number)
|
||||
- `Command line`:
|
||||
- Added feature X
|
||||
## Patch changes
|
||||
- Patch Change 1 description. PR Link.
|
||||
- Patch Change 2 description. PR Link.
|
||||
- `npm mongo @4.13.0`: // You can use @get-version to get the version of the package
|
||||
- Updated MongoDB driver to version 4.13.0
|
||||
|
||||
#### Special thanks to
|
||||
## Breaking Changes
|
||||
- Breaking change 1.
|
||||
- Breaking change 1.
|
||||
|
||||
* `fetch@get-version`:
|
||||
- X has changed
|
||||
|
||||
## Docs
|
||||
- Docs change 1.
|
||||
- Docs change 2.
|
||||
|
||||
## Core dependencies
|
||||
Core dependency change 1.
|
||||
Core dependency change 2.
|
||||
|
||||
## Dependencies
|
||||
Dependency change 1.
|
||||
Dependency change 2.
|
||||
|
||||
## Contributors
|
||||
- Contributor 1.
|
||||
- [@XXX](https://github.com/XXXX).
|
||||
|
||||
|
||||
For making this great framework even better!
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,8 @@ const main = async () => {
|
||||
|
||||
// already have the contribuitors thanks in the file
|
||||
if (
|
||||
file.includes('#### Special thanks to') ||
|
||||
file.includes('## Contributors') ||
|
||||
file.includes('#### Special thanks to') || // this must stay here for legacy reasons
|
||||
file.includes('[//]: # (Do not edit this file by hand.)')
|
||||
) return file;
|
||||
|
||||
@@ -86,7 +87,7 @@ const main = async () => {
|
||||
.map(name => `- [@${ name }](https://github.com/${ name }).`)
|
||||
.join('\n');
|
||||
|
||||
const doneFile = `${ file }\n\n#### Special thanks to\n\n${ contribuitorsList }\n\n`;
|
||||
const doneFile = `${ file }\n\n## Contributors\n\n${ contribuitorsList }\n\n`;
|
||||
|
||||
//SIDE EFFECTS
|
||||
// so that this is not ran every time, we will update the last file.
|
||||
|
||||
@@ -441,7 +441,7 @@ N/A
|
||||
|
||||
* `mongo@1.15.0`
|
||||
- New option `Meteor.settings.packages.mongo.reCreateIndexOnOptionMismatch` for case when an index with the same name, but different options exists it will be re-created.
|
||||
- If there is an error on index creation Meteor will output a better message naming the collection and index where the error occured. [PR](https://github.com/meteor/meteor/pull/11995).
|
||||
- If there is an error on index creation Meteor will output a better message naming the collection and index where the error occurred. [PR](https://github.com/meteor/meteor/pull/11995).
|
||||
* `modern-browsers@0.1.8`
|
||||
- New api `getMinimumBrowserVersions` to access the `minimumBrowserVersions`. [PR](https://github.com/meteor/meteor/pull/11998).
|
||||
* `socket-stream-client@0.5.0`
|
||||
@@ -656,7 +656,7 @@ Read our [Migration Guide](https://guide.meteor.com/2.6-migration.html) for this
|
||||
- useUnifiedTopology is not an option anymore, it defaults to true.
|
||||
- native parser is not an option anymore, it defaults to false in the mongo connection.
|
||||
- poolSize not an option anymore, we are using max/minPoolSize for the same behavior on mongo connection.
|
||||
- fields option is deprecated, we are maintaining a translation layer to "projection" field (now prefered) until the next minor version, where we will start showing alerts.
|
||||
- fields option is deprecated, we are maintaining a translation layer to "projection" field (now preferred) until the next minor version, where we will start showing alerts.
|
||||
- _ensureIndex is now showing a deprecation message
|
||||
- we are maintaining a translation layer for the new oplog format, so if you read or rely on any behavior of it please read our oplog_v2_converter.js code
|
||||
- update/insert/remove behavior is maintained in the Meteor way, documented in our docs, but we are now using replaceOne/updateOne/updateMany internally. This is subject to changes in the API rewrite of MongoDB without Fibers AND if you are using rawCollection directly you have to review your methods otherwise you will see deprecation messages if you are still using the old mongodb style directly.
|
||||
|
||||
131
docs/generators/changelog/versions/2.14.md
Normal file
131
docs/generators/changelog/versions/2.14.md
Normal file
@@ -0,0 +1,131 @@
|
||||
## v2.14.0, 2023-10-XX
|
||||
|
||||
### Highlights
|
||||
|
||||
Hacktoberfest release! 🎉
|
||||
|
||||
* MongoDB driver has been updated to v4.17.0
|
||||
|
||||
* You can now set `DISABLE_SOCKJS_CORS=1` if you want to prevent SockJS from setting CORS headers. Do not set this option if you will have DDP clients from other origins connecting to the DDP server. [PR #12789]
|
||||
|
||||
* Added guide on [how to prepare for Meteor 3.0 migration](https://guide.meteor.com/prepare-meteor-3.0).
|
||||
|
||||
* New DDP merge strategy `NO_MERGE_MULTI`, which is similar to `NO_MERGE`, but it does track whether a document is used by multiple publications. [PR #12742]
|
||||
|
||||
* Appcache has been further deprecated and moved to the deprecated packages folder.
|
||||
|
||||
* Added `Accounts.createUserAsync` into the client.
|
||||
|
||||
#### Migration Steps
|
||||
|
||||
TODO
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
N/A
|
||||
|
||||
## Docs
|
||||
|
||||
- Added guide on (how to prepare for Meteor 3.0 migration)[https://guide.meteor.com/prepare-meteor-3.0].
|
||||
- Added guide on (performance improvements)[https://guide.meteor.com/performance-improvement].
|
||||
|
||||
## Internal API changes
|
||||
|
||||
* Tool
|
||||
- Rename `EACCESS` to `EACCES` to follow the Windows spelling
|
||||
- Fixed links in skeletons
|
||||
- Fixed build issue in Vue skeleton
|
||||
- Updated `source-map-support`
|
||||
- Fixed bugs in negated “in” and “instanceof” expressions
|
||||
|
||||
## Meteor Version Release
|
||||
|
||||
* `accounts-base@get-version`
|
||||
- Ensure that `onLogin` callback fires properly
|
||||
- Indexes are now created asynchronously
|
||||
|
||||
* `accounts-oauth@get-version`
|
||||
- Indexes are now created asynchronously
|
||||
|
||||
* `accounts-password@get-version`
|
||||
- Add `Accounts.createUserAsync` to the client, a promise-based version of `Accounts.createUser`
|
||||
- Indexes are now created asynchronously
|
||||
|
||||
* `accounts-passwordless@get-version`
|
||||
- Fix #12401, ensure that user is found with ID
|
||||
- Indexes are now created asynchronously
|
||||
|
||||
* `crosswalk@get-version`
|
||||
- Updated `cordova-plugin-crosswalk-webview` to v2.4.0
|
||||
- Deprecated the package
|
||||
|
||||
* `ddp-server@get-version`:
|
||||
- Allow setting `DISABLE_SOCKJS_CORS` to prevent SockJS from setting CORS headers
|
||||
- Added new publication strategy `NO_MERGE_MULTI`
|
||||
|
||||
* `facebook-oauth@get-version`:
|
||||
- Updated default version of Facebook GraphAPI to v17
|
||||
|
||||
* `fetch@get-version`:
|
||||
- Update `node-fetch` to version 1.6.12
|
||||
- Update `whatwg-fetch` to version 3.6.17
|
||||
|
||||
* `logging@get-version`:
|
||||
- Added TS types
|
||||
|
||||
* `meteor@get-version`:
|
||||
- Improve TS types
|
||||
|
||||
* `modern-browsers@get-version`
|
||||
- Added `appleMail` user agent to allow modern bundle on iPads
|
||||
|
||||
* `mongo@get-version`
|
||||
- Added deprecation messages into type definitions
|
||||
- Fix ObjectIDs handling in oplogV2V1Converter
|
||||
|
||||
* `npm-mongo@get-version`:
|
||||
- Bumped MongoDB driver to version 4.17
|
||||
|
||||
* `oauth@get-version`
|
||||
- Indexes are now created asynchronously
|
||||
|
||||
* `react-fast-refresh@get-version`:
|
||||
- Updated `semver` to version 7.5.4
|
||||
|
||||
* `service-configuration@get-version`
|
||||
- Indexes are now created asynchronously
|
||||
- Add types for ConfigError
|
||||
|
||||
|
||||
## Independent releases
|
||||
|
||||
* `google-oauth@1.4.4`:
|
||||
- Remove logging request/response in google_server
|
||||
|
||||
* NPM `@meteorjs/babel-preset-meteor@7.10.1`
|
||||
- Add Facebook in-app browser
|
||||
|
||||
* NPM `cordova-plugin-meteor-webapp@2.0.2`
|
||||
- Fixed Android hot code push failing
|
||||
|
||||
## Contributors
|
||||
|
||||
- [@StorytellerCZ](https://github.com/sponsors/StorytellerCZ)
|
||||
- [@Grubba27](https://github.com/sponsors/Grubba27)
|
||||
- [@vit0rr](https://github.com/vit0rr)
|
||||
- [@realyze](https://github.com/realyze)
|
||||
- [@jamauro](https://github.com/jamauro)
|
||||
- [@Torgen](https://github.com/Torgen)
|
||||
- [@brucejo75](https://github.com/brucejo75)
|
||||
- [@zodern](https://github.com/sponsors/zodern)
|
||||
- [@alisnic](https://github.com/alisnic)
|
||||
- [@ebroder](https://github.com/ebroder)
|
||||
- [@BANSAL-NISHU](https://github.com/BANSAL-NISHU)
|
||||
- [@salmanhasni](https://github.com/salmanhasni)
|
||||
- [@jdgjsag67251](https://github.com/jdgjsag67251)
|
||||
- [@guncebektas](https://github.com/guncebektas)
|
||||
- [@harryadel](https://github.com/harryadel)
|
||||
- [@dd137](https://github.com/dd137)
|
||||
|
||||
For making this great framework even better!
|
||||
|
||||
115
docs/history.md
115
docs/history.md
@@ -10,6 +10,109 @@
|
||||
|
||||
|
||||
|
||||
## v2.14.0, 2023-10-XX
|
||||
|
||||
### Highlights
|
||||
|
||||
Hacktoberfest release! 🎉
|
||||
|
||||
* MongoDB driver has been updated to v4.17.0
|
||||
|
||||
* You can now set `DISABLE_SOCKJS_CORS=1` if you want to prevent SockJS from setting CORS headers. Do not set this option if you will have DDP clients from other origins connecting to the DDP server. [PR](https://github.com/meteor/meteor/pull/12789)
|
||||
|
||||
* Added guide on (how to prepare for Meteor 3.0 migration)[https://guide.meteor.com/prepare-meteor-3.0].
|
||||
|
||||
* New DDP merge strategy `NO_MERGE_MULTI`, which is similar to `NO_MERGE`, but it does track whether a document is used by multiple publications. [PR](https://github.com/meteor/meteor/pull/12742)
|
||||
|
||||
* Appcache has been further deprecated and moved to the deprecated packages folder.
|
||||
|
||||
* Added `Accounts.createUserAsync` into the client.
|
||||
|
||||
#### Migration Steps
|
||||
|
||||
TODO
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
N/A
|
||||
|
||||
## Docs
|
||||
|
||||
- Added guide on (how to prepare for Meteor 3.0 migration)[https://guide.meteor.com/prepare-meteor-3.0].
|
||||
- Added guide on (performance improvements)[https://guide.meteor.com/performance-improvement].
|
||||
|
||||
## Internal API changes
|
||||
|
||||
* Tool
|
||||
- Rename `EACCESS` to `EACCES` to follow the Windows spelling
|
||||
- Fixed links in skeletons
|
||||
- Fixed build issue in Vue skeleton
|
||||
- Updated `source-map-support`
|
||||
- Fixed bugs in negated “in” and “instanceof” expressions
|
||||
|
||||
## Meteor Version Release
|
||||
|
||||
* `accounts-base@2.2.8`
|
||||
- Ensure that `onLogin` callback fires properly
|
||||
|
||||
* `accounts-password@2.4.0`
|
||||
- Add `Accounts.createUserAsync` to the client, a promise-based version of `Accounts.createUser`
|
||||
|
||||
* `accounts-passwordless@2.1.3`
|
||||
- Fix #12401, ensure that user is found with ID
|
||||
|
||||
* `ddp-server@2.6.2`:
|
||||
- Allow setting `DISABLE_SOCKJS_CORS` to prevent SockJS from setting CORS headers
|
||||
- Added new publication strategy `NO_MERGE_MULTI`
|
||||
|
||||
* `facebook-oauth@1.11.3`:
|
||||
- Updated default version of Facebook GraphAPI to v17
|
||||
|
||||
* `fetch@0.1.4`:
|
||||
- Update `node-fetch` to version 1.6.12
|
||||
- Update `whatwg-fetch` to version 3.6.17
|
||||
|
||||
* `logging@1.3.2`:
|
||||
- Added TS types
|
||||
|
||||
* `meteor@1.11.3`:
|
||||
- Improve TS types
|
||||
|
||||
* `npm-mongo@4.17.0`:
|
||||
- Bumped MongoDB driver to version 4.17
|
||||
|
||||
* `react-fast-refresh@0.2.7`:
|
||||
- Updated `semver` to version 7.5.4
|
||||
|
||||
|
||||
## Independent releases
|
||||
|
||||
* `google-oauth@1.4.4`:
|
||||
- Remove logging request/response in google_server
|
||||
|
||||
* NPM `@meteorjs/babel-preset-meteor@7.10.1`
|
||||
- Add Facebook in-app browser
|
||||
|
||||
* NPM `cordova-plugin-meteor-webapp@2.0.2`
|
||||
- Fixed Android hot code push failing
|
||||
|
||||
## Contributors
|
||||
|
||||
- [@StorytellerCZ](https://github.com/sponsors/StorytellerCZ)
|
||||
- [@Grubba27](https://github.com/sponsors/Grubba27)
|
||||
- [@vit0rr](https://github.com/vit0rr)
|
||||
- [@realyze](https://github.com/realyze)
|
||||
- [@jamauro](https://github.com/jamauro)
|
||||
- [@Torgen](https://github.com/Torgen)
|
||||
- [@brucejo75](https://github.com/brucejo75)
|
||||
- [@zodern](https://github.com/sponsors/zodern)
|
||||
- [@alisnic](https://github.com/alisnic)
|
||||
- [@ebroder](https://github.com/ebroder)
|
||||
- [@BANSAL-NISHU](https://github.com/BANSAL-NISHU)
|
||||
- [@salmanhasni](https://github.com/salmanhasni)
|
||||
|
||||
For making this great framework even better!
|
||||
|
||||
## v2.13.3, 2023-09-08
|
||||
|
||||
### Highlights
|
||||
@@ -199,7 +302,7 @@ N/A
|
||||
|
||||
#### Migration Steps
|
||||
|
||||
Now if you want to check where do you call old-style api methods
|
||||
Now if you want to check where do you call old-style api methods
|
||||
you can use ```WARN_WHEN_USING_OLD_API``` before starting your meteor process.
|
||||
|
||||
|
||||
@@ -208,7 +311,7 @@ you can use ```WARN_WHEN_USING_OLD_API``` before starting your meteor process.
|
||||
* `accounts-base@2.2.8`:
|
||||
- Added `loginServiceConfiguration` type.
|
||||
- Added the `collection` option property, in order to be able to set the collection for Accounts,
|
||||
more can be seen in the [discussion](https://github.com/meteor/meteor/discussions/12544#discussioncomment-5240763)
|
||||
more can be seen in the [discussion](https://github.com/meteor/meteor/discussions/12544#discussioncomment-5240763)
|
||||
and in the [related issue](https://github.com/meteor/meteor-feature-requests/issues/20).
|
||||
- `onCreateUserHook` now accept promises and wait if necessary.
|
||||
|
||||
@@ -220,7 +323,7 @@ you can use ```WARN_WHEN_USING_OLD_API``` before starting your meteor process.
|
||||
|
||||
* `browser-policy-framing@1.1.2`:
|
||||
- Added `es5` compatible syntax.
|
||||
|
||||
|
||||
* `browser-policy@1.1.2`:
|
||||
- Updated test name.
|
||||
|
||||
@@ -270,7 +373,7 @@ you can use ```WARN_WHEN_USING_OLD_API``` before starting your meteor process.
|
||||
|
||||
* `mongo@1.16.6`:
|
||||
- Added `countDocuments` and `estimatedDocumentCount` types.
|
||||
- Added warning for when old style apis are being used, to use this feature,
|
||||
- Added warning for when old style apis are being used, to use this feature,
|
||||
use the variable`WARN_WHEN_USING_OLD_API=true` before starting the Meteor process.
|
||||
- Oplog driver updated to not throw error when MongoDB server and Meteor client mismatch. [issue](https://github.com/meteor/meteor/issues/12516)
|
||||
|
||||
@@ -981,7 +1084,7 @@ N/A
|
||||
|
||||
* `mongo@1.15.0`
|
||||
- New option `Meteor.settings.packages.mongo.reCreateIndexOnOptionMismatch` for case when an index with the same name, but different options exists it will be re-created.
|
||||
- If there is an error on index creation Meteor will output a better message naming the collection and index where the error occured. [PR](https://github.com/meteor/meteor/pull/11995).
|
||||
- If there is an error on index creation Meteor will output a better message naming the collection and index where the error occurred. [PR](https://github.com/meteor/meteor/pull/11995).
|
||||
* `modern-browsers@0.1.8`
|
||||
- New api `getMinimumBrowserVersions` to access the `minimumBrowserVersions`. [PR](https://github.com/meteor/meteor/pull/11998).
|
||||
* `socket-stream-client@0.5.0`
|
||||
@@ -1196,7 +1299,7 @@ Read our [Migration Guide](https://guide.meteor.com/2.6-migration.html) for this
|
||||
- useUnifiedTopology is not an option anymore, it defaults to true.
|
||||
- native parser is not an option anymore, it defaults to false in the mongo connection.
|
||||
- poolSize not an option anymore, we are using max/minPoolSize for the same behavior on mongo connection.
|
||||
- fields option is deprecated, we are maintaining a translation layer to "projection" field (now prefered) until the next minor version, where we will start showing alerts.
|
||||
- fields option is deprecated, we are maintaining a translation layer to "projection" field (now preferred) until the next minor version, where we will start showing alerts.
|
||||
- _ensureIndex is now showing a deprecation message
|
||||
- we are maintaining a translation layer for the new oplog format, so if you read or rely on any behavior of it please read our oplog_v2_converter.js code
|
||||
- update/insert/remove behavior is maintained in the Meteor way, documented in our docs, but we are now using replaceOne/updateOne/updateMany internally. This is subject to changes in the API rewrite of MongoDB without Fibers AND if you are using rawCollection directly you have to review your methods otherwise you will see deprecation messages if you are still using the old mongodb style directly.
|
||||
|
||||
@@ -8,7 +8,7 @@ Most users don't use `observeChanges` directly, but whenever you return a cursor
|
||||
|
||||
Previous versions of Meteor only had one strategy for implementing `observeChanges`: the "poll-and-diff" algorithm, implemented by the `PollingObserveDriver` class. This approach re-runs the query frequently and calculates the difference between each set of results. This code is simple and has historically contained very few bugs. But the cost of the `PollingObserveDriver` is proportional to the poll frequency and to the size of each query result, and the time from database change to callback invocation depends on whether the write originated in the same Meteor server process (very fast) or in another process (up to 10 seconds).
|
||||
|
||||
Starting with Meteor 0.7.0, Meteor can use an additional strategy to implemnt `observeChanges`: **oplog tailing**, implemented by the `OplogObserveDriver` class.
|
||||
Starting with Meteor 0.7.0, Meteor can use an additional strategy to implement `observeChanges`: **oplog tailing**, implemented by the `OplogObserveDriver` class.
|
||||
Meteor now knows how to read the MongoDB "operations log" --- a special collection that records all the write operations as they are applied to your database. This means changes to the database can be instantly noticed and reflected in Meteor, whether they originated from Meteor or from an external database client. Oplog tailing has different performance characteristics than "poll-and-diff" which are superior in many cases.
|
||||
|
||||
`OplogObserveDriver` needs to understand the meaning of MongoDB [selectors](http://docs.meteor.com/#selectors), [field specifiers](http://docs.meteor.com/#fieldspecifiers), [modifiers](http://docs.meteor.com/#modifiers), and [sort specifiers](http://docs.meteor.com/#sortspecifiers) at a much deeper level than `PollingObserveDriver`. This is because it actually needs to understand how write operations that it sees in the oplog interact with queries, instead of just relying on the MongoDB server to repeatedly execute the query. To deal with these structures, `OplogObserveDriver` uses Meteor's implementation of the MongoDB query engine, [Minimongo](https://github.com/meteor/meteor/tree/master/packages/minimongo), which Meteor also uses as its client-side local database cache.
|
||||
|
||||
@@ -297,7 +297,7 @@ The function will be called with a single argument, the info object:
|
||||
{% enddtdd %}
|
||||
|
||||
{% dtdd name:"options" type:"Exception" %}
|
||||
An optional arugment passed down from the oauth service that may contain
|
||||
An optional argument passed down from the oauth service that may contain
|
||||
additional user profile information. As the data in `options` comes from an
|
||||
external source, make sure you validate any values you read from it.
|
||||
{% enddtdd %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Check
|
||||
desription: Documentation on how to use check, Meteor's type checking library.
|
||||
description: Documentation on how to use check, Meteor's type checking library.
|
||||
---
|
||||
|
||||
The `check` package includes pattern checking functions useful for checking the types and structure
|
||||
|
||||
@@ -27,6 +27,10 @@ include a turn-key user interface for password-based sign-in.
|
||||
|
||||
{% apibox "Accounts.createUser" %}
|
||||
|
||||
Or a promise based version of `Accounts.createUser`:
|
||||
|
||||
{% apibox "Accounts.createUserAsync" %}
|
||||
|
||||
On the client, this function logs in as the newly created user on
|
||||
successful completion. On the server, it returns the newly created user
|
||||
id.
|
||||
@@ -60,7 +64,7 @@ email with a link the user can use to verify their email address.
|
||||
{% apibox "Accounts.verifyEmail" %}
|
||||
|
||||
If the user trying to verify the email has 2FA enabled, this error will be thrown:
|
||||
* "Email verified, but user not logged in because 2FA is enabled [2fa-enabled]": No longer signing in the user automatically if the user has 2FA enabled.
|
||||
* "Email verified, but user not logged in because 2FA is enabled [2fa-enabled]": No longer signing in the user automatically if the user has 2FA enabled.
|
||||
|
||||
|
||||
This function accepts tokens passed into the callback registered with
|
||||
|
||||
@@ -268,7 +268,7 @@ stay subscribed to your private messages.
|
||||
> The following features are available from Meteor 2.4 or `ddp-server@2.5.0`
|
||||
|
||||
Once you start scaling your application you might want to have more control on how the data from publications is being handled on the client.
|
||||
There are three publications strategies:
|
||||
There are four publications strategies:
|
||||
|
||||
#### SERVER_MERGE
|
||||
`SERVER_MERGE` is the default strategy. When using this strategy, the server maintains a copy of all data a connection is subscribed to.
|
||||
@@ -291,12 +291,17 @@ Specifically:
|
||||
* When we receive a change message for a document that is not in the client's collection, it will be added.
|
||||
* When we receive a removed message for a document that is not in the client's collection, nothing will happen.
|
||||
|
||||
#### NO_MERGE_MULTI
|
||||
`NO_MERGE_MULTI` is similar to `NO_MERGE`, but it does track whether a document is used by multiple publications.
|
||||
This has some memory overhead, but it still does not do diffing so it's faster and slimmer than
|
||||
`SERVER_MERGE`.
|
||||
|
||||
You can import the publication strategies from `DDPServer`.
|
||||
|
||||
```js
|
||||
import { DDPServer } from 'meteor/ddp-server'
|
||||
|
||||
const { SERVER_MERGE, NO_MERGE_NO_HISTORY, NO_MERGE } = DDPServer.publicationStrategies
|
||||
const { SERVER_MERGE, NO_MERGE_NO_HISTORY, NO_MERGE, NO_MERGE_MULTI } = DDPServer.publicationStrategies
|
||||
```
|
||||
|
||||
You can use the following methods to set or get the publication strategy for publications:
|
||||
|
||||
@@ -15,7 +15,7 @@ See also: [`PORT`](#PORT).
|
||||
> In development, this can be accomplished with `meteor run --port a.b.c.d:port`.
|
||||
|
||||
## DDP_DEFAULT_CONNECTION_URL
|
||||
(_develoment, production_)
|
||||
(_development, production_)
|
||||
|
||||
There are some situations where it is valuable for the meteor client to use a different DDP server than the `ROOT_URL` server.
|
||||
|
||||
@@ -33,6 +33,11 @@ In the event that your own deployment platform does not support WebSockets, or y
|
||||
|
||||
Set `DISABLE_SOCKJS=1` if you want to use the native WebSocket implementation instead of SockJS on the client side, for example, if you want to use a custom WebSocket implementation (e.g. [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js/)) on the server side.
|
||||
|
||||
## DISABLE_SOCKJS_CORS
|
||||
(_development, production_)
|
||||
|
||||
Set `DISABLE_SOCKJS_CORS=1` if you want to prevent SockJS from setting CORS headers. Do not set this option if you will have DDP clients from other origins connecting to the DDP server.
|
||||
|
||||
## HTTP_FORWARDED_COUNT
|
||||
(_production_)
|
||||
|
||||
@@ -72,7 +77,7 @@ When running your bundled application in production mode, pass a string of JSON
|
||||
## METEOR_SQLITE_JOURNAL_MODE
|
||||
(_development_)
|
||||
|
||||
The Meteor package catalog uses the `WAL` [SQLite Journal Mode](https://www.sqlite.org/pragma.html#pragma_journal_mode) by default. The Journal mode for the package catalog can be modifed by setting `METEOR_SQLITE_JOURNAL_MODE`.
|
||||
The Meteor package catalog uses the `WAL` [SQLite Journal Mode](https://www.sqlite.org/pragma.html#pragma_journal_mode) by default. The Journal mode for the package catalog can be modified by setting `METEOR_SQLITE_JOURNAL_MODE`.
|
||||
|
||||
When running multiple concurrent meteor servers on [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/) some meteor developers have seen issues with the package catalog. Setting the environment variable `METEOR_SQLITE_JOURNAL_MODE=TRUNCATE` can overcome the issue.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: fetch
|
||||
description: Isomorphic modern/legacy/Node polyfill for WHATWG fetch().
|
||||
---
|
||||
|
||||
This package replaces the `http` package for HTTP calls. `fetch` package provides polyfill for the [WHATWG fetch specification](https://fetch.spec.whatwg.org/) for legacy browsers or defaults to the global class which is available in modern browsers and Node. It is recomended that you use this package for compatibility with non-modern browsers.
|
||||
This package replaces the `http` package for HTTP calls. `fetch` package provides polyfill for the [WHATWG fetch specification](https://fetch.spec.whatwg.org/) for legacy browsers or defaults to the global class which is available in modern browsers and Node. It is recommended that you use this package for compatibility with non-modern browsers.
|
||||
|
||||
For more information we recommend [reading the MDN articles](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) about it as this article covers only basic usage in Meteor.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: logging
|
||||
description: Documentation of Meteor's logging utility
|
||||
---
|
||||
|
||||
The `logging` package provides a standartised way for you to log and display in console various message from your application.
|
||||
The `logging` package provides a standardised way for you to log and display in console various message from your application.
|
||||
The added benefit is that among other data it will show you the location where the log was fired,
|
||||
this is useful during debugging to quickly locate where the message is coming from.
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ import { exportedPackageMethod } from "meteor/<package name>";
|
||||
```
|
||||
|
||||
> Note: Packages with `lazy` main modules cannot use `api.export` to export global
|
||||
symbols to other packages/apps. Also, prior to Meteor 1.4.4.2 it is neccessary to explicitly name the file containing the module: `import "meteor/<package name>/client.js"`.
|
||||
symbols to other packages/apps. Also, prior to Meteor 1.4.4.2 it is necessary to explicitly name the file containing the module: `import "meteor/<package name>/client.js"`.
|
||||
|
||||
|
||||
## Local `node_modules`
|
||||
|
||||
@@ -3,7 +3,7 @@ title: url
|
||||
description: Isomorphic modern/legacy/Node polyfill for WHATWG URL/URLSearchParams.
|
||||
---
|
||||
|
||||
`url` package provides polyfill for the [WHATWG url specification](https://url.spec.whatwg.org/) for legacy browsers or defaults to the global class which is available in modern browsers and Node. It is recomended that you use this package for compatibility with non-modern browsers.
|
||||
`url` package provides polyfill for the [WHATWG url specification](https://url.spec.whatwg.org/) for legacy browsers or defaults to the global class which is available in modern browsers and Node. It is recommended that you use this package for compatibility with non-modern browsers.
|
||||
|
||||
For more information we recommend [reading the MDN articles](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) about it and looking over the [Node API documentation](https://nodejs.org/api/url.html#url_the_whatwg_url_api) for more details as this article covers only basic usage in Meteor.
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Unexpected mongo exit code 3221225781. Restarting.
|
||||
Can't start Mongo server.
|
||||
```
|
||||
|
||||
You [probably](https://github.com/meteor/meteor/issues/10036#issuecomment-416485306) need to install `Visual C++ Redistributable for Visual Studio`, depending on your Windows and Meteor embbeded version of MongoDB the version of Visual Studio could be different. You can check the version that we are using in our Windows test environment [here](https://github.com/meteor/meteor/blob/devel/appveyor.yml#L10)
|
||||
You [probably](https://github.com/meteor/meteor/issues/10036#issuecomment-416485306) need to install `Visual C++ Redistributable for Visual Studio`, depending on your Windows and Meteor embedded version of MongoDB the version of Visual Studio could be different. You can check the version that we are using in our Windows test environment [here](https://github.com/meteor/meteor/blob/devel/appveyor.yml#L10)
|
||||
|
||||
Starting from MongoDB 4.4.4 we started to use Visual Studio 2019.
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ sidebar_categories:
|
||||
- code-style
|
||||
- structure
|
||||
- 2.13-migration
|
||||
- prepare-meteor-3.0
|
||||
Data:
|
||||
- collections
|
||||
- data-loading
|
||||
@@ -73,6 +74,7 @@ sidebar_categories:
|
||||
Production:
|
||||
- security
|
||||
- deployment
|
||||
- performance-improvement
|
||||
- using-node-v14.21.4
|
||||
Meta:
|
||||
- CONTRIBUTING
|
||||
|
||||
38
guide/package-lock.json
generated
38
guide/package-lock.json
generated
@@ -1830,13 +1830,13 @@
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||
"integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==",
|
||||
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||
"dev": true
|
||||
},
|
||||
"anymatch": {
|
||||
@@ -1905,7 +1905,7 @@
|
||||
"babel-code-frame": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||
"integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==",
|
||||
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^1.1.3",
|
||||
@@ -1916,7 +1916,7 @@
|
||||
"babel-messages": {
|
||||
"version": "6.23.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
|
||||
"integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==",
|
||||
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.22.0"
|
||||
@@ -1925,7 +1925,7 @@
|
||||
"babel-plugin-syntax-decorators": {
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz",
|
||||
"integrity": "sha512-AWj19x2aDm8qFQ5O2JcD6pwJDW1YdcnO+1b81t7gxrGjz5VHiUqeYWAR4h7zueWMalRelrQDXprv2FrY1dbpbw==",
|
||||
"integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=",
|
||||
"dev": true
|
||||
},
|
||||
"babel-plugin-transform-decorators-legacy": {
|
||||
@@ -1942,7 +1942,7 @@
|
||||
"babel-polyfill": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
|
||||
"integrity": "sha512-F2rZGQnAdaHWQ8YAoeRbukc7HS9QgdgeyJ0rQDd485v9opwuPvjpPFcOOT/WmkKTdgy9ESgSPXDcTNpzrGr6iQ==",
|
||||
"integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.26.0",
|
||||
@@ -1953,7 +1953,7 @@
|
||||
"regenerator-runtime": {
|
||||
"version": "0.10.5",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz",
|
||||
"integrity": "sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w==",
|
||||
"integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
@@ -1961,7 +1961,7 @@
|
||||
"babel-runtime": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
|
||||
"integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
|
||||
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"core-js": "^2.4.0",
|
||||
@@ -1971,7 +1971,7 @@
|
||||
"babel-template": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
|
||||
"integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==",
|
||||
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.26.0",
|
||||
@@ -1984,7 +1984,7 @@
|
||||
"babel-traverse": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
|
||||
"integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==",
|
||||
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.26.0",
|
||||
@@ -2001,7 +2001,7 @@
|
||||
"babel-types": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
|
||||
"integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==",
|
||||
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-runtime": "^6.26.0",
|
||||
@@ -2113,7 +2113,7 @@
|
||||
"chalk": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||
"integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==",
|
||||
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^2.2.1",
|
||||
@@ -2248,7 +2248,7 @@
|
||||
"core-decorators": {
|
||||
"version": "0.11.2",
|
||||
"resolved": "https://registry.npmjs.org/core-decorators/-/core-decorators-0.11.2.tgz",
|
||||
"integrity": "sha512-47n1NWwwc+qPmOMtY9zUKCM1cYfoxLvBRxKzirFrqhE61yqK+yZP/BOA3gjaBUVb9P46J1RyJjasrtqYoWCbvA==",
|
||||
"integrity": "sha1-GyQzFZQa598a8938tX3+6mPIsXE=",
|
||||
"dev": true
|
||||
},
|
||||
"core-js": {
|
||||
@@ -2547,7 +2547,7 @@
|
||||
"has-ansi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||
"integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==",
|
||||
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
@@ -2600,7 +2600,7 @@
|
||||
"hexo-inject": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hexo-inject/-/hexo-inject-1.0.0.tgz",
|
||||
"integrity": "sha512-Ly0k7FO3G5+XNvFNE7yjSENSWy8QTnzl8cNFWYuMXRYMogbHd/Q0Ane8WCKYb5QD/A+WXC3rHb32wIGb0YAfVw==",
|
||||
"integrity": "sha1-pTVXVgUdWrJ5yCtzfacrEzx+Ju0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||
@@ -2740,7 +2740,7 @@
|
||||
"js-tokens": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
"integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==",
|
||||
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
|
||||
"dev": true
|
||||
},
|
||||
"kind-of": {
|
||||
@@ -3338,7 +3338,7 @@
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
@@ -3347,13 +3347,13 @@
|
||||
"supports-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||
"integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==",
|
||||
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
||||
"dev": true
|
||||
},
|
||||
"to-fast-properties": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
|
||||
"integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==",
|
||||
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
|
||||
"dev": true
|
||||
},
|
||||
"to-object-path": {
|
||||
|
||||
48
guide/source/2.14-migration.md
Normal file
48
guide/source/2.14-migration.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: Migrating to Meteor 2.14
|
||||
description: How to migrate your application to Meteor 2.14.
|
||||
---
|
||||
|
||||
Most of the new features in Meteor 2.14 are either applied directly behind the
|
||||
scenes (in a backwards compatible manner) or are opt-in. For a complete
|
||||
breakdown of the changes, please refer to the [changelog](http://docs.meteor.com/changelog.html).
|
||||
|
||||
|
||||
<h2 id="changes">Changes in Meteor 2.14</h2>
|
||||
|
||||
TODO
|
||||
|
||||
|
||||
<h2 id="older-versions">Migrating from a version older than 2.13?</h2>
|
||||
|
||||
If you're migrating from a version of Meteor older than Meteor 2.13, there may
|
||||
be important considerations not listed in this guide.
|
||||
Please review the older migration guides for details:
|
||||
|
||||
* [Migrating to Meteor 2.13](2.13-migration.html) (from 2.12)
|
||||
* [Migrating to Meteor 2.12](2.12-migration.html) (from 2.11)
|
||||
* [Migrating to Meteor 2.11](2.11-migration.html) (from 2.10)
|
||||
* [Migrating to Meteor 2.10](2.10-migration.html) (from 2.9)
|
||||
* [Migrating to Meteor 2.9](2.9-migration.html) (from 2.8)
|
||||
* [Migrating to Meteor 2.8](2.8-migration.html) (from 2.7)
|
||||
* [Migrating to Meteor 2.7](2.7-migration.html) (from 2.6)
|
||||
* [Migrating to Meteor 2.6](2.6-migration.html) (from 2.5)
|
||||
* [Migrating to Meteor 2.5](2.5-migration.html) (from 2.4)
|
||||
* [Migrating to Meteor 2.4](2.4-migration.html) (from 2.3)
|
||||
* [Migrating to Meteor 2.3](2.3-migration.html) (from 2.2)
|
||||
* [Migrating to Meteor 2.2](2.2-migration.html) (from 2.0)
|
||||
* [Migrating to Meteor 2.0](2.0-migration.html) (from 1.12)
|
||||
* [Migrating to Meteor 1.12](1.12-migration.html) (from 1.11)
|
||||
* [Migrating to Meteor 1.11](1.11-migration.html) (from 1.10.2)
|
||||
* [Migrating to Meteor 1.10.2](1.10.2-migration.html) (from 1.10)
|
||||
* [Migrating to Meteor 1.10](1.10-migration.html) (from 1.9.3)
|
||||
* [Migrating to Meteor 1.9.3](1.9.3-migration.html) (from 1.9)
|
||||
* [Migrating to Meteor 1.9](1.9-migration.html) (from 1.8.3)
|
||||
* [Migrating to Meteor 1.8.3](1.8.3-migration.html) (from 1.8.2)
|
||||
* [Migrating to Meteor 1.8.2](1.8.2-migration.html) (from 1.8)
|
||||
* [Migrating to Meteor 1.8](1.8-migration.html) (from 1.7)
|
||||
* [Migrating to Meteor 1.7](1.7-migration.html) (from 1.6)
|
||||
* [Migrating to Meteor 1.6](1.6-migration.html) (from 1.5)
|
||||
* [Migrating to Meteor 1.5](1.5-migration.html) (from 1.4)
|
||||
* [Migrating to Meteor 1.4](1.4-migration.html) (from 1.3)
|
||||
* [Migrating to Meteor 1.3](1.3-migration.html) (from 1.2)
|
||||
241
guide/source/performance-improvement.md
Normal file
241
guide/source/performance-improvement.md
Normal file
@@ -0,0 +1,241 @@
|
||||
---
|
||||
title: Performance improvements
|
||||
description: How to optimize your Meteor application for higher performance when you start growing.
|
||||
---
|
||||
|
||||
This guide focuses on providing you tips and common practices on how to improve performance of your Meteor app (sometimes also called scaling).
|
||||
It is important to note that at the end of the day Meteor is a Node.js app tied closely to MongoDB,
|
||||
so a lot of the problems you are going to encounter are common to other Node.js and MongoDB apps.
|
||||
Also do note that every app is different so there are unique challenges to each, therefore
|
||||
practices describe in this guide should be used as a guiding posts rather than absolutes.
|
||||
|
||||
This guide has been heavily inspired by [Marcin Szuster's Vazco article](https://www.vazco.eu/blog/how-to-optimize-and-scale-meteor-projects), the official [Meteor Galaxy guide](https://galaxy-guide.meteor.com/),
|
||||
and talk by Paulo Mogollón's talk at Impact 2022 titled ["First steps on scaling Meteor realtime data"](https://www.youtube.com/watch?v=aOqhExZn_5A).
|
||||
|
||||
<h2 id="performance-monitoring">Performance monitoring</h2>
|
||||
|
||||
Before any optimization can take place we need to know what is our problem. This is where APM (Application Performance Monitor) comes in.
|
||||
If you are hosting on Galaxy then this is automatically included in the [Professional plan](https://www.meteor.com/cloud/pricing)
|
||||
and you can learn more about in its [own dedicated guide article](https://cloud-guide.meteor.com/apm-getting-started.html).
|
||||
For those hosting outside of Galaxy the most popular solution is to go with [Monti APM](https://montiapm.com/) which shares
|
||||
all the main functionality with Galaxy APM. You can also choose other APM for Node.js, but they will not show you Meteor
|
||||
specific data that Galaxy APM and Monti APM specialize in. For this guide we will focus on showing how to work with Galaxy APM,
|
||||
which is the same as with Monti APM, for simplicity.
|
||||
|
||||
Once you setup either of those APMs you will need to add a package to your Meteor app to start sending them data.
|
||||
|
||||
For working with Galaxy APM and optimizing your app through the data there, don't forget to visit the [Meteor APM guide](https://galaxy-guide.meteor.com/apm-getting-started.html).
|
||||
|
||||
#### Galaxy APM [package](https://atmospherejs.com/mdg/meteor-apm-agent)
|
||||
```sh
|
||||
meteor add mdg:meteor-apm-agent
|
||||
```
|
||||
|
||||
#### Monti APM [package](https://atmospherejs.com/montiapm/agent)
|
||||
```sh
|
||||
meteor add montiapm:agent
|
||||
```
|
||||
|
||||
<h3 id="find-issues-apm">Finding issues in APM</h3>
|
||||
APM will start with providing you with an overview of how your app is performing. You can then dive deep into details of
|
||||
publications, methods, errors happening (both on client and server) and more. You will spend a lot of time in the detailed
|
||||
tabs looking for methods and publications to improve and analyzing the impact of your actions. The process, for example for
|
||||
optimizing methods, will look like this:
|
||||
|
||||
1. Go to the detailed view under the Methods tab.
|
||||
2. Sort the Methods Breakdown by Response Time.
|
||||
3. Click on a method name in the Methods Breakdown. Assess the impact if you improve the selected method.
|
||||
4. Look at the response time graph and find a trace.
|
||||
5. Improve your method if you feel it is the right moment to do so.
|
||||
|
||||
Not every long-performing method has to be improved. Take a look at the following example:
|
||||
* methodX - mean response time 1 515 ms, throughput 100,05/min
|
||||
* methodY - mean response time 34 000 ms, throughput 0,03/min
|
||||
|
||||
At first glance, the 34 seconds response time can catch your attention, and it may seem that the methodY
|
||||
is more relevant to improvement. But don’t ignore the fact that this method is being used only once in
|
||||
a few hours by the system administrators or scheduled cron action.
|
||||
|
||||
And now, let’s take a look at the methodX. Its response time is evidently lower BUT compared to the frequency
|
||||
of use, it is still high, and without any doubt should be optimized first.
|
||||
|
||||
It’s also absolutely vital to remember that you shouldn't optimize everything as it goes.
|
||||
The key is to think strategically and match the most critical issues with your product priorities.
|
||||
|
||||
For more information about all the things you can find in Galaxy APM take a look at the Meteor APM section in [Galaxy Guide](https://galaxy-guide.meteor.com/apm-getting-started.html).
|
||||
|
||||
<h2 id="publications">Publications</h2>
|
||||
Publications allow for the most prominent aspect of Meteor, live data.
|
||||
At the same this is the most resource intensive part of a Meteor application.
|
||||
|
||||
Under the hood WebSockets are being used with additional abilities provided by DDP.
|
||||
|
||||
<h3 id="publications-proper-use">Proper use of publications</h3>
|
||||
Since publications can get resource intensive they should be reserved for usage that requires up to date, live data or
|
||||
that are changing frequently and you need the users to see that.
|
||||
You will need to evaluate your app to figure out which situations these are. As a rule of thumb any data that are not
|
||||
required to be live or are not changing frequently can be fetched once via other means and re-fetched as needed,
|
||||
in most cases the re-fetching shouldn't be necessary.
|
||||
|
||||
But even before you proceed any further there are a few improvements that you can make here.
|
||||
First make sure that you only get the fields you need, limit the number of documents you send to the client to what you need
|
||||
(aka always set the `limit` option) and ensure that you have set all your indexes.
|
||||
|
||||
<h4 id="publications-methods">Methods over publications</h3>
|
||||
The first easiest replacement is to use Meteor methods instead of publications. In this case you can use the existing publication
|
||||
and instead of returning a cursor you will call `.fetchAsync()` and return the actual data. The same performance improvements
|
||||
to get the method work faster apply here, but once called it sends the data and you don't have the overhead of a publication.
|
||||
|
||||
What is crucial here is to ensure that your choice of a front-end framework doesn't call the method every time, but only once
|
||||
to load the data or when specifically needed (for example when the data gets updated due to user action or when the user requests it).
|
||||
|
||||
<h4 id="publications-replacements">Publication replacements</h4>
|
||||
Using methods has its limitations and there are other tools that you might want to evaluate as a potential replacement.
|
||||
|
||||
[Grapher](https://github.com/cult-of-coders/grapher) is a favorite answer and allows you to easily blend with another
|
||||
replacement which is [GraphQL](https://graphql.org/) and in particular [Apollo GraphQL](https://www.apollographql.com/),
|
||||
which also has an integration [package](https://atmospherejs.com/meteor/apollo) with Meteor. Finally, you can also go back to using REST as well.
|
||||
|
||||
Do note, that you can mix all of these based on your needs.
|
||||
|
||||
<h3 id="low-observer-reuse">Low observer reuse</h3>
|
||||
Observers are among the key components of Meteor. They take care of observing documents on MongoDB and they notify changes.
|
||||
Creating them is an expensive operations, so you want to make sure that Meteor reuses them as much as possible.
|
||||
|
||||
> [Learn more about observers](https://galaxy-guide.meteor.com/apm-know-your-observers.html)
|
||||
|
||||
The key for observer reuse is to make sure that the queries requested are identical. This means that user given values
|
||||
should be standardised and so should any dynamic input like time. Publications for users should check if user is signed in
|
||||
first before returning publication and if user is not signed in, then it should instead call `this.ready();`.
|
||||
|
||||
> [Learn more on improving observer reuse](https://galaxy-guide.meteor.com/apm-improve-cpu-and-network-usage)
|
||||
|
||||
<h3 id="redis-oplog">Redis Oplog</h3>
|
||||
|
||||
[Redis Oplog](https://atmospherejs.com/cultofcoders/redis-oplog) is a popular solution to Meteor's Oplog tailing
|
||||
(which ensures the reactivity, but has some severe limitations that especially impact performance). Redis Oplog as name
|
||||
suggests uses [redis](https://redis.io/) to track changes to data that you only need and cache them. This reduces load on
|
||||
the server and database, allows you to track only the data that you want and only publish the changes you need.
|
||||
|
||||
<h2 id="methods">Methods</h2>
|
||||
|
||||
While methods are listed as one of the possible replacements for publications, they themselves can be made more performant,
|
||||
after all it really depends on what you put inside them and APM will provide you with the necessary insight on which
|
||||
methods are the problem.
|
||||
|
||||
<h3 id="heavy-actions">Heavy actions</h3>
|
||||
|
||||
In general heavy tasks that take a lot of resources or take long and block the server for that time should be taken out
|
||||
and instead be run in its own server that focuses just on running those heavy tasks. This can be another Meteor server
|
||||
or even better something specifically optimized for that given task.
|
||||
|
||||
<h3 id="reoccurring-jobs">Reoccurring jobs</h3>
|
||||
|
||||
Reoccurring jobs are another prime candidate to be taken out into its own application. What this means is that you will have
|
||||
an independent server that is going to be tasked with running the reoccurring jobs and the main application will only add to
|
||||
the list and be recipient of the results, most likely via database results.
|
||||
|
||||
<h3 id="rate-limiting">Rate limiting</h3>
|
||||
|
||||
Rate limit your methods to reduce effectiveness of DDOS attack and spare your server. This is also a good practice to
|
||||
ensure that you don't accidentally DDOS your self. For example a user who clicks multiple time on a button that triggers
|
||||
an expensive function. In this example you should also in general ensure that any button that triggers a server event
|
||||
should be disabled until there is a response from the server that the event has finished.
|
||||
|
||||
You can and should rate limit both methods and collections.
|
||||
|
||||
> [Learn more about rate limiting](https://docs.meteor.com/api/methods.html#ddpratelimiter)
|
||||
|
||||
<h2 id="mongodb">MongoDB</h2>
|
||||
|
||||
The following section offers some guidance on optimizing performance of your Meteor application when it comes to the database.
|
||||
You can find these and more information in other places that deal with MongoDB performance optimization, like on the [official MongoDB website](https://www.mongodb.com/basics/best-practices).
|
||||
These are all applicable, and you should spend some time researching into them as well. The guide here offers some initial and most common patterns.
|
||||
|
||||
<h3 id="mongo-ip-whitelisting">IP whitelisting</h3>
|
||||
|
||||
If your MongoDB hosting provider allows it, you should make sure that you whitelist the IPs of your application servers.
|
||||
If you don't then your database servers are likely to come under attack from hackers trying to brute force their way in.
|
||||
Besides the security risk this also impacts performance as authentication is not a cheap operation and it will impact performance.
|
||||
|
||||
See [Galaxy guide](https://galaxy-guide.meteor.com/container-environment.html#network-outgoing) on IP whitelisting to get IPs for your Galaxy servers.
|
||||
|
||||
<h3 id="mongodb-indexes">Indexes</h3>
|
||||
|
||||
While single indexes on one field are helpful on simple query calls, you will most likely have more advance queries with
|
||||
multiple variables. To cover those you will need to create compound indexes. For example:
|
||||
|
||||
```javascript
|
||||
Statistics.createIndexAsync(
|
||||
{
|
||||
pageId: 1,
|
||||
language: 1,
|
||||
date: 1
|
||||
},
|
||||
{ unique: true }
|
||||
)
|
||||
```
|
||||
When creating indexes you should sort the variables in ESR (equity, sort, range) style.
|
||||
Meaning, first you put variables that will be equal to something specific. Second you put variables that sort things,
|
||||
and third variables that provide range for that query.
|
||||
Further you should order these variables in a way that the fields that filter the most should be first.
|
||||
|
||||
Make sure that all the indexes are used and remove unused indexes as leaving unused indexes will have negative impact
|
||||
on performance as the database will have to still keep track on all the indexed variables.
|
||||
|
||||
<h3 id="find-strategies">Find strategies</h3>
|
||||
|
||||
To optimize finds ensure that all queries have are indexed. Meaning that any `.find()` variables should be indexed as described above.
|
||||
|
||||
All your finds should have a limit on the return so that the database stops going through the data once it has reached
|
||||
the limit, and you only return the limited number of results instead of the whole database.
|
||||
|
||||
Beware of queries with `n + 1` issue. For example in a database that has cars and car owners. You don't want to get cars,
|
||||
and then call the database for each car owner, instead you want to use only two queries. One where you get the all the cars and
|
||||
second where you get all the owners and then match the data on the front-end.
|
||||
|
||||
Check all queries that run longer than 100ms as there might be issues.
|
||||
|
||||
Do not use RegEx for your queries as these queries have to go through all the data to do that match.
|
||||
|
||||
If you still have issues make sure that you read data from secondaries.
|
||||
|
||||
<h3 id="beware-of-collection-hooks">Beware of collection hooks</h3>
|
||||
|
||||
While collection hooks can help in many cases beware of them and make sure that you understand how they work as they might
|
||||
create additional queries that you might not know about. Make sure to review packages that use them so that they won't
|
||||
create additional queries.
|
||||
|
||||
<h3 id="mongodb-caching">Caching</h3>
|
||||
|
||||
Once your user base increases you want to invest into query caching like using Redis, Redis Oplog and other.
|
||||
For more complex queries or when you are retrieving data from multiple collections, then you want to use [aggregation](https://www.mongodb.com/docs/manual/aggregation/)
|
||||
and save their results.
|
||||
|
||||
<h2 id="scaling">Scaling</h2>
|
||||
|
||||
<h3 id="vertical-horizontal">Vertical and horizontal scaling</h3>
|
||||
There are mainly two different ways of scaling: the vertical and horizontal one.
|
||||
|
||||
* **Vertical scaling** boils down to adding more resources (CPU/RAM/disk) to your containers, while horizontal scaling refers to adding more machines or containers to your pool of resources.
|
||||
* **Horizontal scaling** for Meteor projects typically includes running multiple instances of your app on a single container with multiple cores, or running multiple instances on multiple containers.
|
||||
|
||||
<h3 id="autoscaling">Container autoscaling</h3>
|
||||
|
||||
It is important to be ready for a sudden spikes of traffic.
|
||||
While all the other measures mentioned here will help, but a certain point it becomes impossible to support more users on one container and additional containers need to be added to support these users.
|
||||
Today most hosting solutions offer scaling triggers that you can set to automatically scale up (and down) the number of containers for your app based on things like number of connection, CPU and RAM usage.
|
||||
Galaxy has these as well. Learn more about [setting triggers for scaling on Galaxy](https://galaxy-guide.meteor.com/triggers.html).
|
||||
|
||||
Setting this is vital, so that your application can keep on running when you have extra people come and then saves you money by scaling down when the containers are not in use.
|
||||
When initially setting these pay a close attention to the performance of your app. you need to learn when is the right time to scale your app so it has enough time to spin up new containers before the existing one get overwhelmed by traffic and so on.
|
||||
There are other points to pay attention to as well. For example if your app is used by corporation you might want to setup that on weekdays the minimum number of containers is going to increase just before the start of working hours and the then decrease the minimum to 1 for after hours and on weekends.
|
||||
|
||||
Usually when you are working on performance issues you will have higher numbers of containers as you optimize your app. It is therefore vital to revisit your scaling setting after each rounds of improvements to ensure that scaling triggers are properly optimized.
|
||||
|
||||
<h2 id="packages">Packages</h2>
|
||||
|
||||
During development, it is very tempting to add packages to solve issue or support some features.
|
||||
This should be done carefully and each package should be wetted carefully if it is a good fit for the application.
|
||||
Besides security and maintenance issues you also want to know which dependencies given package introduces and
|
||||
as a whole what will be the impact on performance.
|
||||
121
guide/source/prepare-meteor-3.0.md
Normal file
121
guide/source/prepare-meteor-3.0.md
Normal file
@@ -0,0 +1,121 @@
|
||||
---
|
||||
title: How to migrate to Meteor Async in Meteor 2.x
|
||||
description: How to migrate your application to async methods and be ready to 3.0.
|
||||
---
|
||||
|
||||
In the new Meteor 3.0, Meteor moves its methods/operations to asynchronous. In the past, version 2.x was using Fibers, our promise solution, which is no longer supported since Node 16, and to follow the community standards, we are moving to `async` and `await`.
|
||||
|
||||
Here are a couple of methods that are now async, and you need to refactor them. Instead of findOne, you need to use the suffix Async, findOneAsync, for example:
|
||||
|
||||
Mongo.Collection:
|
||||
- findOneAsync
|
||||
- insertAsync
|
||||
- removeAsync
|
||||
- updateAsync
|
||||
- upsertAsync
|
||||
|
||||
Collection.Cursor:
|
||||
- countAsync
|
||||
- fetchAsync
|
||||
- forEachAsync
|
||||
- mapAsync
|
||||
|
||||
accounts-base:
|
||||
- Meteor.userAsync()
|
||||
|
||||
callback-hook:forEachAsync
|
||||
- forEachAsync
|
||||
|
||||
ddp-server
|
||||
- Meteor.callAsync()
|
||||
|
||||
The complete list of updated methods is listed [here](https://github.com/meteor/meteor/blob/d5c3b2eeafd0ad78ee7e2553f3f269c5c2a2e2a9/docs/generators/changelog/versions/3.0.md#L5-L17).
|
||||
|
||||
If you want to understand better what was changed and the context of Fibers, read these complementary posts:
|
||||
- [2.8](https://grubba.medium.com/new-meteor-2-8-and-the-new-mongodb-async-ap-edbcb853869a?source=user_profile---------9----------------------------) _New Meteor 2.8 and the new MongoDB Async API_
|
||||
- [2.8.1](https://grubba.medium.com/new-meteor-2-8-1-and-adding-types-to-the-core-8a6ee56f0141?source=user_profile---------7----------------------------) _New MeteorJS 2.8.1 and adding types to the core_
|
||||
- [2.9](https://blog.meteor.com/new-meteorjs-2-9-and-the-new-scaffold-api-5fcc0f3b1ce5) _New MeteorJS 2.9 and the new Scaffold API_
|
||||
- [2.10](https://blog.meteor.com/new-meteor-js-2-10-and-the-async-tracker-feature-ffdbe817c801) _New Meteor.js 2.10 and the Async Tracker Feature_
|
||||
- [2.11](https://grubba.medium.com/new-meteor-2-11-and-the-new-embedded-mongodb-19767076961b?source=user_profile---------4----------------------------) _New Meteor 2.11 and the new embedded MongoDB_
|
||||
- [2.12](https://grubba.medium.com/new-meteor-js-2-12-and-the-blaze-2-6-2-release-b72c2a7a593f?source=user_profile---------1----------------------------) _New Meteor.js 2.12 and Blaze 2.6.2 Release_
|
||||
- [2.13](https://grubba.medium.com/new-meteor-js-2-13-node-js-14-21-4-security-patch-and-blaze-2-7-1-release-60134947e4c?source=user_profile---------0----------------------------) _New Meteor.js 2.13, Node.js 14.21.4 security patch and Blaze 2.7.1 release_
|
||||
|
||||
To help Meteor users update their apps to the new Meteor version, you can follow this guide with some insights on how to do it.
|
||||
|
||||
## Use at least Meteor version [2.8](https://blog.meteor.com/new-meteor-2-8-and-the-new-mongodb-async-ap-edbcb853869a)
|
||||
|
||||
We recommend starting the async migration by updating your application to 2.8 or newer, as you can do this progressively. Unlike 3.0, you can simultaneously maintain the same codebase with the new asynchronous and old synchronous behaviors. Ideally, you should update to the latest version of Meteor 2.x and carefully follow each changelog. After you refactor all your code to async in version 2.x, you can more easily update it to version 3.0 by following all the changes listed in its [changelog](https://github.com/meteor/meteor/blob/d5c3b2eeafd0ad78ee7e2553f3f269c5c2a2e2a9/docs/generators/changelog/versions/3.0.md).
|
||||
|
||||
To help with this update, we suggest you use a [codemod](https://www.sitepoint.com/getting-started-with-codemods/) to automate part of the refactoring process. Follow [this script](https://github.com/minhna/meteor-async-migration) created by [minhna](https://github.com/minhna). The project has documentation explaining how to run the script. This codemod should only affect the server side of your application. Starting the update from the front end or back end is a personal choice. While starting from the server side is a valid approach, it is essential to evaluate whether migrating features one by one might be a better strategy. This way, you can resolve errors incrementally and avoid the risk of encountering multiple client-side issues that could break the entire application.
|
||||
|
||||
A helpful feature of the script is that it will refactor some methods to async, such as findOne, count, and other methods from the accounts-base package, such as `Meteor.user()`, and also the function that calls these methods by adding an 'async' before them.
|
||||
|
||||
## Edge cases
|
||||
Depending on your codebase, the codemod may not work in some specific scenarios. We'll list some edge case examples, and if this is the case for your codebase, you'll need to make the changes manually or refactor the codemod.
|
||||
|
||||
### MongoDB methods updates
|
||||
A possible edge case is if you are defining your MongoDB collection using the `meteor/quave:collections` package, the codemod will check if it is a MongoDB collection by checking the form of the imports - this means that when the script reads the import coming from ` quave`, it will not consider this to be a MongoDB collection.
|
||||
|
||||
### Async functions
|
||||
Let's assume your codebase has the same or similar issue listed above. This may imply some problems in refactoring for async functions since the codemod does not correspond to any async method case. This can generate other side effects that imply issues with refactoring forEachAsync, mapAsync, and others.
|
||||
|
||||
### How do we identify those edge cases?
|
||||
To identify these edge cases, you can use the search feature in your IDE to find your methods and start refactoring by running your refactored codemod or updating the code manually. Since it now only affects the server side, after refactoring, you can run your application, observe the errors that will occur in your terminal, and fix them progressively.
|
||||
After refactoring the server side to async, your application will run without errors, and then you can move to the client side.
|
||||
|
||||
## Changes for Blaze projects (at least [2.7](https://www.blazejs.org/changelog#v2702023may23))
|
||||
In Blaze, every HTML file has a related JavaScript file. After refactoring the JavaScript file to async, you will get a Promise wrapping the value instead of the actual value. To present it on your front end, you must unwrap it. Let's see an example:
|
||||
|
||||
```javascript
|
||||
{{#let shouldFlag=isFlagged}}
|
||||
{{#if @pending 'shouldFlag' }}
|
||||
<span class="stat-loading"><span class="icon-loading"></span></span>
|
||||
{{/if}}
|
||||
{{#if @rejected 'shouldFlag' }}
|
||||
<span class="stat-err"><span class="icon-err"></span></span>
|
||||
{{/if}}
|
||||
{{#if @resolved 'shouldFlag' }}
|
||||
<span class="stat-flag"><span class="icon-flag"></span></span>
|
||||
{{/if}}
|
||||
{{/let}}
|
||||
```
|
||||
|
||||
If you don't unwrap the value, you will get an unresolved promise on the front end. You can use Blaze [Async States](https://www.blazejs.org/api/spacebars#Async-states), which uses the Spacebars Meteor package to handle the promise state. With it, you can handle different states and return appropriate content.
|
||||
|
||||
## Changes for React projects
|
||||
We recommend installing the package `react-meteor-data`, which contains hooks for these new asynchronous methods. If you use `useFind` on the server side, with SSR, for example, you will need to use the new suspense/useFind hook. We recommend reading the [New Suspense Hooks for Meteor](https://blog.meteor.com/new-suspense-hooks-for-meteor-5391570b3007) article to understand this package better. Example:
|
||||
|
||||
```javascript
|
||||
const TaskList = () => {
|
||||
useSubscribe("tasks");
|
||||
const tasks = useTracker('tasks',() => TasksCollection.find({}).fetch());
|
||||
return (
|
||||
<ul>
|
||||
{tasks.map((task) => (
|
||||
<Task key={task._id} task={task} />
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
};
|
||||
|
||||
export const App = () => {
|
||||
return (
|
||||
<div>
|
||||
<h1>Welcome to Meteor!</h1>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<TaskList />
|
||||
<UserProfile />
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
Note that we're not using the if (loading) anymore. To see a practical project, you can check [simpletasks](https://github.com/fredmaiaarantes/simpletasks/), which already use asynchronous API.
|
||||
|
||||
If you use `Tracker.autorun()`, for example, reading about the tracker with the [async callback function](https://blog.meteor.com/new-meteor-js-2-10-and-the-async-tracker-feature-ffdbe817c801) is also recommended.
|
||||
|
||||
|
||||
-----------
|
||||
|
||||
We hope to make your transition easier with these instructions, references, and tools. You may face some challenges, but remember that you can progressively refactor it. For more detailed updates on Meteor 3.0, please check our [Fibers project board](https://github.com/orgs/meteor/projects/10) and the [Meteor 3.0 PR](https://github.com/meteor/meteor/pull/12359).
|
||||
@@ -35,7 +35,7 @@ You can find our official Docker images at the following links:
|
||||
- [meteor/node](https://hub.docker.com/r/meteor/node/tags)
|
||||
- [meteor/galaxy-app](https://hub.docker.com/r/meteor/galaxy-app/tags)
|
||||
- [meteor/galaxy-puppeteer](https://hub.docker.com/r/meteor/galaxy-puppeteer/tags)
|
||||
- [meteor/base](https://hub.docker.com/r/meteor/meteor-base/tags) (It will be updated soon)
|
||||
- [meteor/base](https://hub.docker.com/r/meteor/meteor-base/tags)
|
||||
|
||||
<h2 id="installing-node-in-linux"> Installing Node.js in Linux</h2>
|
||||
|
||||
|
||||
@@ -26,5 +26,6 @@ exports.minimumVersions = {
|
||||
// https://github.com/Kilian/electron-to-chromium/blob/master/full-versions.js
|
||||
electron: [1, 6],
|
||||
// https://github.com/meteor/babel-preset-meteor/issues/13
|
||||
samsungInternet: [6, 2]
|
||||
samsungInternet: [6, 2],
|
||||
facebook: 325
|
||||
};
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "babel-preset-meteor",
|
||||
"version": "7.10.0",
|
||||
"version": "7.10.2",
|
||||
"description": "Babel preset for ES2015+ features supported by Meteor",
|
||||
"author": "Ben Newman <ben@meteor.com>",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/meteor/babel-preset-meteor",
|
||||
"main": "index.js",
|
||||
"type": "commonjs",
|
||||
"scripts": {
|
||||
"update-versions": "bash scripts/update-versions"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cordova-plugin-meteor-webapp",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.3",
|
||||
"description": "Cordova plugin that serves a Meteor web app through a local server and implements hot code push",
|
||||
"cordova": {
|
||||
"id": "cordova-plugin-meteor-webapp",
|
||||
@@ -22,6 +22,7 @@
|
||||
],
|
||||
"author": "Meteor Development Group",
|
||||
"license": "MIT",
|
||||
"type": "commonjs",
|
||||
"scripts": {
|
||||
"pretest": "ios-sim start --devicetypeid=iPhone-11-Pro-Max",
|
||||
"test": "cordova-paramedic --plugin . --platform ios --target 'iPhone-11-Pro-Max' --args=--buildFlag='-UseModernBuildSystem=0' --verbose"
|
||||
|
||||
@@ -270,7 +270,7 @@ public class WebAppLocalServer extends CordovaPlugin implements AssetBundleManag
|
||||
callbackContext.error("checkForUpdates requires a rootURL to be configured");
|
||||
return;
|
||||
}
|
||||
HttpUrl baseUrl = rootUrl.resolve("__cordova/");
|
||||
HttpUrl baseUrl = rootUrl.resolve("/__cordova/");
|
||||
assetBundleManager.checkForUpdates(baseUrl);
|
||||
callbackContext.success();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@meteorjs/eslint-config-meteor",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "Eslint configuration for Meteor",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -16,6 +16,7 @@
|
||||
"url": "https://github.com/meteor/meteor/issues"
|
||||
},
|
||||
"homepage": "https://github.com/meteor/meteor/tree/devel/npm-packages/eslint-config-meteor#readme",
|
||||
"type": "commonjs",
|
||||
"peerDependencies": {
|
||||
"babel-eslint": ">= 7",
|
||||
"eslint": ">= 3",
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"name": "eslint-plugin-meteor",
|
||||
"version": "7.4.0",
|
||||
"version": "7.4.1",
|
||||
"author": "Dominik Ferber <dominik.ferber+npm@gmail.com>",
|
||||
"description": "Meteor specific linting rules for ESLint",
|
||||
"main": "lib/index.js",
|
||||
"type": "commonjs",
|
||||
"publishConfig": {
|
||||
"tag": "next"
|
||||
},
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"name": "@meteorjs/babel",
|
||||
"author": "Meteor <dev@meteor.com>",
|
||||
"version": "7.18.0-beta.6",
|
||||
"version": "7.18.0",
|
||||
"license": "MIT",
|
||||
"type": "commonjs",
|
||||
"description": "Babel wrapper package for use with Meteor",
|
||||
"keywords": [
|
||||
"meteor",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meteor",
|
||||
"version": "2.13.3",
|
||||
"version": "2.13.4",
|
||||
"description": "Install Meteor",
|
||||
"main": "install.js",
|
||||
"scripts": {
|
||||
@@ -8,6 +8,7 @@
|
||||
},
|
||||
"author": "zodern",
|
||||
"license": "MIT",
|
||||
"type": "commonjs",
|
||||
"dependencies": {
|
||||
"7zip-bin": "^5.2.0",
|
||||
"cli-progress": "^3.11.1",
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
"name": "meteor-node-stubs",
|
||||
"author": "Ben Newman <ben@meteor.com>",
|
||||
"description": "Stub implementations of Node built-in modules, a la Browserify",
|
||||
"version": "1.2.5",
|
||||
"version": "1.2.6",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/meteor/meteor/blob/devel/npm-packages/meteor-node-stubs/README.md",
|
||||
"type": "commonjs",
|
||||
"scripts": {
|
||||
"prepare": "node scripts/build-deps.js"
|
||||
},
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"name": "meteor-promise",
|
||||
"author": "Ben Newman <ben@meteor.com>",
|
||||
"version": "0.9.1",
|
||||
"version": "0.9.2",
|
||||
"description": "ES6 Promise polyfill with Fiber support",
|
||||
"type": "commonjs",
|
||||
"keywords": [
|
||||
"meteor",
|
||||
"promise",
|
||||
|
||||
@@ -14,4 +14,4 @@ Meteor's user account system. This package implements the basic functions necess
|
||||
|
||||
There are also login services available in community packages.
|
||||
|
||||
For more information, see the [Meteor docs](http://docs.meteor.com/#accounts_api) and the Meteor Accounts [project page](https://www.meteor.com/accounts).
|
||||
For more information, see the [Meteor docs](http://docs.meteor.com/#accounts_api) and the Meteor Accounts [project page](https://docs.meteor.com/api/accounts).
|
||||
|
||||
@@ -226,13 +226,14 @@ export class AccountsClient extends AccountsCommon {
|
||||
const loginCallbacks = ({ error, loginDetails }) => {
|
||||
if (!called) {
|
||||
called = true;
|
||||
this._loginCallbacksCalled = true;
|
||||
if (!error) {
|
||||
this._onLoginHook.forEach(callback => {
|
||||
callback(loginDetails);
|
||||
return true;
|
||||
});
|
||||
this._loginCallbacksCalled = true;
|
||||
} else {
|
||||
this._loginCallbacksCalled = false;
|
||||
this._onLoginFailureHook.forEach(callback => {
|
||||
callback({ error });
|
||||
return true;
|
||||
|
||||
@@ -1774,21 +1774,21 @@ const setupUsersCollection = users => {
|
||||
});
|
||||
|
||||
/// DEFAULT INDEXES ON USERS
|
||||
users.createIndex('username', { unique: true, sparse: true });
|
||||
users.createIndex('emails.address', { unique: true, sparse: true });
|
||||
users.createIndex('services.resume.loginTokens.hashedToken',
|
||||
users.createIndexAsync('username', { unique: true, sparse: true });
|
||||
users.createIndexAsync('emails.address', { unique: true, sparse: true });
|
||||
users.createIndexAsync('services.resume.loginTokens.hashedToken',
|
||||
{ unique: true, sparse: true });
|
||||
users.createIndex('services.resume.loginTokens.token',
|
||||
users.createIndexAsync('services.resume.loginTokens.token',
|
||||
{ unique: true, sparse: true });
|
||||
// For taking care of logoutOtherClients calls that crashed before the
|
||||
// tokens were deleted.
|
||||
users.createIndex('services.resume.haveLoginTokensToDelete',
|
||||
users.createIndexAsync('services.resume.haveLoginTokensToDelete',
|
||||
{ sparse: true });
|
||||
// For expiring login tokens
|
||||
users.createIndex("services.resume.loginTokens.when", { sparse: true });
|
||||
users.createIndexAsync("services.resume.loginTokens.when", { sparse: true });
|
||||
// For expiring password tokens
|
||||
users.createIndex('services.password.reset.when', { sparse: true });
|
||||
users.createIndex('services.password.enroll.when', { sparse: true });
|
||||
users.createIndexAsync('services.password.reset.when', { sparse: true });
|
||||
users.createIndexAsync('services.password.enroll.when', { sparse: true });
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'A user account system',
|
||||
version: '2.2.8',
|
||||
version: '2.2.9-beta2140.0',
|
||||
});
|
||||
|
||||
Package.onUse(api => {
|
||||
@@ -24,7 +24,7 @@ Package.onUse(api => {
|
||||
|
||||
// If the 'blaze' package is loaded, we'll define some helpers like
|
||||
// {{currentUser}}. If not, no biggie.
|
||||
api.use('blaze@2.5.0', 'client', { weak: true });
|
||||
api.use('blaze@2.7.1', 'client', { weak: true });
|
||||
|
||||
// Allow us to detect 'autopublish', and publish some Meteor.users fields if
|
||||
// it's loaded.
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/accounts-facebook) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/accounts-facebook)
|
||||
***
|
||||
|
||||
A login service for Facebook. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
A login service for Facebook. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/accounts-github) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/accounts-github)
|
||||
***
|
||||
|
||||
A login service for GitHub. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
A login service for GitHub. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/accounts-google) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/accounts-google)
|
||||
***
|
||||
|
||||
A login service for Google. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
A login service for Google. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/accounts-meetup) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/accounts-meetup)
|
||||
***
|
||||
|
||||
A login service for Meetup. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
A login service for Meetup. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
***
|
||||
|
||||
A login service for Meteor developer accounts. See the project page on
|
||||
[Meteor Accounts](https://www.meteor.com/accounts) and Meteor [Developer
|
||||
[Meteor Accounts](https://docs.meteor.com/api/accounts) and Meteor [Developer
|
||||
Accounts](https://www.meteor.com/services/developer-accounts) for more
|
||||
details.
|
||||
details.
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/accounts-oauth) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/accounts-oauth)
|
||||
***
|
||||
|
||||
Common functionality for OAuth-based login services. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
Common functionality for OAuth-based login services. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
|
||||
@@ -36,7 +36,7 @@ Accounts.oauth.registerService = name => {
|
||||
// so this should be a unique index. You might want to add indexes for other
|
||||
// fields returned by your service (eg services.github.login) but you can do
|
||||
// that in your app.
|
||||
Meteor.users.createIndex(`services.${name}.id`, {unique: true, sparse: true});
|
||||
Meteor.users.createIndexAsync(`services.${name}.id`, {unique: true, sparse: true});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Common code for OAuth-based login services",
|
||||
version: "1.4.2",
|
||||
version: "1.4.3-beta2140.0",
|
||||
});
|
||||
|
||||
Package.onUse(api => {
|
||||
|
||||
@@ -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: '2.3.4',
|
||||
version: '2.4.0-beta2140.0',
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
|
||||
@@ -121,6 +121,29 @@ Accounts.createUser = (options, callback) => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @summary Create a new user and returns a promise of its result.
|
||||
* @locus Anywhere
|
||||
* @param {Object} options
|
||||
* @param {String} options.username A unique name for this user.
|
||||
* @param {String} options.email The user's email address.
|
||||
* @param {String} options.password The user's password. This is __not__ sent in plain text over the wire.
|
||||
* @param {Object} options.profile The user's profile, typically including the `name` field.
|
||||
* @importFromPackage accounts-base
|
||||
*/
|
||||
Accounts.createUserAsync = (options) => {
|
||||
return new Promise((resolve, reject) =>
|
||||
Accounts.createUser(options, (e) => {
|
||||
if (e) {
|
||||
reject(e);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
// Change password. Must be logged in.
|
||||
//
|
||||
// @param oldPassword {String|null} By default servers no longer allow
|
||||
|
||||
@@ -1054,9 +1054,9 @@ Accounts.createUser = (options, callback) => {
|
||||
///
|
||||
/// PASSWORD-SPECIFIC INDEXES ON USERS
|
||||
///
|
||||
Meteor.users.createIndex('services.email.verificationTokens.token',
|
||||
{ unique: true, sparse: true });
|
||||
Meteor.users.createIndex('services.password.reset.token',
|
||||
{ unique: true, sparse: true });
|
||||
Meteor.users.createIndex('services.password.enroll.token',
|
||||
{ unique: true, sparse: true });
|
||||
Meteor.users.createIndexAsync('services.email.verificationTokens.token',
|
||||
{ unique: true, sparse: true });
|
||||
Meteor.users.createIndexAsync('services.password.reset.token',
|
||||
{ unique: true, sparse: true });
|
||||
Meteor.users.createIndexAsync('services.password.enroll.token',
|
||||
{ unique: true, sparse: true });
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
***
|
||||
|
||||
A login service that enables secure passwordless-based login. See
|
||||
the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more
|
||||
the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more
|
||||
details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'No-password login/sign-up support for accounts',
|
||||
version: '2.1.3',
|
||||
version: '2.1.4-beta2140.0',
|
||||
});
|
||||
|
||||
Package.onUse(api => {
|
||||
|
||||
@@ -12,9 +12,13 @@ const findUserWithOptions = ({ selector }) => {
|
||||
if (!selector) {
|
||||
Accounts._handleError('A selector is necessary');
|
||||
}
|
||||
const { email, ...rest } = selector;
|
||||
const { email, id, ...rest } = selector;
|
||||
return Meteor.users.findOne(
|
||||
{ ...rest, ...(email ? { 'emails.address': selector.email } : {}) },
|
||||
{
|
||||
...rest,
|
||||
...(id && { _id: id }),
|
||||
...(email && { 'emails.address': email })
|
||||
},
|
||||
{
|
||||
fields: {
|
||||
services: 1,
|
||||
@@ -231,11 +235,11 @@ Accounts.sendLoginTokenEmail = ({ userId, sequence, email, extra = {} }) => {
|
||||
};
|
||||
|
||||
const setupUsersCollection = () => {
|
||||
Meteor.users.createIndex('services.passwordless.tokens.token', {
|
||||
Meteor.users.createIndexAsync('services.passwordless.tokens.token', {
|
||||
unique: true,
|
||||
sparse: true,
|
||||
});
|
||||
Meteor.users.createIndex('services.passwordless.token', {
|
||||
Meteor.users.createIndexAsync('services.passwordless.token', {
|
||||
unique: true,
|
||||
sparse: true,
|
||||
});
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/accounts-twitter) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/accounts-twitter)
|
||||
***
|
||||
|
||||
A login service for Twitter. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
A login service for Twitter. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
A version of `accounts-ui` without the CSS, so that you can add your
|
||||
own styling. See the [`accounts-ui`
|
||||
README](https://atmospherejs.com/meteor/accounts-ui) and the
|
||||
Meteor Accounts [project page](https://www.meteor.com/accounts) for
|
||||
details.
|
||||
Meteor Accounts [project page](https://docs.meteor.com/api/accounts) for
|
||||
details.
|
||||
|
||||
@@ -11,7 +11,7 @@ package and at least one login provider package:
|
||||
|
||||
Then simply add the `{{> loginButtons}}` helper to an HTML file.
|
||||
|
||||
See the Meteor Accounts [project page](https://www.meteor.com/accounts) for more info.
|
||||
See the Meteor Accounts [project page](https://docs.meteor.com/api/accounts) for more info.
|
||||
|
||||
## Details
|
||||
|
||||
@@ -33,4 +33,4 @@ and [`sendEnrollmentEmail`](http://docs.meteor.com/#accounts_sendenrollmentemail
|
||||
do not have to be manually placed in HTML: they are automatically activated
|
||||
when the URLs are loaded.
|
||||
|
||||
See the Meteor Accounts [project page](https://www.meteor.com/accounts) for more info.
|
||||
See the Meteor Accounts [project page](https://docs.meteor.com/api/accounts) for more info.
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/accounts-weibo) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/accounts-weibo)
|
||||
***
|
||||
|
||||
A login service for Weibo. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
A login service for Weibo. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
Package.describe({
|
||||
summary: "Makes your Cordova application use the Crosswalk WebView \
|
||||
instead of the System WebView on Android",
|
||||
version: '1.7.1',
|
||||
documentation: null
|
||||
version: '1.7.2-beta2140.0',
|
||||
documentation: null,
|
||||
deprecated: true
|
||||
});
|
||||
|
||||
Cordova.depends({
|
||||
'cordova-plugin-crosswalk-webview': '2.3.0'
|
||||
'cordova-plugin-crosswalk-webview': '2.4.0'
|
||||
});
|
||||
|
||||
@@ -11,6 +11,7 @@ const publicationStrategies = {
|
||||
// When using this strategy, the server maintains a copy of all data a connection is subscribed to.
|
||||
// This allows us to only send deltas over multiple publications.
|
||||
SERVER_MERGE: {
|
||||
useDummyDocumentView: false,
|
||||
useCollectionView: true,
|
||||
doAccountingForCollection: true,
|
||||
},
|
||||
@@ -19,6 +20,7 @@ const publicationStrategies = {
|
||||
// to it will not trigger removed messages when a subscription is stopped.
|
||||
// This should only be chosen for special use cases like send-and-forget queues.
|
||||
NO_MERGE_NO_HISTORY: {
|
||||
useDummyDocumentView: false,
|
||||
useCollectionView: false,
|
||||
doAccountingForCollection: false,
|
||||
},
|
||||
@@ -26,8 +28,17 @@ const publicationStrategies = {
|
||||
// sent to the client so it can remove them when a subscription is stopped.
|
||||
// This strategy can be used when a collection is only used in a single publication.
|
||||
NO_MERGE: {
|
||||
useDummyDocumentView: false,
|
||||
useCollectionView: false,
|
||||
doAccountingForCollection: true,
|
||||
},
|
||||
// NO_MERGE_MULTI is similar to `NO_MERGE`, but it does track whether a document is
|
||||
// used by multiple publications. This has some memory overhead, but it still does not do
|
||||
// diffing so it's faster and slimmer than SERVER_MERGE.
|
||||
NO_MERGE_MULTI: {
|
||||
useDummyDocumentView: true,
|
||||
useCollectionView: true,
|
||||
doAccountingForCollection: true
|
||||
}
|
||||
};
|
||||
|
||||
@@ -41,6 +52,26 @@ DDPServer.publicationStrategies = publicationStrategies;
|
||||
// Session and Subscription are file scope. For now, until we freeze
|
||||
// the interface, Server is package scope (in the future it should be
|
||||
// exported).
|
||||
var DummyDocumentView = function () {
|
||||
var self = this;
|
||||
self.existsIn = new Set(); // set of subscriptionHandle
|
||||
self.dataByKey = new Map(); // key-> [ {subscriptionHandle, value} by precedence]
|
||||
};
|
||||
|
||||
Object.assign(DummyDocumentView.prototype, {
|
||||
getFields: function () {
|
||||
return {}
|
||||
},
|
||||
|
||||
clearField: function (subscriptionHandle, key, changeCollector) {
|
||||
changeCollector[key] = undefined
|
||||
},
|
||||
|
||||
changeField: function (subscriptionHandle, key, value,
|
||||
changeCollector, isAdd) {
|
||||
changeCollector[key] = value
|
||||
}
|
||||
});
|
||||
|
||||
// Represents a single document in a SessionCollectionView
|
||||
var SessionDocumentView = function () {
|
||||
@@ -196,7 +227,12 @@ Object.assign(SessionCollectionView.prototype, {
|
||||
var added = false;
|
||||
if (!docView) {
|
||||
added = true;
|
||||
docView = new SessionDocumentView();
|
||||
if (Meteor.server.getPublicationStrategy(this.collectionName).useDummyDocumentView) {
|
||||
docView = new DummyDocumentView();
|
||||
} else {
|
||||
docView = new SessionDocumentView();
|
||||
}
|
||||
|
||||
self.documents.set(id, docView);
|
||||
}
|
||||
docView.existsIn.add(subscriptionHandle);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Meteor's latency-compensated distributed data server",
|
||||
version: '2.6.2',
|
||||
version: '2.7.0-beta2140.0',
|
||||
documentation: null
|
||||
});
|
||||
|
||||
|
||||
@@ -50,6 +50,9 @@ StreamServer = function () {
|
||||
// combining CPU-heavy processing with SockJS termination (eg a proxy which
|
||||
// converts to Unix sockets) but for now, raise the delay.
|
||||
disconnect_delay: 60 * 1000,
|
||||
// Allow disabling of CORS requests to address
|
||||
// https://github.com/meteor/meteor/issues/8317.
|
||||
disable_cors: !!process.env.DISABLE_SOCKJS_CORS,
|
||||
// Set the USE_JSESSIONID environment variable to enable setting the
|
||||
// JSESSIONID cookie. This is useful for setting up proxies with
|
||||
// session affinity.
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
** Deprecated, use facebook-oauth instead**
|
||||
|
||||
An implementation of the Facebook OAuth flow. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details. XXX link
|
||||
An implementation of the Facebook OAuth flow. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details. XXX link
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
**Deprecated, use github-oauth instead.**
|
||||
|
||||
An implementation of the GitHub OAuth flow. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
An implementation of the GitHub OAuth flow. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
** Deprecated, use google-oauth instead**
|
||||
|
||||
An implementation of the Google OAuth flow. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details. XXX link
|
||||
An implementation of the Google OAuth flow. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details. XXX link
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
**Deprecated, use meetup-oauth instead.**
|
||||
|
||||
An implementation of the Meetup OAuth flow. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
An implementation of the Meetup OAuth flow. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
**Deprecated, use meteor-developer-oauth instead.**
|
||||
|
||||
An implementation of the Meteor developer accounts OAuth flow. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
An implementation of the Meteor developer accounts OAuth flow. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
** Deprecated, use twitter-oauth instead**
|
||||
|
||||
An implementation of the Twitter OAuth flow. See the [project
|
||||
page](https://www.meteor.com/accounts) on Meteor Accounts for more
|
||||
page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more
|
||||
details.
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
** Deprecated, use weibo-oauth instead**
|
||||
|
||||
An implementation of the Weibo OAuth flow. See the [project
|
||||
page](https://www.meteor.com/accounts) on Meteor Accounts for more
|
||||
page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more
|
||||
details.
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
## 1.12.0 - UNRELEASED
|
||||
## 1.11.3 - 2023-08-XX
|
||||
### Changes
|
||||
- Updated default version of Facebook GraphAPI to v17
|
||||
|
||||
## 1.11.2 - 2022-12-07
|
||||
### Changes
|
||||
- Updated internal code to use new Meteor async format from Meteor 2.9
|
||||
|
||||
## 1.11.1 - 2022-11-14
|
||||
### Changes
|
||||
- Updated default version of Facebook GraphAPI to v15
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Facebook.requestCredential = (options, credentialRequestCompleteCallback) => {
|
||||
|
||||
const loginStyle = OAuth._loginStyle('facebook', config, options);
|
||||
|
||||
const API_VERSION = Meteor.settings?.public?.packages?.['facebook-oauth']?.apiVersion || '15.0';
|
||||
const API_VERSION = Meteor.settings?.public?.packages?.['facebook-oauth']?.apiVersion || '17.0';
|
||||
|
||||
let loginUrl =
|
||||
`https://www.facebook.com/v${API_VERSION}/dialog/oauth?client_id=${config.appId}` +
|
||||
|
||||
@@ -2,7 +2,7 @@ Facebook = {};
|
||||
import crypto from 'crypto';
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
|
||||
const API_VERSION = Meteor.settings?.public?.packages?.['facebook-oauth']?.apiVersion || '13.0';
|
||||
const API_VERSION = Meteor.settings?.public?.packages?.['facebook-oauth']?.apiVersion || '17.0';
|
||||
|
||||
Facebook.handleAuthFromAccessToken = async (accessToken, expiresAt) => {
|
||||
// include basic fields from facebook
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Facebook OAuth flow",
|
||||
version: '1.11.2'
|
||||
version: '1.11.3-beta2140.0'
|
||||
});
|
||||
|
||||
Package.onUse(api => {
|
||||
|
||||
27
packages/fetch/.npm/package/npm-shrinkwrap.json
generated
27
packages/fetch/.npm/package/npm-shrinkwrap.json
generated
@@ -2,14 +2,29 @@
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"node-fetch": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz",
|
||||
"integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA=="
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz",
|
||||
"integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g=="
|
||||
},
|
||||
"tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||
},
|
||||
"whatwg-fetch": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
|
||||
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng=="
|
||||
"version": "3.6.17",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.17.tgz",
|
||||
"integrity": "sha512-c4ghIvG6th0eudYwKZY5keb81wtFz9/WeAHAoy8+r18kcWlitUIrmGFQ2rWEl4UCKUilD3zCLHOIPheHx5ypRQ=="
|
||||
},
|
||||
"whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
Package.describe({
|
||||
name: "fetch",
|
||||
version: '0.1.3',
|
||||
version: '0.1.4-beta2140.0',
|
||||
summary: "Isomorphic modern/legacy/Node polyfill for WHATWG fetch()",
|
||||
documentation: "README.md"
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
"node-fetch": "2.3.0",
|
||||
"whatwg-fetch": "2.0.4"
|
||||
"node-fetch": "2.6.12",
|
||||
"whatwg-fetch": "3.6.17"
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const fetch = require("node-fetch");
|
||||
|
||||
exports.fetch = fetch;
|
||||
exports.fetch = fetch.default;
|
||||
exports.Headers = fetch.Headers;
|
||||
exports.Request = fetch.Request;
|
||||
exports.Response = fetch.Response;
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/google-oauth) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/google-oauth)
|
||||
***
|
||||
|
||||
An implementation of the Google OAuth flow. See the [project page](https://www.meteor.com/accounts) on Meteor Accounts for more details.
|
||||
An implementation of the Google OAuth flow. See the [project page](https://docs.meteor.com/api/accounts) on Meteor Accounts for more details.
|
||||
[Google's documentation](https://developers.google.com/identity/protocols/oauth2)
|
||||
|
||||
47
packages/logging/logging.d.ts
vendored
Normal file
47
packages/logging/logging.d.ts
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
type LogJSONInput = {
|
||||
message: string;
|
||||
app?: string;
|
||||
[index: string]: string | object | number;
|
||||
};
|
||||
|
||||
type LogInput = string | LogJSONInput;
|
||||
|
||||
type formatInput = {
|
||||
message: string;
|
||||
time: Date;
|
||||
level: 'debug' | 'info' | 'warn' | 'error'
|
||||
timeInexact?: boolean;
|
||||
file: string;
|
||||
line: number;
|
||||
app?: string;
|
||||
originApp?: string;
|
||||
program?: string;
|
||||
satellite?: string;
|
||||
stderr?: string | Error;
|
||||
};
|
||||
|
||||
export declare function Log(input: LogInput, ...optionalParams: any[]): void;
|
||||
|
||||
export declare namespace Log {
|
||||
var outputFormat: 'json' | 'colored-text';
|
||||
function _intercept(count: number): void;
|
||||
function _suppress(count: number): void;
|
||||
function _intercepted(): string[];
|
||||
function _getCallerDetails(): { line: number; file: string };
|
||||
function parse(line: object | string): object
|
||||
function format(object: formatInput, options: { color: true }): object | string;
|
||||
function objFromText(
|
||||
line: string,
|
||||
override: object
|
||||
): {
|
||||
message: string
|
||||
level: 'info'
|
||||
time: Date
|
||||
timeInexact: true
|
||||
}
|
||||
|
||||
function debug(input: LogInput, ...optionalParams: any[]): void;
|
||||
function info(input: LogInput, ...optionalParams: any[]): void;
|
||||
function warn(input: LogInput, ...optionalParams: any[]): void;
|
||||
function error(input: LogInput, ...optionalParams: any[]): void;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'Logging facility.',
|
||||
version: '1.3.2',
|
||||
version: '1.3.3-beta2140.0',
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
@@ -17,11 +17,12 @@ Package.onUse(function (api) {
|
||||
// here due to this package's dependency on
|
||||
// `String.prototype.padRight` which is polyfilled only in
|
||||
// `ecmascript-runtime-client@0.6.2` or newer.
|
||||
api.use(['ejson', 'ecmascript', 'ecmascript-runtime-client']);
|
||||
api.use(['ejson', 'ecmascript', 'typescript', 'ecmascript-runtime-client']);
|
||||
api.mainModule('logging.js');
|
||||
api.addFiles('logging_server.js', 'server')
|
||||
api.addFiles('logging_browser.js', 'client')
|
||||
api.addFiles('logging_server.js', 'server');
|
||||
api.addFiles('logging_browser.js', 'client');
|
||||
api.mainModule('logging_cordova.js', 'web.cordova');
|
||||
api.addAssets('logging.d.ts', 'server');
|
||||
});
|
||||
|
||||
Package.onTest(function (api) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'The Meteor command-line tool',
|
||||
version: '2.13.3',
|
||||
version: '2.14.0-beta.0',
|
||||
});
|
||||
|
||||
Package.includeTool();
|
||||
|
||||
19
packages/meteor/meteor.d.ts
vendored
19
packages/meteor/meteor.d.ts
vendored
@@ -19,6 +19,15 @@ export namespace Meteor {
|
||||
* of Meteor.
|
||||
*/
|
||||
var release: string;
|
||||
|
||||
var meteorRelease: string;
|
||||
|
||||
interface ErrorConstructor {
|
||||
new (...args: any[]): Error;
|
||||
errorType: string;
|
||||
}
|
||||
|
||||
function makeErrorType(name: string, constructor: Function): ErrorConstructor;
|
||||
/** Global props **/
|
||||
|
||||
/** Settings **/
|
||||
@@ -159,7 +168,13 @@ export namespace Meteor {
|
||||
*/
|
||||
function callAsync(name: string, ...args: any[]): Promise<any>;
|
||||
|
||||
interface MethodApplyOptions {
|
||||
interface MethodApplyOptions<
|
||||
Result extends
|
||||
| EJSONable
|
||||
| EJSONable[]
|
||||
| EJSONableProperty
|
||||
| EJSONableProperty[]
|
||||
> {
|
||||
/**
|
||||
* (Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.
|
||||
*/
|
||||
@@ -203,7 +218,7 @@ export namespace Meteor {
|
||||
>(
|
||||
name: string,
|
||||
args: ReadonlyArray<EJSONable | EJSONableProperty>,
|
||||
options?: MethodApplyOptions,
|
||||
options?: MethodApplyOptions<Result>,
|
||||
asyncCallback?: (
|
||||
error: global_Error | Meteor.Error | undefined,
|
||||
result?: Result
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Package.describe({
|
||||
summary: "Core Meteor environment",
|
||||
version: '1.11.3',
|
||||
version: '1.11.4-beta2140.0',
|
||||
});
|
||||
|
||||
Package.registerBuildPlugin({
|
||||
|
||||
@@ -29,4 +29,11 @@ Tinytest.add('modern-browsers - versions - basic', function (test) {
|
||||
minor: 5,
|
||||
patch: 2,
|
||||
}));
|
||||
|
||||
test.isTrue(isModern({
|
||||
name: "appleMail",
|
||||
major: 605,
|
||||
minor: 1,
|
||||
patch: 15,
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -33,6 +33,9 @@ const browserAliases = {
|
||||
// The webapp package converts browser names to camel case, so
|
||||
// mobile_safari and mobileSafari should be synonymous.
|
||||
mobile_safari: ['mobileSafari', 'mobileSafariUI', 'mobileSafariUI/WKWebView'],
|
||||
|
||||
// Embedded WebViews on iPads will be reported as Apple Mail
|
||||
safari: ['appleMail'],
|
||||
};
|
||||
|
||||
// Expand the given minimum versions by reusing chrome versions for
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: 'modern-browsers',
|
||||
version: '0.1.9',
|
||||
version: '0.1.10-beta2140.0',
|
||||
summary:
|
||||
'API for defining the boundary between modern and legacy ' +
|
||||
'JavaScript clients',
|
||||
|
||||
21
packages/mongo/mongo.d.ts
vendored
21
packages/mongo/mongo.d.ts
vendored
@@ -107,6 +107,11 @@ export namespace Mongo {
|
||||
byteSize?: number,
|
||||
maxDocuments?: number
|
||||
): Promise<void>;
|
||||
|
||||
/**
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see createIndexAsync
|
||||
*/
|
||||
createIndex(
|
||||
indexSpec: NpmModuleMongodb.IndexSpecification,
|
||||
options?: NpmModuleMongodb.CreateIndexesOptions
|
||||
@@ -150,11 +155,15 @@ export namespace Mongo {
|
||||
): Cursor<T, DispatchTransform<O['transform'], T, U>>;
|
||||
/**
|
||||
* Finds the first document that matches the selector, as ordered by sort and skip options. Returns `undefined` if no matching document is found.
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see findOneAsync
|
||||
* @param selector A query describing the documents to find
|
||||
*/
|
||||
findOne(selector?: Selector<T> | ObjectID | string): U | undefined;
|
||||
/**
|
||||
* Finds the first document that matches the selector, as ordered by sort and skip options. Returns `undefined` if no matching document is found.
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see findOneAsync
|
||||
* @param selector A query describing the documents to find
|
||||
*/
|
||||
findOne<O extends Omit<Options<T>, 'limit'>>(
|
||||
@@ -189,6 +198,8 @@ export namespace Mongo {
|
||||
estimatedDocumentCount(options?: NpmModuleMongodb.EstimatedDocumentCountOptions): Promise<number>;
|
||||
/**
|
||||
* Insert a document in the collection. Returns its unique _id.
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see insertAsync
|
||||
* @param doc The document to insert. May not yet have an _id attribute, in which case Meteor will generate one for you.
|
||||
* @param callback If present, called with an error object as the first argument and, if no error, the _id as the second.
|
||||
*/
|
||||
@@ -211,6 +222,8 @@ export namespace Mongo {
|
||||
rawDatabase(): NpmModuleMongodb.Db;
|
||||
/**
|
||||
* Remove documents from the collection
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see removeAsync
|
||||
* @param selector Specifies which documents to remove
|
||||
* @param callback If present, called with an error object as its argument.
|
||||
*/
|
||||
@@ -229,6 +242,8 @@ export namespace Mongo {
|
||||
): Promise<number>;
|
||||
/**
|
||||
* Modify one or more documents in the collection. Returns the number of matched documents.
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see updateAsync
|
||||
* @param selector Specifies which documents to modify
|
||||
* @param modifier Specifies how to modify the documents
|
||||
* @param callback If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.
|
||||
@@ -274,6 +289,8 @@ export namespace Mongo {
|
||||
/**
|
||||
* Modify one or more documents in the collection, or insert one if no matching documents were found. Returns an object with keys `numberAffected` (the number of documents modified) and
|
||||
* `insertedId` (the unique _id of the document that was inserted, if any).
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see upsertAsync
|
||||
* @param selector Specifies which documents to modify
|
||||
* @param modifier Specifies how to modify the documents
|
||||
* @param callback If present, called with an error object as the first argument and, if no error, the number of affected documents as the second.
|
||||
@@ -316,6 +333,10 @@ export namespace Mongo {
|
||||
options?: NpmModuleMongodb.CreateIndexesOptions
|
||||
): void;
|
||||
_dropCollection(): Promise<void>;
|
||||
/**
|
||||
* @deprecated on server since 2.8. Check migration guide {@link https://guide.meteor.com/2.8-migration}
|
||||
* @see dropIndexAsync
|
||||
*/
|
||||
_dropIndex(indexName: string): void;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user