Skip to content

Commit

Permalink
Merge pull request #11788 from meteor/release-2.5.2
Browse files Browse the repository at this point in the history
Release 2.5.2
  • Loading branch information
filipenevola authored Dec 21, 2021
2 parents 19e2547 + a530813 commit 472f703
Show file tree
Hide file tree
Showing 53 changed files with 562 additions and 463 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tools/node_modules symlink=dir
21 changes: 19 additions & 2 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
## vNext, UNRELEASED
## v2.5.2, UNRELEASED

#### Highlights

#### Breaking Changes

#### Meteor Version Release

* `[email protected]`
- Changes @meteorjs/babel and @meteorjs/reify to improve Reify performance.

* `@meteorjs/[email protected]`
- Updates @meteorjs/reify to improve Reify performance.

* `@meteorjs/[email protected]`
- 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).

#### Independent Releases
* `[email protected]`
- Update usage of `accounts-passwordless` to be compatible with 2.0.0.

* `[email protected]`
- Revert `evaluate` option that was set to false in 2.7.2.

* `[email protected]`
- Using `[email protected]`

## v2.5.1, 2021-11-17

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

#### Breaking Changes
- `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`.
Expand Down
35 changes: 10 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ With Meteor you write apps:
Try a getting started tutorial:
* [React](https://react-tutorial.meteor.com)
* [Blaze](https://blaze-tutorial.meteor.com/)
* [Angular](https://www.meteor.com/tutorials/angular/creating-an-app)
* [Vue](https://vue-tutorial.meteor.com/)
* [Svelte](https://svelte-tutorial.meteor.com/)

Next, read the [guide](https://guide.meteor.com) and the [documentation](https://docs.meteor.com/).
Next, read the [documentation](https://docs.meteor.com/).

Are you looking for examples? Check this [meteor/examples](https://github.com/meteor/examples)
Are you looking for examples? Check this [meteor/examples](https://github.com/meteor/examples).

Check your [changes](https://docs.meteor.com/changelog.html) to keep your app up-to-date.

## Quick Start

Expand All @@ -33,33 +34,27 @@ npm install -g meteor

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

Alternatively, on macOS and Linux you can use:

```bash
curl https://install.meteor.com/ | sh
```

Create a project:

```bash
meteor create try-meteor
meteor create my-app
```

Run it:

```bash
cd try-meteor
cd my-app
meteor
```

## Developer Resources

Building an application with Meteor?

* Deploy on Galaxy hosting: https://www.meteor.com/cloud
* Announcement list: sign up at https://www.meteor.com/
* Discussion forums: https://forums.meteor.com/
* Deploy on [Meteor Cloud](https://www.meteor.com/cloud)
* Discussion [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/).


Interested in helping or contributing to Meteor? These resources will help:
Expand All @@ -69,15 +64,5 @@ 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)

## Uninstalling Meteor

Aside from a short launcher shell script, Meteor installs itself inside your
home directory. To uninstall Meteor, run:

```bash
rm -rf ~/.meteor/
sudo rm /usr/local/bin/meteor
```

On Windows, [read here](npm-packages/meteor-installer/README.md).
To uninstall Meteor [read here](https://docs.meteor.com/install.html#uninstall).

2 changes: 1 addition & 1 deletion docs/scripts/api-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ hexo.extend.tag.register('apibox', function(args) {
nested: name.indexOf('#') !== -1,
instanceDelimiter: '#'
};
var data = Object.assign({}, defaults, options, dataFromApi);
var data = Object.assign({}, defaults, dataFromApi, options);

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

Expand Down
21 changes: 21 additions & 0 deletions docs/source/api/tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,27 @@ subscriptions and reactivity.
If the initial run of an autorun throws an exception, the computation
is automatically stopped and won't be rerun.

### Tracker.autorun and async callbacks
`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.

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:
```javascript
Tracker.autorun(async function example1() {
let asyncData = await asyncDataFunction();
let users = Meteor.users.find({}).fetch();
});
```

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.

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()`:
```javascript
Tracker.autorun(async function example2() {
let users = Meteor.users.find({}).fetch();
let asyncData = await asyncDataFunction();
});
```

{% apibox "Tracker.flush" %}

Normally, when you make changes (like writing to the database),
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Meteor is a full-stack JavaScript platform for developing modern web and mobile

{% oldRedirects %}

<!-- hidden comment to trigger a change again -->
<!-- hidden comment to trigger a change -->
43 changes: 32 additions & 11 deletions docs/source/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
title: Install
---
Meteor currently supports **OS X, Windows, and Linux**. Only 64-bit is supported.
Apple M1 is only supported from Meteor 2.5.1 onward.
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/)).

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

- Meteor requires Node.js 8 or newer installed for running the npm installer.
- 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/)
- 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).
- Meteor supports Windows 7/Windows Server 2008 R2 and up.
- Disabling antivirus (Windows Defender, etc.) will improve performance.
- For compatibility, Linux binaries are built with CentOS 6.4 i386/amd64.
Expand All @@ -21,6 +22,9 @@ Install the latest official Meteor release from your terminal:
npm install -g meteor
```


<h2 id="troubleshooting">Troubleshooting</h2>

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:

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

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

For Apple M1 computers, you can append Rosetta prefix as following:
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`.

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

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

```bash
arch -x86_64 npm install -g meteor
```

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

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


<h2 id="legacy-install">Legacy Installation Method</h2>
<h2 id="legacy-install">Alternative Installation Method</h2>

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

```bash
curl https://install.meteor.com/ | sh
```

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

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

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

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)


<h2 id="windows">Note for Windows users</h2>

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.


<h2 id="nvm">Node version manager</h2>

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.

<h2 id="fish-shell">Note for fish shell users (Linux)</h2>

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):

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

<h2 id="uninstall">Uninstalling Meteor</h2>

If you installed Meteor using npm, you can remove it by running:
`meteor-installer uninstall`

If you installed Meteor using curl, you can remove it by running:
`rm -rf ~/.meteor`
`sudo rm /usr/local/bin/meteor` 

4 changes: 2 additions & 2 deletions docs/source/packages/accounts-passwordless.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ description: Documentation of Meteor's `accounts-passwordless` package.
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.

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:
{% apibox "Accounts.requestLoginTokenForUser" %}
{% apibox "Accounts.requestLoginTokenForUser" "module":"accounts-base" %}

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

{% apibox "Meteor.passwordlessLoginWithToken" %}
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.

{% apibox "Accounts.sendLoginTokenEmail" %}
{% apibox "Accounts.sendLoginTokenEmail" "module":"accounts-base" %}
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.

<h3 id="passwordless-email-templates">E-mail templates</h3>
Expand Down
3 changes: 1 addition & 2 deletions guide/source/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,7 @@ WebApp.connectHandlers.use(
connectSrc: ["*"],
imgSrc: ["'self'"],
styleSrc: ["'self'", "'unsafe-inline'"],
},
browserSniff: false
}
})
);
```
Expand Down
2 changes: 1 addition & 1 deletion meteor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

BUNDLE_VERSION=14.18.1.4
BUNDLE_VERSION=14.18.2.3

# OS Check. Put here because here is where we download the precompiled
# bundles that are arch specific.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var packageJson = {
fibers: "https://github.com/meteor/node-fibers/archive/refs/tags/5.0.0.tar.gz",
"meteor-promise": "0.9.0",
promise: "8.1.0",
reify: "0.22.2",
"@meteorjs/reify": "0.23.0",
"@babel/parser": "7.15.3",
"@types/underscore": "1.11.2",
underscore: "1.13.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ var packageJson = {
"node-gyp": "8.0.0",
"node-pre-gyp": "0.15.0",
typescript: "4.3.5",
"@meteorjs/babel": "7.13.0",
"@meteorjs/babel": "7.15.0",
// Keep the versions of these packages consistent with the versions
// found in dev-bundle-server-package.js.
"meteor-promise": "0.9.0",
fibers: "https://github.com/meteor/node-fibers/archive/refs/tags/5.0.0.tar.gz",
reify: "0.22.2",
"@meteorjs/reify": "0.23.0",
// So that Babel can emit require("@babel/runtime/helpers/...") calls.
"@babel/runtime": "7.15.3",
// For backwards compatibility with isopackets that still depend on
Expand Down
4 changes: 2 additions & 2 deletions npm-packages/meteor-babel/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var path = require("path");
var fs = require("fs");
var util = require("./util.js");
var meteorBabelVersion = require("./package.json").version;
var reifyVersion = require("reify/package.json").version;
var reifyVersion = require("@meteorjs/reify/package.json").version;
var hasOwn = Object.prototype.hasOwnProperty;

function Cache(fillFn, cacheDir) {
Expand Down Expand Up @@ -68,7 +68,7 @@ Cp.get = function (source, options, deps) {
source, options, deps
);
}

var cacheFile = cacheHash + ".json";
var fullCacheFile = path.join(this.dir, cacheFile);
var result;
Expand Down
2 changes: 1 addition & 1 deletion npm-packages/meteor-babel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let options; // Lazily initialized.
// Make sure that module.importSync and module.export are defined in the
// current Node process.
const Module = module.constructor;
require("reify/lib/runtime").enable(Module.prototype);
require("@meteorjs/reify/lib/runtime").enable(Module.prototype);

// Options passed to compile will completely replace the default options,
// so if you only want to modify the default options, call this function
Expand Down
6 changes: 3 additions & 3 deletions npm-packages/meteor-babel/options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const getESModule = require("reify/lib/runtime/utils.js").getESModule;
const getESModule = require("@meteorjs/reify/lib/runtime/utils.js").getESModule;
const nodeRequire = require;
require = function require(id) {
const exports = nodeRequire(id);
Expand All @@ -10,7 +10,7 @@ require = function require(id) {
const babelRuntimeVersion = require("@babel/runtime/package.json").version;
const babelPresetMeteor = require("babel-preset-meteor");
const babelPresetMeteorModern = require("babel-preset-meteor/modern");
const reifyPlugin = require("reify/plugins/babel");
const reifyPlugin = require("@meteorjs/reify/plugins/babel");

function getReifyPlugin(features) {
return [reifyPlugin, getReifyOptions(features)];
Expand Down Expand Up @@ -110,7 +110,7 @@ function getDefaultsForModernBrowsers(features) {
return finish(features, [combined]);
}

const parserOpts = require("reify/lib/parsers/babel.js").options;
const parserOpts = require("@meteorjs/reify/lib/parsers/babel.js").options;
const util = require("./util.js");

function finish(features, presets) {
Expand Down
Loading

0 comments on commit 472f703

Please sign in to comment.