From 854de0761fd3744c2076a2b995f0f9274a8ef971 Mon Sep 17 00:00:00 2001 From: R-Morpheus <107617521+R-Morpheus@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:11:42 +0300 Subject: [PATCH] fix(cli): mud set-version --link shouldn't fetch versions (#2000) Co-authored-by: Kevin Ingersoll --- .changeset/clean-bananas-hug.md | 5 +++++ packages/cli/src/commands/set-version.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/clean-bananas-hug.md diff --git a/.changeset/clean-bananas-hug.md b/.changeset/clean-bananas-hug.md new file mode 100644 index 0000000000..0420d43372 --- /dev/null +++ b/.changeset/clean-bananas-hug.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/cli": patch +--- + +Using `mud set-version --link` will no longer attempt to fetch the latest version from npm. diff --git a/packages/cli/src/commands/set-version.ts b/packages/cli/src/commands/set-version.ts index 6bb18f6f52..ee6e0d0db6 100644 --- a/packages/cli/src/commands/set-version.ts +++ b/packages/cli/src/commands/set-version.ts @@ -56,8 +56,11 @@ const commandModule: CommandModule = { throw new MUDError(`These options are mutually exclusive: ${mutuallyExclusiveOptions.join(", ")}`); } + // If the --link flag is not set, we call resolveVersion to get the version // Resolve the version number from available options like `tag` or `commit` - options.mudVersion = await resolveVersion(options); + if (!options.link) { + options.mudVersion = await resolveVersion(options); + } // Update all package.json below the current working directory (except in node_modules) const packageJsons = glob.sync("**/package.json").filter((p) => !p.includes("node_modules"));