Skip to content

fix: upgrade most packages that use rimraf and glob #14153

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

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from

Conversation

ShadowCat567
Copy link
Contributor

@ShadowCat567 ShadowCat567 commented Apr 1, 2025

Description of changes

Many packages were out of date and using deprecated versions of rimraf and glob that had memory leaks. This PR fixes the vast majority of the outdated packages.
Moved some of the packages that cannot be updated to devDependencies.
All remaining outdated packages that have not been moved to devDependencies come from data repositories, these will be addressed in a separate PR.

Issue #, if available #13889

Description of how you validated changes

Ensured that the project still builds and the tests still work.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ShadowCat567 ShadowCat567 changed the title fix: testing something fix: fix: upgrade most packages that use rimraf and glob Apr 1, 2025
@ShadowCat567 ShadowCat567 changed the title fix: fix: upgrade most packages that use rimraf and glob fix: upgrade most packages that use rimraf and glob Apr 1, 2025
@Amplifiyer
Copy link
Contributor

Do we need this PR?

@ShadowCat567
Copy link
Contributor Author

Do we need this PR?

This is an attempt to upgrade packages that use old versions of glob and rimraf, since when you install amplify-cli this message appears:

npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported

The memory leak issue is the most concerning of the 3 warnings, and it comes from versions of glob prior to v9 having a dependency on inflight (older versions of rimraf have a dependency on glob, so they also have this memory leak issue).
This PR aims to get as many packages as possible to use recent version of rimraf and glob, however it is not possible to get all of our packages in Gen1 CLI to stop using old version of rimraf and glob since we have some deprecated packages (like istanbul) that use them and won't receive updates.
If you think that because we can't entirely upgrade out of using old version of rimraf and glob, this PR is irrelevant, I can close it.

@ShadowCat567
Copy link
Contributor Author

Do we need this PR?

Additionally if this PR is deemed unnecessary, is it worth the effort to do similar updates in the Gen2 CLI and Data repositories?

@Amplifiyer
Copy link
Contributor

We should do this unless there are blockers. Also looking at istanbul it seems we are not even using it anymore? I don't see the coverage:collect being used anywhere. If we can remove it even better.

@ShadowCat567 ShadowCat567 marked this pull request as ready for review April 9, 2025 23:01
@ShadowCat567 ShadowCat567 requested review from a team as code owners April 9, 2025 23:01
"rm-aa-dev-link": "rimraf -f \".bin/amplify-app-dev\"",
"rm-dev-link": "rimraf -f \".bin/amplify-dev\"",
"rm-aa-dev-link": "rimraf \".bin/amplify-app-dev\"",
"rm-dev-link": "rimraf \".bin/amplify-dev\"",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

2 participants