Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Winston 3 compatibility #39
Conversation
| @@ -129,7 +141,11 @@ Loggly.prototype.log = function (level, msg, meta, callback) { | |||
| callback(err, true); | |||
| } | |||
|
|
|||
| <<<<<<< HEAD | |||
mostlyjason
Jun 25, 2018
looks like there might be an merge conflict you need to resolve?
looks like there might be an merge conflict you need to resolve?
| @@ -139,9 +155,9 @@ Loggly.prototype.log = function (level, msg, meta, callback) { | |||
| // #### @options {Object} Set stream options | |||
| // Returns a log stream. | |||
| // | |||
| Loggly.prototype.stream = function(options) { | |||
| Loggly.prototype.stream = function(maybeOptions) { | |||
mostlyjason
Jun 25, 2018
why rename to maybeOptions?
why rename to maybeOptions?
OtterCode
Jun 25, 2018
Author
maybeOptions is just a personal convention for function arguments that can be undefined. Later in the function on line 160 it assigns options to either the argument that gets passed, or an empty object, if it's undefined. Reassignment to the same variable is good to avoid wherever possible . The raw maybeOptions argument doesn't get used until you later guarantee that it contains at least an empty object, and two variables is the best way to that.
maybeOptions is just a personal convention for function arguments that can be undefined. Later in the function on line 160 it assigns options to either the argument that gets passed, or an empty object, if it's undefined. Reassignment to the same variable is good to avoid wherever possible . The raw maybeOptions argument doesn't get used until you later guarantee that it contains at least an empty object, and two variables is the best way to that.
|
@OtterCode will this new version be backward-compatible with Winston 2.x or do we need to keep it separate? |
|
@mostlyjason So, I changed the winston version to 2.4 in the package, and tests still passed. I've got a few small tweaks to push, then it should all be good. We should still probably merge it into the 3.x branch first, just for verification. |
No description provided.