Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: remove dependency on copy-template-dir #6659

Conversation

Lunnatica
Copy link
Contributor

@Lunnatica Lunnatica commented May 23, 2024

🎉 Thanks for submitting a pull request! 🎉

Summary

Fixes #5724

We want to get rid of the deprecation warnings when running npm i -g netlify-cli.

This was caused by an outdated dependency in copy-template-dir, readdirp.

Since the package is no longer being maintained, this PR brings in the functionality of copy-template-dir so we can update readdirp to the latest version ourselves. A few changes to the copy-template-dir functionality have been done as part of this:

  • Convert into ts
  • Convert tests into vitest
  • Get rid of unnecessary dependencies (e.g. graceful-fs)
  • Upgrade dependencies that were brought in as part of the packages
  • Remove unused cb argument

Testing

Running npm i in main (before changes):
Screenshot 2024-05-23 at 17 46 58

Running npm i in the branch (with the changes):
Screenshot 2024-05-23 at 17 47 31


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

Copy link

github-actions bot commented May 23, 2024

📊 Benchmark results

Comparing with 85a74da

  • Dependency count: 1,231 ⬇️ 9.02% decrease vs. 85a74da
  • Package size: 295 MB ⬇️ 1.60% decrease vs. 85a74da
  • Number of ts-expect-error directives: 997 (no change)

@Lunnatica Lunnatica marked this pull request as ready for review May 23, 2024 17:02
@Lunnatica Lunnatica requested a review from a team as a code owner May 23, 2024 17:02
Copy link
Contributor

@TylerBarnes TylerBarnes left a comment

Choose a reason for hiding this comment

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

Dope! 🙌 🚀

@Lunnatica Lunnatica merged commit a158331 into main May 24, 2024
48 checks passed
@Lunnatica Lunnatica deleted the paulalopezantelo/ct-1055-remove-deprecated-packages-from-cli-that-are-displayed-on branch May 24, 2024 08:38
@ben221199
Copy link

Nice

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix npm deprecations.
3 participants