0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

2553 Commits

Author SHA1 Message Date
Benjamin Gruenbaum
d8290286b3 doc: document deprecation of util._extend
Document that util._extend was never intended to be used
and should be considered deprecated.

PR-URL: https://github.com/nodejs/node/pull/4903
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-03-16 12:55:55 -07:00
Felix Böhm
939d6efe0f doc: fix return value of write methods
Fixes: https:github.com/nodejs/node/issues/5682
PR-URL: https://github.com/nodejs/node/pull/5736
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-03-16 12:40:19 -07:00
Jeremiah Senkpiel
f9e6191f85 doc: reformat & improve node.1 manual page
Uses better troff formatting.
Removes v8 options from the man page.

Also edits `node -h` in node.cc slightly.

PR-URL: https://github.com/nodejs/node/pull/5497
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-03-16 13:49:40 -04:00
James M Snell
85ab4a5f12 buffer: add .from(), .alloc() and .allocUnsafe()
Several changes:

* Soft-Deprecate Buffer() constructors
* Add `Buffer.from()`, `Buffer.alloc()`, and `Buffer.allocUnsafe()`
* Add `--zero-fill-buffers` command line option
* Add byteOffset and length to `new Buffer(arrayBuffer)` constructor
* buffer.fill('') previously had no effect, now zero-fills
* Update the docs

PR-URL: https://github.com/nodejs/node/pull/4682
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2016-03-16 08:34:02 -07:00
Rich Trott
6ba5af2c2c console: check that stderr is writable
`Console` constructor checks that `stdout.write()` is a function but
does not do an equivalent check for `stderr.write()`. If `stderr` is not
specified in the constructor, then `stderr` is set to be `stdout`.
However, if `stderr` is specified, but `stderr.write()` is not a
function, then an exception is not thrown until `console.error()` is
called.

This change adds the same check for 'stderr' in the constructor that is
there for `stdout`. If `stderr` fails the check, then a `TypeError` is
thrown.

Took the opportunity to copyedit the `console` doc a little too.

PR-URL: https://github.com/nodejs/node/pull/5635
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-03-15 19:10:55 -07:00
Mithun Patel
99a5d07935 doc: Add note about use of JSON.stringify()
process.send and child.send use JSON.stringify to serialize
the message.

Fixes: https://github.com/nodejs/node/issues/5453
PR-URL: https://github.com/nodejs/node/pull/5723
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-15 09:38:28 -07:00
James M Snell
b6e3fa745b events: add eventNames() method
Per https://github.com/nodejs/node/issues/1817, there are many modules
that currently abuse the private `_events` property on EventEmitter.
One of the ways it is used is to determine if a particular event is
being listened for. This adds a simple `eventNames()` method that
returns an array of the events with currently registered listeners.

PR-URL: https://github.com/nodejs/node/pull/5617
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-03-15 09:25:35 -07:00
Kirill Fomichev
64044813ac doc: clarify type of first argument in zlib
The current documentation for Convenience Methods specifies that
the first argument can be either
`string or buffer`, `string` or `raw Buffer`.
This commit replaces all these instances with `Buffer or string`.

PR-URL: https://github.com/nodejs/node/pull/5685
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-15 12:09:38 -03:00
Kevin Locke
b801e39266 doc: clarify when writable.write callback is called
The current documentation for writable.write only specifies that the
callback is called "once the data has been fully handled".  It is
ambiguous whether this means "successfully handled" and, if so,
whether the callback is called if the data can not be successfully
handled (i.e. an error occurs).

The ambiguity is not only in the documentation.  The stream class
implementations differ on this point.  stream.Writable invokes the
callback with any errors that occur during parameter checking or
during calls to _write.  However, not all classes return all errors
to _write. zlib.Zlib does pass argument and state errors to the
_write (_transform) callback, but does not pass data errors.
http.OutgoingMessage passes argument type errors and some other types
of errors, but not all.

This inconsistency is behind issue #1746 and, I suspect, other issues
in client code which passes a callback to write.

This commit takes no position on whether the callback error behavior
should changed, but simply attempts to document the current behavior
in a way that is open to changes so that users are not caught by
surprise.

PR-URL: https://github.com/nodejs/node/pull/4810
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-03-14 19:46:49 +02:00
Daijiro Wachi
23df9d99ac doc: fix typo in api/addons
PR-URL: https://github.com/nodejs/node/pull/5678
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-14 08:48:08 -07:00
Daijiro Wachi
b98d53b28b doc: fix typo in api/dgram
PR-URL: https://github.com/nodejs/node/pull/5678
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-14 08:48:03 -07:00
Daijiro Wachi
3cde96e02f doc: fix typo in api/fs
PR-URL: https://github.com/nodejs/node/pull/5678
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-14 08:47:32 -07:00
Jeremiah Senkpiel
7a3ed98229 doc: add onboarding resources
PR-URL: https://github.com/nodejs/node/pull/3726
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-03-14 11:35:04 -04:00
Stefano Vozza
ecbb955be4 doc: remove non-standard use of hyphens
Identifies the non-idiomatic usages of the '-' character
and either removes them or replaces them with colons.

Fixes: https://github.com/nodejs/node/issues/5672
R-URL: https://github.com/nodejs/node/pull/5677
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
2016-03-14 08:32:55 -07:00
Kári Tristan Helgason
995a33b5f6 doc: add clarification on birthtime in fs stat
Clarifies the possibility of birthtime in the fs stat
object being greater than atime or mtime when not available
in the filesystem (see issue for further info).

Fixes: https://github.com/nodejs/node/issues/2222
PR-URL: https://github.com/nodejs/node/pull/5479
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-14 00:25:47 -03:00
Vaibhav
f2bd9cddee doc: update removeListener behaviour
This commit updates events doc to describe removeListener behaviour
when it is called within a listener. An example is added to make
it more evident.

A test is also incuded to make this behaviour consistent in future
releases.

Fixes: nodejs/node#4759

PR-URL: https://github.com/nodejs/node/pull/5201

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-03-13 18:43:11 +02:00
Benjamin Gruenbaum
b217460f54 doc: fix typo in child_process docs
Fixes a typo in the child process docs.
Fixes: https://github.com/nodejs/nodejs.org/issues/573

PR-URL: https://github.com/nodejs/node/pull/5681

Reviewed-By: thefourtheye <thechargingvolcano@gmail.com>
2016-03-13 14:10:02 +02:00
Robert C Jensen
e2488fa953 doc: include typo in 'unhandledRejection' example
Reintroduces an intentional typo in a process doc example.

Fixes: https://github.com/nodejs/node/issues/5644
PR-URL: https://github.com/nodejs/node/pull/5654
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-03-12 14:59:52 -03:00
Myles Borins
31a8708caa docs: update link to iojs+release ci job
We recently sandboxed the release CI jobs to their own Jenkins instance
This commit updates the links found in `doc/releases.md` to point
people in the right direction.

PR-URL: https://github.com/nodejs/node/pull/5632
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-10 18:48:09 -08:00
Steve Mao
0ea3899cab doc: fix markdown links
Fixes: https://github.com/nodejs/node/issues/5322
PR-URL: https://github.com/nodejs/node/pull/5641
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-03-10 14:09:26 +01:00
axvm
a49849265c doc: fix dns.resolveCname description typo
PR-URL: https://github.com/nodejs/node/pull/5622
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-03-10 02:16:36 +01:00
Jeremiah Senkpiel
a9c27911e1 doc: update release tweet template
PR-URL: https://github.com/nodejs/node/pull/5628
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-09 12:59:58 -08:00
Sequoia McDowell
1d9a2b28bb doc: add info to docs on how to submit docs patch
The docs mentioned that the docs source live in
the node source, but did not link to same.

PR-URL: https://github.com/nodejs/node/pull/4591
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-07 11:25:15 -08:00
Michaël Zasso
449684752c doc: fix typo in fs.symlink
PR-URL: https://github.com/nodejs/node/pull/5560
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-03-07 09:46:00 +01:00
Robert Jefe Lindstaedt
44c9751ff2 build: update Node.js logo on Win installer
also change stripe color to RGB 68 136 62

PR-URL: https://github.com/nodejs/node/pull/5531
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-03-06 20:22:36 -06:00
Matteo Collina
8af4bb86c0 dgram: default send address to 127.0.0.1 or ::1
In net we default to 'localhost' as the default address for connect.
Not doing the same on dgram is confusing, because sending to 0.0.0.0
works on Linux/OS X but not on Windows. Defaulting that to 127.0.0.1 /
::1 addresses that.

Related: https://github.com/nodejs/node/pull/5407
Related: https://github.com/nodejs/node/issues/5398
Fixes: https://github.com/nodejs/node/issues/5487
PR-URL: https://github.com/nodejs/node/pull/5493
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-03-05 19:20:31 +01:00
James M Snell
831b30eeb7 doc: improve unhandledException doc copy
Rework the doc a bit to tighten it up, including removing the
use of `you`

Fix some line wrapping issues.

PR-URL: https://github.com/nodejs/node/pull/5287
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

...
2016-03-03 13:04:56 -08:00
silverwind
7ae3dfb153 doc: update link green to match homepage
Also fixed a minor color issue with :focus on the title.

PR-URL: https://github.com/nodejs/node/pull/5548
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-03-03 19:41:47 +01:00
Craig Akimoto
4c724dd439 doc: update V8 URL
https://code.google.com/p/v8/ redirects to the V8 issue tracker

PR-URL: https://github.com/nodejs/node/pull/5530
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-02 23:22:29 +01:00
Fedor Indutny
b010c87164 crypto, string_bytes: treat buffer str as utf8
Do not treat crypto inputs as `binary` strings, convert them to Buffers
using `new Buffer(..., 'utf8')`, or using newly updated StringBytes
APIs.

PR-URL: https://github.com/nodejs/node/pull/5522
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-02 21:25:04 +03:00
ronkorving
0eda5f503a doc: update NAN urls in ROADMAP.md and doc/releases.md
PR-URL: https://github.com/nodejs/node/pull/5472
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-02 10:04:17 -08:00
Rod Vagg
6361c049a9 doc: add CTC meeting minutes 2016-02-17
PR-URL: https://github.com/nodejs/node/pull/5410
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-02 09:10:38 -08:00
Evan Lucas
3c79bbda47 doc: fix typo in child_process documentation
TSCP should be TCP

PR-URL: https://github.com/nodejs/node/pull/5474
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-02-29 05:35:03 -06:00
Anton Andesen
8d8fef09ee doc: add note for binary safe string reading
`readable.setEncoding(null)` - may be the most preferable way to proxy
a binary data without any encoding/decoding overhead

PR-URL: https://github.com/nodejs/node/pull/5155
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-29 11:08:45 +01:00
Alexander Makarenko
f0c06147b3 doc: improvements to crypto.markdown copy
Fix several typos. Add missing links.

PR-URL: https://github.com/nodejs/node/pull/5230
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kelvin Knighton <keltheceo@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-28 21:21:01 +01:00
Hugo Wood
5298c81f42 doc: require behavior on case-insensitive systems
This adds a paragraph in the Module Caching Caveats section about the
behavior of require when Node is running on top of a file system (e.g.
HFS) or operating system (e.g. Windows) that will not consider the case
of file paths to find files.

Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:33:51 +01:00
Tristan Slominski
1411e0b648 doc: document base64url encoding support
Documents that creating a buffer from base64 encoded string
transparently supports "URL and Filename Safe Alphabet" base64url
encoding.

PR-URL: https://github.com/nodejs/node/pull/5243
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Alejandro Oviedo <alejandro.oviedo.g@gmail.com>
2016-02-27 14:23:06 +01:00
Jackson Tian
c6ae7d00c6 doc: improve httpVersionMajor / httpVersionMajor
The description of httpVersionMajor & httpVersionMinor should
have same context like httpVersion.

PR-URL: https://github.com/nodejs/node/pull/5296
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:18:00 +01:00
Evan Lucas
1c30d606b1 doc: fix relative links in net docs
They were not being processed as relative links.

PR-URL: https://github.com/nodejs/node/pull/5358
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:13:39 +01:00
Brian White
a67d5c1034 doc: fix crypto function indentation level
PR-URL: https://github.com/nodejs/node/pull/5460
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:09:31 +01:00
dcposch@dcpos.ch
4e77a7ce29 doc: link to man pages
This changes the doc generator to automatically link references such as
`open(2)` to a man page on man7.org or freebsd.org

PR-URL: https://github.com/nodejs/node/pull/5073
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:06:47 +01:00
Rafael Cepeda
9894c026f5 doc: add missing property in cluster example
`Cluster.setupMaster(options)` Options object was missing an `args`
property on the example.

PR-URL: https://github.com/nodejs/node/pull/5305
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:04:51 +01:00
Chris Dew
1913909fce doc: corrected name of argument in socket.send
Corrected name of "msg" argument from "buf" to "msg".

PR-URL: https://github.com/nodejs/node/pull/5449
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:02:19 +01:00
Alexander Makarenko
acee594b6e doc: fix links in tls, cluster docs
Fix missing links described in #5322.

PR-URL: https://github.com/nodejs/node/pull/5364
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:00:53 +01:00
Rod Vagg
2ccc275fd7 build: update Node.js logo on OSX installer
PR-URL: https://github.com/nodejs/node/pull/5401
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: kahwee
Reviewed-By: fhemberger
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-02-27 16:49:56 +11:00
Sam Roberts
513133c936 doc: correct name of engine methods
ENGINE_METHOD_PKEY_METH and ENGINE_METHOD_PKEY_ASN1_METH are misspelled
in the documentation, both should be ..._METHS.

PR-URL: https://github.com/nodejs/node/pull/5463
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-02-26 19:44:33 -08:00
Rich Trott
3e3d941495 doc,tools,test: lint doc-based addon tests
PR-URL: https://github.com/nodejs/node/pull/5427
Fixes: https://github.com/nodejs/node/issues/5424
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-02-26 11:56:43 -08:00
Rich Trott
6e6ce09861 doc: copyedit util doc
Add verbs to make sentence fragments less fragmentary.

PR-URL: https://github.com/nodejs/node/pull/5399
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-25 13:27:47 -08:00
Stefan Budeanu
7c48cb5601 crypto: Improve control of FIPS mode
Default to FIPS off even in FIPS builds.
Add JS API to check and control FIPS mode.
Add command line arguments to force FIPS on/off.
Respect OPENSSL_CONF variable and read the config.
Add testing for new features.

Fixes: https://github.com/nodejs/node/issues/3819
PR-URL: https://github.com/nodejs/node/pull/5181
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
2016-02-25 15:06:41 -05:00
Marc Cuva
7e51966b32 doc: fix typo in pbkdf2Sync code sample
Function name in code sample had the wrong capitalization.

PR-URL: https://github.com/nodejs/node/pull/5306
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-25 19:51:02 +01:00