transloadit / uppy-server

[DEPRECATED] 'Uppy Server' was renamed to 'Companion' and lives inside the Uppy repo no
https://github.com/transloadit/uppy/tree/master/packages/%40uppy/companion
MIT License
114 stars 27 forks source link

Rename `host` and `hostPattern` #96

Closed kvz closed 6 years ago

kvz commented 6 years ago

Host is usually: jane.transloadit.com but since host in our case contains a full url with many more components (protocol, path, etc), I'd vote to name it endpoint.

hostPattern could than be named allowedOrigins which could either take (an array for a list of flat origins, a function to be executed on a string which returns true or false, or) a RegExp.

The proposals are up for discussion, but I do think a change is needed.

For BC-compat, we could likely still accept host and throw a Deprecation warning at the console for a release or two.

arturi commented 6 years ago

The only issue with endpoint is that we use it in uploader plugins, and that might contribute to a popular misunderstanding that Uppy Server is an upload target. Not an end of the world, just noting.

kvz commented 6 years ago

That's a fair point. How about url then?

arturi commented 6 years ago

serverUrl and serverPattern? 🤔

ifedapoolarewaju commented 6 years ago

I like url better. We never used serverHost, so maybe no need for serverUrl either.

ifedapoolarewaju commented 6 years ago

on second thought, serverUrl and serverPattern tells it just right, and avoids any future confusion whatsoever. So I'll go with those instead https://github.com/transloadit/uppy/pull/905

ifedapoolarewaju commented 6 years ago

For BC-compat, we could likely still accept host and throw a Deprecation warning at the console for a release or two.

@kvz do we really need to? Since we are still pre-1.0 and breaking changes are still permitted-ish?

kvz commented 6 years ago

That’s fair! I expect some people will upgrade and forget to change, so maybe we can just fail fast and hard when no serverUrl is set. Perhaps this is already the case (for host, currently). Then we can just rename, note Breaking in the changelog and be done with it 👌

Sent from mobile, pardon the brevity.

On 14 Jun 2018, at 04:08, Ifedapo .A. Olarewaju notifications@github.com wrote:

For BC-compat, we could likely still accept host and throw a Deprecation warning at the console for a release or two.

@kvz do we really need to? Since we are still pre-1.0 and breaking changes are still permitted-ish?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

ifedapoolarewaju commented 6 years ago

done here https://github.com/transloadit/uppy/pull/905