From b79eca92c4e7bf958b7df4dec1745fd454661364 Mon Sep 17 00:00:00 2001 From: dule-git <61541725+dule-git@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:50:24 +0200 Subject: [PATCH] add npm install command to update the plugin in the messages (#227) --- packages/hre-extender-v1/src/setup.ts | 4 ++-- packages/hre-extender-v2/src/setup.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/hre-extender-v1/src/setup.ts b/packages/hre-extender-v1/src/setup.ts index ee4d8cab..af3aac75 100644 --- a/packages/hre-extender-v1/src/setup.ts +++ b/packages/hre-extender-v1/src/setup.ts @@ -169,7 +169,7 @@ function printErrorIfEthersAndHardhatTenderlyVersionsArentCompatible(hre: Hardha console.log( "\x1b[31m%s%s\x1b[0m", // print in red color `The '@tenderly/hardhat-tenderly@${hardhatTenderlyVersion}' doesn't support 'ethers@${ethersVersion}'.\n`, - `Please update the plugin to the latest '@tenderly/hardhat-tenderly@${compatibleHardhatTenderlyVersion}'\n`, + `Please update the plugin to the latest hardhat-tenderly version: 'npm install @tenderly/hardhat-tenderly@${compatibleHardhatTenderlyVersion}'\n`, ); } } @@ -180,7 +180,7 @@ async function printWarningIfVersionIsOutdated(hre: HardhatRuntimeEnvironment, h if (isVersionOutdated) { console.log( "\x1b[33m%s\x1b[0m%s", // print in yellow color - `Please update the plugin to the new version: '@tenderly/hardhat-tenderly@${latestHardhatTenderlyVersion}'\n`, + `Please update the plugin to the new version: 'npm install @tenderly/hardhat-tenderly@^${latestHardhatTenderlyVersion}'\n`, "You can disable this message by setting the ‘TENDERLY_ENABLE_OUTDATED_VERSION_CHECK=false’ environment variable.", ); } diff --git a/packages/hre-extender-v2/src/setup.ts b/packages/hre-extender-v2/src/setup.ts index 245ffcc0..ae886518 100644 --- a/packages/hre-extender-v2/src/setup.ts +++ b/packages/hre-extender-v2/src/setup.ts @@ -198,7 +198,7 @@ function printErrorIfEthersAndHardhatTenderlyVersionsArentCompatible(hre: Hardha console.log( "\x1b[31m%s%s\x1b[0m", // print in red color `The '@tenderly/hardhat-tenderly@${hardhatTenderlyVersion}' doesn't support 'ethers@${ethersVersion}'.\n`, - `Please update the plugin to the latest '@tenderly/hardhat-tenderly@${compatibleHardhatTenderlyVersion}'\n`, + `Please update the plugin to the latest hardhat-tenderly version: 'npm install @tenderly/hardhat-tenderly@${compatibleHardhatTenderlyVersion}'\n`, ); } } @@ -209,7 +209,7 @@ async function printWarningIfVersionIsOutdated(hre: HardhatRuntimeEnvironment, h if (isVersionOutdated) { console.log( "\x1b[33m%s\x1b[0m%s", // print in yellow color - `Please update the plugin to the new version: '@tenderly/hardhat-tenderly@${latestHardhatTenderlyVersion}'\n`, + `Please update the plugin to the new version: 'npm install @tenderly/hardhat-tenderly@^${latestHardhatTenderlyVersion}'\n`, "You can disable this message by setting the ‘TENDERLY_ENABLE_OUTDATED_VERSION_CHECK=false’ environment variable.", ); }