From d5b700fc559ca879ee049f7c2358df037cfa9da2 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 27 Oct 2021 10:17:44 +0200 Subject: [PATCH 01/45] Additional info and improvements of docs for passwordless --- docs/source/packages/accounts-passwordless.md | 15 +++++++++++---- .../accounts-passwordless/passwordless_client.js | 7 +++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/source/packages/accounts-passwordless.md b/docs/source/packages/accounts-passwordless.md index aa8552390d..ae620401ad 100644 --- a/docs/source/packages/accounts-passwordless.md +++ b/docs/source/packages/accounts-passwordless.md @@ -3,13 +3,20 @@ title: accounts-passwordless 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. +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" %} + +If the user is signing up you can pass in the `userData` object like in [Accounts.createUser](/api/passwords.html#Accounts-createUser). {% apibox "Meteor.loginWithToken" %} -{% apibox "Accounts.requestLoginTokenForUser" %} -{% apibox "Accounts.sendLoginTokenEmail" %} +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. -### E-mail templates +{% apibox "Accounts.sendLoginTokenEmail" %} +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. + +

E-mail templates

`accounts-passwordless` brings new templates that you can edit to change the look of emails which send code to users. The email template is named `sendLoginToken` and beside `user` and `url`, the templates also receive a data object with `sequence` which is the user's code. diff --git a/packages/accounts-passwordless/passwordless_client.js b/packages/accounts-passwordless/passwordless_client.js index 0bbebfe0d2..50d1c741f6 100644 --- a/packages/accounts-passwordless/passwordless_client.js +++ b/packages/accounts-passwordless/passwordless_client.js @@ -34,7 +34,7 @@ const transformSelector = selector => { /** * @summary Log the user in with a one time token. * @locus Client - * @param {Object} selector + * @param {Object|String} selector Username, email or custom selector to identify the user. * @param {String} token one time token generated by the server * @param {Function} [callback] Optional callback. * Called with no arguments on success, or with a single `Error` argument @@ -62,11 +62,10 @@ Meteor.loginWithToken = (selector, token, callback) => { /** * @summary Request a login token. * @locus Client - * @param {Object} selector - * @param {Object} userData + * @param {Object|String} selector Username, email or custom selector to identify the user. + * @param {Object} userData When creating a user use this data if selector produces no result. * @param {Object} options * @param {String} options.selector The email address to get a token for or username or a mongo selector. - * @param {String} options.userData When creating an user use this data if selector produces no result * @param {String} options.options For example userCreationDisabled. * @param {Function} [callback] Optional callback. Called with no arguments on success, or with a single `Error` argument on failure. */ From 1a4a9e7c63ce722de3a178391aa7c3edff4155dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20N=C3=A9vola?= Date: Thu, 28 Oct 2021 16:29:43 -0400 Subject: [PATCH 02/45] add cache-build explanation to deploy command --- docs/source/commandline.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/source/commandline.md b/docs/source/commandline.md index 5c6ffa53d7..51d9b42c8a 100644 --- a/docs/source/commandline.md +++ b/docs/source/commandline.md @@ -240,7 +240,15 @@ This is necessary as our database provider does not have certificates installed You can change the app plan by providing argument `--plan` with one of the following values: professional, essentials, or free. Be aware that this argument overwrites the `--free` argument. {% pullquote warning %} -The `plan` option is available to Meteor 2.1+ +The `plan` option is available since Meteor 2.1. +{% endpullquote %} + +Use `--cache-build` to keep the bundle in your temp folder after the deploy is finished, this is helpful when you want to deploy the same code to different environments. For example, a [background job](https://cloud-guide.meteor.com/background-jobs.html) app from the same code as the web app. + +Your project should be a git repository as the commit hash is going to be used to decide if your code is still the same or not in the next deploy. + +{% pullquote warning %} +The `cache-build` option is available since Meteor 1.11. {% endpullquote %}

meteor update

From 4046800590ae5ffc409e1466f44dbf4641c9c736 Mon Sep 17 00:00:00 2001 From: Denilson Date: Thu, 28 Oct 2021 17:28:48 -0400 Subject: [PATCH 03/45] Description to the new flag --container-size (#11731) Updating docs, new flag container-size --- docs/source/commandline.md | 6 ++++++ tools/cli/help.txt | 3 +++ 2 files changed, 9 insertions(+) diff --git a/docs/source/commandline.md b/docs/source/commandline.md index 51d9b42c8a..7dac043dae 100644 --- a/docs/source/commandline.md +++ b/docs/source/commandline.md @@ -251,6 +251,12 @@ Your project should be a git repository as the commit hash is going to be used t The `cache-build` option is available since Meteor 1.11. {% endpullquote %} +With the argument `--container-size` you can change your app's container size using the deploy command. The valid arguments are: `tiny`, `compact`, `standard`, `double`, `quad`, `octa`, and `dozen`. To see more about the difference and prices of each one you can check it [here](https://www.meteor.com/cloud#pricing-section). + +{% pullquote warning %} +The `--container-size` option is available since Meteor 2.4.1. +{% endpullquote %} +

meteor update

Attempts to bring you to the latest version of Meteor, and then to upgrade your diff --git a/tools/cli/help.txt b/tools/cli/help.txt index 571b65ba71..04e636de6e 100644 --- a/tools/cli/help.txt +++ b/tools/cli/help.txt @@ -541,6 +541,9 @@ Options: ('galaxy.meteor.com'.env.MONGO_URL), when deploying, Galaxy will create a database to your app in its shared cluster and will insert the URL in your app's settings for you. + --container-size With the argument `--container-size` you can change your app's + container size using the deploy command. The valid arguments are: tiny, + compact, standard, double, quad, octa, and dozen. >>> authorized View or change authorized users and organizations for a site. From 290bf55e3c8c002ff35c0f9553383d7a2f9f4c2e Mon Sep 17 00:00:00 2001 From: softwarecreations Date: Fri, 29 Oct 2021 21:05:29 +0200 Subject: [PATCH 04/45] Added missing commas to Accounts.config example in accounts.md (#11739) Added missing commas to Accounts.config example in accounts.md --- guide/source/accounts.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/source/accounts.md b/guide/source/accounts.md index 7b7c5dd41e..2a83a9ca2f 100644 --- a/guide/source/accounts.md +++ b/guide/source/accounts.md @@ -677,10 +677,10 @@ You could use this to include (white-list) the standard fields as used by [the A Accounts.config({ defaultFieldSelector: { username: 1, - emails: 1 + emails: 1, createdAt: 1, profile: 1, - services: 1 + services: 1, } }); ``` From a6e8746468ac93609be8f112e8d9d87bd45dd8c4 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Mon, 1 Nov 2021 10:08:35 -0300 Subject: [PATCH 05/45] Fix accounts-passwordless jsdoc --- packages/accounts-passwordless/passwordless_client.js | 3 +-- packages/accounts-passwordless/passwordless_server.js | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/accounts-passwordless/passwordless_client.js b/packages/accounts-passwordless/passwordless_client.js index 50d1c741f6..da0eff1c28 100644 --- a/packages/accounts-passwordless/passwordless_client.js +++ b/packages/accounts-passwordless/passwordless_client.js @@ -62,10 +62,9 @@ Meteor.loginWithToken = (selector, token, callback) => { /** * @summary Request a login token. * @locus Client - * @param {Object|String} selector Username, email or custom selector to identify the user. - * @param {Object} userData When creating a user use this data if selector produces no result. * @param {Object} options * @param {String} options.selector The email address to get a token for or username or a mongo selector. + * @param {String} options.userData When creating a user use this data if selector produces no result. * @param {String} options.options For example userCreationDisabled. * @param {Function} [callback] Optional callback. Called with no arguments on success, or with a single `Error` argument on failure. */ diff --git a/packages/accounts-passwordless/passwordless_server.js b/packages/accounts-passwordless/passwordless_server.js index 7c2f965c9d..98403f1ccf 100644 --- a/packages/accounts-passwordless/passwordless_server.js +++ b/packages/accounts-passwordless/passwordless_server.js @@ -208,10 +208,11 @@ Meteor.methods({ /** * @summary Send an email with a link the user can use to login with token. * @locus Server - * @param {String} userId The id of the user to send email to. - * @param {String} sequence The token to be provided - * @param {String} email Which address of the user's to send the email to. - * @param {Object} [extra] Optional. Extra properties + * @param {Object} options + * @param {String} options.userId The id of the user to send email to. + * @param {String} options.sequence The token to be provided + * @param {String} options.email Which address of the user's to send the email to. + * @param {Object} options.[extra] Optional. Extra properties * @returns {Object} Object with {email, user, token, url, options} values. */ Accounts.sendLoginTokenEmail = ({ userId, sequence, email, extra = {} }) => { From 9c77faec133122fb6fd9330fdda4f87abc359529 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Mon, 1 Nov 2021 10:16:45 -0300 Subject: [PATCH 06/45] Fix accounts-passwordless jsdoc - force docs rebuild --- docs/netlify.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/netlify.toml b/docs/netlify.toml index 391633b6f3..0a797829e8 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -1,3 +1,6 @@ [build] publish = "public" command = "npm install && npm run build" +[build] +# Force rebuild! Change this to 0 for ignoring it + ignore = "return 1" From 5d93dc56d0e19a4d78a5fb48d261d65b72736b26 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Mon, 1 Nov 2021 10:18:41 -0300 Subject: [PATCH 07/45] Fix accounts-passwordless jsdoc - force docs rebuild --- docs/netlify.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/netlify.toml b/docs/netlify.toml index 0a797829e8..1391219804 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -1,6 +1,5 @@ [build] publish = "public" command = "npm install && npm run build" -[build] # Force rebuild! Change this to 0 for ignoring it ignore = "return 1" From 394e3c631514cab124787b986854d0685ad7c323 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Mon, 1 Nov 2021 10:26:44 -0300 Subject: [PATCH 08/45] Fix accounts-passwordless jsdoc --- packages/accounts-passwordless/passwordless_client.js | 2 +- packages/accounts-passwordless/passwordless_server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/accounts-passwordless/passwordless_client.js b/packages/accounts-passwordless/passwordless_client.js index da0eff1c28..698f3cd947 100644 --- a/packages/accounts-passwordless/passwordless_client.js +++ b/packages/accounts-passwordless/passwordless_client.js @@ -65,7 +65,7 @@ Meteor.loginWithToken = (selector, token, callback) => { * @param {Object} options * @param {String} options.selector The email address to get a token for or username or a mongo selector. * @param {String} options.userData When creating a user use this data if selector produces no result. - * @param {String} options.options For example userCreationDisabled. + * @param {Object} options.options For example userCreationDisabled. * @param {Function} [callback] Optional callback. Called with no arguments on success, or with a single `Error` argument on failure. */ Accounts.requestLoginTokenForUser = ( diff --git a/packages/accounts-passwordless/passwordless_server.js b/packages/accounts-passwordless/passwordless_server.js index 98403f1ccf..c18517116b 100644 --- a/packages/accounts-passwordless/passwordless_server.js +++ b/packages/accounts-passwordless/passwordless_server.js @@ -212,7 +212,7 @@ Meteor.methods({ * @param {String} options.userId The id of the user to send email to. * @param {String} options.sequence The token to be provided * @param {String} options.email Which address of the user's to send the email to. - * @param {Object} options.[extra] Optional. Extra properties + * @param {Object} options.extra Optional. Extra properties * @returns {Object} Object with {email, user, token, url, options} values. */ Accounts.sendLoginTokenEmail = ({ userId, sequence, email, extra = {} }) => { From 42c5422ca42bd3b8a7156192448dc605daf5aa9d Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Mon, 1 Nov 2021 10:31:12 -0300 Subject: [PATCH 09/45] Fix accounts-passwordless jsdoc - prefer index.md comment change to trigger rebuilds --- docs/netlify.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/netlify.toml b/docs/netlify.toml index 1391219804..391633b6f3 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -1,5 +1,3 @@ [build] publish = "public" command = "npm install && npm run build" -# Force rebuild! Change this to 0 for ignoring it - ignore = "return 1" From 1515a1e0417d8457b2e3c71351165f0b2f32b264 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Mon, 8 Nov 2021 12:04:02 -0300 Subject: [PATCH 10/45] Add meteor-base docker image reference inside install section. --- docs/source/install.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/source/install.md b/docs/source/install.md index fd6b08f18f..7e663b03eb 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -4,7 +4,7 @@ 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. -### Prerequisites and useful information +

Prerequisites and useful information

- Meteor requires Node.js 8 or newer installed for running the npm installer. - Meteor supports Windows 7/Windows Server 2008 R2 and up. @@ -13,7 +13,7 @@ Apple M1 is only supported from Meteor 2.5.1 onward. - iOS development requires the latest Xcode. - **Do not install meteor npm in your project's package.json by any means, the npm library is only an installer.** -### Installation +

Installation

Install the latest official Meteor release from your terminal: @@ -45,7 +45,7 @@ or select Terminal in the Applications folder, press CMD(⌘)+I and check the "O 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). -### Legacy Installation Method +

Legacy Installation Method

For Linux and OS X, we are still providing the legacy installation method which uses a bash script and doesn't depend on Node. @@ -55,5 +55,12 @@ curl https://install.meteor.com/ | sh This installation method is not maintained anymore, and you should always use the NPM one. +

Run Meteor inside Docker

+ +You can also use a Docker container for running Meteor inside your CI, or even in your local development toolchain. + +We do provide the meteor/meteor-base ubuntu-based Docker image, that comes pre-bundled with Node.JS and Meteor, and runs it as a local user (not as root). + +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) From 67cc5bd8305c4601c5380153790f377ad6951ba5 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Thu, 11 Nov 2021 09:30:19 -0300 Subject: [PATCH 11/45] Update install.md --- docs/source/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/install.md b/docs/source/install.md index 7e663b03eb..8de75b2c61 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -55,7 +55,7 @@ curl https://install.meteor.com/ | sh This installation method is not maintained anymore, and you should always use the NPM one. -

Run Meteor inside Docker

+

Run Meteor inside Docker

You can also use a Docker container for running Meteor inside your CI, or even in your local development toolchain. From a185aabf864c513ad4e006621996cd2892e3bfe3 Mon Sep 17 00:00:00 2001 From: Brian Lukoff Date: Fri, 12 Nov 2021 15:04:47 -0600 Subject: [PATCH 12/45] Work around terser bug. (#11758) --- packages/minifier-js/minifier.js | 1 + packages/minifier-js/package.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/minifier-js/minifier.js b/packages/minifier-js/minifier.js index e1053a7e15..1385b203cb 100644 --- a/packages/minifier-js/minifier.js +++ b/packages/minifier-js/minifier.js @@ -22,6 +22,7 @@ export const meteorJsMinify = function (source) { drop_debugger: false, // remove debugger; statements unused: false, // drop unreferenced functions and variables dead_code: true, // remove unreachable code + evaluate: false, // work around issue in terser (possibly https://github.com/terser/terser/issues/837) typeofs: false, // set to false due to known issues in IE10 global_defs: { "process.env.NODE_ENV": NODE_ENV diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 614178d036..1814f183ed 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -4,7 +4,7 @@ Package.describe({ }); Npm.depends({ - terser: "5.8.0" + terser: "5.9.0" }); Package.onUse(function (api) { From 29caf41861db38ac571f2ed50000614e5a61096f Mon Sep 17 00:00:00 2001 From: filipenevola Date: Fri, 12 Nov 2021 17:10:09 -0400 Subject: [PATCH 13/45] Published minifier-js@2.7.2. --- History.md | 4 ++++ packages/minifier-js/.npm/package/npm-shrinkwrap.json | 6 +++--- packages/minifier-js/package.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/History.md b/History.md index b63e454505..e6723400d9 100644 --- a/History.md +++ b/History.md @@ -8,6 +8,10 @@ #### Independent Releases +* `minifier-js@2.7.2` + - Stopped using `evaluate` option in the compression to fix a [bug](https://github.com/meteor/meteor/issues/11756). + - Updated `terser` to [v5.9.0](https://github.com/terser/terser/blob/master/CHANGELOG.md#v590) to fix various bugs + * `github-oauth@1.3.2` - Migrate from `http` to `fetch` - Fix GitHub login params to adhere to changes in GitHub API diff --git a/packages/minifier-js/.npm/package/npm-shrinkwrap.json b/packages/minifier-js/.npm/package/npm-shrinkwrap.json index 5baf50acd4..c68f0d332a 100644 --- a/packages/minifier-js/.npm/package/npm-shrinkwrap.json +++ b/packages/minifier-js/.npm/package/npm-shrinkwrap.json @@ -29,9 +29,9 @@ } }, "terser": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.8.0.tgz", - "integrity": "sha512-f0JH+6yMpneYcRJN314lZrSwu9eKkUFEHLN/kNy8ceh8gaRiLgFPJqrB9HsXjhEGdv4e/ekjTOFxIlL6xlma8A==" + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.9.0.tgz", + "integrity": "sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==" } } } diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 1814f183ed..0e66406e5c 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: "2.7.1" + version: "2.7.2" }); Npm.depends({ From ad22656943f1255783b3ef6ca1a592d1799ab31c Mon Sep 17 00:00:00 2001 From: filipenevola Date: Mon, 15 Nov 2021 15:06:50 -0400 Subject: [PATCH 14/45] Bump standard-minifier-js to version 2.7.2 --- packages/standard-minifier-js/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index b899f2b602..877c3d6a6c 100644 --- a/packages/standard-minifier-js/package.js +++ b/packages/standard-minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'standard-minifier-js', - version: '2.7.1', + version: '2.7.2', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); From 820dacccb502546ac3564e58ec00c9ecec6f512b Mon Sep 17 00:00:00 2001 From: Cereal Killer Date: Wed, 17 Nov 2021 11:19:28 +0100 Subject: [PATCH 15/45] Update install docs (#11745) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update install docs Added note for fish shell users * Update docs/source/install.md fixed typo Co-authored-by: Renan Castro Co-authored-by: Renan Castro Co-authored-by: Filipe Névola --- docs/source/install.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/source/install.md b/docs/source/install.md index 8de75b2c61..bf0cf9b1fa 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -63,4 +63,10 @@ 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) +

Note for fish shell users (Linux)

+ +To be able to user `meteor` command from fish it's needed to include `/home//.meteor` in `$PATH`; to do that just add this line in `/home//.config/fish/config.fish` file (replace `` with your username): + +`set PATH /home//.meteor $PATH` + From 4bf3697f95a3a0491b18fa4a6b14a53a9aaccf2f Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 3 Nov 2021 16:59:29 -0300 Subject: [PATCH 16/45] Start release 2.5.1-beta.0 with mac m1 support --- History.md | 5 +++++ scripts/admin/meteor-release-experimental.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index e6723400d9..e96b60881d 100644 --- a/History.md +++ b/History.md @@ -16,6 +16,11 @@ - Migrate from `http` to `fetch` - Fix GitHub login params to adhere to changes in GitHub API +## v2.5.1, UNRELEASED + +#### Highlights +Mac M1 Support - darwin arm64 + ## v2.5, 2021-10-21 #### Highlights diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 95fce6e667..7599b7e4ba 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "2.5-rc.1", + "version": "2.5.1-beta.0", "recommended": false, "official": false, "description": "Meteor experimental release" From 216ef528e2df64663e1e2d71fb3dde80243de9d6 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 3 Nov 2021 17:06:23 -0300 Subject: [PATCH 17/45] Start release 2.5.1-beta.0 with mac m1 support --- packages/meteor-tool/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 1bce2fb230..1771c10d07 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'The Meteor command-line tool', - version: '2.5.0', + version: '2.5.1-beta.0', }); Package.includeTool(); From 3eb759ba7f82cf1c1b4631a7b9280bf81508ce84 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 3 Nov 2021 17:54:01 -0300 Subject: [PATCH 18/45] Start release 2.5.1-beta.0 with mac m1 support - fix archinfo.ts --- tools/utils/archinfo.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/utils/archinfo.ts b/tools/utils/archinfo.ts index e223ad42d3..d454535355 100644 --- a/tools/utils/archinfo.ts +++ b/tools/utils/archinfo.ts @@ -164,7 +164,11 @@ export function host() { run('sysctl', '-n', 'hw.cpu64bit_capable') !== "1") { throw new Error("Only 64-bit Intel and M1 processors are supported on OS X"); } - _host = "os.osx.x86_64"; + if(arch === "arm"){ + _host = "os.osx.arm64"; + }else{ + _host = "os.osx.x86_64"; + } } else if (platform === "linux") { const machine = run('uname', '-m'); if (["x86_64", "amd64", "ia64"].includes(machine)) { From 73ce60bb741dbd860fa1841df89e9f0f4275099d Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 3 Nov 2021 17:54:42 -0300 Subject: [PATCH 19/45] Start release 2.5.1-beta.0 with mac m1 support - fix archinfo.ts --- packages/meteor-tool/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 1771c10d07..d263119074 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'The Meteor command-line tool', - version: '2.5.1-beta.0', + version: '2.5.1-beta.1', }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 7599b7e4ba..f720203e37 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "2.5.1-beta.0", + "version": "2.5.1-beta.1", "recommended": false, "official": false, "description": "Meteor experimental release" From c126c6faf208d54659f610d2eadcff01e97033e3 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Fri, 22 Oct 2021 16:59:08 -0300 Subject: [PATCH 20/45] Support arm64 on darwin - add installer support --- npm-packages/meteor-installer/config.js | 1 + npm-packages/meteor-installer/install.js | 12 +++++++++--- npm-packages/meteor-installer/package.json | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/npm-packages/meteor-installer/config.js b/npm-packages/meteor-installer/config.js index dfd2401913..6d88c908ec 100644 --- a/npm-packages/meteor-installer/config.js +++ b/npm-packages/meteor-installer/config.js @@ -21,6 +21,7 @@ const meteorLocalFolder = '.meteor'; const meteorPath = path.resolve(rootPath, meteorLocalFolder); module.exports = { + METEOR_LATEST_VERSION, extractPath: rootPath, meteorPath, release: process.env.INSTALL_METEOR_VERSION || METEOR_LATEST_VERSION, diff --git a/npm-packages/meteor-installer/install.js b/npm-packages/meteor-installer/install.js index b752a80f3f..fa26abd30f 100644 --- a/npm-packages/meteor-installer/install.js +++ b/npm-packages/meteor-installer/install.js @@ -17,6 +17,8 @@ const { isRoot, rootPath, sudoUser, + isMac, + METEOR_LATEST_VERSION } = require('./config.js'); const { uninstall } = require('./uninstall'); const { @@ -24,14 +26,18 @@ const { extractWith7Zip, extractWithNativeTar, } = require('./extract.js'); +const semver = require('semver') process.on('unhandledRejection', err => { throw err; }); if (os.arch() !== 'x64') { - console.error('The current architecture is not supported:', os.arch()); - process.exit(1); + const isValidM1Version = semver.gte(METEOR_LATEST_VERSION, '2.5.1'); + if(os.arch() !== 'arm64' || !isMac() || !isValidM1Version){ + console.error('The current architecture is not supported:', os.arch()); + process.exit(1); + } } const downloadPlatform = { @@ -42,7 +48,7 @@ const downloadPlatform = { const url = `https://packages.meteor.com/bootstrap-link?arch=os.${ downloadPlatform[os.platform()] -}.x86_64&release=${release}`; +}.${os.arch() === 'arm64' ? 'arm64' : 'x86_64'}&release=${release}`; const tempPath = tmp.dirSync().name; const tarGzName = 'meteor.tar.gz'; diff --git a/npm-packages/meteor-installer/package.json b/npm-packages/meteor-installer/package.json index cc09065097..cb9e7e0899 100644 --- a/npm-packages/meteor-installer/package.json +++ b/npm-packages/meteor-installer/package.json @@ -14,6 +14,7 @@ "node-7z": "^2.0.5", "node-downloader-helper": "^1.0.11", "rimraf": "^3.0.2", + "semver": "^7.3.5", "tar": "^6.1.0", "tmp": "^0.1.0" }, From 7a614698eda55c48db62d18bd4fd857958783e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20N=C3=A9vola?= Date: Fri, 22 Oct 2021 16:45:38 -0400 Subject: [PATCH 21/45] Update install.js --- npm-packages/meteor-installer/install.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm-packages/meteor-installer/install.js b/npm-packages/meteor-installer/install.js index fa26abd30f..1f58d2e641 100644 --- a/npm-packages/meteor-installer/install.js +++ b/npm-packages/meteor-installer/install.js @@ -35,7 +35,7 @@ process.on('unhandledRejection', err => { if (os.arch() !== 'x64') { const isValidM1Version = semver.gte(METEOR_LATEST_VERSION, '2.5.1'); if(os.arch() !== 'arm64' || !isMac() || !isValidM1Version){ - console.error('The current architecture is not supported:', os.arch()); + console.error('The current architecture is not supported in this version: ', os.arch(), '. Try Meteor 2.5.1 or above.'); process.exit(1); } } From 2be7585937a4036ce0eec483b16ad09fcda99a61 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Thu, 4 Nov 2021 11:33:08 -0300 Subject: [PATCH 22/45] Bump version to 2.5.1 and support plain root installs --- npm-packages/meteor-installer/config.js | 19 +++++++++++++++---- npm-packages/meteor-installer/install.js | 5 ++--- npm-packages/meteor-installer/package.json | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/npm-packages/meteor-installer/config.js b/npm-packages/meteor-installer/config.js index 6d88c908ec..65b24369c7 100644 --- a/npm-packages/meteor-installer/config.js +++ b/npm-packages/meteor-installer/config.js @@ -1,7 +1,7 @@ const path = require('path'); const os = require('os'); -const METEOR_LATEST_VERSION = '2.5'; +const METEOR_LATEST_VERSION = '2.5.1'; const sudoUser = process.env.SUDO_USER || ''; function isRoot() { return process.getuid && process.getuid() === 0; @@ -9,9 +9,20 @@ function isRoot() { const localAppData = process.env.LOCALAPPDATA; const isWindows = () => os.platform() === 'win32'; const isMac = () => os.platform() === 'darwin'; -const rootPath = isWindows() - ? localAppData - : `${isRoot() ? `/home/${sudoUser}` : os.homedir()}`; + +let rootPath; +if (isWindows()) { + rootPath = localAppData; +} else if (isRoot() && sudoUser) { + rootPath = `/home/${sudoUser}`; +} else { + if (isRoot()) { + console.info( + 'You are running the install script as root, without SUDO. This is not recommended and should be avoided. Continuing.' + ); + } + rootPath = os.homedir(); +} if (isWindows() && !localAppData) { throw new Error('LOCALAPPDATA env var is not set.'); diff --git a/npm-packages/meteor-installer/install.js b/npm-packages/meteor-installer/install.js index 1f58d2e641..d451d1690c 100644 --- a/npm-packages/meteor-installer/install.js +++ b/npm-packages/meteor-installer/install.js @@ -31,7 +31,6 @@ const semver = require('semver') process.on('unhandledRejection', err => { throw err; }); - if (os.arch() !== 'x64') { const isValidM1Version = semver.gte(METEOR_LATEST_VERSION, '2.5.1'); if(os.arch() !== 'arm64' || !isMac() || !isValidM1Version){ @@ -246,8 +245,6 @@ function showGettingStarted() { Meteor has been installed! -*You might need to open a new terminal windows to have access to the meteor command.* - To get started fast: $ meteor create ~/my_cool_app @@ -262,6 +259,8 @@ Deploy and host your app with Cloud: www.meteor.com/cloud +*************************************** +*You need to open a new terminal window to have access to the meteor command.* *************************************** `; diff --git a/npm-packages/meteor-installer/package.json b/npm-packages/meteor-installer/package.json index cb9e7e0899..de075aabb4 100644 --- a/npm-packages/meteor-installer/package.json +++ b/npm-packages/meteor-installer/package.json @@ -1,6 +1,6 @@ { "name": "meteor", - "version": "2.5.0", + "version": "2.5.1", "description": "Install Meteor on Windows", "main": "install.js", "scripts": { From 4f16220fa648660ed24fde36f99942e89d7f6c8a Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Fri, 5 Nov 2021 15:31:30 -0300 Subject: [PATCH 23/45] Fix hangs on mac m1 - increase Fiber poolsize when on arm64 --- tools/cli/main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/cli/main.js b/tools/cli/main.js index 1bc7b6f267..09a4873b3d 100644 --- a/tools/cli/main.js +++ b/tools/cli/main.js @@ -20,6 +20,12 @@ import { isEmacs } from "../utils/utils.js"; var main = exports; +if (process.platform === 'darwin' && process.arch === 'arm64') { + // pool size needs to be bigger on m1 because arm64 builds are using + // fibers with CORO_PTHREAD set. - default on fibers is 120 + Fiber.poolSize = 250; +} + require('./flush-buffers-on-exit-in-windows.js'); // node (v8) defaults to only recording 10 lines of stack trace. This From f5673c47d2e18b6b87df07579fff6ed2f2d74043 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Fri, 5 Nov 2021 15:33:03 -0300 Subject: [PATCH 24/45] Release 2.5.1-beta.2 --- npm-packages/meteor-installer/config.js | 2 +- npm-packages/meteor-installer/install.js | 4 ++-- packages/meteor-tool/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/npm-packages/meteor-installer/config.js b/npm-packages/meteor-installer/config.js index 65b24369c7..a0af07eef7 100644 --- a/npm-packages/meteor-installer/config.js +++ b/npm-packages/meteor-installer/config.js @@ -1,7 +1,7 @@ const path = require('path'); const os = require('os'); -const METEOR_LATEST_VERSION = '2.5.1'; +const METEOR_LATEST_VERSION = '2.5.1-beta.2'; const sudoUser = process.env.SUDO_USER || ''; function isRoot() { return process.getuid && process.getuid() === 0; diff --git a/npm-packages/meteor-installer/install.js b/npm-packages/meteor-installer/install.js index d451d1690c..9658d4c6e6 100644 --- a/npm-packages/meteor-installer/install.js +++ b/npm-packages/meteor-installer/install.js @@ -32,9 +32,9 @@ process.on('unhandledRejection', err => { throw err; }); if (os.arch() !== 'x64') { - const isValidM1Version = semver.gte(METEOR_LATEST_VERSION, '2.5.1'); + const isValidM1Version = semver.gte(METEOR_LATEST_VERSION, '2.5.1-beta.2'); if(os.arch() !== 'arm64' || !isMac() || !isValidM1Version){ - console.error('The current architecture is not supported in this version: ', os.arch(), '. Try Meteor 2.5.1 or above.'); + console.error('The current architecture is not supported in this version: ', os.arch(), '. Try Meteor 2.5.1-beta.2 or above.'); process.exit(1); } } diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index d263119074..c74caf1c70 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'The Meteor command-line tool', - version: '2.5.1-beta.1', + version: '2.5.1-beta.2', }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index f720203e37..c3bcf5f116 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "2.5.1-beta.1", + "version": "2.5.1-beta.2", "recommended": false, "official": false, "description": "Meteor experimental release" From 6672090181607382209453ba7ac70247e78fc1d4 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Fri, 5 Nov 2021 19:41:45 -0300 Subject: [PATCH 25/45] Fibers building on arm with UCONTEXT enabled - new dev bundle --- meteor | 2 +- .../eslint-plugin-meteor/scripts/dev-bundle-server-package.js | 2 +- .../eslint-plugin-meteor/scripts/dev-bundle-tool-package.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meteor b/meteor index b340deca4e..59ad833dc4 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=14.18.1.2 +BUNDLE_VERSION=14.18.1.3 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. diff --git a/npm-packages/eslint-plugin-meteor/scripts/dev-bundle-server-package.js b/npm-packages/eslint-plugin-meteor/scripts/dev-bundle-server-package.js index f814d535a6..05dfef42fb 100644 --- a/npm-packages/eslint-plugin-meteor/scripts/dev-bundle-server-package.js +++ b/npm-packages/eslint-plugin-meteor/scripts/dev-bundle-server-package.js @@ -10,7 +10,7 @@ var packageJson = { dependencies: { // Keep the versions of these packages consistent with the versions // found in dev-bundle-tool-package.js. - fibers: "5.0.0", + 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", diff --git a/npm-packages/eslint-plugin-meteor/scripts/dev-bundle-tool-package.js b/npm-packages/eslint-plugin-meteor/scripts/dev-bundle-tool-package.js index 71642bdb00..f08b8068f8 100644 --- a/npm-packages/eslint-plugin-meteor/scripts/dev-bundle-tool-package.js +++ b/npm-packages/eslint-plugin-meteor/scripts/dev-bundle-tool-package.js @@ -19,7 +19,7 @@ var packageJson = { // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.9.0", - fibers: "5.0.0", + fibers: "https://github.com/meteor/node-fibers/archive/refs/tags/5.0.0.tar.gz", reify: "0.22.2", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.15.3", From c2d478dfcf9bc3f748aa6fda6fa8ea7dff371df5 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Fri, 5 Nov 2021 19:52:24 -0300 Subject: [PATCH 26/45] Fix unbound variable on dev-bundle script --- scripts/build-dev-bundle-common.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh index f8175f17e7..d94f954c1e 100644 --- a/scripts/build-dev-bundle-common.sh +++ b/scripts/build-dev-bundle-common.sh @@ -12,6 +12,7 @@ NPM_VERSION=6.14.15 if [ "$UNAME" == "Linux" ] ; then + NODE_BUILD_NUMBER= if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then echo "Unsupported architecture: $ARCH" echo "Meteor only supports i686 and x86_64 for now." @@ -25,6 +26,7 @@ if [ "$UNAME" == "Linux" ] ; then } elif [ "$UNAME" == "Darwin" ] ; then if [ "$ARCH" != "arm64" ] ; then + NODE_BUILD_NUMBER= SYSCTL_64BIT=$(sysctl -n hw.cpu64bit_capable 2>/dev/null || echo 0) if [ "$ARCH" == "i386" -a "1" != "$SYSCTL_64BIT" ] ; then # some older macos returns i386 but can run 64 bit binaries. From db4c77f8b43a25ceba5aac73b6b3ecff11ab78fe Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Sat, 6 Nov 2021 10:55:07 -0300 Subject: [PATCH 27/45] Fibers building on arm with UCONTEXT enabled - new dev bundle --- scripts/dev-bundle-server-package.js | 2 +- scripts/dev-bundle-tool-package.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dev-bundle-server-package.js b/scripts/dev-bundle-server-package.js index f814d535a6..5cd5b07b23 100644 --- a/scripts/dev-bundle-server-package.js +++ b/scripts/dev-bundle-server-package.js @@ -10,7 +10,7 @@ var packageJson = { dependencies: { // Keep the versions of these packages consistent with the versions // found in dev-bundle-tool-package.js. - fibers: "5.0.0", + fibers: "https://github.com/meteor/node-fibers/archive/refs/tags/5.0.0-1.tar.gz", "meteor-promise": "0.9.0", promise: "8.1.0", reify: "0.22.2", diff --git a/scripts/dev-bundle-tool-package.js b/scripts/dev-bundle-tool-package.js index 07fb455a23..8d7ab23cbe 100644 --- a/scripts/dev-bundle-tool-package.js +++ b/scripts/dev-bundle-tool-package.js @@ -19,7 +19,7 @@ var packageJson = { // Keep the versions of these packages consistent with the versions // found in dev-bundle-server-package.js. "meteor-promise": "0.9.0", - fibers: "5.0.0", + fibers: "https://github.com/meteor/node-fibers/archive/refs/tags/5.0.0-1.tar.gz", reify: "0.22.2", // So that Babel can emit require("@babel/runtime/helpers/...") calls. "@babel/runtime": "7.15.3", From 7a200ec4dbf77e8db6170f13d182fff061e45ed9 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Sat, 6 Nov 2021 10:59:27 -0300 Subject: [PATCH 28/45] Beta 2.5.1-beta.3 --- npm-packages/meteor-installer/config.js | 2 +- npm-packages/meteor-installer/install.js | 4 ++-- packages/meteor-tool/package.js | 2 +- scripts/admin/meteor-release-experimental.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/npm-packages/meteor-installer/config.js b/npm-packages/meteor-installer/config.js index a0af07eef7..5688915154 100644 --- a/npm-packages/meteor-installer/config.js +++ b/npm-packages/meteor-installer/config.js @@ -1,7 +1,7 @@ const path = require('path'); const os = require('os'); -const METEOR_LATEST_VERSION = '2.5.1-beta.2'; +const METEOR_LATEST_VERSION = '2.5.1-beta.3'; const sudoUser = process.env.SUDO_USER || ''; function isRoot() { return process.getuid && process.getuid() === 0; diff --git a/npm-packages/meteor-installer/install.js b/npm-packages/meteor-installer/install.js index 9658d4c6e6..7eb9e1ad6b 100644 --- a/npm-packages/meteor-installer/install.js +++ b/npm-packages/meteor-installer/install.js @@ -32,9 +32,9 @@ process.on('unhandledRejection', err => { throw err; }); if (os.arch() !== 'x64') { - const isValidM1Version = semver.gte(METEOR_LATEST_VERSION, '2.5.1-beta.2'); + const isValidM1Version = semver.gte(METEOR_LATEST_VERSION, '2.5.1-beta.3'); if(os.arch() !== 'arm64' || !isMac() || !isValidM1Version){ - console.error('The current architecture is not supported in this version: ', os.arch(), '. Try Meteor 2.5.1-beta.2 or above.'); + console.error('The current architecture is not supported in this version: ', os.arch(), '. Try Meteor 2.5.1-beta.3 or above.'); process.exit(1); } } diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index c74caf1c70..f25d7431f6 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'The Meteor command-line tool', - version: '2.5.1-beta.2', + version: '2.5.1-beta.3', }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index c3bcf5f116..88c577fe38 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "2.5.1-beta.2", + "version": "2.5.1-beta.3", "recommended": false, "official": false, "description": "Meteor experimental release" From 6b3474805b655d772f277b97df3c5c87ad9e005d Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Sat, 6 Nov 2021 11:12:45 -0300 Subject: [PATCH 29/45] Fibers building on arm with UCONTEXT enabled - new dev bundle --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index 59ad833dc4..bfa216cb60 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=14.18.1.3 +BUNDLE_VERSION=14.18.1.4 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 86076423231028c0bb9ddb2a67c0492e30ffa601 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Sat, 6 Nov 2021 11:31:06 -0300 Subject: [PATCH 30/45] Fibers building on arm with UCONTEXT enabled - new dev bundle --- npm-packages/meteor-installer/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm-packages/meteor-installer/package.json b/npm-packages/meteor-installer/package.json index de075aabb4..bc6f9904c9 100644 --- a/npm-packages/meteor-installer/package.json +++ b/npm-packages/meteor-installer/package.json @@ -1,6 +1,6 @@ { "name": "meteor", - "version": "2.5.1", + "version": "2.5.1-beta.3", "description": "Install Meteor on Windows", "main": "install.js", "scripts": { From e8dccac909425a8a7586d8b016ef9c3b6e5ade33 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 10 Nov 2021 14:59:39 -0300 Subject: [PATCH 31/45] Improve meteor-installer: - Support installing as root - Warn when running as root without --unsafe-perm as we cant create any directories - Try to include the meteor bin in the current PATH env var, to avoid having to open another terminal window --- npm-packages/meteor-installer/config.js | 4 ++ npm-packages/meteor-installer/install.js | 61 +++++++++++++++------- npm-packages/meteor-installer/package.json | 2 +- 3 files changed, 46 insertions(+), 21 deletions(-) diff --git a/npm-packages/meteor-installer/config.js b/npm-packages/meteor-installer/config.js index 5688915154..4a3c2209ad 100644 --- a/npm-packages/meteor-installer/config.js +++ b/npm-packages/meteor-installer/config.js @@ -6,6 +6,9 @@ const sudoUser = process.env.SUDO_USER || ''; function isRoot() { return process.getuid && process.getuid() === 0; } +function isSudo() { + return isRoot() && !!sudoUser; +} const localAppData = process.env.LOCALAPPDATA; const isWindows = () => os.platform() === 'win32'; const isMac = () => os.platform() === 'darwin'; @@ -42,4 +45,5 @@ module.exports = { isWindows, isMac, isRoot, + isSudo }; diff --git a/npm-packages/meteor-installer/install.js b/npm-packages/meteor-installer/install.js index 7eb9e1ad6b..6d303678a3 100644 --- a/npm-packages/meteor-installer/install.js +++ b/npm-packages/meteor-installer/install.js @@ -14,11 +14,11 @@ const { startedPath, extractPath, isWindows, - isRoot, rootPath, sudoUser, + isSudo, isMac, - METEOR_LATEST_VERSION + METEOR_LATEST_VERSION, } = require('./config.js'); const { uninstall } = require('./uninstall'); const { @@ -26,15 +26,20 @@ const { extractWith7Zip, extractWithNativeTar, } = require('./extract.js'); -const semver = require('semver') +const semver = require('semver'); +const {isRoot} = require("./config"); process.on('unhandledRejection', err => { throw err; }); if (os.arch() !== 'x64') { const isValidM1Version = semver.gte(METEOR_LATEST_VERSION, '2.5.1-beta.3'); - if(os.arch() !== 'arm64' || !isMac() || !isValidM1Version){ - console.error('The current architecture is not supported in this version: ', os.arch(), '. Try Meteor 2.5.1-beta.3 or above.'); + if (os.arch() !== 'arm64' || !isMac() || !isValidM1Version) { + console.error( + 'The current architecture is not supported in this version: ', + os.arch(), + '. Try Meteor 2.5.1-beta.3 or above.' + ); process.exit(1); } } @@ -49,7 +54,21 @@ const url = `https://packages.meteor.com/bootstrap-link?arch=os.${ downloadPlatform[os.platform()] }.${os.arch() === 'arm64' ? 'arm64' : 'x86_64'}&release=${release}`; -const tempPath = tmp.dirSync().name; +let tempDirObject; +try{ + tempDirObject = tmp.dirSync(); +} catch(e){ + console.error("****************************") + console.error("Couldn't create tmp dir for extracting meteor.") + if(isRoot()){ + console.error("-- \tYou are running npm install -g meteor as root without passing the --unsafe-perm option. Please rerun with this option enabled.\t --") + }else { + console.error("-- \tA possible cause is that you might not have enough space in disk or permission to create folders\t --") + } + console.error("****************************") + process.exit(1); +} +const tempPath = tempDirObject.name; const tarGzName = 'meteor.tar.gz'; const tarName = 'meteor.tar'; @@ -63,7 +82,7 @@ if (fs.existsSync(startedPath)) { } else if (fs.existsSync(meteorPath)) { console.log('Meteor is already installed at', meteorPath); console.log( -`If you want to reinstall it, run: + `If you want to reinstall it, run: $ meteor-installer uninstall $ meteor-installer install @@ -94,6 +113,7 @@ try { console.log('Assuming unable to create symlinks'); } } + download(); function download() { @@ -215,28 +235,29 @@ async function setup() { } async function setupExecPath() { if (isWindows()) { + //set for the current session and beyond + child_process.execSync(`set path "${meteorPath}/;%path%`); child_process.execSync(`setx path "${meteorPath}/;%path%`); return; } - const appendPathToFile = async (file) => { - return fsPromises.appendFile( - `${rootPath}/${file}`, - `export PATH=${meteorPath}:$PATH\n` - ); + const exportCommand = `export PATH=${meteorPath}:$PATH`; - } - if(process.env.SHELL && process.env.SHELL.includes('zsh')){ + const appendPathToFile = async file => { + return fsPromises.appendFile(`${rootPath}/${file}`, `${exportCommand}\n`); + }; + child_process.execSync(exportCommand); + + if (process.env.SHELL && process.env.SHELL.includes('zsh')) { await appendPathToFile('.zshrc'); - }else { + } else { await appendPathToFile('.bashrc'); await appendPathToFile('.bash_profile'); } - if (!isRoot()) { - return; + if (isSudo()) { + // if we identified sudo is being used, we need to change the ownership of the meteorpath folder + child_process.execSync(`chown -R ${sudoUser} "${meteorPath}"`); } - // if we identified sudo is being used, we need to change the ownership of the meteorpath folder - child_process.execSync(`chown -R ${sudoUser} "${meteorPath}"`); } function showGettingStarted() { @@ -260,7 +281,7 @@ Deploy and host your app with Cloud: www.meteor.com/cloud *************************************** -*You need to open a new terminal window to have access to the meteor command.* +You might need to open a new terminal window to have access to the meteor command *************************************** `; diff --git a/npm-packages/meteor-installer/package.json b/npm-packages/meteor-installer/package.json index bc6f9904c9..21bd581ac6 100644 --- a/npm-packages/meteor-installer/package.json +++ b/npm-packages/meteor-installer/package.json @@ -1,6 +1,6 @@ { "name": "meteor", - "version": "2.5.1-beta.3", + "version": "2.5.1-beta.4", "description": "Install Meteor on Windows", "main": "install.js", "scripts": { From 899ecfd24383f2cb547b385a184c09ce2b84a9bd Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 10 Nov 2021 15:05:35 -0300 Subject: [PATCH 32/45] Improve meteor-installer: - Change warning message, process.getguid is not reliable when not using --unsafe-perm --- npm-packages/meteor-installer/install.js | 16 +++++++++------- npm-packages/meteor-installer/package.json | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/npm-packages/meteor-installer/install.js b/npm-packages/meteor-installer/install.js index 6d303678a3..a40372700c 100644 --- a/npm-packages/meteor-installer/install.js +++ b/npm-packages/meteor-installer/install.js @@ -58,13 +58,15 @@ let tempDirObject; try{ tempDirObject = tmp.dirSync(); } catch(e){ - console.error("****************************") - console.error("Couldn't create tmp dir for extracting meteor.") - if(isRoot()){ - console.error("-- \tYou are running npm install -g meteor as root without passing the --unsafe-perm option. Please rerun with this option enabled.\t --") - }else { - console.error("-- \tA possible cause is that you might not have enough space in disk or permission to create folders\t --") - } + console.error("****************************"); + console.error("Couldn't create tmp dir for extracting meteor."); + console.error("There are 2 possible causes:"); + console.error( + '\t1. You are running npm install -g meteor as root without passing the --unsafe-perm option. Please rerun with this option enabled.' + ); + console.error( + '\t2. You might not have enough space in disk or permission to create folders' + ); console.error("****************************") process.exit(1); } diff --git a/npm-packages/meteor-installer/package.json b/npm-packages/meteor-installer/package.json index 21bd581ac6..2266a81285 100644 --- a/npm-packages/meteor-installer/package.json +++ b/npm-packages/meteor-installer/package.json @@ -1,6 +1,6 @@ { "name": "meteor", - "version": "2.5.1-beta.4", + "version": "2.5.1-beta.5", "description": "Install Meteor on Windows", "main": "install.js", "scripts": { From 0f1fca42ec987e81358a6af0f2747aa81a694743 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 10 Nov 2021 15:24:53 -0300 Subject: [PATCH 33/45] Improve meteor-installer: - We can't change the user PATH even if we want to --- npm-packages/meteor-installer/install.js | 16 ++++++++++++---- npm-packages/meteor-installer/package.json | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/npm-packages/meteor-installer/install.js b/npm-packages/meteor-installer/install.js index a40372700c..673f292cb1 100644 --- a/npm-packages/meteor-installer/install.js +++ b/npm-packages/meteor-installer/install.js @@ -27,7 +27,6 @@ const { extractWithNativeTar, } = require('./extract.js'); const semver = require('semver'); -const {isRoot} = require("./config"); process.on('unhandledRejection', err => { throw err; @@ -58,6 +57,8 @@ let tempDirObject; try{ tempDirObject = tmp.dirSync(); } catch(e){ + console.error(""); + console.error(""); console.error("****************************"); console.error("Couldn't create tmp dir for extracting meteor."); console.error("There are 2 possible causes:"); @@ -68,6 +69,8 @@ try{ '\t2. You might not have enough space in disk or permission to create folders' ); console.error("****************************") + console.error("") + console.error("") process.exit(1); } const tempPath = tempDirObject.name; @@ -238,7 +241,6 @@ async function setup() { async function setupExecPath() { if (isWindows()) { //set for the current session and beyond - child_process.execSync(`set path "${meteorPath}/;%path%`); child_process.execSync(`setx path "${meteorPath}/;%path%`); return; } @@ -247,7 +249,6 @@ async function setupExecPath() { const appendPathToFile = async file => { return fsPromises.appendFile(`${rootPath}/${file}`, `${exportCommand}\n`); }; - child_process.execSync(exportCommand); if (process.env.SHELL && process.env.SHELL.includes('zsh')) { await appendPathToFile('.zshrc'); @@ -263,6 +264,9 @@ async function setupExecPath() { } function showGettingStarted() { + const exportCommand = `export PATH=${meteorPath}:$PATH`; + + const runCommand = isWindows() ? `set path "${meteorPath}/;%path%` : exportCommand; const message = ` *************************************** @@ -283,7 +287,11 @@ Deploy and host your app with Cloud: www.meteor.com/cloud *************************************** -You might need to open a new terminal window to have access to the meteor command +You might need to open a new terminal window to have access to the meteor command, or run this in your terminal: + +${runCommand} + +For adding it immediately to your path. *************************************** `; diff --git a/npm-packages/meteor-installer/package.json b/npm-packages/meteor-installer/package.json index 2266a81285..2b9f0e1d84 100644 --- a/npm-packages/meteor-installer/package.json +++ b/npm-packages/meteor-installer/package.json @@ -1,7 +1,7 @@ { "name": "meteor", - "version": "2.5.1-beta.5", - "description": "Install Meteor on Windows", + "version": "2.5.1-beta.9", + "description": "Install Meteor", "main": "install.js", "scripts": { "install": "node cli.js install" From d34a624b592865a16a7524fdd0b540a2e612729a Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 17 Nov 2021 07:14:38 -0300 Subject: [PATCH 34/45] Improve meteor-installer: (#11767) - Avoid local install of meteor-installer --- npm-packages/meteor-installer/install.js | 33 +++++++++++++++++------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/npm-packages/meteor-installer/install.js b/npm-packages/meteor-installer/install.js index 673f292cb1..fc48fc85d3 100644 --- a/npm-packages/meteor-installer/install.js +++ b/npm-packages/meteor-installer/install.js @@ -27,7 +27,18 @@ const { extractWithNativeTar, } = require('./extract.js'); const semver = require('semver'); +const isInstalledGlobally = process.env.npm_config_global === 'true'; +if (!isInstalledGlobally) { + console.error('******************************************'); + console.error( + 'You are not using a global npm context to install, you should never add meteor to your package.json.' + ); + console.error('Make sure you pass -g to npm install.'); + console.error('Aborting'); + console.error('******************************************'); + process.exit(1); +} process.on('unhandledRejection', err => { throw err; }); @@ -54,23 +65,23 @@ const url = `https://packages.meteor.com/bootstrap-link?arch=os.${ }.${os.arch() === 'arm64' ? 'arm64' : 'x86_64'}&release=${release}`; let tempDirObject; -try{ +try { tempDirObject = tmp.dirSync(); -} catch(e){ - console.error(""); - console.error(""); - console.error("****************************"); +} catch (e) { + console.error(''); + console.error(''); + console.error('****************************'); console.error("Couldn't create tmp dir for extracting meteor."); - console.error("There are 2 possible causes:"); + console.error('There are 2 possible causes:'); console.error( '\t1. You are running npm install -g meteor as root without passing the --unsafe-perm option. Please rerun with this option enabled.' ); console.error( '\t2. You might not have enough space in disk or permission to create folders' ); - console.error("****************************") - console.error("") - console.error("") + console.error('****************************'); + console.error(''); + console.error(''); process.exit(1); } const tempPath = tempDirObject.name; @@ -266,7 +277,9 @@ async function setupExecPath() { function showGettingStarted() { const exportCommand = `export PATH=${meteorPath}:$PATH`; - const runCommand = isWindows() ? `set path "${meteorPath}/;%path%` : exportCommand; + const runCommand = isWindows() + ? `set path "${meteorPath}/;%path%` + : exportCommand; const message = ` *************************************** From 5286068dd97d91c428fa6bc363f1b69e693b2803 Mon Sep 17 00:00:00 2001 From: matheusccastro Date: Wed, 17 Nov 2021 07:15:53 -0300 Subject: [PATCH 35/45] Change passwordless loginWithToken method name to passwordlessLoginWithToken (#11766) * Change passwordless loginWithToken method name to passwordlessLoginWithToken. This difference is needed to not overwrite the loginWithToken from accounts-base. * Major version bump for passwordless package. * Fix passwordless documentation about loginWithToken. --- docs/source/packages/accounts-passwordless.md | 2 +- packages/accounts-passwordless/package.js | 2 +- packages/accounts-passwordless/passwordless_client.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/packages/accounts-passwordless.md b/docs/source/packages/accounts-passwordless.md index ae620401ad..2035cc7c67 100644 --- a/docs/source/packages/accounts-passwordless.md +++ b/docs/source/packages/accounts-passwordless.md @@ -10,7 +10,7 @@ The first step to in the passwordless process is for the user to sign-up or requ If the user is signing up you can pass in the `userData` object like in [Accounts.createUser](/api/passwords.html#Accounts-createUser). -{% apibox "Meteor.loginWithToken" %} +{% 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" %} diff --git a/packages/accounts-passwordless/package.js b/packages/accounts-passwordless/package.js index 5640f96188..86cfa7293f 100644 --- a/packages/accounts-passwordless/package.js +++ b/packages/accounts-passwordless/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'No-password login/sign-up support for accounts', - version: '1.0.0', + version: '2.0.0', }); Package.onUse(api => { diff --git a/packages/accounts-passwordless/passwordless_client.js b/packages/accounts-passwordless/passwordless_client.js index 698f3cd947..dc1e5b0bd5 100644 --- a/packages/accounts-passwordless/passwordless_client.js +++ b/packages/accounts-passwordless/passwordless_client.js @@ -41,7 +41,7 @@ const transformSelector = selector => { * on failure. * @importFromPackage meteor */ -Meteor.loginWithToken = (selector, token, callback) => { +Meteor.passwordlessLoginWithToken = (selector, token, callback) => { Accounts.callLoginMethod({ methodArguments: [ { @@ -91,7 +91,7 @@ const checkToken = ({ selector, token }) => { const userId = Tracker.nonreactive(Meteor.userId); if (!userId) { - Meteor.loginWithToken(selector, token, () => { + Meteor.passwordlessLoginWithToken(selector, token, () => { // Make it look clean by removing the authToken from the URL if (window.history) { const url = window.location.href.split('?')[0]; From cd06a68d4fc34a9f5e0660fc4c4c5d7f49fc8d68 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Wed, 17 Nov 2021 06:33:10 -0400 Subject: [PATCH 36/45] Bump Meteor version to 2.5.1 :tada: --- History.md | 29 ++++++++++++++++------ npm-packages/meteor-installer/config.js | 2 +- packages/meteor-tool/package.js | 2 +- scripts/admin/meteor-release-official.json | 2 +- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/History.md b/History.md index e96b60881d..0ac5af40fc 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,4 @@ -## v2.6, 2021-11- +## vNext, UNRELEASED #### Highlights @@ -8,19 +8,34 @@ #### Independent Releases -* `minifier-js@2.7.2` +## v2.5.1, 2021-11-17 + +#### Highlights +- Mac M1 Support - darwin arm64 + +#### 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`. + +#### Meteor Version Release + +* `meteor-tool@2.5.1` + - Meteor supports now Mac M1 chips (darwin arm64) + +* `accounts-passwordless@2.0.0` + - `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`. + +#### Independent Releases +* `minifier-js@2.7.2` - Stopped using `evaluate` option in the compression to fix a [bug](https://github.com/meteor/meteor/issues/11756). - Updated `terser` to [v5.9.0](https://github.com/terser/terser/blob/master/CHANGELOG.md#v590) to fix various bugs + +* `standard-minifier-js@2.7.2` + - Using `minifier-js@2.7.2` * `github-oauth@1.3.2` - Migrate from `http` to `fetch` - Fix GitHub login params to adhere to changes in GitHub API -## v2.5.1, UNRELEASED - -#### Highlights -Mac M1 Support - darwin arm64 - ## v2.5, 2021-10-21 #### Highlights diff --git a/npm-packages/meteor-installer/config.js b/npm-packages/meteor-installer/config.js index 4a3c2209ad..10cf679463 100644 --- a/npm-packages/meteor-installer/config.js +++ b/npm-packages/meteor-installer/config.js @@ -1,7 +1,7 @@ const path = require('path'); const os = require('os'); -const METEOR_LATEST_VERSION = '2.5.1-beta.3'; +const METEOR_LATEST_VERSION = '2.5.1'; const sudoUser = process.env.SUDO_USER || ''; function isRoot() { return process.getuid && process.getuid() === 0; diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index f25d7431f6..df3e5a2a0a 100644 --- a/packages/meteor-tool/package.js +++ b/packages/meteor-tool/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'The Meteor command-line tool', - version: '2.5.1-beta.3', + version: '2.5.1', }); Package.includeTool(); diff --git a/scripts/admin/meteor-release-official.json b/scripts/admin/meteor-release-official.json index e8fa614f33..7eb984c864 100644 --- a/scripts/admin/meteor-release-official.json +++ b/scripts/admin/meteor-release-official.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "2.5", + "version": "2.5.1", "recommended": false, "official": true, "description": "The Official Meteor Distribution" From a4d900e6d01d2ac60e6d991f5717777acc081913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20N=C3=A9vola?= Date: Wed, 17 Nov 2021 07:29:01 -0500 Subject: [PATCH 37/45] Update install.md --- docs/source/install.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/source/install.md b/docs/source/install.md index bf0cf9b1fa..5241f5a3f3 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -69,4 +69,12 @@ To be able to user `meteor` command from fish it's needed to include `/home//.meteor $PATH` +

Uninstalling Meteor

+ +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`  From 3f9593d989119f56e3a2356504c13b679c2d7ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20N=C3=A9vola?= Date: Wed, 17 Nov 2021 07:31:27 -0500 Subject: [PATCH 38/45] Update README.md --- README.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 50baaa0d18..8cfc2e7213 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,10 @@ 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) @@ -69,15 +68,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). From 54ad1eed0ec2025a5a1579271c282584cbb3e38f Mon Sep 17 00:00:00 2001 From: filipenevola Date: Wed, 17 Nov 2021 15:50:42 -0400 Subject: [PATCH 39/45] Bump Meteor version to 2.5.1 :tada: --- npm-packages/meteor-installer/README.md | 2 ++ npm-packages/meteor-installer/package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/npm-packages/meteor-installer/README.md b/npm-packages/meteor-installer/README.md index 8dbdaa4a65..9144843d75 100644 --- a/npm-packages/meteor-installer/README.md +++ b/npm-packages/meteor-installer/README.md @@ -8,6 +8,8 @@ Install Meteor by running: npm install -g meteor ``` +Read more + If Meteor is already installed, it will do nothing. Uninstall by running: diff --git a/npm-packages/meteor-installer/package.json b/npm-packages/meteor-installer/package.json index 2b9f0e1d84..d474af26dc 100644 --- a/npm-packages/meteor-installer/package.json +++ b/npm-packages/meteor-installer/package.json @@ -1,6 +1,6 @@ { "name": "meteor", - "version": "2.5.1-beta.9", + "version": "2.5.1", "description": "Install Meteor", "main": "install.js", "scripts": { From 69dd2452d3ee1f99f57359845a8a0090d8bfb1cd Mon Sep 17 00:00:00 2001 From: filipenevola Date: Wed, 17 Nov 2021 15:59:45 -0400 Subject: [PATCH 40/45] Updating installer readme. --- docs/source/install.md | 15 ++++++++++----- npm-packages/meteor-installer/README.md | 25 +++++-------------------- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/docs/source/install.md b/docs/source/install.md index 5241f5a3f3..3f8dada1e3 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -35,16 +35,11 @@ If you only use sudo because of a distribution default permission system, [check For Apple M1 computers, you can append Rosetta prefix as following: ```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). - -

Legacy Installation Method

For Linux and OS X, we are still providing the legacy installation method which uses a bash script and doesn't depend on Node. @@ -63,6 +58,16 @@ 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) + +

Note for Windows users

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

Node version manager

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

Note for fish shell users (Linux)

To be able to user `meteor` command from fish it's needed to include `/home//.meteor` in `$PATH`; to do that just add this line in `/home//.config/fish/config.fish` file (replace `` with your username): diff --git a/npm-packages/meteor-installer/README.md b/npm-packages/meteor-installer/README.md index 9144843d75..466053de88 100644 --- a/npm-packages/meteor-installer/README.md +++ b/npm-packages/meteor-installer/README.md @@ -1,31 +1,12 @@ ## Meteor Installer -Requires [Node.js](https://nodejs.org/) 12 or newer. - Install Meteor by running: ```bash npm install -g meteor ``` -Read more - -If Meteor is already installed, it will do nothing. - -Uninstall by running: - -```bash -meteor-installer uninstall -npm uninstall -g meteor -``` - -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. - -It is not recommended running the installer and `meteor` as administrator. Otherwise, if the administrator is a separate user the `meteor` command might not always be found. If your current setup needs administrator rights to use npm install -g (sudo), you will need to run it with "sudo npm install -g meteor --unsafe-perm". -We strongly advise against this. You can always change your npm modules permissions to your current user, more info [here](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally): - -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. - +[Read more](https://www.meteor.com/developers/install) ### Meteor version relationship @@ -41,4 +22,8 @@ If you use a node version manager that uses a separate global `node_modules` fol | 2.4.0 | 2.4 | | 2.4.1 | 2.4 | | 2.5.0 | 2.5 | +| 2.5.1 | 2.5.1 | +### Important note + +This npm package is not Meteor itself, this npm package is just an installer. You should not include it as a dependency in your project. If you do your deploy is going to be broken. From 2467bd5414210eaf4e7fa2576e7b3111271cb5ba Mon Sep 17 00:00:00 2001 From: filipenevola Date: Wed, 17 Nov 2021 16:05:50 -0400 Subject: [PATCH 41/45] Adding section Troubleshooting to install readme --- docs/source/install.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/source/install.md b/docs/source/install.md index 3f8dada1e3..34850d401a 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -21,6 +21,9 @@ Install the latest official Meteor release from your terminal: npm install -g meteor ``` + +

Troubleshooting

+ 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 @@ -32,7 +35,11 @@ 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`. + +

Old Versions on Apple M1

+ +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 From f3057119eb23659e0479a59cdf08d6c9e7fa3f49 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Thu, 18 Nov 2021 16:09:31 -0300 Subject: [PATCH 42/45] Update install.md --- docs/source/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/install.md b/docs/source/install.md index 34850d401a..7d34addf8d 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -6,7 +6,7 @@ Apple M1 is only supported from Meteor 2.5.1 onward.

Prerequisites and useful information

-- Meteor requires Node.js 8 or newer installed for running the npm installer. +- Meteor requires Node.js 10 or newer installed for running the npm installer. - 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. From c32982f021f6b26921e4733c71d03ad9e3716b55 Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Thu, 18 Nov 2021 17:32:24 -0300 Subject: [PATCH 43/45] Update install.md --- docs/source/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/install.md b/docs/source/install.md index 7d34addf8d..41fd838897 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -6,7 +6,7 @@ Apple M1 is only supported from Meteor 2.5.1 onward.

Prerequisites and useful information

-- Meteor requires Node.js 10 or newer installed for running the npm installer. +- 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. From 5359dd81196f332208408964f6c0496de9b7eb35 Mon Sep 17 00:00:00 2001 From: filipenevola Date: Thu, 18 Nov 2021 16:58:01 -0400 Subject: [PATCH 44/45] Updating README to include changelog link --- History.md | 2 +- README.md | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/History.md b/History.md index 0ac5af40fc..f63a223ebe 100644 --- a/History.md +++ b/History.md @@ -11,7 +11,7 @@ ## 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`. diff --git a/README.md b/README.md index 8cfc2e7213..cea88d8e34 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ Try a getting started tutorial: 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 @@ -32,22 +34,16 @@ 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 ``` @@ -55,10 +51,10 @@ meteor 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: From 816c5fb6aed817ee4b4f2871487e2cc3149e78df Mon Sep 17 00:00:00 2001 From: filipenevola Date: Thu, 18 Nov 2021 17:00:27 -0400 Subject: [PATCH 45/45] Update docs --- docs/source/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/index.md b/docs/source/index.md index eee193eb66..b8c660f282 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -34,4 +34,4 @@ Meteor is a full-stack JavaScript platform for developing modern web and mobile {% oldRedirects %} - +