| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I just pushed an update to the doc. |
Sorry, something went wrong.
There was a problem hiding this comment.
Why this change is necessary?
Edit: Ah, I see it now. That is kind of the point of this PR
Sorry, something went wrong.
There was a problem hiding this comment.
Bikeshedding: this belongs to the first commit «console: sub-millisecond accuracy for console.time», not to «doc: reword description of console.time».
Sorry, something went wrong.
There was a problem hiding this comment.
I moved this change to the first commit
Sorry, something went wrong.
|
Should it be semver-minor? More of an enhancement than a bug fix? |
Sorry, something went wrong.
|
LGTM if CI is happy and if there's consensus on the semver implications of the change. |
Sorry, something went wrong.
|
CI: https://ci.nodejs.org/job/node-test-commit/720/ |
Sorry, something went wrong.
There was a problem hiding this comment.
Does this break refs?
Sorry, something went wrong.
There was a problem hiding this comment.
Btw, this change is not directly related to this PR.
Sorry, something went wrong.
|
The JS part LGTM. |
Sorry, something went wrong.
|
@ChALkeR you are right, the doc refs are broken because I changed the titles. Do you you prefer to review the doc changes in another PR or just a second commit in this one ? |
Sorry, something went wrong.
There was a problem hiding this comment.
If we consider the output of the console functions to be part of the API, the I think one could view this as semver-major. The change to thses tests demonstrates how downstream apps output parsing will break.
Sorry, something went wrong.
There was a problem hiding this comment.
Good point, I don't know what is the policy about console output.
Recent changes to the output of util.format were considered semver-minor IIRC.
cc @nodejs/collaborators
Sorry, something went wrong.
There was a problem hiding this comment.
I'm going to say semver-minor for changes to console output but it's never as clear cut as it appears. For this, I personally feel it's small enough of a change that -minor is appropriate.
Sorry, something went wrong.
There was a problem hiding this comment.
The probability of this breaking anything is near zero. Still, there seems to be no reason for pulling this into 4.x branch.
Sorry, something went wrong.
|
I'm not sure this isn't actually semver-major. It's almost irrelevant right now. It'l probably have to land in v5.x anyways, but we should err on the side of caution still. |
Sorry, something went wrong.
|
OK for semver-major, this is safer. I added it to the 5.0 milestone. |
Sorry, something went wrong.
|
I put the doc changes in a separate commit. PTAL. |
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe call the parameter timerName to be in line with mdn?
Sorry, something went wrong.
There was a problem hiding this comment.
same could be done in code, maybe as a seperate commit too.
Sorry, something went wrong.
There was a problem hiding this comment.
done
Sorry, something went wrong.
|
«console: sub-millisecond accuracy for console.time» + one-line doc change («262ms» → «225.438ms») LGTM. |
Sorry, something went wrong.
|
LGTM if CI is green |
Sorry, something went wrong.
|
semver-major means TSC has to review before landing, right? |
Sorry, something went wrong.
|
@Trott ... no, semver-major changes can land in master at any time so long as there is good review. They cannot land in stable branches, however, without very good reason and TSC or LTS WG review. |
Sorry, something went wrong.
|
That said, if the change may be controversial or particularly disruptive, you may want to hold off landing until more folks have had the time to review it. |
Sorry, something went wrong.
|
@jasnell is correct. There's no reason to hold off universally approved semver-major commits with our current model, unless you specifically don't want something to land on the next major release. |
Sorry, something went wrong.
|
The onboarding.md that I have bookmarked says this:
Maybe the onboarding.md needs to be updated? Or there's a newer one that I should use instead of the one I've been using? (I'm reluctant to post the link publicly here because it's a secret gist and not a public gist.) Or maybe it really does need TSC review. As recently as three days ago, that was the conclusion for a different semver-major PR. #3078 (comment) /cc @Fishrock123 |
Sorry, something went wrong.
|
I don't think that means we need to have a formal vote on the breaking change. Only that someone from the TSC approves the PR. |
Sorry, something went wrong.
|
@trevnorris +1 for a liberal interpretation of in some form. |
Sorry, something went wrong.
Sorry, something went wrong.
I would dispute not:
https://github.com/nodejs/dev-policy#accepting-modifications-through-a-consensus-seeking-process I think it is best to keep it this way, at least for now. |
Sorry, something went wrong.
See above. :) |
Sorry, something went wrong.
|
CI is happy minus the usual test-stringbytes-external. @Trott @evanlucas @ChALkeR @nodejs/tsc: LGTY ? |
Sorry, something went wrong.
There was a problem hiding this comment.
Nittiest of all possible nits: The last sentence describes the timer precision, not the accuracy.
Slightly less nitty nit: sub-millisecond is true, but we know that it will be three decimal places, so you could just say it's to the microsecond.
Of course, I can't come up with wording for either of these nits that's better than what's already there, so ¯_(ツ)_/¯
Sorry, something went wrong.
There was a problem hiding this comment.
The last sentence describes the timer precision, not the accuracy.
You are right, I will replace "accurate" with "precise" when I land it if nobody objects.
... so you could just say it's to the microsecond
I wanted to do that but I am not sure it's true all the time and on all platforms. Perhaps if the CPU is overloaded we can lose precision ? I really don't know.
Sorry, something went wrong.
There was a problem hiding this comment.
Another possibility is just to remove that last sentence entirely. I don't think MDN indicates how many decimal places their timer is good for, for example. People can use it and they get as many decimal places as they get.
MDN stuff for reference:
Sorry, something went wrong.
There was a problem hiding this comment.
For this sentence I took inspiration from https://developer.chrome.com/devtools/docs/console-api#consoletimelabel
I fine with removing it as well
Sorry, something went wrong.
There was a problem hiding this comment.
Ah. Well, in that case, I'm fine with leaving it. If it's good enough for Chrome docs, it's good enough for me.
Sorry for all the bikeshedding on this. LGTM no matter which way you decide to go with it (leave it, remove it, change it as described).
Sorry, something went wrong.
|
A couple of nits, but I'm OK if they're addressed at a later date or ignored entirely. (They're nits after all.) LGTM |
Sorry, something went wrong.
|
Overall LGTM. There's one more slight difference to browser implementations: They limit the amount of active timers to 10000. I don't think we need this, but at least mention it. |
Sorry, something went wrong.
|
Yes, they also don't throw when you call console.timeEnd() with a non-existing timer. Another difference is that console.time() is a no-op if a timer with the same name is already running. Our implementation restarts it. |
Sorry, something went wrong.
|
Can I have a sign-off from someone in @nodejs/tsc ? |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
This makes the output of console.timeEnd in line with major browsers. PR-URL: nodejs#3166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: nodejs#3166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Name it timerName instead of label. It is clearer that way and matches the description in the doc. It is also how it's named in MDN. PR-URL: nodejs#3166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
Thanks! Landed in 642928b...8c043c1 |
Sorry, something went wrong.
This makes the output of console.timeEnd in line with major browsers. PR-URL: #3166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: #3166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Name it timerName instead of label. It is clearer that way and matches the description in the doc. It is also how it's named in MDN. PR-URL: #3166 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Notable changes: * buffer: (Breaking) Removed both 'raw' and 'raws' encoding types from Buffer, these have been deprecated for a long time (Sakthipriyan Vairamani) nodejs#2859. * console: (Breaking) Values reported by console.time() now have 3 decimals of accuracy added (Michaël Zasso) nodejs#3166. * fs: - fs.readFile*(), fs.writeFile*(), and fs.appendFile*() now also accept a file descriptor as their first argument (Johannes Wüller) nodejs#3163. - (Breaking) In fs.readFile(), if an encoding is specified and the internal toString() fails the error is no longer thrown but is passed to the callback (Evan Lucas) nodejs#3485. - (Breaking) In fs.read() (using the fs.read(fd, length, position, encoding, callback) form), if the internal toString() fails the error is no longer thrown but is passed to the callback (Evan Lucas) nodejs#3503. * http: - Fixed a bug where pipelined http requests would stall (Fedor Indutny) nodejs#3342. - (Breaking) When parsing HTTP, don't add duplicates of the following headers: Retry-After, ETag, Last-Modified, Server, Age, Expires. This is in addition to the following headers which already block duplicates: Content-Type, Content-Length, User-Agent, Referer, Host, Authorization, Proxy-Authorization, If-Modified-Since, If-Unmodified-Since, From, Location, Max-Forwards (James M Snell) nodejs#3090. - (Breaking) The callback argument to OutgoingMessage#setTimeout() must be a function or a TypeError is thrown (James M Snell) nodejs#3090. - (Breaking) HTTP methods and header names must now conform to the RFC 2616 "token" rule, a list of allowed characters that excludes control characters and a number of separator characters. Specifically, methods and header names must now match /^[a-zA-Z0-9_!#$%&'*+.^`|~-]+$/ or a TypeError will be thrown (James M Snell) nodejs#2526. * node: - (Breaking) Deprecated the _linklist module (Rich Trott) nodejs#3078. - (Breaking) Removed require.paths and require.registerExtension(), both had been previously set to throw Error when accessed (Sakthipriyan Vairamani) nodejs#2922. * npm: Upgraded to version 3.3.6 from 2.14.7, see https://github.com/npm/npm/releases/tag/v3.3.6 for more details. This is a major version bump for npm and it has seen a significant amount of change. Please see the original npm v3.0.0 release notes for a list of major changes (Rebecca Turner) nodejs#3310. * src: (Breaking) Bumped NODE_MODULE_VERSION to 47 from 46, this is necessary due to the V8 upgrade. Native add-ons will need to be recompiled (Rod Vagg) nodejs#3400. * timers: Attempt to reuse the timer handle for setTimeout().unref(). This fixes a long-standing known issue where unrefed timers would perviously hold beforeExit open (Fedor Indutny) nodejs#3407. * tls: - Added ALPN Support (Shigeki Ohtsu) nodejs#2564. - TLS options can now be passed in an object to createSecurePair() (Коренберг Марк) nodejs#2441. - (Breaking) The default minimum DH key size for tls.connect() is now 1024 bits and a warning is shown when DH key size is less than 2048 bits. This a security consideration to prevent "logjam" attacks. A new minDHSize TLS option can be used to override the default. (Shigeki Ohtsu) nodejs#1831. * util: - (Breaking) util.p() was deprecated for years, and has now been removed (Wyatt Preul) nodejs#3432. - (Breaking) util.inherits() can now work with ES6 classes. This is considered a breaking change because of potential subtle side-effects caused by a change from directly reassigning the prototype of the constructor using `ctor.prototype = Object.create(superCtor.prototype, { constructor: { ... } })` to using `Object.setPrototypeOf(ctor.prototype, superCtor.prototype)` (Michaël Zasso) nodejs#3455. * v8: (Breaking) Upgraded to 4.6.85.25 from 4.5.103.35 (Ali Ijaz Sheikh) nodejs#3351. - Implements the spread operator, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator for further information. - Implements new.target, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new.target for further information. * zlib: Decompression now throws on truncated input (e.g. unexpected end of file) (Yuval Brik) nodejs#2595. PR-URL: nodejs#3466
Notable changes: * buffer: (Breaking) Removed both 'raw' and 'raws' encoding types from Buffer, these have been deprecated for a long time (Sakthipriyan Vairamani) #2859. * console: (Breaking) Values reported by console.time() now have 3 decimals of accuracy added (Michaël Zasso) #3166. * fs: - fs.readFile*(), fs.writeFile*(), and fs.appendFile*() now also accept a file descriptor as their first argument (Johannes Wüller) #3163. - (Breaking) In fs.readFile(), if an encoding is specified and the internal toString() fails the error is no longer thrown but is passed to the callback (Evan Lucas) #3485. - (Breaking) In fs.read() (using the fs.read(fd, length, position, encoding, callback) form), if the internal toString() fails the error is no longer thrown but is passed to the callback (Evan Lucas) #3503. * http: - Fixed a bug where pipelined http requests would stall (Fedor Indutny) #3342. - (Breaking) When parsing HTTP, don't add duplicates of the following headers: Retry-After, ETag, Last-Modified, Server, Age, Expires. This is in addition to the following headers which already block duplicates: Content-Type, Content-Length, User-Agent, Referer, Host, Authorization, Proxy-Authorization, If-Modified-Since, If-Unmodified-Since, From, Location, Max-Forwards (James M Snell) #3090. - (Breaking) The callback argument to OutgoingMessage#setTimeout() must be a function or a TypeError is thrown (James M Snell) #3090. - (Breaking) HTTP methods and header names must now conform to the RFC 2616 "token" rule, a list of allowed characters that excludes control characters and a number of separator characters. Specifically, methods and header names must now match /^[a-zA-Z0-9_!#$%&'*+.^`|~-]+$/ or a TypeError will be thrown (James M Snell) #2526. * node: - (Breaking) Deprecated the _linklist module (Rich Trott) #3078. - (Breaking) Removed require.paths and require.registerExtension(), both had been previously set to throw Error when accessed (Sakthipriyan Vairamani) #2922. * npm: Upgraded to version 3.3.6 from 2.14.7, see https://github.com/npm/npm/releases/tag/v3.3.6 for more details. This is a major version bump for npm and it has seen a significant amount of change. Please see the original npm v3.0.0 release notes for a list of major changes (Rebecca Turner) #3310. * src: (Breaking) Bumped NODE_MODULE_VERSION to 47 from 46, this is necessary due to the V8 upgrade. Native add-ons will need to be recompiled (Rod Vagg) #3400. * timers: Attempt to reuse the timer handle for setTimeout().unref(). This fixes a long-standing known issue where unrefed timers would perviously hold beforeExit open (Fedor Indutny) #3407. * tls: - Added ALPN Support (Shigeki Ohtsu) #2564. - TLS options can now be passed in an object to createSecurePair() (Коренберг Марк) #2441. - (Breaking) The default minimum DH key size for tls.connect() is now 1024 bits and a warning is shown when DH key size is less than 2048 bits. This a security consideration to prevent "logjam" attacks. A new minDHSize TLS option can be used to override the default. (Shigeki Ohtsu) #1831. * util: - (Breaking) util.p() was deprecated for years, and has now been removed (Wyatt Preul) #3432. - (Breaking) util.inherits() can now work with ES6 classes. This is considered a breaking change because of potential subtle side-effects caused by a change from directly reassigning the prototype of the constructor using `ctor.prototype = Object.create(superCtor.prototype, { constructor: { ... } })` to using `Object.setPrototypeOf(ctor.prototype, superCtor.prototype)` (Michaël Zasso) #3455. * v8: (Breaking) Upgraded to 4.6.85.25 from 4.5.103.35 (Ali Ijaz Sheikh) #3351. - Implements the spread operator, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator for further information. - Implements new.target, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new.target for further information. * zlib: Decompression now throws on truncated input (e.g. unexpected end of file) (Yuval Brik) #2595. PR-URL: #3466
| Back | FazBrowse Home | New Git URL |
This makes the output of console.timeEnd in line with major browsers.