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

Refactor pnpm updater to handle devDependencies and optimize update logic #11304

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kbukum1
Copy link
Contributor

@kbukum1 kbukum1 commented Jan 14, 2025

What are you trying to accomplish?

This PR refactors the pnpm updater logic to improve how it handles devDependencies and other dependencies. The changes include:

  • Separating devDependencies and other dependencies for updates.
  • Using the --save-dev flag specifically for devDependencies.
  • Avoiding unnecessary resets of changes by skipping pnpm install when an experimental flag is enabled.

This resolves potential issues where the pnpm install step overwrites previous updates and optimizes dependency management.

Anything you want to highlight for special attention from reviewers?

  • The decision to handle devDependencies and others separately simplifies the logic for updates and minimizes unnecessary operations.
  • If there are better alternatives to managing devDependencies with the --save-dev flag or skipping pnpm install, feedback is welcome.

How will you know you've accomplished your goal?

  • The new updater logic ensures that devDependencies and other dependencies are correctly updated with their respective flags.
  • The changes are behind feature flag, enable_fix_for_pnpm_no_change_error.
  • Tests will confirm that the updates and lockfile changes behave as expected under different scenarios.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@kbukum1 kbukum1 marked this pull request as ready for review January 14, 2025 23:30
@kbukum1 kbukum1 requested a review from a team as a code owner January 14, 2025 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant