diff --git a/.circleci/config.yml b/.circleci/config.yml index e9643be20e..b8fb12544f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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,19 +765,17 @@ 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 https://github.com/meteor/meteor.git - cd meteor + 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 https://github.com/meteor/meteor.git - cd meteor - git fetch origin pull/$CIRCLE_PR_NUMBER/head:pr-$CIRCLE_PR_NUMBER + git clone --branch $CIRCLE_BRANCH https://github.com/meteor/meteor.git ${CHECKOUT_METEOR_DOCS} fi # Run almost the same steps the meteor/docs repository runs, minus deploy. - run: name: Generating Meteor documentation for JSDoc testing command: | - cd meteor/docs + cd ${CHECKOUT_METEOR_DOCS}/docs npm install npm test diff --git a/v3-docs/v3-migration-docs/index.md b/v3-docs/v3-migration-docs/index.md index cf07f5ffe7..aff0df2510 100644 --- a/v3-docs/v3-migration-docs/index.md +++ b/v3-docs/v3-migration-docs/index.md @@ -1,3 +1,8 @@ +--- +meteor_version: 3.0.4 +node_version: 20.18.0 +npm_version: 10.8.2 +--- # 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`
-**Node.js version:** `20.18.0 LTS`
-**NPM version:** `10.8.2` +**Latest version:** `{{ $frontmatter.meteor_version }}`
+**Node.js version:** `{{ $frontmatter.node_version }} LTS`
+**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 diff --git a/v3-docs/v3-migration-docs/package.json b/v3-docs/v3-migration-docs/package.json index 23a9213fd2..a84b26ec04 100644 --- a/v3-docs/v3-migration-docs/package.json +++ b/v3-docs/v3-migration-docs/package.json @@ -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": { diff --git a/v3-docs/v3-migration-docs/versions-generator.js b/v3-docs/v3-migration-docs/versions-generator.js new file mode 100644 index 0000000000..ddbe2579c1 --- /dev/null +++ b/v3-docs/v3-migration-docs/versions-generator.js @@ -0,0 +1,39 @@ +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]; + 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();