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
This commit is contained in:
Anton Nikolaev
2021-05-11 17:02:24 -07:00
committed by Facebook GitHub Bot
parent a8ca142c9a
commit c0c9363a1f

View File

@@ -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