From 4bf3697f95a3a0491b18fa4a6b14a53a9aaccf2f Mon Sep 17 00:00:00 2001 From: Renan Castro Date: Wed, 3 Nov 2021 16:59:29 -0300 Subject: [PATCH 01/21] 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 02/21] 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 03/21] 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 04/21] 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 05/21] 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 06/21] 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 07/21] 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 08/21] 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 09/21] 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 10/21] 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 11/21] 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 12/21] 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 13/21] 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 14/21] 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 15/21] 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 16/21] 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 17/21] 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 18/21] 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 19/21] 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 20/21] 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 21/21] 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"