From 5db21f4df656fb3f717dd56dd64667c574cc586e Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Mon, 29 Sep 2025 22:30:04 -0300 Subject: [PATCH 1/4] DEV: Flip `--raw-logs` to default true and add `--timestamps` option. --- tools/cli/commands.js | 17 +++++++---------- tools/cli/help.txt | 7 +++++-- v3-docs/docs/cli/index.md | 13 +++++++------ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/tools/cli/commands.js b/tools/cli/commands.js index d81c03ffb5..756ec007ae 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -451,7 +451,8 @@ var runCommandOptions = { ...inspectOptions, 'no-release-check': { type: Boolean }, production: { type: Boolean }, - 'raw-logs': { type: Boolean }, + 'raw-logs': { type: Boolean, default: true }, + timestamps: { type: Boolean, default: false }, // opposite of --raw-logs settings: { type: String, short: "s" }, verbose: { type: Boolean, short: "v" }, // With --once, meteor does not re-run the project if it crashes @@ -535,10 +536,7 @@ async function doRunCommand(options) { ); } - if (options['raw-logs']) { - runLog.setRawLogs(true); - } - + runLog.setRawLogs(!options['raw-logs'] && options.timestamps); let webArchs = projectContext.platformList.getWebArchs(); if (! _.isEmpty(runTargets) || @@ -2125,7 +2123,8 @@ testCommandOptions = { // like progress bars and spinners are unimportant. headless: { type: Boolean }, verbose: { type: Boolean, short: "v" }, - 'raw-logs': { type: Boolean }, + 'raw-logs': { type: Boolean, default: true }, + timestamps: { type: Boolean, default: false }, // opposite of --raw-logs // Undocumented. See #Once once: { type: Boolean }, @@ -2176,7 +2175,7 @@ testCommandOptions = { 'extra-packages': { type: String }, 'exclude-archs': { type: String }, - + // Same as TINYTEST_FILTER filter: { type: String, short: 'f' }, } @@ -2260,9 +2259,7 @@ async function doTestCommand(options) { serverArchitectures.push(DEPLOY_ARCH); } - if (options['raw-logs']) { - runLog.setRawLogs(true); - } + runLog.setRawLogs(!options['raw-logs'] && options.timestamps); var includePackages = []; if (options['extra-packages']) { diff --git a/tools/cli/help.txt b/tools/cli/help.txt index 7f9e083861..96e611feca 100644 --- a/tools/cli/help.txt +++ b/tools/cli/help.txt @@ -90,7 +90,8 @@ Options: Meteor app source code as by default the port is generated using the id inside .meteor/.id file. --production Simulate production mode. Minify and bundle CSS and JS files. - --raw-logs Run without parsing logs from stdout and stderr. + --raw-logs Run without parsing logs from stdout and stderr (default: true). + --timestamps Run with timestamps in logs, the same as passing `--raw-logs=false`. --settings, -s Set optional data for Meteor.settings on the server. --release Specify the release of Meteor to use. --verbose Print all output from builds logs. @@ -747,7 +748,9 @@ Options: important when multiple Cordova apps are build from the same Meteor app source code as by default the port is generated using the id inside .meteor/.id file. - --raw-logs Run without parsing logs from stdout and stderr. + --raw-logs Run without parsing logs from stdout and stderr (default: true). + --timestamps Run with timestamps in logs, the same as passing `--raw-logs=false`. + --settings, -s Set optional data for Meteor.settings on the server --ios, Run tests in an emulator or on a mobile device. All of diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md index c72bded0bc..00bdfa2916 100644 --- a/v3-docs/docs/cli/index.md +++ b/v3-docs/docs/cli/index.md @@ -53,7 +53,8 @@ This is the default command. Simply running `meteor` is the same as `meteor run` | `--mobile-server ` | Location where mobile builds connect (defaults to local IP and port). Can include URL scheme (e.g., https://example.com:443) | | `--cordova-server-port ` | Local port where Cordova will serve content | | `--production` | Simulate production mode. Minify and bundle CSS and JS files | -| `--raw-logs` | Run without parsing logs from stdout and stderr | +| `--raw-logs` | Run without parsing logs from stdout and stderr (default: true) | +| `--timestamps` | Run with timestamps in logs, the same as passing `--raw-logs=false`. | | `--settings`, `-s ` | Set optional data for Meteor.settings on the server | | `--release ` | Specify the release of Meteor to use | | `--verbose` | Print all output from builds logs | @@ -247,10 +248,10 @@ If you run `meteor create` without arguments, Meteor will launch an interactive Typescript # To create an app using TypeScript and React Vue # To create a basic Vue3-based app Svelte # To create a basic Svelte app - Tailwind # To create an app using React and Tailwind - Chakra-ui # To create an app Chakra UI and React - Solid # To create a basic Solid app - Apollo # To create a basic Apollo + React app + Tailwind # To create an app using React and Tailwind + Chakra-ui # To create an app Chakra UI and React + Solid # To create a basic Solid app + Apollo # To create a basic Apollo + React app Bare # To create an empty app ``` ::: @@ -359,7 +360,7 @@ To learn more about the recommended file structure for Meteor apps, check the [M ## meteor generate {meteorgenerate} -``meteor generate`` is a command to generate boilerplate for your current project. `meteor generate` receives a name as a parameter, and generates files containing code to create a [Collection](https://docs.meteor.com/api/collections.html) with that name, [Methods](https://docs.meteor.com/api/meteor.html#methods) to perform basic CRUD operations on that Collection, and a [Subscription](https://docs.meteor.com/api/meteor.html#Meteor-publish) to read its data with reactivity from the client. +``meteor generate`` is a command to generate boilerplate for your current project. `meteor generate` receives a name as a parameter, and generates files containing code to create a [Collection](https://docs.meteor.com/api/collections.html) with that name, [Methods](https://docs.meteor.com/api/meteor.html#methods) to perform basic CRUD operations on that Collection, and a [Subscription](https://docs.meteor.com/api/meteor.html#Meteor-publish) to read its data with reactivity from the client. If you run ``meteor generate`` without arguments, it will ask you for a name, and name the auto-generated Collection accordingly. It will also ask if you do want Methods for your API and Publications to be generated as well. From d0acf4f5f0162ed24ab3045f15eb0041989ce543 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Mon, 29 Sep 2025 22:36:49 -0300 Subject: [PATCH 2/4] DEV: flip the rawLogs option --- tools/cli/commands.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 756ec007ae..1e1b71914f 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -536,7 +536,7 @@ async function doRunCommand(options) { ); } - runLog.setRawLogs(!options['raw-logs'] && options.timestamps); + runLog.setRawLogs(options['raw-logs'] && !options.timestamps); let webArchs = projectContext.platformList.getWebArchs(); if (! _.isEmpty(runTargets) || @@ -2259,7 +2259,8 @@ async function doTestCommand(options) { serverArchitectures.push(DEPLOY_ARCH); } - runLog.setRawLogs(!options['raw-logs'] && options.timestamps); + runLog.setRawLogs(options['raw-logs'] && !options.timestamps); + var includePackages = []; if (options['extra-packages']) { From 00cc7c08cfd8fed4b62454bd2a4fd42f4076b105 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Mon, 13 Oct 2025 09:53:19 -0300 Subject: [PATCH 3/4] dev: testing something --- tools/tests/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tests/run.js b/tools/tests/run.js index 719ce0767d..5c873b8357 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -403,7 +403,7 @@ selftest.define("run and SIGKILL parent process", ["yet-unsolved-windows-failure await s.createApp("myapp", "app-prints-pid"); s.cd("myapp"); - run = s.run(); + run = s.run("run", "--timestamps"); run.waitSecs(30); var match = await run.match(/My pid is (\d+)/); var childPid; From 812edadb04851c0014222851384fafbb6898c46d Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Mon, 13 Oct 2025 09:57:44 -0300 Subject: [PATCH 4/4] :rocket: --- tools/tests/run.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tests/run.js b/tools/tests/run.js index 5c873b8357..0093676d50 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -434,7 +434,8 @@ selftest.define("run and SIGKILL parent process", ["yet-unsolved-windows-failure // Test that passing a bad pid in $METEOR_PARENT_PID logs an error and exits // immediately. s.set("METEOR_BAD_PARENT_PID_FOR_TEST", "t"); - run = s.run(); + run = s.run("run", "--timestamps"); + run.waitSecs(120); await run.match("must be a valid process ID"); await run.match("Your application is crashing");