argo-ui icon indicating copy to clipboard operation
argo-ui copied to clipboard

chore(deps): dedupe `yarn.lock`, add check for dupes

Open agilgur5 opened this issue 1 year ago • 5 comments

Equivalent to https://github.com/argoproj/argo-workflows/pull/11637 and PRs I've made in other repos

Motivation

Same as downstream et al, see https://github.com/atlassian/yarn-deduplicate#why-is-this-necessary Removes ~2.5k+ LoC from the yarn.lock by consolidating duplicated deps (and saves on disk, installation, network, dep issues, etc)

In particular for this repo, all the dep removals and changes I've done for #569 #534 #567 etc have complicated yarn.lock diffs that I've manually reduced (sometimes a removal even causes an addition because yarn just adds the latest version of the dep). This does it automatically and will ensure it doesn't happen again.

I've wanted to do it for a while but it usually merge conflicts with any other dep changes so I kept deferring it and then forgetting it 😅 There should be a lot less of those after #537 though (dependabot also most certainly contributed to duped deps)

Modifications

  • add a deduplicate script that uses yarn-deduplicate

  • run deduplicate during UI CI

  • run deduplicate once and commit the results

  • move the build script to be in the equivalent place as the build-v2 script, after start/start-v2

Verification

  • yarn deduplicate does not cause another diff
  • CI should pass
  • (yarn start is still broken until #567 is merged)

agilgur5 avatar Jul 20 '24 20:07 agilgur5

Ah a build failure in the deps, same as the ones I dealt with heavily manually before 🫠

This one appears to be in the dep: https://github.com/iarna/wide-align/issues/63. Will resolve to a lower version instead of a higher one from the dedupe to get around it

agilgur5 avatar Jul 20 '24 20:07 agilgur5

Can you rebase?

crenshaw-dev avatar Aug 22 '24 18:08 crenshaw-dev

Rebased.

agilgur5 avatar Aug 22 '24 22:08 agilgur5

Sorry, gotta ask for another rebase 😆

crenshaw-dev avatar Aug 23 '24 03:08 crenshaw-dev

Rebased once more 😅

agilgur5 avatar Aug 24 '24 14:08 agilgur5