rhocode / Giraffe

SatisGraphtory 2 - Resource chain simulation tool for SatisFactory
Other
17 stars 8 forks source link

Upgrade @welldone-software/why-did-you-render to version 5.0.0 #431

Closed depfu[bot] closed 4 years ago

depfu[bot] commented 4 years ago

Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ @​welldone-software/why-did-you-render (^4.0.0 → ^5.0.0) · Repo

Release Notes

5.0.0

Notice:

  • Support for React@17 is on it's way.

Breaking changes:

  • No longer tracks deep equals results in useMemo.
    • Added tests to children re-rendered as a result of useMemo or useCallback results:
      • logs if the different result got generated because of deep equals deps changes
        image
      • ignores the prop change if deps were different
  • No longer tracks re-renders as a result of useCallback invalidation due to deps changes (fixes #46)
    • This fix was brought to you by the one and only @Hypnosphi :)
  • Made logOwnerReasons true by default
  • Only build a minimized UMD version now and won't commit the built files to git anymore
  • Removed babel-plugin-lodash because lodash optimizations better are done by the user of the library
  • Removed building in babel-plugin-transform-classes because we build with a newer babel where it is not needed anymore

Enhancements:

  • Added a feature where upon request you can get a detailed diff between props.
    For example for the following:
        const sameObj = {a: {b: 'c'}}
        ReactDom.render(<Main containerProps={{style: {height: '100%'}, className: 'default-highchart', sameObj}} />, domElement)
        ReactDom.render(<Main containerProps={{style: {height: '100%'}, className: 'default-highchart', sameObj}} />, domElement)
    
    Since props are equal by value, you will see the following option that allows for the generation of a detailed diff report:
    image

Fixes

  • Only track hooks if they are supported

Readme

  • improved readme in general, including the installation tips

Dev

  • Added Travis pipelines that run lint, test, audit, and e2e tests for each PR.
  • Added a full e2e coverage using cypress that runs in the pipelines.
  • updated all dev packages

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 22 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)