-
Notifications
You must be signed in to change notification settings - Fork 32
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: Clean up unused publicPath.ts when updating #1035
Conversation
Hello! 👋 This repository uses Auto for releasing packages using PR labels. ✨ This PR can be merged but will not trigger a new release. To trigger a new release add the |
@@ -86,6 +86,8 @@ export const MIGRATION_CONFIG = { | |||
export const UDPATE_CONFIG = { | |||
// Files that should be overriden between configuration version updates. | |||
filesToOverride: ['.config/', '.cprc.json'], | |||
// Files that are no longer needed for the project and can be removed. | |||
filesToRemove: ['./config/webpack/publicPath.ts'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a conversation starter: shouldn't we compare what's not existing amongst the new template files for the .config/
folder and what's present in the CWD, and delete the difference instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did consider trashing the .config directory and recreating it from the templates (which I believe would have the same outcome as you're suggesting). For now felt it was easier to reuse what we have from the migrate script.
🚀 PR was released in |
What this PR does / why we need it:
This PR adds the ability to remove files from a plugin during update. In this PR we use it to delete the publicPath.ts file that is no longer used by webpack to build plugins.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via:
npm install @grafana/create-plugin@5.0.1-canary.1035.a9f09cb.0 # or yarn add @grafana/create-plugin@5.0.1-canary.1035.a9f09cb.0