Benjamin Gruenbaum
92dbcb4bb0
doc: replace function expressions with arrows
...
This commit replaces multiple usages of `function(){}` with ES2015
arrow functions in places it was forgotten earlier. The goal is to
make the docs more consistent since other functions were already
replaced with ES2015 arrows.
In addition, it fixes invalid syntax in modules.markdown to valid
syntax as well as remove `var self = this` pattern usages in the code
where they are now possible to avoid through arrow functions.
PR-URL: https://github.com/nodejs/node/pull/4832
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Robert Jefe Lindstaedt
3624eaf691
doc: fenced all code blocks, typo fixes
...
This changes the code blocks from 4-space indentation to ``` fences for
better syntax highlighting and future linting support. Minor On-the-fly
changes for typos and highlight breaking markdown have been made.
JSON-Style objects have been changed so their closing bracket is
on the same line as the opening one.
Known issues:
* Not every JSON / object notation has been improved. Should
make another run for this.
* Some example functions break hightlighting due to various
combinations of brackets. However changing them means leaving
the code style.
Fixes: https://github.com/nodejs/node/issues/4726
PR-URL: https://github.com/nodejs/node/pull/4733
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Richard Sun
4cc6180fc5
doc: remove "above" and "below" references
...
The docs were recently refactored, and some "above" and "below"
references were no longer accurate. This commit removes many
such references, and replaces others with links.
PR-URL: https://github.com/nodejs/node/pull/4499
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
cjihrig
e19327324e
doc: update process.send() signature
...
This commit brings the process.send() signature into sync with
the child_process.send() documentation. Specifically, this commit
adds the callback argument and return type to the docs.
PR-URL: https://github.com/nodejs/node/pull/5284
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Noah Rose
ec4d6b942f
doc: clarify exceptions during uncaughtException
...
PR-URL: https://github.com/nodejs/node/pull/5180
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Prayag Verma
0217cb5497
doc: fix minor typo in process doc
...
Remove extra `be`
PR-URL: https://github.com/nodejs/node/pull/5018
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Evan Lucas
1afa350efc
doc: add more details to process.env
...
process.env has a few quirks that deserve documenting.
The commit documents:
- How assigning to process.env will implicitly call `toString()`
- How to remove an environment variable from process.env
PR-URL: https://github.com/nodejs/node/pull/4924
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Dmitriy Lazarev
cb09203a65
doc: remove unnecessary bind(this)
...
PR-URL: https://github.com/nodejs/node/pull/4797
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chris Dickinson <chris@neversaw.us >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Rich Trott
e2a682ecc3
doc: fix formatting in process.markdown
...
All the other properties get an h2/## but process.connected gets an
h3/### for no discernible reason. Change it to h2/## like the others.
PR-URL: https://github.com/nodejs/node/pull/4433
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-02-15 11:30:23 -08:00
Dave
a7bcf8b84d
doc: close backtick in process.title description
...
PR-URL: https://github.com/nodejs/node/pull/4534
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-01-19 11:52:36 -08:00
James M Snell
61f91b2f29
doc: fix, modernize examples in docs
...
* Use single quotes consistently
* Modernize examples to use template strings and arrow funcs
* Fix a few typos
* Example edits for consistency
PR-URL: https://github.com/nodejs/node/pull/4282
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-01-19 11:52:24 -08:00
jpersson
e2fe214857
doc: add links and backticks around names
...
* add backticks around names
* add single quotes around event names
* add parenthesis after function names
* add internal links between different sections
* add external links to MDN for some JavaScript references
* sort the link definitions alphabetically
PR-URL: https://github.com/nodejs/node/pull/4054
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-01-19 11:52:16 -08:00
Roman Klauke
70c95ea0e5
doc: add warning about Windows process groups
...
This commit adds a warning for Windows platforms. `process.kill` wont
kill a process group on Windows and instead it throws an error.
Refs: https://github.com/nodejs/node/issues/3617
PR-URL: https://github.com/nodejs/node/pull/3681
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-01-19 11:52:13 -08:00
Scott Buchanan
9571491a07
doc: standardize references to node.js in docs
...
trivial commit to fix a couple inconsistent references to
the name of the project
PR-URL: https://github.com/nodejs/node/pull/4136
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2015-12-23 08:38:33 -08:00
Bryan English
151668308c
doc: consistent reference-style links
...
Moved all the URLs in API docs to the bottom of the files as
reference-style links.
PR-URL: https://github.com/nodejs/node/pull/3845
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-23 08:38:33 -08:00
Tristian Flanagan
a306c0d814
doc: sort process alphabetically
...
Reorders, with no contextual changes, the process documentation
alphabetically.
PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-12-23 08:38:33 -08:00
Ben Noordhuis
0369986276
doc: stdout/stderr can block when directed to file
...
Update the documentation for `process.stdout` and `process.stdout` to
clarify that writes can block when stdio is redirected to a file. In
all other cases, it's non-blocking.
PR-URL: https://github.com/nodejs/node/pull/3170
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-12-23 08:38:33 -08:00
Domenic Denicola
fbd93d4c1c
doc: more use-cases for promise events
...
This adds an example of a semi-common promise pattern that could
result in false-positive 'unhandledRejection' events, to help motivate
why there is a dual 'rejectionHandled' event. I anticipate it being
helpful to users who encounter 'unhandledRejection' events that do not
stem from obvious typos such as the JSON.pasre example.
Also cleans up the promise rejection tracking sample. By using a Map
instead of array we can get O(1) deletion and actually record the errors.
And, fixed indentation and backtick usage there to align with the rest of
the document.
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com >
Reviewed-By: Petka Antonov <petka.antonov@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/3438
2015-10-30 10:07:47 -07:00
Rod Vagg
42b936e78d
src: add process.release.lts property
...
Reviewed-By: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/3212
2015-10-12 06:47:51 -07:00
Evan Lucas
7271cb047c
src: add process.versions.icu
...
If i18n support is present, add the icu version
to process.versions
Fixes: https://github.com/nodejs/node/issues/3089
PR-URL: https://github.com/nodejs/node/pull/3102
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Rod Vagg <rod@vagg.org >
2015-10-07 20:39:15 -07:00
Rich Trott
b2ddf0f9a2
doc: refine process.kill() and exit explanations
...
Add corrections about when exit event fires and how .kill() works on
Windows.
PR-URL: https://github.com/nodejs/node/pull/2918
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2015-09-20 10:30:53 -07:00
Rich Trott
bf42cc8dba
doc: process exit event is not guaranteed to fire
...
This change:
* notes that the exit event is not guaranteed to fire
* provides an example situation where the exit event may not fire
* makes a minor copyediting change
* enforces 80 character wrap in one place where it was not honored
Fixes: https://github.com/nodejs/node/issues/2853
PR-URL: https://github.com/nodejs/node/pull/2861
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-09-16 21:03:51 -04:00
Jeremiah Senkpiel
2d77d03643
doc: fix two doc errors in stream and process
...
`process.stdout` always blocks as of
20176a9841
`WritableState.buffer` is `getBuffer()` as of
91586661c9
PR-URL: https://github.com/nodejs/node/pull/2549
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2015-09-14 21:50:58 -04:00
Tristian Flanagan
55ac24f721
doc: fixed io.js references in process.markdown
...
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/2846
2015-09-14 21:50:58 -04:00
Anne-Gaelle Colom
d664b95581
doc: use US English for consistency
...
behaviour -> behavior
PR-URL: https://github.com/nodejs/node/pull/2784
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2015-09-11 11:31:20 +10:00
Sam Roberts
432cce6e95
doc: describe process API for IPC
...
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
PR-URL: https://github.com/nodejs/node/pull/1978
2015-09-11 11:31:19 +10:00
cjihrig
4f50d3fb90
process: make process.release.name "node"
...
This commit sets the value of process.release.name to "node".
Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2015-08-23 17:59:43 -04:00
cjihrig
a69ab27ab4
node: rename from io.js to node
...
This commit replaces instances of io.js with Node.js, based on the
recent convergence. There are some remaining instances of io.js,
related to build and the installer.
Fixes: https://github.com/nodejs/node/issues/2361
PR-URL: https://github.com/nodejs/node/pull/2367
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: João Reis <reis@janeasystems.com >
2015-08-23 17:59:43 -04:00
Rod Vagg
04fd4fad46
src: introduce process.release object
...
PR-URL: https://github.com/nodejs/io.js/pull/2154
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-08-04 11:56:16 -07:00
Benjamin Gruenbaum
0f09b8db28
doc: don't recommend domains for error handling
...
Remove the suggestion to use domains for exception handling. Add clarity
to "unhandledException".
Fixes: https://github.com/nodejs/io.js/issues/2055
PR-URL: https://github.com/nodejs/io.js/pull/2056
Reviewed-By: Trev Norris <trev.norris@gmail.com >
Reviewed-By: Chris Dickinson <chris@neversaw.us >
2015-07-03 15:22:27 -06:00
Alexander Gromnitsky
02388dbf40
doc: fix some cross-references
...
PR-URL: https://github.com/iojs/io.js/pull/1584
Reviewed-By: Roman Reiss <me@silverwind.io >
2015-05-02 14:07:21 +02:00
Evan Lucas
3c92ca2b5c
src: add ability to get/set effective uid/gid
...
Adds the following to process:
- `process.geteuid()`
- `process.seteuid(id)`
- `process.getegid()`
- `process.setegid(id)`
PR-URL: https://github.com/iojs/io.js/pull/1536
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-04-29 16:04:26 -05:00
Trevor Norris
10e31ba56c
node: allow multiple arguments passed to nextTick
...
PR-URL: https://github.com/iojs/io.js/pull/1077
Reviewed-by: Colin Ihrig <cjihrig@gmail.com >
2015-04-15 17:02:21 -06:00
Johan Bergström
d726a177ed
build: Remove building against a shared V8
...
This action is to encourage packagers to not build against a
shared V8 library since even minor bumps of V8 can create issues.
PR-URL: https://github.com/iojs/io.js/pull/1331
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-04-07 15:02:42 +10:00
Brendan Ashworth
2e2cf81476
doc: fix process.stdout reference to console.log
...
This commit changes the word introduction to the code block to be
explicitly correct, and changes the `d` variable to `msg` for clarity.
PR-URL: https://github.com/iojs/io.js/pull/964
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Nicu Micleușanu <micnic90@gmail.com >
Reviewed-By: Vladimir Kurchatkin <vladimir.kurchatkin@gmail.com >
2015-02-26 13:06:35 -05:00
Benjamin Gruenbaum
06ee782f24
doc: document 'unhandledRejection' and 'rejectionHandled'
...
Documents the new unhandled rejection detection API.
Documents the new unhandledRejection/rejectionHandled events in the process
docuemntation. As agreed on in this issue:
https://github.com/iojs/io.js/issues/256#event-241385784
PR-URL: https://github.com/iojs/io.js/pull/946
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-02-25 11:44:53 -06:00
Charmander
f0296933f8
doc: correct it's to its in process
...
"This event is emitted when io.js empties its event loop..."
PR-URL: https://github.com/iojs/io.js/pull/837
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-02-13 16:36:40 -05:00
Ben Noordhuis
90d2b35281
doc: update antiquated process.versions output
...
PR-URL: https://github.com/iojs/io.js/pull/750
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-02-07 17:08:10 -05:00
Ben Noordhuis
789bbb91d3
doc: update node.js references in api docs
...
Fixes: https://github.com/iojs/io.js/issues/740
PR-URL: https://github.com/iojs/io.js/pull/750
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-02-07 17:07:15 -05:00
Sam Roberts
37569cd2b2
doc: document the fds behind stdin/out/err
...
Its common knowledge on unix, but node documentation depends on knowing
this, as it exposes both streams named after stdio, and the fd numbers,
so make this explicit.
Fixes: https://github.com/joyent/node/pull/8624
PR-URL: https://github.com/joyent/node/pull/8454
Reviewed-by: Trevor Norris <trev.norris@gmail.com >
Cherry-picked-from: https://github.com/joyent/node/commit/13a992b1c2e1d0e69567fb94bc35f978c4c37ce5
2015-01-10 22:15:51 +01:00
Carlos Campderrós
13ad06e095
doc: set logical umask in process.umask example
...
0644 seems to be the desired mode for new files (as it is a very weird
umask), and to achieve that the correct umask would be 0022.
PR-URL: https://github.com/joyent/node/pull/8039
Reviewed-by: Trevor Norris <trev.norris@gmail.com >
2014-12-09 17:57:11 +01:00
Julien Fontanet
95726b0fce
doc: note stdout and stderr special behaviors.
...
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com >
2014-10-01 11:45:23 -07:00
Trevor Norris
51b6b6844e
doc: fix brackets for optional parameters
...
Documentation incorrectly used bracket notation for optional parameters.
This caused inconsistencies in usage because of examples like the
following:
fs.write(fd, data[, position[, encoding]], callback)
This simply fixes all uses of bracket notation in documentation.
Signed-off-by: Trevor Norris <trev.norris@gmail.com >
Reviewed-by: Fedor Indutny <fedor@indutny.com >
2014-09-25 11:26:15 -07:00
Timothy J Fontaine
7ca5af87a0
Merge remote-tracking branch 'upstream/v0.10' into v0.12
...
Conflicts:
ChangeLog
deps/v8/src/hydrogen.cc
lib/http.js
lib/querystring.js
src/node_crypto.cc
src/node_version.h
test/simple/test-querystring.js
2014-09-16 17:48:09 -07:00
Maciej Małecki
0664ddc093
doc: document process.env better
...
Fixes #6424 .
Reviewed-By: Fedor Indutny <fedor@indutny.com >
2014-09-16 02:41:38 +04:00
Jan Krems
ad5e8ec3e2
doc: process: Document process.mainModule
...
Instrumentation code might need to find out the entry point of the
process in a global context.
Documenting the existing process.mainModule to officially support this.
Fixes #7808
Signed-off-by: Fedor Indutny <fedor@indutny.com >
2014-06-24 20:21:25 +04:00
Timothy J Fontaine
b444392a98
Merge remote-tracking branch 'upstream/v0.10'
...
Conflicts:
src/node.cc
src/node.js
test/message/max_tick_depth_trace.out
2014-03-10 16:50:00 -07:00
Shuhei Kagawa
43a29f53ca
doc: remove an unused arg in process.stdin.
...
The argument of process.stdin's readable event handler is not used.
2014-03-10 15:30:40 -07:00
Sam Roberts
37d3c56c0b
doc: document beforeExit and add more tests
2014-02-28 15:36:22 +04:00
Timothy J Fontaine
845e5d3458
Merge remote-tracking branch 'upstream/v0.10'
...
Conflicts:
AUTHORS
ChangeLog
deps/uv/AUTHORS
deps/uv/ChangeLog
deps/uv/build.mk
deps/uv/src/unix/linux-core.c
deps/uv/src/unix/stream.c
deps/uv/src/unix/sunos.c
deps/uv/src/version.c
src/node_version.h
2014-02-19 09:12:32 -08:00