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

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

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

agilgur5
Copy link

@agilgur5 agilgur5 commented Jul 20, 2024

Equivalent to argoproj/argo-workflows#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

@agilgur5 agilgur5 added type/dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Jul 20, 2024
@agilgur5
Copy link
Author

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: iarna/wide-align#63. Will resolve to a lower version instead of a higher one from the dedupe to get around it

@crenshaw-dev
Copy link
Member

Can you rebase?

@agilgur5
Copy link
Author

Rebased.

@agilgur5 agilgur5 requested a review from crenshaw-dev August 22, 2024 22:06
@crenshaw-dev
Copy link
Member

Sorry, gotta ask for another rebase 😆

Anton Gilgur added 3 commits August 24, 2024 10:00
- add a `deduplicate` script that uses `yarn-deduplicate`
- run `deduplicate` during UI CI
- run `deduplicate` once and commit the results

- similar to a PR I made in Workflows and PRs in other repos

Signed-off-by: Anton Gilgur <[email protected]>
@agilgur5
Copy link
Author

Rebased once more 😅

@crenshaw-dev crenshaw-dev merged commit 45b5ce2 into argoproj:master Oct 11, 2024
5 checks passed
@agilgur5 agilgur5 deleted the chore-deps-dedupe branch October 12, 2024 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code type/dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants