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

1304 Commits

Author SHA1 Message Date
Vladimir Kurchatkin
3f473ef141 assert: introduce deepStrictEqual
`deepStrictEqual` works the same way as `strictEqual`, but
uses `===` to compare primitives and requires prototypes of
equal objects to be the same object.

Fixes: https://github.com/joyent/node/issues/7161
Fixes: https://github.com/iojs/io.js/issues/620
PR-URL: https://github.com/iojs/io.js/pull/639
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Rod Vagg <rod@vagg.org>
2015-02-09 14:14:20 +03:00
Roman Reiss
828d19a1f6 doc: fix dns.lookup options example
PR-URL: https://github.com/iojs/io.js/pull/757
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-02-08 11:03:37 -08: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
Roman Reiss
633a990848 dns: allow dns.lookup() to return all addresses
This commit adds the 'all' option to dns.lookup(), allowing
all lookup results to be returned.

Semver: Minor
Fixes: https://github.com/iojs/io.js/issues/736
PR-URL: https://github.com/iojs/io.js/pull/744
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-06 17:18:47 -05:00
Sam Newman
50daee7243 stream: simpler stream constructon
Adds simplified constructor pattern, allowing users
to provide "read", "write", "transform", "flush", and
"writev" functions as stream options in lieu of subclassing.

Semver: minor
PR-URL: https://github.com/iojs/io.js/pull/697
Fixes: https://github.com/iojs/readable-stream/issues/102
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-02-04 20:19:39 -08:00
Calvin Metcalf
6561274d23 crypto: support passwords in publicEncrypt
Private keys may be used along with publicEncrypt since the private key
includes the public one.  This adds the ability to use encrypted private
keys which previously threw an error.  This commit also makes sure the
user exposed functions have names.

PR-URL: https://github.com/iojs/io.js/pull/626
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-02 23:21:49 +01:00
Sam Roberts
233e333b18 events: remove indeterminancy from event ordering
The order of the `newListener` and `removeListener` events with respect
to the actual adding and removing from the underlying listeners array
should be deterministic. There is no compelling reason for leaving it
indeterminate. Changing the ordering is likely to result in breaking
code that was unwittingly relying on the current behaviour, and the
indeterminancy makes it impossible to use these events to determine when
the first or last listener is added for an event.

PR-URL: https://github.com/iojs/io.js/pull/687
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-02 21:59:56 +01:00
Calvin Metcalf
7604e6decc docs: add note about default padding in crypto
Adds a note that the default padding for publicDecrypt/privateEncrypt
is RSA_PKCS1_PADDING instead of RSA_PKCS1_OAEP_PADDING as it is for
privateDecrypt/publicEncrypt.

PR-URL: https://github.com/iojs/io.js/pull/659
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-01-29 18:42:36 -08:00
Vladimir Kurchatkin
45d8d9f826 buffer: implement iterable interface
This makes possible to use `for..of` loop with
buffers. Also related `keys`, `values` and `entries`
methods are added for feature parity with `Uint8Array`.

PR-URL: https://github.com/iojs/io.js/pull/525
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-28 16:40:15 +03:00
Fedor Indutny
87e62bd4c8 crypto: implement privateEncrypt/publicDecrypt
PR-URL: https://github.com/iojs/io.js/pull/625
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Fix iojs/io.js#477
2015-01-28 02:02:52 +03:00
Bert Belder
5843ae8dfb Revert "doc: clarify fs.symlink and fs.symlinkSync parameters"
The offending doc change clarified nothing, but put the arguments to
fs.symlink() and fs.symlinkSync() in the wrong order.

This reverts commit 8146f2e607.

BUG: https://github.com/joyent/node/issues/8920
PR: https://github.com/joyent/node/pull/8936
2015-01-27 19:18:23 +01:00
Andres Suarez
5c7ab96b90 doc: fix net.Server.listen bind behavior
PR-URL: https://github.com/iojs/io.js/pull/503
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-27 16:31:15 +11:00
Johnny Ray Austin
84b05d48d9 doc: update writable streams default encoding
Setting the default encoding for a writable stream does
not return a boolean (true if successful or false if not)
as the docs indicate. Instead, if the operation is successful
nothing is returned and the method throws an error when
something goes wrong.

This stems from a contribution that was tweaked but the
docs were never updated accordingly.

PR-URL: https://github.com/iojs/io.js/pull/502
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-27 16:28:13 +11:00
ttrfwork
18552677d7 doc: fix minor grammar mistake in streams docs
PR-URL: https://github.com/iojs/io.js/pull/606
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-27 16:25:21 +11:00
Brendan Ashworth
35a4f1107e doc: alphabetize all.markdown
Previously `toc.markdown` was alphabetized but `all.markdown` was not.

PR-URL: https://github.com/iojs/io.js/pull/566
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-01-23 20:33:30 -05:00
Icer Liang
df0d790107 doc: dns.lookupService has wrong header level
PR-URL: https://github.com/iojs/io.js/pull/552
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-23 13:28:45 +01:00
Todd Kennedy
8b1db9c0a7 doc: note in docs about missing interfaces
Update the documentation for `os.networkInterfaces` to note that any
interface that has not been assigned an address will not be displayed in
the results

Fixes: https://github.com/iojs/io.js/issues/498
PR-URL: https://github.com/iojs/io.js/pull/543
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-23 13:26:12 +01:00
Ben Noordhuis
2928ac68e5 doc: bump punycode api stability to 'stable'
The punycode library has been in the tree for over three years now and
has been de facto stable for all that time, if not perhaps de jure.
Let's make it official.

PR-URL: https://github.com/iojs/io.js/pull/470
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-23 13:08:40 +01:00
Calvin Metcalf
e5e598060e lib,src: make pseudoRandomBytes alias randomBytes
Previously pseudoRandomBytes worked similarly to randomBytes but in the
event of insufficient entropy would silently return non-secure values.

As of f68a116, the entropy pool blocks if there is insufficient entropy
instead of giving an error so there is now no longer a case where
pseudoRandomBytes would act differently than randomBytes.

Docs are updated to remove pseudoRandomBytes and to clarify that
randomBytes now does block instead of erring when entropy is low.

PR-URL: https://github.com/iojs/io.js/pull/557
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-01-22 23:08:36 +01:00
Calvin Metcalf
d481bb68c4 doc: more explicit crypto.pseudoRandomBytes docs
Updates the docs for the crypto.pseudoRandomBytes function
to more explicitly detail how it's the same as crypto.randomBytes
just without a safety net (e.g. it doesn't throw an error when
there is low entropy).

PR-URL: https://github.com/iojs/io.js/pull/545
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-22 15:47:41 +01:00
Thomas Jensen
6f36630f55 doc: fix util.isBuffer examples
util.isPrimitive was used in place of util.isBuffer.

PR-URL: https://github.com/iojs/io.js/pull/496
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-18 22:48:37 +01:00
Michal Tehnik
753fcaa270 doc: extend example of http.request by end event
Added .on('end', callback) event to http.request example, because
for first sight it's not clear from http documentation, how to
handle end of request.

PR-URL: https://github.com/iojs/io.js/pull/447
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-15 17:40:24 +01:00
Mathias Bynens
e177377a4b doc: mention io.js alongside Node in Punycode docs
PR-URL: https://github.com/iojs/io.js/pull/390
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-14 22:22:50 +01:00
Mathias Buus
0c5de1ff81 doc: fix double smalloc example
PR-URL: https://github.com/iojs/io.js/pull/413
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-14 19:00:59 +01:00
Brian White
95955a1c4d doc: update util methods
PR-URL: https://github.com/iojs/io.js/pull/350
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-14 12:31:55 +11:00
Yosuke Furukawa
fa004f3c1b doc: remove tracing link in toc
PR-URL: https://github.com/iojs/io.js/pull/334
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-13 16:59:14 +01:00
Vladimir Guguiev
68a2d8f048 docs: improve Writable/Transform stream docs
Slightly fix and supplement the documentation for Writable#write and
Transform#transform methods. Make it more consistent. Mention passing
'buffer' as an encoding param in case chunk is a Buffer.

PR: https://github.com/iojs/io.js/pull/142
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-by: Rod Vagg <rod@vagg.org>
2015-01-12 23:59:31 +01:00
Chris Dickinson
9120f2b1fd doc: update style for iojs
* updates the styling for the iojs docs
* pulls the processing step for markdown files into
  a separate module
* adds the ability to insert comments into the markdown

PR-URL: https://github.com/iojs/io.js/pull/297
Fixes: https://github.com/iojs/iojs.github.io/issues/23
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-01-12 13:44:50 -08:00
Ben Noordhuis
913addbff5 Revert "url: support path for url.format"
This reverts commit d312b6d15c.

Reverted for breaking `npm install` with git+ssh URLs.

Conflicts:
    doc/api/url.markdown

Fixes: https://github.com/iojs/io.js/issues/295
PR-URL: https://github.com/iojs/io.js/pull/303
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-12 12:15:38 +01:00
Ben Noordhuis
26dd9e15bb build,src: remove sslv2 support
SSLv2 has been deprecated and known broken for nearly twenty years now.

I made SSLv2 support opt-in well over a year ago in commit 39aa894 and
now this commit removes it entirely.

PR-URL: https://github.com/iojs/io.js/pull/290
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-11 16:07:45 +01:00
Vladimir Kurchatkin
7f9a6c6213 fs: use ES6 octal literals for mode
Update docs, comments and code to use ES6 octal literals instead of
decimal + comment.

PR-URL: https://github.com/iojs/io.js/pull/281
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
2015-01-11 00:46:23 +01:00
Julien Gilli
94190924bb doc: improve dns module's documentation
Make the difference between dns.lookup and other functions even clearer.

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

Cherry-picked-from: 542234ad98
2015-01-10 22:28:50 +01:00
Julien Gilli
bfe04ed286 doc: clarify dns.lookup vs dns.resolve
Clarify and emphasize the differences between dns.lookup and the rest of
the functions in the dns module.

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

Cherry-picked-from: 5ff59453a4
2015-01-10 22:28:48 +01:00
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
Wang Xinyong
db7df57e03 doc: correct createSecureContext
Remove incorrect stablity indication of tls.createSecureContext, and
format stablity indication of crypto.createCredentials.

Fixes: e50749 "doc: document `tls.createSecureContext`"
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-09 11:46:58 -07:00
Stiliyan Lazarov
47f119cabf doc: fix wording and punctuation in modules
[trev.norris@gmail.com: break lines at 80 characters]
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-10-08 16:48:31 -07:00
Trevor Norris
6462519d3c buffer, doc: misc. fix and cleanup
* Add official documentation that a Buffer instance is a viable
  argument when instantiating a new Buffer.
* Properly set the poolOffset when a buffer needs to be truncated.
* Add comments clarifying specific peculiar coding choices.
* Remove a level of unnecessary indentation.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-10-08 02:24:32 -07:00
Steve Mao
6e4bd494a5 doc: add missing semicolons
PR-URL: https://github.com/joyent/node/pull/8498
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-07 23:30:42 -07:00
Johnny Ray
f04f3a0d01 streams: set default encoding for writable streams
Add API Writable#setDefaultEncoding().

PR-URL: https://github.com/joyent/node/pull/8483
Fixes: https://github.com/joyent/node/issues/7159
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-07 17:04:10 -07:00
Victor Widell
8392e8cdfb doc: improve readLine.pause()
The docs for readLine.pause are misleading. I seriously spent hours on this. If
it isn't a bug, at least it should be well documented.

Someone else stumbled on this too:
http://stackoverflow.com/questions/21341050/pausing-readline-in-node-js

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-10-06 19:24:29 -05:00
Steve Sharp
87ce067636 doc: Update net.markdown
Associates link to dns.lookup() with proper URL.

Fixes: https://github.com/joyent/node/issues/8018
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-10-06 19:24:21 -05:00
Yazhong Liu
83d7d9e6d8 buffer: add generic functions for (u)int ops
Add generic functions for (U)Int read/write operations on Buffers. These
support up to and including 48 bit reads and writes.

Include documentation and tests.

Additional work done by Trevor Norris to include 40 and 48 bit write
support. Because bitwise operations cannot be used on values greater
than 32 bits, the operations have been replaced with mathematical
calculations. Regardless, they are still faster than floating point
operations.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-03 01:31:20 -07:00
Julien Gilli
862cc28183 readline: should not require an output stream.
Passing null as the output stream to readline.Interface()'s constructor
is now supported. Any output written by readline is just discarded. It
makes it easier to use readline just as a line parser.

Fixes: https://github.com/joyent/node/issues/4408
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-01 15:00:02 -07:00
Gabriel Wicke
b705b73e46 url: make query() consistent
Match the behavior of the slow path by setting url.query to an empty
object when the url contains no query, but query parsing is requested.

Also add a test for this case, and update the documents to clearly
reflect this behavior.

Fixes: https://github.com/joyent/node/issues/8332
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-01 12:23:01 -07: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
f2a78de6ec doc: fix optional parameter parsing
The parameter parser specifically looked for the old bracket syntax.
This generated a lot of warnings when building the docs. Those warnings
have been fixed by changing the parsing logic.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-09-29 16:32:34 -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
Andrew Teich
d66adf0c85 doc: corrected typo in vm docs
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-09-19 16:55:25 -07:00
Guilherme de Souza
378d9723f2 doc: console example improvement
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-09-17 14:16:29 -07:00
Guilherme de Souza
468fb547bb doc: http.request() improved code example
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-09-17 12:19:05 -07:00