sindresorhus / electron-better-ipc

Simplified IPC communication for Electron apps
MIT License
715 stars 60 forks source link

Add ability to answer a specific renderer #33

Closed karaggeorge closed 4 years ago

karaggeorge commented 4 years ago

Wasn't sure if creating a new method or overloading the existing one would be best. I've gone with overloading in this PR. Can you take a look and if this works, I can update docs and typings.

If not, I can move it to a new method, which will look very similar, and it might be called something like ipcMain.answerSpecificRenderer or something like that

karaggeorge commented 4 years ago

Fixed the comments 😄 Just a note, I wasn't able to run the spectron tests locally, and I don't think they are run on CI. I think I got the strings correctly but I'm not 100% sure.

sindresorhus commented 4 years ago

It would be great if you could ensure the tests are still passing. Just upgrade the electron and spectron dependencies to latest and then run npm run test-with-spectron.

karaggeorge commented 4 years ago

I was only able to run spectron tests after updating the version based on this mapping

Fixed the tests 👍

sindresorhus commented 4 years ago

Thanks! 👌