summaryrefslogtreecommitdiff
path: root/doc/api/console.md
AgeCommit message (Collapse)Author
2019-01-182019-01-17, Version 11.7.0 (Current), @BridgeARRuben Bridgewater
Notable Changes * compression / zlib: * Added brotli support (Anna Henningsen and Zach Vacura) https://github.com/nodejs/node/pull/24938 * console: * Added `inspectOptions` option (Ruben Bridgewater) https://github.com/nodejs/node/pull/24978 * crypto: * Always accept private keys as public keys (Tobias Nießen) https://github.com/nodejs/node/pull/25217 * deps: * Upgrade npm to v6.5.0 (Jordan Harband) https://github.com/nodejs/node/pull/25234 * fs: * Use internalBinding('fs') internally instead of process.binding('fs') (Masashi Hirano) https://github.com/nodejs/node/pull/22478 * http(s): * Support overriding http\\s.globalAgent (Roy Sommer) https://github.com/nodejs/node/pull/25170 * util: * Inspect ArrayBuffers contents closely (Ruben Bridgewater) https://github.com/nodejs/node/pull/25006 * worker: * Expose workers by default and remove `--experimental-worker` flag (Anna Henningsen) https://github.com/nodejs/node/pull/25361 PR-URL: https://github.com/nodejs/node/pull/25537
2018-12-182018-12-18, Version 8.14.1 'Carbon' (LTS)Beth Griggs
Notable changes: * **assert**: - revert breaking change (Ruben Bridgewater) [#24786](https://github.com/nodejs/node/pull/24786) * **http2**: - fix sequence of error/close events (Gerhard Stoebich) [#24789](https://github.com/nodejs/node/pull/24789) PR-URL: https://github.com/nodejs/node/pull/24832
2018-12-17console: add `inspectOptions` optionRuben Bridgewater
Add an `inspectOptions` option to the `console` constructor. That way it's possible to define all inspection defaults for each `console` instance instead of relying on the `inspect()` defaults. PR-URL: https://github.com/nodejs/node/pull/24978 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-07-182018-07-18, Version 10.7.0 (Current)Michaël Zasso
Notable changes: * console: * The `console.timeLog()` method has been implemented. (https://github.com/nodejs/node/pull/21312) * deps: * Upgrade to libuv 1.22.0. (https://github.com/nodejs/node/pull/21731) * Upgrade to ICU 62.1 (Unicode 11, CLDR 33.1). (https://github.com/nodejs/node/pull/21728) * http: * Added support for passing both `timeout` and `agent` options to `http.request`. (https://github.com/nodejs/node/pull/21204) * inspector: * Expose the original console API in `require('inspector').console`. (https://github.com/nodejs/node/pull/21659) * napi: * Added experimental support for functions dealing with bigint numbers. (https://github.com/nodejs/node/pull/21226) * process: * The `process.hrtime.bigint()` method has been implemented. (https://github.com/nodejs/node/pull/21256) * Added the `--title` command line argument to set the process title on startup. (https://github.com/nodejs/node/pull/21477) * trace_events: * Added process_name metadata. (https://github.com/nodejs/node/pull/21477) * Added new collaborators * codebytere - Shelley Vohr PR-URL: https://github.com/nodejs/node/pull/21851
2018-07-15doc: declare all parameter typesSam Ruby
PR-URL: https://github.com/nodejs/node/pull/21782 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-07-04console: implement timeLog methodMichaël Zasso
Refs: https://github.com/whatwg/console/pull/138 PR-URL: https://github.com/nodejs/node/pull/21312 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-17doc: fix indentation in console.mdVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/21367 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-06-16doc: fix heading of optional console method argsMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/21311 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-08doc: match console.count()/countReset() signaturesLambdac0re
PR-URL: https://github.com/nodejs/node/pull/20599 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-02doc: add missing periods or colonsVse Mozhet Byt
Some other formatting nits were fixed and some superfluous descriptions were simplified in passing. PR-URL: https://github.com/nodejs/node/pull/20401 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-04-29doc: remove redundant empty linesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20398 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-27doc: fix typo in console.mdDaniel Hritzkiv
logit -> log it PR-URL: https://github.com/nodejs/node/pull/20349 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-04-26doc: remove console.table() as inspector-dependentRich Trott
`console.table()` is implemented in Node.js core and no longer requires the inspector for use. PR-URL: https://github.com/nodejs/node/pull/20346 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-04-242018-04-24, Version 10.0.0 (Current)James M Snell
* Assert * Calling `assert.fail()` with more than one argument is deprecated. #70dcacd710 * Calling `assert.ok()` with no arguments will now throw. #3cd7977a42 * Calling `assert.ifError()` will now throw with any argument other than `undefined` or `null`. Previously the method would throw with any truthy value. #e65a6e81ef * The `assert.rejects()` and `assert.doesNotReject()` methods have been added for working with async functions. #599337f43e * Async_hooks * Older experimental async_hooks APIs have been removed. #1cc6b993b9 * Buffer * Uses of `new Buffer()` and `Buffer()` outside of the `node_modules` directory will now emit a runtime deprecation warning. #9d4ab90117 * `Buffer.isEncoding()` now returns `undefined` for falsy values, including an empty string. #452eed956e * `Buffer.fill()` will throw if an attempt is made to fill with an empty `Buffer`. #1e802539b2 * Child Process * Undefined properties of env are ignored. #38ee25e2e2, #85739b6c5b * Console * The `console.table()` method has been added. #97ace04492 * Crypto * The `crypto.createCipher()` and `crypto.createDecipher()` methods have been deprecated. Please use `crypto.createCipheriv()` and `crypto.createDecipheriv()` instead. #81f88e30dd * The `decipher.finaltol()` method has been deprecated. #19f3927d92 * The `crypto.DEFAULT_ENCODING` property has been deprecated. #6035beea93 * The `ECDH.convertKey()` method has been added. #f2e02883e7 * The `crypto.fips` property has been deprecated. #6e7992e8b8 * Dependencies * V8 has been updated to 6.6. #9daebb48d6 * OpenSSL has been updated to 1.1.0h. #66cb29e646 * EventEmitter * The `EventEmitter.prototype.off()` method has been added as an alias for `EventEmitter.prototype.removeListener()`. #3bb6f07d52 * File System * The `fs.promises` API provides experimental promisified versions of the `fs` functions. #329fc78e49 * Invalid path errors are now thrown synchronously. #d8f73385e2 * The `fs.readFile()` method now partitions reads to avoid thread pool exhaustion. #67a4ce1c6e * HTTP * Processing of HTTP Status codes `100`, `102-199` has been improved. #baf8495078 * Multi-byte characters in URL paths are now forbidden. #b961d9fd83 * N-API * The n-api is no longer experimental. #cd7d7b15c1 * Net * The `'close'` event will be emitted after `'end'`. #9b7a6914a7 * Perf_hooks * The `PerformanceObserver` class is now an `AsyncResource` and can be monitored using `async_hooks`. #009e41826f * Trace events are now emitted for performance events. #9e509b622b * The `performance` API has been simplified. #2ec6995555 * Performance milestone marks will be emitted as trace events. #96cb4fb795 * Process * Using non-string values for `process.env` is deprecated. #5826fe4e79 * The `process.assert()` method is deprecated. #703e37cf3f * REPL * REPL now experimentally supports top-level await when using the `--experimental-repl-await` flag. #eeab7bc068 * The previously deprecated "magic mode" has been removed. #4893f70d12 * The previously deprecated `NODE_REPL_HISTORY_FILE` environment variable has been removed. #60c9ad7979 * Proxy objects are shown as Proxy objects when inspected. #90a43906ab * Streams * The `'readable'` event is now always deferred with nextTick. #1e0f3315c7 * A new `pipeline()` method has been provided for building end-to-data stream pipelines. #a5cf3feaf1 * Experimental support for async for-await has been added to `stream.Readable`. #61b4d60c5d * Timers * The `enroll()` and `unenroll()` methods have been deprecated. #68783ae0b8 * TLS * The `tls.convertNONProtocols()` method has been deprecated. #9204a0db6e * Support for NPN (next protocol negotiation) has been dropped. #5bfbe5ceae * The `ecdhCurve` default is now `'auto'`. #af78840b19 * Trace Events * A new `trace_events` top-level module allows trace event categories to be enabled/disabld at runtime. #da5d818a54 * URL * The WHATWG URL API is now a global. #312414662b * Util * `util.types.is[…]` type checks have been added. #b20af8088a * Support for bigint formatting has been added to `util.inspect()`. #39dc947409
2018-04-20doc: fix a typo in console documentationMykola Bilochub
`console.trace()` function prints 'Trace: ', not 'Trace :'. PR-URL: https://github.com/nodejs/node/pull/20176 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-04-12console: auto-detect color support by defaultAnna Henningsen
This makes Node pretty-print objects with color by default when `console.log()`-ing them. PR-URL: https://github.com/nodejs/node/pull/19372 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-12console: add color supportAnna Henningsen
Add a way to tell `Console` instances to either always use, never use or auto-detect color support and inspect objects accordingly. PR-URL: https://github.com/nodejs/node/pull/19372 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-12console: allow `options` object as constructor argAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/19372 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-12doc: document `Console(…, ignoreErrors)` optionAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/19372 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-11doc: add quotes for event names + fix similar nitsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19915 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-09doc: specify definite Array typesVse Mozhet Byt
Replace `{Array}` with `{type[]}`. PR-URL: https://github.com/nodejs/node/pull/19895 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-04doc: fix various nitsVse Mozhet Byt
* Replace 2 hyphens (--) by spaced m-dashes (—) as per STYLE_GUIDE.md. * Space infix operators. * Unify quotes in inline code spans (use only single quotes). * Unify `* Returns:` (eliminate deviations). * Dedupe spaces. PR-URL: https://github.com/nodejs/node/pull/19743 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-04doc,tools: formalize, unify, codify default valuesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19737 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-03-30console: add table methodGus Caplan
PR-URL: https://github.com/nodejs/node/pull/18137 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-25doc: add 'v' prefix to all versions in metadataTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/19590 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-02-23doc: add new documentation lint ruleestrada9166
Add 80 characters limit to docs. Change docs to fit 80 characters per row. PR-URL: https://github.com/nodejs/node/pull/18726 Fixes: https://github.com/nodejs/node/issues/18703 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-02-08doc: remove **Note:** tagsJames M Snell
Remove the various **Note:** prefixes throughout the docs. PR-URL: https://github.com/nodejs/node/pull/18592 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-04doc: fix `REPLACEME` in changelog PR URLsAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/18561 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-02-01doc: linkify missing typesVse Mozhet Byt
Also, alphabetize all types in type-parser.js and fix some nits in type formats. PR-URL: https://github.com/nodejs/node/pull/18444 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-26console: make .assert standard compliantRuben Bridgewater
The standard does not throw and has no stack trace. See https://console.spec.whatwg.org/#assert PR-URL: https://github.com/nodejs/node/pull/17706 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-12-20doc: remove old console noteRuben Bridgewater
This should not be important anymore in newer docs. The change is also documented in the "changed" part of the function. PR-URL: https://github.com/nodejs/node/pull/17707 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-122017-12-12 Version 9.3.0 (Current)Myles Borins
Notable changes: * async\_hooks: - add trace events to async_hooks (Andreas Madsen) https://github.com/nodejs/node/pull/15538 - add provider types for net server (Andreas Madsen) https://github.com/nodejs/node/pull/17157 * console: - console.debug can now be used outside of the inspector (Benjamin Zaslavsky) https://github.com/nodejs/node/pull/17033 * deps: - upgrade libuv to 1.18.0 (cjihrig) https://github.com/nodejs/node/pull/17282 - patch V8 to 6.2.414.46 (Myles Borins) https://github.com/nodejs/node/pull/17206 * module: - module.builtinModules will return a list of built in modules (Jon Moss) https://github.com/nodejs/node/pull/16386 * n-api: - add helper for addons to get the event loop (Anna Henningsen) https://github.com/nodejs/node/pull/17109 * process: - process.setUncaughtExceptionCaptureCallback can now be used to customize behavior for `--abort-on-uncaught-exception` (Anna Henningsen) https://github.com/nodejs/node/pull/17159 - A signal handler is now able to receive the signal code that triggered the handler. (Robert Rossmann) https://github.com/nodejs/node/pull/15606 * src: - embedders can now use Node::CreatePlatform to create an instance of NodePlatform (Cheng Zhao) https://github.com/nodejs/node/pull/16981 * stream: - writable.writableHighWaterMark and readable.readableHighWaterMark will return the values the stream object was instantiated with (Calvin Metcalf) https://github.com/nodejs/node/pull/12860 * **Added new collaborators** * [maclover7](https://github.com/maclover7) Jon Moss * [guybedford](https://github.com/guybedford) Guy Bedford * [hashseed](https://github.com/hashseed) Yang Guo PR-URL: https://github.com/nodejs/node/pull/17631
2017-12-08doc: improve text for Console constructorRich Trott
Make text for Console constructor more precise. PR-URL: https://github.com/nodejs/node/pull/17519 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-12-04console: make dirxml an alias for console.logBenjamin Zaslavsky
This method was previously exposed by V8 (since node 8.0.0) but not implemented in node. PR-URL: https://github.com/nodejs/node/pull/17152 Refs: https://github.com/nodejs/node/issues/17128 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-22doc: add description for inspector-only console methods.Benjamin Zaslavsky
Description inspired by dev tools reference and inspector err messages Added: * intro * console.debug() * console.dirxml() * console.markTimeline() * console.profile() * console.profileEnd() * console.table() * console.timeStamp() * console.timeline() * console.timelineEnd() PR-URL: https://github.com/nodejs/node/pull/17004 Fixes: https://github.com/nodejs/node/issues/16755 Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-18console: add support for console.debugBenjamin Zaslavsky
Adds the console.debug() method, alias for console.log(). This method is exposed by V8 and was only available in inspector until now. Also adds matching test and documentation. PR-URL: https://github.com/nodejs/node/pull/17033 Refs: https://github.com/nodejs/node/pull/17004 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-07doc: fix json generator warningsLuigi Pinca
- Fix `console.countReset()` signature - Fix `console.group()` arguments list PR-URL: https://github.com/nodejs/node/pull/16742 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-09-122017-09-12, Version 8.5.0 (Current)Myles Borins
Notable Changes * build: * Snapshots are now re-enabled in V8 https://github.com/nodejs/node/pull/14875 * console: * Implement minimal `console.group()`. https://github.com/nodejs/node/pull/14910 * deps: * upgrade libuv to 1.14.1 https://github.com/nodejs/node/pull/14866 * update nghttp2 to v1.25.0 https://github.com/nodejs/node/pull/14955 * dns: * Add `verbatim` option to dns.lookup(). When true, results from the DNS resolver are passed on as-is, without the reshuffling that Node.js otherwise does that puts IPv4 addresses before IPv6 addresses. https://github.com/nodejs/node/pull/14731 * fs: * add fs.copyFile and fs.copyFileSync which allows for more efficient copying of files. https://github.com/nodejs/node/pull/15034 * inspector: * Enable async stack traces https://github.com/nodejs/node/pull/13870 * module: * Add support for ESM. This is currently behind the `--experimental-modules` flag and requires the .mjs extension. `node --experimental-modules index.mjs` https://github.com/nodejs/node/pull/14369 * napi: * implement promise https://github.com/nodejs/node/pull/14365 * os: * Add support for CIDR notation to the output of the networkInterfaces() method. https://github.com/nodejs/node/pull/14307 * perf_hooks: * An initial implementation of the Performance Timing API for Node.js. This is the same Performance Timing API implemented by modern browsers with a number of Node.js specific properties. The User Timing mark() and measure() APIs are implemented, as is a Node.js specific flavor of the Frame Timing for measuring event loop duration. https://github.com/nodejs/node/pull/14680 * tls: * multiple PFX in createSecureContext [#14793](https://github.com/nodejs/node/pull/14793) * Added new collaborators: * BridgeAR – Ruben Bridgewater PR-URL: https://github.com/nodejs/node/pull/15308
2017-08-28doc: add links to alternative versions of docChris Young
Each page of the API documentation should have links to other versions of the same page. This will make it easier to switch between the current "live" release at nodejs.org and LTS versions. PR-URL: https://github.com/nodejs/node/pull/10958 Fixes: https://github.com/nodejs/node/issues/10726 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-08-23console: implement minimal `console.group()`Rich Trott
Node.js exposes `console.group()` and `console.groupEnd()` via the inspector. These functions have no apparent effect when called from Node.js without the inspector. We cannot easily hide them when Node.js is started without the inspector because we support opening the inspector during runtime via `inspector.port()`. Implement a minimal `console.group()`/`console.groupEnd()`. More sophisticated implementations are possible, but they can be done in userland and/or features can be added to this at a later time. `console.groupCollapsed()` is implemented as an alias for `console.group()`. PR-URL: https://github.com/nodejs/node/pull/14910 Fixes: https://github.com/nodejs/node/issues/1716 Ref: https://github.com/nodejs/node/issues/12675 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-08-092017-08-09, Version 8.3.0 (Current)Anna Henningsen
V8 6.0: The V8 engine has been upgraded to version 6.0, which has a significantly changed performance profile. [#14574](https://github.com/nodejs/node/pull/14574) More detailed information on performance differences can be found at https://medium.com/the-node-js-collection/get-ready-a-new-v8-is-coming-node-js-performance-is-changing-46a63d6da4de Other notable changes: * **DNS** * Independent DNS resolver instances are supported now, with support for cancelling the corresponding requests. [#14518](https://github.com/nodejs/node/pull/14518) * **N-API** * Multiple N-API functions for error handling have been changed to support assigning error codes. [#13988](https://github.com/nodejs/node/pull/13988) * **REPL** * Autocompletion support for `require()` has been improved. [#14409](https://github.com/nodejs/node/pull/14409) * **Utilities** * The WHATWG Encoding Standard (`TextDecoder` and `TextEncoder`) has been implemented as an experimental feature. [#13644](https://github.com/nodejs/node/pull/13644) * **Added new collaborators** * [XadillaX](https://github.com/XadillaX) – Khaidi Chu * [gabrielschulhof](https://github.com/gabrielschulhof) – Gabriel Schulhof Conflicts: src/node_version.h
2017-08-07console: coerce label to string in console.time()James M Snell
Per the console spec, the label in console.time() is a string. Per the console spec, the default value of label is `'default'`. PR-URL: https://github.com/nodejs/node/pull/14643 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-03doc: erase unneeded eslint-plugin-markdown commentVse Mozhet Byt
eslint-plugin-markdown comments affect only a code block below them, so there is no need to cancel them for the rest code blocks. PR-URL: https://github.com/nodejs/node/pull/14598 Refs: https://github.com/eslint/eslint-plugin-markdown#configuration-comments Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-02console: add console.count() and console.clear()James M Snell
Both are simple utility functions defined by the WHATWG console spec (https://console.spec.whatwg.org/). PR-URL: https://github.com/nodejs/node/pull/12678 Ref: https://github.com/nodejs/node/issues/12675 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-07-04doc, util, console: clarify ambiguous docsNatanael Log
Add clarification to the documentation on util.format() and console.log() regarding how excessive arguments are treated when the first argument is a non-format string compared to when it is not a string at all. PR-URL: https://github.com/nodejs/node/pull/14027 Fixes: https://github.com/nodejs/node/issues/13908 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-06-03doc: use destructuring in code examplesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/13349 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-302017-05-30, Version 8.0.0 (Current)James M Snell
* **Async Hooks** * The `async_hooks` module has landed in core [[`4a7233c178`](https://github.com/nodejs/node/commit/4a7233c178)] [#12892](https://github.com/nodejs/node/pull/12892). * **Buffer** * Using the `--pending-deprecation` flag will cause Node.js to emit a deprecation warning when using `new Buffer(num)` or `Buffer(num)`. [[`d2d32ea5a2`](https://github.com/nodejs/node/commit/d2d32ea5a2)] [#11968](https://github.com/nodejs/node/pull/11968). * `new Buffer(num)` and `Buffer(num)` will zero-fill new `Buffer` instances [[`7eb1b4658e`](https://github.com/nodejs/node/commit/7eb1b4658e)] [#12141](https://github.com/nodejs/node/pull/12141). * Many `Buffer` methods now accept `Uint8Array` as input [[`beca3244e2`](https://github.com/nodejs/node/commit/beca3244e2)] [#10236](https://github.com/nodejs/node/pull/10236). * **Child Process** * Argument and kill signal validations have been improved [[`97a77288ce`](https://github.com/nodejs/node/commit/97a77288ce)] [#12348](https://github.com/nodejs/node/pull/12348), [[`d75fdd96aa`](https://github.com/nodejs/node/commit/d75fdd96aa)] [#10423](https://github.com/nodejs/node/pull/10423). * Child Process methods accept `Uint8Array` as input [[`627ecee9ed`](https://github.com/nodejs/node/commit/627ecee9ed)] [#10653](https://github.com/nodejs/node/pull/10653). * **Console** * Error events emitted when using `console` methods are now supressed. [[`f18e08d820`](https://github.com/nodejs/node/commit/f18e08d820)] [#9744](https://github.com/nodejs/node/pull/9744). * **Dependencies** * The npm client has been updated to 5.0.0 [[`3c3b36af0f`](https://github.com/nodejs/node/commit/3c3b36af0f)] [#12936](https://github.com/nodejs/node/pull/12936). * V8 has been updated to 5.8 with forward ABI stability to 6.0 [[`60d1aac8d2`](https://github.com/nodejs/node/commit/60d1aac8d2)] [#12784](https://github.com/nodejs/node/pull/12784). * **Domains** * Native `Promise` instances are now `Domain` aware [[`84dabe8373`](https://github.com/nodejs/node/commit/84dabe8373)] [#12489](https://github.com/nodejs/node/pull/12489). * **Errors** * We have started assigning static error codes to errors generated by Node.js. This has been done through multiple commits and is still a work in progress. * **File System** * The utility class `fs.SyncWriteStream` has been deprecated [[`7a55e34ef4`](https://github.com/nodejs/node/commit/7a55e34ef4)] [#10467](https://github.com/nodejs/node/pull/10467). * The deprecated `fs.read()` string interface has been removed [[`3c2a9361ff`](https://github.com/nodejs/node/commit/3c2a9361ff)] [#9683](https://github.com/nodejs/node/pull/9683). * **HTTP** * Improved support for userland implemented Agents [[`90403dd1d0`](https://github.com/nodejs/node/commit/90403dd1d0)] [#11567](https://github.com/nodejs/node/pull/11567). * Outgoing Cookie headers are concatenated into a single string [[`d3480776c7`](https://github.com/nodejs/node/commit/d3480776c7)] [#11259](https://github.com/nodejs/node/pull/11259). * The `httpResponse.writeHeader()` method has been deprecated [[`fb71ba4921`](https://github.com/nodejs/node/commit/fb71ba4921)] [#11355](https://github.com/nodejs/node/pull/11355). * New methods for accessing HTTP headers have been added to `OutgoingMessage` [[`3e6f1032a4`](https://github.com/nodejs/node/commit/3e6f1032a4)] [#10805](https://github.com/nodejs/node/pull/10805). * **Lib** * All deprecation messages have been assigned static identifiers [[`5de3cf099c`](https://github.com/nodejs/node/commit/5de3cf099c)] [#10116](https://github.com/nodejs/node/pull/10116). * The legacy `linkedlist` module has been removed [[`84a23391f6`](https://github.com/nodejs/node/commit/84a23391f6)] [#12113](https://github.com/nodejs/node/pull/12113). * **N-API** * Experimental support for the new N-API API has been added [[`56e881d0b0`](https://github.com/nodejs/node/commit/56e881d0b0)] [#11975](https://github.com/nodejs/node/pull/11975). * **Process** * Process warning output can be redirected to a file using the `--redirect-warnings` command-line argument [[`03e89b3ff2`](https://github.com/nodejs/node/commit/03e89b3ff2)] [#10116](https://github.com/nodejs/node/pull/10116). * Process warnings may now include additional detail [[`dd20e68b0f`](https://github.com/nodejs/node/commit/dd20e68b0f)] [#12725](https://github.com/nodejs/node/pull/12725). * **REPL** * REPL magic mode has been deprecated [[`3f27f02da0`](https://github.com/nodejs/node/commit/3f27f02da0)] [#11599](https://github.com/nodejs/node/pull/11599). * **Src** * `NODE_MODULE_VERSION` has been updated to 57 (https://github.com/nodejs/node/commit/ec7cbaf266)] [#12995](https://github.com/nodejs/node/pull/12995). * Add `--pending-deprecation` command-line argument and `NODE_PENDING_DEPRECATION` environment variable [[`a16b570f8c`](https://github.com/nodejs/node/commit/a16b570f8c)] [#11968](https://github.com/nodejs/node/pull/11968). * The `--debug` command-line argument has been deprecated. Note that using `--debug` will enable the *new* Inspector-based debug protocol as the legacy Debugger protocol previously used by Node.js has been removed. [[`010f864426`](https://github.com/nodejs/node/commit/010f864426)] [#12949](https://github.com/nodejs/node/pull/12949). * Throw when the `-c` and `-e` command-line arguments are used at the same time [[`a5f91ab230`](https://github.com/nodejs/node/commit/a5f91ab230)] [#11689](https://github.com/nodejs/node/pull/11689). * Throw when the `--use-bundled-ca` and `--use-openssl-ca` command-line arguments are used at the same time. [[`8a7db9d4b5`](https://github.com/nodejs/node/commit/8a7db9d4b5)] [#12087](https://github.com/nodejs/node/pull/12087). * **Stream** * `Stream` now supports `destroy()` and `_destroy()` APIs [[`b6e1d22fa6`](https://github.com/nodejs/node/commit/b6e1d22fa6)] [#12925](https://github.com/nodejs/node/pull/12925). * `Stream` now supports the `_final()` API [[`07c7f198db`](https://github.com/nodejs/node/commit/07c7f198db)] [#12828](https://github.com/nodejs/node/pull/12828). * **TLS** * The `rejectUnauthorized` option now defaults to `true` [[`348cc80a3c`](https://github.com/nodejs/node/commit/348cc80a3c)] [#5923](https://github.com/nodejs/node/pull/5923). * The `tls.createSecurePair()` API now emits a runtime deprecation [[`a2ae08999b`](https://github.com/nodejs/node/commit/a2ae08999b)] [#11349](https://github.com/nodejs/node/pull/11349). * A runtime deprecation will now be emitted when `dhparam` is less than 2048 bits [[`d523eb9c40`](https://github.com/nodejs/node/commit/d523eb9c40)] [#11447](https://github.com/nodejs/node/pull/11447). * **URL** * The WHATWG URL implementation is now a fully-supported Node.js API [[`d080ead0f9`](https://github.com/nodejs/node/commit/d080ead0f9)] [#12710](https://github.com/nodejs/node/pull/12710). * **Util** * `Symbol` keys are now displayed by default when using `util.inspect()` [[`5bfd13b81e`](https://github.com/nodejs/node/commit/5bfd13b81e)] [#9726](https://github.com/nodejs/node/pull/9726). * `toJSON` errors will be thrown when formatting `%j` [[`455e6f1dd8`](https://github.com/nodejs/node/commit/455e6f1dd8)] [#11708](https://github.com/nodejs/node/pull/11708). * Convert `inspect.styles` and `inspect.colors` to prototype-less objects [[`aab0d202f8`](https://github.com/nodejs/node/commit/aab0d202f8)] [#11624](https://github.com/nodejs/node/pull/11624). * The new `util.promisify()` API has been added [[`99da8e8e02`](https://github.com/nodejs/node/commit/99da8e8e02)] [#12442](https://github.com/nodejs/node/pull/12442). * **Zlib** * Support `Uint8Array` in Zlib convenience methods [[`91383e47fd`](https://github.com/nodejs/node/commit/91383e47fd)] [#12001](https://github.com/nodejs/node/pull/12001). * Zlib errors now use `RangeError` and `TypeError` consistently [[`b514bd231e`](https://github.com/nodejs/node/commit/b514bd231e)] [#11391](https://github.com/nodejs/node/pull/11391).
2017-05-25doc: make the style of notes consistentAlexey Orlenko
Make the style of "Note:" paragraphs consistent and document the guidelines in `doc/STYLE_GUIDE.md`. PR-URL: https://github.com/nodejs/node/pull/13133 Fixes: https://github.com/nodejs/node/issues/13131 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-04-28doc: replace uses of `you` and other style nitsJames M Snell
Replace uses of the pronouns `you` and `your` throughout the docs + other minor style nits PR-URL: https://github.com/nodejs/node/pull/12673 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-25doc: add eslint-plugin-markdownVse Mozhet Byt
* install eslint-plugin-markdown * add doc/.eslintrc.yaml * add `<!-- eslint-disable rule -->` or `<!-- eslint-disable -->` for the rest of problematic code * .js files in doc folder added to .eslintignore * update Makefile and vcbuild.bat PR-URL: https://github.com/nodejs/node/pull/12563 Refs: https://github.com/nodejs/node/pull/12557#issuecomment-296015032 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>