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

Fix Sorbet Typings for npm_and_yarn Ecosystem Package Manager and Helpers #10975

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

kbukum1
Copy link
Contributor

@kbukum1 kbukum1 commented Nov 20, 2024

What are you trying to accomplish?

This PR addresses issues related to Sorbet typings in the npm_and_yarn ecosystem package manager. The goal is to ensure proper type safety and consistency across the codebase, reducing potential runtime errors and improving maintainability.

Key Changes:

  1. Fixed incorrect Sorbet type annotations for methods in the package manager helpers.
  2. Ensured consistent handling of method signatures and parameters for all package manager classes (NpmPackageManager, YarnPackageManager, PNPMPackageManager).
  3. Resolved errors caused by type mismatches in installed_version, setup, and other helper methods.

What issues does this affect or fix?

  • Improves the robustness of type-checking in the npm_and_yarn ecosystem.
  • Aligns method signatures with actual usage patterns in the package manager implementation.

Anything you want to highlight for special attention from reviewers?

  • Review the changes to installed_version, setup, and run_yarn_commands to ensure that the updated types align with expectations.
  • Ensure no runtime behavior has been altered while fixing Sorbet type definitions.
  • Validate tests for all edge cases to confirm compliance with the updated typings.

How will you know you've accomplished your goal?

  • The complete test suite passes without Sorbet-related errors.
  • All method signatures adhere to the updated type definitions, providing consistent behavior.
  • The package manager helper functions (installed_version, setup) work as expected in various scenarios without type mismatches.

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

@kbukum1 kbukum1 marked this pull request as ready for review November 20, 2024 20:30
@kbukum1 kbukum1 requested a review from a team as a code owner November 20, 2024 20:30
@kbukum1 kbukum1 merged commit fb5e797 into main Nov 20, 2024
66 checks passed
@kbukum1 kbukum1 deleted the kamil/fix_sorbet_types_for_npm_and_yarn_pm_and_helper branch November 20, 2024 22:42
@kbukum1 kbukum1 self-assigned this Nov 21, 2024
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.

3 participants