New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0.0 changelog #934
Comments
There are some typos, but looks good otherwise: checkServerIdentify should be checkServerIdentity |
Saved as draft under https://github.com/websockets/ws/releases, closing. |
Disappointing to see you drop Node support! Won't be able to continue on in the 2.0 branch I suppose. Care too much about the installed base. ES6 continues to infect otherwise good projects. |
@erikpukinskis you can fork and transpile via babel if you care about Node.js < 4. |
@lpinca That's a great idea! I hadn't thought of that. I'm just going to stay on the 1.0 branch for now, but yours is one of the (extremely) few low level libraries I rely on so I may eventually look into transpiling. Thanks for your hard work. I think ES6 has destroyed the most powerful aspects of Javascript (simple build tools, ubiquitous runtime, small language) so I am very frustrated with module authors requiring the new heavier build architecture. If my comment seemed aggressive it's just that frustration coming out. ES6 is infecting the entire JavaScript world making it increasingly difficult to run true JavaScript applications. But I really appreciate the time you've put into this module it is excellent. Is there any plan for maintenance of the 1.0 branch? What would be a good place to watch for discussions of security updates? |
No problem, I understand and I partially agree but wanted or not ES6+ is the future and some features were really needed imo :)
I don't think so as I don't want to bang on the 1.0 drums any longer but other collaborators might disagree with me and come up with a plan to backport bug and security fixes to the 1.0 branch. Thanks for sharing your opinion! |
The release is not ready yet but I spent some time writing a changelog with the changes up until now. Here it is:
Breaking changes
new
operator is now required to create all instances as we moved to ES6classes.
clients
property of theWebSocketServer
is no longer anArray
but aSet
and is only set if theclientTracking
option is truthy (Use a set instead of an array to track clients #806).WebSocketServer
swhen binding them to the same underlying HTTP/s server (Remove path registry #885).
WebSocket.prototype.stream()
and ability to pass a readable streamto
WebSocket.prototype.send()
(Removestream
method and ability to send a stream #875).handleProtocols
handler (Remove callback fromhandleProtocols
#890).supports
property fromWebSocket
(Removesupports
attribute #918).WebSocket.createServer()
,WebSocket.createConnection()
, andWebSocket.connect()
factory functions (RemoveWebSocket.createServer()
andWebSocket.connect()
#926).The following breaking changes only apply if you required the mentioned classes
directly.
Sender
inheritance fromEventEmitter
(Remove Sender inheritance from EventEmitter #861).BufferPool
class (73ab370).extensions
a required argument for theReceiver
constructor (5f53194).Features
WebSocketServer
(Allow 'backlog' option for listening socket #795).checkServerIdentity
option toWebSocket
(Added checkServerIdentity option to WebSocket #701).threshold
option for permessage-deflate to only compress messageswhose size is bigger than
threshold
(6b3904b).shouldHandle
method toWebSocketServer
to see if a request shouldbe accepted or rejected. This method can be overridden by the user if a
custom logic is desired (6472425).
removeEventListener
method toWebSocket
(078e96a).Bug fixes
handled (fix PerMessageDeflate options pass issue #744).
error
events are now emitted with a properError
instance (Make sure that no string is emitted as an error #789).validation failed (Issue path validation #534).
fin
option ofWebSocket.prototype.send()
wasunconditionally set to
true
(ea50be7).being correctly calculated (545635d).
zlib.flush()
was called with a wrong flush level(Permessage-deflate calls zlib flush with wrong flush level #733).
WebSocketServer.prototype.close()
is now invoked when theclose
event is emitted by the underlying HTTP/s server (Invoke the close callback when the close event is emitted #892).with default settings (dcdc652).
connection
event was emitted even if the clientclosed the connection during the handshake process (04530ad).
crypto.randomBytes()
instead ofMath.random()
(7253f06).Can a native speaker take a look and check if my Itanglish is ok or if there is something that is not clear enough?
Thanks!
The text was updated successfully, but these errors were encountered: