To update an existing plugin to use a newer version of the
create-plugin tool, run the following command:
npx @grafana/create-plugin@latest update
pnpm dlx @grafana/create-plugin@latest update
yarn create @grafana/plugin update
This command reruns the original scaffolding commands against the configuration files, dependencies, and scripts. It automatically uses the latest version of the
create-plugin tool. It prompts you to confirm any destructive operations before it runs.
We recommended that you normally agree to all prompts so that configs, dependencies, and scripts are kept in sync.
When you run the
update command, you are prompted with the following questions. The default for each prompt is
Would you like to update the project's configuration?
y to replace the files inside the
.config directory. By doing so, you can make sure that the plugin is built and tested with the latest Grafana recommended configurations.
Would you like to update the following dependencies in the
Select from the following choices:
Yes, all of them: This updates all existing dependencies and adds any missing dependencies to
Yes, but only the outdated ones: This updates all existing dependencies in
No: This choice skips this step, thus preventing any dependency updates.
Note that if there are no dependencies then you will not see this prompt.
Would you like to update the scripts in your
package.json? All scripts using grafana-toolkit will be replaced.
Select 'y' to update any npm scripts in the
package.json file to match the latest configurations. Any scripts that previously used
grafana-toolkit are replaced.
We strongly recommend that you consult the changelog for potential breaking changes before making changes to your configuration.