* Initial commit * Prettier fixes * Doc-validator fixes part 1 * Doc-validator fixes part 2 * More doc-validator fixes * More doc-validator fixes * Test * link test * Linnk test * Link test * More fixes * More fixes * Doc-validator fixes * Doc-validator fixes * fix broken link * Fix * Testing * Doc fixes * Link fixes * Fix links * Update docs/sources/developers/plugins/create-a-grafana-plugin/_index.md Co-authored-by: David Harris <david.harris@grafana.com> * Testing * Testing * Testing * Testing * Doc-validator fixes * Doc-validator fixes * Doc-validator fixes * Fix broken links for plugins reorganization project * Prettier fixes * Prettier fixes * Incorporate reviewer feedback * Link fixes * Link fixes * Link fixes * Link fix * Deleted space * Codeowners fix * Change grafana.com links to absolute URLs for Hugo --------- Co-authored-by: David Harris <david.harris@grafana.com>
1.9 KiB
title | menuTitle | description | keywords | weight | |||||
---|---|---|---|---|---|---|---|---|---|
Migrate plugins from Grafana version 9.1.x to 9.2.x | v9.1.x to v9.2.x | Guide for migrating plugins from Grafana v9.1.x to v9.2.x |
|
2100 |
Migrate plugins from Grafana version 9.1.x to 9.2.x
Follow the instructions in this section to migrate plugins from Grafana version 9.1.x to 9.2.x.
React and React-dom as peer dependencies
In earlier versions of Grafana packages, react
and react-dom
were installed during a yarn install
command regardless of a plugin's dependencies. In version 9.2.0, the @grafana
packages declare these React packages as peerDependencies
and must be added to a plugin's package.json
file for test commands.
Example:
// before
"dependencies": {
"@grafana/data": "9.1.0",
"@grafana/ui": "9.1.0",
},
// after
"dependencies": {
"@grafana/data": "9.2.0",
"@grafana/ui": "9.2.0",
"react": "17.0.2",
"react-dom": "17.0.2"
},
NavModelItem
requires a valid icon name
The typings of the NavModelItem
have improved to only allow a valid IconName
for the icon property. For a complete list of valid icons, refer to the source code. These icons will work for older versions of Grafana 9.
Example:
// before
const model: NavModelItem = {
id: 'settings',
text: 'Settings',
icon: 'fa fa-cog',
url: `${baseUrl}/settings`,
};
// after
const model: NavModelItem = {
id: 'settings',
text: 'Settings',
icon: 'cog',
url: `${baseUrl}/settings`,
};
Additional type availability
FieldProps
, ModalProps
, and QueryFieldProps
are now exposed from @grafana/ui
. They can be imported in the same way as other types.
Example:
import { FieldProps, ModalProps, QueryFieldProps } from '@grafana/ui';