eventsource icon indicating copy to clipboard operation
eventsource copied to clipboard

Only parse url if it's a string

Open rumpl opened this issue 4 years ago • 5 comments

With this change we can use eventsource even when calling a server over a unix domain socket, for example:

const es = new EventSource({
  socketPath: 'some-socket.sock',
  path: '/my-path',
});
...

rumpl avatar Apr 08 '21 14:04 rumpl

The failure on node 4.x seems unrelated to my change

 SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/runner/work/eventsource/eventsource/node_modules/standard/node_modules/standard-engine/node_modules/deglob/index.js:8:16)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
npm ERR! Test failed.  See above for more details.
Error: Process completed with exit code 1.

rumpl avatar Apr 09 '21 07:04 rumpl

This simple PR is very helpful to have Unix Domain Socket support. Could anyone have an eye on it please?

trungutt avatar Nov 18 '21 15:11 trungutt

The force push is just a rebase with master

rumpl avatar Nov 24 '21 13:11 rumpl

ping @rexxars PTAL; looks like we're currently maintaining a fork because of this ~fix~ enhancement missing in the upstream repository 😓 would be great to see this merged so that we can get rid of the fork.

thaJeztah avatar May 27 '22 08:05 thaJeztah

@rumpl could you do a rebase to trigger CI?

thaJeztah avatar May 27 '22 08:05 thaJeztah