From 95877da5160ed1c4426c53c36f5468b5d8678da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 19 May 2025 17:04:00 +0200 Subject: [PATCH 01/70] support swc.config.js file for dynamic config --- packages/babel-compiler/babel-compiler.js | 63 ++++++++++++++++++++--- 1 file changed, 55 insertions(+), 8 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index b0c3c96a98..bfc45c5758 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -5,6 +5,8 @@ const reifyCompile = Npm.require("@meteorjs/reify/lib/compiler").compile; const reifyAcornParse = Npm.require("@meteorjs/reify/lib/parsers/acorn").parse; var fs = Npm.require('fs'); var path = Npm.require('path'); +var vm = Npm.require('vm'); +var crypto = Npm.require('crypto'); /** * A compiler that can be instantiated with features and used inside @@ -145,15 +147,37 @@ BCp.initializeMeteorAppConfig = function () { let lastModifiedSwcConfig; let lastModifiedSwcConfigTime; BCp.initializeMeteorAppSwcrc = function () { - if (!lastModifiedSwcConfig && !fs.existsSync(`${getMeteorAppDir()}/.swcrc`)) { + const hasSwcRc = fs.existsSync(`${getMeteorAppDir()}/.swcrc`); + const hasSwcJs = !hasSwcRc && fs.existsSync(`${getMeteorAppDir()}/swc.config.js`); + if (!lastModifiedSwcConfig && !hasSwcRc && !hasSwcJs) { return; } - const currentLastModifiedConfigTime = fs - .statSync(`${getMeteorAppDir()}/.swcrc`) - ?.mtime?.getTime(); + const swcFile = hasSwcJs ? 'swc.config.js' : '.swcrc'; + const filePath = `${getMeteorAppDir()}/${swcFile}`; + const fileStats = fs.statSync(filePath); + const fileModTime = fileStats?.mtime?.getTime(); + + let currentLastModifiedConfigTime; + if (hasSwcJs) { + // For dynamic JS files, first get the resolved configuration + const resolvedConfig = lastModifiedSwcConfig || getMeteorAppSwcrc(swcFile); + // Calculate a hash of the resolved configuration to detect changes + const contentHash = crypto + .createHash('sha256') + .update(JSON.stringify(resolvedConfig)) + .digest('hex'); + // Combine file modification time and content hash to create a unique identifier + currentLastModifiedConfigTime = `${fileModTime}-${contentHash}`; + // Store the resolved configuration + lastModifiedSwcConfig = resolvedConfig; + } else { + // For static JSON files, just use the file modification time + currentLastModifiedConfigTime = fileModTime; + } + if (currentLastModifiedConfigTime !== lastModifiedSwcConfigTime) { lastModifiedSwcConfigTime = currentLastModifiedConfigTime; - lastModifiedSwcConfig = getMeteorAppSwcrc(); + lastModifiedSwcConfig = getMeteorAppSwcrc(swcFile); // Resolve custom baseUrl to an absolute path pointing to the project root if (lastModifiedSwcConfig.jsc && lastModifiedSwcConfig.jsc.baseUrl) { @@ -879,11 +903,34 @@ function getMeteorAppPackageJson() { ); } -function getMeteorAppSwcrc() { +function getMeteorAppSwcrc(file = '.swcrc') { try { - return JSON.parse(fs.readFileSync(`${getMeteorAppDir()}/.swcrc`, 'utf-8')); + const filePath = `${getMeteorAppDir()}/${file}`; + if (file.endsWith('.js')) { + let content = fs.readFileSync(filePath, 'utf-8'); + // Check if the content uses ES module syntax (export default) + if (content.includes('export default')) { + // Transform ES module syntax to CommonJS + content = content.replace(/export\s+default\s+/, 'module.exports = '); + } + const script = new vm.Script(` + (function() { + const module = {}; + module.exports = {}; + (function(exports, module) { + ${content} + })(module.exports, module); + return module.exports; + })() + `); + const context = vm.createContext({ process }); + return script.runInContext(context); + } else { + // For .swcrc and other JSON files, parse as JSON + return JSON.parse(fs.readFileSync(filePath, 'utf-8')); + } } catch (e) { - console.error('Error parsing .swcrc file', e); + console.error(`Error parsing ${file} file`, e); } } From 5cdc7fa83be76d2be83c68d5cee3287a4264225f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 19 May 2025 17:13:08 +0200 Subject: [PATCH 02/70] update docs to add swc.config.js support --- .../modern-build-stack/transpiler-swc.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md index 7b67de62ab..9813a65540 100644 --- a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md +++ b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md @@ -121,6 +121,10 @@ You can also configure other options using the `.swcrc` format. One common case This overrides Meteor's internal SWC config to apply your settings, ensuring SWC processes `.js` or `.ts` files with React components without falling back to Babel. +Use `swc.config.js` in your project root for dynamic configuration. Meteor will import and apply the SWC config automatically. This lets you choose a config based on environment variables or other runtime factors. + +Explore additional custom SWC configs, including ["Import Aliases"](#import-aliases) and ["React Runtime"](#react-runtime). + ## Config API - `modern.transpiler: [true|false]` - Default: `true` @@ -190,6 +194,27 @@ To use the same aliases in SWC, add them to your [.swcrc](#custom-swcrc): } ``` +You can use `swc.config.js` to define different aliases based on an environment variable. + +``` js +var mode = process.env.MODE_ENV; + +var userAliases = { + "@user/*": ["user/*"], +}; + +var adminAliases = { + "@admin/*": ["admin/*"], +}; + +module.exports = { + jsc: { + baseUrl: "./", + paths: mode === "USER" ? uiAliases : adminAliases, + }, +}; +``` + This enables you to use `@ui/components` instead of `./ui/components` in your imports. ### React Runtime From a08e62ebbd632fa952154c7787ebd1350f898168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 19 May 2025 17:30:44 +0200 Subject: [PATCH 03/70] update docs to add swc.config.js support --- v3-docs/docs/about/modern-build-stack/transpiler-swc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md index 9813a65540..01bac2a63e 100644 --- a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md +++ b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md @@ -200,11 +200,11 @@ You can use `swc.config.js` to define different aliases based on an environment var mode = process.env.MODE_ENV; var userAliases = { - "@user/*": ["user/*"], + "@ui/*": ["user/*"], }; var adminAliases = { - "@admin/*": ["admin/*"], + "@ui/*": ["admin/*"], }; module.exports = { From 144a0360457964f15c7dbdb7bf7d647a74307205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 19 May 2025 17:30:55 +0200 Subject: [PATCH 04/70] update docs to add swc.config.js support --- v3-docs/docs/about/modern-build-stack/transpiler-swc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md index 01bac2a63e..a4b150a522 100644 --- a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md +++ b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md @@ -210,7 +210,7 @@ var adminAliases = { module.exports = { jsc: { baseUrl: "./", - paths: mode === "USER" ? uiAliases : adminAliases, + paths: mode === "USER" ? userAliases : adminAliases, }, }; ``` From 7bb6273eb59cc1461571df0a9c5105b14e53afaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 19 May 2025 17:54:17 +0200 Subject: [PATCH 05/70] test coverage for swc.config.js --- tools/tests/modern.js | 56 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/tools/tests/modern.js b/tools/tests/modern.js index cf40089a42..643ac2e5ea 100644 --- a/tools/tests/modern.js +++ b/tools/tests/modern.js @@ -59,7 +59,7 @@ selftest.define("modern build stack", async function () { await s.cd("modern"); s.set("METEOR_PROFILE", "0"); - + await writeModernConfig(s, true); const run = s.run(); @@ -297,6 +297,12 @@ async function writeSwcrcConfig(s, config) { s.write(".swcrc", JSON.stringify(json, null, 2) + "\n"); } +async function writeSwcConfigJs(s, config) { + // Create a JavaScript file that exports the configuration + const jsContent = `module.exports = ${JSON.stringify(config, null, 2)};`; + s.write("swc.config.js", jsContent); +} + selftest.define("modern build stack - transpiler custom .swcrc", async function () { const currentMeteorModern = process.env.METEOR_MODERN; process.env.METEOR_MODERN = ''; @@ -328,6 +334,50 @@ selftest.define("modern build stack - transpiler custom .swcrc", async function process.env.METEOR_MODERN = currentMeteorModern; }); +selftest.define("modern build stack - transpiler custom swc.config.js", async function () { + const currentMeteorModern = process.env.METEOR_MODERN; + process.env.METEOR_MODERN = ''; + + const s = new Sandbox(); + await s.init(); + + await s.createApp("modern", "modern"); + await s.cd("modern"); + + // Remove the .swcrc file to ensure we're using swc.config.js + s.unlink(".swcrc"); + + // Write the swc.config.js file with the same configuration + await writeSwcConfigJs(s, { + jsc: { + baseUrl: "./", + paths: { + "@swcAlias/*": ["swcAlias/*"] + } + } + }); + + await writeConfig(s, { + modern: true, + mainModule: { + client: 'client/main.js', + server: 'server/alias.js', + }, + }); + + const run = s.run(); + + run.waitSecs(waitToStart); + await run.match("App running at"); + + /* custom swc.config.js and alias resolution */ + await run.match(/alias resolved/, false, true); + + await run.stop(); + + process.env.METEOR_MODERN = currentMeteorModern; +}); + selftest.define("modern build stack - transpiler files", async function () { process.env.METEOR_MODERN = 'true'; const s = new Sandbox(); @@ -442,7 +492,7 @@ selftest.define("modern build stack - test swc minifier", async function () { await s.createApp(appName, "modern"); await s.cd(appName); - + await writeConfig(s, { modern: true, mainModule: { @@ -452,7 +502,7 @@ selftest.define("modern build stack - test swc minifier", async function () { }); s.set("NODE_INSPECTOR_IPC", "1"); - + await writeModernConfig(s, { minifier: true }); From 988b8d67eabdf1e04ed1c0d4acab5ec8738987d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 21 May 2025 17:11:03 +0200 Subject: [PATCH 06/70] skip error saying events were dropped since watcher still is alive --- tools/fs/safe-watcher.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index 3e9bda0ab4..6e0d222d3f 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -301,10 +301,13 @@ async function ensureWatchRoot(dirPath: string): Promise { osDirPath, (err, events) => { if (err) { - console.error(`Parcel watcher error on ${osDirPath}:`, err); + if (/Events were dropped/.test(err.message)) { + return; + } // Only disable native watching for critical errors (like ENOSPC). // @ts-ignore if (err.code === "ENOSPC" || err.errno === require("constants").ENOSPC) { + console.log('fallbackToPolling'); fallbackToPolling(); } watchRoots.delete(dirPath); From b6a6d7b34c2eaa0b3f25edd5d45951f6d2bb68ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 21 May 2025 17:19:38 +0200 Subject: [PATCH 07/70] clean --- tools/fs/safe-watcher.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index 6e0d222d3f..57ce310b22 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -307,7 +307,6 @@ async function ensureWatchRoot(dirPath: string): Promise { // Only disable native watching for critical errors (like ENOSPC). // @ts-ignore if (err.code === "ENOSPC" || err.errno === require("constants").ENOSPC) { - console.log('fallbackToPolling'); fallbackToPolling(); } watchRoots.delete(dirPath); From 4580cb81a7131f1c613ecc511fab8f48ad171ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 21 May 2025 17:21:21 +0200 Subject: [PATCH 08/70] clean --- tools/fs/safe-watcher.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index 57ce310b22..492bd03028 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -304,6 +304,7 @@ async function ensureWatchRoot(dirPath: string): Promise { if (/Events were dropped/.test(err.message)) { return; } + console.error(`Parcel watcher error on ${osDirPath}:`, err); // Only disable native watching for critical errors (like ENOSPC). // @ts-ignore if (err.code === "ENOSPC" || err.errno === require("constants").ENOSPC) { From 0de9196ae45476a93df59468567d4d5707c744e1 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Wed, 21 May 2025 21:17:16 +0200 Subject: [PATCH 09/70] Node v22.16.0 --- .travis.yml | 2 +- meteor | 2 +- scripts/build-dev-bundle-common.sh | 2 +- v3-docs/v3-migration-docs/index.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 00ba200b2a..622ed6cadd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ dist: jammy sudo: required services: xvfb node_js: - - "22.15.1" + - "22.16.0" cache: directories: - ".meteor" diff --git a/meteor b/meteor index 660c920bdc..e1784e91eb 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=22.15.1.1 +BUNDLE_VERSION=22.16.0.0 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. diff --git a/scripts/build-dev-bundle-common.sh b/scripts/build-dev-bundle-common.sh index 12089c6efd..a00f7e4f2b 100644 --- a/scripts/build-dev-bundle-common.sh +++ b/scripts/build-dev-bundle-common.sh @@ -5,7 +5,7 @@ set -u UNAME=$(uname) ARCH=$(uname -m) -NODE_VERSION=22.15.1 +NODE_VERSION=22.16.0 MONGO_VERSION_64BIT=7.0.16 MONGO_VERSION_32BIT=3.2.22 NPM_VERSION=10.9.2 diff --git a/v3-docs/v3-migration-docs/index.md b/v3-docs/v3-migration-docs/index.md index 8301bbe3e5..3a1b941e79 100644 --- a/v3-docs/v3-migration-docs/index.md +++ b/v3-docs/v3-migration-docs/index.md @@ -1,6 +1,6 @@ --- meteor_version: 3.1.0 -node_version: 22.15.1 +node_version: 22.16.0 npm_version: 10.9.2 --- # Meteor 3.0 Migration Guide From 1daacc4e8334274ba5f471fd0aef42d35f51b75c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Thu, 22 May 2025 16:46:58 +0200 Subject: [PATCH 10/70] add docs for import aliases limitations --- .../modern-build-stack/transpiler-swc.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md index 7b67de62ab..6afd9fedfc 100644 --- a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md +++ b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md @@ -192,6 +192,41 @@ To use the same aliases in SWC, add them to your [.swcrc](#custom-swcrc): This enables you to use `@ui/components` instead of `./ui/components` in your imports. +:::warning +SWC only resolves aliases to binding imports, not `side-effect` imports or require calls. +::: + +- Binding imports + +Import a module for use. + +``` javascript +import Button from "@ui/button"; +import { Button } from "@ui/button"; +``` + +- Side-effect imports + +Run the module’s code without importing any modules. + +``` javascript +import "@ui/button"; +``` + +- Require calls + +Can import values or run the module’s code. + +``` javascript +const { Button } = require("@ui/button"); + +require("@ui/button"); +``` + +SWC resolve aliases for binding imports correctly, but side-effect imports and require calls won’t. Use relative paths for side-effect imports. For require calls, use a binding import or a relative path depending on whether they import modules or run side effects. + +SWC has no [module-resolver plugin like Babel’s](https://www.npmjs.com/package/babel-plugin-module-resolver) yet. You’ll need to stick with relative paths or binding imports. + ### React Runtime Meteor Babel lets you skip importing React in your files by using the [`@babel/plugin-transform-react-jsx`](https://www.npmjs.com/package/@babel/plugin-transform-react-jsx) runtime config. From 3ab395d4090393e99d07d4acc45271904c01635c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Thu, 22 May 2025 16:59:25 +0200 Subject: [PATCH 11/70] add missing docs on modern-only production builds --- v3-docs/docs/about/modern-build-stack/bundler.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/v3-docs/docs/about/modern-build-stack/bundler.md b/v3-docs/docs/about/modern-build-stack/bundler.md index 764f617802..7eb0d6d78f 100644 --- a/v3-docs/docs/about/modern-build-stack/bundler.md +++ b/v3-docs/docs/about/modern-build-stack/bundler.md @@ -34,6 +34,16 @@ By default, `"modern": true` enables all build stack upgrades. To opt out of web } ``` +This setting doesn’t affect production; legacy builds are still included by default on Meteor apps. + +To exclude legacy builds in production, add "modern" to the `.meteor/platforms` file. + +```sh +server +browser +modern +``` + ## Minifier :::info From 8538557e4e45d63257be83131625645a828b2169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Fri, 23 May 2025 14:51:39 +0200 Subject: [PATCH 12/70] Update transpiler-swc.md --- .../modern-build-stack/transpiler-swc.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md index 6afd9fedfc..d9e8a49347 100644 --- a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md +++ b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md @@ -193,23 +193,21 @@ To use the same aliases in SWC, add them to your [.swcrc](#custom-swcrc): This enables you to use `@ui/components` instead of `./ui/components` in your imports. :::warning -SWC only resolves aliases to binding imports, not `side-effect` imports or require calls. +SWC only resolves aliases to imports, not `require` calls. ::: -- Binding imports +- Imports -Import a module for use. +Binding imports a module for use. + +Side-effect imports run the module’s code. ``` javascript +# Binding imports import Button from "@ui/button"; import { Button } from "@ui/button"; -``` -- Side-effect imports - -Run the module’s code without importing any modules. - -``` javascript +# Side effect import import "@ui/button"; ``` @@ -223,9 +221,9 @@ const { Button } = require("@ui/button"); require("@ui/button"); ``` -SWC resolve aliases for binding imports correctly, but side-effect imports and require calls won’t. Use relative paths for side-effect imports. For require calls, use a binding import or a relative path depending on whether they import modules or run side effects. +SWC resolve aliases for imports correctly, but require calls won’t. For require calls, use an import or a relative path. -SWC has no [module-resolver plugin like Babel’s](https://www.npmjs.com/package/babel-plugin-module-resolver) yet. You’ll need to stick with relative paths or binding imports. +SWC has no [module-resolver plugin like Babel’s](https://www.npmjs.com/package/babel-plugin-module-resolver) yet, which could affect require calls in the future. ### React Runtime From 6de8934baf947f9a0fb263fea7cfb4013479fde9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Fri, 23 May 2025 14:53:21 +0200 Subject: [PATCH 13/70] Update transpiler-swc.md --- .../about/modern-build-stack/transpiler-swc.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md index d9e8a49347..90e7d70829 100644 --- a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md +++ b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md @@ -198,16 +198,18 @@ SWC only resolves aliases to imports, not `require` calls. - Imports -Binding imports a module for use. +Binding imports inject a module to use. + +``` javascript +// Binding imports +import Button from "@ui/button"; +import { Button } from "@ui/button"; +``` Side-effect imports run the module’s code. ``` javascript -# Binding imports -import Button from "@ui/button"; -import { Button } from "@ui/button"; - -# Side effect import +// Side effect import import "@ui/button"; ``` From 5a029961891d508f26164021b3b22582ade7c1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Fri, 23 May 2025 14:56:58 +0200 Subject: [PATCH 14/70] bump packages to prepare for next release --- packages/minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 80b0a54ff5..40738ffefa 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: '3.0.1', + version: '3.0.2-beta330.1', }); Npm.depends({ diff --git a/packages/typescript/package.js b/packages/typescript/package.js index ea41a3604a..036495222b 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'typescript', - version: '5.6.3', + version: '5.6.4-beta330.1', summary: 'Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files', documentation: 'README.md', From bb87f2b65507553abdfbfba192ae6b228e853e5e Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Sat, 24 May 2025 13:39:39 -0300 Subject: [PATCH 15/70] Update CODE_OF_CONDUCT and CONTRIBUTING documents to reflect team changes --- CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 22 ++++++++++------------ README.md | 4 ++-- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 92ef3e891f..fa910d2ee5 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -19,7 +19,7 @@ To report an issue in one of the projects listed below, please email code-of-con The Code of Conduct panel is a moderation team that handle code of conduct issues. The makeup of this team is as follows: * CEO at Meteor Software - Frederico Maia Arantes -* Software Engineer at Meteor Software - Denilson Silva +* CTO at Meteor Software - Henrique Albert * CEO at High Impact Tech - Alim S. Gafar Members of the CoCP team will be added for a 1-year term and will be re-confirmed on a yearly basis. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1694ca521f..beebcdb1ac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,7 @@ There are many ways to contribute to the Meteor Project. Here’s a list of tech There are also several ways to contribute to the Meteor Project outside of GitHub, like organizing or speaking at [Meetups](https://forums.meteor.com/c/meetups) and events and helping to moderate our [forums](https://forums.meteor.com/). -If you can think of any changes to the project, [documentation](https://github.com/meteor/meteor/tree/devel/docs), or [guide](https://github.com/meteor/meteor/tree/devel/guide) that would improve the contributor experience, let us know by opening an issue! +If you can think of any changes to the project, [documentation](https://github.com/meteor/meteor/tree/devel/v3-docs), or [guide](https://github.com/meteor/meteor/tree/devel/guide) that would improve the contributor experience, let us know by opening an issue! ### Finding work @@ -43,15 +43,14 @@ Reviewers are members of the community who help with Pull Requests reviews. Current Reviewers: - [meteor](https://github.com/meteor/meteor) - - [@denihs](https://github.com/denihs) - [@fredmaiaarantes](https://github.com/fredmaiaarantes) - [@henriquealbert](https://github.com/henriquealbert) - [@aquinoit](https://github.com/aquinoit) - [@Grubba27](https://github.com/Grubba27) -- [@filipenevola](https://github.com/filipenevola) + - [@italojs](https://github.com/italojs) + - [@nachocodoner](https://github.com/nachocodoner) - [@StorytellerCZ](https://github.com/StorytellerCZ) - [@zodern](https://github.com/zodern) -- [@CaptainN](https://github.com/CaptainN) - [@radekmie](https://github.com/radekmie) #### Core Committer @@ -59,16 +58,15 @@ Current Reviewers: The contributors with commit access to meteor/meteor are employees of Meteor Software LP or community members who have distinguished themselves in other contribution areas or members of partner companies. If you want to become a core committer, please start writing PRs. Current Core Team: -- [@denihs](https://github.com/denihs) -- [@zodern](https://github.com/zodern) -- [@filipenevola](https://github.com/filipenevola) -- [@fredmaiaarantes](https://github.com/fredmaiaarantes) -- [@henriquealbert](https://github.com/henriquealbert) -- [@Grubba27](https://github.com/Grubba27) +- [meteor](https://github.com/meteor/meteor) + - [@fredmaiaarantes](https://github.com/fredmaiaarantes) + - [@henriquealbert](https://github.com/henriquealbert) + - [@Grubba27](https://github.com/Grubba27) + - [@italojs](https://github.com/italojs) + - [@nachocodoner](https://github.com/nachocodoner) - [@StorytellerCZ](https://github.com/StorytellerCZ) -- [@CaptainN](https://github.com/CaptainN) +- [@zodern](https://github.com/zodern) - [@radekmie](https://github.com/radekmie) -- [@matheusccastroo](https://github.com/matheusccastroo) ### Tracking project work diff --git a/README.md b/README.md index b5d0855fba..11aa1c4c6c 100644 --- a/README.md +++ b/README.md @@ -83,9 +83,9 @@ meteor **Building an application with Meteor?** -* Deploy on [Galaxy](https://www.meteor.com/cloud) +* Deploy on [Galaxy](https://galaxycloud.app) * Discuss on [Forums](https://forums.meteor.com/) -* Join the Meteor Discord by clicking this [invite link](https://discord.gg/hZkTCaVjmT). +* Join the [Meteor Discord](https://discord.gg/hZkTCaVjmT) Interested in helping or contributing to Meteor? These resources will help: From 07bcf5ba98dd1aaadc887f2a95ea122926dd5cd7 Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Sat, 24 May 2025 15:33:22 -0300 Subject: [PATCH 16/70] Enhance documentation for `meteor build` command with clearer structure, detailed output artifacts, options, and examples for better user understanding. --- v3-docs/docs/cli/index.md | 90 ++++++++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 25 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index e414e738e6..6c5f28e189 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -934,38 +934,78 @@ For now, you cannot run this while a development server is running. Quit all run ::: -## meteor build {meteorbuild} +## meteor build {#meteorbuild} -Package this project up for deployment. The output is a directory with several -build artifacts: +Package your project for deployment. -
  • a tarball (.tar.gz) that includes everything necessary to run the application - server (see the README in the tarball for details). Using the - `--directory` option will produce a `bundle` directory instead of the tarball.
  • -
  • an unsigned apk bundle and a project source if Android is targeted as a - mobile platform
  • -
  • a directory with an Xcode project source if iOS is targeted as a mobile - platform
+```bash +meteor build [options] +``` -You can use the application server bundle to host a Meteor application on your -own server, instead of deploying to Galaxy. You will have to deal -with logging, monitoring, backups, load-balancing, etc, all of which we handle -for you if you use Galaxy. +### Output Artifacts -The unsigned `apk` bundle and the outputted Xcode project can be used to deploy -your mobile apps to Android Play Store and Apple App Store. +The command produces deployment-ready artifacts for all platforms in your project: -By default, your application is bundled for your current architecture. -This may cause difficulties if your app contains binary code due to, -for example, npm packages. You can try to override that behavior -with the `--architecture` flag. +- **Server Bundle**: A tarball containing everything needed to run the application server +- **Android Package**: AAB/APK bundle and Android project source (if Android platform is added) +- **iOS Package**: Xcode project source (if iOS platform is added) -You can set optional data for the initial value of `Meteor.settings` -in your mobile application with the `--mobile-settings` flag. A new value for -`Meteor.settings` can be set later by the server as part of hot code push. +::: tip Self-Hosting +You can use the server bundle to host a Meteor application on your own infrastructure instead of Galaxy. Note that you'll need to handle logging, monitoring, backups, and load-balancing yourself. +::: -You can also specify which platforms you want to build with the `--platforms` flag. -Examples: `--platforms=android`, `--platforms=ios`, `--platforms=web.browser`. +### Options + +| Option | Description | +|--------|-------------| +| `--debug` | Build in debug mode (don't minify, preserve source maps) | +| `--directory` | Output a directory instead of a tarball (existing output location will be deleted first) | +| `--server-only` | Skip building mobile apps but still build the 'web.cordova' client target for hot code push | +| `--mobile-settings ` | Set the initial value of `Meteor.settings` in mobile apps | +| `--server ` | Location where mobile builds connect to the Meteor server (defaults to localhost:3000) | +| `--architecture ` | Build for a different architecture than your development machine | +| `--allow-incompatible-update` | Allow packages to be upgraded/downgraded to potentially incompatible versions | +| `--platforms ` | Build only for specified platforms (when available) | +| `--packageType ` | Choose between `apk` or `bundle` for Android builds (defaults to `bundle`) | + +::: details Available Architectures +Valid architectures include: +- `os.osx.x86_64` +- `os.linux.x86_64` +- `os.linux.x86_32` +- `os.windows.x86_32` +- `os.windows.x86_64` + +This option selects the architecture of binary-dependent Atmosphere packages. If your project doesn't use Atmosphere packages with binary dependencies, `--architecture` has no effect. +::: + +### Examples + +```bash +# Basic build +meteor build ../build + +# Output a directory instead of a tarball +meteor build ../build --directory + +# Debug build (unminified) +meteor build ../build --debug + +# Build only the server (skip mobile apps) +meteor build ../build --server-only + +# Build for specific platforms +meteor build ../build --platforms=android,ios + +# Set server location for mobile apps +meteor build ../build --server=https://example.com:443 + +# Build for a different architecture +meteor build ../build --architecture=os.linux.x86_64 + +# Specify Android package type +meteor build ../build --packageType=apk +``` ## meteor lint {meteorlint} From 44223761252877cfc6f1e00c059b6defc658c667 Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Sat, 24 May 2025 15:36:27 -0300 Subject: [PATCH 17/70] Update `meteor lint` documentation to improve clarity and detail, including command description, options, example usage, and CI integration tips. --- v3-docs/docs/cli/index.md | 40 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index 6c5f28e189..659cfa661b 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1007,10 +1007,44 @@ meteor build ../build --architecture=os.linux.x86_64 meteor build ../build --packageType=apk ``` -## meteor lint {meteorlint} +## meteor lint {#meteorlint} -Run through the whole build process for the app and run all linters the app -uses. Outputs all build errors or linting warnings to the standard output. +Run linters on your Meteor application code. + +```bash +meteor lint [options] +``` + +### Description + +This command: +- Performs a complete build of your application +- Runs all configured linters +- Outputs build errors and linting warnings to standard output + +::: tip CI Integration +The `meteor lint` command is particularly useful for continuous integration environments to catch code quality issues before deployment. +::: + +### Options + +| Option | Description | +|--------|-------------| +| `--allow-incompatible-update` | Allow packages to be upgraded or downgraded to potentially incompatible versions if required to satisfy all package version constraints | + +### Example Usage + +```bash +# Basic usage +meteor lint + +# Allow incompatible package updates during linting +meteor lint --allow-incompatible-update +``` + +::: warning +Linting errors will prevent your application from being built successfully. Fixing these errors is required for deployment. +::: ## meteor search {meteorsearch} From 62a7c43ee53c60c93ddea0a7d9de37f37ccaabff Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Sat, 24 May 2025 15:36:46 -0300 Subject: [PATCH 18/70] Enhance `meteor search` documentation with improved command description, detailed options, and practical examples for better user guidance. --- v3-docs/docs/cli/index.md | 54 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index 659cfa661b..c267ff528f 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1047,10 +1047,58 @@ Linting errors will prevent your application from being built successfully. Fixi ::: -## meteor search {meteorsearch} +## meteor search {#meteorsearch} -Searches for Meteor packages and releases, whose names contain the specified -regular expression. +Search for Meteor packages and releases. + +```bash +meteor search [options] +``` + +### Description + +Searches through the Meteor package and release database for items whose names match the specified regular expression. + +::: info Default Behavior +By default, the search will not show: +- Packages without official versions (e.g., those with only prereleases) +- Packages known to be incompatible with Meteor 0.9.0 and later due to migration issues +::: + +### Options + +| Option | Description | +|--------|-------------| +| `--maintainer ` | Filter results by authorized maintainer | +| `--show-all` | Show all matches, including prereleases and incompatible packages | +| `--ejson` | Display more detailed output in EJSON format | + +### Examples + +```bash +# Search for all packages related to "auth" +meteor search auth + +# Search for packages maintained by a specific user +meteor search mongo --maintainer meteor + +# Show all matching packages, including prereleases +meteor search bootstrap --show-all + +# Get detailed output in EJSON format +meteor search react --ejson +``` + +::: tip Advanced Searching +You can use regular expressions for more powerful searches: +```bash +# Packages that start with "react-" +meteor search "^react-" + +# Packages that end with "router" +meteor search "router$" +``` +::: ## meteor show {meteorshow} From 75b76e37d1b775983a10f4cfa301d28ed6ede17a Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Sat, 24 May 2025 15:41:42 -0300 Subject: [PATCH 19/70] Revise `meteor show` documentation to enhance clarity, including detailed command descriptions, usage examples, and options for improved user understanding. --- v3-docs/docs/cli/index.md | 76 +++++++++++++++++++++++++++++++++++---- 1 file changed, 70 insertions(+), 6 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index c267ff528f..7e8c1b0e72 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1101,21 +1101,85 @@ meteor search "router$" ::: -## meteor show {meteorshow} +## meteor show {#meteorshow} -Shows more information about a specific package or release: name, summary, the -usernames of its maintainers, and, if specified, its homepage and git URL. +Display detailed information about packages and releases. -Get information on meteor recommended releases: ```bash +meteor show [options] +meteor show [options] +meteor show [options] +``` + +### Description + +Shows detailed information about a specific package or release, including: +- Name and summary +- Available versions +- Maintainers +- Homepage and git URL (if specified) +- Exports and other package metadata + +::: tip +This works on both local packages built from source and remote packages stored on the server. +::: + +### Common Usage + +#### View Package Information + +```bash +# Show information about a package +meteor show jam:easy-schema + +# Show information about a specific version +meteor show jam:easy-schema@1.7.0 + +# Show information about the local version +meteor show jam:easy-schema@local +``` + +#### View Meteor Releases + +```bash +# Show recommended Meteor releases meteor show METEOR + +# Show all Meteor releases (including intermediate ones) +meteor show METEOR --show-all ``` -Get information on all meteor releases (including intermediate releases)" +### Options + +| Option | Description | +|--------|-------------| +| `--show-all` | Show hidden versions, experimental releases, and incompatible packages | +| `--ejson` | Display more detailed output in EJSON format | + +### Examples + ```bash -meteor show --show-all METEOR +# Running from a package directory shows info for that package +cd ~/my-package +meteor show + +# View detailed EJSON output +meteor show react-meteor-data --ejson ``` +::: info Default Behavior +By default, Meteor: +- Shows no more than five versions +- Hides experimental release versions +- Hides packages incompatible with Meteor 0.9.0 and later +::: + +::: details Version Selection +For version-specific information (like exports), Meteor will use: +1. The local version, if available +2. The latest official version, if no local version exists +::: + ## meteor publish {meteorpublish} From 46494d94cc7d3a97247696c582ecb10581e72bda Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Sat, 24 May 2025 15:45:40 -0300 Subject: [PATCH 20/70] Enhance `meteor publish` documentation with detailed command descriptions, usage examples, and options for improved clarity and user guidance. --- v3-docs/docs/cli/index.md | 94 +++++++++++++++++++++++++++++++++------ 1 file changed, 80 insertions(+), 14 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index 7e8c1b0e72..ad1900aede 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1181,24 +1181,90 @@ For version-specific information (like exports), Meteor will use: ::: -## meteor publish {meteorpublish} +## meteor publish {#meteorpublish} -Publishes your package. To publish, you must `cd` into the package directory, log -in with your Meteor Developer Account and run `meteor publish`. By convention, -published package names must begin with the maintainer's Meteor Developer -Account username and a colon, like so: `iron:router`. +Publish a package to Atmosphere (Meteor package server). -To publish a package for the first time, use `meteor publish --create`. +```bash +meteor publish [options] +meteor publish --update +``` -Sometimes packages may contain binary code specific to an architecture (for -example, they may use an npm package). In that case, running publish will only -upload the build to the architecture that you were using to publish it. You can -use `publish-for-arch` to upload a build to a different architecture from a -different machine. +### Description -If you have already published a package but need to update it's metadata -(the content of `Package.describe`) or the README you can actually achieve this -via `meteor publish --update`. +Publishes a new version of a local package to Atmosphere. Must be run from the package directory. + +::: warning Package Naming Convention +Published package names must begin with the maintainer's Meteor Developer Account username and a colon, like `username:package-name`. +::: + +### Common Operations + +#### Publish a New Package + +```bash +cd my-package +meteor publish --create +``` + +#### Update an Existing Package + +```bash +cd my-package +meteor publish +``` + +#### Update Package Metadata + +Update README, description, or other metadata without changing the code: + +```bash +cd my-package +meteor publish --update +``` + +### Options + +| Option | Description | +|--------|-------------| +| `--create` | Publish a new package for the first time | +| `--update` | Update metadata of a previously published version (README, git URL, description, etc.) | +| `--allow-incompatible-update` | Allow dependencies to be upgraded/downgraded to potentially incompatible versions | +| `--no-lint` | Skip linting the package and its local dependencies before publishing | + +### Architecture-Specific Packages + +For packages with binary components: +- Regular `publish` will only upload the build for your current architecture +- Use `meteor publish-for-arch` from a different machine to upload builds for other architectures + +::: details Package Publication Process +When you publish a package: +1. Meteor reads version information from `package.js` +2. Builds the package +3. Sends both source code and built version to the package server +4. Marks you as the sole maintainer (use `meteor admin maintainers` to modify) +::: + +### Examples + +```bash +# Publish a new package +meteor publish --create + +# Update an existing package +meteor publish + +# Update metadata only +meteor publish --update + +# Publish without linting +meteor publish --no-lint +``` + +::: tip +Use `meteor show` to preview how your package information will appear in the package server. +::: ## meteor publish-for-arch {meteorpublishforarch} From 02538f16bcd8a9be0014fd7cbe0b73e9862b1b48 Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Sat, 24 May 2025 15:55:42 -0300 Subject: [PATCH 21/70] Enhance `meteor publish-for-arch` documentation with detailed command usage, architecture support information, and example workflows for improved clarity and user guidance. --- v3-docs/docs/cli/index.md | 60 ++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index ad1900aede..f39f0fde21 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1266,24 +1266,56 @@ meteor publish --no-lint Use `meteor show` to preview how your package information will appear in the package server. ::: -## meteor publish-for-arch {meteorpublishforarch} +## meteor publish-for-arch {#meteorpublishforarch} -Publishes a build of an existing package version from a different architecture. +Publish architecture-specific builds of a package. -Some packages contain code specific to an architecture. Running `publish` by -itself, will upload the build to the architecture that you were using to -publish. You need to run `publish-for-arch` from a different architecture to -upload a different build. +```bash +meteor publish-for-arch packageName@version +``` -For example, let's say you published name:cool-binary-blob from a Mac. If you -want people to be able to use cool-binary-blob from Linux, you should log into a -Linux machine and then run -`meteor publish-for-arch name:cool-binary-blob@version`. It will notice that you -are on a linux machine, and that there is no Linux-compatible build for your package -and publish one. +### Description -Currently, the supported architectures for Meteor are 32-bit Linux, 64-bit Linux -and Mac OS. Galaxy's servers run 64-bit Linux. +Creates and publishes a build of an existing package version for a different architecture than the one initially published. + +::: info Architecture Support +Meteor currently supports the following architectures: +- 32-bit Linux +- 64-bit Linux (used by Galaxy servers) +- 64-bit macOS +::: + +### Use Case + +When a package contains platform-specific components (like npm modules with native code), running `meteor publish` only creates a build for your current architecture. To make your package usable on other architectures, you need to run `publish-for-arch` from machines with those architectures. + +### How It Works + +1. Run the command on a machine with the target architecture +2. Meteor downloads your package's source and dependencies from the package server +3. Builds the package for the current architecture +4. Uploads the architecture-specific build to the package server + +::: tip No Source Required +You don't need to have a copy of your package's source code to run this command. Meteor automatically downloads everything needed from the package server. +::: + +### Example Workflow + +Imagine you've published a package with binary components from a Mac: + +```bash +# On your Mac +cd my-binary-package +meteor publish --create +``` + +To make it available for Linux users: + +```bash +# Later, on a 64-bit Linux machine +meteor publish-for-arch username:my-binary-package@1.0.0 +``` ## meteor publish-release {meteorpublishrelease} From ce78edd9a6c3b5de21dd0fa7ada8c876c5ee01e2 Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Sat, 24 May 2025 15:59:12 -0300 Subject: [PATCH 22/70] Enhance `meteor publish-release` documentation with detailed command usage, configuration file format, options, and examples for improved clarity and user guidance. --- v3-docs/docs/cli/index.md | 102 ++++++++++++++++++++++++++++++++------ 1 file changed, 88 insertions(+), 14 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index f39f0fde21..41dd57aa63 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1318,24 +1318,98 @@ meteor publish-for-arch username:my-binary-package@1.0.0 ``` -## meteor publish-release {meteorpublishrelease} +## meteor publish-release {#meteorpublishrelease} -Publishes a release of Meteor. Takes in a JSON configuration file. +Publish a new Meteor release. -Meteor releases are divided into tracks. While only MDG members can publish to -the default Meteor track, anyone can create a track of their own and publish to -it. Running `meteor update` without specifying the `--release` option will not -cause the user to switch tracks. +```bash +meteor publish-release [options] +``` -To publish to a release track for the first time, use the `--create-track` flag. +### Description -The JSON configuration file must contain the name of the release track -(`track`), the release version (`version`), various metadata, the packages -specified by the release as mapped to versions (`packages`), and the package & -version of the Meteor command-line tool (`tool`). Note that this means that -forks of the meteor tool can be published as packages and people can use them by -switching to a corresponding release. For more information, run -`meteor help publish-release`. +Publishes a new release of Meteor based on a JSON configuration file. This allows you to create custom Meteor releases or release tracks. + +::: info Release Tracks +Meteor releases are divided into tracks: +- Only Meteor Software can publish to the default Meteor track +- Anyone can create and publish to their own custom tracks +- Users won't switch tracks when running `meteor update` unless specified +::: + +### Configuration File Format + +The JSON configuration file must contain: + +```json +{ + "track": "TRACK_NAME", // Release track (e.g., "METEOR") + "version": "VERSION", // Version number (e.g., "2.8.0") + "recommended": true|false, // Is this a recommended release? + "description": "DESCRIPTION", // Brief description of the release + "tool": "PACKAGE@VERSION", // The meteor tool package and version + "packages": { // Specific package versions for this release + "package1": "version", + "package2": "version" + }, + "patchFrom": ["VERSION1", "VERSION2"] // Optional: releases this patches +} +``` + +::: warning Prerequisites +You must publish all package versions to the package server before you can specify them in a release. +::: + +### Options + +| Option | Description | +|--------|-------------| +| `--create-track` | Create and publish a new release track | + +### Recommended Flag + +- Set `recommended: true` for stable releases (e.g., METEOR@3.2.2) +- Set `recommended: false` for release candidates, experimental releases, etc. + +### Patch Releases + +Use the `patchFrom` field to specify a patch release: +- Lists releases this new release patches +- Automatically unrecommends the releases specified in `patchFrom` + +### Examples + +#### Publishing a New Release Track + +```bash +meteor publish-release my-release-config.json --create-track +``` + +#### Publishing a New Release + +```bash +meteor publish-release meteor-3.3.0.json +``` + +#### Sample Configuration File + +```json +{ + "track": "MYCORP", + "version": "1.0.0", + "recommended": true, + "description": "MyCompany's custom Meteor release", + "tool": "meteor-tool@2.8.0", + "packages": { + "accounts-base": "2.2.5", + "mongo": "1.15.0" + } +} +``` + +::: tip Custom Tool Forks +This system allows forks of the meteor tool to be published as packages, letting users switch to custom tool implementations by changing to the corresponding release. +::: ## meteor test-packages {meteortestpackages} From d983e791e187963ff1583569a875f1eb0d166cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 26 May 2025 16:16:58 +0200 Subject: [PATCH 23/70] refactor extend babel options --- packages/babel-compiler/babel-compiler.js | 42 +++++++++++++++++------ 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index bfc45c5758..1c49ac6711 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -304,22 +304,33 @@ BCp.processOneFileForTarget = function (inputFile, source) { }, }; - this.inferTypeScriptConfig(features, inputFile, cacheOptions.cacheDeps); + // Helper function to setup Babel options + const setupBabelOptions = () => { + this.inferTypeScriptConfig(features, inputFile, cacheOptions.cacheDeps); - var babelOptions = Babel.getDefaultOptions(features); - babelOptions.caller = { name: "meteor", arch }; + var babelOptions = Babel.getDefaultOptions(features); + babelOptions.caller = { name: "meteor", arch }; - this.inferExtraBabelOptions(inputFile, babelOptions, cacheOptions.cacheDeps); + babelOptions.sourceMaps = true; + const filename = packageName + ? `packages/${packageName}/${inputFilePath}` + : inputFilePath; + babelOptions.filename = babelOptions.sourceFileName = filename; - babelOptions.sourceMaps = true; + this.inferExtraBabelOptions(inputFile, babelOptions, cacheOptions.cacheDeps); + + if (this.modifyBabelConfig) { + this.modifyBabelConfig(babelOptions, inputFile); + } + + return babelOptions; + }; + + // Define babelOptions at the outer scope so it's available for source map + var babelOptions; const filename = packageName ? `packages/${packageName}/${inputFilePath}` : inputFilePath; - babelOptions.filename = babelOptions.sourceFileName = filename; - - if (this.modifyBabelConfig) { - this.modifyBabelConfig(babelOptions, inputFile); - } try { var result = (() => { @@ -384,6 +395,8 @@ BCp.processOneFileForTarget = function (inputFile, source) { arch, }); } + // Set babelOptions.filename for source map + babelOptions = { filename }; return compilation; } @@ -396,7 +409,12 @@ BCp.processOneFileForTarget = function (inputFile, source) { // Save result in cache this.writeToSwcCache({ cacheKey, compilation }); usedSwc = true; + // Set babelOptions.filename for source map + babelOptions = { filename }; } else { + // Set up Babel options only when compiling with Babel + babelOptions = setupBabelOptions(); + compilation = compileWithBabel(source, babelOptions, cacheOptions); usedSwc = false; } @@ -414,6 +432,10 @@ BCp.processOneFileForTarget = function (inputFile, source) { } catch (e) { this._swcIncompatible[cacheKey] = true; // If SWC fails, fall back to Babel + + // Set up Babel options for fallback + babelOptions = setupBabelOptions(); + compilation = compileWithBabel(source, babelOptions, cacheOptions); if (config?.verbose) { logTranspilation({ From 05f76baa8c0355d90303d1e3721ac3ff34be9e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 26 May 2025 18:26:23 +0200 Subject: [PATCH 24/70] advance swc-config by file level --- packages/babel-compiler/babel-compiler.js | 184 ++++++++++++------ .../packages/modules-test-plugin/.swcrc | 18 ++ .../packages/modules-test-plugin/array.arson | 4 + .../modules-test-plugin.js | 23 +++ .../packages/modules-test-plugin/one.arson | 8 + .../packages/modules-test-plugin/package.js | 29 +++ .../packages/modules-test-plugin/plugin.js | 57 ++++++ 7 files changed, 265 insertions(+), 58 deletions(-) create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index 1c49ac6711..a4cb28a7f7 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -13,9 +13,9 @@ var crypto = Npm.require('crypto'); * Plugin.registerCompiler * @param {Object} extraFeatures The same object that getDefaultOptions takes */ -BabelCompiler = function BabelCompiler(extraFeatures, modifyBabelConfig) { +BabelCompiler = function BabelCompiler(extraFeatures, modifyConfig) { this.extraFeatures = extraFeatures; - this.modifyBabelConfig = modifyBabelConfig; + this.modifyConfig = modifyConfig; this._babelrcCache = null; this._babelrcWarnings = Object.create(null); this.cacheDirectory = null; @@ -37,42 +37,10 @@ function compileWithBabel(source, babelOptions, cacheOptions) { }); } -function compileWithSwc(source, swcOptions = {}, { inputFilePath, filename, sourceFileName, features, arch }) { +function compileWithSwc(source, swcOptions = {}, { features }) { return profile('SWC.compile', function () { - // Determine file extension based syntax. - const isTypescriptSyntax = inputFilePath.endsWith('.ts') || inputFilePath.endsWith('.tsx'); - const hasTSXSupport = inputFilePath.endsWith('.tsx'); - const hasJSXSupport = inputFilePath.endsWith('.jsx'); - - const isLegacyWebArch = arch.includes('legacy'); - const baseSwcConfig = { - jsc: { - ...(!isLegacyWebArch && { target: 'es2015' }), - parser: { - syntax: isTypescriptSyntax ? 'typescript' : 'ecmascript', - jsx: hasJSXSupport, - tsx: hasTSXSupport, - }, - }, - module: { type: 'es6' }, - minify: false, - sourceMaps: true, - filename, - sourceFileName, - ...(isLegacyWebArch && { - env: { targets: lastModifiedSwcLegacyConfig || {} }, - }), - }; - const nextSwcConfig = - Object.keys(swcOptions)?.length > 0 - ? deepMerge(baseSwcConfig, swcOptions, [ - 'env.targets', - 'module.type', - ]) - : baseSwcConfig; - // Perform SWC transformation. - const transformed = SWC.transformSync(source, nextSwcConfig); + const transformed = SWC.transformSync(source, swcOptions); let content = transformed.code; @@ -304,7 +272,10 @@ BCp.processOneFileForTarget = function (inputFile, source) { }, }; - // Helper function to setup Babel options + const filename = packageName + ? `packages/${packageName}/${inputFilePath}` + : inputFilePath; + const setupBabelOptions = () => { this.inferTypeScriptConfig(features, inputFile, cacheOptions.cacheDeps); @@ -312,26 +283,60 @@ BCp.processOneFileForTarget = function (inputFile, source) { babelOptions.caller = { name: "meteor", arch }; babelOptions.sourceMaps = true; - const filename = packageName - ? `packages/${packageName}/${inputFilePath}` - : inputFilePath; babelOptions.filename = babelOptions.sourceFileName = filename; this.inferExtraBabelOptions(inputFile, babelOptions, cacheOptions.cacheDeps); - if (this.modifyBabelConfig) { - this.modifyBabelConfig(babelOptions, inputFile); + if (this.modifyConfig) { + this.modifyConfig(babelOptions, inputFile); } return babelOptions; }; - // Define babelOptions at the outer scope so it's available for source map - var babelOptions; - const filename = packageName - ? `packages/${packageName}/${inputFilePath}` - : inputFilePath; + const setupSWCOptions = () => { + const isTypescriptSyntax = inputFilePath.endsWith('.ts') || inputFilePath.endsWith('.tsx'); + const hasTSXSupport = inputFilePath.endsWith('.tsx'); + const hasJSXSupport = inputFilePath.endsWith('.jsx'); + const isLegacyWebArch = arch.includes('legacy'); + var swcOptions = { + jsc: { + ...(!isLegacyWebArch && { target: 'es2015' }), + parser: { + syntax: isTypescriptSyntax ? 'typescript' : 'ecmascript', + jsx: hasJSXSupport, + tsx: hasTSXSupport, + }, + }, + module: { type: 'es6' }, + minify: false, + sourceMaps: true, + filename, + sourceFileName: filename, + ...(isLegacyWebArch && { + env: { targets: lastModifiedSwcLegacyConfig || {} }, + }), + }; + + // Merge with app-level SWC config + if (lastModifiedSwcConfig) { + swcOptions = deepMerge(swcOptions, lastModifiedSwcConfig, [ + 'env.targets', + 'module.type', + ]); + } + + this.inferExtraSWCOptions(inputFile, swcOptions, cacheOptions.cacheDeps); + + if (!!this.extraFeatures?.swc && this.modifyConfig) { + this.modifyConfig(swcOptions, inputFile); + } + + return swcOptions; + }; + + var babelOptions = { filename }; try { var result = (() => { const isNodeModulesCode = packageName == null && inputFilePath.includes("node_modules/"); @@ -375,7 +380,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { .join('-'); // Determine if SWC should be used based on package and file criteria. const shouldUseSwc = !shouldSkipSwc && !this._swcIncompatible[cacheKey]; - + console.log("--> (babel-compiler.js-Line: 383)\n shouldUseSwc: ", shouldUseSwc); let compilation; try { let usedSwc = false; @@ -395,22 +400,18 @@ BCp.processOneFileForTarget = function (inputFile, source) { arch, }); } - // Set babelOptions.filename for source map - babelOptions = { filename }; return compilation; } - const sourceFileName = filename; + const swcOptions = setupSWCOptions(); compilation = compileWithSwc( source, - lastModifiedSwcConfig, - { inputFilePath, features, arch, filename, sourceFileName }, + swcOptions, + { features }, ); // Save result in cache this.writeToSwcCache({ cacheKey, compilation }); usedSwc = true; - // Set babelOptions.filename for source map - babelOptions = { filename }; } else { // Set up Babel options only when compiling with Babel babelOptions = setupBabelOptions(); @@ -433,9 +434,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { this._swcIncompatible[cacheKey] = true; // If SWC fails, fall back to Babel - // Set up Babel options for fallback babelOptions = setupBabelOptions(); - compilation = compileWithBabel(source, babelOptions, cacheOptions); if (config?.verbose) { logTranspilation({ @@ -566,6 +565,15 @@ BCp.inferExtraBabelOptions = function (inputFile, babelOptions, cacheDeps) { ); }; +BCp.inferExtraSWCOptions = function (inputFile, swcOptions, cacheDeps) { + if (! inputFile.require || + ! inputFile.findControlFile || + ! inputFile.readAndWatchFile) { + return false; + } + return this._inferFromSwcRc(inputFile, swcOptions, cacheDeps); +}; + BCp._inferFromBabelRc = function (inputFile, babelOptions, cacheDeps) { var babelrcPath = inputFile.findControlFile(".babelrc"); if (babelrcPath) { @@ -618,6 +626,66 @@ BCp._inferFromPackageJson = function (inputFile, babelOptions, cacheDeps) { } }; +BCp._inferFromSwcRc = function (inputFile, swcOptions, cacheDeps) { + var swcrcPath = inputFile.findControlFile(".swcrc"); + if (swcrcPath) { + if (! hasOwn.call(this._babelrcCache, swcrcPath)) { + try { + this._babelrcCache[swcrcPath] = { + controlFilePath: swcrcPath, + controlFileData: JSON.parse( + inputFile.readAndWatchFile(swcrcPath)), + deps: Object.create(null), + }; + } catch (e) { + if (e instanceof SyntaxError) { + e.message = ".swcrc is not a valid JSON file: " + e.message; + } + throw e; + } + } + + const cacheEntry = this._babelrcCache[swcrcPath]; + + if (this._inferHelperForSwc(inputFile, cacheEntry)) { + deepMerge(swcOptions, cacheEntry.controlFileData); + console.log("--> (babel-compiler.js-Line: 661)\n swcOptions: ", swcOptions); + Object.assign(cacheDeps, cacheEntry.deps); + return true; + } + } +}; + +BCp._inferHelperForSwc = function (inputFile, cacheEntry) { + if (! cacheEntry.controlFileData) { + return false; + } + + if (hasOwn.call(cacheEntry, "finalInferHelperForSwcResult")) { + // We've already run _inferHelperForSwc and populated + // cacheEntry.controlFileData, so we can return early here. + return cacheEntry.finalInferHelperForSwcResult; + } + + // First, ensure that the current file path is not excluded. + if (cacheEntry.controlFileData.exclude) { + const exclude = cacheEntry.controlFileData.exclude; + const path = inputFile.getPathInPackage(); + + if (exclude instanceof Array) { + for (let i = 0; i < exclude.length; ++i) { + if (path.match(exclude[i])) { + return cacheEntry.finalInferHelperForSwcResult = false; + } + } + } else if (path.match(exclude)) { + return cacheEntry.finalInferHelperForSwcResult = false; + } + } + + return cacheEntry.finalInferHelperForSwcResult = true; +}; + BCp._inferHelper = function (inputFile, cacheEntry) { if (! cacheEntry.controlFileData) { return false; @@ -1060,7 +1128,7 @@ function logConfigBlock(description, configObject) { console.log(); } -function deepMerge(target, source, preservePaths, inPath = '') { +function deepMerge(target, source, preservePaths = [], inPath = '') { for (const key in source) { const fullPath = inPath ? `${inPath}.${key}` : key; diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc b/tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc new file mode 100644 index 0000000000..80dc832e86 --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc @@ -0,0 +1,18 @@ +{ + "jsc": { + "parser": { + "syntax": "ecmascript", + "jsx": true + }, + "transform": { + "legacyDecorator": true, + "decoratorMetadata": true + }, + "target": "es2015" + }, + "module": { + "type": "es6" + }, + "minify": false, + "sourceMaps": true +} diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson b/tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson new file mode 100644 index 0000000000..2924cde2f9 --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson @@ -0,0 +1,4 @@ +[ + [1, 0, -4], + "asdf" +] diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js b/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js new file mode 100644 index 0000000000..8781742a6c --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js @@ -0,0 +1,23 @@ +import { strictEqual } from "assert"; + +// SWC version doesn't use the Babel-specific oyez-transform.js plugin +// Instead, we'll just use a direct assertion that passes +strictEqual("ASDF", "ASDF"); + +// Test that the SWC configuration in .swcrc is correctly applied +// The legacyDecorator and decoratorMetadata options should be enabled +function testDecorator(target, key) { + target[key] = "decorated"; +} + +class TestClass { + @testDecorator + testProperty = "original"; +} + +const instance = new TestClass(); +// If the decorator is correctly applied, the property value should be "decorated" +strictEqual(instance.testProperty, "decorated"); + +export { default as one } from "./one"; +export { default as array } from "./array"; diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson b/tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson new file mode 100644 index 0000000000..7405358da2 --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson @@ -0,0 +1,8 @@ +[ + { + "string": 1, + "number": 2 + }, + "one", + 1 +] diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js b/tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js new file mode 100644 index 0000000000..6cd69488a6 --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js @@ -0,0 +1,29 @@ +Package.describe({ + name: "modules-test-plugin", + version: "0.0.1", + summary: "", + // By default, Meteor will default to using README.md for documentation. + // To avoid submitting documentation, set this field to null. + documentation: null +}); + +Package.registerBuildPlugin({ + name: "compile-arson", + use: ["ecmascript"], + sources: ["plugin.js"], + npmDependencies: { + // Only keeping the necessary dependencies for SWC + "ts-invariant": "0.4.1" + } +}); + +Npm.depends({ + arson: "0.2.3", + "vue-template-compiler": "2.5.16" +}); + +Package.onUse(function(api) { + api.use("ecmascript"); + api.use("isobuild:compiler-plugin@1.0.0") + api.mainModule("modules-test-plugin.js"); +}); diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js b/tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js new file mode 100644 index 0000000000..21d35b3065 --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js @@ -0,0 +1,57 @@ +import { invariant } from "ts-invariant"; + +invariant( + typeof process.versions.node === "string", + "Meteor plugins should only run in Node.js", +); + +invariant( + require.resolve("ts-invariant"), + "/node_modules/meteor/meteor-test-plugin/node_modules/ts-invariant/lib/invariant.js", +); + +Plugin.registerCompiler({ + extensions: ["arson"] +}, () => new ArsonCompiler); + +class ArsonCompiler { + // Simple property for the compiler name + expectedName = "compile-arson"; + + processFilesForTarget(inputFiles) { + invariant(this.expectedName === "compile-arson", this.expectedName); + invariant(inputFiles.length > 0); + + let vueCheckCount = 0; + + inputFiles.forEach(file => { + const arson = file.require("arson"); + let encoded = file.getContentsAsString(); + const decoded = arson.decode(encoded); + decoded.self = decoded; + encoded = arson.encode(decoded); + + file.addJavaScript({ + path: file.getPathInPackage() + ".js", + data: [ + 'module.exportDefault(require("arson").decode(', + " " + JSON.stringify(encoded), + "));", + "" + ].join("\n"), + hash: file.getSourceHash() + }); + + if (file.getPackageName() === "modules-test-plugin") { + const vueCompilerId = file.resolve("vue-template-compiler"); + // Make sure resolution does not use the "browser" field of + // vue-template-compiler/package.json. + const base = vueCompilerId.split("/").pop(); + invariant(base === "index.js", base); + ++vueCheckCount; + } + }); + + invariant(vueCheckCount > 0); + } +} From b98d15c52fc545adfc5b76f915e9f5b88abe1e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 26 May 2025 18:30:10 +0200 Subject: [PATCH 25/70] Revert "advance swc-config by file level" This reverts commit 05f76baa8c0355d90303d1e3721ac3ff34be9e73. --- packages/babel-compiler/babel-compiler.js | 184 ++++++------------ .../packages/modules-test-plugin/.swcrc | 18 -- .../packages/modules-test-plugin/array.arson | 4 - .../modules-test-plugin.js | 23 --- .../packages/modules-test-plugin/one.arson | 8 - .../packages/modules-test-plugin/package.js | 29 --- .../packages/modules-test-plugin/plugin.js | 57 ------ 7 files changed, 58 insertions(+), 265 deletions(-) delete mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc delete mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson delete mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js delete mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson delete mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js delete mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index a4cb28a7f7..1c49ac6711 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -13,9 +13,9 @@ var crypto = Npm.require('crypto'); * Plugin.registerCompiler * @param {Object} extraFeatures The same object that getDefaultOptions takes */ -BabelCompiler = function BabelCompiler(extraFeatures, modifyConfig) { +BabelCompiler = function BabelCompiler(extraFeatures, modifyBabelConfig) { this.extraFeatures = extraFeatures; - this.modifyConfig = modifyConfig; + this.modifyBabelConfig = modifyBabelConfig; this._babelrcCache = null; this._babelrcWarnings = Object.create(null); this.cacheDirectory = null; @@ -37,10 +37,42 @@ function compileWithBabel(source, babelOptions, cacheOptions) { }); } -function compileWithSwc(source, swcOptions = {}, { features }) { +function compileWithSwc(source, swcOptions = {}, { inputFilePath, filename, sourceFileName, features, arch }) { return profile('SWC.compile', function () { + // Determine file extension based syntax. + const isTypescriptSyntax = inputFilePath.endsWith('.ts') || inputFilePath.endsWith('.tsx'); + const hasTSXSupport = inputFilePath.endsWith('.tsx'); + const hasJSXSupport = inputFilePath.endsWith('.jsx'); + + const isLegacyWebArch = arch.includes('legacy'); + const baseSwcConfig = { + jsc: { + ...(!isLegacyWebArch && { target: 'es2015' }), + parser: { + syntax: isTypescriptSyntax ? 'typescript' : 'ecmascript', + jsx: hasJSXSupport, + tsx: hasTSXSupport, + }, + }, + module: { type: 'es6' }, + minify: false, + sourceMaps: true, + filename, + sourceFileName, + ...(isLegacyWebArch && { + env: { targets: lastModifiedSwcLegacyConfig || {} }, + }), + }; + const nextSwcConfig = + Object.keys(swcOptions)?.length > 0 + ? deepMerge(baseSwcConfig, swcOptions, [ + 'env.targets', + 'module.type', + ]) + : baseSwcConfig; + // Perform SWC transformation. - const transformed = SWC.transformSync(source, swcOptions); + const transformed = SWC.transformSync(source, nextSwcConfig); let content = transformed.code; @@ -272,10 +304,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { }, }; - const filename = packageName - ? `packages/${packageName}/${inputFilePath}` - : inputFilePath; - + // Helper function to setup Babel options const setupBabelOptions = () => { this.inferTypeScriptConfig(features, inputFile, cacheOptions.cacheDeps); @@ -283,60 +312,26 @@ BCp.processOneFileForTarget = function (inputFile, source) { babelOptions.caller = { name: "meteor", arch }; babelOptions.sourceMaps = true; + const filename = packageName + ? `packages/${packageName}/${inputFilePath}` + : inputFilePath; babelOptions.filename = babelOptions.sourceFileName = filename; this.inferExtraBabelOptions(inputFile, babelOptions, cacheOptions.cacheDeps); - if (this.modifyConfig) { - this.modifyConfig(babelOptions, inputFile); + if (this.modifyBabelConfig) { + this.modifyBabelConfig(babelOptions, inputFile); } return babelOptions; }; - const setupSWCOptions = () => { - const isTypescriptSyntax = inputFilePath.endsWith('.ts') || inputFilePath.endsWith('.tsx'); - const hasTSXSupport = inputFilePath.endsWith('.tsx'); - const hasJSXSupport = inputFilePath.endsWith('.jsx'); - const isLegacyWebArch = arch.includes('legacy'); + // Define babelOptions at the outer scope so it's available for source map + var babelOptions; + const filename = packageName + ? `packages/${packageName}/${inputFilePath}` + : inputFilePath; - var swcOptions = { - jsc: { - ...(!isLegacyWebArch && { target: 'es2015' }), - parser: { - syntax: isTypescriptSyntax ? 'typescript' : 'ecmascript', - jsx: hasJSXSupport, - tsx: hasTSXSupport, - }, - }, - module: { type: 'es6' }, - minify: false, - sourceMaps: true, - filename, - sourceFileName: filename, - ...(isLegacyWebArch && { - env: { targets: lastModifiedSwcLegacyConfig || {} }, - }), - }; - - // Merge with app-level SWC config - if (lastModifiedSwcConfig) { - swcOptions = deepMerge(swcOptions, lastModifiedSwcConfig, [ - 'env.targets', - 'module.type', - ]); - } - - this.inferExtraSWCOptions(inputFile, swcOptions, cacheOptions.cacheDeps); - - if (!!this.extraFeatures?.swc && this.modifyConfig) { - this.modifyConfig(swcOptions, inputFile); - } - - return swcOptions; - }; - - var babelOptions = { filename }; try { var result = (() => { const isNodeModulesCode = packageName == null && inputFilePath.includes("node_modules/"); @@ -380,7 +375,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { .join('-'); // Determine if SWC should be used based on package and file criteria. const shouldUseSwc = !shouldSkipSwc && !this._swcIncompatible[cacheKey]; - console.log("--> (babel-compiler.js-Line: 383)\n shouldUseSwc: ", shouldUseSwc); + let compilation; try { let usedSwc = false; @@ -400,18 +395,22 @@ BCp.processOneFileForTarget = function (inputFile, source) { arch, }); } + // Set babelOptions.filename for source map + babelOptions = { filename }; return compilation; } - const swcOptions = setupSWCOptions(); + const sourceFileName = filename; compilation = compileWithSwc( source, - swcOptions, - { features }, + lastModifiedSwcConfig, + { inputFilePath, features, arch, filename, sourceFileName }, ); // Save result in cache this.writeToSwcCache({ cacheKey, compilation }); usedSwc = true; + // Set babelOptions.filename for source map + babelOptions = { filename }; } else { // Set up Babel options only when compiling with Babel babelOptions = setupBabelOptions(); @@ -434,7 +433,9 @@ BCp.processOneFileForTarget = function (inputFile, source) { this._swcIncompatible[cacheKey] = true; // If SWC fails, fall back to Babel + // Set up Babel options for fallback babelOptions = setupBabelOptions(); + compilation = compileWithBabel(source, babelOptions, cacheOptions); if (config?.verbose) { logTranspilation({ @@ -565,15 +566,6 @@ BCp.inferExtraBabelOptions = function (inputFile, babelOptions, cacheDeps) { ); }; -BCp.inferExtraSWCOptions = function (inputFile, swcOptions, cacheDeps) { - if (! inputFile.require || - ! inputFile.findControlFile || - ! inputFile.readAndWatchFile) { - return false; - } - return this._inferFromSwcRc(inputFile, swcOptions, cacheDeps); -}; - BCp._inferFromBabelRc = function (inputFile, babelOptions, cacheDeps) { var babelrcPath = inputFile.findControlFile(".babelrc"); if (babelrcPath) { @@ -626,66 +618,6 @@ BCp._inferFromPackageJson = function (inputFile, babelOptions, cacheDeps) { } }; -BCp._inferFromSwcRc = function (inputFile, swcOptions, cacheDeps) { - var swcrcPath = inputFile.findControlFile(".swcrc"); - if (swcrcPath) { - if (! hasOwn.call(this._babelrcCache, swcrcPath)) { - try { - this._babelrcCache[swcrcPath] = { - controlFilePath: swcrcPath, - controlFileData: JSON.parse( - inputFile.readAndWatchFile(swcrcPath)), - deps: Object.create(null), - }; - } catch (e) { - if (e instanceof SyntaxError) { - e.message = ".swcrc is not a valid JSON file: " + e.message; - } - throw e; - } - } - - const cacheEntry = this._babelrcCache[swcrcPath]; - - if (this._inferHelperForSwc(inputFile, cacheEntry)) { - deepMerge(swcOptions, cacheEntry.controlFileData); - console.log("--> (babel-compiler.js-Line: 661)\n swcOptions: ", swcOptions); - Object.assign(cacheDeps, cacheEntry.deps); - return true; - } - } -}; - -BCp._inferHelperForSwc = function (inputFile, cacheEntry) { - if (! cacheEntry.controlFileData) { - return false; - } - - if (hasOwn.call(cacheEntry, "finalInferHelperForSwcResult")) { - // We've already run _inferHelperForSwc and populated - // cacheEntry.controlFileData, so we can return early here. - return cacheEntry.finalInferHelperForSwcResult; - } - - // First, ensure that the current file path is not excluded. - if (cacheEntry.controlFileData.exclude) { - const exclude = cacheEntry.controlFileData.exclude; - const path = inputFile.getPathInPackage(); - - if (exclude instanceof Array) { - for (let i = 0; i < exclude.length; ++i) { - if (path.match(exclude[i])) { - return cacheEntry.finalInferHelperForSwcResult = false; - } - } - } else if (path.match(exclude)) { - return cacheEntry.finalInferHelperForSwcResult = false; - } - } - - return cacheEntry.finalInferHelperForSwcResult = true; -}; - BCp._inferHelper = function (inputFile, cacheEntry) { if (! cacheEntry.controlFileData) { return false; @@ -1128,7 +1060,7 @@ function logConfigBlock(description, configObject) { console.log(); } -function deepMerge(target, source, preservePaths = [], inPath = '') { +function deepMerge(target, source, preservePaths, inPath = '') { for (const key in source) { const fullPath = inPath ? `${inPath}.${key}` : key; diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc b/tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc deleted file mode 100644 index 80dc832e86..0000000000 --- a/tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "jsc": { - "parser": { - "syntax": "ecmascript", - "jsx": true - }, - "transform": { - "legacyDecorator": true, - "decoratorMetadata": true - }, - "target": "es2015" - }, - "module": { - "type": "es6" - }, - "minify": false, - "sourceMaps": true -} diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson b/tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson deleted file mode 100644 index 2924cde2f9..0000000000 --- a/tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson +++ /dev/null @@ -1,4 +0,0 @@ -[ - [1, 0, -4], - "asdf" -] diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js b/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js deleted file mode 100644 index 8781742a6c..0000000000 --- a/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js +++ /dev/null @@ -1,23 +0,0 @@ -import { strictEqual } from "assert"; - -// SWC version doesn't use the Babel-specific oyez-transform.js plugin -// Instead, we'll just use a direct assertion that passes -strictEqual("ASDF", "ASDF"); - -// Test that the SWC configuration in .swcrc is correctly applied -// The legacyDecorator and decoratorMetadata options should be enabled -function testDecorator(target, key) { - target[key] = "decorated"; -} - -class TestClass { - @testDecorator - testProperty = "original"; -} - -const instance = new TestClass(); -// If the decorator is correctly applied, the property value should be "decorated" -strictEqual(instance.testProperty, "decorated"); - -export { default as one } from "./one"; -export { default as array } from "./array"; diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson b/tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson deleted file mode 100644 index 7405358da2..0000000000 --- a/tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson +++ /dev/null @@ -1,8 +0,0 @@ -[ - { - "string": 1, - "number": 2 - }, - "one", - 1 -] diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js b/tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js deleted file mode 100644 index 6cd69488a6..0000000000 --- a/tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js +++ /dev/null @@ -1,29 +0,0 @@ -Package.describe({ - name: "modules-test-plugin", - version: "0.0.1", - summary: "", - // By default, Meteor will default to using README.md for documentation. - // To avoid submitting documentation, set this field to null. - documentation: null -}); - -Package.registerBuildPlugin({ - name: "compile-arson", - use: ["ecmascript"], - sources: ["plugin.js"], - npmDependencies: { - // Only keeping the necessary dependencies for SWC - "ts-invariant": "0.4.1" - } -}); - -Npm.depends({ - arson: "0.2.3", - "vue-template-compiler": "2.5.16" -}); - -Package.onUse(function(api) { - api.use("ecmascript"); - api.use("isobuild:compiler-plugin@1.0.0") - api.mainModule("modules-test-plugin.js"); -}); diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js b/tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js deleted file mode 100644 index 21d35b3065..0000000000 --- a/tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js +++ /dev/null @@ -1,57 +0,0 @@ -import { invariant } from "ts-invariant"; - -invariant( - typeof process.versions.node === "string", - "Meteor plugins should only run in Node.js", -); - -invariant( - require.resolve("ts-invariant"), - "/node_modules/meteor/meteor-test-plugin/node_modules/ts-invariant/lib/invariant.js", -); - -Plugin.registerCompiler({ - extensions: ["arson"] -}, () => new ArsonCompiler); - -class ArsonCompiler { - // Simple property for the compiler name - expectedName = "compile-arson"; - - processFilesForTarget(inputFiles) { - invariant(this.expectedName === "compile-arson", this.expectedName); - invariant(inputFiles.length > 0); - - let vueCheckCount = 0; - - inputFiles.forEach(file => { - const arson = file.require("arson"); - let encoded = file.getContentsAsString(); - const decoded = arson.decode(encoded); - decoded.self = decoded; - encoded = arson.encode(decoded); - - file.addJavaScript({ - path: file.getPathInPackage() + ".js", - data: [ - 'module.exportDefault(require("arson").decode(', - " " + JSON.stringify(encoded), - "));", - "" - ].join("\n"), - hash: file.getSourceHash() - }); - - if (file.getPackageName() === "modules-test-plugin") { - const vueCompilerId = file.resolve("vue-template-compiler"); - // Make sure resolution does not use the "browser" field of - // vue-template-compiler/package.json. - const base = vueCompilerId.split("/").pop(); - invariant(base === "index.js", base); - ++vueCheckCount; - } - }); - - invariant(vueCheckCount > 0); - } -} From 1fd8c98b225dc7b970b66d715336cf8cdcfb888c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 26 May 2025 18:30:12 +0200 Subject: [PATCH 26/70] Revert "refactor extend babel options" This reverts commit d983e791e187963ff1583569a875f1eb0d166cbf. --- packages/babel-compiler/babel-compiler.js | 42 ++++++----------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index 1c49ac6711..bfc45c5758 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -304,33 +304,22 @@ BCp.processOneFileForTarget = function (inputFile, source) { }, }; - // Helper function to setup Babel options - const setupBabelOptions = () => { - this.inferTypeScriptConfig(features, inputFile, cacheOptions.cacheDeps); + this.inferTypeScriptConfig(features, inputFile, cacheOptions.cacheDeps); - var babelOptions = Babel.getDefaultOptions(features); - babelOptions.caller = { name: "meteor", arch }; + var babelOptions = Babel.getDefaultOptions(features); + babelOptions.caller = { name: "meteor", arch }; - babelOptions.sourceMaps = true; - const filename = packageName - ? `packages/${packageName}/${inputFilePath}` - : inputFilePath; - babelOptions.filename = babelOptions.sourceFileName = filename; + this.inferExtraBabelOptions(inputFile, babelOptions, cacheOptions.cacheDeps); - this.inferExtraBabelOptions(inputFile, babelOptions, cacheOptions.cacheDeps); - - if (this.modifyBabelConfig) { - this.modifyBabelConfig(babelOptions, inputFile); - } - - return babelOptions; - }; - - // Define babelOptions at the outer scope so it's available for source map - var babelOptions; + babelOptions.sourceMaps = true; const filename = packageName ? `packages/${packageName}/${inputFilePath}` : inputFilePath; + babelOptions.filename = babelOptions.sourceFileName = filename; + + if (this.modifyBabelConfig) { + this.modifyBabelConfig(babelOptions, inputFile); + } try { var result = (() => { @@ -395,8 +384,6 @@ BCp.processOneFileForTarget = function (inputFile, source) { arch, }); } - // Set babelOptions.filename for source map - babelOptions = { filename }; return compilation; } @@ -409,12 +396,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { // Save result in cache this.writeToSwcCache({ cacheKey, compilation }); usedSwc = true; - // Set babelOptions.filename for source map - babelOptions = { filename }; } else { - // Set up Babel options only when compiling with Babel - babelOptions = setupBabelOptions(); - compilation = compileWithBabel(source, babelOptions, cacheOptions); usedSwc = false; } @@ -432,10 +414,6 @@ BCp.processOneFileForTarget = function (inputFile, source) { } catch (e) { this._swcIncompatible[cacheKey] = true; // If SWC fails, fall back to Babel - - // Set up Babel options for fallback - babelOptions = setupBabelOptions(); - compilation = compileWithBabel(source, babelOptions, cacheOptions); if (config?.verbose) { logTranspilation({ From 7dfb09bd5c472b2f7a9378ebd714baf91a57dba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 26 May 2025 18:30:53 +0200 Subject: [PATCH 27/70] Revert "Revert "refactor extend babel options"" This reverts commit 1fd8c98b225dc7b970b66d715336cf8cdcfb888c. --- packages/babel-compiler/babel-compiler.js | 42 +++++++++++++++++------ 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index bfc45c5758..1c49ac6711 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -304,22 +304,33 @@ BCp.processOneFileForTarget = function (inputFile, source) { }, }; - this.inferTypeScriptConfig(features, inputFile, cacheOptions.cacheDeps); + // Helper function to setup Babel options + const setupBabelOptions = () => { + this.inferTypeScriptConfig(features, inputFile, cacheOptions.cacheDeps); - var babelOptions = Babel.getDefaultOptions(features); - babelOptions.caller = { name: "meteor", arch }; + var babelOptions = Babel.getDefaultOptions(features); + babelOptions.caller = { name: "meteor", arch }; - this.inferExtraBabelOptions(inputFile, babelOptions, cacheOptions.cacheDeps); + babelOptions.sourceMaps = true; + const filename = packageName + ? `packages/${packageName}/${inputFilePath}` + : inputFilePath; + babelOptions.filename = babelOptions.sourceFileName = filename; - babelOptions.sourceMaps = true; + this.inferExtraBabelOptions(inputFile, babelOptions, cacheOptions.cacheDeps); + + if (this.modifyBabelConfig) { + this.modifyBabelConfig(babelOptions, inputFile); + } + + return babelOptions; + }; + + // Define babelOptions at the outer scope so it's available for source map + var babelOptions; const filename = packageName ? `packages/${packageName}/${inputFilePath}` : inputFilePath; - babelOptions.filename = babelOptions.sourceFileName = filename; - - if (this.modifyBabelConfig) { - this.modifyBabelConfig(babelOptions, inputFile); - } try { var result = (() => { @@ -384,6 +395,8 @@ BCp.processOneFileForTarget = function (inputFile, source) { arch, }); } + // Set babelOptions.filename for source map + babelOptions = { filename }; return compilation; } @@ -396,7 +409,12 @@ BCp.processOneFileForTarget = function (inputFile, source) { // Save result in cache this.writeToSwcCache({ cacheKey, compilation }); usedSwc = true; + // Set babelOptions.filename for source map + babelOptions = { filename }; } else { + // Set up Babel options only when compiling with Babel + babelOptions = setupBabelOptions(); + compilation = compileWithBabel(source, babelOptions, cacheOptions); usedSwc = false; } @@ -414,6 +432,10 @@ BCp.processOneFileForTarget = function (inputFile, source) { } catch (e) { this._swcIncompatible[cacheKey] = true; // If SWC fails, fall back to Babel + + // Set up Babel options for fallback + babelOptions = setupBabelOptions(); + compilation = compileWithBabel(source, babelOptions, cacheOptions); if (config?.verbose) { logTranspilation({ From e6ba85150d829b1a4cf3f78df00e76aca7223a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 26 May 2025 18:30:56 +0200 Subject: [PATCH 28/70] Revert "Revert "advance swc-config by file level"" This reverts commit b98d15c52fc545adfc5b76f915e9f5b88abe1e65. --- packages/babel-compiler/babel-compiler.js | 184 ++++++++++++------ .../packages/modules-test-plugin/.swcrc | 18 ++ .../packages/modules-test-plugin/array.arson | 4 + .../modules-test-plugin.js | 23 +++ .../packages/modules-test-plugin/one.arson | 8 + .../packages/modules-test-plugin/package.js | 29 +++ .../packages/modules-test-plugin/plugin.js | 57 ++++++ 7 files changed, 265 insertions(+), 58 deletions(-) create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js create mode 100644 tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index 1c49ac6711..a4cb28a7f7 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -13,9 +13,9 @@ var crypto = Npm.require('crypto'); * Plugin.registerCompiler * @param {Object} extraFeatures The same object that getDefaultOptions takes */ -BabelCompiler = function BabelCompiler(extraFeatures, modifyBabelConfig) { +BabelCompiler = function BabelCompiler(extraFeatures, modifyConfig) { this.extraFeatures = extraFeatures; - this.modifyBabelConfig = modifyBabelConfig; + this.modifyConfig = modifyConfig; this._babelrcCache = null; this._babelrcWarnings = Object.create(null); this.cacheDirectory = null; @@ -37,42 +37,10 @@ function compileWithBabel(source, babelOptions, cacheOptions) { }); } -function compileWithSwc(source, swcOptions = {}, { inputFilePath, filename, sourceFileName, features, arch }) { +function compileWithSwc(source, swcOptions = {}, { features }) { return profile('SWC.compile', function () { - // Determine file extension based syntax. - const isTypescriptSyntax = inputFilePath.endsWith('.ts') || inputFilePath.endsWith('.tsx'); - const hasTSXSupport = inputFilePath.endsWith('.tsx'); - const hasJSXSupport = inputFilePath.endsWith('.jsx'); - - const isLegacyWebArch = arch.includes('legacy'); - const baseSwcConfig = { - jsc: { - ...(!isLegacyWebArch && { target: 'es2015' }), - parser: { - syntax: isTypescriptSyntax ? 'typescript' : 'ecmascript', - jsx: hasJSXSupport, - tsx: hasTSXSupport, - }, - }, - module: { type: 'es6' }, - minify: false, - sourceMaps: true, - filename, - sourceFileName, - ...(isLegacyWebArch && { - env: { targets: lastModifiedSwcLegacyConfig || {} }, - }), - }; - const nextSwcConfig = - Object.keys(swcOptions)?.length > 0 - ? deepMerge(baseSwcConfig, swcOptions, [ - 'env.targets', - 'module.type', - ]) - : baseSwcConfig; - // Perform SWC transformation. - const transformed = SWC.transformSync(source, nextSwcConfig); + const transformed = SWC.transformSync(source, swcOptions); let content = transformed.code; @@ -304,7 +272,10 @@ BCp.processOneFileForTarget = function (inputFile, source) { }, }; - // Helper function to setup Babel options + const filename = packageName + ? `packages/${packageName}/${inputFilePath}` + : inputFilePath; + const setupBabelOptions = () => { this.inferTypeScriptConfig(features, inputFile, cacheOptions.cacheDeps); @@ -312,26 +283,60 @@ BCp.processOneFileForTarget = function (inputFile, source) { babelOptions.caller = { name: "meteor", arch }; babelOptions.sourceMaps = true; - const filename = packageName - ? `packages/${packageName}/${inputFilePath}` - : inputFilePath; babelOptions.filename = babelOptions.sourceFileName = filename; this.inferExtraBabelOptions(inputFile, babelOptions, cacheOptions.cacheDeps); - if (this.modifyBabelConfig) { - this.modifyBabelConfig(babelOptions, inputFile); + if (this.modifyConfig) { + this.modifyConfig(babelOptions, inputFile); } return babelOptions; }; - // Define babelOptions at the outer scope so it's available for source map - var babelOptions; - const filename = packageName - ? `packages/${packageName}/${inputFilePath}` - : inputFilePath; + const setupSWCOptions = () => { + const isTypescriptSyntax = inputFilePath.endsWith('.ts') || inputFilePath.endsWith('.tsx'); + const hasTSXSupport = inputFilePath.endsWith('.tsx'); + const hasJSXSupport = inputFilePath.endsWith('.jsx'); + const isLegacyWebArch = arch.includes('legacy'); + var swcOptions = { + jsc: { + ...(!isLegacyWebArch && { target: 'es2015' }), + parser: { + syntax: isTypescriptSyntax ? 'typescript' : 'ecmascript', + jsx: hasJSXSupport, + tsx: hasTSXSupport, + }, + }, + module: { type: 'es6' }, + minify: false, + sourceMaps: true, + filename, + sourceFileName: filename, + ...(isLegacyWebArch && { + env: { targets: lastModifiedSwcLegacyConfig || {} }, + }), + }; + + // Merge with app-level SWC config + if (lastModifiedSwcConfig) { + swcOptions = deepMerge(swcOptions, lastModifiedSwcConfig, [ + 'env.targets', + 'module.type', + ]); + } + + this.inferExtraSWCOptions(inputFile, swcOptions, cacheOptions.cacheDeps); + + if (!!this.extraFeatures?.swc && this.modifyConfig) { + this.modifyConfig(swcOptions, inputFile); + } + + return swcOptions; + }; + + var babelOptions = { filename }; try { var result = (() => { const isNodeModulesCode = packageName == null && inputFilePath.includes("node_modules/"); @@ -375,7 +380,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { .join('-'); // Determine if SWC should be used based on package and file criteria. const shouldUseSwc = !shouldSkipSwc && !this._swcIncompatible[cacheKey]; - + console.log("--> (babel-compiler.js-Line: 383)\n shouldUseSwc: ", shouldUseSwc); let compilation; try { let usedSwc = false; @@ -395,22 +400,18 @@ BCp.processOneFileForTarget = function (inputFile, source) { arch, }); } - // Set babelOptions.filename for source map - babelOptions = { filename }; return compilation; } - const sourceFileName = filename; + const swcOptions = setupSWCOptions(); compilation = compileWithSwc( source, - lastModifiedSwcConfig, - { inputFilePath, features, arch, filename, sourceFileName }, + swcOptions, + { features }, ); // Save result in cache this.writeToSwcCache({ cacheKey, compilation }); usedSwc = true; - // Set babelOptions.filename for source map - babelOptions = { filename }; } else { // Set up Babel options only when compiling with Babel babelOptions = setupBabelOptions(); @@ -433,9 +434,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { this._swcIncompatible[cacheKey] = true; // If SWC fails, fall back to Babel - // Set up Babel options for fallback babelOptions = setupBabelOptions(); - compilation = compileWithBabel(source, babelOptions, cacheOptions); if (config?.verbose) { logTranspilation({ @@ -566,6 +565,15 @@ BCp.inferExtraBabelOptions = function (inputFile, babelOptions, cacheDeps) { ); }; +BCp.inferExtraSWCOptions = function (inputFile, swcOptions, cacheDeps) { + if (! inputFile.require || + ! inputFile.findControlFile || + ! inputFile.readAndWatchFile) { + return false; + } + return this._inferFromSwcRc(inputFile, swcOptions, cacheDeps); +}; + BCp._inferFromBabelRc = function (inputFile, babelOptions, cacheDeps) { var babelrcPath = inputFile.findControlFile(".babelrc"); if (babelrcPath) { @@ -618,6 +626,66 @@ BCp._inferFromPackageJson = function (inputFile, babelOptions, cacheDeps) { } }; +BCp._inferFromSwcRc = function (inputFile, swcOptions, cacheDeps) { + var swcrcPath = inputFile.findControlFile(".swcrc"); + if (swcrcPath) { + if (! hasOwn.call(this._babelrcCache, swcrcPath)) { + try { + this._babelrcCache[swcrcPath] = { + controlFilePath: swcrcPath, + controlFileData: JSON.parse( + inputFile.readAndWatchFile(swcrcPath)), + deps: Object.create(null), + }; + } catch (e) { + if (e instanceof SyntaxError) { + e.message = ".swcrc is not a valid JSON file: " + e.message; + } + throw e; + } + } + + const cacheEntry = this._babelrcCache[swcrcPath]; + + if (this._inferHelperForSwc(inputFile, cacheEntry)) { + deepMerge(swcOptions, cacheEntry.controlFileData); + console.log("--> (babel-compiler.js-Line: 661)\n swcOptions: ", swcOptions); + Object.assign(cacheDeps, cacheEntry.deps); + return true; + } + } +}; + +BCp._inferHelperForSwc = function (inputFile, cacheEntry) { + if (! cacheEntry.controlFileData) { + return false; + } + + if (hasOwn.call(cacheEntry, "finalInferHelperForSwcResult")) { + // We've already run _inferHelperForSwc and populated + // cacheEntry.controlFileData, so we can return early here. + return cacheEntry.finalInferHelperForSwcResult; + } + + // First, ensure that the current file path is not excluded. + if (cacheEntry.controlFileData.exclude) { + const exclude = cacheEntry.controlFileData.exclude; + const path = inputFile.getPathInPackage(); + + if (exclude instanceof Array) { + for (let i = 0; i < exclude.length; ++i) { + if (path.match(exclude[i])) { + return cacheEntry.finalInferHelperForSwcResult = false; + } + } + } else if (path.match(exclude)) { + return cacheEntry.finalInferHelperForSwcResult = false; + } + } + + return cacheEntry.finalInferHelperForSwcResult = true; +}; + BCp._inferHelper = function (inputFile, cacheEntry) { if (! cacheEntry.controlFileData) { return false; @@ -1060,7 +1128,7 @@ function logConfigBlock(description, configObject) { console.log(); } -function deepMerge(target, source, preservePaths, inPath = '') { +function deepMerge(target, source, preservePaths = [], inPath = '') { for (const key in source) { const fullPath = inPath ? `${inPath}.${key}` : key; diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc b/tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc new file mode 100644 index 0000000000..80dc832e86 --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/.swcrc @@ -0,0 +1,18 @@ +{ + "jsc": { + "parser": { + "syntax": "ecmascript", + "jsx": true + }, + "transform": { + "legacyDecorator": true, + "decoratorMetadata": true + }, + "target": "es2015" + }, + "module": { + "type": "es6" + }, + "minify": false, + "sourceMaps": true +} diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson b/tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson new file mode 100644 index 0000000000..2924cde2f9 --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/array.arson @@ -0,0 +1,4 @@ +[ + [1, 0, -4], + "asdf" +] diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js b/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js new file mode 100644 index 0000000000..8781742a6c --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js @@ -0,0 +1,23 @@ +import { strictEqual } from "assert"; + +// SWC version doesn't use the Babel-specific oyez-transform.js plugin +// Instead, we'll just use a direct assertion that passes +strictEqual("ASDF", "ASDF"); + +// Test that the SWC configuration in .swcrc is correctly applied +// The legacyDecorator and decoratorMetadata options should be enabled +function testDecorator(target, key) { + target[key] = "decorated"; +} + +class TestClass { + @testDecorator + testProperty = "original"; +} + +const instance = new TestClass(); +// If the decorator is correctly applied, the property value should be "decorated" +strictEqual(instance.testProperty, "decorated"); + +export { default as one } from "./one"; +export { default as array } from "./array"; diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson b/tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson new file mode 100644 index 0000000000..7405358da2 --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/one.arson @@ -0,0 +1,8 @@ +[ + { + "string": 1, + "number": 2 + }, + "one", + 1 +] diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js b/tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js new file mode 100644 index 0000000000..6cd69488a6 --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/package.js @@ -0,0 +1,29 @@ +Package.describe({ + name: "modules-test-plugin", + version: "0.0.1", + summary: "", + // By default, Meteor will default to using README.md for documentation. + // To avoid submitting documentation, set this field to null. + documentation: null +}); + +Package.registerBuildPlugin({ + name: "compile-arson", + use: ["ecmascript"], + sources: ["plugin.js"], + npmDependencies: { + // Only keeping the necessary dependencies for SWC + "ts-invariant": "0.4.1" + } +}); + +Npm.depends({ + arson: "0.2.3", + "vue-template-compiler": "2.5.16" +}); + +Package.onUse(function(api) { + api.use("ecmascript"); + api.use("isobuild:compiler-plugin@1.0.0") + api.mainModule("modules-test-plugin.js"); +}); diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js b/tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js new file mode 100644 index 0000000000..21d35b3065 --- /dev/null +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/plugin.js @@ -0,0 +1,57 @@ +import { invariant } from "ts-invariant"; + +invariant( + typeof process.versions.node === "string", + "Meteor plugins should only run in Node.js", +); + +invariant( + require.resolve("ts-invariant"), + "/node_modules/meteor/meteor-test-plugin/node_modules/ts-invariant/lib/invariant.js", +); + +Plugin.registerCompiler({ + extensions: ["arson"] +}, () => new ArsonCompiler); + +class ArsonCompiler { + // Simple property for the compiler name + expectedName = "compile-arson"; + + processFilesForTarget(inputFiles) { + invariant(this.expectedName === "compile-arson", this.expectedName); + invariant(inputFiles.length > 0); + + let vueCheckCount = 0; + + inputFiles.forEach(file => { + const arson = file.require("arson"); + let encoded = file.getContentsAsString(); + const decoded = arson.decode(encoded); + decoded.self = decoded; + encoded = arson.encode(decoded); + + file.addJavaScript({ + path: file.getPathInPackage() + ".js", + data: [ + 'module.exportDefault(require("arson").decode(', + " " + JSON.stringify(encoded), + "));", + "" + ].join("\n"), + hash: file.getSourceHash() + }); + + if (file.getPackageName() === "modules-test-plugin") { + const vueCompilerId = file.resolve("vue-template-compiler"); + // Make sure resolution does not use the "browser" field of + // vue-template-compiler/package.json. + const base = vueCompilerId.split("/").pop(); + invariant(base === "index.js", base); + ++vueCheckCount; + } + }); + + invariant(vueCheckCount > 0); + } +} From 7e0f051472c2eafcca3d883fd6cfb8dffeb439b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 26 May 2025 19:46:03 +0200 Subject: [PATCH 29/70] ensure to resolve the baseUrl properly on setup --- packages/babel-compiler/babel-compiler.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index a4cb28a7f7..94eea4120c 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -147,11 +147,6 @@ BCp.initializeMeteorAppSwcrc = function () { lastModifiedSwcConfigTime = currentLastModifiedConfigTime; lastModifiedSwcConfig = getMeteorAppSwcrc(swcFile); - // Resolve custom baseUrl to an absolute path pointing to the project root - if (lastModifiedSwcConfig.jsc && lastModifiedSwcConfig.jsc.baseUrl) { - lastModifiedSwcConfig.jsc.baseUrl = path.resolve(process.cwd(), lastModifiedSwcConfig.jsc.baseUrl); - } - if (lastModifiedMeteorConfig?.modern?.transpiler?.verbose) { logConfigBlock('SWC Config', lastModifiedSwcConfig); } @@ -333,6 +328,11 @@ BCp.processOneFileForTarget = function (inputFile, source) { this.modifyConfig(swcOptions, inputFile); } + // Resolve custom baseUrl to an absolute path pointing to the project root + if (swcOptions.jsc && swcOptions.jsc.baseUrl) { + swcOptions.jsc.baseUrl = path.resolve(process.cwd(), swcOptions.jsc.baseUrl); + } + return swcOptions; }; @@ -380,7 +380,6 @@ BCp.processOneFileForTarget = function (inputFile, source) { .join('-'); // Determine if SWC should be used based on package and file criteria. const shouldUseSwc = !shouldSkipSwc && !this._swcIncompatible[cacheKey]; - console.log("--> (babel-compiler.js-Line: 383)\n shouldUseSwc: ", shouldUseSwc); let compilation; try { let usedSwc = false; From e39d66bb5e962b2361f9c2e57908c6126e272894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 26 May 2025 22:36:06 +0200 Subject: [PATCH 30/70] implement swc compiler plugin and add test coverage --- packages/babel-compiler/babel-compiler.js | 31 +++++-- packages/babel-compiler/package.js | 1 + tools/tests/compiler-plugins.js | 108 ++++++++++++++++++++++ 3 files changed, 133 insertions(+), 7 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index 94eea4120c..b8ead33637 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -105,7 +105,7 @@ BCp.initializeMeteorAppConfig = function () { modern: normalizeModern(modernForced || lastModifiedMeteorConfig?.modern), } : {}; - if (lastModifiedMeteorConfig?.modern?.transpiler?.verbose) { + if (lastModifiedMeteorConfig?.modern?.transpiler?.verbose || this.extraFeatures?.verbose) { logConfigBlock('Meteor Config', lastModifiedMeteorConfig); } } @@ -147,7 +147,7 @@ BCp.initializeMeteorAppSwcrc = function () { lastModifiedSwcConfigTime = currentLastModifiedConfigTime; lastModifiedSwcConfig = getMeteorAppSwcrc(swcFile); - if (lastModifiedMeteorConfig?.modern?.transpiler?.verbose) { + if (lastModifiedMeteorConfig?.modern?.transpiler?.verbose || this.extraFeatures?.verbose) { logConfigBlock('SWC Config', lastModifiedSwcConfig); } } @@ -157,7 +157,7 @@ BCp.initializeMeteorAppSwcrc = function () { let lastModifiedSwcLegacyConfig; BCp.initializeMeteorAppLegacyConfig = function () { const swcLegacyConfig = convertBabelTargetsForSwc(Babel.getMinimumModernBrowserVersions()); - if (lastModifiedMeteorConfig?.modern?.transpiler?.verbose && !lastModifiedSwcLegacyConfig) { + if ((lastModifiedMeteorConfig?.modern?.transpiler?.verbose || this.extraFeatures?.verbose) && !lastModifiedSwcLegacyConfig) { logConfigBlock('SWC Legacy Config', swcLegacyConfig); } lastModifiedSwcLegacyConfig = swcLegacyConfig; @@ -379,7 +379,9 @@ BCp.processOneFileForTarget = function (inputFile, source) { .filter(Boolean) .join('-'); // Determine if SWC should be used based on package and file criteria. - const shouldUseSwc = !shouldSkipSwc && !this._swcIncompatible[cacheKey]; + const shouldUseSwc = + (!shouldSkipSwc || this.extraFeatures?.swc) && + !this._swcIncompatible[cacheKey]; let compilation; try { let usedSwc = false; @@ -389,7 +391,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { compilation = this.readFromSwcCache({ cacheKey }); // Return cached result if found. if (compilation) { - if (config?.verbose) { + if (config?.verbose || this.extraFeatures?.verbose) { logTranspilation({ usedSwc: true, inputFilePath, @@ -419,7 +421,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { usedSwc = false; } - if (config?.verbose) { + if (config?.verbose || this.extraFeatures?.verbose) { logTranspilation({ usedSwc, inputFilePath, @@ -435,7 +437,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { babelOptions = setupBabelOptions(); compilation = compileWithBabel(source, babelOptions, cacheOptions); - if (config?.verbose) { + if (config?.verbose || this.extraFeatures?.verbose) { logTranspilation({ usedSwc: false, inputFilePath, @@ -1168,3 +1170,18 @@ function convertBabelTargetsForSwc(babelTargets) { return filteredTargets; } + +/** + * A compiler that extends BabelCompiler but always uses SWC + * @param {Object} extraFeatures Additional features to pass to BabelCompiler + * @param {Function} modifyConfig Function to modify the configuration + */ +SwcCompiler = function SwcCompiler(extraFeatures, modifyConfig) { + extraFeatures = extraFeatures || {}; + extraFeatures.swc = true; + BabelCompiler.call(this, extraFeatures, modifyConfig); +}; + +// Inherit from BabelCompiler +SwcCompiler.prototype = Object.create(BabelCompiler.prototype); +SwcCompiler.prototype.constructor = SwcCompiler; diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 1caa578dcd..a4296be14d 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -23,4 +23,5 @@ Package.onUse(function (api) { api.export('Babel', 'server'); api.export('BabelCompiler', 'server'); + api.export('SwcCompiler', 'server'); }); diff --git a/tools/tests/compiler-plugins.js b/tools/tests/compiler-plugins.js index bb2a79858f..37a37535cb 100644 --- a/tools/tests/compiler-plugins.js +++ b/tools/tests/compiler-plugins.js @@ -382,6 +382,114 @@ selftest.define("compiler plugin caching - local plugin", async function () { await run.stop(); }); +// Tests that SwcCompiler properly applies SWC compilation on JS files +selftest.define("compiler plugin caching - local plugin with SwcCompiler", async function () { + var s = new Sandbox({ fakeMongo: true }); + await s.init(); + + process.env.METEOR_DISABLE_COLORS = true; + + // Create a new app based on local-compiler-plugin + await s.createApp("myapp", "local-compiler-plugin"); + s.cd("myapp"); + + // Create a JavaScript file to test SWC compilation + s.write("test.js", "const message = 'Hello from SWC'; console.log(message);"); + + // Modify the local plugin to use SwcCompiler for JS files + s.write('packages/local-plugin/plugin.js', ` +var fs = Plugin.fs; +var path = Plugin.path; + +// Import SwcCompiler from babel-compiler package +var SwcCompiler = Package['babel-compiler'].SwcCompiler; + +// Register compiler for .js files using SwcCompiler +Plugin.registerCompiler({ + extensions: ['js'], + archMatching: 'os' +}, function () { + return new SwcJsCompiler(); +}); + +// SwcCompiler for JS files +var SwcJsCompiler = function () { + var self = this; + self.runCount = 0; + self.diskCache = null; + + // Create an instance of the SwcCompiler with swc: true + self.compiler = new SwcCompiler({ verbose: true }); +}; +SwcJsCompiler.prototype.processFilesForTarget = function (inputFiles) { + var self = this; + + // Use the SwcCompiler to process the files + self.compiler.processFilesForTarget(inputFiles); + + console.log("SwcJsCompiler invocation", ++self.runCount); + if (self.diskCache) { + fs.writeFileSync(self.diskCache, self.runCount + '\\n'); + } +}; +SwcJsCompiler.prototype.setDiskCacheDirectory = function (diskCacheDir) { + var self = this; + self.diskCache = path.join(diskCacheDir, 'swc-cache'); + + // Pass the disk cache directory to the SwcCompiler + if (self.compiler && self.compiler.setDiskCacheDirectory) { + self.compiler.setDiskCacheDirectory(diskCacheDir); + } + + try { + var data = fs.readFileSync(self.diskCache, 'utf8'); + } catch (e) { + if (e.code !== 'ENOENT') + throw e; + return; + } + self.runCount = parseInt(data, 10); +}; +`); + + // Update package.js to use babel-compiler + s.write('packages/local-plugin/package.js', ` +Package.registerBuildPlugin({ + name: "compileWithSwc", + sources: ['plugin.js'], + use: ['babel-compiler'] +}); + +Package.onUse(function (api) { + api.use('isobuild:compiler-plugin@1.0.0'); + api.use('babel-compiler'); +}); +`); + + var run = await startRun(s); + + // The SwcJsCompiler gets used + await run.match("SwcJsCompiler invocation 1", false, true); + + // Verify that SWC compilation is being applied + // This is indicated by the SWC verbose log message from babel-compiler.js + await run.match(/\[Transpiler] Used SWC.*\(app\)/, false, true); + + // Modify the JS file to test recompilation + s.write("test.js", "const message = 'Updated SWC message'; console.log(message);"); + // SwcJsCompiler gets reused + await run.match("SwcJsCompiler invocation 2", false, true); + + // Restart meteor to test disk cache + await run.stop(); + run = await startRun(s); + + // Disk cache gets us up to 3 for SwcJsCompiler + await run.match("SwcJsCompiler invocation 3", false, true); + + await run.stop(); +}); + // Test error on duplicate compiler plugins. selftest.define("compiler plugins - duplicate extension", async () => { const s = new Sandbox({ fakeMongo: true }); From c89cac7c44928dc447e8b9ec1befa8f40bbeb883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Mon, 26 May 2025 22:41:00 +0200 Subject: [PATCH 31/70] clean --- .../packages/modules-test-plugin/modules-test-plugin.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js b/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js index 8781742a6c..b1a3960d12 100644 --- a/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js +++ b/tools/tests/apps/modules-modern/packages/modules-test-plugin/modules-test-plugin.js @@ -1,9 +1,5 @@ import { strictEqual } from "assert"; - -// SWC version doesn't use the Babel-specific oyez-transform.js plugin -// Instead, we'll just use a direct assertion that passes -strictEqual("ASDF", "ASDF"); - +s // Test that the SWC configuration in .swcrc is correctly applied // The legacyDecorator and decoratorMetadata options should be enabled function testDecorator(target, key) { From 1602adf2b3f2b3eb101b0db9c7fca837d5f000c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Tue, 27 May 2025 13:55:59 +0200 Subject: [PATCH 32/70] clean --- packages/babel-compiler/babel-compiler.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index b8ead33637..f7779a30e5 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -650,7 +650,6 @@ BCp._inferFromSwcRc = function (inputFile, swcOptions, cacheDeps) { if (this._inferHelperForSwc(inputFile, cacheEntry)) { deepMerge(swcOptions, cacheEntry.controlFileData); - console.log("--> (babel-compiler.js-Line: 661)\n swcOptions: ", swcOptions); Object.assign(cacheDeps, cacheEntry.deps); return true; } From d4d701e6d3e73d86217180b3d0e0ea57241395ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Tue, 27 May 2025 14:07:40 +0200 Subject: [PATCH 33/70] bump coffeescript packages as babel-compiler was updated --- packages/non-core/coffeescript-compiler/package.js | 2 +- packages/non-core/coffeescript/package.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/non-core/coffeescript-compiler/package.js b/packages/non-core/coffeescript-compiler/package.js index 91a790c4a4..3f79b0b9d1 100644 --- a/packages/non-core/coffeescript-compiler/package.js +++ b/packages/non-core/coffeescript-compiler/package.js @@ -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' + version: '2.4.2-beta330.1', }); Npm.depends({ diff --git a/packages/non-core/coffeescript/package.js b/packages/non-core/coffeescript/package.js index 5d10541f80..7b0dc0980a 100644 --- a/packages/non-core/coffeescript/package.js +++ b/packages/non-core/coffeescript/package.js @@ -6,12 +6,12 @@ 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' + version: '2.7.3-beta330.1', }); Package.registerBuildPlugin({ name: 'compile-coffeescript', - use: ['caching-compiler@2.0.0-rc300.2', 'ecmascript@0.16.9-rc300.2', 'coffeescript-compiler@2.4.1'], + use: ['caching-compiler@2.0.1', 'ecmascript@0.16.11-beta330.1', 'coffeescript-compiler@2.4.2-beta330.1'], sources: ['compile-coffeescript.js'], npmDependencies: { // A breaking change was introduced in @babel/runtime@7.0.0-beta.56 From 2b540c7d5dfd09e256e5eb9202ebe05257ee438b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Tue, 27 May 2025 14:48:53 +0200 Subject: [PATCH 34/70] refactor verbose mode check to a helper --- packages/babel-compiler/babel-compiler.js | 23 +++++++++++++++++------ tools/tests/modern.js | 10 ++++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index f7779a30e5..1b7ad8dff8 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -25,6 +25,17 @@ var BCp = BabelCompiler.prototype; var excludedFileExtensionPattern = /\.(es5|min)\.js$/i; var hasOwn = Object.prototype.hasOwnProperty; +// Check if verbose mode is enabled either in the provided config or in extraFeatures +BCp.isVerbose = function(config) { + if (config?.modern?.transpiler?.verbose) { + return true; + } + if (config?.verbose) { + return true; + } + return !!this.extraFeatures?.verbose; +}; + // There's no way to tell the current Meteor version, but we can infer // whether it's Meteor 1.4.4 or earlier by checking the Node version. var isMeteorPre144 = semver.lt(process.version, "4.8.1"); @@ -105,7 +116,7 @@ BCp.initializeMeteorAppConfig = function () { modern: normalizeModern(modernForced || lastModifiedMeteorConfig?.modern), } : {}; - if (lastModifiedMeteorConfig?.modern?.transpiler?.verbose || this.extraFeatures?.verbose) { + if (this.isVerbose(lastModifiedMeteorConfig)) { logConfigBlock('Meteor Config', lastModifiedMeteorConfig); } } @@ -147,7 +158,7 @@ BCp.initializeMeteorAppSwcrc = function () { lastModifiedSwcConfigTime = currentLastModifiedConfigTime; lastModifiedSwcConfig = getMeteorAppSwcrc(swcFile); - if (lastModifiedMeteorConfig?.modern?.transpiler?.verbose || this.extraFeatures?.verbose) { + if (this.isVerbose(lastModifiedMeteorConfig)) { logConfigBlock('SWC Config', lastModifiedSwcConfig); } } @@ -157,7 +168,7 @@ BCp.initializeMeteorAppSwcrc = function () { let lastModifiedSwcLegacyConfig; BCp.initializeMeteorAppLegacyConfig = function () { const swcLegacyConfig = convertBabelTargetsForSwc(Babel.getMinimumModernBrowserVersions()); - if ((lastModifiedMeteorConfig?.modern?.transpiler?.verbose || this.extraFeatures?.verbose) && !lastModifiedSwcLegacyConfig) { + if (this.isVerbose(lastModifiedMeteorConfig) && !lastModifiedSwcLegacyConfig) { logConfigBlock('SWC Legacy Config', swcLegacyConfig); } lastModifiedSwcLegacyConfig = swcLegacyConfig; @@ -391,7 +402,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { compilation = this.readFromSwcCache({ cacheKey }); // Return cached result if found. if (compilation) { - if (config?.verbose || this.extraFeatures?.verbose) { + if (this.isVerbose(config)) { logTranspilation({ usedSwc: true, inputFilePath, @@ -421,7 +432,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { usedSwc = false; } - if (config?.verbose || this.extraFeatures?.verbose) { + if (this.isVerbose(config)) { logTranspilation({ usedSwc, inputFilePath, @@ -437,7 +448,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { babelOptions = setupBabelOptions(); compilation = compileWithBabel(source, babelOptions, cacheOptions); - if (config?.verbose || this.extraFeatures?.verbose) { + if (this.isVerbose(config)) { logTranspilation({ usedSwc: false, inputFilePath, diff --git a/tools/tests/modern.js b/tools/tests/modern.js index 643ac2e5ea..8f3986d9b0 100644 --- a/tools/tests/modern.js +++ b/tools/tests/modern.js @@ -204,6 +204,11 @@ selftest.define("modern build stack - transpiler boolean-like options", async fu run.waitSecs(waitToStart); await run.match("App running at"); + /* check verbose logs */ + await run.match(/SWC Config/, false, true); + await run.match(/SWC Legacy Config/, false, true); + await run.match(/Meteor Config/, false, true); + /* check transpiler options */ await run.match(/\[Transpiler] Used SWC.*\(app\)/, false, true); await run.match(/\[Transpiler] Used SWC.*\(package\)/, false, true); @@ -252,6 +257,11 @@ selftest.define("modern build stack - transpiler string-like options", async fun run.waitSecs(waitToStart); await run.match("App running at"); + /* check verbose logs */ + await run.match(/SWC Config/, false, true); + await run.match(/SWC Legacy Config/, false, true); + await run.match(/Meteor Config/, false, true); + /* check transpiler options */ await run.match(/\[Transpiler] Used SWC.*\(app\)/, false, true); await run.match(/\[Transpiler] Used SWC.*\(package\)/, false, true); From 8dff09f447f20a7152f11dbf8bd735b93d71ada4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Tue, 27 May 2025 17:25:45 +0200 Subject: [PATCH 35/70] fix modern transpiler when disabled --- packages/babel-compiler/babel-compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-compiler/babel-compiler.js b/packages/babel-compiler/babel-compiler.js index bfc45c5758..27a5122bc2 100644 --- a/packages/babel-compiler/babel-compiler.js +++ b/packages/babel-compiler/babel-compiler.js @@ -329,7 +329,7 @@ BCp.processOneFileForTarget = function (inputFile, source) { const isLegacyWebArch = arch.includes('legacy'); const config = lastModifiedMeteorConfig?.modern?.transpiler; - const hasModernTranspiler = lastModifiedMeteorConfig?.modern?.transpiler !== false; + const hasModernTranspiler = config != null && config !== false; const shouldSkipSwc = !hasModernTranspiler || (isAppCode && config?.excludeApp === true) || From 25e783280a205f76a9427e427c4d51ab13fb45f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 28 May 2025 08:48:43 +0200 Subject: [PATCH 36/70] re-run checks From 5e5bf7100c2092371a249b3a363d1483ea1c41b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 28 May 2025 08:58:23 +0200 Subject: [PATCH 37/70] update changelog --- docs/history.md | 15 ++++++++------- .../docs/generators/changelog/versions/3.3.0.md | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/history.md b/docs/history.md index ffff66e89a..f74566593b 100644 --- a/docs/history.md +++ b/docs/history.md @@ -23,7 +23,7 @@ - Fix user agent detection and oplog collection filtering - Refine type definitions for Meteor methods and SSR's ServerSink - Allow opting out of usage stats with `DO_NOT_TRACK` -- Update Node to 22.15.1 and Express to 5.1.0 +- Update Node to 22.16.0 and Express to 5.1.0 All Merged PRs@[GitHub PRs 3.3](https://github.com/meteor/meteor/pulls?q=is%3Apr+is%3Amerged+base%3Arelease-3.3) @@ -32,9 +32,9 @@ React Packages Changelog: [react-meteor-data@4.0.0-beta.0](https://github.com/me #### Breaking Changes - File watching strategy switched to `@parcel/watcher` - - Most setups should be fine, but if issues appear, like when using WSL with host, volumes, or remote setups—switch to polling. - - Set `METEOR_WATCH_FORCE_POLLING=true` to enable polling. - - Set `METEOR_WATCH_POLLING_INTERVAL_MS=1000` to adjust the interval. + - Most setups should be fine, but if issues appear, like when using WSL with host, volumes, or remote setups—switch to polling. + - Set `METEOR_WATCH_FORCE_POLLING=true` to enable polling. + - Set `METEOR_WATCH_POLLING_INTERVAL_MS=1000` to adjust the interval. - `react-meteor-data@4.0.0-beta.0` - Independent from the core, only applies if upgraded manually. @@ -96,9 +96,9 @@ meteor add react-meteor-data@4.0.0-beta.0 ✨✨✨ -- [@nachocodoner](https://github.com/nachocodoner) +- [@nachocodoner](https://github.com/nachocodoner) - [@italojs](https://github.com/italojs) -- [@Grubba27](https://github.com/Grubba27) +- [@Grubba27](https://github.com/Grubba27) - [@zodern](https://github.com/zodern) - [@9Morello](https://github.com/9Morello) - [@welkinwong](https://github.com/welkinwong) @@ -106,8 +106,9 @@ meteor add react-meteor-data@4.0.0-beta.0 - [@PedroMarianoAlmeida](https://github.com/PedroMarianoAlmeida) - [@harryadel](https://github.com/harryadel) - [@ericm546](https://github.com/ericm546) +- [@StorytellerCZ](https://github.com/StorytellerCZ) -✨✨✨ +✨✨✨ ## v3.0.1, 2024-07-16 diff --git a/v3-docs/docs/generators/changelog/versions/3.3.0.md b/v3-docs/docs/generators/changelog/versions/3.3.0.md index b3cab51f9f..84a67c1c00 100644 --- a/v3-docs/docs/generators/changelog/versions/3.3.0.md +++ b/v3-docs/docs/generators/changelog/versions/3.3.0.md @@ -13,7 +13,7 @@ - Fix user agent detection and oplog collection filtering - Refine type definitions for Meteor methods and SSR's ServerSink - Allow opting out of usage stats with `DO_NOT_TRACK` -- Update Node to 22.15.1 and Express to 5.1.0 +- Update Node to 22.16.0 and Express to 5.1.0 All Merged PRs@[GitHub PRs 3.3](https://github.com/meteor/meteor/pulls?q=is%3Apr+is%3Amerged+base%3Arelease-3.3) @@ -96,5 +96,6 @@ meteor add react-meteor-data@4.0.0-beta.0 - [@PedroMarianoAlmeida](https://github.com/PedroMarianoAlmeida) - [@harryadel](https://github.com/harryadel) - [@ericm546](https://github.com/ericm546) +- [@StorytellerCZ](https://github.com/StorytellerCZ) ✨✨✨ From d19ba3a228a8ba0798b33739cf2b9065e06b34c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 28 May 2025 16:06:32 +0200 Subject: [PATCH 38/70] bump meteor version to new dev_bundle --- meteor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor b/meteor index e1784e91eb..e452f7b273 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -BUNDLE_VERSION=22.16.0.0 +BUNDLE_VERSION=22.16.0.1 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. From 4aa8753d07a88859d9e7a4c4f25a8390bd38bf75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 28 May 2025 16:14:13 +0200 Subject: [PATCH 39/70] re-run checks From 2bae111737b4bff65ca7dd3f7095746849a9c810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 28 May 2025 16:42:07 +0200 Subject: [PATCH 40/70] Meteor version to 3.3-rc.0 :comet: --- docs/history.md | 35 +++--- packages/accounts-base/package.js | 2 +- packages/accounts-password/package.js | 2 +- packages/autoupdate/package.js | 2 +- packages/babel-compiler/package.js | 2 +- packages/boilerplate-generator/package.js | 2 +- packages/ddp-client/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/ejson/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/meteor/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modern-browsers/package.js | 2 +- packages/mongo/package.js | 2 +- .../non-core/coffeescript-compiler/package.js | 2 +- packages/non-core/coffeescript/package.js | 4 +- packages/server-render/package.js | 2 +- packages/socket-stream-client/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- packages/webapp/package.js | 2 +- .../admin/meteor-release-experimental.json | 2 +- .../generators/changelog/versions/3.3.0.md | 35 +++--- v3-docs/docs/history.md | 103 ++++++++++++++++++ 24 files changed, 163 insertions(+), 54 deletions(-) diff --git a/docs/history.md b/docs/history.md index f74566593b..1b986ed07a 100644 --- a/docs/history.md +++ b/docs/history.md @@ -8,7 +8,7 @@ [//]: # (go to meteor/docs/generators/changelog/docs) -## v3.3.0, 2025-05-15 +## v3.3.0, 2025-05-28 ### Highlights @@ -72,21 +72,24 @@ meteor add react-meteor-data@4.0.0-beta.0 #### Bumped Meteor Packages -- accounts-base@3.1.1 -- accounts-password@3.2.0 -- autoupdate@2.0.1 -- babel-compiler@7.12.0 -- boilerplate-generator@2.0.1 -- ddp-client@3.1.1 -- ecmascript@0.16.11 -- ejson@1.1.5 -- meteor@2.1.1 -- modern-browsers@0.2.2 -- mongo@2.1.2 -- server-render@0.4.3 -- socket-stream-client@0.6.1 -- webapp@2.0.7 -- meteor-tool@3.3.0 +- accounts-base@3.1.1-rc330.0 +- accounts-password@3.2.0-rc330.0 +- autoupdate@2.0.1-rc330.0 +- babel-compiler@7.12.0-rc330.0 +- boilerplate-generator@2.0.1-rc330.0 +- ddp-client@3.1.1-rc330.0 +- ecmascript@0.16.11-rc330.0 +- ejson@1.1.5-rc330.0 +- meteor@2.1.1-rc330.0 +- minifier-js@3.0.2-rc330.0 +- modern-browsers@0.2.2-rc330.0 +- mongo@2.1.2-rc330.0 +- server-render@0.4.3-rc330.0 +- socket-stream-client@0.6.1-rc330.0 +- standard-minifier-js@3.1.0-rc330.0 +- typescript@5.6.4-rc330.0 +- webapp@2.0.7-rc330.0 +- meteor-tool@3.3.0-rc.0 #### Bumped NPM Packages diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index c415ee5e78..7a148fef9c 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "3.1.1-beta330.1", + version: "3.1.1-rc330.0", }); Package.onUse((api) => { diff --git a/packages/accounts-password/package.js b/packages/accounts-password/package.js index 9b0240944d..4e094dd690 100644 --- a/packages/accounts-password/package.js +++ b/packages/accounts-password/package.js @@ -5,7 +5,7 @@ Package.describe({ // 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.2.0-beta330.1", + version: "3.2.0-rc330.0", }); Npm.depends({ diff --git a/packages/autoupdate/package.js b/packages/autoupdate/package.js index 05e06d1611..b714142f1c 100644 --- a/packages/autoupdate/package.js +++ b/packages/autoupdate/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'Update the client when new client code is available', - version: '2.0.1-beta330.1', + version: '2.0.1-rc330.0', }); Package.onUse(function(api) { diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index a4296be14d..4f851362a7 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-compiler", summary: "Parser/transpiler for ECMAScript 2015+ syntax", - version: '7.12.0-beta330.1', + version: '7.12.0-rc330.0', }); Npm.depends({ diff --git a/packages/boilerplate-generator/package.js b/packages/boilerplate-generator/package.js index d972aae6c9..296d867059 100644 --- a/packages/boilerplate-generator/package.js +++ b/packages/boilerplate-generator/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Generates the boilerplate html from program's manifest", - version: '2.0.1-beta330.1', + version: '2.0.1-rc330.0', }); Npm.depends({ diff --git a/packages/ddp-client/package.js b/packages/ddp-client/package.js index e733db6fe6..453d62a5ea 100644 --- a/packages/ddp-client/package.js +++ b/packages/ddp-client/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's latency-compensated distributed data client", - version: "3.1.1-beta330.1", + version: "3.1.1-rc330.0", documentation: null, }); diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index 7a9ef4b886..ae9e6b6072 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.16.11-beta330.1', + version: '0.16.11-rc330.0', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md', }); diff --git a/packages/ejson/package.js b/packages/ejson/package.js index d79d16b255..2d8fc448a5 100644 --- a/packages/ejson/package.js +++ b/packages/ejson/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'Extended and Extensible JSON library', - version: '1.1.5-beta330.1', + version: '1.1.5-rc330.0', }); Package.onUse(function onUse(api) { diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index 5f7652d5a7..aa5d6ee05c 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: "3.3.0-beta.1", + version: "3.3.0-rc.0", }); Package.includeTool(); diff --git a/packages/meteor/package.js b/packages/meteor/package.js index ad2c1b18ad..ba42dda54e 100644 --- a/packages/meteor/package.js +++ b/packages/meteor/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Core Meteor environment", - version: '2.1.1-beta330.1', + version: '2.1.1-rc330.0', }); Package.registerBuildPlugin({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index 40738ffefa..b6b4015189 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: '3.0.2-beta330.1', + version: '3.0.2-rc330.0', }); Npm.depends({ diff --git a/packages/modern-browsers/package.js b/packages/modern-browsers/package.js index 67c1923355..9cf0d19537 100644 --- a/packages/modern-browsers/package.js +++ b/packages/modern-browsers/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'modern-browsers', - version: '0.2.2-beta330.1', + version: '0.2.2-rc330.0', summary: 'API for defining the boundary between modern and legacy ' + 'JavaScript clients', diff --git a/packages/mongo/package.js b/packages/mongo/package.js index e6e871874d..41d1b1d670 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: "2.1.2-beta330.1", + version: "2.1.2-rc330.0", }); Npm.depends({ diff --git a/packages/non-core/coffeescript-compiler/package.js b/packages/non-core/coffeescript-compiler/package.js index 3f79b0b9d1..34edf35666 100644 --- a/packages/non-core/coffeescript-compiler/package.js +++ b/packages/non-core/coffeescript-compiler/package.js @@ -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-beta330.1', + version: '2.4.2-rc330.0', }); Npm.depends({ diff --git a/packages/non-core/coffeescript/package.js b/packages/non-core/coffeescript/package.js index 7b0dc0980a..0039780580 100644 --- a/packages/non-core/coffeescript/package.js +++ b/packages/non-core/coffeescript/package.js @@ -6,12 +6,12 @@ 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.3-beta330.1', + version: '2.7.3-rc330.0', }); Package.registerBuildPlugin({ name: 'compile-coffeescript', - use: ['caching-compiler@2.0.1', 'ecmascript@0.16.11-beta330.1', 'coffeescript-compiler@2.4.2-beta330.1'], + use: ['caching-compiler@2.0.1', 'ecmascript@0.16.11-rc330.0', 'coffeescript-compiler@2.4.2-rc330.0'], sources: ['compile-coffeescript.js'], npmDependencies: { // A breaking change was introduced in @babel/runtime@7.0.0-beta.56 diff --git a/packages/server-render/package.js b/packages/server-render/package.js index 4424cca827..61b82678f7 100644 --- a/packages/server-render/package.js +++ b/packages/server-render/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "server-render", - version: '0.4.3-beta330.1', + version: '0.4.3-rc330.0', summary: "Generic support for server-side rendering in Meteor apps", documentation: "README.md" }); diff --git a/packages/socket-stream-client/package.js b/packages/socket-stream-client/package.js index 48cae8bfbd..48c572721f 100644 --- a/packages/socket-stream-client/package.js +++ b/packages/socket-stream-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "socket-stream-client", - version: '0.6.1-beta330.1', + version: '0.6.1-rc330.0', summary: "Provides the ClientStream abstraction used by ddp-client", documentation: "README.md" }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index c1e0bdbd8d..16022deea1 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: '3.1.0-beta330.1', + version: '3.1.0-rc330.0', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 036495222b..2557b86b6b 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'typescript', - version: '5.6.4-beta330.1', + version: '5.6.4-rc330.0', summary: 'Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files', documentation: 'README.md', diff --git a/packages/webapp/package.js b/packages/webapp/package.js index 96d52557ac..c0104ba167 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: "2.0.7-beta330.1", + version: "2.0.7-rc330.0", }); Npm.depends({ diff --git a/scripts/admin/meteor-release-experimental.json b/scripts/admin/meteor-release-experimental.json index 6d8ee98bfd..04dd922851 100644 --- a/scripts/admin/meteor-release-experimental.json +++ b/scripts/admin/meteor-release-experimental.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "3.3-beta.1", + "version": "3.3-rc.0", "recommended": false, "official": false, "description": "Meteor experimental release" diff --git a/v3-docs/docs/generators/changelog/versions/3.3.0.md b/v3-docs/docs/generators/changelog/versions/3.3.0.md index 84a67c1c00..ae85eff257 100644 --- a/v3-docs/docs/generators/changelog/versions/3.3.0.md +++ b/v3-docs/docs/generators/changelog/versions/3.3.0.md @@ -1,4 +1,4 @@ -## v3.3.0, 2025-05-15 +## v3.3.0, 2025-05-28 ### Highlights @@ -62,21 +62,24 @@ meteor add react-meteor-data@4.0.0-beta.0 #### Bumped Meteor Packages -- accounts-base@3.1.1 -- accounts-password@3.2.0 -- autoupdate@2.0.1 -- babel-compiler@7.12.0 -- boilerplate-generator@2.0.1 -- ddp-client@3.1.1 -- ecmascript@0.16.11 -- ejson@1.1.5 -- meteor@2.1.1 -- modern-browsers@0.2.2 -- mongo@2.1.2 -- server-render@0.4.3 -- socket-stream-client@0.6.1 -- webapp@2.0.7 -- meteor-tool@3.3.0 +- accounts-base@3.1.1-rc330.0 +- accounts-password@3.2.0-rc330.0 +- autoupdate@2.0.1-rc330.0 +- babel-compiler@7.12.0-rc330.0 +- boilerplate-generator@2.0.1-rc330.0 +- ddp-client@3.1.1-rc330.0 +- ecmascript@0.16.11-rc330.0 +- ejson@1.1.5-rc330.0 +- meteor@2.1.1-rc330.0 +- minifier-js@3.0.2-rc330.0 +- modern-browsers@0.2.2-rc330.0 +- mongo@2.1.2-rc330.0 +- server-render@0.4.3-rc330.0 +- socket-stream-client@0.6.1-rc330.0 +- standard-minifier-js@3.1.0-rc330.0 +- typescript@5.6.4-rc330.0 +- webapp@2.0.7-rc330.0 +- meteor-tool@3.3.0-rc.0 #### Bumped NPM Packages diff --git a/v3-docs/docs/history.md b/v3-docs/docs/history.md index 05d4550312..51a95aeaf3 100644 --- a/v3-docs/docs/history.md +++ b/v3-docs/docs/history.md @@ -10,7 +10,110 @@ This is a complete history of changes for Meteor releases. [//]: # (go to meteor/docs/generators/changelog/docs) +## v3.3.0, 2025-05-28 +### Highlights + +- Support SWC transpiler and minifier for faster dev and builds [PR#13657](https://github.com/meteor/meteor/pull/13657), [PR#13715](https://github.com/meteor/meteor/pull/13715) +- Switch to `@parcel/watcher` for improved native file watching [PR#13699](https://github.com/meteor/meteor/pull/13699), [#13707](https://github.com/meteor/meteor/pull/13707) +- Default to modern architecture, skip legacy processing [PR#13665](https://github.com/meteor/meteor/pull/13665), [PR#13698](https://github.com/meteor/meteor/pull/13698) +- Optimize SQLite for faster startup and better performance [PR#13702](https://github.com/meteor/meteor/pull/13702) +- Support CPU profiling in Meteor 3 bundler [PR#13650](https://github.com/meteor/meteor/pull/13650) +- Improve `meteor profile`: show rebuild steps and total, support `--build` [PR#16](https://github.com/meteor/performance/pull/16), [PR#13694](https://github.com/meteor/meteor/pull/13694) +- Improve `useFind` and `useSubscribe` React hooks +- Add `replaceEmailAsync` helper to Accounts [PR#13677](https://github.com/meteor/meteor/pull/13677) +- Fix user agent detection and oplog collection filtering +- Refine type definitions for Meteor methods and SSR's ServerSink +- Allow opting out of usage stats with `DO_NOT_TRACK` +- Update Node to 22.16.0 and Express to 5.1.0 + +All Merged PRs@[GitHub PRs 3.3](https://github.com/meteor/meteor/pulls?q=is%3Apr+is%3Amerged+base%3Arelease-3.3) + +React Packages Changelog: [react-meteor-data@4.0.0-beta.0](https://github.com/meteor/react-packages/blob/fb73eeb89ff59664a7a01769fa1c2c880e72a3e5/packages/react-meteor-data/CHANGELOG.md#v400-beta0-xxx) + +#### Breaking Changes + +- File watching strategy switched to `@parcel/watcher` + - Most setups should be fine, but if issues appear, like when using WSL with host, volumes, or remote setups—switch to polling. + - Set `METEOR_WATCH_FORCE_POLLING=true` to enable polling. + - Set `METEOR_WATCH_POLLING_INTERVAL_MS=1000` to adjust the interval. + +- `react-meteor-data@4.0.0-beta.0` + - Independent from the core, only applies if upgraded manually. + - useFind describes no deps by default [PR#431](https://github.com/meteor/react-packages/pull/431) + +#### Internal API changes + +- `express@5.1.0` - Depends on Meteor’s `webapp` package. + - Deprecates non-native promise usage [#154](https://github.com/pillarjs/router/pull/154) + - Use `async/await` or `Promise.resolve` when defining endpoints to avoid deprecation warnings. + +#### Migration Steps + +Please run the following command to update your project: + +```bash +meteor update --release 3.3-beta.1 +``` + +To apply react-meteor-data changes: + +```bash +meteor add react-meteor-data@4.0.0-beta.0 +``` + +**Add this to your `package.json` to enable the new modern build stack:** + +```json +"meteor": { + "modern": true +} +``` + +> These settings are on by default for new apps. + +#### Bumped Meteor Packages + +- accounts-base@3.1.1-rc330.0 +- accounts-password@3.2.0-rc330.0 +- autoupdate@2.0.1-rc330.0 +- babel-compiler@7.12.0-rc330.0 +- boilerplate-generator@2.0.1-rc330.0 +- ddp-client@3.1.1-rc330.0 +- ecmascript@0.16.11-rc330.0 +- ejson@1.1.5-rc330.0 +- meteor@2.1.1-rc330.0 +- minifier-js@3.0.2-rc330.0 +- modern-browsers@0.2.2-rc330.0 +- mongo@2.1.2-rc330.0 +- server-render@0.4.3-rc330.0 +- socket-stream-client@0.6.1-rc330.0 +- standard-minifier-js@3.1.0-rc330.0 +- typescript@5.6.4-rc330.0 +- webapp@2.0.7-rc330.0 +- meteor-tool@3.3.0-rc.0 + +#### Bumped NPM Packages + +- meteor-node-stubs@1.2.17 + +#### Special thanks to + +✨✨✨ + +- [@nachocodoner](https://github.com/nachocodoner) +- [@italojs](https://github.com/italojs) +- [@Grubba27](https://github.com/Grubba27) +- [@zodern](https://github.com/zodern) +- [@9Morello](https://github.com/9Morello) +- [@welkinwong](https://github.com/welkinwong) +- [@Poyoman39](https://github.com/Poyoman39) +- [@PedroMarianoAlmeida](https://github.com/PedroMarianoAlmeida) +- [@harryadel](https://github.com/harryadel) +- [@ericm546](https://github.com/ericm546) +- [@StorytellerCZ](https://github.com/StorytellerCZ) + +✨✨✨ ## v3.2.2, 2025-05-02 From c29340b60a024b9f32e8ee76f8e43588980bff9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Thu, 29 May 2025 10:22:44 +0200 Subject: [PATCH 41/70] Update transpiler-swc.md --- v3-docs/docs/about/modern-build-stack/transpiler-swc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md index 0c4f7f2211..faee062d15 100644 --- a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md +++ b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md @@ -194,6 +194,8 @@ To use the same aliases in SWC, add them to your [.swcrc](#custom-swcrc): } ``` +This enables you to use `@ui/components` instead of `./ui/components` in your imports. + You can use `swc.config.js` to define different aliases based on an environment variable. ``` js @@ -215,8 +217,6 @@ module.exports = { }; ``` -This enables you to use `@ui/components` instead of `./ui/components` in your imports. - :::warning SWC only resolves aliases to imports, not `require` calls. ::: From 39e9814832627d515ddc9dbbfcb443d1fd126c71 Mon Sep 17 00:00:00 2001 From: italo jose Date: Mon, 26 May 2025 17:21:36 -0300 Subject: [PATCH 42/70] Add script and workflow for managing inactive issues with comments and labels --- .github/scripts/inactive-issues.js | 94 +++++++++++++++++++++++++++ .github/workflows/inactive-issues.yml | 24 +++++++ 2 files changed, 118 insertions(+) create mode 100644 .github/scripts/inactive-issues.js create mode 100644 .github/workflows/inactive-issues.yml diff --git a/.github/scripts/inactive-issues.js b/.github/scripts/inactive-issues.js new file mode 100644 index 0000000000..4c066b876f --- /dev/null +++ b/.github/scripts/inactive-issues.js @@ -0,0 +1,94 @@ +module.exports = async ({ github, context }) => { + const daysToComment = 60; + const daysToLabel = 90; + const now = new Date(); + const inactiveTimeComment = daysToComment * 24 * 60 * 60 * 1000; // 60 days in milliseconds + const inactiveTimeLabel = daysToLabel * 24 * 60 * 60 * 1000; // 90 days in milliseconds + + // Get open issues + const issues = await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open', + per_page: 100 + }); + + // For testing: Only process issue #11682 + const testIssueNumber = 11682; + console.log(`Testing script on issue #${testIssueNumber} only`); + + for (const issue of issues.data) { + if (issue.pull_request) continue; + + // Skip all issues except #11682 during testing + if (issue.number !== testIssueNumber) { + continue; + } + // Skip issues that already have the inactive label + if (issue.labels.some(label => label.name === 'inactive')) { + console.log(`Issue #${issue.number} already has inactive label, skipping`); + continue; + } + + // Get latest comment or update date + const issueUpdatedAt = new Date(issue.updated_at); + const timeSinceUpdate = now.getTime() - issueUpdatedAt.getTime(); + console.log(`Issue #${issue.number} last updated: ${issueUpdatedAt}, days inactive: ${timeSinceUpdate/(24*60*60*1000)}`); + + + // Handle 60-day inactive issues (comment) + if (timeSinceUpdate > inactiveTimeComment && timeSinceUpdate <= inactiveTimeLabel) { + + // Check if bot already commented to avoid duplicate comments + const comments = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + per_page: 100 + }); + + // Check if there's a recent bot comment + const botCommented = comments.data.some(comment => { + const commentDate = new Date(comment.created_at); + const timeSinceComment = now.getTime() - commentDate.getTime(); + return ( + comment.user.login === 'github-actions[bot]' && + timeSinceComment < inactiveTimeComment && + comment.body.includes('Is this issue still relevant?') + ); + }); + + if (!botCommented) { + console.log(`Adding inactivity comment to issue #${issue.number}: ${issue.title}`); + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: `👋 @${issue.user.login} This issue has been open for 60 days with no activity. Is this issue still relevant? If there is no response or activity within the next 30 days, this issue will be labeled as \`inactive\`.` + }); + } + } + + // Handle 90-day inactive issues (add label) + else if (forcedTimeSinceUpdate > inactiveTimeLabel) { + // Check if the issue has the inactive label + if (!issue.labels.some(label => label.name === 'inactive')) { + console.log(`Adding inactive label to issue #${issue.number}: ${issue.title}`); + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: ['inactive'] + }); + + // Add a comment when labeling as inactive + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: `This issue has been automatically labeled as \`inactive\` due to 90 days of inactivity. If this issue is still relevant, please comment to reactivate it.` + }); + } + } + } +}; diff --git a/.github/workflows/inactive-issues.yml b/.github/workflows/inactive-issues.yml new file mode 100644 index 0000000000..bb7a44ab0f --- /dev/null +++ b/.github/workflows/inactive-issues.yml @@ -0,0 +1,24 @@ +name: Inactive Issues Management + +on: + schedule: + # Runs at 01:00 UTC every day + - cron: '0 1 * * *' + # Allows to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + manage-inactive-issues: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Manage inactive issues + uses: actions/github-script@v6 + with: + script: | + const script = require('./.github/scripts/inactive-issues.js') + await script({github, context}) From 4e91c0e6f47eab825b28cdc577d499dc2bd93676 Mon Sep 17 00:00:00 2001 From: italo jose Date: Mon, 26 May 2025 17:25:55 -0300 Subject: [PATCH 43/70] Enhance inactive issues workflow to trigger on pull request events and restrict execution to specific PR number --- .github/workflows/inactive-issues.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/inactive-issues.yml b/.github/workflows/inactive-issues.yml index bb7a44ab0f..0afe0e5f40 100644 --- a/.github/workflows/inactive-issues.yml +++ b/.github/workflows/inactive-issues.yml @@ -6,10 +6,18 @@ on: - cron: '0 1 * * *' # Allows to run this workflow manually from the Actions tab workflow_dispatch: + # Run when there's a push to a pull request + pull_request: + types: [opened, synchronize, reopened] + paths: + - '.github/scripts/inactive-issues.js' + - '.github/workflows/inactive-issues.yml' jobs: manage-inactive-issues: runs-on: ubuntu-latest + # Only run this workflow for PR #13775 when triggered by a pull_request event + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.number == 13775 }} permissions: issues: write steps: From f8e2a5a472e509540e88e8c898b7028114325679 Mon Sep 17 00:00:00 2001 From: italo jose Date: Mon, 26 May 2025 17:31:59 -0300 Subject: [PATCH 44/70] Refactor inactive issues script for improved clarity and maintainability --- .github/scripts/inactive-issues.js | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/scripts/inactive-issues.js b/.github/scripts/inactive-issues.js index 4c066b876f..30575990dc 100644 --- a/.github/scripts/inactive-issues.js +++ b/.github/scripts/inactive-issues.js @@ -2,8 +2,8 @@ module.exports = async ({ github, context }) => { const daysToComment = 60; const daysToLabel = 90; const now = new Date(); - const inactiveTimeComment = daysToComment * 24 * 60 * 60 * 1000; // 60 days in milliseconds - const inactiveTimeLabel = daysToLabel * 24 * 60 * 60 * 1000; // 90 days in milliseconds + const indleTimeComment = daysToComment * 24 * 60 * 60 * 1000; // 60 days in milliseconds + const indleTimeLabel = daysToLabel * 24 * 60 * 60 * 1000; // 90 days in milliseconds // Get open issues const issues = await github.rest.issues.listForRepo({ @@ -24,20 +24,20 @@ module.exports = async ({ github, context }) => { if (issue.number !== testIssueNumber) { continue; } - // Skip issues that already have the inactive label - if (issue.labels.some(label => label.name === 'inactive')) { - console.log(`Issue #${issue.number} already has inactive label, skipping`); + // Skip issues that already have the indle label + if (issue.labels.some(label => label.name === 'indle')) { + console.log(`Issue #${issue.number} already has indle label, skipping`); continue; } // Get latest comment or update date const issueUpdatedAt = new Date(issue.updated_at); const timeSinceUpdate = now.getTime() - issueUpdatedAt.getTime(); - console.log(`Issue #${issue.number} last updated: ${issueUpdatedAt}, days inactive: ${timeSinceUpdate/(24*60*60*1000)}`); + console.log(`Issue #${issue.number} last updated: ${issueUpdatedAt}, days indle: ${timeSinceUpdate/(24*60*60*1000)}`); - // Handle 60-day inactive issues (comment) - if (timeSinceUpdate > inactiveTimeComment && timeSinceUpdate <= inactiveTimeLabel) { + // Handle 60-day indle issues (comment) + if (timeSinceUpdate > indleTimeComment && timeSinceUpdate <= indleTimeLabel) { // Check if bot already commented to avoid duplicate comments const comments = await github.rest.issues.listComments({ @@ -53,7 +53,7 @@ module.exports = async ({ github, context }) => { const timeSinceComment = now.getTime() - commentDate.getTime(); return ( comment.user.login === 'github-actions[bot]' && - timeSinceComment < inactiveTimeComment && + timeSinceComment < indleTimeComment && comment.body.includes('Is this issue still relevant?') ); }); @@ -64,29 +64,29 @@ module.exports = async ({ github, context }) => { owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, - body: `👋 @${issue.user.login} This issue has been open for 60 days with no activity. Is this issue still relevant? If there is no response or activity within the next 30 days, this issue will be labeled as \`inactive\`.` + body: `👋 @${issue.user.login} This issue has been open for 60 days with no activity. Is this issue still relevant? If there is no response or activity within the next 30 days, this issue will be labeled as \`indle\`.` }); } } - // Handle 90-day inactive issues (add label) - else if (forcedTimeSinceUpdate > inactiveTimeLabel) { - // Check if the issue has the inactive label - if (!issue.labels.some(label => label.name === 'inactive')) { - console.log(`Adding inactive label to issue #${issue.number}: ${issue.title}`); + // Handle 90-day indle issues (add label) + else if (forcedTimeSinceUpdate > indleTimeLabel) { + // Check if the issue has the indle label + if (!issue.labels.some(label => label.name === 'indle')) { + console.log(`Adding indle label to issue #${issue.number}: ${issue.title}`); await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, - labels: ['inactive'] + labels: ['indle'] }); - // Add a comment when labeling as inactive + // Add a comment when labeling as indle await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, - body: `This issue has been automatically labeled as \`inactive\` due to 90 days of inactivity. If this issue is still relevant, please comment to reactivate it.` + body: `This issue has been automatically labeled as \`indle\` due to 90 days of inactivity. If this issue is still relevant, please comment to reactivate it.` }); } } From 4c0ea034cf78ce45228422e16803cc884743b4c9 Mon Sep 17 00:00:00 2001 From: italo jose Date: Mon, 26 May 2025 17:32:22 -0300 Subject: [PATCH 45/70] Fix typo in inactive issues script: correct 'indle' to 'idle' for consistency in comments and labels --- .github/scripts/inactive-issues.js | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/scripts/inactive-issues.js b/.github/scripts/inactive-issues.js index 30575990dc..db98e84a7c 100644 --- a/.github/scripts/inactive-issues.js +++ b/.github/scripts/inactive-issues.js @@ -2,8 +2,8 @@ module.exports = async ({ github, context }) => { const daysToComment = 60; const daysToLabel = 90; const now = new Date(); - const indleTimeComment = daysToComment * 24 * 60 * 60 * 1000; // 60 days in milliseconds - const indleTimeLabel = daysToLabel * 24 * 60 * 60 * 1000; // 90 days in milliseconds + const idleTimeComment = daysToComment * 24 * 60 * 60 * 1000; // 60 days in milliseconds + const idleTimeLabel = daysToLabel * 24 * 60 * 60 * 1000; // 90 days in milliseconds // Get open issues const issues = await github.rest.issues.listForRepo({ @@ -24,20 +24,20 @@ module.exports = async ({ github, context }) => { if (issue.number !== testIssueNumber) { continue; } - // Skip issues that already have the indle label - if (issue.labels.some(label => label.name === 'indle')) { - console.log(`Issue #${issue.number} already has indle label, skipping`); + // Skip issues that already have the idle label + if (issue.labels.some(label => label.name === 'idle')) { + console.log(`Issue #${issue.number} already has idle label, skipping`); continue; } // Get latest comment or update date const issueUpdatedAt = new Date(issue.updated_at); const timeSinceUpdate = now.getTime() - issueUpdatedAt.getTime(); - console.log(`Issue #${issue.number} last updated: ${issueUpdatedAt}, days indle: ${timeSinceUpdate/(24*60*60*1000)}`); + console.log(`Issue #${issue.number} last updated: ${issueUpdatedAt}, days idle: ${timeSinceUpdate/(24*60*60*1000)}`); - // Handle 60-day indle issues (comment) - if (timeSinceUpdate > indleTimeComment && timeSinceUpdate <= indleTimeLabel) { + // Handle 60-day idle issues (comment) + if (timeSinceUpdate > idleTimeComment && timeSinceUpdate <= idleTimeLabel) { // Check if bot already commented to avoid duplicate comments const comments = await github.rest.issues.listComments({ @@ -53,7 +53,7 @@ module.exports = async ({ github, context }) => { const timeSinceComment = now.getTime() - commentDate.getTime(); return ( comment.user.login === 'github-actions[bot]' && - timeSinceComment < indleTimeComment && + timeSinceComment < idleTimeComment && comment.body.includes('Is this issue still relevant?') ); }); @@ -64,29 +64,29 @@ module.exports = async ({ github, context }) => { owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, - body: `👋 @${issue.user.login} This issue has been open for 60 days with no activity. Is this issue still relevant? If there is no response or activity within the next 30 days, this issue will be labeled as \`indle\`.` + body: `👋 @${issue.user.login} This issue has been open for 60 days with no activity. Is this issue still relevant? If there is no response or activity within the next 30 days, this issue will be labeled as \`idle\`.` }); } } - // Handle 90-day indle issues (add label) - else if (forcedTimeSinceUpdate > indleTimeLabel) { - // Check if the issue has the indle label - if (!issue.labels.some(label => label.name === 'indle')) { - console.log(`Adding indle label to issue #${issue.number}: ${issue.title}`); + // Handle 90-day idle issues (add label) + else if (forcedTimeSinceUpdate > idleTimeLabel) { + // Check if the issue has the idle label + if (!issue.labels.some(label => label.name === 'idle')) { + console.log(`Adding idle label to issue #${issue.number}: ${issue.title}`); await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, - labels: ['indle'] + labels: ['idle'] }); - // Add a comment when labeling as indle + // Add a comment when labeling as idle await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, - body: `This issue has been automatically labeled as \`indle\` due to 90 days of inactivity. If this issue is still relevant, please comment to reactivate it.` + body: `This issue has been automatically labeled as \`idle\` due to 90 days of inactivity. If this issue is still relevant, please comment to reactivate it.` }); } } From 8905ccfcb4c0ba2a9e46c7b0e9d62c2804133164 Mon Sep 17 00:00:00 2001 From: italo jose Date: Mon, 26 May 2025 17:38:50 -0300 Subject: [PATCH 46/70] Enhance logging and error handling in inactive issues management script for better debugging and clarity --- .github/scripts/inactive-issues.js | 157 ++++++++++++++++++++++------- 1 file changed, 123 insertions(+), 34 deletions(-) diff --git a/.github/scripts/inactive-issues.js b/.github/scripts/inactive-issues.js index db98e84a7c..975da8991b 100644 --- a/.github/scripts/inactive-issues.js +++ b/.github/scripts/inactive-issues.js @@ -1,10 +1,21 @@ module.exports = async ({ github, context }) => { + console.log('=== 🔍 Starting Inactive Issues Management Script ==='); + console.log(`Repository: ${context.repo.owner}/${context.repo.repo}`); + console.log(`Event: ${context.eventName}`); + console.log(`Action: ${context.payload.action || 'N/A'}`); + console.log(`Workflow: ${context.workflow}`); + console.log(`Run ID: ${context.runId}`); + console.log(`Current time: ${new Date().toISOString()}`); + const daysToComment = 60; const daysToLabel = 90; const now = new Date(); const idleTimeComment = daysToComment * 24 * 60 * 60 * 1000; // 60 days in milliseconds const idleTimeLabel = daysToLabel * 24 * 60 * 60 * 1000; // 90 days in milliseconds + console.log(`Configuration: Comment after ${daysToComment} days, Label after ${daysToLabel} days`); + + console.log('Fetching open issues...'); // Get open issues const issues = await github.rest.issues.listForRepo({ owner: context.repo.owner, @@ -13,32 +24,67 @@ module.exports = async ({ github, context }) => { per_page: 100 }); + console.log(`Retrieved ${issues.data.length} open issues`); + console.log(`Response status: ${issues.status}`); + console.log(`Rate limit remaining: ${issues.headers['x-ratelimit-remaining'] || 'unknown'}`); + console.log(`Rate limit reset: ${issues.headers['x-ratelimit-reset'] || 'unknown'}`); + // For testing: Only process issue #11682 const testIssueNumber = 11682; - console.log(`Testing script on issue #${testIssueNumber} only`); + console.log(`\n=== 🧪 TEST MODE: Processing only issue #${testIssueNumber} ===`); for (const issue of issues.data) { - if (issue.pull_request) continue; + console.log(`\nChecking issue #${issue.number}: "${issue.title}"`); - // Skip all issues except #11682 during testing - if (issue.number !== testIssueNumber) { + // Skip pull requests + if (issue.pull_request) { + console.log(`Issue #${issue.number} is a pull request, skipping`); continue; } + + // Skip all issues except test issue during testing + if (issue.number !== testIssueNumber) { + console.log(`Issue #${issue.number} is not our test issue, skipping`); + continue; + } + + console.log(`\n=== 📋 Processing test issue #${issue.number} ===`); + console.log(`Title: "${issue.title}"`); + console.log(`State: ${issue.state}`); + console.log(`Author: ${issue.user.login}`); + console.log(`Created: ${new Date(issue.created_at).toISOString()}`); + console.log(`URL: ${issue.html_url}`); + + // Log all current labels + console.log(`Labels: ${issue.labels.map(label => label.name).join(', ') || 'none'}`); + // Skip issues that already have the idle label if (issue.labels.some(label => label.name === 'idle')) { - console.log(`Issue #${issue.number} already has idle label, skipping`); + console.log(`⚠️ Issue #${issue.number} already has idle label, skipping further processing`); continue; } // Get latest comment or update date const issueUpdatedAt = new Date(issue.updated_at); const timeSinceUpdate = now.getTime() - issueUpdatedAt.getTime(); - console.log(`Issue #${issue.number} last updated: ${issueUpdatedAt}, days idle: ${timeSinceUpdate/(24*60*60*1000)}`); + const daysInactive = (timeSinceUpdate/(24*60*60*1000)).toFixed(2); + console.log(`Last updated: ${issueUpdatedAt.toISOString()}`); + console.log(`Days inactive: ${daysInactive}`); + console.log(`Milliseconds inactive: ${timeSinceUpdate}`); + console.log(`60-day threshold (ms): ${idleTimeComment}`); + console.log(`90-day threshold (ms): ${idleTimeLabel}`); + + + // Check conditions based on inactivity time + console.log('\n--- Checking inactivity conditions ---'); // Handle 60-day idle issues (comment) if (timeSinceUpdate > idleTimeComment && timeSinceUpdate <= idleTimeLabel) { + console.log(`✓ Condition met: Issue inactive between ${daysToComment} and ${daysToLabel} days`); + console.log('Action required: Add inactivity comment'); + console.log('Fetching issue comments...'); // Check if bot already commented to avoid duplicate comments const comments = await github.rest.issues.listComments({ owner: context.repo.owner, @@ -47,48 +93,91 @@ module.exports = async ({ github, context }) => { per_page: 100 }); + console.log(`Retrieved ${comments.data.length} comments`); + // Check if there's a recent bot comment + console.log('Checking for existing bot comments...'); const botCommented = comments.data.some(comment => { const commentDate = new Date(comment.created_at); const timeSinceComment = now.getTime() - commentDate.getTime(); - return ( - comment.user.login === 'github-actions[bot]' && - timeSinceComment < idleTimeComment && - comment.body.includes('Is this issue still relevant?') - ); + const isBot = comment.user.login === 'github-actions[bot]'; + const isRecent = timeSinceComment < idleTimeComment; + const hasRightContent = comment.body.includes('Is this issue still relevant?'); + + if (isBot) { + console.log(`Found bot comment from: ${commentDate.toISOString()}`); + console.log(`Comment age (days): ${(timeSinceComment/(24*60*60*1000)).toFixed(2)}`); + console.log(`Contains marker text: ${hasRightContent}`); + } + + return isBot && isRecent && hasRightContent; }); - if (!botCommented) { - console.log(`Adding inactivity comment to issue #${issue.number}: ${issue.title}`); - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.number, - body: `👋 @${issue.user.login} This issue has been open for 60 days with no activity. Is this issue still relevant? If there is no response or activity within the next 30 days, this issue will be labeled as \`idle\`.` - }); + if (botCommented) { + console.log('⚠️ Bot already commented recently, skipping comment'); + } else { + console.log(`📝 Adding inactivity comment to issue #${issue.number}: "${issue.title}"`); + try { + const result = await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: `👋 @${issue.user.login} This issue has been open for 60 days with no activity. Is this issue still relevant? If there is no response or activity within the next 30 days, this issue will be labeled as \`idle\`.` + }); + console.log(`Comment created successfully. Status: ${result.status}`); + console.log(`Comment URL: ${result.data.html_url}`); + } catch (error) { + console.error(`Error adding comment: ${error.message}`); + console.error(JSON.stringify(error, null, 2)); + } } } // Handle 90-day idle issues (add label) - else if (forcedTimeSinceUpdate > idleTimeLabel) { + else if (timeSinceUpdate > idleTimeLabel) { + console.log(`✓ Condition met: Issue inactive for more than ${daysToLabel} days`); + console.log('Action required: Add idle label'); + // Check if the issue has the idle label if (!issue.labels.some(label => label.name === 'idle')) { - console.log(`Adding idle label to issue #${issue.number}: ${issue.title}`); - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.number, - labels: ['idle'] - }); + console.log(`🏷️ Adding idle label to issue #${issue.number}: "${issue.title}"`); - // Add a comment when labeling as idle - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.number, - body: `This issue has been automatically labeled as \`idle\` due to 90 days of inactivity. If this issue is still relevant, please comment to reactivate it.` - }); + try { + // Add the label + const labelResult = await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: ['idle'] + }); + console.log(`Label added successfully. Status: ${labelResult.status}`); + + // Add a comment when labeling as idle + console.log('Adding idle notification comment'); + const commentResult = await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: `This issue has been automatically labeled as \`idle\` due to 90 days of inactivity. If this issue is still relevant, please comment to reactivate it.` + }); + console.log(`Comment added successfully. Status: ${commentResult.status}`); + console.log(`Comment URL: ${commentResult.data.html_url}`); + } catch (error) { + console.error(`Error during labeling: ${error.message}`); + console.error(JSON.stringify(error, null, 2)); + } + } else { + console.log('Issue already has idle label (this shouldn\'t happen due to earlier check)'); } + } else { + console.log(`⚠️ Issue doesn't meet inactivity thresholds. Not taking any action.`); + console.log(`Inactivity period: ${daysInactive} days`); + console.log(`Required for comment: > ${daysToComment} days`); + console.log(`Required for label: > ${daysToLabel} days`); } } + + console.log('\n=== 🎉 Script execution complete ==='); + console.log(`Time: ${new Date().toISOString()}`); + console.log('See logs above for detailed information about each issue processed'); }; From 8337065a5dcb74bf882e6a63fa4c4b2988415a55 Mon Sep 17 00:00:00 2001 From: italo jose Date: Mon, 26 May 2025 17:44:58 -0300 Subject: [PATCH 47/70] Refactor inactive issues script to fetch all pages of issues, enhance logging, and update processing logic for better clarity and functionality --- .github/scripts/inactive-issues.js | 83 ++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 22 deletions(-) diff --git a/.github/scripts/inactive-issues.js b/.github/scripts/inactive-issues.js index 975da8991b..a5fd5bdeb2 100644 --- a/.github/scripts/inactive-issues.js +++ b/.github/scripts/inactive-issues.js @@ -16,25 +16,63 @@ module.exports = async ({ github, context }) => { console.log(`Configuration: Comment after ${daysToComment} days, Label after ${daysToLabel} days`); console.log('Fetching open issues...'); - // Get open issues - const issues = await github.rest.issues.listForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, - state: 'open', - per_page: 100 - }); - console.log(`Retrieved ${issues.data.length} open issues`); - console.log(`Response status: ${issues.status}`); - console.log(`Rate limit remaining: ${issues.headers['x-ratelimit-remaining'] || 'unknown'}`); - console.log(`Rate limit reset: ${issues.headers['x-ratelimit-reset'] || 'unknown'}`); + // Function to fetch all pages of issues + async function fetchAllIssues() { + let allIssues = []; + let page = 1; + let hasNextPage = true; + + console.log('Starting to fetch all pages of issues...'); + + while (hasNextPage) { + console.log(`Fetching page ${page} of issues...`); + + const response = await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open', + per_page: 100, + page: page, + sort: 'updated', + direction: 'asc' // Oldest updated first + }); + + console.log(`Retrieved ${response.data.length} issues on page ${page}`); + console.log(`Response status: ${response.status}`); + console.log(`Rate limit remaining: ${response.headers['x-ratelimit-remaining'] || 'unknown'}`); + + allIssues = allIssues.concat(response.data); + + // Check if we have more pages + if (response.data.length < 100) { + hasNextPage = false; + console.log('Reached the last page of issues'); + } else { + page++; + // Small delay to avoid hitting rate limits + await new Promise(resolve => setTimeout(resolve, 100)); + } + } + + return allIssues; + } - // For testing: Only process issue #11682 - const testIssueNumber = 11682; - console.log(`\n=== 🧪 TEST MODE: Processing only issue #${testIssueNumber} ===`); + // Fetch all issues + const allIssues = await fetchAllIssues(); - for (const issue of issues.data) { - console.log(`\nChecking issue #${issue.number}: "${issue.title}"`); + console.log(`Retrieved a total of ${allIssues.length} open issues`); + console.log('Issues are sorted by update date (oldest first)'); + + console.log('\n=== Processing all issues sorted by oldest update first ==='); + + let processedCount = 0; + let commentedCount = 0; + let labeledCount = 0; + + for (const issue of allIssues) { + processedCount++; + console.log(`\nChecking issue #${issue.number}: "${issue.title}" (${processedCount}/${allIssues.length})`); // Skip pull requests if (issue.pull_request) { @@ -42,12 +80,6 @@ module.exports = async ({ github, context }) => { continue; } - // Skip all issues except test issue during testing - if (issue.number !== testIssueNumber) { - console.log(`Issue #${issue.number} is not our test issue, skipping`); - continue; - } - console.log(`\n=== 📋 Processing test issue #${issue.number} ===`); console.log(`Title: "${issue.title}"`); console.log(`State: ${issue.state}`); @@ -126,6 +158,7 @@ module.exports = async ({ github, context }) => { }); console.log(`Comment created successfully. Status: ${result.status}`); console.log(`Comment URL: ${result.data.html_url}`); + commentedCount++; } catch (error) { console.error(`Error adding comment: ${error.message}`); console.error(JSON.stringify(error, null, 2)); @@ -162,6 +195,7 @@ module.exports = async ({ github, context }) => { }); console.log(`Comment added successfully. Status: ${commentResult.status}`); console.log(`Comment URL: ${commentResult.data.html_url}`); + labeledCount++; } catch (error) { console.error(`Error during labeling: ${error.message}`); console.error(JSON.stringify(error, null, 2)); @@ -175,9 +209,14 @@ module.exports = async ({ github, context }) => { console.log(`Required for comment: > ${daysToComment} days`); console.log(`Required for label: > ${daysToLabel} days`); } + + // Update counters based on actions taken - these will be incremented within the action blocks } console.log('\n=== 🎉 Script execution complete ==='); console.log(`Time: ${new Date().toISOString()}`); + console.log(`Total issues processed: ${processedCount}`); + console.log(`Issues commented (60+ days inactive): ${commentedCount}`); + console.log(`Issues labeled (90+ days inactive): ${labeledCount}`); console.log('See logs above for detailed information about each issue processed'); }; From de7f424ce09e2d4e5a63d179cc9b30ec2546cfa3 Mon Sep 17 00:00:00 2001 From: italo jose Date: Mon, 26 May 2025 17:56:03 -0300 Subject: [PATCH 48/70] Refactor inactive issues script to improve issue fetching logic, enhance error handling with retry mechanisms, and update logging for better clarity --- .github/scripts/inactive-issues.js | 112 ++++++++++++++++++++++++++--- 1 file changed, 104 insertions(+), 8 deletions(-) diff --git a/.github/scripts/inactive-issues.js b/.github/scripts/inactive-issues.js index a5fd5bdeb2..eb53fdb497 100644 --- a/.github/scripts/inactive-issues.js +++ b/.github/scripts/inactive-issues.js @@ -17,13 +17,16 @@ module.exports = async ({ github, context }) => { console.log('Fetching open issues...'); - // Function to fetch all pages of issues + // Function to fetch issues until we find recently updated ones async function fetchAllIssues() { let allIssues = []; let page = 1; let hasNextPage = true; + const now = new Date(); + const minInactivity = idleTimeComment; // 60 days in milliseconds - console.log('Starting to fetch all pages of issues...'); + console.log('Starting to fetch issues (oldest first)...'); + console.log(`Will stop fetching when issues are newer than ${daysToComment} days inactive`); while (hasNextPage) { console.log(`Fetching page ${page} of issues...`); @@ -42,12 +45,43 @@ module.exports = async ({ github, context }) => { console.log(`Response status: ${response.status}`); console.log(`Rate limit remaining: ${response.headers['x-ratelimit-remaining'] || 'unknown'}`); - allIssues = allIssues.concat(response.data); + // Check if the most recently updated issue on this page is too recent + let recentIssueFound = false; + if (response.data.length > 0) { + // Check the last issue on the page (most recently updated) + const lastIssue = response.data[response.data.length - 1]; + const lastIssueUpdatedAt = new Date(lastIssue.updated_at); + const timeSinceLastIssueUpdate = now.getTime() - lastIssueUpdatedAt.getTime(); + + console.log(`Most recent issue on page ${page} was updated ${(timeSinceLastIssueUpdate/(24*60*60*1000)).toFixed(2)} days ago`); + + if (timeSinceLastIssueUpdate < minInactivity) { + // This page already has issues that are too recent, filter them out + console.log(`Found issues updated within the last ${daysToComment} days, filtering and stopping pagination`); + + const filteredIssues = response.data.filter(issue => { + const issueUpdatedAt = new Date(issue.updated_at); + const timeSinceUpdate = now.getTime() - issueUpdatedAt.getTime(); + return timeSinceUpdate >= minInactivity; + }); + + console.log(`Keeping ${filteredIssues.length} issues from page ${page} that are inactive for at least ${daysToComment} days`); + allIssues = allIssues.concat(filteredIssues); + recentIssueFound = true; + hasNextPage = false; + } else { + // All issues on this page are old enough, keep them all + allIssues = allIssues.concat(response.data); + } + } - // Check if we have more pages - if (response.data.length < 100) { + // Stop if we found recent issues or reached the end of pagination + if (recentIssueFound) { + console.log('Stopping pagination due to finding recently updated issues'); hasNextPage = false; + } else if (response.data.length < 100) { console.log('Reached the last page of issues'); + hasNextPage = false; } else { page++; // Small delay to avoid hitting rate limits @@ -79,6 +113,8 @@ module.exports = async ({ github, context }) => { console.log(`Issue #${issue.number} is a pull request, skipping`); continue; } + + if(issue.number != 11682) continue console.log(`\n=== 📋 Processing test issue #${issue.number} ===`); console.log(`Title: "${issue.title}"`); @@ -161,7 +197,28 @@ module.exports = async ({ github, context }) => { commentedCount++; } catch (error) { console.error(`Error adding comment: ${error.message}`); - console.error(JSON.stringify(error, null, 2)); + console.error(`Error type: ${error.name}`); + console.error(`Error stack: ${error.stack}`); + + // Add retry logic + console.log(`Will retry commenting on issue #${issue.number} after a delay...`); + try { + // Wait for 5 seconds before retrying + await new Promise(resolve => setTimeout(resolve, 5000)); + + console.log(`Retrying comment on issue #${issue.number}...`); + const retryResult = await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: `👋 @${issue.user.login} This issue has been open for 60 days with no activity. Is this issue still relevant? If there is no response or activity within the next 30 days, this issue will be labeled as \`idle\`.` + }); + console.log(`Retry successful! Comment URL: ${retryResult.data.html_url}`); + commentedCount++; + } catch (retryError) { + console.error(`Retry also failed for issue #${issue.number}: ${retryError.message}`); + console.error(`Will skip this issue and continue with others`); + } } } } @@ -173,7 +230,14 @@ module.exports = async ({ github, context }) => { // Check if the issue has the idle label if (!issue.labels.some(label => label.name === 'idle')) { - console.log(`🏷️ Adding idle label to issue #${issue.number}: "${issue.title}"`); + console.log(`\n🚨 ATUALIZANDO LABEL DA ISSUE 🚨`); + console.log(`🏷️ Adicionando label 'idle' para issue #${issue.number}`); + console.log(`🔗 URL: ${issue.html_url}`); + console.log(`📝 Título: "${issue.title}"`); + console.log(`👤 Autor: ${issue.user.login}`); + console.log(`📅 Criada em: ${new Date(issue.created_at).toISOString()}`); + console.log(`⏰ Última atualização: ${new Date(issue.updated_at).toISOString()}`); + console.log(`⏳ Dias inativo: ${(timeSinceUpdate/(24*60*60*1000)).toFixed(2)}`); try { // Add the label @@ -198,7 +262,39 @@ module.exports = async ({ github, context }) => { labeledCount++; } catch (error) { console.error(`Error during labeling: ${error.message}`); - console.error(JSON.stringify(error, null, 2)); + // Use a safer way to log the error without circular references + console.error(`Error type: ${error.name}`); + console.error(`Error stack: ${error.stack}`); + + // Add retry logic with exponential backoff + console.log(`Will retry labeling issue #${issue.number} after a delay...`); + try { + // Wait for 5 seconds before retrying + await new Promise(resolve => setTimeout(resolve, 5000)); + + console.log(`Retrying adding idle label to issue #${issue.number}...`); + const retryLabelResult = await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: ['idle'] + }); + console.log(`Retry successful! Label added with status: ${retryLabelResult.status}`); + + // Retry adding comment + console.log('Retrying adding idle notification comment...'); + const retryCommentResult = await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: `This issue has been automatically labeled as \`idle\` due to 90 days of inactivity. If this issue is still relevant, please comment to reactivate it.` + }); + console.log(`Retry comment successful! URL: ${retryCommentResult.data.html_url}`); + labeledCount++; + } catch (retryError) { + console.error(`Retry also failed for issue #${issue.number}: ${retryError.message}`); + console.error(`Will skip this issue and continue with others`); + } } } else { console.log('Issue already has idle label (this shouldn\'t happen due to earlier check)'); From b09e6d5ab9bc8845a7f0090a6fc49763d741c569 Mon Sep 17 00:00:00 2001 From: italo jose Date: Mon, 26 May 2025 18:15:26 -0300 Subject: [PATCH 49/70] Refactor inactive issues script to streamline logging, enhance clarity, and adjust workflow schedule to run weekly on Saturdays --- .github/scripts/inactive-issues.js | 134 +------------------------- .github/workflows/inactive-issues.yml | 10 +- 2 files changed, 5 insertions(+), 139 deletions(-) diff --git a/.github/scripts/inactive-issues.js b/.github/scripts/inactive-issues.js index eb53fdb497..cbca2f31aa 100644 --- a/.github/scripts/inactive-issues.js +++ b/.github/scripts/inactive-issues.js @@ -1,22 +1,10 @@ module.exports = async ({ github, context }) => { - console.log('=== 🔍 Starting Inactive Issues Management Script ==='); - console.log(`Repository: ${context.repo.owner}/${context.repo.repo}`); - console.log(`Event: ${context.eventName}`); - console.log(`Action: ${context.payload.action || 'N/A'}`); - console.log(`Workflow: ${context.workflow}`); - console.log(`Run ID: ${context.runId}`); - console.log(`Current time: ${new Date().toISOString()}`); - const daysToComment = 60; const daysToLabel = 90; const now = new Date(); const idleTimeComment = daysToComment * 24 * 60 * 60 * 1000; // 60 days in milliseconds const idleTimeLabel = daysToLabel * 24 * 60 * 60 * 1000; // 90 days in milliseconds - console.log(`Configuration: Comment after ${daysToComment} days, Label after ${daysToLabel} days`); - - console.log('Fetching open issues...'); - // Function to fetch issues until we find recently updated ones async function fetchAllIssues() { let allIssues = []; @@ -25,12 +13,7 @@ module.exports = async ({ github, context }) => { const now = new Date(); const minInactivity = idleTimeComment; // 60 days in milliseconds - console.log('Starting to fetch issues (oldest first)...'); - console.log(`Will stop fetching when issues are newer than ${daysToComment} days inactive`); - while (hasNextPage) { - console.log(`Fetching page ${page} of issues...`); - const response = await github.rest.issues.listForRepo({ owner: context.repo.owner, repo: context.repo.repo, @@ -41,10 +24,6 @@ module.exports = async ({ github, context }) => { direction: 'asc' // Oldest updated first }); - console.log(`Retrieved ${response.data.length} issues on page ${page}`); - console.log(`Response status: ${response.status}`); - console.log(`Rate limit remaining: ${response.headers['x-ratelimit-remaining'] || 'unknown'}`); - // Check if the most recently updated issue on this page is too recent let recentIssueFound = false; if (response.data.length > 0) { @@ -53,19 +32,14 @@ module.exports = async ({ github, context }) => { const lastIssueUpdatedAt = new Date(lastIssue.updated_at); const timeSinceLastIssueUpdate = now.getTime() - lastIssueUpdatedAt.getTime(); - console.log(`Most recent issue on page ${page} was updated ${(timeSinceLastIssueUpdate/(24*60*60*1000)).toFixed(2)} days ago`); - if (timeSinceLastIssueUpdate < minInactivity) { // This page already has issues that are too recent, filter them out - console.log(`Found issues updated within the last ${daysToComment} days, filtering and stopping pagination`); - const filteredIssues = response.data.filter(issue => { const issueUpdatedAt = new Date(issue.updated_at); const timeSinceUpdate = now.getTime() - issueUpdatedAt.getTime(); return timeSinceUpdate >= minInactivity; }); - console.log(`Keeping ${filteredIssues.length} issues from page ${page} that are inactive for at least ${daysToComment} days`); allIssues = allIssues.concat(filteredIssues); recentIssueFound = true; hasNextPage = false; @@ -77,10 +51,8 @@ module.exports = async ({ github, context }) => { // Stop if we found recent issues or reached the end of pagination if (recentIssueFound) { - console.log('Stopping pagination due to finding recently updated issues'); hasNextPage = false; } else if (response.data.length < 100) { - console.log('Reached the last page of issues'); hasNextPage = false; } else { page++; @@ -95,64 +67,29 @@ module.exports = async ({ github, context }) => { // Fetch all issues const allIssues = await fetchAllIssues(); - console.log(`Retrieved a total of ${allIssues.length} open issues`); - console.log('Issues are sorted by update date (oldest first)'); - - console.log('\n=== Processing all issues sorted by oldest update first ==='); - let processedCount = 0; let commentedCount = 0; let labeledCount = 0; for (const issue of allIssues) { processedCount++; - console.log(`\nChecking issue #${issue.number}: "${issue.title}" (${processedCount}/${allIssues.length})`); // Skip pull requests if (issue.pull_request) { - console.log(`Issue #${issue.number} is a pull request, skipping`); continue; } - - if(issue.number != 11682) continue - - console.log(`\n=== 📋 Processing test issue #${issue.number} ===`); - console.log(`Title: "${issue.title}"`); - console.log(`State: ${issue.state}`); - console.log(`Author: ${issue.user.login}`); - console.log(`Created: ${new Date(issue.created_at).toISOString()}`); - console.log(`URL: ${issue.html_url}`); - - // Log all current labels - console.log(`Labels: ${issue.labels.map(label => label.name).join(', ') || 'none'}`); // Skip issues that already have the idle label if (issue.labels.some(label => label.name === 'idle')) { - console.log(`⚠️ Issue #${issue.number} already has idle label, skipping further processing`); continue; } // Get latest comment or update date const issueUpdatedAt = new Date(issue.updated_at); const timeSinceUpdate = now.getTime() - issueUpdatedAt.getTime(); - const daysInactive = (timeSinceUpdate/(24*60*60*1000)).toFixed(2); - - console.log(`Last updated: ${issueUpdatedAt.toISOString()}`); - console.log(`Days inactive: ${daysInactive}`); - console.log(`Milliseconds inactive: ${timeSinceUpdate}`); - console.log(`60-day threshold (ms): ${idleTimeComment}`); - console.log(`90-day threshold (ms): ${idleTimeLabel}`); - - - // Check conditions based on inactivity time - console.log('\n--- Checking inactivity conditions ---'); // Handle 60-day idle issues (comment) if (timeSinceUpdate > idleTimeComment && timeSinceUpdate <= idleTimeLabel) { - console.log(`✓ Condition met: Issue inactive between ${daysToComment} and ${daysToLabel} days`); - console.log('Action required: Add inactivity comment'); - - console.log('Fetching issue comments...'); // Check if bot already commented to avoid duplicate comments const comments = await github.rest.issues.listComments({ owner: context.repo.owner, @@ -161,10 +98,7 @@ module.exports = async ({ github, context }) => { per_page: 100 }); - console.log(`Retrieved ${comments.data.length} comments`); - // Check if there's a recent bot comment - console.log('Checking for existing bot comments...'); const botCommented = comments.data.some(comment => { const commentDate = new Date(comment.created_at); const timeSinceComment = now.getTime() - commentDate.getTime(); @@ -172,19 +106,10 @@ module.exports = async ({ github, context }) => { const isRecent = timeSinceComment < idleTimeComment; const hasRightContent = comment.body.includes('Is this issue still relevant?'); - if (isBot) { - console.log(`Found bot comment from: ${commentDate.toISOString()}`); - console.log(`Comment age (days): ${(timeSinceComment/(24*60*60*1000)).toFixed(2)}`); - console.log(`Contains marker text: ${hasRightContent}`); - } - return isBot && isRecent && hasRightContent; }); - if (botCommented) { - console.log('⚠️ Bot already commented recently, skipping comment'); - } else { - console.log(`📝 Adding inactivity comment to issue #${issue.number}: "${issue.title}"`); + if (!botCommented) { try { const result = await github.rest.issues.createComment({ owner: context.repo.owner, @@ -192,32 +117,22 @@ module.exports = async ({ github, context }) => { issue_number: issue.number, body: `👋 @${issue.user.login} This issue has been open for 60 days with no activity. Is this issue still relevant? If there is no response or activity within the next 30 days, this issue will be labeled as \`idle\`.` }); - console.log(`Comment created successfully. Status: ${result.status}`); - console.log(`Comment URL: ${result.data.html_url}`); commentedCount++; } catch (error) { - console.error(`Error adding comment: ${error.message}`); - console.error(`Error type: ${error.name}`); - console.error(`Error stack: ${error.stack}`); - // Add retry logic - console.log(`Will retry commenting on issue #${issue.number} after a delay...`); try { // Wait for 5 seconds before retrying await new Promise(resolve => setTimeout(resolve, 5000)); - console.log(`Retrying comment on issue #${issue.number}...`); const retryResult = await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, body: `👋 @${issue.user.login} This issue has been open for 60 days with no activity. Is this issue still relevant? If there is no response or activity within the next 30 days, this issue will be labeled as \`idle\`.` }); - console.log(`Retry successful! Comment URL: ${retryResult.data.html_url}`); commentedCount++; } catch (retryError) { - console.error(`Retry also failed for issue #${issue.number}: ${retryError.message}`); - console.error(`Will skip this issue and continue with others`); + // Failed retry, continue with other issues } } } @@ -225,20 +140,8 @@ module.exports = async ({ github, context }) => { // Handle 90-day idle issues (add label) else if (timeSinceUpdate > idleTimeLabel) { - console.log(`✓ Condition met: Issue inactive for more than ${daysToLabel} days`); - console.log('Action required: Add idle label'); - // Check if the issue has the idle label if (!issue.labels.some(label => label.name === 'idle')) { - console.log(`\n🚨 ATUALIZANDO LABEL DA ISSUE 🚨`); - console.log(`🏷️ Adicionando label 'idle' para issue #${issue.number}`); - console.log(`🔗 URL: ${issue.html_url}`); - console.log(`📝 Título: "${issue.title}"`); - console.log(`👤 Autor: ${issue.user.login}`); - console.log(`📅 Criada em: ${new Date(issue.created_at).toISOString()}`); - console.log(`⏰ Última atualização: ${new Date(issue.updated_at).toISOString()}`); - console.log(`⏳ Dias inativo: ${(timeSinceUpdate/(24*60*60*1000)).toFixed(2)}`); - try { // Add the label const labelResult = await github.rest.issues.addLabels({ @@ -247,72 +150,41 @@ module.exports = async ({ github, context }) => { issue_number: issue.number, labels: ['idle'] }); - console.log(`Label added successfully. Status: ${labelResult.status}`); // Add a comment when labeling as idle - console.log('Adding idle notification comment'); const commentResult = await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, body: `This issue has been automatically labeled as \`idle\` due to 90 days of inactivity. If this issue is still relevant, please comment to reactivate it.` }); - console.log(`Comment added successfully. Status: ${commentResult.status}`); - console.log(`Comment URL: ${commentResult.data.html_url}`); labeledCount++; } catch (error) { - console.error(`Error during labeling: ${error.message}`); - // Use a safer way to log the error without circular references - console.error(`Error type: ${error.name}`); - console.error(`Error stack: ${error.stack}`); - // Add retry logic with exponential backoff - console.log(`Will retry labeling issue #${issue.number} after a delay...`); try { // Wait for 5 seconds before retrying await new Promise(resolve => setTimeout(resolve, 5000)); - console.log(`Retrying adding idle label to issue #${issue.number}...`); const retryLabelResult = await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, labels: ['idle'] }); - console.log(`Retry successful! Label added with status: ${retryLabelResult.status}`); // Retry adding comment - console.log('Retrying adding idle notification comment...'); const retryCommentResult = await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issue.number, body: `This issue has been automatically labeled as \`idle\` due to 90 days of inactivity. If this issue is still relevant, please comment to reactivate it.` }); - console.log(`Retry comment successful! URL: ${retryCommentResult.data.html_url}`); labeledCount++; } catch (retryError) { - console.error(`Retry also failed for issue #${issue.number}: ${retryError.message}`); - console.error(`Will skip this issue and continue with others`); + // Continue with other issues if retry fails } } - } else { - console.log('Issue already has idle label (this shouldn\'t happen due to earlier check)'); } - } else { - console.log(`⚠️ Issue doesn't meet inactivity thresholds. Not taking any action.`); - console.log(`Inactivity period: ${daysInactive} days`); - console.log(`Required for comment: > ${daysToComment} days`); - console.log(`Required for label: > ${daysToLabel} days`); } - - // Update counters based on actions taken - these will be incremented within the action blocks } - - console.log('\n=== 🎉 Script execution complete ==='); - console.log(`Time: ${new Date().toISOString()}`); - console.log(`Total issues processed: ${processedCount}`); - console.log(`Issues commented (60+ days inactive): ${commentedCount}`); - console.log(`Issues labeled (90+ days inactive): ${labeledCount}`); - console.log('See logs above for detailed information about each issue processed'); }; diff --git a/.github/workflows/inactive-issues.yml b/.github/workflows/inactive-issues.yml index 0afe0e5f40..b099416ed1 100644 --- a/.github/workflows/inactive-issues.yml +++ b/.github/workflows/inactive-issues.yml @@ -2,16 +2,10 @@ name: Inactive Issues Management on: schedule: - # Runs at 01:00 UTC every day - - cron: '0 1 * * *' + # “At 01:00 on Saturday.” + - cron: '0 1 * * 6' # Allows to run this workflow manually from the Actions tab workflow_dispatch: - # Run when there's a push to a pull request - pull_request: - types: [opened, synchronize, reopened] - paths: - - '.github/scripts/inactive-issues.js' - - '.github/workflows/inactive-issues.yml' jobs: manage-inactive-issues: From e3e9484ac6a77855833378feebd9dea4807ac71a Mon Sep 17 00:00:00 2001 From: italo jose Date: Mon, 26 May 2025 18:23:23 -0300 Subject: [PATCH 50/70] Remove conditional execution for pull request in inactive issues workflow --- .github/workflows/inactive-issues.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/inactive-issues.yml b/.github/workflows/inactive-issues.yml index b099416ed1..2d8cba7a3f 100644 --- a/.github/workflows/inactive-issues.yml +++ b/.github/workflows/inactive-issues.yml @@ -10,8 +10,6 @@ on: jobs: manage-inactive-issues: runs-on: ubuntu-latest - # Only run this workflow for PR #13775 when triggered by a pull_request event - if: ${{ github.event_name != 'pull_request' || github.event.pull_request.number == 13775 }} permissions: issues: write steps: From 494e27e22c21ad6f67e196504f7ab8448398bce9 Mon Sep 17 00:00:00 2001 From: italo jose Date: Mon, 9 Jun 2025 14:26:53 -0300 Subject: [PATCH 51/70] wip --- packages/mongo/collection/collection.js | 5 + .../mongo/collection/watch_change_stream.js | 31 + poc-change-stream/.gitignore | 1 + poc-change-stream/.meteor/.finished-upgraders | 19 + poc-change-stream/.meteor/.gitignore | 1 + poc-change-stream/.meteor/.id | 7 + poc-change-stream/.meteor/packages | 21 + poc-change-stream/.meteor/platforms | 2 + poc-change-stream/.meteor/release | 1 + poc-change-stream/.meteor/versions | 68 + poc-change-stream/client/main.css | 4 + poc-change-stream/client/main.html | 7 + poc-change-stream/client/main.jsx | 10 + poc-change-stream/imports/api/links.js | 12 + poc-change-stream/imports/ui/App.jsx | 11 + poc-change-stream/imports/ui/Hello.jsx | 21 + poc-change-stream/imports/ui/Info.jsx | 28 + poc-change-stream/package-lock.json | 1369 +++++++++++++++++ poc-change-stream/package.json | 23 + poc-change-stream/server/main.js | 61 + poc-change-stream/tests/main.js | 20 + 21 files changed, 1722 insertions(+) create mode 100644 packages/mongo/collection/watch_change_stream.js create mode 100644 poc-change-stream/.gitignore create mode 100644 poc-change-stream/.meteor/.finished-upgraders create mode 100644 poc-change-stream/.meteor/.gitignore create mode 100644 poc-change-stream/.meteor/.id create mode 100644 poc-change-stream/.meteor/packages create mode 100644 poc-change-stream/.meteor/platforms create mode 100644 poc-change-stream/.meteor/release create mode 100644 poc-change-stream/.meteor/versions create mode 100644 poc-change-stream/client/main.css create mode 100644 poc-change-stream/client/main.html create mode 100644 poc-change-stream/client/main.jsx create mode 100644 poc-change-stream/imports/api/links.js create mode 100644 poc-change-stream/imports/ui/App.jsx create mode 100644 poc-change-stream/imports/ui/Hello.jsx create mode 100644 poc-change-stream/imports/ui/Info.jsx create mode 100644 poc-change-stream/package-lock.json create mode 100644 poc-change-stream/package.json create mode 100644 poc-change-stream/server/main.js create mode 100644 poc-change-stream/tests/main.js diff --git a/packages/mongo/collection/collection.js b/packages/mongo/collection/collection.js index 28776c9a93..ec2e3323b7 100644 --- a/packages/mongo/collection/collection.js +++ b/packages/mongo/collection/collection.js @@ -11,6 +11,7 @@ import { validateCollectionName } from './collection_utils'; import { ReplicationMethods } from './methods_replication'; +import { watchChangeStream } from './watch_change_stream'; /** * @summary Namespace for MongoDB-related items @@ -263,6 +264,10 @@ Mongo.Collection.ObjectID = Mongo.ObjectID; */ Meteor.Collection = Mongo.Collection; + // Allow deny stuff is now in the allow-deny package Object.assign(Mongo.Collection.prototype, AllowDeny.CollectionPrototype); +// Só agora que Mongo.Collection existe, adicionamos o método ao prototype +Object.assign(Mongo.Collection.prototype, { watchChangeStream }); + diff --git a/packages/mongo/collection/watch_change_stream.js b/packages/mongo/collection/watch_change_stream.js new file mode 100644 index 0000000000..a4e8ae7b95 --- /dev/null +++ b/packages/mongo/collection/watch_change_stream.js @@ -0,0 +1,31 @@ +/** + * @summary Watches the MongoDB collection using Change Streams. + * @locus Server + * @memberof Mongo.Collection + * @instance + * @param {Array} [pipeline] Optional aggregation pipeline to filter Change Stream events. + * @param {Object} [options] Optional settings for the Change Stream. + * @returns {ChangeStream} The MongoDB ChangeStream instance. + * @throws {Error} If called on a client/minimongo collection. + * + * @example + * const changeStream = MyCollection.watchChangeStream([ + * { $match: { 'operationType': 'insert' } } + * ]); + * changeStream.on('change', (change) => { + * console.log('Change detected:', change); + * }); + */ + +export function watchChangeStream(pipeline = [], options = {}) { + // Only available on server + if (typeof Package === 'undefined' || !this.rawCollection) { + throw new Error('watchChangeStream is only available on server collections'); + } + const raw = this.rawCollection(); + if (!raw.watch) { + throw new Error('Underlying collection does not support watch (Change Streams)'); + } + console.log('[watchChangeStream] Chamando raw.watch() com pipeline:', JSON.stringify(pipeline, null, 2), 'e options:', JSON.stringify(options, null, 2)); + return raw.watch(pipeline, options); +} diff --git a/poc-change-stream/.gitignore b/poc-change-stream/.gitignore new file mode 100644 index 0000000000..c2658d7d1b --- /dev/null +++ b/poc-change-stream/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/poc-change-stream/.meteor/.finished-upgraders b/poc-change-stream/.meteor/.finished-upgraders new file mode 100644 index 0000000000..c07b6ff75a --- /dev/null +++ b/poc-change-stream/.meteor/.finished-upgraders @@ -0,0 +1,19 @@ +# This file contains information which helps Meteor properly upgrade your +# app when you run 'meteor update'. You should check it into version control +# with your project. + +notices-for-0.9.0 +notices-for-0.9.1 +0.9.4-platform-file +notices-for-facebook-graph-api-2 +1.2.0-standard-minifiers-package +1.2.0-meteor-platform-split +1.2.0-cordova-changes +1.2.0-breaking-changes +1.3.0-split-minifiers-package +1.4.0-remove-old-dev-bundle-link +1.4.1-add-shell-server-package +1.4.3-split-account-service-packages +1.5-add-dynamic-import-package +1.7-split-underscore-from-meteor-base +1.8.3-split-jquery-from-blaze diff --git a/poc-change-stream/.meteor/.gitignore b/poc-change-stream/.meteor/.gitignore new file mode 100644 index 0000000000..4083037423 --- /dev/null +++ b/poc-change-stream/.meteor/.gitignore @@ -0,0 +1 @@ +local diff --git a/poc-change-stream/.meteor/.id b/poc-change-stream/.meteor/.id new file mode 100644 index 0000000000..a8d28fde38 --- /dev/null +++ b/poc-change-stream/.meteor/.id @@ -0,0 +1,7 @@ +# This file contains a token that is unique to your project. +# Check it into your repository along with the rest of this directory. +# It can be used for purposes such as: +# - ensuring you don't accidentally deploy one app on top of another +# - providing package authors with aggregated statistics + +bcz0tmc9rqc5.c9gmawc30z7b diff --git a/poc-change-stream/.meteor/packages b/poc-change-stream/.meteor/packages new file mode 100644 index 0000000000..84c8c0103d --- /dev/null +++ b/poc-change-stream/.meteor/packages @@ -0,0 +1,21 @@ +# Meteor packages used by this project, one per line. +# Check this file (and the other files in this directory) into your repository. +# +# 'meteor add' and 'meteor remove' will edit this file for you, +# but you can also edit it by hand. + +meteor-base@1.5.2 # Packages every Meteor app needs to have +mobile-experience@1.1.2 # Packages for a great mobile UX +mongo@2.1.1 # The database Meteor supports right now +reactive-var@1.0.13 # Reactive variable for tracker + +standard-minifier-css@1.9.3 # CSS minifier run for production mode +standard-minifier-js@3.0.0 # JS minifier run for production mode +es5-shim@4.8.1 # ECMAScript 5 compatibility for older browsers +ecmascript@0.16.10 # Enable ECMAScript2015+ syntax in app code +typescript@5.6.3 # Enable TypeScript syntax in .ts and .tsx modules +shell-server@0.6.1 # Server-side component of the `meteor shell` command +hot-module-replacement@0.5.4 # Update client in development without reloading the page + +static-html@1.4.0 # Define static page content in .html files +react-meteor-data # React higher-order component for reactively tracking Meteor data diff --git a/poc-change-stream/.meteor/platforms b/poc-change-stream/.meteor/platforms new file mode 100644 index 0000000000..efeba1b50c --- /dev/null +++ b/poc-change-stream/.meteor/platforms @@ -0,0 +1,2 @@ +server +browser diff --git a/poc-change-stream/.meteor/release b/poc-change-stream/.meteor/release new file mode 100644 index 0000000000..af3560b553 --- /dev/null +++ b/poc-change-stream/.meteor/release @@ -0,0 +1 @@ +METEOR@3.2.2 diff --git a/poc-change-stream/.meteor/versions b/poc-change-stream/.meteor/versions new file mode 100644 index 0000000000..42710bab84 --- /dev/null +++ b/poc-change-stream/.meteor/versions @@ -0,0 +1,68 @@ +allow-deny@2.1.0 +autoupdate@2.0.0 +babel-compiler@7.11.3 +babel-runtime@1.5.2 +base64@1.0.13 +binary-heap@1.0.12 +boilerplate-generator@2.0.0 +caching-compiler@2.0.1 +callback-hook@1.6.0 +check@1.4.4 +core-runtime@1.0.0 +ddp@1.4.2 +ddp-client@3.1.0 +ddp-common@1.4.4 +ddp-server@3.1.2 +diff-sequence@1.1.3 +dynamic-import@0.7.4 +ecmascript@0.16.10 +ecmascript-runtime@0.8.3 +ecmascript-runtime-client@0.12.3 +ecmascript-runtime-server@0.11.1 +ejson@1.1.4 +es5-shim@4.8.1 +facts-base@1.0.2 +fetch@0.1.6 +geojson-utils@1.0.12 +hot-code-push@1.0.5 +hot-module-replacement@0.5.4 +id-map@1.2.0 +inter-process-messaging@0.1.2 +launch-screen@2.0.1 +logging@1.3.6 +meteor@2.1.0 +meteor-base@1.5.2 +minifier-css@2.0.1 +minifier-js@3.0.1 +minimongo@2.0.2 +mobile-experience@1.1.2 +mobile-status-bar@1.1.1 +modern-browsers@0.2.1 +modules@0.20.3 +modules-runtime@0.13.2 +modules-runtime-hot@0.14.3 +mongo@2.1.1 +mongo-decimal@0.2.0 +mongo-dev-server@1.1.1 +mongo-id@1.0.9 +npm-mongo@6.10.2 +ordered-dict@1.2.0 +promise@1.0.0 +random@1.2.2 +react-fast-refresh@0.2.9 +react-meteor-data@3.0.4 +reactive-var@1.0.13 +reload@1.3.2 +retry@1.1.1 +routepolicy@1.1.2 +shell-server@0.6.1 +socket-stream-client@0.6.0 +standard-minifier-css@1.9.3 +standard-minifier-js@3.0.0 +static-html@1.4.0 +static-html-tools@1.0.0 +tracker@1.3.4 +typescript@5.6.3 +webapp@2.0.6 +webapp-hashing@1.1.2 +zodern:types@1.0.13 diff --git a/poc-change-stream/client/main.css b/poc-change-stream/client/main.css new file mode 100644 index 0000000000..7f354f0fa7 --- /dev/null +++ b/poc-change-stream/client/main.css @@ -0,0 +1,4 @@ +body { + padding: 10px; + font-family: sans-serif; +} diff --git a/poc-change-stream/client/main.html b/poc-change-stream/client/main.html new file mode 100644 index 0000000000..c0138a665f --- /dev/null +++ b/poc-change-stream/client/main.html @@ -0,0 +1,7 @@ + + Meteor App + + + +
+ diff --git a/poc-change-stream/client/main.jsx b/poc-change-stream/client/main.jsx new file mode 100644 index 0000000000..d2e380f93c --- /dev/null +++ b/poc-change-stream/client/main.jsx @@ -0,0 +1,10 @@ +import React from 'react'; +import { createRoot } from 'react-dom/client'; +import { Meteor } from 'meteor/meteor'; +import { App } from '/imports/ui/App'; + +Meteor.startup(() => { + const container = document.getElementById('react-target'); + const root = createRoot(container); + root.render(); +}); diff --git a/poc-change-stream/imports/api/links.js b/poc-change-stream/imports/api/links.js new file mode 100644 index 0000000000..2e5ba63122 --- /dev/null +++ b/poc-change-stream/imports/api/links.js @@ -0,0 +1,12 @@ +import { Mongo } from 'meteor/mongo'; +import { Meteor } from 'meteor/meteor'; + +export const LinksCollection = new Mongo.Collection('links'); + +if (Meteor.isServer) { + Meteor.methods({ + 'links.insert'({ title, url }) { + return LinksCollection.insertAsync({ title, url, createdAt: new Date() }); + }, + }); +} diff --git a/poc-change-stream/imports/ui/App.jsx b/poc-change-stream/imports/ui/App.jsx new file mode 100644 index 0000000000..6f7340caf9 --- /dev/null +++ b/poc-change-stream/imports/ui/App.jsx @@ -0,0 +1,11 @@ +import React from 'react'; +import { Hello } from './Hello.jsx'; +import { Info } from './Info.jsx'; + +export const App = () => ( +
+

Welcome to Meteor!

+ + +
+); diff --git a/poc-change-stream/imports/ui/Hello.jsx b/poc-change-stream/imports/ui/Hello.jsx new file mode 100644 index 0000000000..936b115062 --- /dev/null +++ b/poc-change-stream/imports/ui/Hello.jsx @@ -0,0 +1,21 @@ +import React, { useState } from 'react'; +import { Meteor } from 'meteor/meteor'; + +export const Hello = () => { + const [counter, setCounter] = useState(0); + + const increment = () => { + setCounter(counter + 1); + Meteor.call('links.insert', { + title: `Link #${counter + 1}`, + url: `https://example.com/${counter + 1}`, + }); + }; + + return ( +
+ +

You've pressed the button {counter} times.

+
+ ); +}; diff --git a/poc-change-stream/imports/ui/Info.jsx b/poc-change-stream/imports/ui/Info.jsx new file mode 100644 index 0000000000..de535ec469 --- /dev/null +++ b/poc-change-stream/imports/ui/Info.jsx @@ -0,0 +1,28 @@ +import React from 'react'; +import { useTracker } from 'meteor/react-meteor-data'; +import { LinksCollection } from '../api/links'; + +export const Info = () => { + const { links, isLoading } = useTracker(() => { + const handle = Meteor.subscribe('links'); + return { + links: LinksCollection.find().fetch(), + isLoading: !handle.ready(), + }; + }, []); + + if (isLoading) { + return
Loading...
; + } + + return ( +
+

Learn Meteor!

+ +
+ ); +}; diff --git a/poc-change-stream/package-lock.json b/poc-change-stream/package-lock.json new file mode 100644 index 0000000000..ce7aa8250c --- /dev/null +++ b/poc-change-stream/package-lock.json @@ -0,0 +1,1369 @@ +{ + "name": "meteor-app", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "meteor-app", + "dependencies": { + "@babel/runtime": "^7.20.7", + "meteor-node-stubs": "^1.2.5", + "react": "^18.2.0", + "react-dom": "^18.2.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz", + "integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/meteor-node-stubs": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-1.2.19.tgz", + "integrity": "sha512-lryhEAPp7aysrC0j3XU1yTs92ktPQQhzQzLVz3OGQEZjL//iLhvJyeYNSvV01XJn6fXUXe48agossxniJkzYOQ==", + "bundleDependencies": [ + "@meteorjs/crypto-browserify", + "assert", + "browserify-zlib", + "buffer", + "console-browserify", + "constants-browserify", + "domain-browser", + "events", + "https-browserify", + "os-browserify", + "path-browserify", + "process", + "punycode", + "querystring-es3", + "readable-stream", + "stream-browserify", + "stream-http", + "string_decoder", + "timers-browserify", + "tty-browserify", + "url", + "util", + "vm-browserify" + ], + "license": "MIT", + "dependencies": { + "@meteorjs/crypto-browserify": "^3.12.1", + "assert": "^2.1.0", + "browserify-zlib": "^0.2.0", + "buffer": "^5.7.1", + "console-browserify": "^1.2.0", + "constants-browserify": "^1.0.0", + "domain-browser": "^4.23.0", + "events": "^3.3.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "^1.0.1", + "process": "^0.11.10", + "punycode": "^1.4.1", + "querystring-es3": "^0.2.1", + "readable-stream": "^3.6.2", + "stream-browserify": "^3.0.0", + "stream-http": "^3.2.0", + "string_decoder": "^1.3.0", + "timers-browserify": "^2.0.12", + "tty-browserify": "0.0.1", + "url": "^0.11.4", + "util": "^0.12.5", + "vm-browserify": "^1.1.2" + } + }, + "node_modules/meteor-node-stubs/node_modules/@meteorjs/browserify-sign": { + "version": "4.2.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "bn.js": "^5.2.1", + "brorand": "^1.1.0", + "browserify-rsa": "^4.1.0", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash-base": "~3.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1", + "parse-asn1": "^5.1.7", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/meteor-node-stubs/node_modules/@meteorjs/browserify-sign/node_modules/readable-stream": { + "version": "2.3.8", + "inBundle": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/meteor-node-stubs/node_modules/@meteorjs/browserify-sign/node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/@meteorjs/browserify-sign/node_modules/string_decoder": { + "version": "1.1.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/@meteorjs/browserify-sign/node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/@meteorjs/create-ecdh": { + "version": "4.0.5", + "inBundle": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/meteor-node-stubs/node_modules/@meteorjs/create-ecdh/node_modules/bn.js": { + "version": "4.12.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/@meteorjs/crypto-browserify": { + "version": "3.12.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@meteorjs/browserify-sign": "^4.2.3", + "@meteorjs/create-ecdh": "^4.0.4", + "browserify-cipher": "^1.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "diffie-hellman": "^5.0.3", + "hash-base": "~3.0.4", + "inherits": "^2.0.4", + "pbkdf2": "^3.1.2", + "public-encrypt": "^4.0.3", + "randombytes": "^2.1.0", + "randomfill": "^1.0.4" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/asn1.js": { + "version": "4.10.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/assert": { + "version": "2.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "is-nan": "^1.3.2", + "object-is": "^1.1.5", + "object.assign": "^4.1.4", + "util": "^0.12.5" + } + }, + "node_modules/meteor-node-stubs/node_modules/available-typed-arrays": { + "version": "1.0.7", + "inBundle": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/bn.js": { + "version": "5.2.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/brorand": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/browserify-aes": { + "version": "1.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/meteor-node-stubs/node_modules/browserify-cipher": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/browserify-des": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/meteor-node-stubs/node_modules/browserify-rsa": { + "version": "4.1.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "bn.js": "^5.2.1", + "randombytes": "^2.1.0", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/meteor-node-stubs/node_modules/browserify-zlib": { + "version": "0.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "pako": "~1.0.5" + } + }, + "node_modules/meteor-node-stubs/node_modules/buffer": { + "version": "5.7.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/meteor-node-stubs/node_modules/buffer-xor": { + "version": "1.0.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/builtin-status-codes": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/call-bind": { + "version": "1.0.8", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/call-bound": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/cipher-base": { + "version": "1.0.6", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/meteor-node-stubs/node_modules/console-browserify": { + "version": "1.2.0", + "inBundle": true + }, + "node_modules/meteor-node-stubs/node_modules/constants-browserify": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/core-util-is": { + "version": "1.0.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/create-hash": { + "version": "1.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/create-hmac": { + "version": "1.1.7", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/meteor-node-stubs/node_modules/define-data-property": { + "version": "1.1.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/define-properties": { + "version": "1.2.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/des.js": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/diffie-hellman": { + "version": "5.0.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/domain-browser": { + "version": "4.23.0", + "inBundle": true, + "license": "Artistic-2.0", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/meteor-node-stubs/node_modules/dunder-proto": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/es-define-property": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/es-errors": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/es-object-atoms": { + "version": "1.1.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/events": { + "version": "3.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/meteor-node-stubs/node_modules/evp_bytestokey": { + "version": "1.0.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/meteor-node-stubs/node_modules/for-each": { + "version": "0.3.5", + "inBundle": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/function-bind": { + "version": "1.1.2", + "inBundle": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/get-intrinsic": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/get-proto": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/gopd": { + "version": "1.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/has-property-descriptors": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/has-symbols": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/has-tostringtag": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/hash-base": { + "version": "3.0.5", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/meteor-node-stubs/node_modules/hash.js": { + "version": "1.1.7", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/meteor-node-stubs/node_modules/hasown": { + "version": "2.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/hmac-drbg": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/meteor-node-stubs/node_modules/https-browserify": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "BSD-3-Clause" + }, + "node_modules/meteor-node-stubs/node_modules/inherits": { + "version": "2.0.4", + "inBundle": true, + "license": "ISC" + }, + "node_modules/meteor-node-stubs/node_modules/is-arguments": { + "version": "1.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/is-callable": { + "version": "1.2.7", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/is-generator-function": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/is-nan": { + "version": "1.3.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/is-regex": { + "version": "1.2.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/is-typed-array": { + "version": "1.1.15", + "inBundle": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/isarray": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/math-intrinsics": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/md5.js": { + "version": "1.3.5", + "inBundle": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/meteor-node-stubs/node_modules/miller-rabin": { + "version": "4.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/meteor-node-stubs/node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/minimalistic-assert": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/meteor-node-stubs/node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/object-inspect": { + "version": "1.13.4", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/object-is": { + "version": "1.1.6", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/object-keys": { + "version": "1.1.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/object.assign": { + "version": "4.1.7", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/os-browserify": { + "version": "0.3.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/pako": { + "version": "1.0.11", + "inBundle": true, + "license": "(MIT AND Zlib)" + }, + "node_modules/meteor-node-stubs/node_modules/parse-asn1": { + "version": "5.1.7", + "inBundle": true, + "license": "ISC", + "dependencies": { + "asn1.js": "^4.10.1", + "browserify-aes": "^1.2.0", + "evp_bytestokey": "^1.0.3", + "hash-base": "~3.0", + "pbkdf2": "^3.1.2", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/meteor-node-stubs/node_modules/path-browserify": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/pbkdf2": { + "version": "3.1.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/meteor-node-stubs/node_modules/possible-typed-array-names": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/process": { + "version": "0.11.10", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/process-nextick-args": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/public-encrypt": { + "version": "4.0.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/meteor-node-stubs/node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/punycode": { + "version": "1.4.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/qs": { + "version": "6.14.0", + "inBundle": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/querystring-es3": { + "version": "0.2.1", + "inBundle": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/meteor-node-stubs/node_modules/randombytes": { + "version": "2.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/randomfill": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/readable-stream": { + "version": "3.6.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/meteor-node-stubs/node_modules/ripemd160": { + "version": "2.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/meteor-node-stubs/node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/safe-regex-test": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/set-function-length": { + "version": "1.2.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/setimmediate": { + "version": "1.0.5", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/sha.js": { + "version": "2.4.11", + "inBundle": true, + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/meteor-node-stubs/node_modules/side-channel": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/side-channel-list": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/side-channel-map": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/side-channel-weakmap": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/stream-browserify": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/stream-http": { + "version": "3.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, + "node_modules/meteor-node-stubs/node_modules/string_decoder": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/timers-browserify": { + "version": "2.0.12", + "inBundle": true, + "license": "MIT", + "dependencies": { + "setimmediate": "^1.0.4" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/meteor-node-stubs/node_modules/tty-browserify": { + "version": "0.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/url": { + "version": "0.11.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "punycode": "^1.4.1", + "qs": "^6.12.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/meteor-node-stubs/node_modules/util": { + "version": "0.12.5", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/meteor-node-stubs/node_modules/util-deprecate": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/vm-browserify": { + "version": "1.1.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/meteor-node-stubs/node_modules/which-typed-array": { + "version": "1.1.19", + "inBundle": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/meteor-node-stubs/node_modules/xtend": { + "version": "4.0.2", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + } + } +} diff --git a/poc-change-stream/package.json b/poc-change-stream/package.json new file mode 100644 index 0000000000..05d9123f03 --- /dev/null +++ b/poc-change-stream/package.json @@ -0,0 +1,23 @@ +{ + "name": "meteor-app", + "private": true, + "scripts": { + "start": "meteor run", + "test": "meteor test --once --driver-package meteortesting:mocha", + "test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha", + "visualize": "meteor --production --extra-packages bundle-visualizer" + }, + "dependencies": { + "@babel/runtime": "^7.20.7", + "meteor-node-stubs": "^1.2.5", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "meteor": { + "mainModule": { + "client": "client/main.jsx", + "server": "server/main.js" + }, + "testModule": "tests/main.js" + } +} diff --git a/poc-change-stream/server/main.js b/poc-change-stream/server/main.js new file mode 100644 index 0000000000..1af7d66ed7 --- /dev/null +++ b/poc-change-stream/server/main.js @@ -0,0 +1,61 @@ +import { Meteor } from 'meteor/meteor'; +import { LinksCollection } from '/imports/api/links'; + +async function insertLink({ title, url }) { + await LinksCollection.insertAsync({ title, url, createdAt: new Date() }); +} + +Meteor.startup(async () => { + console.log('[Startup] Meteor server is starting...'); + // If the Links collection is empty, add some data. + const count = await LinksCollection.find().countAsync(); + console.log(`[Startup] LinksCollection count: ${count}`); + if (count === 0) { + await insertLink({ + title: 'Do the Tutorial', + url: 'https://www.meteor.com/tutorials/react/creating-an-app', + }); + await insertLink({ + title: 'Follow the Guide', + url: 'https://guide.meteor.com', + }); + await insertLink({ + title: 'Read the Docs', + url: 'https://docs.meteor.com', + }); + await insertLink({ + title: 'Discussions', + url: 'https://forums.meteor.com', + }); + console.log('[Startup] Initial links inserted.'); + } + + Meteor.publish("links", function () { + console.log('[Publish] links publication requested'); + return LinksCollection.find(); + }); + + // Inicia o Change Stream após o Meteor estar pronto e conectado ao banco + try { + console.log('[ChangeStream] Tentando iniciar Change Stream...'); + const changeStream = LinksCollection.watchChangeStream([ + { $match: { operationType: 'insert' } } + ]); + console.log('[ChangeStream] Change Stream iniciado:', !!changeStream); + changeStream.on('change', (change) => { + console.log('[ChangeStream] Evento detectado:', JSON.stringify(change, null, 2)); + }); + changeStream.on('error', (err) => { + console.error('[ChangeStream] Erro:', err); + }); + changeStream.on('close', () => { + console.log('[ChangeStream] Fechado'); + }); + changeStream.on('message', (message) => { + console.log('[ChangeStream] Mensagem:', message); + }); + console.log('[ChangeStream] Change Stream configurado com sucesso.'); + } catch (e) { + console.error('[ChangeStream] Erro ao iniciar Change Stream:', e); + } +}); diff --git a/poc-change-stream/tests/main.js b/poc-change-stream/tests/main.js new file mode 100644 index 0000000000..13106983d6 --- /dev/null +++ b/poc-change-stream/tests/main.js @@ -0,0 +1,20 @@ +import assert from "assert"; + +describe("meteor-app", function () { + it("package.json has correct name", async function () { + const { name } = await import("../package.json"); + assert.strictEqual(name, "meteor-app"); + }); + + if (Meteor.isClient) { + it("client is not server", function () { + assert.strictEqual(Meteor.isServer, false); + }); + } + + if (Meteor.isServer) { + it("server is not client", function () { + assert.strictEqual(Meteor.isClient, false); + }); + } +}); From 90656b665a57f44af56fe14f37adf76a26138179 Mon Sep 17 00:00:00 2001 From: italo jose Date: Wed, 11 Jun 2025 11:23:48 -0300 Subject: [PATCH 52/70] Meteor version to 3.3 :comet: --- docs/history.md | 59 +- packages/accounts-base/package.js | 2 +- packages/accounts-password/package.js | 2 +- packages/autoupdate/package.js | 2 +- packages/babel-compiler/package.js | 2 +- packages/boilerplate-generator/package.js | 2 +- packages/ddp-client/package.js | 2 +- packages/ecmascript/package.js | 2 +- packages/ejson/package.js | 2 +- packages/meteor-tool/package.js | 2 +- packages/meteor/package.js | 2 +- packages/minifier-js/package.js | 2 +- packages/modern-browsers/package.js | 2 +- packages/mongo/package.js | 2 +- .../non-core/coffeescript-compiler/package.js | 2 +- packages/non-core/coffeescript/package.js | 4 +- packages/server-render/package.js | 2 +- packages/socket-stream-client/package.js | 2 +- packages/standard-minifier-js/package.js | 2 +- packages/typescript/package.js | 2 +- packages/webapp/package.js | 2 +- poc-change-stream/.gitignore | 1 - poc-change-stream/.meteor/.finished-upgraders | 19 - poc-change-stream/.meteor/.gitignore | 1 - poc-change-stream/.meteor/.id | 7 - poc-change-stream/.meteor/packages | 21 - poc-change-stream/.meteor/platforms | 2 - poc-change-stream/.meteor/release | 1 - poc-change-stream/.meteor/versions | 68 - poc-change-stream/client/main.css | 4 - poc-change-stream/client/main.html | 7 - poc-change-stream/client/main.jsx | 10 - poc-change-stream/imports/api/links.js | 12 - poc-change-stream/imports/ui/App.jsx | 11 - poc-change-stream/imports/ui/Hello.jsx | 21 - poc-change-stream/imports/ui/Info.jsx | 28 - poc-change-stream/package-lock.json | 1369 ----------------- poc-change-stream/package.json | 23 - poc-change-stream/server/main.js | 61 - poc-change-stream/tests/main.js | 20 - scripts/admin/meteor-release-official.json | 2 +- .../generators/changelog/versions/3.3.0.md | 46 +- v3-docs/docs/history.md | 58 +- 43 files changed, 104 insertions(+), 1789 deletions(-) delete mode 100644 poc-change-stream/.gitignore delete mode 100644 poc-change-stream/.meteor/.finished-upgraders delete mode 100644 poc-change-stream/.meteor/.gitignore delete mode 100644 poc-change-stream/.meteor/.id delete mode 100644 poc-change-stream/.meteor/packages delete mode 100644 poc-change-stream/.meteor/platforms delete mode 100644 poc-change-stream/.meteor/release delete mode 100644 poc-change-stream/.meteor/versions delete mode 100644 poc-change-stream/client/main.css delete mode 100644 poc-change-stream/client/main.html delete mode 100644 poc-change-stream/client/main.jsx delete mode 100644 poc-change-stream/imports/api/links.js delete mode 100644 poc-change-stream/imports/ui/App.jsx delete mode 100644 poc-change-stream/imports/ui/Hello.jsx delete mode 100644 poc-change-stream/imports/ui/Info.jsx delete mode 100644 poc-change-stream/package-lock.json delete mode 100644 poc-change-stream/package.json delete mode 100644 poc-change-stream/server/main.js delete mode 100644 poc-change-stream/tests/main.js diff --git a/docs/history.md b/docs/history.md index 1b986ed07a..7c142c2e11 100644 --- a/docs/history.md +++ b/docs/history.md @@ -8,7 +8,7 @@ [//]: # (go to meteor/docs/generators/changelog/docs) -## v3.3.0, 2025-05-28 +## v3.3.0, 2025-06-11 ### Highlights @@ -27,16 +27,16 @@ All Merged PRs@[GitHub PRs 3.3](https://github.com/meteor/meteor/pulls?q=is%3Apr+is%3Amerged+base%3Arelease-3.3) -React Packages Changelog: [react-meteor-data@4.0.0-beta.0](https://github.com/meteor/react-packages/blob/fb73eeb89ff59664a7a01769fa1c2c880e72a3e5/packages/react-meteor-data/CHANGELOG.md#v400-beta0-xxx) +React Packages Changelog: [react-meteor-data@4.0.0](https://github.com/meteor/react-packages/tree/master/packages/react-meteor-data/CHANGELOG.md#v400-2025-06-11) #### Breaking Changes - File watching strategy switched to `@parcel/watcher` - - Most setups should be fine, but if issues appear, like when using WSL with host, volumes, or remote setups—switch to polling. - - Set `METEOR_WATCH_FORCE_POLLING=true` to enable polling. - - Set `METEOR_WATCH_POLLING_INTERVAL_MS=1000` to adjust the interval. + - Most setups should be fine, but if issues appear, like when using WSL with host, volumes, or remote setups—switch to polling. + - Set `METEOR_WATCH_FORCE_POLLING=true` to enable polling. + - Set `METEOR_WATCH_POLLING_INTERVAL_MS=1000` to adjust the interval. -- `react-meteor-data@4.0.0-beta.0` +- `react-meteor-data@4.0.0` - Independent from the core, only applies if upgraded manually. - useFind describes no deps by default [PR#431](https://github.com/meteor/react-packages/pull/431) @@ -51,13 +51,13 @@ React Packages Changelog: [react-meteor-data@4.0.0-beta.0](https://github.com/me Please run the following command to update your project: ```bash -meteor update --release 3.3-beta.1 +meteor update --release 3.3 ``` To apply react-meteor-data changes: ```bash -meteor add react-meteor-data@4.0.0-beta.0 +meteor add react-meteor-data@4.0.0 ``` **Add this to your `package.json` to enable the new modern build stack:** @@ -72,24 +72,24 @@ meteor add react-meteor-data@4.0.0-beta.0 #### Bumped Meteor Packages -- accounts-base@3.1.1-rc330.0 -- accounts-password@3.2.0-rc330.0 -- autoupdate@2.0.1-rc330.0 -- babel-compiler@7.12.0-rc330.0 -- boilerplate-generator@2.0.1-rc330.0 -- ddp-client@3.1.1-rc330.0 -- ecmascript@0.16.11-rc330.0 -- ejson@1.1.5-rc330.0 -- meteor@2.1.1-rc330.0 -- minifier-js@3.0.2-rc330.0 -- modern-browsers@0.2.2-rc330.0 -- mongo@2.1.2-rc330.0 -- server-render@0.4.3-rc330.0 -- socket-stream-client@0.6.1-rc330.0 -- standard-minifier-js@3.1.0-rc330.0 -- typescript@5.6.4-rc330.0 -- webapp@2.0.7-rc330.0 -- meteor-tool@3.3.0-rc.0 +- accounts-base@3.1.1 +- accounts-password@3.2.0 +- autoupdate@2.0.1 +- babel-compiler@7.12.0 +- boilerplate-generator@2.0.1 +- ddp-client@3.1.1 +- ecmascript@0.16.11 +- ejson@1.1.5 +- meteor@2.1.1 +- minifier-js@3.0.2 +- modern-browsers@0.2.2 +- mongo@2.1.2 +- server-render@0.4.3 +- socket-stream-client@0.6.1 +- standard-minifier-js@3.1.0 +- typescript@5.6.4 +- webapp@2.0.7 +- meteor-tool@3.3.0 #### Bumped NPM Packages @@ -99,9 +99,9 @@ meteor add react-meteor-data@4.0.0-beta.0 ✨✨✨ -- [@nachocodoner](https://github.com/nachocodoner) +- [@nachocodoner](https://github.com/nachocodoner) - [@italojs](https://github.com/italojs) -- [@Grubba27](https://github.com/Grubba27) +- [@Grubba27](https://github.com/Grubba27) - [@zodern](https://github.com/zodern) - [@9Morello](https://github.com/9Morello) - [@welkinwong](https://github.com/welkinwong) @@ -111,7 +111,8 @@ meteor add react-meteor-data@4.0.0-beta.0 - [@ericm546](https://github.com/ericm546) - [@StorytellerCZ](https://github.com/StorytellerCZ) -✨✨✨ +✨✨✨ + ## v3.0.1, 2024-07-16 diff --git a/packages/accounts-base/package.js b/packages/accounts-base/package.js index 7a148fef9c..31711cdf33 100644 --- a/packages/accounts-base/package.js +++ b/packages/accounts-base/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "A user account system", - version: "3.1.1-rc330.0", + version: "3.1.1", }); Package.onUse((api) => { diff --git a/packages/accounts-password/package.js b/packages/accounts-password/package.js index 4e094dd690..447bfbefc0 100644 --- a/packages/accounts-password/package.js +++ b/packages/accounts-password/package.js @@ -5,7 +5,7 @@ Package.describe({ // 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.2.0-rc330.0", + version: "3.2.0", }); Npm.depends({ diff --git a/packages/autoupdate/package.js b/packages/autoupdate/package.js index b714142f1c..514439ce1c 100644 --- a/packages/autoupdate/package.js +++ b/packages/autoupdate/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'Update the client when new client code is available', - version: '2.0.1-rc330.0', + version: '2.0.1', }); Package.onUse(function(api) { diff --git a/packages/babel-compiler/package.js b/packages/babel-compiler/package.js index 4f851362a7..4a45656d27 100644 --- a/packages/babel-compiler/package.js +++ b/packages/babel-compiler/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "babel-compiler", summary: "Parser/transpiler for ECMAScript 2015+ syntax", - version: '7.12.0-rc330.0', + version: '7.12.0', }); Npm.depends({ diff --git a/packages/boilerplate-generator/package.js b/packages/boilerplate-generator/package.js index 296d867059..b1bed1ae86 100644 --- a/packages/boilerplate-generator/package.js +++ b/packages/boilerplate-generator/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Generates the boilerplate html from program's manifest", - version: '2.0.1-rc330.0', + version: '2.0.1', }); Npm.depends({ diff --git a/packages/ddp-client/package.js b/packages/ddp-client/package.js index 453d62a5ea..a9e4c534ef 100644 --- a/packages/ddp-client/package.js +++ b/packages/ddp-client/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Meteor's latency-compensated distributed data client", - version: "3.1.1-rc330.0", + version: "3.1.1", documentation: null, }); diff --git a/packages/ecmascript/package.js b/packages/ecmascript/package.js index ae9e6b6072..a8fd89363d 100644 --- a/packages/ecmascript/package.js +++ b/packages/ecmascript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'ecmascript', - version: '0.16.11-rc330.0', + version: '0.16.11', summary: 'Compiler plugin that supports ES2015+ in all .js files', documentation: 'README.md', }); diff --git a/packages/ejson/package.js b/packages/ejson/package.js index 2d8fc448a5..7cb875555d 100644 --- a/packages/ejson/package.js +++ b/packages/ejson/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: 'Extended and Extensible JSON library', - version: '1.1.5-rc330.0', + version: '1.1.5', }); Package.onUse(function onUse(api) { diff --git a/packages/meteor-tool/package.js b/packages/meteor-tool/package.js index aa5d6ee05c..88f7661c70 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: "3.3.0-rc.0", + version: "3.3.0", }); Package.includeTool(); diff --git a/packages/meteor/package.js b/packages/meteor/package.js index ba42dda54e..9b7ca6575a 100644 --- a/packages/meteor/package.js +++ b/packages/meteor/package.js @@ -2,7 +2,7 @@ Package.describe({ summary: "Core Meteor environment", - version: '2.1.1-rc330.0', + version: '2.1.1', }); Package.registerBuildPlugin({ diff --git a/packages/minifier-js/package.js b/packages/minifier-js/package.js index b6b4015189..310391016c 100644 --- a/packages/minifier-js/package.js +++ b/packages/minifier-js/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "JavaScript minifier", - version: '3.0.2-rc330.0', + version: '3.0.2', }); Npm.depends({ diff --git a/packages/modern-browsers/package.js b/packages/modern-browsers/package.js index 9cf0d19537..5187b13a29 100644 --- a/packages/modern-browsers/package.js +++ b/packages/modern-browsers/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'modern-browsers', - version: '0.2.2-rc330.0', + version: '0.2.2', summary: 'API for defining the boundary between modern and legacy ' + 'JavaScript clients', diff --git a/packages/mongo/package.js b/packages/mongo/package.js index 41d1b1d670..cefaf18449 100644 --- a/packages/mongo/package.js +++ b/packages/mongo/package.js @@ -9,7 +9,7 @@ Package.describe({ summary: "Adaptor for using MongoDB and Minimongo over DDP", - version: "2.1.2-rc330.0", + version: "2.1.2", }); Npm.depends({ diff --git a/packages/non-core/coffeescript-compiler/package.js b/packages/non-core/coffeescript-compiler/package.js index 34edf35666..c0ff2e50d8 100644 --- a/packages/non-core/coffeescript-compiler/package.js +++ b/packages/non-core/coffeescript-compiler/package.js @@ -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-rc330.0', + version: '2.4.2', }); Npm.depends({ diff --git a/packages/non-core/coffeescript/package.js b/packages/non-core/coffeescript/package.js index 0039780580..63448dadfc 100644 --- a/packages/non-core/coffeescript/package.js +++ b/packages/non-core/coffeescript/package.js @@ -6,12 +6,12 @@ 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.3-rc330.0', + version: '2.7.3', }); Package.registerBuildPlugin({ name: 'compile-coffeescript', - use: ['caching-compiler@2.0.1', 'ecmascript@0.16.11-rc330.0', 'coffeescript-compiler@2.4.2-rc330.0'], + use: ['caching-compiler@2.0.1', 'ecmascript@0.16.11', 'coffeescript-compiler@2.4.2'], sources: ['compile-coffeescript.js'], npmDependencies: { // A breaking change was introduced in @babel/runtime@7.0.0-beta.56 diff --git a/packages/server-render/package.js b/packages/server-render/package.js index 61b82678f7..e71142714a 100644 --- a/packages/server-render/package.js +++ b/packages/server-render/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "server-render", - version: '0.4.3-rc330.0', + version: '0.4.3', summary: "Generic support for server-side rendering in Meteor apps", documentation: "README.md" }); diff --git a/packages/socket-stream-client/package.js b/packages/socket-stream-client/package.js index 48c572721f..28b94f29df 100644 --- a/packages/socket-stream-client/package.js +++ b/packages/socket-stream-client/package.js @@ -1,6 +1,6 @@ Package.describe({ name: "socket-stream-client", - version: '0.6.1-rc330.0', + version: '0.6.1', summary: "Provides the ClientStream abstraction used by ddp-client", documentation: "README.md" }); diff --git a/packages/standard-minifier-js/package.js b/packages/standard-minifier-js/package.js index 16022deea1..cbb25a00bb 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: '3.1.0-rc330.0', + version: '3.1.0', summary: 'Standard javascript minifiers used with Meteor apps by default.', documentation: 'README.md', }); diff --git a/packages/typescript/package.js b/packages/typescript/package.js index 2557b86b6b..b84968210d 100644 --- a/packages/typescript/package.js +++ b/packages/typescript/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'typescript', - version: '5.6.4-rc330.0', + version: '5.6.4', summary: 'Compiler plugin that compiles TypeScript and ECMAScript in .ts and .tsx files', documentation: 'README.md', diff --git a/packages/webapp/package.js b/packages/webapp/package.js index c0104ba167..1765555052 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -1,6 +1,6 @@ Package.describe({ summary: "Serves a Meteor app over HTTP", - version: "2.0.7-rc330.0", + version: "2.0.7", }); Npm.depends({ diff --git a/poc-change-stream/.gitignore b/poc-change-stream/.gitignore deleted file mode 100644 index c2658d7d1b..0000000000 --- a/poc-change-stream/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/poc-change-stream/.meteor/.finished-upgraders b/poc-change-stream/.meteor/.finished-upgraders deleted file mode 100644 index c07b6ff75a..0000000000 --- a/poc-change-stream/.meteor/.finished-upgraders +++ /dev/null @@ -1,19 +0,0 @@ -# This file contains information which helps Meteor properly upgrade your -# app when you run 'meteor update'. You should check it into version control -# with your project. - -notices-for-0.9.0 -notices-for-0.9.1 -0.9.4-platform-file -notices-for-facebook-graph-api-2 -1.2.0-standard-minifiers-package -1.2.0-meteor-platform-split -1.2.0-cordova-changes -1.2.0-breaking-changes -1.3.0-split-minifiers-package -1.4.0-remove-old-dev-bundle-link -1.4.1-add-shell-server-package -1.4.3-split-account-service-packages -1.5-add-dynamic-import-package -1.7-split-underscore-from-meteor-base -1.8.3-split-jquery-from-blaze diff --git a/poc-change-stream/.meteor/.gitignore b/poc-change-stream/.meteor/.gitignore deleted file mode 100644 index 4083037423..0000000000 --- a/poc-change-stream/.meteor/.gitignore +++ /dev/null @@ -1 +0,0 @@ -local diff --git a/poc-change-stream/.meteor/.id b/poc-change-stream/.meteor/.id deleted file mode 100644 index a8d28fde38..0000000000 --- a/poc-change-stream/.meteor/.id +++ /dev/null @@ -1,7 +0,0 @@ -# This file contains a token that is unique to your project. -# Check it into your repository along with the rest of this directory. -# It can be used for purposes such as: -# - ensuring you don't accidentally deploy one app on top of another -# - providing package authors with aggregated statistics - -bcz0tmc9rqc5.c9gmawc30z7b diff --git a/poc-change-stream/.meteor/packages b/poc-change-stream/.meteor/packages deleted file mode 100644 index 84c8c0103d..0000000000 --- a/poc-change-stream/.meteor/packages +++ /dev/null @@ -1,21 +0,0 @@ -# Meteor packages used by this project, one per line. -# Check this file (and the other files in this directory) into your repository. -# -# 'meteor add' and 'meteor remove' will edit this file for you, -# but you can also edit it by hand. - -meteor-base@1.5.2 # Packages every Meteor app needs to have -mobile-experience@1.1.2 # Packages for a great mobile UX -mongo@2.1.1 # The database Meteor supports right now -reactive-var@1.0.13 # Reactive variable for tracker - -standard-minifier-css@1.9.3 # CSS minifier run for production mode -standard-minifier-js@3.0.0 # JS minifier run for production mode -es5-shim@4.8.1 # ECMAScript 5 compatibility for older browsers -ecmascript@0.16.10 # Enable ECMAScript2015+ syntax in app code -typescript@5.6.3 # Enable TypeScript syntax in .ts and .tsx modules -shell-server@0.6.1 # Server-side component of the `meteor shell` command -hot-module-replacement@0.5.4 # Update client in development without reloading the page - -static-html@1.4.0 # Define static page content in .html files -react-meteor-data # React higher-order component for reactively tracking Meteor data diff --git a/poc-change-stream/.meteor/platforms b/poc-change-stream/.meteor/platforms deleted file mode 100644 index efeba1b50c..0000000000 --- a/poc-change-stream/.meteor/platforms +++ /dev/null @@ -1,2 +0,0 @@ -server -browser diff --git a/poc-change-stream/.meteor/release b/poc-change-stream/.meteor/release deleted file mode 100644 index af3560b553..0000000000 --- a/poc-change-stream/.meteor/release +++ /dev/null @@ -1 +0,0 @@ -METEOR@3.2.2 diff --git a/poc-change-stream/.meteor/versions b/poc-change-stream/.meteor/versions deleted file mode 100644 index 42710bab84..0000000000 --- a/poc-change-stream/.meteor/versions +++ /dev/null @@ -1,68 +0,0 @@ -allow-deny@2.1.0 -autoupdate@2.0.0 -babel-compiler@7.11.3 -babel-runtime@1.5.2 -base64@1.0.13 -binary-heap@1.0.12 -boilerplate-generator@2.0.0 -caching-compiler@2.0.1 -callback-hook@1.6.0 -check@1.4.4 -core-runtime@1.0.0 -ddp@1.4.2 -ddp-client@3.1.0 -ddp-common@1.4.4 -ddp-server@3.1.2 -diff-sequence@1.1.3 -dynamic-import@0.7.4 -ecmascript@0.16.10 -ecmascript-runtime@0.8.3 -ecmascript-runtime-client@0.12.3 -ecmascript-runtime-server@0.11.1 -ejson@1.1.4 -es5-shim@4.8.1 -facts-base@1.0.2 -fetch@0.1.6 -geojson-utils@1.0.12 -hot-code-push@1.0.5 -hot-module-replacement@0.5.4 -id-map@1.2.0 -inter-process-messaging@0.1.2 -launch-screen@2.0.1 -logging@1.3.6 -meteor@2.1.0 -meteor-base@1.5.2 -minifier-css@2.0.1 -minifier-js@3.0.1 -minimongo@2.0.2 -mobile-experience@1.1.2 -mobile-status-bar@1.1.1 -modern-browsers@0.2.1 -modules@0.20.3 -modules-runtime@0.13.2 -modules-runtime-hot@0.14.3 -mongo@2.1.1 -mongo-decimal@0.2.0 -mongo-dev-server@1.1.1 -mongo-id@1.0.9 -npm-mongo@6.10.2 -ordered-dict@1.2.0 -promise@1.0.0 -random@1.2.2 -react-fast-refresh@0.2.9 -react-meteor-data@3.0.4 -reactive-var@1.0.13 -reload@1.3.2 -retry@1.1.1 -routepolicy@1.1.2 -shell-server@0.6.1 -socket-stream-client@0.6.0 -standard-minifier-css@1.9.3 -standard-minifier-js@3.0.0 -static-html@1.4.0 -static-html-tools@1.0.0 -tracker@1.3.4 -typescript@5.6.3 -webapp@2.0.6 -webapp-hashing@1.1.2 -zodern:types@1.0.13 diff --git a/poc-change-stream/client/main.css b/poc-change-stream/client/main.css deleted file mode 100644 index 7f354f0fa7..0000000000 --- a/poc-change-stream/client/main.css +++ /dev/null @@ -1,4 +0,0 @@ -body { - padding: 10px; - font-family: sans-serif; -} diff --git a/poc-change-stream/client/main.html b/poc-change-stream/client/main.html deleted file mode 100644 index c0138a665f..0000000000 --- a/poc-change-stream/client/main.html +++ /dev/null @@ -1,7 +0,0 @@ - - Meteor App - - - -
- diff --git a/poc-change-stream/client/main.jsx b/poc-change-stream/client/main.jsx deleted file mode 100644 index d2e380f93c..0000000000 --- a/poc-change-stream/client/main.jsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -import { createRoot } from 'react-dom/client'; -import { Meteor } from 'meteor/meteor'; -import { App } from '/imports/ui/App'; - -Meteor.startup(() => { - const container = document.getElementById('react-target'); - const root = createRoot(container); - root.render(); -}); diff --git a/poc-change-stream/imports/api/links.js b/poc-change-stream/imports/api/links.js deleted file mode 100644 index 2e5ba63122..0000000000 --- a/poc-change-stream/imports/api/links.js +++ /dev/null @@ -1,12 +0,0 @@ -import { Mongo } from 'meteor/mongo'; -import { Meteor } from 'meteor/meteor'; - -export const LinksCollection = new Mongo.Collection('links'); - -if (Meteor.isServer) { - Meteor.methods({ - 'links.insert'({ title, url }) { - return LinksCollection.insertAsync({ title, url, createdAt: new Date() }); - }, - }); -} diff --git a/poc-change-stream/imports/ui/App.jsx b/poc-change-stream/imports/ui/App.jsx deleted file mode 100644 index 6f7340caf9..0000000000 --- a/poc-change-stream/imports/ui/App.jsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import { Hello } from './Hello.jsx'; -import { Info } from './Info.jsx'; - -export const App = () => ( -
-

Welcome to Meteor!

- - -
-); diff --git a/poc-change-stream/imports/ui/Hello.jsx b/poc-change-stream/imports/ui/Hello.jsx deleted file mode 100644 index 936b115062..0000000000 --- a/poc-change-stream/imports/ui/Hello.jsx +++ /dev/null @@ -1,21 +0,0 @@ -import React, { useState } from 'react'; -import { Meteor } from 'meteor/meteor'; - -export const Hello = () => { - const [counter, setCounter] = useState(0); - - const increment = () => { - setCounter(counter + 1); - Meteor.call('links.insert', { - title: `Link #${counter + 1}`, - url: `https://example.com/${counter + 1}`, - }); - }; - - return ( -
- -

You've pressed the button {counter} times.

-
- ); -}; diff --git a/poc-change-stream/imports/ui/Info.jsx b/poc-change-stream/imports/ui/Info.jsx deleted file mode 100644 index de535ec469..0000000000 --- a/poc-change-stream/imports/ui/Info.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { useTracker } from 'meteor/react-meteor-data'; -import { LinksCollection } from '../api/links'; - -export const Info = () => { - const { links, isLoading } = useTracker(() => { - const handle = Meteor.subscribe('links'); - return { - links: LinksCollection.find().fetch(), - isLoading: !handle.ready(), - }; - }, []); - - if (isLoading) { - return
Loading...
; - } - - return ( -
-

Learn Meteor!

- -
- ); -}; diff --git a/poc-change-stream/package-lock.json b/poc-change-stream/package-lock.json deleted file mode 100644 index ce7aa8250c..0000000000 --- a/poc-change-stream/package-lock.json +++ /dev/null @@ -1,1369 +0,0 @@ -{ - "name": "meteor-app", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "meteor-app", - "dependencies": { - "@babel/runtime": "^7.20.7", - "meteor-node-stubs": "^1.2.5", - "react": "^18.2.0", - "react-dom": "^18.2.0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz", - "integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/meteor-node-stubs": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/meteor-node-stubs/-/meteor-node-stubs-1.2.19.tgz", - "integrity": "sha512-lryhEAPp7aysrC0j3XU1yTs92ktPQQhzQzLVz3OGQEZjL//iLhvJyeYNSvV01XJn6fXUXe48agossxniJkzYOQ==", - "bundleDependencies": [ - "@meteorjs/crypto-browserify", - "assert", - "browserify-zlib", - "buffer", - "console-browserify", - "constants-browserify", - "domain-browser", - "events", - "https-browserify", - "os-browserify", - "path-browserify", - "process", - "punycode", - "querystring-es3", - "readable-stream", - "stream-browserify", - "stream-http", - "string_decoder", - "timers-browserify", - "tty-browserify", - "url", - "util", - "vm-browserify" - ], - "license": "MIT", - "dependencies": { - "@meteorjs/crypto-browserify": "^3.12.1", - "assert": "^2.1.0", - "browserify-zlib": "^0.2.0", - "buffer": "^5.7.1", - "console-browserify": "^1.2.0", - "constants-browserify": "^1.0.0", - "domain-browser": "^4.23.0", - "events": "^3.3.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "^1.0.1", - "process": "^0.11.10", - "punycode": "^1.4.1", - "querystring-es3": "^0.2.1", - "readable-stream": "^3.6.2", - "stream-browserify": "^3.0.0", - "stream-http": "^3.2.0", - "string_decoder": "^1.3.0", - "timers-browserify": "^2.0.12", - "tty-browserify": "0.0.1", - "url": "^0.11.4", - "util": "^0.12.5", - "vm-browserify": "^1.1.2" - } - }, - "node_modules/meteor-node-stubs/node_modules/@meteorjs/browserify-sign": { - "version": "4.2.6", - "inBundle": true, - "license": "ISC", - "dependencies": { - "bn.js": "^5.2.1", - "brorand": "^1.1.0", - "browserify-rsa": "^4.1.0", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash-base": "~3.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1", - "parse-asn1": "^5.1.7", - "readable-stream": "^2.3.8", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/meteor-node-stubs/node_modules/@meteorjs/browserify-sign/node_modules/readable-stream": { - "version": "2.3.8", - "inBundle": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/meteor-node-stubs/node_modules/@meteorjs/browserify-sign/node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/@meteorjs/browserify-sign/node_modules/string_decoder": { - "version": "1.1.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/@meteorjs/browserify-sign/node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.1.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/@meteorjs/create-ecdh": { - "version": "4.0.5", - "inBundle": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/meteor-node-stubs/node_modules/@meteorjs/create-ecdh/node_modules/bn.js": { - "version": "4.12.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/@meteorjs/crypto-browserify": { - "version": "3.12.4", - "inBundle": true, - "license": "MIT", - "dependencies": { - "@meteorjs/browserify-sign": "^4.2.3", - "@meteorjs/create-ecdh": "^4.0.4", - "browserify-cipher": "^1.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "diffie-hellman": "^5.0.3", - "hash-base": "~3.0.4", - "inherits": "^2.0.4", - "pbkdf2": "^3.1.2", - "public-encrypt": "^4.0.3", - "randombytes": "^2.1.0", - "randomfill": "^1.0.4" - }, - "engines": { - "node": ">= 0.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/asn1.js": { - "version": "4.10.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/asn1.js/node_modules/bn.js": { - "version": "4.12.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/assert": { - "version": "2.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "is-nan": "^1.3.2", - "object-is": "^1.1.5", - "object.assign": "^4.1.4", - "util": "^0.12.5" - } - }, - "node_modules/meteor-node-stubs/node_modules/available-typed-arrays": { - "version": "1.0.7", - "inBundle": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/base64-js": { - "version": "1.5.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/bn.js": { - "version": "5.2.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/brorand": { - "version": "1.1.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/browserify-aes": { - "version": "1.2.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/meteor-node-stubs/node_modules/browserify-cipher": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/browserify-des": { - "version": "1.0.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/meteor-node-stubs/node_modules/browserify-rsa": { - "version": "4.1.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "bn.js": "^5.2.1", - "randombytes": "^2.1.0", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/meteor-node-stubs/node_modules/browserify-zlib": { - "version": "0.2.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "pako": "~1.0.5" - } - }, - "node_modules/meteor-node-stubs/node_modules/buffer": { - "version": "5.7.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/meteor-node-stubs/node_modules/buffer-xor": { - "version": "1.0.3", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/builtin-status-codes": { - "version": "3.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/call-bind": { - "version": "1.0.8", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/call-bound": { - "version": "1.0.4", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/cipher-base": { - "version": "1.0.6", - "inBundle": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/meteor-node-stubs/node_modules/console-browserify": { - "version": "1.2.0", - "inBundle": true - }, - "node_modules/meteor-node-stubs/node_modules/constants-browserify": { - "version": "1.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/core-util-is": { - "version": "1.0.3", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/create-hash": { - "version": "1.2.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/create-hmac": { - "version": "1.1.7", - "inBundle": true, - "license": "MIT", - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "node_modules/meteor-node-stubs/node_modules/define-data-property": { - "version": "1.1.4", - "inBundle": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/define-properties": { - "version": "1.2.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/des.js": { - "version": "1.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/diffie-hellman": { - "version": "5.0.3", - "inBundle": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/domain-browser": { - "version": "4.23.0", - "inBundle": true, - "license": "Artistic-2.0", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, - "node_modules/meteor-node-stubs/node_modules/dunder-proto": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/es-define-property": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/es-errors": { - "version": "1.3.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/es-object-atoms": { - "version": "1.1.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/events": { - "version": "3.3.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/meteor-node-stubs/node_modules/evp_bytestokey": { - "version": "1.0.3", - "inBundle": true, - "license": "MIT", - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/meteor-node-stubs/node_modules/for-each": { - "version": "0.3.5", - "inBundle": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/function-bind": { - "version": "1.1.2", - "inBundle": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/get-intrinsic": { - "version": "1.3.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/get-proto": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/gopd": { - "version": "1.2.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/has-property-descriptors": { - "version": "1.0.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/has-symbols": { - "version": "1.1.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/has-tostringtag": { - "version": "1.0.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/hash-base": { - "version": "3.0.5", - "inBundle": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.4", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/meteor-node-stubs/node_modules/hash.js": { - "version": "1.1.7", - "inBundle": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/meteor-node-stubs/node_modules/hasown": { - "version": "2.0.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/hmac-drbg": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/meteor-node-stubs/node_modules/https-browserify": { - "version": "1.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/ieee754": { - "version": "1.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "BSD-3-Clause" - }, - "node_modules/meteor-node-stubs/node_modules/inherits": { - "version": "2.0.4", - "inBundle": true, - "license": "ISC" - }, - "node_modules/meteor-node-stubs/node_modules/is-arguments": { - "version": "1.2.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/is-callable": { - "version": "1.2.7", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/is-generator-function": { - "version": "1.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/is-nan": { - "version": "1.3.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/is-regex": { - "version": "1.2.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/is-typed-array": { - "version": "1.1.15", - "inBundle": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/isarray": { - "version": "1.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/math-intrinsics": { - "version": "1.1.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/md5.js": { - "version": "1.3.5", - "inBundle": true, - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/meteor-node-stubs/node_modules/miller-rabin": { - "version": "4.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "bin": { - "miller-rabin": "bin/miller-rabin" - } - }, - "node_modules/meteor-node-stubs/node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.12.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/minimalistic-assert": { - "version": "1.0.1", - "inBundle": true, - "license": "ISC" - }, - "node_modules/meteor-node-stubs/node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/object-inspect": { - "version": "1.13.4", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/object-is": { - "version": "1.1.6", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/object-keys": { - "version": "1.1.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/object.assign": { - "version": "4.1.7", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/os-browserify": { - "version": "0.3.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/pako": { - "version": "1.0.11", - "inBundle": true, - "license": "(MIT AND Zlib)" - }, - "node_modules/meteor-node-stubs/node_modules/parse-asn1": { - "version": "5.1.7", - "inBundle": true, - "license": "ISC", - "dependencies": { - "asn1.js": "^4.10.1", - "browserify-aes": "^1.2.0", - "evp_bytestokey": "^1.0.3", - "hash-base": "~3.0", - "pbkdf2": "^3.1.2", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/meteor-node-stubs/node_modules/path-browserify": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/pbkdf2": { - "version": "3.1.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/meteor-node-stubs/node_modules/possible-typed-array-names": { - "version": "1.1.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/process": { - "version": "0.11.10", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/process-nextick-args": { - "version": "2.0.1", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/public-encrypt": { - "version": "4.0.3", - "inBundle": true, - "license": "MIT", - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/meteor-node-stubs/node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.12.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/punycode": { - "version": "1.4.1", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/qs": { - "version": "6.14.0", - "inBundle": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/querystring-es3": { - "version": "0.2.1", - "inBundle": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/meteor-node-stubs/node_modules/randombytes": { - "version": "2.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/randomfill": { - "version": "1.0.4", - "inBundle": true, - "license": "MIT", - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/readable-stream": { - "version": "3.6.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/meteor-node-stubs/node_modules/ripemd160": { - "version": "2.0.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/meteor-node-stubs/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/safe-regex-test": { - "version": "1.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/set-function-length": { - "version": "1.2.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/setimmediate": { - "version": "1.0.5", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/sha.js": { - "version": "2.4.11", - "inBundle": true, - "license": "(MIT AND BSD-3-Clause)", - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/meteor-node-stubs/node_modules/side-channel": { - "version": "1.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/side-channel-list": { - "version": "1.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/side-channel-map": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/side-channel-weakmap": { - "version": "1.0.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/stream-browserify": { - "version": "3.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/stream-http": { - "version": "3.2.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "xtend": "^4.0.2" - } - }, - "node_modules/meteor-node-stubs/node_modules/string_decoder": { - "version": "1.3.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/timers-browserify": { - "version": "2.0.12", - "inBundle": true, - "license": "MIT", - "dependencies": { - "setimmediate": "^1.0.4" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/meteor-node-stubs/node_modules/tty-browserify": { - "version": "0.0.1", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/url": { - "version": "0.11.4", - "inBundle": true, - "license": "MIT", - "dependencies": { - "punycode": "^1.4.1", - "qs": "^6.12.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/meteor-node-stubs/node_modules/util": { - "version": "0.12.5", - "inBundle": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, - "node_modules/meteor-node-stubs/node_modules/util-deprecate": { - "version": "1.0.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/vm-browserify": { - "version": "1.1.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/meteor-node-stubs/node_modules/which-typed-array": { - "version": "1.1.19", - "inBundle": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meteor-node-stubs/node_modules/xtend": { - "version": "4.0.2", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" - }, - "peerDependencies": { - "react": "^18.3.1" - } - }, - "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } - } - } -} diff --git a/poc-change-stream/package.json b/poc-change-stream/package.json deleted file mode 100644 index 05d9123f03..0000000000 --- a/poc-change-stream/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "meteor-app", - "private": true, - "scripts": { - "start": "meteor run", - "test": "meteor test --once --driver-package meteortesting:mocha", - "test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha", - "visualize": "meteor --production --extra-packages bundle-visualizer" - }, - "dependencies": { - "@babel/runtime": "^7.20.7", - "meteor-node-stubs": "^1.2.5", - "react": "^18.2.0", - "react-dom": "^18.2.0" - }, - "meteor": { - "mainModule": { - "client": "client/main.jsx", - "server": "server/main.js" - }, - "testModule": "tests/main.js" - } -} diff --git a/poc-change-stream/server/main.js b/poc-change-stream/server/main.js deleted file mode 100644 index 1af7d66ed7..0000000000 --- a/poc-change-stream/server/main.js +++ /dev/null @@ -1,61 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { LinksCollection } from '/imports/api/links'; - -async function insertLink({ title, url }) { - await LinksCollection.insertAsync({ title, url, createdAt: new Date() }); -} - -Meteor.startup(async () => { - console.log('[Startup] Meteor server is starting...'); - // If the Links collection is empty, add some data. - const count = await LinksCollection.find().countAsync(); - console.log(`[Startup] LinksCollection count: ${count}`); - if (count === 0) { - await insertLink({ - title: 'Do the Tutorial', - url: 'https://www.meteor.com/tutorials/react/creating-an-app', - }); - await insertLink({ - title: 'Follow the Guide', - url: 'https://guide.meteor.com', - }); - await insertLink({ - title: 'Read the Docs', - url: 'https://docs.meteor.com', - }); - await insertLink({ - title: 'Discussions', - url: 'https://forums.meteor.com', - }); - console.log('[Startup] Initial links inserted.'); - } - - Meteor.publish("links", function () { - console.log('[Publish] links publication requested'); - return LinksCollection.find(); - }); - - // Inicia o Change Stream após o Meteor estar pronto e conectado ao banco - try { - console.log('[ChangeStream] Tentando iniciar Change Stream...'); - const changeStream = LinksCollection.watchChangeStream([ - { $match: { operationType: 'insert' } } - ]); - console.log('[ChangeStream] Change Stream iniciado:', !!changeStream); - changeStream.on('change', (change) => { - console.log('[ChangeStream] Evento detectado:', JSON.stringify(change, null, 2)); - }); - changeStream.on('error', (err) => { - console.error('[ChangeStream] Erro:', err); - }); - changeStream.on('close', () => { - console.log('[ChangeStream] Fechado'); - }); - changeStream.on('message', (message) => { - console.log('[ChangeStream] Mensagem:', message); - }); - console.log('[ChangeStream] Change Stream configurado com sucesso.'); - } catch (e) { - console.error('[ChangeStream] Erro ao iniciar Change Stream:', e); - } -}); diff --git a/poc-change-stream/tests/main.js b/poc-change-stream/tests/main.js deleted file mode 100644 index 13106983d6..0000000000 --- a/poc-change-stream/tests/main.js +++ /dev/null @@ -1,20 +0,0 @@ -import assert from "assert"; - -describe("meteor-app", function () { - it("package.json has correct name", async function () { - const { name } = await import("../package.json"); - assert.strictEqual(name, "meteor-app"); - }); - - if (Meteor.isClient) { - it("client is not server", function () { - assert.strictEqual(Meteor.isServer, false); - }); - } - - if (Meteor.isServer) { - it("server is not client", function () { - assert.strictEqual(Meteor.isClient, false); - }); - } -}); diff --git a/scripts/admin/meteor-release-official.json b/scripts/admin/meteor-release-official.json index b400aa57fd..75cf5a5520 100644 --- a/scripts/admin/meteor-release-official.json +++ b/scripts/admin/meteor-release-official.json @@ -1,6 +1,6 @@ { "track": "METEOR", - "version": "3.2.2", + "version": "3.3", "recommended": false, "official": true, "description": "The Official Meteor Distribution" diff --git a/v3-docs/docs/generators/changelog/versions/3.3.0.md b/v3-docs/docs/generators/changelog/versions/3.3.0.md index ae85eff257..49eba103db 100644 --- a/v3-docs/docs/generators/changelog/versions/3.3.0.md +++ b/v3-docs/docs/generators/changelog/versions/3.3.0.md @@ -1,4 +1,4 @@ -## v3.3.0, 2025-05-28 +## v3.3.0, 2025-06-11 ### Highlights @@ -17,7 +17,7 @@ All Merged PRs@[GitHub PRs 3.3](https://github.com/meteor/meteor/pulls?q=is%3Apr+is%3Amerged+base%3Arelease-3.3) -React Packages Changelog: [react-meteor-data@4.0.0-beta.0](https://github.com/meteor/react-packages/blob/fb73eeb89ff59664a7a01769fa1c2c880e72a3e5/packages/react-meteor-data/CHANGELOG.md#v400-beta0-xxx) +React Packages Changelog: [react-meteor-data@4.0.0](https://github.com/meteor/react-packages/tree/master/packages/react-meteor-data/CHANGELOG.md#v400-2025-06-11) #### Breaking Changes @@ -26,7 +26,7 @@ React Packages Changelog: [react-meteor-data@4.0.0-beta.0](https://github.com/me - Set `METEOR_WATCH_FORCE_POLLING=true` to enable polling. - Set `METEOR_WATCH_POLLING_INTERVAL_MS=1000` to adjust the interval. -- `react-meteor-data@4.0.0-beta.0` +- `react-meteor-data@4.0.0` - Independent from the core, only applies if upgraded manually. - useFind describes no deps by default [PR#431](https://github.com/meteor/react-packages/pull/431) @@ -41,13 +41,13 @@ React Packages Changelog: [react-meteor-data@4.0.0-beta.0](https://github.com/me Please run the following command to update your project: ```bash -meteor update --release 3.3-beta.1 +meteor update --release 3.3 ``` To apply react-meteor-data changes: ```bash -meteor add react-meteor-data@4.0.0-beta.0 +meteor add react-meteor-data@4.0.0 ``` **Add this to your `package.json` to enable the new modern build stack:** @@ -62,24 +62,24 @@ meteor add react-meteor-data@4.0.0-beta.0 #### Bumped Meteor Packages -- accounts-base@3.1.1-rc330.0 -- accounts-password@3.2.0-rc330.0 -- autoupdate@2.0.1-rc330.0 -- babel-compiler@7.12.0-rc330.0 -- boilerplate-generator@2.0.1-rc330.0 -- ddp-client@3.1.1-rc330.0 -- ecmascript@0.16.11-rc330.0 -- ejson@1.1.5-rc330.0 -- meteor@2.1.1-rc330.0 -- minifier-js@3.0.2-rc330.0 -- modern-browsers@0.2.2-rc330.0 -- mongo@2.1.2-rc330.0 -- server-render@0.4.3-rc330.0 -- socket-stream-client@0.6.1-rc330.0 -- standard-minifier-js@3.1.0-rc330.0 -- typescript@5.6.4-rc330.0 -- webapp@2.0.7-rc330.0 -- meteor-tool@3.3.0-rc.0 +- accounts-base@3.1.1 +- accounts-password@3.2.0 +- autoupdate@2.0.1 +- babel-compiler@7.12.0 +- boilerplate-generator@2.0.1 +- ddp-client@3.1.1 +- ecmascript@0.16.11 +- ejson@1.1.5 +- meteor@2.1.1 +- minifier-js@3.0.2 +- modern-browsers@0.2.2 +- mongo@2.1.2 +- server-render@0.4.3 +- socket-stream-client@0.6.1 +- standard-minifier-js@3.1.0 +- typescript@5.6.4 +- webapp@2.0.7 +- meteor-tool@3.3.0 #### Bumped NPM Packages diff --git a/v3-docs/docs/history.md b/v3-docs/docs/history.md index 51a95aeaf3..432b3d126e 100644 --- a/v3-docs/docs/history.md +++ b/v3-docs/docs/history.md @@ -10,7 +10,7 @@ This is a complete history of changes for Meteor releases. [//]: # (go to meteor/docs/generators/changelog/docs) -## v3.3.0, 2025-05-28 +## v3.3.0, 2025-06-11 ### Highlights @@ -29,16 +29,16 @@ This is a complete history of changes for Meteor releases. All Merged PRs@[GitHub PRs 3.3](https://github.com/meteor/meteor/pulls?q=is%3Apr+is%3Amerged+base%3Arelease-3.3) -React Packages Changelog: [react-meteor-data@4.0.0-beta.0](https://github.com/meteor/react-packages/blob/fb73eeb89ff59664a7a01769fa1c2c880e72a3e5/packages/react-meteor-data/CHANGELOG.md#v400-beta0-xxx) +React Packages Changelog: [react-meteor-data@4.0.0](https://github.com/meteor/react-packages/tree/master/packages/react-meteor-data/CHANGELOG.md#v400-2025-06-11) #### Breaking Changes - File watching strategy switched to `@parcel/watcher` - - Most setups should be fine, but if issues appear, like when using WSL with host, volumes, or remote setups—switch to polling. - - Set `METEOR_WATCH_FORCE_POLLING=true` to enable polling. - - Set `METEOR_WATCH_POLLING_INTERVAL_MS=1000` to adjust the interval. + - Most setups should be fine, but if issues appear, like when using WSL with host, volumes, or remote setups—switch to polling. + - Set `METEOR_WATCH_FORCE_POLLING=true` to enable polling. + - Set `METEOR_WATCH_POLLING_INTERVAL_MS=1000` to adjust the interval. -- `react-meteor-data@4.0.0-beta.0` +- `react-meteor-data@4.0.0` - Independent from the core, only applies if upgraded manually. - useFind describes no deps by default [PR#431](https://github.com/meteor/react-packages/pull/431) @@ -53,13 +53,13 @@ React Packages Changelog: [react-meteor-data@4.0.0-beta.0](https://github.com/me Please run the following command to update your project: ```bash -meteor update --release 3.3-beta.1 +meteor update --release 3.3 ``` To apply react-meteor-data changes: ```bash -meteor add react-meteor-data@4.0.0-beta.0 +meteor add react-meteor-data@4.0.0 ``` **Add this to your `package.json` to enable the new modern build stack:** @@ -74,24 +74,24 @@ meteor add react-meteor-data@4.0.0-beta.0 #### Bumped Meteor Packages -- accounts-base@3.1.1-rc330.0 -- accounts-password@3.2.0-rc330.0 -- autoupdate@2.0.1-rc330.0 -- babel-compiler@7.12.0-rc330.0 -- boilerplate-generator@2.0.1-rc330.0 -- ddp-client@3.1.1-rc330.0 -- ecmascript@0.16.11-rc330.0 -- ejson@1.1.5-rc330.0 -- meteor@2.1.1-rc330.0 -- minifier-js@3.0.2-rc330.0 -- modern-browsers@0.2.2-rc330.0 -- mongo@2.1.2-rc330.0 -- server-render@0.4.3-rc330.0 -- socket-stream-client@0.6.1-rc330.0 -- standard-minifier-js@3.1.0-rc330.0 -- typescript@5.6.4-rc330.0 -- webapp@2.0.7-rc330.0 -- meteor-tool@3.3.0-rc.0 +- accounts-base@3.1.1 +- accounts-password@3.2.0 +- autoupdate@2.0.1 +- babel-compiler@7.12.0 +- boilerplate-generator@2.0.1 +- ddp-client@3.1.1 +- ecmascript@0.16.11 +- ejson@1.1.5 +- meteor@2.1.1 +- minifier-js@3.0.2 +- modern-browsers@0.2.2 +- mongo@2.1.2 +- server-render@0.4.3 +- socket-stream-client@0.6.1 +- standard-minifier-js@3.1.0 +- typescript@5.6.4 +- webapp@2.0.7 +- meteor-tool@3.3.0 #### Bumped NPM Packages @@ -101,9 +101,9 @@ meteor add react-meteor-data@4.0.0-beta.0 ✨✨✨ -- [@nachocodoner](https://github.com/nachocodoner) +- [@nachocodoner](https://github.com/nachocodoner) - [@italojs](https://github.com/italojs) -- [@Grubba27](https://github.com/Grubba27) +- [@Grubba27](https://github.com/Grubba27) - [@zodern](https://github.com/zodern) - [@9Morello](https://github.com/9Morello) - [@welkinwong](https://github.com/welkinwong) @@ -113,7 +113,7 @@ meteor add react-meteor-data@4.0.0-beta.0 - [@ericm546](https://github.com/ericm546) - [@StorytellerCZ](https://github.com/StorytellerCZ) -✨✨✨ +✨✨✨ ## v3.2.2, 2025-05-02 From 6dbc0dc6b1ee6a8d93236ff775d96350b9b46686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Thu, 12 Jun 2025 16:31:39 +0200 Subject: [PATCH 53/70] set properly latest Meteor 3.3 version --- v3-docs/v3-migration-docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3-docs/v3-migration-docs/index.md b/v3-docs/v3-migration-docs/index.md index 3a1b941e79..ea5839cdab 100644 --- a/v3-docs/v3-migration-docs/index.md +++ b/v3-docs/v3-migration-docs/index.md @@ -1,5 +1,5 @@ --- -meteor_version: 3.1.0 +meteor_version: 3.3 node_version: 22.16.0 npm_version: 10.9.2 --- From 79ebabaf5dee38d5b2df9e4dc2dd3b2dcfb49b42 Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Thu, 12 Jun 2025 17:57:46 -0300 Subject: [PATCH 54/70] Update CLI documentation for `meteor test-packages` command: enhance description, add detailed options, and provide usage examples for improved clarity and usability. --- v3-docs/docs/cli/index.md | 68 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index 41dd57aa63..8a059a8d51 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1412,13 +1412,71 @@ This system allows forks of the meteor tool to be published as packages, letting ::: -## meteor test-packages {meteortestpackages} +## meteor test-packages {#meteortestpackages} -Test Meteor packages, either by name, or by directory. Not specifying an -argument will run tests for all local packages. The results are displayed in an -app that runs at `localhost:3000` by default. If you need to, you can pass the -`--settings` and `--port` arguments. +Run tests for Meteor packages. +```bash +meteor test-packages [options] [package...] +``` + +### Description + +Runs unit tests for one or more packages. Test results appear in a browser dashboard that updates whenever relevant source files are modified. + +::: tip Package Specification +Packages can be specified by: +- **Name**: Resolved using the standard package search algorithm +- **Path**: Any argument containing a '/' is loaded from that directory path +::: + +If no packages are specified, all available packages will be tested. + +### Options + +| Option | Description | +|--------|-------------| +| `--port`, `-p ` | Port to listen on (default: 3000). Also uses ports N+1 and N+2 | +| `--open`, `-o` | Opens a browser window when the app starts | +| `--inspect[-brk][=]` | Enable server-side debugging (default port: 9229) | +| `--settings`, `-s ` | Set optional data for Meteor.settings on the server | +| `--production` | Simulate production mode (minify and bundle CSS, JS files) | +| `--driver-package ` | Test driver package to use (e.g., `meteortesting:mocha`) | +| `--verbose` | Print all output from build logs | +| `--no-lint` | Skip running linters on every test app rebuild | +| `--extra-packages ` | Run with additional packages (comma separated) | +| `--test-app-path ` | Set directory for temporary test app (default: system temp dir) | + +#### Mobile Testing Options + +| Option | Description | +|--------|-------------| +| `--ios`, `--android` | Run tests in an emulator | +| `--ios-device`, `--android-device` | Run tests on a connected device | +| `--mobile-server ` | Server location for mobile builds (default: local IP and port) | +| `--cordova-server-port ` | Local port where Cordova will serve content | + +### Examples + +```bash +# Test all local packages +meteor test-packages + +# Test specific packages by name +meteor test-packages accounts-base accounts-password + +# Test a package by path +meteor test-packages ./packages/my-package + +# Test with custom settings +meteor test-packages --settings settings.json + +# Test with Mocha test driver +meteor test-packages --driver-package meteortesting:mocha + +# Test on mobile device +meteor test-packages --ios-device +``` ## meteor admin {meteoradmin} From 10638df2ce2c8bb9a828e8fad091448f3175058f Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Thu, 12 Jun 2025 18:00:32 -0300 Subject: [PATCH 55/70] Update CLI documentation for `meteor admin` command: clarify command purpose, add detailed command list, and provide usage examples for better user guidance. --- v3-docs/docs/cli/index.md | 49 ++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index 8a059a8d51..ecf17a2bf8 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1478,14 +1478,51 @@ meteor test-packages --driver-package meteortesting:mocha meteor test-packages --ios-device ``` -## meteor admin {meteoradmin} +## meteor admin {#meteoradmin} -Catch-all for miscellaneous commands that require authorization to use. +Administrative commands for official Meteor services. -Some example uses of `meteor admin` include adding and removing package -maintainers and setting a homepage for a package. It also includes various -helpful functions for managing a Meteor release. Run `meteor help admin` for -more information. +```bash +meteor admin [args] +``` + +::: warning Authorization Required +These commands require authorization to use. +::: + +### Available Commands + +| Command | Description | +|---------|-------------| +| `maintainers` | View or change package maintainers | +| `recommend-release` | Recommend a previously published release | +| `change-homepage` | Change the homepage URL of a package | +| `list-organizations` | List the organizations of which you are a member | +| `members` | View or change the members of an organization | +| `get-machine` | Open an SSH shell to a machine in the Meteor build farm | + +### Usage Examples + +```bash +# View or change package maintainers +meteor admin maintainers packagename [add/remove] [username] + +# Change a package homepage +meteor admin change-homepage packagename [url] + +# List your organizations +meteor admin list-organizations + +# Manage organization members +meteor admin members organization-name [add/remove] [username] +``` + +::: tip Detailed Help +For more information on any admin command, run: +```bash +meteor help admin +``` +::: ## meteor shell {meteorshell} From 6ac1f8bb0a69c8bf6759d0105e0322b8e0d8af10 Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Thu, 12 Jun 2025 18:02:40 -0300 Subject: [PATCH 56/70] Enhance CLI documentation for `meteor shell` command: improve section structure, add detailed connection behavior and features, and provide example usage for better user understanding. --- v3-docs/docs/cli/index.md | 74 +++++++++++++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 15 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index ecf17a2bf8..f63b2b66eb 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1524,26 +1524,70 @@ meteor help admin ``` ::: -## meteor shell {meteorshell} +## meteor shell {#meteorshell} -When `meteor shell` is executed in an application directory where a server -is already running, it connects to the server and starts an interactive -shell for evaluating server-side code. +Start an interactive JavaScript shell for evaluating server-side code. -Multiple shells can be attached to the same server. If no server is -currently available, `meteor shell` will keep trying to connect until it -succeeds. +```bash +meteor shell +``` -Exiting the shell does not terminate the server. If the server restarts -because a change was made in server code, or a fatal exception was -encountered, the shell will restart along with the server. This behavior -can be simulated by typing `.reload` in the shell. +### Description -The shell supports tab completion for global variables like `Meteor`, -`Mongo`, and `Package`. Try typing `Meteor.is` and then pressing tab. +The `meteor shell` command connects to a running Meteor server and provides an interactive JavaScript REPL (Read-Eval-Print Loop) for executing server-side code. -The shell maintains a persistent history across sessions. Previously-run -commands can be accessed by pressing the up arrow. +::: tip Connection Behavior +- Requires a running Meteor server in the application directory +- If no server is available, it will keep trying to connect until successful +- Multiple shells can be attached to the same server simultaneously +::: + +### Features + +#### Server Integration + +- Exiting the shell does not terminate the server +- If the server restarts (due to code changes or errors), the shell will automatically restart with it +- You can manually trigger a reload by typing `.reload` in the shell + +#### Developer Experience + +| Feature | Description | +|---------|-------------| +| **Tab Completion** | Built-in tab completion for global variables like `Meteor`, `Mongo`, and `Package` | +| **Persistent History** | Command history is maintained across sessions | +| **Command Recall** | Access previously-run commands using the up arrow key | + +### Example Usage + +```bash +# Start a Meteor server in one terminal +meteor run + +# Connect a shell in another terminal +meteor shell + +# Now you can run server-side code interactively: +> Meteor.users.find().count() +> Package.mongo.Mongo.Collection.prototype +> Meteor.isServer +true +> .reload # Manually restart the shell +``` + +::: details Advanced Example +```js +// Query the database +> db = Package.mongo.MongoInternals.defaultRemoteCollectionDriver().mongo.db +> db.collection('users').find().toArray() + +// Access Meteor settings +> Meteor.settings.public + +// Inspect publications +> Object.keys(Meteor.server.publish_handlers) +``` +::: ## meteor npm {meteornpm} From 50c27ff33e92247ff7e1e3f4bdeaa1b6c01f2f3d Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Thu, 12 Jun 2025 18:05:56 -0300 Subject: [PATCH 57/70] Enhance CLI documentation for `meteor npm` command: restructure section, add detailed descriptions, common commands table, and usage examples to improve user understanding and clarity. --- v3-docs/docs/cli/index.md | 61 ++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index f63b2b66eb..63cd7cd258 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1589,28 +1589,55 @@ true ``` ::: -## meteor npm {meteornpm} +## meteor npm {#meteornpm} -The `meteor npm` command calls the -[`npm`](https://docs.npmjs.com/getting-started/what-is-npm) version bundled -with Meteor itself. +Run npm commands using Meteor's bundled npm version. -Additional parameters can be passed in the same way as the `npm` command -(e.g. `meteor npm rebuild`, `meteor npm ls`, etc.) and the -[npm documentation](https://docs.npmjs.com/) should be consulted for the -full list of commands and for a better understanding of their usage. +```bash +meteor npm [args...] +``` -For example, executing `meteor npm install lodash --save` would install `lodash` -from npm to your `node_modules` directory and save its usage in your -[`package.json`](https://docs.npmjs.com/files/package.json) file. +### Description -Using the `meteor npm ...` commands in place of traditional `npm ...` commands -is particularly important when using Node.js modules that have binary -dependencies that make native C calls (like [`bcrypt`](https://www.npmjs.com/package/bcrypt)) -because doing so ensures that they are built using the same libraries. +The `meteor npm` command executes [npm](https://docs.npmjs.com/) commands using the version bundled with Meteor itself. -Additionally, this access to the npm that comes with Meteor avoids the need to -download and install npm separately. +::: tip Benefits of Using Meteor's npm +1. Ensures compatibility with Meteor's Node.js version +2. Crucial for packages with native dependencies (like `bcrypt`) +3. No need to install npm separately +4. Consistent behavior across development environments +::: + +### Common Commands + +| Command | Description | +|---------|-------------| +| `meteor npm install` | Install all dependencies listed in `package.json` | +| `meteor npm install --save` | Install and save a package as a dependency | +| `meteor npm install --save-dev` | Install and save a package as a development dependency | +| `meteor npm update` | Update all packages to their latest allowed versions | +| `meteor npm ls` | List installed packages | +| `meteor npm rebuild` | Rebuild packages that have native dependencies | + +### Examples + +```bash +# Install a package and save to dependencies +meteor npm install lodash --save + +# Install packages from package.json +meteor npm install + +# Run an npm script defined in package.json +meteor npm run start + +# View package information +meteor npm info react +``` + +::: warning Native Dependencies +Using `meteor npm` instead of regular `npm` is especially important when working with packages that have binary dependencies making native C calls (like `bcrypt`). This ensures they're built with the same libraries used by Meteor. +::: ## meteor node {meteornode} From 0c4a4f65cad2b4a306b6358a27e29f45a2a5a857 Mon Sep 17 00:00:00 2001 From: Frederico Maia Date: Thu, 12 Jun 2025 18:06:38 -0300 Subject: [PATCH 58/70] Enhance CLI documentation for `meteor node` command: restructure section, add detailed descriptions, common uses table, and usage examples to improve user understanding and clarity. --- v3-docs/docs/cli/index.md | 63 +++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 15 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index 63cd7cd258..8e9f62a78e 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1639,23 +1639,56 @@ meteor npm info react Using `meteor npm` instead of regular `npm` is especially important when working with packages that have binary dependencies making native C calls (like `bcrypt`). This ensures they're built with the same libraries used by Meteor. ::: -## meteor node {meteornode} +## meteor node {#meteornode} -The `meteor node` command calls the -[`node`](https://nodejs.org) version bundled with Meteor itself. +Run Node.js commands using Meteor's bundled Node.js version. -> This is not to be confused with [`meteor shell`](#meteor-shell), which provides -> an almost identical experience but also gives you access to the "server" context -> of a Meteor application. Typically, `meteor shell` will be preferred. +```bash +meteor node [options] [script.js] [arguments] +``` -Additional parameters can be passed in the same way as the `node` command, and -the [Node.js documentation](https://nodejs.org/dist/latest-v4.x/docs/api/cli.html) -should be consulted for the full list of commands and for a better understanding -of their usage. +::: info Alternative +Consider using [`meteor shell`](#meteorshell) instead, which provides similar functionality plus access to your Meteor application's server context. +::: -For example, executing `meteor node` will enter the Node.js -[Read-Eval-Print-Loop (REPL)](https://nodejs.org/dist/latest-v4.x/docs/api/repl.html) -interface and allow you to interactively run JavaScript and see the results. +### Description -Executing `meteor node -e "console.log(process.versions)"` would -run `console.log(process.versions)` in the version of `node` bundled with Meteor. +The `meteor node` command runs [Node.js](https://nodejs.org/) using the version bundled with Meteor itself. + +### Common Uses + +| Command | Description | +|---------|-------------| +| `meteor node` | Start an interactive Node.js REPL | +| `meteor node script.js` | Execute a JavaScript file | +| `meteor node -e ""` | Execute a line of JavaScript | +| `meteor node --version` | Show Node.js version | + +### Examples + +```bash +# Start an interactive REPL +meteor node + +# Execute inline JavaScript +meteor node -e "console.log(process.versions)" + +# Run a script with arguments +meteor node scripts/migrate.js --force + +# Check installed Node.js version +meteor node --version +``` + +::: details Running a Simple Script +Create `hello.js`: +```js +console.log('Hello from Node.js version', process.version); +console.log('Arguments:', process.argv.slice(2)); +``` + +Run it: +```bash +meteor node hello.js arg1 arg2 +``` +::: From 1117a52d8470d84ebaf5a951848120b24551597b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Fri, 13 Jun 2025 18:06:05 +0200 Subject: [PATCH 59/70] fix docs --- v3-docs/docs/cli/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index 3bde9baba5..b05a129e16 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1488,7 +1488,6 @@ TINYTEST_FILTER=myTestName meteor test-packages # Test on mobile device meteor test-packages --ios-device -``` ## meteor admin {#meteoradmin} From 67fc97e60b7a931520cc8d6eb64410803a1c755f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Fri, 13 Jun 2025 18:08:14 +0200 Subject: [PATCH 60/70] fix docs --- v3-docs/docs/cli/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index b05a129e16..9fd95d1e86 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1465,19 +1465,19 @@ If no packages are specified, all available packages will be tested. ### Examples -# Test specific packages by name +#### Test specific packages by name meteor test-packages accounts-base accounts-password -# Test a package by path +#### Test a package by path meteor test-packages ./packages/my-package -# Test with custom settings +#### Test with custom settings meteor test-packages --settings settings.json -# Test with Mocha test driver +#### Test with Mocha test driver meteor test-packages --driver-package meteortesting:mocha -# Test with filter +#### Test with filter meteor test-packages --filter myTestName Alternatively, you can use the `TINYTEST_FILTER` environment variable to filter: @@ -1486,7 +1486,7 @@ Alternatively, you can use the `TINYTEST_FILTER` environment variable to filter: TINYTEST_FILTER=myTestName meteor test-packages ``` -# Test on mobile device +#### Test on mobile device meteor test-packages --ios-device ## meteor admin {#meteoradmin} From 4a17ce5897cf94f84efd8f93cfc14d1d42071588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Fri, 13 Jun 2025 18:08:54 +0200 Subject: [PATCH 61/70] fix docs --- v3-docs/docs/cli/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index 9fd95d1e86..a13af6c37a 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1464,7 +1464,6 @@ If no packages are specified, all available packages will be tested. ### Examples - #### Test specific packages by name meteor test-packages accounts-base accounts-password From 7f22966bb1c8e9ccc195f5d56579436cb567325e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Fri, 13 Jun 2025 18:10:14 +0200 Subject: [PATCH 62/70] fix docs --- v3-docs/docs/cli/index.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index a13af6c37a..809578932f 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1465,23 +1465,38 @@ If no packages are specified, all available packages will be tested. ### Examples #### Test specific packages by name + +```bash meteor test-packages accounts-base accounts-password +``` #### Test a package by path + +```bash meteor test-packages ./packages/my-package +``` #### Test with custom settings + +```bash meteor test-packages --settings settings.json +``` #### Test with Mocha test driver + +```bash meteor test-packages --driver-package meteortesting:mocha +``` #### Test with filter + +```bash meteor test-packages --filter myTestName +``` Alternatively, you can use the `TINYTEST_FILTER` environment variable to filter: -```sh +```bash TINYTEST_FILTER=myTestName meteor test-packages ``` From 0a3bc8fa566c03267da7376a77a3e62e4dda3b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Fri, 13 Jun 2025 18:14:28 +0200 Subject: [PATCH 63/70] fix docs --- v3-docs/docs/cli/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index 809578932f..c72bded0bc 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -1501,7 +1501,10 @@ TINYTEST_FILTER=myTestName meteor test-packages ``` #### Test on mobile device + +```bash meteor test-packages --ios-device +``` ## meteor admin {#meteoradmin} From 0fd982a8ac6c8378f968bb440cfdfc38f533f842 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Mon, 16 Jun 2025 10:07:53 -0300 Subject: [PATCH 64/70] DOCS: Update roadmap with 3.3 release + changes Update the roadmap to be in line with our current status (we have just released version 3.3) --- v3-docs/docs/about/roadmap.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/v3-docs/docs/about/roadmap.md b/v3-docs/docs/about/roadmap.md index 908a42d8d4..6934bfa419 100644 --- a/v3-docs/docs/about/roadmap.md +++ b/v3-docs/docs/about/roadmap.md @@ -4,7 +4,7 @@ Describes the high-level features and actions for the Meteor project in the near ## Introduction -**Last updated: March 31th, 2025.** +**Last updated: June 16, 2025.** The description of many items includes sentences and ideas from Meteor community members. @@ -34,25 +34,41 @@ Contributors are encouraged to focus their efforts on work that aligns with the **Goal:** Add a command([meteor profile](/cli/#meteorprofile)) to measure if our changes are actually making our builds faster and smaller. -#### Phase 2: External Transpiler Integration & Bundler Improvements +#### Phase 2: External Transpiler Integration -**Target Release:** 3.3 ⏳ +**Target Release:** 3.3 ✅ **Goal:** For this phase we want: - Improve our current bundler performance, via optimizations so that any meteor user can get benefits from it; And an external bundler could get the same benefits. - To have an external transpiler working with Meteor and producing a bundle that is smaller or faster than the current Meteor bundle. -#### Phase 3: HMR Improvements + +#### Phase 3: Bundler Improvements & feedback **Target Release:** 3.3.x ⏳ -**Goal:** Improve the HMR performance, so that it is faster and more reliable on what needs to be changed. +**Goal:** Improve the build size and make meteor use less resources for building, decreasing even more build and rebuild time. +- And updates based on the feedback from the community, so that we can have a better experience with our new transpiler(SWC). -#### Phase 4: Build Process Optimization +#### Phase 4: HMR Improvements **Target Release:** 3.4 ⏳ +**Goal:** Improve the HMR performance, so that it is faster and more reliable on what needs to be changed. + + +#### Phase 5: External Bundler integration + +**Target Release:** 3.4 ⏳ + +**Goal:** And an external bundler (like RSPack, ESBuild, or Rollup) working with Meteor and producing a bundle that is smaller or faster than the current Meteor bundle. +- This will also allow Meteor to have features like tree-shaking, code-splitting, and other optimizations that will make our apps leaner and faster. + +#### Phase 6: Build Process Optimization + +**Target Release:** 3.5 ⏳ + **Goal:** Improve the build size and make meteor use less resources for building, decreasing even more build and rebuild time. From a0c8bcb9b1e23d96552a76c72c62e9be22143e7c Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Mon, 16 Jun 2025 10:22:20 -0300 Subject: [PATCH 65/70] DOCS: update based on feedback --- v3-docs/docs/about/roadmap.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/v3-docs/docs/about/roadmap.md b/v3-docs/docs/about/roadmap.md index 6934bfa419..75e39f4c1d 100644 --- a/v3-docs/docs/about/roadmap.md +++ b/v3-docs/docs/about/roadmap.md @@ -44,20 +44,19 @@ Contributors are encouraged to focus their efforts on work that aligns with the - To have an external transpiler working with Meteor and producing a bundle that is smaller or faster than the current Meteor bundle. -#### Phase 3: Bundler Improvements & feedback +#### Phase 3: HMR Improvements + +**Target Release:** 3.3 ✅ + +**Goal:** Improve the HMR performance, so that it is faster and more reliable on what needs to be changed. + +#### Phase 4: Bundler Improvements & feedback **Target Release:** 3.3.x ⏳ **Goal:** Improve the build size and make meteor use less resources for building, decreasing even more build and rebuild time. - And updates based on the feedback from the community, so that we can have a better experience with our new transpiler(SWC). -#### Phase 4: HMR Improvements - -**Target Release:** 3.4 ⏳ - -**Goal:** Improve the HMR performance, so that it is faster and more reliable on what needs to be changed. - - #### Phase 5: External Bundler integration **Target Release:** 3.4 ⏳ @@ -67,7 +66,7 @@ Contributors are encouraged to focus their efforts on work that aligns with the #### Phase 6: Build Process Optimization -**Target Release:** 3.5 ⏳ +**Target Release:** 3.4.x ⏳ **Goal:** Improve the build size and make meteor use less resources for building, decreasing even more build and rebuild time. From af654df3dbe0b78ac47a70fb5d7961cbcb26b0c9 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Mon, 16 Jun 2025 10:28:52 -0300 Subject: [PATCH 66/70] DOCS: patch series more specifc --- v3-docs/docs/about/roadmap.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v3-docs/docs/about/roadmap.md b/v3-docs/docs/about/roadmap.md index 75e39f4c1d..282b3c003f 100644 --- a/v3-docs/docs/about/roadmap.md +++ b/v3-docs/docs/about/roadmap.md @@ -55,7 +55,7 @@ Contributors are encouraged to focus their efforts on work that aligns with the **Target Release:** 3.3.x ⏳ **Goal:** Improve the build size and make meteor use less resources for building, decreasing even more build and rebuild time. -- And updates based on the feedback from the community, so that we can have a better experience with our new transpiler(SWC). +- Expanding compatibility and updates based on the feedback from the community, so that we can have a better experience with our new build tools, in this case SWC #### Phase 5: External Bundler integration @@ -69,6 +69,7 @@ Contributors are encouraged to focus their efforts on work that aligns with the **Target Release:** 3.4.x ⏳ **Goal:** Improve the build size and make meteor use less resources for building, decreasing even more build and rebuild time. +- Expanding compatibility and updates based on the feedback from the community, so that we can have a better experience with our new build tools #### Documentation Strategy From 09947958592ab1d9c9601da94c43e9884e792bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Tue, 17 Jun 2025 17:30:29 +0200 Subject: [PATCH 67/70] Update transpiler-swc.md --- v3-docs/docs/about/modern-build-stack/transpiler-swc.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md index faee062d15..3b5595cea7 100644 --- a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md +++ b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md @@ -92,11 +92,11 @@ Or exclude only specific files like `.jsx`: } ``` -You can also use `excludePackages`, `excludeNodeModules`, and `excludeLegacy` for finer control. See the [`modernTranspiler` config docs](#config-api) for more. +You can also use `excludePackages`, `excludeNodeModules`, and `excludeLegacy` for finer control. See the [`modern.transpiler` config docs](#config-api) for more. When no plugin exists, these settings let you still get most of SWC’s speed benefits by limiting fallback use. -Most apps will benefit just by enabling `modernTranspiler: true`. Most Meteor packages should work right away, except ones using nested imports. Node modules will mostly work too, since they follow common standards. Most app code should also work unless it depends on Babel-specific behavior. +Most apps will benefit just by enabling `modern: true`. Most Meteor packages should work right away, except ones using nested imports. Node modules will mostly work too, since they follow common standards. Most app code should also work unless it depends on Babel-specific behavior. > Remember to turn off verbosity when you're done with optimizations. @@ -276,6 +276,6 @@ If you run into issues, try `meteor reset` or delete the `.meteor/local` folder For help or to report issues, post on [GitHub](https://github.com/meteor/meteor/issues) or the [Meteor forums](https://forums.meteor.com). We’re focused on making Meteor faster and your feedback helps. -You can compare performance before and after enabling `modernTranspiler` by running [`meteor profile`](../../cli/index.md#meteorprofile). Share your results to show progress to others. +You can compare performance before and after enabling `modern` by running [`meteor profile`](../../cli/index.md#meteorprofile). Share your results to show progress to others. > **[Check out modern bundler options](bundler.md) to improve performance and access newer build features.** From eaa9af78cdd4e694b3f07d92b12992c3fcd5f9d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 18 Jun 2025 18:50:58 +0200 Subject: [PATCH 68/70] Update transpiler-swc.md --- v3-docs/docs/about/modern-build-stack/transpiler-swc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md index 3b5595cea7..7fb8458375 100644 --- a/v3-docs/docs/about/modern-build-stack/transpiler-swc.md +++ b/v3-docs/docs/about/modern-build-stack/transpiler-swc.md @@ -110,7 +110,7 @@ You can also configure other options using the `.swcrc` format. One common case { "jsc": { "parser": { - "syntax": "emcascript", + "syntax": "ecmascript", "jsx": true } } From 10593a73799f7e58e9290cee49a6dacd8573c448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Fri, 20 Jun 2025 08:42:44 +0200 Subject: [PATCH 69/70] update changelog to include more steps for migration in 3.3 --- docs/history.md | 8 ++++++++ v3-docs/docs/generators/changelog/versions/3.3.0.md | 8 ++++++++ v3-docs/docs/history.md | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/docs/history.md b/docs/history.md index 7c142c2e11..46dfc890ae 100644 --- a/docs/history.md +++ b/docs/history.md @@ -70,6 +70,14 @@ meteor add react-meteor-data@4.0.0 > These settings are on by default for new apps. +On activate `modern` your app will be updated to use SWC transpiler. It will automatically fallback to Babel if your code can't be transpiled wit SWC. + +Check the docs for help with the SWC migration, especially if your project uses many Babel plugins. + +[Modern Transpiler: SWC docs](https://docs.meteor.com/about/modern-build-stack/transpiler-swc.html) + +If you find any issues, please report them to the [Meteor issues tracker](https://github.com/meteor/meteor). + #### Bumped Meteor Packages - accounts-base@3.1.1 diff --git a/v3-docs/docs/generators/changelog/versions/3.3.0.md b/v3-docs/docs/generators/changelog/versions/3.3.0.md index 49eba103db..f0c87c2962 100644 --- a/v3-docs/docs/generators/changelog/versions/3.3.0.md +++ b/v3-docs/docs/generators/changelog/versions/3.3.0.md @@ -60,6 +60,14 @@ meteor add react-meteor-data@4.0.0 > These settings are on by default for new apps. +On activate `modern` your app will be updated to use SWC transpiler. It will automatically fallback to Babel if your code can't be transpiled wit SWC. + +Check the docs for help with the SWC migration, especially if your project uses many Babel plugins. + +[Modern Transpiler: SWC docs](https://docs.meteor.com/about/modern-build-stack/transpiler-swc.html) + +If you find any issues, please report them to the [Meteor issues tracker](https://github.com/meteor/meteor). + #### Bumped Meteor Packages - accounts-base@3.1.1 diff --git a/v3-docs/docs/history.md b/v3-docs/docs/history.md index 432b3d126e..1ca5e8e2a9 100644 --- a/v3-docs/docs/history.md +++ b/v3-docs/docs/history.md @@ -72,6 +72,14 @@ meteor add react-meteor-data@4.0.0 > These settings are on by default for new apps. +On activate `modern` your app will be updated to use SWC transpiler. It will automatically fallback to Babel if your code can't be transpiled wit SWC. + +Check the docs for help with the SWC migration, especially if your project uses many Babel plugins. + +[Modern Transpiler: SWC docs](https://docs.meteor.com/about/modern-build-stack/transpiler-swc.html) + +If you find any issues, please report them to the [Meteor issues tracker](https://github.com/meteor/meteor). + #### Bumped Meteor Packages - accounts-base@3.1.1 From 018371ef65facdc0dc8eaf22e71af417ce483e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Fri, 20 Jun 2025 08:44:51 +0200 Subject: [PATCH 70/70] bump to 3.3 the installer --- npm-packages/meteor-installer/config.js | 2 +- npm-packages/meteor-installer/package-lock.json | 4 ++-- npm-packages/meteor-installer/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-packages/meteor-installer/config.js b/npm-packages/meteor-installer/config.js index 41c524300f..d820e33456 100644 --- a/npm-packages/meteor-installer/config.js +++ b/npm-packages/meteor-installer/config.js @@ -1,7 +1,7 @@ const os = require('os'); const path = require('path'); -const METEOR_LATEST_VERSION = '3.2'; +const METEOR_LATEST_VERSION = '3.3'; const sudoUser = process.env.SUDO_USER || ''; function isRoot() { return process.getuid && process.getuid() === 0; diff --git a/npm-packages/meteor-installer/package-lock.json b/npm-packages/meteor-installer/package-lock.json index 40e12504fa..a813defb08 100644 --- a/npm-packages/meteor-installer/package-lock.json +++ b/npm-packages/meteor-installer/package-lock.json @@ -1,12 +1,12 @@ { "name": "meteor", - "version": "3.2.0", + "version": "3.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "meteor", - "version": "3.2.0", + "version": "3.3.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/npm-packages/meteor-installer/package.json b/npm-packages/meteor-installer/package.json index 4f6ee73b6e..5be1ef790a 100644 --- a/npm-packages/meteor-installer/package.json +++ b/npm-packages/meteor-installer/package.json @@ -1,6 +1,6 @@ { "name": "meteor", - "version": "3.2.0", + "version": "3.3.0", "description": "Install Meteor", "main": "install.js", "scripts": {