Skip to content

Commit 472f703

Browse files
authored
Merge pull request #11788 from meteor/release-2.5.2
Release 2.5.2
2 parents 19e2547 + a530813 commit 472f703

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+562
-463
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tools/node_modules symlink=dir

History.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
1-
## vNext, UNRELEASED
1+
## v2.5.2, UNRELEASED
22

33
#### Highlights
44

55
#### Breaking Changes
66

77
#### Meteor Version Release
88

9+
10+
- Changes @meteorjs/babel and @meteorjs/reify to improve Reify performance.
11+
12+
* `@meteorjs/[email protected]`
13+
- Updates @meteorjs/reify to improve Reify performance.
14+
15+
* `@meteorjs/[email protected]`
16+
- Check scope when wrapping to fix slowness in MUI v5. [PR](https://github.com/meteor/reify/pull/1) and [Issue](https://github.com/benjamn/reify/issues/277).
17+
918
#### Independent Releases
19+
20+
- Update usage of `accounts-passwordless` to be compatible with 2.0.0.
21+
22+
23+
- Revert `evaluate` option that was set to false in 2.7.2.
24+
25+
26+
1027

1128
## v2.5.1, 2021-11-17
1229

1330
#### Highlights
14-
- Mac M1 Support - darwin arm64
31+
- Mac M1 Support - darwin arm64. [Read more](https://blog.meteor.com/).
1532

1633
#### Breaking Changes
1734
- `Meteor.loginWithToken` from the new package `accounts-passwordless` was conflicting with another method with the same name on `accounts-base` so we had to rename the method of `accounts-passwordless` package to `Meteor.passwordlessLoginWithToken`.

README.md

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ With Meteor you write apps:
1515
Try a getting started tutorial:
1616
* [React](https://react-tutorial.meteor.com)
1717
* [Blaze](https://blaze-tutorial.meteor.com/)
18-
* [Angular](https://www.meteor.com/tutorials/angular/creating-an-app)
1918
* [Vue](https://vue-tutorial.meteor.com/)
2019
* [Svelte](https://svelte-tutorial.meteor.com/)
2120

22-
Next, read the [guide](https://guide.meteor.com) and the [documentation](https://docs.meteor.com/).
21+
Next, read the [documentation](https://docs.meteor.com/).
2322

24-
Are you looking for examples? Check this [meteor/examples](https://github.com/meteor/examples)
23+
Are you looking for examples? Check this [meteor/examples](https://github.com/meteor/examples).
24+
25+
Check your [changes](https://docs.meteor.com/changelog.html) to keep your app up-to-date.
2526

2627
## Quick Start
2728

@@ -33,33 +34,27 @@ npm install -g meteor
3334

3435
Visit the official [install page](https://www.meteor.com/developers/install) to learn more.
3536

36-
Alternatively, on macOS and Linux you can use:
37-
38-
```bash
39-
curl https://install.meteor.com/ | sh
40-
```
41-
4237
Create a project:
4338

4439
```bash
45-
meteor create try-meteor
40+
meteor create my-app
4641
```
4742

4843
Run it:
4944

5045
```bash
51-
cd try-meteor
46+
cd my-app
5247
meteor
5348
```
5449

5550
## Developer Resources
5651

5752
Building an application with Meteor?
5853

59-
* Deploy on Galaxy hosting: https://www.meteor.com/cloud
60-
* Announcement list: sign up at https://www.meteor.com/
61-
* Discussion forums: https://forums.meteor.com/
54+
* Deploy on [Meteor Cloud](https://www.meteor.com/cloud)
55+
* Discussion [Forums](https://forums.meteor.com/)
6256
* Join the Meteor community Slack by clicking this [invite link](https://join.slack.com/t/meteor-community/shared_invite/enQtODA0NTU2Nzk5MTA3LWY5NGMxMWRjZDgzYWMyMTEyYTQ3MTcwZmU2YjM5MTY3MjJkZjQ0NWRjOGZlYmIxZjFlYTA5Mjg4OTk3ODRiOTc).
57+
* Announcement list. Subscribe in the [footer](https://www.meteor.com/).
6358

6459

6560
Interested in helping or contributing to Meteor? These resources will help:
@@ -69,15 +64,5 @@ Interested in helping or contributing to Meteor? These resources will help:
6964
* [Feature requests](https://github.com/meteor/meteor/discussions/)
7065
* [Issue tracker](https://github.com/meteor/meteor/issues)
7166

72-
## Uninstalling Meteor
73-
74-
Aside from a short launcher shell script, Meteor installs itself inside your
75-
home directory. To uninstall Meteor, run:
76-
77-
```bash
78-
rm -rf ~/.meteor/
79-
sudo rm /usr/local/bin/meteor
80-
```
81-
82-
On Windows, [read here](npm-packages/meteor-installer/README.md).
67+
To uninstall Meteor [read here](https://docs.meteor.com/install.html#uninstall).
8368

docs/scripts/api-box.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ hexo.extend.tag.register('apibox', function(args) {
3535
nested: name.indexOf('#') !== -1,
3636
instanceDelimiter: '#'
3737
};
38-
var data = Object.assign({}, defaults, options, dataFromApi);
38+
var data = Object.assign({}, defaults, dataFromApi, options);
3939

4040
data.id = data.longname.replace(/[.#]/g, "-");
4141

docs/source/api/tracker.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,27 @@ subscriptions and reactivity.
7979
If the initial run of an autorun throws an exception, the computation
8080
is automatically stopped and won't be rerun.
8181

82+
### Tracker.autorun and async callbacks
83+
`Tracker.autorun` can accept an `async` callback function. However, the async call back function will only be dependent on reactive functions called prior to any called functions that return a promise.
84+
85+
Example 1 - autorun `example1()` **is not** dependent on reactive changes to the `Meteor.users` collection. Because it is dependent on nothing reactive it will run only once:
86+
```javascript
87+
Tracker.autorun(async function example1() {
88+
let asyncData = await asyncDataFunction();
89+
let users = Meteor.users.find({}).fetch();
90+
});
91+
```
92+
93+
However, simply changing the order so there are no `async` calls prior to the reactive call to `Meteor.users.find`, will make the async autorun `example2()` dependent on reactive changes to the `Meteor.users` collection.
94+
95+
Example 2 - autorun `example2()` **is** dependent on reactive changes to the Meteor.users collection. Changes to the `Meteor.users` collection will cause a rerun of `example2()`:
96+
```javascript
97+
Tracker.autorun(async function example2() {
98+
let users = Meteor.users.find({}).fetch();
99+
let asyncData = await asyncDataFunction();
100+
});
101+
```
102+
82103
{% apibox "Tracker.flush" %}
83104

84105
Normally, when you make changes (like writing to the database),

docs/source/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Meteor is a full-stack JavaScript platform for developing modern web and mobile
3434

3535
{% oldRedirects %}
3636

37-
<!-- hidden comment to trigger a change again -->
37+
<!-- hidden comment to trigger a change -->

docs/source/install.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
title: Install
33
---
44
Meteor currently supports **OS X, Windows, and Linux**. Only 64-bit is supported.
5-
Apple M1 is only supported from Meteor 2.5.1 onward.
5+
Apple M1 is natively supported from Meteor 2.5.1 onward (for older versions, you will need to run with a [rosetta terminal](https://osxdaily.com/2020/11/18/how-run-homebrew-x86-terminal-apple-silicon-mac/)).
66

77
<h2 id="prereqs">Prerequisites and useful information</h2>
88

9-
- Meteor requires Node.js 8 or newer installed for running the npm installer.
9+
- If you are on a Mac M1 (Arm64 version) you need to have Rosetta 2 installed, as Meteor uses it for running MongoDB. Check how to install it [here](https://osxdaily.com/2020/12/04/how-install-rosetta-2-apple-silicon-mac/)
10+
- Meteor requires Node.js version >= 10 and <= 14 installed for running the npm installer (tip: you can use [nvm](https://github.com/nvm-sh/nvm) for managing node versions).
1011
- Meteor supports Windows 7/Windows Server 2008 R2 and up.
1112
- Disabling antivirus (Windows Defender, etc.) will improve performance.
1213
- For compatibility, Linux binaries are built with CentOS 6.4 i386/amd64.
@@ -21,6 +22,9 @@ Install the latest official Meteor release from your terminal:
2122
npm install -g meteor
2223
```
2324

25+
26+
<h2 id="troubleshooting">Troubleshooting</h2>
27+
2428
If your user doesn't have permission to install global binaries, and you need to use sudo, it's necessary to append *--unsafe-perm* to the above command:
2529

2630
```bash
@@ -32,28 +36,27 @@ Only run the above command with sudo if you know what you are doing.
3236

3337
If you only use sudo because of a distribution default permission system, [check this link for fixing it](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally).
3438

35-
For Apple M1 computers, you can append Rosetta prefix as following:
39+
In some cases you can get this error `npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules` because your Node.js installation was performed with wrong permissions. An easy way to fix this is to install Node.js using [nvm](https://github.com/nvm-sh/nvm) and forcing it to be used in your terminal. You can force it in the current session of your terminal by running `nvm use 14`.
3640

37-
```bash
41+
<h2 id="old-versions-m1">Old Versions on Apple M1</h2>
3842

39-
arch -x86_64 npm install -g meteor
43+
For Apple M1 computers, you can append Rosetta prefix as following, if you need to run older versions of Meteor (before 2.5.1):
4044

45+
```bash
46+
arch -x86_64 npm install -g meteor
4147
```
4248

4349
or select Terminal in the Applications folder, press CMD(⌘)+I and check the "Open using Rosetta" option.
4450

45-
We currently don't support Apple M1 native binaries as the latest meteor release uses Node.js 14 which doesn't have support for it until now. More info in our repository, [here](https://github.com/meteor/meteor/issues/11249#issuecomment-734327204).
46-
47-
48-
<h2 id="legacy-install">Legacy Installation Method</h2>
51+
<h2 id="legacy-install">Alternative Installation Method</h2>
4952

50-
For Linux and OS X, we are still providing the legacy installation method which uses a bash script and doesn't depend on Node.
53+
For Linux and OS X, we still provide an alternative installation method which uses a bash script and doesn't depend on Node.js.
5154

5255
```bash
5356
curl https://install.meteor.com/ | sh
5457
```
5558

56-
This installation method is not maintained anymore, and you should always use the NPM one.
59+
We recommend everybody to use the npm installer but we are still going to maintain this script as well.
5760

5861
<h2 id="meteor-docker">Run Meteor inside Docker</h2>
5962

@@ -63,10 +66,28 @@ We do provide the meteor/meteor-base ubuntu-based Docker image, that comes pre-b
6366

6467
You can refer to our meteor/galaxy-images repository to see how to use it, and the latest version. [More about meteor-base here.](https://github.com/meteor/galaxy-images/blob/master/meteor-base/README.md)
6568

69+
70+
<h2 id="windows">Note for Windows users</h2>
71+
72+
On Windows, the installer runs faster when [Windows Developer Mode](https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development) is enabled. The installation extracts a large number of small files, which Windows Defender can cause to be very slow.
73+
74+
75+
<h2 id="nvm">Node version manager</h2>
76+
77+
If you use a node version manager that uses a separate global `node_modules` folder for each Node version, you will need to re-install the `meteor` npm package when changing to a Node version for the first time. Otherwise, the `meteor` command will no longer be found.
78+
6679
<h2 id="fish-shell">Note for fish shell users (Linux)</h2>
6780

6881
To be able to user `meteor` command from fish it's needed to include `/home/<user>/.meteor` in `$PATH`; to do that just add this line in `/home/<user>/.config/fish/config.fish` file (replace `<user>` with your username):
6982

7083
`set PATH /home/<user>/.meteor $PATH`
7184

85+
<h2 id="uninstall">Uninstalling Meteor</h2>
86+
87+
If you installed Meteor using npm, you can remove it by running:
88+
`meteor-installer uninstall`
89+
90+
If you installed Meteor using curl, you can remove it by running:
91+
`rm -rf ~/.meteor`
92+
`sudo rm /usr/local/bin/meteor` 
7293

docs/source/packages/accounts-passwordless.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ description: Documentation of Meteor's `accounts-passwordless` package.
66
Passwordless package allows you to create a login for users without the need for user to provide password. Upon registering or login an email is sent to the user's email with a code to enter to confirm login and a link to login directly. Since the user is responding to the email it will also verify the email.
77

88
The first step to in the passwordless process is for the user to sign-up or request a token to their email address. You can do that with the following:
9-
{% apibox "Accounts.requestLoginTokenForUser" %}
9+
{% apibox "Accounts.requestLoginTokenForUser" "module":"accounts-base" %}
1010

1111
If the user is signing up you can pass in the `userData` object like in [Accounts.createUser](/api/passwords.html#Accounts-createUser).
1212

1313
{% apibox "Meteor.passwordlessLoginWithToken" %}
1414
The second step in the passwordless flow. Like all the other `loginWith` functions call this method to login the user with the token they have inputted.
1515

16-
{% apibox "Accounts.sendLoginTokenEmail" %}
16+
{% apibox "Accounts.sendLoginTokenEmail" "module":"accounts-base" %}
1717
Use this function if you want to manually send the email to users to login with token from the server. Do note that you will need to create the token/sequence and save it in the DB yourself. This is good if you want to change how the tokens look or are generated, but unless you are sure of what you are doing we don't recommend it.
1818

1919
<h3 id="passwordless-email-templates">E-mail templates</h3>

guide/source/security.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,7 @@ WebApp.connectHandlers.use(
508508
connectSrc: ["*"],
509509
imgSrc: ["'self'"],
510510
styleSrc: ["'self'", "'unsafe-inline'"],
511-
},
512-
browserSniff: false
511+
}
513512
})
514513
);
515514
```

meteor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
BUNDLE_VERSION=14.18.1.4
3+
BUNDLE_VERSION=14.18.2.3
44

55
# OS Check. Put here because here is where we download the precompiled
66
# bundles that are arch specific.

0 commit comments

Comments
 (0)