From 7acfdfa0afaf35383f526845df20fa505cd2bdb7 Mon Sep 17 00:00:00 2001 From: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com> Date: Thu, 6 Mar 2025 10:20:25 +0100 Subject: [PATCH] ScopesContext: Move runtime service to unstable (#101600) * Move ScenesContext runtime service to unstable * Move ScopesContext to unstable folder * Remove dummy export --- packages/grafana-runtime/src/services/index.ts | 1 - packages/grafana-runtime/src/unstable.ts | 8 ++++++-- .../src/{services => unstable}/ScopesContext.ts | 0 3 files changed, 6 insertions(+), 3 deletions(-) rename packages/grafana-runtime/src/{services => unstable}/ScopesContext.ts (100%) diff --git a/packages/grafana-runtime/src/services/index.ts b/packages/grafana-runtime/src/services/index.ts index 3ceef02923a..496246bd6c4 100644 --- a/packages/grafana-runtime/src/services/index.ts +++ b/packages/grafana-runtime/src/services/index.ts @@ -56,4 +56,3 @@ export { export { isPluginExtensionLink, isPluginExtensionComponent } from './pluginExtensions/utils'; export { setCurrentUser } from './user'; export { RuntimeDataSource } from './RuntimeDataSource'; -export { ScopesContext, type ScopesContextValueState, type ScopesContextValue, useScopes } from './ScopesContext'; diff --git a/packages/grafana-runtime/src/unstable.ts b/packages/grafana-runtime/src/unstable.ts index 8a42447206f..472372a9a8e 100644 --- a/packages/grafana-runtime/src/unstable.ts +++ b/packages/grafana-runtime/src/unstable.ts @@ -9,5 +9,9 @@ * and be subject to the standard policies */ -// This is a dummy export so typescript doesn't error importing an "empty module" -export const unstable = {}; +export { + ScopesContext, + type ScopesContextValueState, + type ScopesContextValue, + useScopes, +} from './unstable/ScopesContext'; diff --git a/packages/grafana-runtime/src/services/ScopesContext.ts b/packages/grafana-runtime/src/unstable/ScopesContext.ts similarity index 100% rename from packages/grafana-runtime/src/services/ScopesContext.ts rename to packages/grafana-runtime/src/unstable/ScopesContext.ts