Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Update deprecations carried over from 8 (#195491) #195654

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export interface AppMountParameters<HistoryLocationState = unknown> {
* This string should not include the base path from HTTP.
*
* @deprecated Use {@link AppMountParameters.history} instead.
* @removeBy 8.8.0
* remove after https://github.com/elastic/kibana/issues/132600 is done
*
* @example
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface ElasticsearchServiceSetup {
setUnauthorizedErrorHandler: (handler: UnauthorizedErrorHandler) => void;

/**
* @deprecated
* @deprecated Can be removed when https://github.com/elastic/kibana/issues/119862 is done.
*/
legacy: {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { isConfigSchema } from '@kbn/config-schema';
import type { Logger } from '@kbn/logging';
import { type PluginOpaqueId, PluginType } from '@kbn/core-base-common';
import type {
AsyncPlugin,
Plugin,
PluginConfigDescriptor,
PluginInitializer,
Expand Down Expand Up @@ -58,8 +57,7 @@ export class PluginWrapper<

private instance?:
| Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart>
| PrebootPlugin<TSetup, TPluginsSetup>
| AsyncPlugin<TSetup, TStart, TPluginsSetup, TPluginsStart>;
| PrebootPlugin<TSetup, TPluginsSetup>;

private readonly startDependencies$ = new Subject<[CoreStart, TPluginsStart, TStart]>();
public readonly startDependencies = firstValueFrom(this.startDependencies$);
Expand Down
1 change: 0 additions & 1 deletion packages/core/plugins/core-plugins-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
export type {
PrebootPlugin,
Plugin,
AsyncPlugin,
PluginConfigDescriptor,
PluginConfigSchema,
PluginInitializer,
Expand Down
1 change: 0 additions & 1 deletion packages/core/plugins/core-plugins-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
export type {
PrebootPlugin,
Plugin,
AsyncPlugin,
PluginConfigDescriptor,
PluginConfigSchema,
PluginInitializer,
Expand Down
24 changes: 1 addition & 23 deletions packages/core/plugins/core-plugins-server/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,26 +301,6 @@ export interface Plugin<
stop?(): MaybePromise<void>;
}

/**
* A plugin with asynchronous lifecycle methods.
*
* @deprecated Asynchronous lifecycles are deprecated, and should be migrated to sync {@link Plugin | plugin}
* @removeBy 8.8.0
* @public
*/
export interface AsyncPlugin<
TSetup = void,
TStart = void,
TPluginsSetup extends object = object,
TPluginsStart extends object = object
> {
setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise<TSetup>;

start(core: CoreStart, plugins: TPluginsStart): TStart | Promise<TStart>;

stop?(): MaybePromise<void>;
}

/**
* @public
*/
Expand Down Expand Up @@ -478,7 +458,5 @@ export type PluginInitializer<
> = (
core: PluginInitializerContext
) => Promise<
| Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart>
| PrebootPlugin<TSetup, TPluginsSetup>
| AsyncPlugin<TSetup, TStart, TPluginsSetup, TPluginsStart>
Plugin<TSetup, TStart, TPluginsSetup, TPluginsStart> | PrebootPlugin<TSetup, TPluginsSetup>
>;
1 change: 0 additions & 1 deletion src/core/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ export { PluginType } from '@kbn/core-base-common';
export type {
PrebootPlugin,
Plugin,
AsyncPlugin,
PluginConfigDescriptor,
PluginConfigSchema,
PluginInitializer,
Expand Down