@grafana/experimental

中文文档
2.1.6发布于 2024/12/17Apache-2.0TypeScriptESM + CJS近 30 天下载 5.4万

Experimental Grafana components and APIs

原始使用文档

Grafana Experimental

[!CAUTION]
This repository has been deprecated.
Components previously housed here have been migrated to @grafana/plugin-ui.
Please use @grafana/plugin-ui for any future development and improvements. Thank you for your understanding.

The main difference between grafana/experimental and grafana/ui is how the components are versioned. Having a separate "experimental" package allows us to release breaking changes when necessary while the grafana/ui package follows a slower-moving policy.

As developers use and test the components and report issues, the maintainers learn more about shortcomings of the components. The older and more used a component is, the less likely it is that new issues will be found and subsequently need to introduce breaking changes.

For a component to be ready to move to the grafana/ui package, the following criteria are considered:

  • It needs to match the code quality of the grafana/ui components. It doesn't have to be perfect to be part of grafana/ui, but the component should be reliable enough that developers can depend on it.
  • Each component needs stories.
  • Each component needs type definitions.
  • Requires good test coverage. Some of the grafana/experimental components don't currently have comprehensive tests.
  • It needs to have a low probability of a breaking change in the short/medium future. For instance, if it needs a new feature that will likely require a breaking change, it may be preferable to delay it being added to grafana/ui.

CONTRIBUTING

As we are planning to get this repository to a more stable state please please write tests for your components.

If you want to use your local development version in another repo run yarn add link:"/yar/path/to/grafana-experimental"

版本与发布记录

@grafana/experimental 共发布 79 个版本,首次发布于 2021/11/25;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.1.6latest2024/12/171.9 年前
2.1.52024/12/121.9 年前
2.1.42024/11/212 年前
2.1.32024/11/202 年前
2.1.22024/10/092 年前
2.1.12024/10/022 年前

其他发布通道:canary → 0.0.2-canary.0。

关于 @grafana/experimental 的常见问题

@grafana/experimental 是什么?

Experimental Grafana components and APIs

如何安装 @grafana/experimental?

在项目目录运行 npm install @grafana/experimental,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:rxjs(^7.8.1)、react(^18.2.0)、react-dom(^18.2.0)、@grafana/ui(^10.4.0 || ^11.0.0)、@emotion/css(^11.11.2)、react-select(^5.8.0)、@grafana/data(^10.4.0 || ^11.0.0)、@grafana/runtime(^10.4.0 || ^11.0.0)、@grafana/e2e-selectors(^10.0.0 || ^11.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@grafana/experimental 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@grafana/experimental 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@grafana/experimental 可以商用吗?

@grafana/experimental 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@grafana/experimental 的下载量有多少?

根据 npm 官方下载统计,@grafana/experimental 在 2026/10/17 – 2026/11/15 这 30 天内被下载 54,293 次,日均约 1,810 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@grafana/experimental 还在维护吗?

最新版本 2.1.6 发布于 2024/12/17(1.9 年前);至今共发布 79 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/11/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。