Plugin Examples GitHub Repo moves to NPM

Removing our reliance on Yarn v1 for managing frontend dependencies and running tasks in Grafana Plugins, has been on the plugins platform team radar for awhile. Yarn v1 was superseded by Yarn v2 in Jan 2020, and since then very few contributions have been made to Yarn v1.

Meanwhile, NPM has made significant advancements, addressing performance issues and enhancing its package management capabilities. It offers improved stability, faster installation times, and better support for consistent and reproducible builds through its own lock file. Given this we’ve decided to migrate the Plugin Examples repo to use NPM.

Yarn Berry was considered, however - as our examples repo isn’t a mono-repo - every example would get a copy of yarn berry which we’d need to update and maintain. Therefore NPM was deemed the simpler solution. We believe this change will improve the development experience for developers that use these examples as a starting point to build plugins.

For those scaffolding new plugins, @grafana/create-plugin has support for NPM out the box. If you scaffold a plugin with npx the plugin will use NPM as its dependency manager and task runner.