-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
feat: support clearLockedPorts #70
feat: support clearLockedPorts #70
Conversation
I don't think this should be exported. If the need is to clear the cache, a clear cache function should be exported. This contribution also feels ChatGPT generated. If it is, it should be made clear that it is. |
@sindresorhus I've changed it to export a function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx
The docs should also note that clearing the cache could cause race conditions, since it makes this no longer true:
|
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Previously,
lockedPorts
was not exported, which made it impossible to clear the cache.By exporting
lockedPorts
, we can now manipulate it directly, allowing for cache clearing when necessary. This change will improve the flexibility of the library and allow users to better control the state of their applications.Here is a brief overview of the changes:
lockedPorts
in the main library file.Please review these changes and let me know if you have any questions or concerns. Thank you for considering this contribution.