-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Remove large (+20kb) 'change-case' dependency #624
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
Remove large (+20kb) 'change-case' dependency #624
Conversation
|
This pull request is automatically deployed with Now. |
johno
left a comment
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.
🏅
|
@wilsonpage would focusing the npm package to https://github.com/blakeembrey/param-case reduce the bundle size, and keep the edge case handling? |
|
@ChristianMurphy at this point we shouldn't need any edge case handling since we're only transforming two known cases. |
wooorm
left a comment
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.
This may not work for node.properties.data123 = '???'. DOM (and hast) represents data-123 as that, so there’s no uppercase to change. I’m guessing this change’ll break that. May need a test?
ARIA is a list of know values which don’t have numbers, so that’s fine.
|
Updated the pr description to auto-close the issue. |
|
@ChristianMurphy |
|
Updated the PR to cope with the |
ChristianMurphy
left a comment
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.
Looks good
May need a test?
@wilsonpage any chance a test case could be added to verify the handling node.properties.data123?
So that use case is documented in code.
|
@ChristianMurphy I'm afraid I don't have enough context on this project to write a test. Would take me a while to grok, which I can't afford right now :( Would be great if one of you lot could add one! |
|
I'll add a few tests in a follow up PR, thanks for the contribution @wilsonpage! |
Fixes #623