slackapi / node-slack-sdk

Slack Developer Kit for Node.js
https://tools.slack.dev/node-slack-sdk/
MIT License
3.28k stars 662 forks source link

`MessageEvent` incorrectly references the Node global MessageEvent type. #2020 #2021

Closed varmil closed 2 months ago

varmil commented 2 months ago

Summary

This pull request resolves #2020

Requirements (place an x in each [ ])

salesforce-cla[bot] commented 2 months ago

Thanks for the contribution! Before we can merge this, we need @varmil to sign the Salesforce Inc. Contributor License Agreement.

seratch commented 2 months ago

@varmil Could you sign your CLA (see the above bot message)? Without that, we are unable to accept any external contributions 🙇

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.63%. Comparing base (a7cc255) to head (d270fe6). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2021 +/- ## ======================================= Coverage 91.63% 91.63% ======================================= Files 37 37 Lines 9946 9946 Branches 633 633 ======================================= Hits 9114 9114 Misses 820 820 Partials 12 12 ``` | [Flag](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/2021/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | Coverage Δ | | |---|---|---| | [cli-hooks](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/2021/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `95.23% <ø> (ø)` | | | [cli-test](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/2021/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `95.39% <ø> (ø)` | | | [oauth](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/2021/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `77.39% <ø> (ø)` | | | [socket-mode](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/2021/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `58.22% <ø> (ø)` | | | [web-api](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/2021/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `96.87% <ø> (ø)` | | | [webhook](https://app.codecov.io/gh/slackapi/node-slack-sdk/pull/2021/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi) | `96.65% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slackapi#carryforward-flags-in-the-pull-request-comment) to find out more.
varmil commented 2 months ago

Thank you for your prompt confirmation. I have completed the CLA. Is this okay?

seratch commented 2 months ago

Yes, good to go! Other members in my team will be checking this PR soon. Thanks again for taking the time to fix this!

filmaj commented 2 months ago

Took me a bit to understand why this solution works, but it seems like references to MessageEvent inside message.ts refer to the built-in node MessageEvent interface and not the Slack one:

Screenshot 2024-09-10 at 11 06 11 AM

I will look to add a type test in a follow-up PR to catch this. Thank you!