-
Notifications
You must be signed in to change notification settings - Fork 95
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 peer dependencies #7900
Fix peer dependencies #7900
Conversation
enterprise/app/trends/heatmap.tsx
Outdated
const { width, ref } = useResizeDetector({ | ||
handleHeight: false, | ||
refreshMode: "throttle", | ||
refreshRate: 500, | ||
}); |
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.
does this work? I thought React hooks (functions prefixed with use
) only worked with functional components, and weren't supported for class components
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.
Then you're probably right; I couldn't test this locally and so was going to test it in dev when I got a free moment. How do you recommend we resolve this? The library just removed the with
version, and I wasn't aware of the differing use in class and functional components until just now.
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.
Personally I'd ignore the deprecation warning
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.
(and revert to the old version - unless the issue is that this is setting off some security scanner?)
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 also wouldn't expect this to work. if you can't / don't want to revert versions and figure out the class-componenty way of doing this, you should be able to just set an olap db handle to play around with the ui (since you don't need any actual data to verify that resizing is working)
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 switched the HeatmapComponent
to a functional component instead of a class component, and it appears to work based on my limited testing I did on my local machine with no real data.
@@ -265,11 +265,11 @@ export default class FlakesComponent extends React.Component<Props, State> { | |||
if (!stats) { | |||
return "0%"; | |||
} | |||
const totalFlakes = (+stats.flakyRuns ?? 0) + (+stats.likelyFlakyRuns ?? 0); | |||
const totalFlakes = +stats.flakyRuns + +stats.likelyFlakyRuns; |
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.
did something change in our proto libraries to make this not a Long or something? if so, i would imagine there are a lot more places than just this one where this could be removed
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 think it made it so that Longs can't fail to be converted to numbers?
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.
also I think this is likely a result of upgrading typescript, not proto
enterprise/app/trends/heatmap.tsx
Outdated
const { width, ref } = useResizeDetector({ | ||
handleHeight: false, | ||
refreshMode: "throttle", | ||
refreshRate: 500, | ||
}); |
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 also wouldn't expect this to work. if you can't / don't want to revert versions and figure out the class-componenty way of doing this, you should be able to just set an olap db handle to play around with the ui (since you don't need any actual data to verify that resizing is working)
eb16e16
to
5686ecd
Compare
This addresses all peer dependency warnings we get from yarn except for the
dagre-d3-react
ones, which would require a new release of that library to fix.In doing so, it:
Upgrades our typescript version
Switches to using
useResizeDetector
from the deprecatedwithResizeDetector
Switches to using
Range
instead of the removedRangeWithKey
andRangeKeyDict
instead of the removedOnChangeProps
Removes code for handling the
days
field of aRange
, as that field no longer existsRemoves the
undefined
second positional parameter fromhandleDefaultConfigClicked
, as that function no longer accepts a second positional parameterRemoves fallback values when using unary
+
to convert aLong
to anumber
, as that now always returns anumber
Changes our target in
tsconfig.json
fromes2016
toes2018
to support the use of named capturing groups intrace_events.ts
Removes the
resolutions
block from ourpackage.json
, as it is no longer necessary