Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Plugin: Improve handling of e2e in update cmd #920

Merged
merged 4 commits into from
May 24, 2024

Conversation

sunker
Copy link
Contributor

@sunker sunker commented May 23, 2024

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:

  • 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

✨ Test out this PR locally via:

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

@sunker sunker added patch Increment the patch version when merged release Create a release when this pr is merged labels May 23, 2024
Copy link

github-actions bot commented May 23, 2024

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.

@sunker sunker changed the title [wip]: Create Plugin: e2e changes in update cmd [wip]: Create Plugin: Improve handling of e2e in update cmd May 23, 2024
@sunker sunker requested review from jackw and Ukochka May 24, 2024 06:21
@sunker sunker changed the title [wip]: Create Plugin: Improve handling of e2e in update cmd Create Plugin: Improve handling of e2e in update cmd May 24, 2024
@sunker sunker marked this pull request as ready for review May 24, 2024 06:22
@sunker sunker requested a review from a team as a code owner May 24, 2024 06:22
Copy link
Collaborator

@jackw jackw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested against a couple of plugins and appears to work as expected. Awesome work @sunker ! 🚀

@sunker sunker merged commit de5b44f into main May 24, 2024
16 checks passed
@sunker sunker deleted the create-plugin/e2e-update-cmd branch May 24, 2024 09:11
@grafana-plugins-platform-bot
Copy link

🚀 PR was released in @grafana/create-plugin@4.10.5 🚀

@grafana-plugins-platform-bot grafana-plugins-platform-bot bot added the released This issue/pull request has been released. label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released This issue/pull request has been released.
Projects
Development

Successfully merging this pull request may close these issues.

Add check to create-plugin update script for grafana e2e usage
2 participants