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:
Fixed incorrect Sorbet type annotations for methods in the package manager helpers.
Ensured consistent handling of method signatures and parameters for all package manager classes (NpmPackageManager, YarnPackageManager, PNPMPackageManager).
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
[x] I have run the complete test suite to ensure all tests and linters pass.
[x] I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
[x] I have written clear and descriptive commit messages.
[x] 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.
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:
NpmPackageManager
,YarnPackageManager
,PNPMPackageManager
).installed_version
,setup
, and other helper methods.What issues does this affect or fix?
npm_and_yarn
ecosystem.Anything you want to highlight for special attention from reviewers?
installed_version
,setup
, andrun_yarn_commands
to ensure that the updated types align with expectations.How will you know you've accomplished your goal?
installed_version
,setup
) work as expected in various scenarios without type mismatches.Checklist