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

Update camelcase to v7.x #5346

Conversation

VladimirYushkevich
Copy link
Contributor

This branch is based on #5305.

In this PR:

  • Fixed import for new version of camelcase by moving it from top level into method body. This allows to suppress ERR_REQUIRE_ESM error.

* Fixed import for new version of camelcase by moving from top level into method body. This allows to suppress ERR_REQUIRE_ESM error.
@codecov
Copy link

codecov bot commented Oct 9, 2022

Codecov Report

Base: 83.95% // Head: 83.77% // Decreases project coverage by -0.18% ⚠️

Coverage data is based on head (6086e28) compared to base (664ebcc).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5346      +/-   ##
==========================================
- Coverage   83.95%   83.77%   -0.19%     
==========================================
  Files          30       48      +18     
  Lines        1471     1793     +322     
  Branches      257      346      +89     
==========================================
+ Hits         1235     1502     +267     
- Misses        170      214      +44     
- Partials       66       77      +11     
Flag Coverage Δ
java ∅ <ø> (∅)
javascript 82.91% <ø> (∅)
python 83.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
ui/src/App.tsx 82.45% <0.00%> (ø)
ui/src/CommitLog/CommitLog.tsx 64.00% <0.00%> (ø)
ui/src/EmptyMessageView/EmptyMessageView.tsx 100.00% <0.00%> (ø)
ui/src/ExploreLink/ExploreLink.tsx 100.00% <0.00%> (ø)
ui/src/TableHead/TableHead.tsx 86.20% <0.00%> (ø)
ui/src/CommitHeader/CommitHeader.tsx 90.90% <0.00%> (ø)
ui/src/CommitDetails/CommitDetails.tsx 96.15% <0.00%> (ø)
ui/src/CommitBase/CommitBase.tsx 100.00% <0.00%> (ø)
ui/src/TableListing/TableListing.tsx 100.00% <0.00%> (ø)
ui/src/utils/api-wrapper.tsx 100.00% <0.00%> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@XN137 XN137 left a comment

Choose a reason for hiding this comment

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

the release notes of v7 have:

This package is now pure ESM. Please read this.

wondering: have we tried the suggested approach already?

i am no JS/node expert but i am guessing the suggested "fix" might not actually work, we just happen to not process .svg files as part of our build, so the import doesnt get executed now.

@VladimirYushkevich
Copy link
Contributor Author

wondering: have we tried the suggested approach already?
I tried this:

import { camelCase } from "camelcase";

 import { camelCase } from "camelcase";
    ^^^^^^

    SyntaxError: Cannot use import statement outside a module

i am no JS/node expert but i am guessing the suggested "fix" might not actually work, we just happen to not process .svg files as part of our build, so the import doesnt get executed now.

Exactly. Looks like the code in fileTransform.js is not executed now.

@XN137
Copy link
Contributor

XN137 commented Oct 10, 2022

just to be clear:
with "the suggested fix doesnt work" i was talking about this PR, not the changes suggested in the gist.

imo it doesnt make sense to upgrade this library and fix new problems by avoiding its usage...

unless we find an easy way to fix the import "correctly" or we are planning to migrate the project to ESM completely (which might not be a good use of our time right now), we should imo just not bother upgrading the library for now...
after all its just for camel casing a string?

@VladimirYushkevich
Copy link
Contributor Author

It is fine to close this PR, since I didn't find a way to use import for this module correctly. Can we somehow prevent bot updating this version ?

@XN137
Copy link
Contributor

XN137 commented Oct 10, 2022

i think closing the original PR will mark it as ignored/blocked in the dependency dashboard:
#5255
and we would need to click a checkbox to reactivate it

@snazy
Copy link
Member

snazy commented Oct 17, 2022

I'm okay with closing (and not yet bothering about the dependency update).

@snazy snazy closed this Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants