Conversation
jsjoeio
left a comment
There was a problem hiding this comment.
This is awesome! Love the code comments too
P.S. - was this the thing we were discussing where I said I would learn from the code and write a test?
|
Fixed up the double/single quote errors. Nope, this is mostly just to set the stage so when it happens again we'll have some better logs to figure out what's going on. |
| this.logger = logger.named( | ||
| this.name, | ||
| field("token", this.protocol.options.reconnectionToken), | ||
| field('token', this.protocol.options.reconnectionToken), |
There was a problem hiding this comment.
what's the difference between " and ' in JavaScript/TypeScript?
There was a problem hiding this comment.
None but VS Code's linting rules enforce ' for "unlocalized" strings (well technically externalized strings) so the only time they are allowed is in calls like:
localize('projectQuickPick.help', "TypeScript help")
There was a problem hiding this comment.
ah very interesting pattern, so they're using something that extracts all "-quoted strings into resource bundles?
There was a problem hiding this comment.
I think they might be doing something like that, although if they can already detect and report to the dev when a string should be using " or ' I'm not sure why they can't just use that knowledge to extract it and don't bother the dev. 😛
|
Nice work! Merge whenever 🚢 |
- Move destroy logic into the class itself - Improve logging a bit - Remove the record option; we should always do this when using permessage-deflate. - Let debug port be null (it can be null in the message args). - Add setSocket so we don't have to initiate a connection to set it. - Move inflate bytes logic into the class itself.
- Moved everything I could into the class itself. - Improve the logging situation a bit. - Switch some trace logs to debug. - Get debug port from message arguments.
zlib errors can cause the protocol handshake to not reject (until the timeout).
More details in the commit messages.