-
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
Fix: include uppercase characters when normalising plugin id #142
Conversation
|
I think we should in:
|
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.
LGTM 👍
Why are we using the change-case
, upper-case
, etc packages instead of string.toLowerCase()
? To cater for some unicode character mappings?
Nit: maybe we could just return with this?
return changeCase.lowerCase(`${newOrgName}-${newPluginName}-${type}`);
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.
see above
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.
forget about my messages above, we already do lowercase in return
🚀 PR was released in |
What this PR does / why we need it:
Users can type all sorts into the prompts when scaffolding a new plugin. Right now the
normalizeId
function strips uppercase characters which creates incorrect IDs (see path of directory created below):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@0.5.1-canary.142.d32fe7f.0 # or yarn add @grafana/create-plugin@0.5.1-canary.142.d32fe7f.0