While @Ukochka was updating the plugins in the example repo (see this PR for example), we noticed the create-plugin update cmd is not behaving quite the way we want. In case the plugin did not have any e2e tests at all (Playwright nor Cypress), grafana/e2e scripts and deps were added to the package.json file.
This PR ensures that cypress specific stuff should only be added to package.json in case:
playwright should be used
Grafana version is lower than 11 (grafana/e2e was deprecated in 11)
a cypress folder exist in the plugin root dir
Which issue(s) this PR fixes:
Fixes #919
Special notes for your reviewer:
📦 Published PR as canary version: Canary Versions
:sparkles: Test out this PR locally via:
```bash
npm install @grafana/create-plugin@4.10.5-canary.920.29fa67c.0
# or
yarn add @grafana/create-plugin@4.10.5-canary.920.29fa67c.0
```
Hello! 👋 This repository uses Auto for releasing packages using PR labels.
✨ This PR can be merged and will trigger a new patch release.
NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.
What this PR does / why we need it:
While @Ukochka was updating the plugins in the example repo (see this PR for example), we noticed the
create-plugin update
cmd is not behaving quite the way we want. In case the plugin did not have any e2e tests at all (Playwright nor Cypress), grafana/e2e scripts and deps were added to the package.json file.This PR ensures that cypress specific stuff should only be added to package.json in case:
cypress
folder exist in the plugin root dirWhich issue(s) this PR fixes: Fixes #919
Special notes for your reviewer:
📦 Published PR as canary version:
Canary Versions
:sparkles: Test out this PR locally via: ```bash npm install @grafana/create-plugin@4.10.5-canary.920.29fa67c.0 # or yarn add @grafana/create-plugin@4.10.5-canary.920.29fa67c.0 ```