Enforce version "0.0.0" in plugin sources
Summary: I've noticed that two plugins had wrong versions set and because of that they always published with the same version and not auto-updated. This diff fixes that and also adds safeguard which shows error on "yarn install" if some plugin packages has version set to something different from "0.0.0". Reviewed By: passy Differential Revision: D28443509 fbshipit-source-id: d982dbe05fa876717799d9464f900f2173b32f70
This commit is contained in:
committed by
Facebook GitHub Bot
parent
580f4c7048
commit
366752f424
@@ -55,6 +55,16 @@ async function postinstall(): Promise<number> {
|
||||
);
|
||||
}
|
||||
}
|
||||
if (packageJson.version !== '0.0.0') {
|
||||
errors.push(
|
||||
`[ERROR] Plugin package "${path.relative(
|
||||
rootDir,
|
||||
packageDir,
|
||||
)}" has version "${
|
||||
packageJson.version
|
||||
}" set in package.json. Plugin sources must have version set to "0.0.0". Version is automatically bumped when plugin released.`,
|
||||
);
|
||||
}
|
||||
if (
|
||||
packageJson.keywords &&
|
||||
packageJson.keywords.includes('flipper-plugin')
|
||||
|
||||
Reference in New Issue
Block a user