From 426946210e4c090d61b4d90b51bd6106122e02db Mon Sep 17 00:00:00 2001 From: Philippe L'ATTENTION Date: Sat, 21 Dec 2024 12:24:59 +0100 Subject: [PATCH 1/2] Prevent argv parsing crash when optionnal args are passed to the cli --- packages/react-router-dev/bin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-router-dev/bin.js b/packages/react-router-dev/bin.js index 8886601064..0373bf96f7 100755 --- a/packages/react-router-dev/bin.js +++ b/packages/react-router-dev/bin.js @@ -5,7 +5,7 @@ let arg = require("arg"); // default `NODE_ENV` so React loads the proper version in it's CJS entry script. // We have to do this before importing `run.ts` since that is what imports // `react` (indirectly via `react-router`) -let args = arg({}, { argv: process.argv.slice(2) }); +let args = arg({}, { argv: process.argv.slice(2), stopAtPositional: true }); if (args._[0] === "dev") { process.env.NODE_ENV = process.env.NODE_ENV ?? "development"; } else { From 7e52fe1de31462c6963f8ba4d31f7ffc63d9ec64 Mon Sep 17 00:00:00 2001 From: Philippe L'ATTENTION Date: Sat, 21 Dec 2024 12:34:49 +0100 Subject: [PATCH 2/2] Update contributors.yml --- contributors.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.yml b/contributors.yml index f42e82268a..201a75f7ac 100644 --- a/contributors.yml +++ b/contributors.yml @@ -233,6 +233,7 @@ - pavsoldatov - pcattori - petersendidit +- phildl - pierophp - printfn - promet99