Adds a notifyAvailableUpdate flag to config.json to disable update (#3992)

Summary:
We would like to version control Flipper and some of our custom plugins that are installed on developers' systems.
Flipper by default prompts users to upgrade so they sometimes do the update and then all our custom plugins break because they were compiled for an older version.
See https://github.com/facebook/flipper/issues/3947 for feature request info.

## Changelog

Adds notifyAvailable flag to config.json to disable prompting for users that "an update is available"

Pull Request resolved: https://github.com/facebook/flipper/pull/3992

Test Plan:
Tested by running locally.
Had to comment out the isProduction() check to confirm this it worked properly because this flag is false on dev versions.
Couldn't figure out how to manually test the handleOpenPluginDeeplink.tsx change but made a similar change there; happy to test that if you can tell me how to exercise that path.

Reviewed By: antonk52

Differential Revision: D39654481

Pulled By: antonk52

fbshipit-source-id: cef6b48d870915c48f620269c42d24b8ef1f4c29
This commit is contained in:
Ken Yee
2022-09-21 09:47:44 -07:00
committed by Facebook GitHub Bot
parent 3314c77ce9
commit fa9ba6f2d0
8 changed files with 27 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ export const defaultConfig: Config = {
pluginPaths: [],
disabledPlugins: [],
darkMode: 'light',
suppressPluginUpdateNotifications: false,
};
export type Config = {
@@ -33,6 +34,7 @@ export type Config = {
updaterEnabled?: boolean;
launcherEnabled?: boolean;
darkMode: 'system' | 'light' | 'dark';
suppressPluginUpdateNotifications?: boolean;
};
const ensureConfigDirExists = async (path: fs.PathLike) => {
@@ -83,6 +85,10 @@ export default async function setup(argv: any) {
updaterEnabled: argv.updater,
launcherEnabled: argv.launcher,
launcherMsg: argv.launcherMsg,
suppressPluginUpdateNotifications:
typeof config.suppressPluginUpdateNotifications === 'boolean'
? config.suppressPluginUpdateNotifications
: false,
};
return config;