From c0c9363a1ff4e7a0f7fa77a49bf3216df1c9e3bf Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Tue, 11 May 2021 17:02:24 -0700 Subject: [PATCH] Ignore flipper version when computing plugin checksum Summary: To be able to save min required Flipper version into the package.json, we need to ignore it when computing hashsum. Otherwise hashsum of plugin will depend on the current Flipper version and so bumping Flipper will change hashsums of all plugins. Reviewed By: passy Differential Revision: D28342965 fbshipit-source-id: 289ec7e673bce1f2b1cbb402b56c5b1b31fd84da --- desktop/pkg-lib/src/computePackageChecksum.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop/pkg-lib/src/computePackageChecksum.ts b/desktop/pkg-lib/src/computePackageChecksum.ts index b6183bac6..e134db8b3 100644 --- a/desktop/pkg-lib/src/computePackageChecksum.ts +++ b/desktop/pkg-lib/src/computePackageChecksum.ts @@ -55,6 +55,9 @@ export default async function computePackageChecksum( if (packageJson.version) { packageJson.version = '0.0.0'; } + if (packageJson.engines && packageJson.engines.flipper) { + packageJson.engines.flipper = '0.0.0'; + } hash.write(JSON.stringify(packageJson)); } else { // add hash of file content