Skip to content

Conversation

scottinet
Copy link
Contributor

@scottinet scottinet commented Dec 7, 2017

⚠️ depends on #265 ⚠️

Description

Remove the ability to connect automatically from Kuzzle's main object constructor:

  • a constructor should always avoid side effects, especially I/O
  • this removes the confusion about the callback passed to Kuzzle constructor but called only by kuzzle.connect(): the constructor does not take a callback anymore, but connect does
  • kuzzle.connect can now be promisified into kuzzle.connectPromise, as many users expected from reading our documentation
  • kuzzle.connect now returns nothing, as it makes no sense chaining calls on an asynchronous network connection method
  • this makes the connection workflow much more clearer

Note: a documentation update will be submitted shortly

@scottinet scottinet self-assigned this Dec 7, 2017
@codecov-io
Copy link

codecov-io commented Dec 7, 2017

Codecov Report

Merging #266 into 6.x will increase coverage by 0.18%.
The diff coverage is 97.26%.

Impacted file tree graph

@@            Coverage Diff             @@
##              6.x     #266      +/-   ##
==========================================
+ Coverage   98.27%   98.46%   +0.18%     
==========================================
  Files          17       17              
  Lines        2140     2079      -61     
  Branches      623      604      -19     
==========================================
- Hits         2103     2047      -56     
+ Misses         37       32       -5
Impacted Files Coverage Δ
src/networkWrapper/protocols/websocket.js 100% <100%> (ø) ⬆️
src/networkWrapper/protocols/abstract/realtime.js 98.63% <100%> (ø) ⬆️
src/networkWrapper/protocols/socketio.js 94.82% <91.66%> (-5.18%) ⬇️
src/eventEmitter/index.js 97.14% <96.22%> (+4.66%) ⬆️
src/Kuzzle.js 97.84% <97.76%> (+0.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f56496...5d420c8. Read the comment docs.

@scottinet scottinet merged commit 28a9beb into 6.x Dec 18, 2017
@scottinet scottinet deleted the remove_autoConnect branch December 18, 2017 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants