Merge branch 'release-3.1.1' into leonardo/refactor-and-perf-phase-2

This commit is contained in:
Leonardo Venturini
2024-11-26 12:33:52 -04:00
54 changed files with 538 additions and 169 deletions

View File

@@ -76,8 +76,8 @@ run_save_node_bin: &run_save_node_bin
fi
# This environment is set to every job (and the initial build).
build_machine_environment: &build_machine_environment
# Specify that we want an actual machine (ala Circle 1.0), not a Docker image.
build_machine_environment:
&build_machine_environment # Specify that we want an actual machine (ala Circle 1.0), not a Docker image.
docker:
- image: meteor/circleci:2024.09.11-android-34-node-20
resource_class: large
@@ -104,8 +104,8 @@ build_machine_environment: &build_machine_environment
# These will be evaled before each command.
PRE_TEST_COMMANDS: |-
ulimit -c unlimited; # Set core dump size as Ubuntu 14.04 lacks prlimit.
ulimit -a # Display all ulimit settings for transparency.
ulimit -c unlimited; # Set core dump size as Ubuntu 14.04 lacks prlimit.
ulimit -a # Display all ulimit settings for transparency.
# This is only to make Meteor self-test not remind us that we can set
# this argument for self-tests.
@@ -765,7 +765,9 @@ jobs:
if [[ -n "$CIRCLE_PULL_REQUEST" ]]; then
PR_NUMBER=$(echo $CIRCLE_PULL_REQUEST | sed 's|.*/pull/\([0-9]*\)|\1|')
PR_BRANCH=$(curl -s https://api.github.com/repos/meteor/meteor/pulls/$PR_NUMBER | jq -r .head.ref)
git clone --branch $PR_BRANCH https://github.com/meteor/meteor.git ${CHECKOUT_METEOR_DOCS}
git clone https://github.com/meteor/meteor.git ${CHECKOUT_METEOR_DOCS}
cd ${CHECKOUT_METEOR_DOCS}
git fetch origin pull/$PR_NUMBER/head:$PR_BRANCH
else
git clone --branch $CIRCLE_BRANCH https://github.com/meteor/meteor.git ${CHECKOUT_METEOR_DOCS}
fi

40
.envrc
View File

@@ -71,3 +71,43 @@ function @summarize-changes {
echo "$changes" | llm -s "Summarize the following changes in a few sentences:"
}
function @packages-bumped {
git diff --name-only devel...$(git branch --show-current) | grep "packages/.*/package.js$" | while IFS= read -r file; do
if ! git show devel:$file > /dev/null 2>&1; then
continue
fi
old=$(git show devel:$file | grep -o "version: *['\"][^'\"]*['\"]" | sed "s/version: *.['\"]//;s/['\"].*//")
version=$(grep -o "version: *['\"][^'\"]*['\"]" "$file" | sed "s/version: *.['\"]//;s/['\"].*//")
name=$(grep -o "name: *['\"][^'\"]*['\"]" "$file" | sed "s/name: *.['\"]//;s/['\"].*//")
pkg_name=$(echo "$file" | sed -E 's|packages/([^/]*/)?([^/]*)/package\.js|\2|')
version_in_red=$(tput setaf 1)$version$(tput sgr0)
if [[ "$version" != "$old" ]]; then
echo "- $pkg_name@$version_in_red"
fi
done
}
function @packages-bumped-npm {
git diff --name-only devel...$(git branch --show-current) | grep "npm-packages/.*/package.json$" | while IFS= read -r file; do
if ! git show devel:$file > /dev/null 2>&1; then
continue
fi
old=$(git show devel:$file | grep -o "version: *['\"][^'\"]*['\"]" | sed "s/version: *.['\"]//;s/['\"].*//")
version=$(grep -o "\"version\": *['\"][^'\"]*['\"]" "$file" | sed "s/\"version\": *.['\"]//;s/['\"].*//")
name=$(grep -o "\"name\": *['\"][^'\"]*['\"]" "$file" | sed "s/\"name\": *.['\"]//;s/['\"].*//")
pkg_name=$(echo "$file" | sed -E 's|npm-packages/([^/]*/)?([^/]*)/package\.json|\2|')
version_in_red=$(tput setaf 1)$version$(tput sgr0)
if [[ "$version" != "$old" ]]; then
echo "- $pkg_name@$version_in_red"
fi
done
}

2
meteor
View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
BUNDLE_VERSION=22.11.0.2
BUNDLE_VERSION=22.11.0.4
# OS Check. Put here because here is where we download the precompiled

View File

@@ -1,7 +1,7 @@
const os = require('os');
const path = require('path');
const METEOR_LATEST_VERSION = '3.1-beta.0';
const METEOR_LATEST_VERSION = '3.1';
const sudoUser = process.env.SUDO_USER || '';
function isRoot() {
return process.getuid && process.getuid() === 0;

View File

@@ -1,12 +1,12 @@
{
"name": "meteor",
"version": "3.1.0-beta.0",
"version": "3.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "meteor",
"version": "3.1.0-beta.0",
"version": "3.1.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "meteor",
"version": "3.1.0-beta.1",
"version": "3.1.0",
"description": "Install Meteor",
"main": "install.js",
"scripts": {

View File

@@ -1,49 +1,49 @@
Package.describe({
summary: "Password support for accounts",
// Note: 2.2.0-beta.3 was published during the Meteor 1.6 prerelease
// process, so it might be best to skip to 2.3.x instead of reusing
// 2.2.x in the future. The version was also bumped to 2.0.0 temporarily
// during the Meteor 1.5.1 release process, so versions 2.0.0-beta.2
// through -beta.5 and -rc.0 have already been published.
version: "3.0.2",
});
Npm.depends({
bcrypt: "5.0.1",
});
Package.onUse((api) => {
api.use(["accounts-base", "sha", "ejson", "ddp"], ["client", "server"]);
// Export Accounts (etc) to packages using this one.
api.imply("accounts-base", ["client", "server"]);
api.use("email", "server");
api.use("random", "server");
api.use("check", "server");
api.use("ecmascript");
api.addFiles("email_templates.js", "server");
api.addFiles("password_server.js", "server");
api.addFiles("password_client.js", "client");
});
Package.onTest((api) => {
api.use([
"accounts-password",
"sha",
"tinytest",
"test-helpers",
"tracker",
"accounts-base",
"random",
"email",
"check",
"ddp",
"ecmascript",
]);
api.addFiles("password_tests_setup.js", "server");
api.addFiles("password_tests.js", ["client", "server"]);
api.addFiles("email_tests_setup.js", "server");
api.addFiles("email_tests.js", "client");
});
Package.describe({
summary: "Password support for accounts",
// Note: 2.2.0-beta.3 was published during the Meteor 1.6 prerelease
// process, so it might be best to skip to 2.3.x instead of reusing
// 2.2.x in the future. The version was also bumped to 2.0.0 temporarily
// during the Meteor 1.5.1 release process, so versions 2.0.0-beta.2
// through -beta.5 and -rc.0 have already been published.
version: "3.0.3",
});
Npm.depends({
bcrypt: "5.0.1",
});
Package.onUse((api) => {
api.use(["accounts-base", "sha", "ejson", "ddp"], ["client", "server"]);
// Export Accounts (etc) to packages using this one.
api.imply("accounts-base", ["client", "server"]);
api.use("email", "server");
api.use("random", "server");
api.use("check", "server");
api.use("ecmascript");
api.addFiles("email_templates.js", "server");
api.addFiles("password_server.js", "server");
api.addFiles("password_client.js", "client");
});
Package.onTest((api) => {
api.use([
"accounts-password",
"sha",
"tinytest",
"test-helpers",
"tracker",
"accounts-base",
"random",
"email",
"check",
"ddp",
"ecmascript",
]);
api.addFiles("password_tests_setup.js", "server");
api.addFiles("password_tests.js", ["client", "server"]);
api.addFiles("email_tests_setup.js", "server");
api.addFiles("email_tests.js", "client");
});

View File

@@ -1,7 +1,7 @@
Package.describe({
name: "babel-compiler",
summary: "Parser/transpiler for ECMAScript 2015+ syntax",
version: '7.11.2-beta310.0',
version: '7.11.2',
});
Npm.depends({

View File

@@ -2,7 +2,7 @@ Package.describe({
// These tests are in a separate package so that we can Npm.depend on
// parse5, a html parsing library.
summary: "Tests for the boilerplate-generator package",
version: '1.5.3-beta310.0',
version: '1.5.3',
documentation: null
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Meteor's latency-compensated distributed data client",
version: "3.0.3-beta310.0",
version: "3.0.3",
documentation: null,
});

View File

@@ -1351,33 +1351,33 @@ Object.assign(Server.prototype, {
},
/**
* @summary Set publication strategy for the given publication. Publications strategies are available from `DDPServer.publicationStrategies`. You call this method from `Meteor.server`, like `Meteor.server.setPublicationStrategy()`
* @summary Set publication strategy for the given collection. Publications strategies are available from `DDPServer.publicationStrategies`. You call this method from `Meteor.server`, like `Meteor.server.setPublicationStrategy()`
* @locus Server
* @alias setPublicationStrategy
* @param publicationName {String}
* @param collectionName {String}
* @param strategy {{useCollectionView: boolean, doAccountingForCollection: boolean}}
* @memberOf Meteor.server
* @importFromPackage meteor
*/
setPublicationStrategy(publicationName, strategy) {
setPublicationStrategy(collectionName, strategy) {
if (!Object.values(publicationStrategies).includes(strategy)) {
throw new Error(`Invalid merge strategy: ${strategy}
for collection ${publicationName}`);
for collection ${collectionName}`);
}
this._publicationStrategies[publicationName] = strategy;
this._publicationStrategies[collectionName] = strategy;
},
/**
* @summary Gets the publication strategy for the requested publication. You call this method from `Meteor.server`, like `Meteor.server.getPublicationStrategy()`
* @summary Gets the publication strategy for the requested collection. You call this method from `Meteor.server`, like `Meteor.server.getPublicationStrategy()`
* @locus Server
* @alias getPublicationStrategy
* @param publicationName {String}
* @param collectionName {String}
* @memberOf Meteor.server
* @importFromPackage meteor
* @return {{useCollectionView: boolean, doAccountingForCollection: boolean}}
*/
getPublicationStrategy(publicationName) {
return this._publicationStrategies[publicationName]
getPublicationStrategy(collectionName) {
return this._publicationStrategies[collectionName]
|| this.options.defaultPublicationStrategy;
},

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Meteor's latency-compensated distributed data server",
version: "3.0.3-beta310.0",
version: "3.0.3",
documentation: null,
});

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'ecmascript',
version: '0.16.10-beta310.1',
version: '0.16.10',
summary: 'Compiler plugin that supports ES2015+ in all .js files',
documentation: 'README.md',
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Send email messages",
version: "3.1.1-beta310.0",
version: "3.1.1",
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'The Meteor command-line tool',
version: '3.1.0-beta310.0',
summary: "The Meteor command-line tool",
version: "3.1.0",
});
Package.includeTool();

View File

@@ -2,7 +2,7 @@
Package.describe({
summary: "Core Meteor environment",
version: '2.0.2-beta310.0',
version: '2.0.2',
});
Package.registerBuildPlugin({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "JavaScript minifier",
version: '3.0.1-beta310.0',
version: '3.0.1',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Meteor's client-side datastore: a port of MongoDB to Javascript",
version: "2.0.2-beta310.0",
version: "2.0.2",
});
Package.onUse((api) => {

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "modules",
version: '0.20.3-beta310.0',
version: '0.20.3',
summary: "CommonJS module system",
documentation: "README.md"
});

View File

@@ -9,7 +9,7 @@
Package.describe({
summary: "Adaptor for using MongoDB and Minimongo over DDP",
version: "2.0.3-beta310.0",
version: "2.0.3",
});
Npm.depends({

View File

@@ -3,7 +3,7 @@ Package.describe({
summary: 'Compiler for CoffeeScript code, supporting the coffeescript package',
// This version of NPM `coffeescript` module, with _1, _2 etc.
// If you change this, make sure to also update ../coffeescript/package.js to match.
version: '2.4.2-beta310.0'
version: '2.4.2'
});
Npm.depends({

View File

@@ -6,7 +6,7 @@ Package.describe({
// so bumping the version of this package will be how they get newer versions
// of `coffeescript-compiler`. If you change this, make sure to also update
// ../coffeescript-compiler/package.js to match.
version: '2.7.2-beta310.0'
version: '2.7.2'
});
Package.registerBuildPlugin({

View File

@@ -1,5 +1,5 @@
allow-deny@2.0.0
babel-compiler@7.11.2-beta310.0
babel-compiler@7.11.2
babel-runtime@1.5.2
base64@1.0.13
binary-heap@1.0.12
@@ -8,12 +8,12 @@ callback-hook@1.6.0
check@1.4.4
core-runtime@1.0.0
ddp@1.4.2
ddp-client@3.0.3-beta310.0
ddp-client@3.0.3
ddp-common@1.4.4
ddp-server@3.0.3-beta310.0
ddp-server@3.0.3
diff-sequence@1.1.3
dynamic-import@0.7.4
ecmascript@0.16.9
ecmascript@0.16.10
ecmascript-runtime@0.8.3
ecmascript-runtime-client@0.12.2
ecmascript-runtime-server@0.11.1
@@ -24,18 +24,18 @@ geojson-utils@1.0.12
id-map@1.2.0
insecure@1.0.8
inter-process-messaging@0.1.2
local-test:mongo-decimal@0.1.6-beta310.0
local-test:mongo-decimal@0.2.0
logging@1.3.5
meteor@2.0.2-beta310.0
minimongo@2.0.2-beta310.0
meteor@2.0.2
minimongo@2.0.2
modern-browsers@0.1.11
modules@0.20.3-beta310.0
modules@0.20.3
modules-runtime@0.13.2
mongo@2.0.3-beta310.0
mongo-decimal@0.1.6-beta310.0
mongo@2.0.3
mongo-decimal@0.2.0
mongo-dev-server@1.1.1
mongo-id@1.0.9
npm-mongo@4.17.3-beta310.0
npm-mongo@6.10.0
ordered-dict@1.2.0
promise@1.0.0
random@1.2.2
@@ -44,8 +44,8 @@ reload@1.3.2
retry@1.1.1
routepolicy@1.1.2
socket-stream-client@0.5.3
tinytest@1.3.1-beta310.0
tinytest@1.3.1
tracker@1.3.4
typescript@5.6.3-beta310.0
webapp@2.0.4-beta310.0
typescript@5.6.3
webapp@2.0.4
webapp-hashing@1.1.2

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "JS simulation of MongoDB Decimal128 type",
version: '0.1.6-beta310.0',
version: '0.2.0',
});
Npm.depends({

View File

@@ -3,7 +3,7 @@
Package.describe({
summary: "Wrapper around the mongo npm package",
version: "4.17.3-beta310.0",
version: "6.10.0",
documentation: null,
});

View File

@@ -2,8 +2,9 @@
Package.describe({
summary: "Authorization package for Meteor",
version: "1.0.0-beta310.0",
version: "1.0.0",
name: "roles",
documentation: null,
});
Package.onUse(function (api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
name: "shell-server",
version: '0.6.1-beta310.0',
version: '0.6.1',
summary: "Server-side component of the `meteor shell` command.",
documentation: "README.md"
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Utility functions for tests",
version: "2.0.2-beta310.0",
version: "2.0.2",
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'Run tests noninteractively, with results going to the console.',
version: '2.0.1-beta310.0',
version: '2.0.1',
});
Package.onUse(function(api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Tiny testing framework",
version: '1.3.1-beta310.0',
version: '1.3.1',
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
Package.describe({
name: 'typescript',
version: '5.6.3-beta310.0',
version: '5.6.3',
summary:
'Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files',
documentation: 'README.md',

View File

@@ -1,5 +1,11 @@
try {
require("url-search-params-polyfill");
URLSearchParams = window.URLSearchParams;
exports.URLSearchParams = URLSearchParams;
require("core-js/proposals/url");
URL = window.URL;
exports.URL = URL;
} catch (e) {
throw new Error([
"The core-js npm package could not be found in your node_modules ",

View File

@@ -1,12 +1,13 @@
Package.describe({
name: "url",
version: '1.3.4',
version: '1.3.5',
summary: "Isomorphic modern/legacy/Node polyfill for WHATWG URL/URLSearchParams",
documentation: "README.md"
});
Npm.depends({
"core-js": "3.38.1"
"core-js": "3.39.0",
"url-search-params-polyfill": "8.2.5",
});
Package.onUse(function(api) {

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Serves a Meteor app over HTTP",
version: "2.0.4-beta310.0",
version: "2.0.4",
});
Npm.depends({

View File

@@ -1,6 +1,6 @@
{
"track": "METEOR",
"version": "3.1-beta.0",
"version": "3.1-rc.0",
"recommended": false,
"official": false,
"description": "Meteor experimental release"

View File

@@ -1,6 +1,6 @@
{
"track": "METEOR",
"version": "3.0.4",
"version": "3.1",
"recommended": false,
"official": true,
"description": "The Official Meteor Distribution"

View File

@@ -463,6 +463,8 @@ to Cordova project`, async () => {
let platformSpec = version ? `${platform}@${version}` : platform;
await cordova_lib.platform('add', platformSpec, this.defaultOptions);
const installedPlugins = this.listInstalledPluginVersions();
// As per Npm 8, we need now do inject a package.json file
// with the dependencies so that when running any npm command
// it keeps the dependencies installed.
@@ -482,10 +484,11 @@ to Cordova project`, async () => {
const packageJsonObj = Object.entries(packages).reduce((acc, [key, value]) => {
const name = getPackageName(key);
const originalPluginVersion = installedPlugins[name];
return ({
dependencies: {
...acc.dependencies,
[name]: value.version,
[name]: originalPluginVersion || value.version,
}
});
}, { dependencies: { [`cordova-${platform}`]: version } });

View File

@@ -466,7 +466,7 @@ exports.handlePackageServerConnectionError = function (error) {
};
// Update the package metdata in the server catalog. Chane the docs,
// Update the package metadata in the server catalog. Change the docs,
// descriptions and the Git URL to new values.
//
// options:
@@ -537,7 +537,7 @@ exports.updatePackageMetadata = async function (options) {
// Upload the new Readme.
await buildmessage.enterJob('uploading documentation', async function () {
var readmePath = saveReadmeToTmp(readmeInfo);
var readmePath = await saveReadmeToTmp(readmeInfo);
var uploadInfo =
await callPackageServerBM(conn, "createReadme", versionIdentifier);
if (!uploadInfo) {

View File

@@ -1,4 +1,5 @@
import { defineConfig } from "vitepress";
import metadata from "../generators/meteor-versions/metadata.generated";
// https://vitepress.dev/reference/site-config
export default defineConfig({
@@ -127,6 +128,22 @@ export default defineConfig({
},
{ text: "API", link: "/api/" },
{ text: "Galaxy Cloud", link: "https://www.meteor.com/cloud" },
{
text: metadata.currentVersion,
items: metadata.versions.reverse().map((v) => {
if (v.isCurrent) {
return {
text: `${v.version} (Current)`,
link: "/",
activeMatch: "/",
};
}
return {
text: v.version,
link: v.url,
};
}),
},
],
sidebar: [
{

View File

@@ -0,0 +1,19 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { useRouter } from "vitepress";
const router = useRouter();
let url = ref(`https://docs.meteor.com${router.route.path}`);
if (typeof window !== 'undefined') watch(() => router.route.path, (path) =>
url.value = `https://docs.meteor.com${path}`
, { immediate: true })
</script>
<template>
<div class="warning custom-block">
<p class="custom-block-title">Warning</p>
<p>You are viewing an old version of the Meteor documentation. Click <a v-bind:href="url">here</a> to
go to the latest version.</p>
</div>
<br />
</template>

View File

@@ -1,8 +1,9 @@
<script setup lang="ts">
import NotFound from './NotFound.vue'
import GoToLatest from './GoToLatest.vue'
import { useData, useRouter } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { nextTick, provide } from 'vue'
import { nextTick, provide, ref, onMounted } from 'vue'
import { redirect } from './redirects/script';
const { isDark } = useData()
const router = useRouter()
@@ -48,13 +49,24 @@ provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => {
}
)
})
const isLatestVersion = ref(true);
onMounted(() => {
isLatestVersion.value = isClient && window.location.href.startsWith("https://docs.meteor.com/")
});
</script>
<template>
<DefaultTheme.Layout >
<DefaultTheme.Layout>
<template #not-found>
<NotFound />
</template>
<template #doc-before v-if="!isLatestVersion">
<GoToLatest />
</template>
</DefaultTheme.Layout>
</template>
@@ -82,4 +94,4 @@ provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => {
.VPSwitchAppearance .check {
transform: none !important;
}
</style>
</style>

View File

@@ -1,4 +1,3 @@
# Install
You need to install the Meteor command line tool to create, run, and manage your Meteor.js projects. Check the prerequisites and follow the installation process below.
@@ -9,7 +8,6 @@ npx meteor
## Prerequisites {#prereqs}
### Operating System (OS) {#prereqs-os}
- Meteor currently supports **OS X, Windows, and Linux**. Only 64-bit is supported.
@@ -19,12 +17,10 @@ npx meteor
- Disabling antivirus (Windows Defender, etc.) will improve performance.
- For compatibility, Linux binaries are built with CentOS 6.4 i386/amd64.
### Mobile Development {#prereqs-mobile}
- iOS development requires the latest Xcode.
## Installation
Install the latest official version of Meteor.js from your terminal by running one of the commands below. You can check our [changelog](https://v3-docs.meteor.com/history.html) for the release notes.
@@ -65,10 +61,9 @@ curl https://install.meteor.com/\?release\=2.8 | sh
> Do not install the npm Meteor Tool in your project's package.json. This library is just an installer.
## Troubleshooting {#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:
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
sudo npm install -g meteor --unsafe-perm
@@ -81,7 +76,6 @@ If you only use sudo because of a distribution default permission system, [check
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`.
## PATH management {#path-management}
By default, the Meteor installer adds its install path (by default, `~/.meteor/`) to your PATH by updating either your `.bashrc`, `.bash_profile`, or `.zshrc` as appropriate. To disable this behavior, install Meteor by running:
@@ -90,11 +84,8 @@ By default, the Meteor installer adds its install path (by default, `~/.meteor/`
npm install -g meteor --ignore-meteor-setup-exec-path --foreground-script
```
(or by setting the environment variable `npm_config_ignore_meteor_setup_exec_path=true`)
## Old Versions on Apple M1 {#old-versions-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):
@@ -105,7 +96,6 @@ arch -x86_64 npm install -g meteor
or select Terminal in the Applications folder, press CMD(⌘)+I and check the "Open using Rosetta" option.
## Meteor Docker image {#meteor-docker}
You can also use a Docker container for running Meteor inside your CI, or even in your local development toolchain.
@@ -114,26 +104,20 @@ 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 {#windows}
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 {#nvm}
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) {#fish-shell}
To be able to use the `meteor` command from fish it's needed to include `/home/<user>/.meteor` in `$PATH`; to do that just add this line in `/home/<user>/.config/fish/config.fish` file (replace `<user>` with your username):
`set PATH /home/<user>/.meteor $PATH`
## Uninstalling Meteor {#uninstall}
If you installed Meteor using npx, you can remove it by running:
@@ -145,4 +129,4 @@ npx meteor uninstall
If you installed Meteor using curl or as a fallback solution, run:
`rm -rf ~/.meteor`
`sudo rm /usr/local/bin/meteor` 
`sudo rm /usr/local/bin/meteor`

View File

@@ -123,6 +123,7 @@
### [reload](https://github.com/meteor/meteor/tree/devel/packages/reload) {#reload}
### [reload-safetybelt](https://github.com/meteor/meteor/tree/devel/packages/reload-safetybelt) {#reload-safetybelt}
### [retry](https://github.com/meteor/meteor/tree/devel/packages/retry) {#retry}
### [roles](https://github.com/meteor/meteor/tree/devel/packages/roles) {#roles}
### [routepolicy](https://github.com/meteor/meteor/tree/devel/packages/routepolicy) {#routepolicy}
### [server-render](https://github.com/meteor/meteor/tree/devel/packages/server-render) {#server-render}
### [service-configuration](https://github.com/meteor/meteor/tree/devel/packages/service-configuration) {#service-configuration}

View File

@@ -32,7 +32,7 @@ organized changelog, since all the files will be reflecting at least one version
## Update ordering.
If you want to make sure that the changelog is correcly ordered, take a look at the `order-packages.js` file.
If you want to make sure that the changelog is correctly ordered, take a look at the `order-packages.js` file.
to use it, run the command below:
```bash

View File

@@ -1,12 +1,24 @@
## v3.1.0, 2024-xx-xx
## v3.1.0, 2024-11-20
### Highlights
N/A
- Upgrade to Node v22
- Upgrade Mongo Driver to v6
- Upgrade Express to v5
- HMR performance improvements
- Bring the `roles` package into the core
- Solve remaining issues with Top Level Await and Reify
- Refactor part of the real-time code in the `mongo` package into TypeScript
- Deprecate `underscore` and eliminate it from packages
- Fix Cordova dependency issues
- Simplify Meteor.EnvironmentVariable and make sure it works in all cases
- Stop using Rosetta for development MongoDB on Apple Silicon
- Test improvements
- Bump `http` package to 3.0.0
#### Breaking Changes
N/A
- Express is now at v5 and some it's APIs have changed.
#### Internal API changes
@@ -18,16 +30,67 @@ Please run the following command to update your project:
```bash
meteor update --release 3.1.0
meteor update --release 3.1
```
Make sure to migrate userland code to use the new Express APIs:
https://expressjs.com/en/guide/migrating-5.html
The MongoDB Node.js driver implemented a significant breaking change regarding operation handling. Applications leveraging `rawCollection()` or `rawDatabase()` methods must now utilize Promise-based syntax exclusively, as the callback-pattern API has been deprecated and removed. This modification affects all direct MongoDB operations previously using callback functions.
#### Meteor Version Release
#### Bumped Meteor Packages
- accounts-password@3.0.3
- babel-compiler@7.11.2
- boilerplate-generator-tests@1.5.3
- ddp-client@3.0.3
- ddp-server@3.0.3
- http@3.0.0
- ecmascript@0.16.10
- email@3.1.1
- meteor-tool@3.1.0
- meteor@2.0.2
- minifier-js@3.0.1
- minimongo@2.0.2
- modules@0.20.3
- mongo@2.0.3
- coffeescript-compiler@2.4.2
- coffeescript@2.7.2
- mongo-decimal@0.2.0
- npm-mongo@6.10.0
- shell-server@0.6.1
- test-helpers@2.0.2
- test-in-console@2.0.1
- tinytest@1.3.1
- typescript@5.6.3
- url@1.3.5
- webapp@2.0.4
#### Bumped NPM Packages
- meteor-babel@7.20.1
- meteor-installer@3.1.0
- meteor-node-stubs@1.2.12
N/A
#### Special thanks to
N/A
✨✨✨
- [@denihs](https://github.com/denihs)
- [@nachocodoner](https://github.com/nachocodoner)
- [@leonardoventurini](https://github.com/leonardoventurini)
- [@StorytellerCZ](https://github.com/StorytellerCZ)
- [@zodern](https://github.com/zodern)
- [@harry97](https://github.com/harry97)
- [@permb](https://github.com/permb)
- [@9Morello](https://github.com/9Morello)
- [@wreiske](https://github.com/wreiske)
- [@MarcoTribuz](https://github.com/MarcoTribuz)
- [@MeteorCoder](https://forums.meteor.com/u/meteorcoder/summary)
✨✨✨

View File

@@ -1,10 +1,11 @@
const { generateChangelog } = require("./changelog/script.js");
const { listPackages } = require("./packages-listing/script.js");
const { generateMeteorVersions } = require("./meteor-versions/script.js");
async function main() {
console.log("🚂 Started codegen 🚂");
await generateChangelog();
await listPackages();
await generateMeteorVersions();
console.log("🚀 Done codegen 🚀");
}

View File

@@ -0,0 +1,22 @@
## Meteor version generator for docs
This is a generator for the meteor versions for the docs, this is used to generate the links in the docs
to the correct version of the meteor release and docs version.
## Why?
This is a way to ensure that the links in the docs are always pointing to the correct version of the docs and release.
In an automated way.
## How to use
To use this generator you must run the following command:
```bash
node script.js
```
and it will check in the `changelog` dir for every version and generate a `versions.generated.json` file that will be used by the docs to generate the links to the correct version of the docs.

View File

@@ -0,0 +1,26 @@
export default {
"versions": [
{
"version": "v3.0",
"url": "https://release-3-0.docs.meteor.com/"
},
{
"version": "v3.0.2",
"url": "https://release-3-0-2.docs.meteor.com/"
},
{
"version": "v3.0.3",
"url": "https://release-3-0-3.docs.meteor.com/"
},
{
"version": "v3.0.4",
"url": "https://release-3-0-4.docs.meteor.com/"
},
{
"version": "v3.1.0",
"url": "https://release-3-1-0.docs.meteor.com/",
"isCurrent": true
}
],
"currentVersion": "v3.1.0"
}

View File

@@ -0,0 +1,44 @@
const _fs = require("fs");
const fs = _fs.promises;
const getDocsUrl = (version = "") =>
`https://release-${version}.docs.meteor.com/`;
exports.generateMeteorVersions = async () => {
console.log("Reading meteor versions...");
const files = await fs.readdir("./generators/changelog/versions", "utf8");
const versions = files
.filter((f) => f.startsWith("3."))
.map((f) => f.replace(".md", ""))
.filter((v) => v !== "3.0.1") // there is no 3.0.1 version
.map((v) => (v === "3.0.0" ? v.slice(0, -2) : v)) // 3.0 doesn't have a patch version in the URL
.map((version) => {
return {
version: `v${version}`,
url: getDocsUrl(`${version}`.replaceAll(".", "-")),
};
})
.map((v, index, arr) => {
const isLast = index === arr.length - 1;
if (isLast) {
v.isCurrent = true;
}
return v;
});
const { version: currentVersion } = versions.find((v) => v.isCurrent);
console.log("Writing meteor versions...");
await fs.writeFile(
"./generators/meteor-versions/metadata.generated.js",
`export default ${JSON.stringify(
{
versions,
currentVersion,
},
null,
2
)}`
);
console.log("Meteor versions generated!");
};

View File

@@ -12,15 +12,27 @@ This is a complete history of changes for Meteor releases.
## v3.1.0, 2024-xx-xx
## v3.1.0, 2024-11-20
### Highlights
N/A
- Upgrade to Node v22
- Upgrade Mongo Driver to v6
- Upgrade Express to v5
- HMR performance improvements
- Bring the `roles` package into the core
- Solve remaining issues with Top Level Await and Reify
- Refactor part of the real-time code in the `mongo` package into TypeScript
- Deprecate `underscore` and eliminate it from packages
- Fix Cordova dependency issues
- Simplify Meteor.EnvironmentVariable and make sure it works in all cases
- Stop using Rosetta for development MongoDB on Apple Silicon
- Test improvements
- Bump `http` package to 3.0.0
#### Breaking Changes
N/A
- Express is now at v5 and some it's APIs have changed.
#### Internal API changes
@@ -32,19 +44,70 @@ Please run the following command to update your project:
```bash
meteor update --release 3.1.0
meteor update --release 3.1
```
Make sure to migrate userland code to use the new Express APIs:
https://expressjs.com/en/guide/migrating-5.html
The MongoDB Node.js driver implemented a significant breaking change regarding operation handling. Applications leveraging `rawCollection()` or `rawDatabase()` methods must now utilize Promise-based syntax exclusively, as the callback-pattern API has been deprecated and removed. This modification affects all direct MongoDB operations previously using callback functions.
#### Meteor Version Release
#### Bumped Meteor Packages
- accounts-password@3.0.3
- babel-compiler@7.11.2
- boilerplate-generator-tests@1.5.3
- ddp-client@3.0.3
- ddp-server@3.0.3
- http@3.0.0
- ecmascript@0.16.10
- email@3.1.1
- meteor-tool@3.1.0
- meteor@2.0.2
- minifier-js@3.0.1
- minimongo@2.0.2
- modules@0.20.3
- mongo@2.0.3
- coffeescript-compiler@2.4.2
- coffeescript@2.7.2
- mongo-decimal@0.2.0
- npm-mongo@6.10.0
- shell-server@0.6.1
- test-helpers@2.0.2
- test-in-console@2.0.1
- tinytest@1.3.1
- typescript@5.6.3
- url@1.3.5
- webapp@2.0.4
#### Bumped NPM Packages
- meteor-babel@7.20.1
- meteor-installer@3.1.0
- meteor-node-stubs@1.2.12
N/A
#### Special thanks to
N/A
✨✨✨
- [@denihs](https://github.com/denihs)
- [@nachocodoner](https://github.com/nachocodoner)
- [@leonardoventurini](https://github.com/leonardoventurini)
- [@StorytellerCZ](https://github.com/StorytellerCZ)
- [@zodern](https://github.com/zodern)
- [@harry97](https://github.com/harry97)
- [@permb](https://github.com/permb)
- [@9Morello](https://github.com/9Morello)
- [@wreiske](https://github.com/wreiske)
- [@MarcoTribuz](https://github.com/MarcoTribuz)
- [@MeteorCoder](https://forums.meteor.com/u/meteorcoder/summary)
✨✨✨
## v3.0.4, 2024-10-15
### Highlights

View File

@@ -40,10 +40,10 @@ The `meteor reset` command clears only the local cache by default. Using the `--
This command is often recommended to fix your development project by clearing the cache. Previously, it also cleared the local MongoDB, which could accidentally delete important data.
## Node v20
## Node v22
Meteor 3.0 is now using Node v20. This means that if you have any dependencies or usages
of Node v14, you will need to update them to be compatible with Node v20.
Meteor 3.0 is now using Node v22. This means that if you have any dependencies or usages
of Node v14, you will need to update them to be compatible with Node v22.
## NPM Installer Update
@@ -119,7 +119,8 @@ await Meteor.callAsync('otherMethod') // [!code highlight]
```
## WebApp Switches to Express
## WebApp Switches to Express 5
::: tip
@@ -128,6 +129,12 @@ If you've customized the WebApp package before, please verify if those customiza
:::
::: tip
Starting with Meteor 3.1, Express has been updated to version 5. If you're upgrading from an earlier version, [refer to the migration guide](https://expressjs.com/en/guide/migrating-5.html).
:::
The `webapp` package now exports these new properties:
```ts
@@ -331,3 +338,9 @@ function patchPublish(publish: typeof Meteor.publish) {
```
This example demonstrates the migration applied to the [`universe:i18n` package](https://github.com/vazco/meteor-universe-i18n/pull/191).
## Mongo driver
In Meteor 3, the MongoDB driver has been updated to version 6.x. This version removes callbacks for async operations, replacing them with standard promises. If you use rawCollection or rawDatabase, ensure your code is updated to use promises.
For details on breaking changes, see [here](https://github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md).

View File

@@ -1,3 +1,8 @@
---
meteor_version: 3.1.0
node_version: 22.11.0
npm_version: 10.9.0
---
# Meteor 3.0 Migration Guide
:::info You are reading the migration guide for Meteor 3!
@@ -11,24 +16,24 @@ This guide is for users with Meteor 2.x projects understand the changes between
Meteor 3.0 is currently in its official version!
**Latest version:** `3.0.4` <br/>
**Node.js version:** `20.18.0 LTS` <br/>
**NPM version:** `10.8.2`
**Latest version:** `{{ $frontmatter.meteor_version }}` <br/>
**Node.js version:** `{{ $frontmatter.node_version }} LTS` <br/>
**NPM version:** `{{ $frontmatter.npm_version }}`
## How to try Meteor 3.0?
You can create a new Meteor 3.0 project by running the command below:
```bash
meteor create my-new-project --release 3.0.4
```bash-vue
meteor create my-new-project --release {{ $frontmatter.meteor_version }}
```
## How to upgrade from Meteor 2.x?
You can upgrade your Meteor 2.x project by running the command below inside your project folder:
```bash
meteor update --release 3.0.4
```bash-vue
meteor update --release {{ $frontmatter.meteor_version }}
meteor reset # resets project to a fresh state
```
@@ -53,6 +58,7 @@ This guide covers the necessary topics for migrating your application from Meteo
- [Frequently Asked Questions](./frequently-asked-questions/index.md), answers to common questions.
- [Breaking Changes](./breaking-changes/index.md), an overview of the changes that will affect your application.
- [Meteor.call x Meteor.callAsync](./breaking-changes/call-x-callAsync.md), why should you change your methods to use `Async` methods.
- [Upgrading packages](./breaking-changes/upgrading-packages.md), how to upgrade your packages to the be compatible with Meteor v3.
@@ -69,14 +75,15 @@ This guide covers the necessary topics for migrating your application from Meteo
We are aware of these articles and guides to assist with your migration:
- [Prepare your Meteor.js project for the big 3.0 release](https://dev.to/jankapunkt/prepare-your-meteorjs-project-for-the-big-30-release-14bf)
- [Gradually upgrading a Meteor.js project to 3.0](https://dev.to/meteor/gradually-upgrading-a-meteorjs-project-to-30-5aj0)
- [Meteor 3.0 Migration Guide, from Daniel](https://docs.google.com/document/d/1XxHE5MQaS0-85HQ-bkiXxmGlYi41ggkX3F-9Rjb9HhE/edit#heading=h.65xi3waq9bb)
- [Illustreets Migration Guide, large SaaS migrated to 3.0](https://forums.meteor.com/t/large-saas-migrated-to-3-0/61113) & their how-to [post](https://forums.meteor.com/t/meteor-3-0-beta-6-is-out/61277/12)
- [Prepare your Meteor.js project for the big 3.0 release](https://dev.to/jankapunkt/prepare-your-meteorjs-project-for-the-big-30-release-14bf)
- [Gradually upgrading a Meteor.js project to 3.0](https://dev.to/meteor/gradually-upgrading-a-meteorjs-project-to-30-5aj0)
- [Meteor 3.0 Migration Guide, from Daniel](https://docs.google.com/document/d/1XxHE5MQaS0-85HQ-bkiXxmGlYi41ggkX3F-9Rjb9HhE/edit#heading=h.65xi3waq9bb)
- [Illustreets Migration Guide, large SaaS migrated to 3.0](https://forums.meteor.com/t/large-saas-migrated-to-3-0/61113) & their how-to [post](https://forums.meteor.com/t/meteor-3-0-beta-6-is-out/61277/12)
### Videos
Migrating apps to Meteor 3.0:
- TicTacToe & others: [YouTube](https://www.youtube.com/watch?v=MtStd0aeyQA)
- Complex Svelte todo list & others: [YouTube](https://www.youtube.com/watch?v=-XW8xwSk-zU)
- Meteor University with v3

View File

@@ -5,9 +5,10 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview",
"generators:versions": "node ./versions-generator.js",
"docs:dev": "npm run generators:versions && vitepress dev",
"docs:build": "npm run generators:versions && vitepress build",
"docs:preview": "npm run generators:versions && vitepress preview",
"deploy:preview": "npm run docs:build && npm run docs:preview"
},
"repository": {

View File

@@ -0,0 +1,43 @@
const fs = require("node:fs");
const develDevBundleLink =
"https://raw.githubusercontent.com/meteor/meteor/refs/heads/devel/scripts/build-dev-bundle-common.sh";
const meteorToolLink =
"https://raw.githubusercontent.com/meteor/meteor/refs/heads/devel/packages/meteor-tool/package.js";
const getMeteorVersionFromDevel = async () => {
const response = await fetch(meteorToolLink);
const text = await response.text();
const version = text
.match(/version: (.*)/)[1]
.replaceAll("'", "")
.replaceAll('"', "")
.replaceAll(",", "");
return version;
};
const getNodeAndNpmVersionFromDevel = async () => {
const response = await fetch(develDevBundleLink);
const text = await response.text();
const nodeVersion = text.match(/NODE_VERSION=(.*)/)[1];
const npmVersion = text.match(/NPM_VERSION=(.*)/)[1];
return { nodeVersion, npmVersion };
};
async function main() {
const [meteorVersion, { nodeVersion, npmVersion }] = await Promise.all([
getMeteorVersionFromDevel(),
getNodeAndNpmVersionFromDevel(),
]);
const newIndexFile = fs
.readFileSync("index.md", "utf8")
.replace(/meteor_version: (.*)/, `meteor_version: ${meteorVersion}`)
.replace(/node_version: (.*)/, `node_version: ${nodeVersion}`)
.replace(/npm_version: (.*)/, `npm_version: ${npmVersion}`);
fs.writeFileSync("index.md", newIndexFile);
}
main();