Deprecate kaios-portal
Reviewed By: passy Differential Revision: D36807506 fbshipit-source-id: 660f334a46dbf7847c90ce6e67f2dc974c1daf90
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9cc8e4076f
commit
2b16916a85
@@ -37,7 +37,10 @@ export interface PluginDetails {
|
||||
overview?: boolean;
|
||||
setup?: boolean;
|
||||
};
|
||||
/** Provided by NPM. Allows developers to deprecated packages. Its value is the deprecation reason. */
|
||||
/**
|
||||
* Provided by NPM. Allows developers to deprecated packages. Its value is the deprecation reason.
|
||||
* Alternatively, might be a part of the plugin's package JSON. In this case, the plugin is excluded from bundling.
|
||||
*/
|
||||
deprecated?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,10 @@
|
||||
"headless": {
|
||||
"type": "boolean",
|
||||
"description": "Specifies if plugin works in a headless mode. Default: false."
|
||||
},
|
||||
"deprecated": {
|
||||
"type": "string",
|
||||
"description": "Mark plugin as deprecated and exclude it from the bundle. Optionally, provide a reason for deprecation. Set to '' to use the default deprecation reason."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -77,7 +77,11 @@ async function entryPointForPluginFolder(
|
||||
}
|
||||
}),
|
||||
)
|
||||
.then((plugins) => plugins.filter(notNull))
|
||||
.then((plugins) =>
|
||||
plugins
|
||||
.filter(notNull)
|
||||
.filter(({deprecated}) => typeof deprecated !== 'string'),
|
||||
)
|
||||
.then((plugins) =>
|
||||
plugins.reduce<{[key: string]: InstalledPluginDetails}>((acc, cv) => {
|
||||
acc[cv!.name] = cv!;
|
||||
|
||||
Reference in New Issue
Block a user