Skip to content

Conversation

undefined-moe
Copy link

No description provided.

@auvipy auvipy requested review from Copilot and auvipy August 7, 2025 04:36
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates documentation to reflect a breaking API change where the attach method has been replaced with installHandlers in the SockJS library. This ensures the README provides accurate usage examples for the current API.

  • Replaces all instances of echo.attach() and sockjs_server.attach() with installHandlers()
  • Updates corresponding documentation text to reference the new method name

@@ -197,7 +197,7 @@ and emits following event:
All http requests that don't go under the path selected by `prefix`
will remain unanswered and will be passed to previously registered
handlers. You must install your custom http handlers before calling
`attach`. You can remove the SockJS handler later with `detach`.
`installHandlers`. You can remove the SockJS handler later with `detach`.
Copy link
Preview

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

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

The documentation mentions that handlers can be removed with detach, but if attach has been replaced with installHandlers, the removal method may have also changed. Consider verifying if detach is still the correct method name or if it should be updated to match the new API.

Suggested change
`installHandlers`. You can remove the SockJS handler later with `detach`.
`installHandlers`. You can remove the SockJS handler later with `uninstallHandlers`.

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

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

can you please cross check this review?

@undefined-moe
Copy link
Author

undefined-moe commented Aug 8, 2025

Wow it's already 3 yrs ago

I double checked the commit history and the fact is the API changed from installHandler() to attach() and this change kept unreleased for years, thus I made this mistake misidentifying the "old" and "new" version.

And seems this issue confuses lots of people:

Closing as false positive.

@auvipy
Copy link
Member

auvipy commented Aug 8, 2025

thanks!

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

Successfully merging this pull request may close these issues.

2 participants