Skip to content

Conversation

@jlaine
Copy link
Contributor

@jlaine jlaine commented Nov 27, 2017

Switch from eslint-loader to babel-loader to allow using modern constructs
such as arrow functions or ES6 classes while still retaining "compatibility"
with older browsers. It's worth mentioning browsers which support WebRTC
already ship with ES6 support, but at least we won't trigger parser errors
on the older browsers.

The cost in terms of runtime size is negligeable, the minified code grows
by less than 400 bytes as a result of the switch. Note: we don't pull in
any polyfills with this commit, so only ES6 constructs are supported, not
using new classes such as Map or Set.

We still perform linting as part of the build, by invoking eslint in the
prebuild step.

Switch from eslint-loader to babel-loader to allow using modern constructs
such as arrow functions or ES6 classes while still retaining "compatibility"
with older browsers. It's worth mentioning browsers which support WebRTC
already ship with ES6 support, but at least we won't trigger parser errors
on the older browsers.

The cost in terms of runtime size is negligeable, the minified code grows
by less than 400 bytes as a result of the switch. Note: we don't pull in
any polyfills with this commit, so only ES6 constructs are supported, not
using new classes such as Map or Set.

We still perform linting as part of the build, by invoking eslint in the
prebuild step.
@james-criscuolo
Copy link
Collaborator

This looks good to me. Eslint still runs automatically while building, and it failing still halts the build with an error.

Generally speaking, longterm we would like to move to typescript, but babel is an adequate and noninvasive middle-step.

jlaine referenced this pull request Nov 27, 2017
In order to allow API consumers to register to events emitted by the client
context, we need to make sure that no events are emitted until after the
context has been returned. We do this by using waitForConnected, a promise
to when the UA is connected.

We now also emit inviteSent only once the invite *has* actually been sent.
If the UA was not connected yet, the event was emitted before the invite had
been sent.
@jlaine
Copy link
Contributor Author

jlaine commented Nov 29, 2017

Any chance of merging this @egreenmachine ?

@egreenmachine
Copy link
Collaborator

My goal is to do a 0.9.0 release with #459 which was just merged, then we shall see what is next. It is in the queue.

@egreenmachine egreenmachine merged commit a3a7e4e into onsip:master Dec 4, 2017
@jlaine jlaine deleted the babel-loader branch July 12, 2018 17:09
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.

3 participants