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

1220 Commits

Author SHA1 Message Date
Julien Gilli
b91c535d86 doc: clarify url.format documentation
The original documentation was slightly confusing. It seemed that the
list of items described the properties of the urlObj object, while it
was actually describing the formatting process. This change makes this
clearer.

Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>

Cherry-picked-from: 0603c8345b
2015-01-10 22:28:34 +01:00
James M Snell
3622f0308f doc: clarify buffer api documentation
Better wording for start and end parameters, also document .length
should be considered read-only.

PR-URL: https://github.com/joyent/node/pull/8910
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>

Cherry-picked-from: 102a861ec2
2015-01-10 22:28:32 +01:00
James M Snell
ff350f7169 doc: clarify add/removeListener semantics
Clarify that adding or removing a listener is not idempotent.

PR-URL: https://github.com/joyent/node/pull/8911
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>

Cherry-picked-from: 48536394c9
2015-01-10 22:28:16 +01:00
pkcs
f1e685fdfe doc: clearer log messages in net code samples
Code examples in documentation for net.createServer and
net.createConnection contained confusing log messages. This change makes
them clearer.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>

Cherry-picked-from: 8120015f40
2015-01-10 22:24:22 +01:00
Sam Roberts
c7b333b866 doc: cover stdio option in child_process
- Add hyperlinks from spawn options to subsections detailing what
those options do.
- Clarify some verbiage around ChildProcess.prototype.std{in,out,err}.
- Remove second-person pronoun.

PR-URL: https://github.com/joyent/node/pull/8639
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>

Cherry-picked-from: https://github.com/joyent/node/commit/3a08b7c3e0bc6757e70889196
2015-01-10 22:24:13 +01: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: 13a992b1c2
2015-01-10 22:15:51 +01:00
Eric Mill
d8d1c4c87c doc: update openssl commands to use best practices
This updates key size to 2048 and default hash function to sha256.

Reviewed-by: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8690

Cherry-picked-from: 88bd95cfef
2015-01-10 22:15:49 +01:00
Calvin Metcalf
43226dd40e doc: add note about key derivation
adds a note to the crypto docs passing along
the advice that openssl gives about what
key derivation function they recommend.

PR-URL: https://github.com/joyent/node/pull/8580
Reviewed-by: Fedor Indutny <fedor@indutny.com>

Cherry-picked-from: 7dbc024c85
2015-01-10 22:15:48 +01:00
Calvin Metcalf
90f07a7b3e doc: document _transform callback takes 2 args
Expands the paragraph in the transform stream
implementation docs about the callback that is passed
to the _transform method to include details about how
two arguments may be passed, error and data.  A code
example is also included.

Reviewed-by: Fedor Indutny <fedor@indutny.com>

Cherry-picked-from: c8e0bdd7cf
2015-01-10 22:15:46 +01:00
Vladimir Kurchatkin
c70d192ab3 util: show symbol properties
Properties with symbol names are shown if option `showHidden` of `util.inspect`
or `console.dir` is `true`.

PR-URL: https://github.com/iojs/io.js/pull/247
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-08 11:20:15 +01:00
Ben Noordhuis
94e147500c Merge remote-tracking branch 'joyent/v0.12' into v1.x
I was originally going to do this after the v0.11.15 release, but as
that release is three weeks overdue now, I decided not to wait any
longer; we don't want the delta to get too big.

Conflicts:
	lib/net.js
	test/simple/simple.status

PR-URL: https://github.com/iojs/io.js/pull/236
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-01-05 17:26:47 +01:00
Ben Noordhuis
8b04161342 doc: util: document --trace-deprecation
Document the --trace-deprecation flag and the `process` properties that
affect util.deprecate().

Fixes: https://github.com/iojs/io.js/issues/190
PR-URL: https://github.com/iojs/io.js/pull/191
Reviewed-By: Jonathan Ong <me@jongleberry.com>
2014-12-30 23:46:47 +01:00
Sam Roberts
b42c0853ae doc: add tls server.close() callback docs
Also, tests to confirm its existence.

PR-URL: https://github.com/iojs/io.js/pull/217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-30 21:40:46 +01:00
Sam Roberts
63005ee10b dgram: close() should accept a callback
Like net, http, and https server.close, and socket.end(), etc.

PR-URL: https://github.com/iojs/io.js/pull/217
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-30 21:40:43 +01:00
Tim Ruffles
6f49c244d1 doc: be specific about the unit of maxBuffer
The maxBuffer option was not self-documenting, so document the unit and
its effect.

PR-URL: https://github.com/iojs/io.js/pull/209
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-29 17:26:41 +01:00
Mark Stosberg
6af94831a8 doc: document time() and timeEnd() relationship
`console.time()` and `console.timeEnd()` are very closely related. It's
useful to reference them both from each other.

Previously, console.time() did not mention that it needed to be paired
with a call to console.timeEnd() to be useful, and timeEnd() also failed
to mention that console.time() needed to be called first.

References in both directions have been added.

PR-URL: https://github.com/iojs/io.js/pull/198
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-23 15:33:11 +01:00
Mark Stosberg
0a8e987708 doc: fix v8 doc headings so 'make doc' passes
Previously the code that builds the Table of Contents threw
an exception because of jump from an H1 heading directly to an H3
heading.

By changing the H3 heading to an H2, 'make doc' works again. This is
also consistent with other docs like console.markdown which use
H2 for method call documentation.

PR-URL: https://github.com/iojs/io.js/pull/203
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-23 15:29:18 +01:00
Jackson Tian
890baa03a8 doc: add details for http res/req end callback
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's end methods.

Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-19 13:02:47 -08:00
Julian Duque
c4a308d223 debugger: improve clearBreakpoint error and docs
Currently clearBreakpoint error is confusing, it says "Script not found"
when there is no breakpoint, also documentation doesn't include
signature for clearBreakpoint.

PR-URL: https://github.com/iojs/io.js/pull/175
Reviewed-By: Miroslav Bajtoš <miroslav@strongloop.com>
2014-12-19 18:52:38 +01:00
cjihrig
5678595856 fs: deprecate exists() and existsSync()
These methods don't follow standard conventions, and shouldn't
be used anyway.

Fixes: https://github.com/iojs/io.js/issues/103
PR-URL: https://github.com/iojs/io.js/pull/166
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-19 10:27:48 -05:00
Jackson Tian
a5532674b0 doc: document callback of http res/req end method
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's end methods.

PR-URL: https://github.com/iojs/io.js/pull/181
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <squirrelslikeacorns@gmail.com>
2014-12-18 19:39:30 +01:00
Ben Burns
5b9e5bdd03 doc: clarify create{Read,Write}Stream fd option
Clarify the fd option: it is preferred to the path parameter, omits
the "open" event if given, and is available on WriteStreams as well.

PR-URL: https://github.com/joyent/node/issues/7707
Fixes: https://github.com/joyent/node/issues/7707
Fixes: https://github.com/joyent/node/issues/7708
Fixes: https://github.com/joyent/node/issues/4367
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-15 22:25:58 -08:00
cjihrig
165b70f146 fs: add access() and accessSync()
fs.exists() and fs.existsSync() do not follow the typical
error first callback convention. access() and accessSync()
are added as alternatives in this commit.

Fixes: https://github.com/joyent/node/pull/8714
PR-URL: https://github.com/iojs/io.js/pull/114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
2014-12-15 12:05:49 -05:00
Alejandro Oviedo
524882faca doc: change write() after end() streams example
Currently there's an example using http.ServerResponse stream, which
has a known bug and will not throw an error while writing after end().
Changed to a writable stream from fs which behaves as expected.

Fixes https://github.com/joyent/node/issues/8814.

PR-URL: https://github.com/iojs/io.js/pull/155
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <squirrelslikeacorns@gmail.com>
2014-12-14 20:06:46 +01:00
Ben Noordhuis
db595b2de6 lib: reintroduce v8 module
I introduced this module over a year ago in a pull request as the v8
module but it was quickly subsumed by the tracing module.

The tracing module was recently removed again and that is why this
commit introduces the v8 module again, including the new features it
picked up commits d23ac0e and f8076c4.

PR-URL: https://github.com/iojs/io.js/pull/131
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Thorsten Lorenz <thlorenz@gmx.de>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2014-12-14 18:52:57 +01:00
Chris Dickinson
6a29356451 domain: add soft deprecation notice
Per the TC meeting on 2014-12-10, domains will be "soft deprecated"
until a suitable replacement API is available; at which time they
will be fully deprecated. Full deprecation will include references
to replacement API and the application of util.deprecate to the domain
api.

PR-URL: https://github.com/iojs/io.js/pull/141
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-12 09:52:05 -08:00
micnic
8c69d7bed4 domain: forward args to .run(fn)
Adds the feature to define arguments for the function called in
domain.run(), this is supposed to be useful when a function is called from
another context and some values from the current context are needed as
arguments, it's similar to the callback from setTimeout or setInterval.

PR-URL: https://github.com/iojs/io.js/pull/15
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-12 12:14:11 +11:00
Bert Belder
2b6a0f85f3 src: remove the tracing module entirely
PR-URL: https://github.com/iojs/io.js/pull/124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-09 17:57:19 +01:00
Jackson Tian
e96100f052 doc: mention callback for http res/req write & end
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's write and end methods.
2014-12-09 17:57:18 +01:00
Trevor Norris
0d60ab3efe src: remove Async Listener
Async Listener was the name of the user-facing JS API, and is being
completely removed. Instead low level hooks directly into the mechanism
that AL used will be introduced in a future commit.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-09 17:57:12 +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
Brendan Ashworth
9bca8a0a91 doc: fixes grammar in timers/tls
This commit fixes a few grammar issues located
within the doc files for timers and tls.

They primarily include incorrect use of a / an
and a single insertion of a comma.

same as [this PR](https://github.com/joyent/node/pull/8581)

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/iojs/io.js/pull/76
2014-12-07 18:02:11 +03:00
Christian Tellnes
2931348372 events: implement EventEmitter#getMaxListeners()
Fixes https://github.com/joyent/node/issues/8237.

PR-URL: https://github.com/iojs/io.js/pull/82
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-05 22:10:35 +01:00
Brendan Ashworth
70195acbe3 doc: fix grammar and wording in tls and timers
In `tls.markdown`, there was a misuse of 'a' which has been replaced
with 'an'.

In `timers.markdown`...
  line 31: misuse of 'a', replaced with 'an'
  line 59: unclear wording, haywire 'a', added new comma
2014-12-05 12:30:40 -08:00
Jackson Tian
9653c4b8c7 doc: mention callback for http res/req write & end
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's write and end methods.
2014-12-05 10:59:40 -08:00
Trevor Norris
b6559553a4 src: remove Async Listener
Async Listener was the name of the user-facing JS API, and is being
completely removed. Instead low level hooks directly into the mechanism
that AL used will be introduced in a future commit.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:33:26 -08:00
Carlos Campderrós
4815873bb5 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-02 22:35:36 -08:00
Yazhong Liu
ba687f6eb4 url: support path for url.format
this adds support for a "path" field that overrides
"query", "search", and "pathname" if given.

Fixes: https://github.com/joyent/node/issues/8722
PR-URL: https://github.com/joyent/node/pull/8755
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-02 11:32:08 -08:00
Yazhong Liu
d312b6d15c url: support path for url.format
this adds support for a "path" field that overrides
"query", "search", and "pathname" if given.

Fixes: https://github.com/joyent/node/issues/8722
PR-URL: https://github.com/joyent/node/pull/8755
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-02 10:55:22 -08:00
Ben Noordhuis
fcbbc7a050 Merge remote-tracking branch 'joyent/v0.12' into v0.12
Conflicts:
	Makefile
	deps/v8/src/base/platform/platform.h

PR-URL: https://github.com/node-forward/node/pull/65
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-11-22 17:55:59 +01:00
Rory Bradford
2d17193f20 path: added parse() and format() functions
The parse() function splits a path and returns an object
with the different elements. The format() function is the
reverse of this and adds an objects corresponding path
elements to make up a string. Fixes #6976.

Fixes: https://github.com/joyent/node/issues/6976
PR-URL: https://github.com/joyent/node/pull/8750
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-11-20 16:21:11 -08:00
Timothy J Fontaine
6a90a06002 path: allow calling platform specific methods
Add path.posix and path.win32 which have the specific methods like
resolve and normalize so you can specifically normalize or resolve
based on the target platform.

PR-URL: https://github.com/joyent/node/pull/5661
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-20 16:10:55 -08:00
Steve Sharp
4dc8b26bbe doc: correct broken link in net.markdown
Fixes broken link to Readable Stream documentation.

Fixes: https://github.com/joyent/node/issues/8464
PR-URL: https://github.com/joyent/node/pull/8756
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-20 15:38:29 -08:00
Ben Noordhuis
f8076c4067 lib: add setFlagsFromString() to tracing module
Expose v8::V8::SetFlagsFromString() on tracing.v8 in lib/tracing.js.

PR-URL: https://github.com/node-forward/node/pull/62
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-20 16:08:54 +01:00
MK Safi
6a6782343c doc: clarify return value of http.createServer
PR-URL: https://github.com/joyent/node/pull/6054
Reviewed-by: Isaac Z. Schlueter <i@izs.me>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-19 14:18:50 -08:00
Artur Cistov
adc0206de9 doc: fix typos in http.markdown
PR-URL: https://github.com/joyent/node/pull/4784
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-17 15:35:00 -08:00
sudodoki
fd2226894a doc: note ability to require files within packages
Adding note to api/modules.markdown about ability to
load arbitrary path from modules from node_module path
by adding reference to path after module name in call
to require()

PR-URL: https://github.com/joyent/node/pull/7794
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-11-09 21:46:35 -08:00
Chris Dickinson
03bae7bded doc: remove tls.createSecurePair deprecation
pending tls.TLSSocket growing the ability to work
with streams, createSecurePair will remain.

PR-URL: https://github.com/joyent/node/pull/8695
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-11-07 14:33:05 -08:00
cjihrig
c2b4f4809b net: add pauseOnConnect option to createServer()
Currently when a server receives a new connection the underlying socket
handle begins reading data immediately. This causes problems when
sockets are passed between processes, as data can be read by the first
process and thus never read by the second process.

This commit allows sockets that are constructed with a handle to be
paused initially.

PR-URL: https://github.com/joyent/node/pull/8576
Fixes: https://github.com/joyent/node/issues/7905
Fixes: https://github.com/joyent/node/issues/7784
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-27 14:11:20 -07:00
Vladimir Kurchatkin
15aa47e261 docs: fix smalloc.dispose() example
Also couple of additions about dispose and limitations of smalloc'ed
objects.

Fixes: https://github.com/joyent/node/pull/8625
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-27 12:58:05 -07:00