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: Refactor getTemplateData to be used in generate command and update commands #837

Merged
merged 29 commits into from
May 3, 2024

Conversation

Ukochka
Copy link
Contributor

@Ukochka Ukochka commented Mar 22, 2024

What this PR does / why we need it:
After removing Plop another way to getting template data was introduced and it is a duplication of getTemplate data we already had. We need to unify getting template data for all the commands: generate, migrate, update, provisioning

After refactoring: getTemplateData returns TemplateData object. It takes data from User prompt for generate command and from package.json for other commands

Which issue(s) this PR fixes:
Fixes #82

Special notes for your reviewer:

I merged changes from this PR, which fixes #758

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @grafana/create-plugin@4.9.1-canary.837.e9165e7.0
npm install @grafana/plugin-e2e@1.2.1-canary.837.e9165e7.0
# or 
yarn add @grafana/create-plugin@4.9.1-canary.837.e9165e7.0
yarn add @grafana/plugin-e2e@1.2.1-canary.837.e9165e7.0

@Ukochka Ukochka added create-plugin related to the create-plugin tool no-changelog Don't include in changelog and version calculations labels Mar 22, 2024
@Ukochka Ukochka self-assigned this Mar 22, 2024
@Ukochka Ukochka requested a review from a team as a code owner March 22, 2024 14:29
Copy link

github-actions bot commented Mar 22, 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.

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.

Nice @Ukochka. This is looking good. I've left a nit and a couple of questions around the proxy usage.

packages/create-plugin/src/commands/generate.command.ts Outdated Show resolved Hide resolved
packages/create-plugin/src/utils/utils.templates.ts Outdated Show resolved Hide resolved
packages/create-plugin/src/utils/utils.templates.ts Outdated Show resolved Hide resolved
packages/create-plugin/src/utils/utils.templates.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@leventebalogh leventebalogh left a comment

Choose a reason for hiding this comment

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

LGTM, nice work on this @Ukochka 👏

Co-Authored-By: Yulia Shanyrova <yulia.shanyrova@grafana.com>
@leventebalogh leventebalogh added release Create a release when this pr is merged patch Increment the patch version when merged and removed no-changelog Don't include in changelog and version calculations labels Apr 29, 2024
@Ukochka Ukochka merged commit fff9f81 into main May 3, 2024
16 of 17 checks passed
@Ukochka Ukochka deleted the refactor-template-generation branch May 3, 2024 08:10
@grafana-plugins-platform-bot
Copy link

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

@grafana-plugins-platform-bot grafana-plugins-platform-bot bot added the released This issue/pull request has been released. label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-plugin related to the create-plugin tool 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.

Bug: scenesapp backend created with different plugin-id
7 participants