0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

138 Commits

Author SHA1 Message Date
Brian White
5242114d89
doc: remove redundant warning information
process.emitWarning() already describes how to emit custom warnings,
so just merely provide a link to that function from the 'warning'
event documentation.

PR-URL: https://github.com/nodejs/node/pull/9590
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-11-15 21:52:10 -05:00
Brian White
71d4a7474d
doc: improve process.emitWarning() example
PR-URL: https://github.com/nodejs/node/pull/9590
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-11-15 21:52:01 -05:00
Fedor Indutny
5a61b99d98 process: add process.memoryUsage.external
PR-URL: https://github.com/nodejs/node/pull/9587
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-11-13 15:47:15 -05:00
Roman Reiss
8eb19c48fa
doc: consistent 'Returns:'
For consistency, changed all `Return:` to `Returns:` in the API docs.

PR-URL: https://github.com/nodejs/node/pull/9554
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-11-13 08:58:13 +01:00
Thomas Watson Steen
4b35f25bfa
doc: simplify process.memoryUsage() example code
Using util.inspect doesn't change the output in this case

PR-URL: https://github.com/nodejs/node/pull/9560
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-11-13 08:50:36 +01:00
imatvieiev
c184f22997
doc: add process api data types to documentation
PR-URL: https://github.com/nodejs/node/pull/9505
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-11-11 21:26:08 +01:00
Evan Lucas
9314886053 2016-11-08, Version 7.1.0 (Current)
Notable changes:

* buffer: add buffer.transcode to transcode a buffer's content from one
  encoding to another primarily using ICU (James M Snell)
* child_process: add public API for IPC channel (cjihrig)
* icu
  * Upgraded to ICU 58 - small icu (Steven R. Loomis)
  * Add `cldr`, `tz`, and `unicode` to `process.versions` (Steven R. Loomis)
* lib: make `String(global) === '[object global]'` (Anna Henningsen)
* libuv: Upgraded to 1.10.0 (cjihrig)
* readline: use icu based string width calculation (James M Snell)
* src:
  * add NODE_PRESERVE_SYMLINKS environment variable that has the same
    effect as the `--preserve-symlinks` flag (Marc Udoff)
  * Fix `String#toLocaleUpperCase()` and `String#toLocaleLowerCase()`
    (Steven R. Loomis)

PR-URL: https://github.com/nodejs/node/pull/9438
2016-11-08 15:14:16 -06:00
cjihrig
2dcb7f3826 child_process: add public API for IPC channel
This commit adds a public channel property to ChildProcess. The
existing _channel property is aliased to the new property, with
the intention of deprecating and removing it in the future.

Fixes: https://github.com/nodejs/node/issues/9313
PR-URL: https://github.com/nodejs/node/pull/9322
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2016-11-01 20:37:57 -04:00
Emanuele DelBono
6893f3cc10 doc: reference signal(7) for the list of signals
Fixes: https://github.com/nodejs/node/issues/9309
PR-URL: https://github.com/nodejs/node/pull/9323
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-10-27 14:18:01 -07:00
Steven R. Loomis
4fb27d43f0
intl: Add more versions from ICU
* Adds process.versions.cldr, .tz, and .unicode
* Changes how process.versions.icu is loaded
* Lazy loads the process.versions.* values for these
* add an exception to util.js
   to cause 'node -p process.versions' to still work
* update process.version docs

Fixes: https://github.com/nodejs/node/issues/9237
2016-10-26 19:24:22 -07:00
Oliver Salzburg
0a8d0eaa9b doc: mention case-insensitive env on windows
On Windows OS, environment variables are case-insensitive and are
treated likewise in NodeJS. This can be confusing and can lead
to hard-to-debug problems when moving code from one environment
to another.

Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/9166
Fixes: https://github.com/nodejs/node/issues/9157
2016-10-25 11:33:05 +03:00
Rod Machen
dcc9386183 doc: fixes formatting in process
Fixes several formatting errors in the process doc, including missing
link references, misplaced underscores, and a missing backtick.

Fixes: https://github.com/nodejs/node/issues/9223
PR-URL: https://github.com/nodejs/node/pull/9235
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-10-24 07:05:48 -07:00
Сковорода Никита Андреевич
50be885285 tools: enable more remark-lint rules
New rules:
 1. rule-style
 2. strong-marker
 3. no-shell-dollars
 4. no-inline-padding
 5. code-block-style
 6. no-multiple-toplevel-headings

Fixes to the existing files applied.

PR-URL: https://github.com/nodejs/node/pull/8708
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-25 13:02:45 +03:00
Timothy Gu
e1ddcb7219 doc: standardize rest parameters
PR-URL: https://github.com/nodejs/node/pull/8485
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-14 08:08:28 +02:00
Anna Henningsen
3207ea4e36 doc: note that listening on SIGSEGV & co is unsafe
Note that trying to listen for some signals using `process.on()`
is unsafe in the `process` docs.

PR-URL: https://github.com/nodejs/node/pull/8410
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-11 20:48:35 -07:00
Mike Ralphson
3905f48882
doc: fix typos
PR-URL: https://github.com/nodejs/node/pull/8370
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-09-02 23:49:54 +02:00
Simen Bekkhus
1df3797bf4
doc: correct argument type for process.cpuUsage
PR-URL: https://github.com/nodejs/node/pull/8158
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-22 11:38:25 +02:00
cjihrig
d83373d800 2016-08-15, Version 6.4.0 (Current)
Notable changes:

* build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) https://github.com/nodejs/node/pull/7983 and https://github.com/nodejs/node/pull/7576
* child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) https://github.com/nodejs/node/pull/7811 and https://github.com/nodejs/node/pull/7838
* child_process: argv[0] can now be set to arbitrary values in spawned processes. (Pat Pannuto) https://github.com/nodejs/node/pull/7696
* fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) https://github.com/nodejs/node/pull/7942
* repl: The REPL now supports editor mode. (Prince J Wesley) https://github.com/nodejs/node/pull/7275
* util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) https://github.com/nodejs/node/pull/8013

Refs: https://github.com/nodejs/node/issues/8020
PR-URL: https://github.com/nodejs/node/pull/8070
2016-08-16 10:36:00 -04:00
Jeremiah Senkpiel
ab3306ad51
tty: set the handle to blocking mode
Refs: https://github.com/nodejs/node/pull/1771
Refs: https://github.com/nodejs/node/issues/6456
Refs: https://github.com/nodejs/node/pull/6773
Refs: https://github.com/nodejs/node/issues/7743
PR-URL: https://github.com/nodejs/node/pull/6816
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-10 23:41:28 +02:00
Pat Pannuto
a804db1af7
process: save original argv[0]
For historical and other reasons, node overwrites `argv[0]` on startup.
See
 - 2c6f79c08,
 - https://github.com/nodejs/node/issues/7434
 - https://github.com/nodejs/node/pull/7449
 - https://github.com/nodejs/node/pull/7696

For cases where it may be useful, save the original value of `argv[0]`
in `process.argv0`

PR-URL: https://github.com/nodejs/node/pull/7696
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-08 16:33:57 +02:00
Eugene Ostroukhov
f789eb3106 inspector: Do not crash if the port is n/a
Node process will no longer terminate with an assertion if the
inspector port is not available.

PR-URL: https://github.com/nodejs/node/pull/7874
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
2016-07-29 10:59:32 -07:00
Joe Esposito
6ea8c669df doc: remove extra spaces and concats in examples
PR-URL: https://github.com/nodejs/node/pull/7885
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-07-29 09:12:17 -07:00
Lance Ball
2fe277a05c doc: Warn against uncaughtException dependency.
State in the documentation that `uncaughtException` is not a reliable
way to restart a crashed application, and clarify that an application
may crash in ways that do not trigger this event.

Use a documented synchronous function in example code.

Fixes: https://github.com/nodejs/node/issues/6223

Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/6378
2016-07-15 11:09:46 -04:00
Сковорода Никита Андреевич
a58b48bc3b doc: various documentation formatting fixes
* Fix markdown code sample in releases.md, it was <a id="x.y.x></a>"
* Fix some markdown errors, e.g. in changelogs
* Fix broken defs links, e.g. in domain-postmortem.md
* Fix other broken refs, by addaleax
* Add links to some defs that were present but not linked to
* Remove dead defs
* Move defs to the bottom (one file affected)
* Add language indicators to all code blocks, using `txt` when no
specific language could be chosen
* Some minor formatting changes (spaces, ident, headings)

PR-URL: https://github.com/nodejs/node/pull/7637
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-07-14 12:26:50 +03:00
Tarun Garg
475dc439e2
doc: fix documentation of process.argv
The current documentation states that if run something like
`node app.js` then in our process.argv array first elements is `node`,
but actually it's `process.execPath` not `node`
as documentation currently suggests.

Fixes: https://github.com/nodejs/node/issues/7434
PR-URL: https://github.com/nodejs/node/pull/7449
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-07-04 16:49:01 +02:00
Rich Trott
42de4bb819 doc: improve usage of zero/0
PR-URL: https://github.com/nodejs/node/pull/7466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-30 21:56:41 -07:00
Rich Trott
4220e86414 doc: fix typographic error in process doc
An apostrophe was being used where a backtick was called for, resulting
in improper rendering.

PR-URL: https://github.com/nodejs/node/pull/7431
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ingvar Stepanyan <me@rreverser.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-27 08:52:49 -07:00
James M Snell
a32f7eb4be doc: general improvements to process.md copy
PR-URL: https://github.com/nodejs/node/pull/7029
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-06-06 14:53:10 -07:00
Jeremiah Senkpiel
98de4abae3 tty: use blocking mode on OS X
OS X has a tiny 1kb hard-coded buffer size for stdout / stderr to
TTYs (terminals). Output larger than that causes chunking, which ends
up having some (very small but existent) delay past the first chunk.
That causes two problems:

1. When output is written to stdout and stderr at similar times, the
two can become mixed together (interleaved). This is especially
problematic when using control characters, such as \r. With
interleaving, chunked output will often have lines or characters erased
unintentionally, or in the wrong spots, leading to broken output.
CLI apps often extensively use such characters for things such as
progress bars.

2. Output can be lost if the process is exited before chunked writes
are finished flushing. This usually happens in applications that use
`process.exit()`, which isn't infrequent.

See https://github.com/nodejs/node/issues/6980 for more info.

This became an issue as result of the Libuv 1.9.0 upgrade. A fix to
an unrelated issue broke a hack previously required for the OS X
implementation. This resulted in an unexpected behavior change in node.
The 1.9.0 upgrade was done in c3cec1eefc,
which was included in v6.0.0.
Full details of the Libuv issue that induced this are at
https://github.com/nodejs/node/issues/6456#issuecomment-219974514

Refs: https://github.com/nodejs/node/pull/1771
Refs: https://github.com/nodejs/node/issues/6456
Refs: https://github.com/nodejs/node/pull/6773
Refs: https://github.com/nodejs/node/pull/6816
PR-URL: https://github.com/nodejs/node/pull/6895
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-06-01 18:57:45 -04:00
doug.wade
e916218ba5 doc: update process.hrtime docs to include optional parameter
Adds more explicit documentation for the single optional parameter
to process.hrtime to the process docs.

PR-URL: https://github.com/nodejs/node/pull/6585
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-05-27 09:28:48 -07:00
Anna Henningsen
e11221c76d doc: add added: info for process.cpuUsage
Refs: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6863
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-05-20 07:37:43 -07:00
Bryan English
ec67abe4a7
doc: add added: information for process
Most of the information is gleaned from changelogs. The rest is inferred
from git history.

Omitted cpuUsage() since it's not yet in a release.

Also omitted the streams, events and signals, since I didn't really
think it made sense for those.

Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/6589
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Alexander Makarenko <estliberitas@gmail.com>
2016-05-09 13:52:55 +02:00
James M Snell
c2bbfe2a5c doc: expand documentation for process.exit()
The fact that process.exit() interrupts pending async operations
such as non-blocking i/o is becoming a bit more pronounced with
the recent libuv update. This commit expands the documentation
for `process.exit()` to explain clearly how it affects async
operations.

PR-URL: https://github.com/nodejs/node/pull/6410
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
2016-04-29 16:13:59 -07:00
Patrick Mueller
52cb410402 process: add process.cpuUsage() - implementation, doc, tests
Add process.cpuUsage() method that returns the user and system
CPU time usage of the current process

PR-URL: https://github.com/nodejs/node/pull/6157
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-04-29 16:07:06 -07:00
Alexander Gromnitsky
983a809456 doc: fix broken references
PR-URL: https://github.com/nodejs/node/pull/6350
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-04-22 19:08:48 -07:00
Alexander Makarenko
f85412d49b doc: improvements to child_process, process docs
Sort links in lexical order. Add missing links.
Add `disconnect` event description in Process doc.
Fix typos.

R-URL: https://github.com/nodejs/node/pull/5075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-04-22 08:38:15 -07:00
James M Snell
7f11634a46 doc: note that process.config can and will be changed
PR-URL: https://github.com/nodejs/node/pull/6266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-21 11:37:32 -07:00
Robert Jefe Lindstaedt
0800c0aa72 doc: git mv to .md
* doc: rename .markdown references in content
* doc: rename to .md in tools
* doc: rename to .md in CONTRIBUTING.md

PR-URL: https://github.com/nodejs/node/pull/4747
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: techjeffharris
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-04-20 16:34:27 -07:00