Commit Graph

1497 Commits (22533c035d0dbe8abfe699c982a1332b1bfb7b9b)

Author SHA1 Message Date
Ryan Graham 1deeab29f2 doc: improve exports/module.exports consistency
While they reference the same object, they are only interchangeable
for updates, not assignment.
2013-05-15 21:06:32 +02:00
Ryan Graham 93391ae9cb doc: clarify exports and module.exports
When exporting a single function you must use `module.exports` instead
of the `exports` convenience reference.
2013-05-15 21:05:57 +02:00
isaacs ca38def146 blog: Release 0.10.6 2013-05-14 14:35:14 -07:00
isaacs bdb78b9945 stream: don't create unnecessary buffers in Readable
If there is an encoding, and we do 'stream.push(chunk, enc)', and the
encoding argument matches the stated encoding, then we're converting from
a string, to a buffer, and then back to a string.  Of course, this is a
completely pointless bit of work, so it's best to avoid it when we know
that we can do so safely.
2013-05-14 11:36:04 -07:00
isaacs 6a833a38f6 blog: Release v0.11.2 2013-05-14 11:35:43 -07:00
isaacs 4b69bcfc66 doc: s/search.npmjs.org/npmjs.org/ 2013-05-09 15:15:39 -07:00
Robert Kowalski dc92ff8585 doc: document stream.Writable 'error' event
Fixes #5255.
2013-05-08 18:15:50 -07:00
Kevin Locke 1c2b03dea5 doc: update options for exec and execFile
The stdio and customFds options are never used by exec or execFile,
remove them from the documentation for these functions.
2013-05-03 16:01:33 +02:00
Sam Roberts 41cbdc5e64 doc: document return values of EventEmitter methods 2013-05-03 01:10:01 +02:00
isaacs 0e21d7b985 doc: link joyent logo in website footer 2013-05-02 09:48:33 -07:00
Miroslav Bajtoš a32a243d5f debugger: breakpoints in scripts not loaded yet
When developer calls setBreakpoint with an unknown script name,
we convert the script name into regular expression matching all
paths ending with given name (name can be a relative path too).

To create such breakpoint in V8, we use type `scriptRegEx`
instead of `scriptId` for `setbreakpoint` request.

To restore such breakpoint, we save the original script name
send by the user. We use this original name to set (restore)
breakpoint in the new child process.

This is a back-port of commit 5db936d from the master branch.
2013-05-02 08:52:58 +02:00
isaacs dda7b40204 doc: Fix require.extensions documentation
1. The stability index must come first, or it messes up the markdown
2. require.extensions is an Object, not an Array.

Close #5387
2013-04-30 07:40:43 -07:00
Ben Noordhuis 626d7abdb4 doc: cluster: s/server.destroy/server.close/
Fixes #5379.
2013-04-29 12:06:36 +02:00
isaacs 7bd8a5a2a6 doc: Deprecate require.extensions 2013-04-28 22:10:40 -07:00
isaacs 72cf499b54 blog: Post for v0.10.5 2013-04-23 14:08:01 -07:00
isaacs 0b04abcb10 blog: v0.11.1 does not work on windows x64 2013-04-19 09:22:06 -07:00
isaacs 223f22a30d blog: Post about 0.11.1 2013-04-19 09:12:53 -07:00
isaacs 56e90dacb3 blog: Post about 0.10.4 2013-04-19 09:12:22 -07:00
Sean Silva 63466e5cae doc: document value of `this` inside listeners
Fixes #5326.
2013-04-19 11:58:18 +02:00
Ben Noordhuis a835a2fc47 website: add link to nightlies on download page 2013-04-18 22:06:04 +02:00
Kelly Gerber 36503b523d docs: update path.join() example for v0.10
The current example shows the behavior of v0.8. In v0.10 arguments
to path.join() must be strings; otherwise, an exception is thrown.
2013-04-17 00:04:17 +02:00
Ryan Graham b02b93b2a2 doc: note a gotcha with http.Server sockets 2013-04-16 23:44:00 +02:00
isaacs b0de1e4a41 stream: Fix unshift() race conditions
Fix #5272

The consumption of a readable stream is a dance with 3 partners.

1. The specific stream Author (A)
2. The Stream Base class (B), and
3. The Consumer of the stream (C)

When B calls the _read() method that A implements, it sets a 'reading'
flag, so that parallel calls to _read() can be avoided.  When A calls
stream.push(), B knows that it's safe to start calling _read() again.

If the consumer C is some kind of parser that wants in some cases to
pass the source stream off to some other party, but not before "putting
back" some bit of previously consumed data (as in the case of Node's
websocket http upgrade implementation).  So, stream.unshift() will
generally *never* be called by A, but *only* called by C.

Prior to this patch, stream.unshift() *also* unset the state.reading
flag, meaning that C could indicate the end of a read, and B would
dutifully fire off another _read() call to A.  This is inappropriate.
In the case of fs streams, and other variably-laggy streams that don't
tolerate overlapped _read() calls, this causes big problems.

Also, calling stream.shift() after the 'end' event did not raise any
kind of error, but would cause very strange behavior indeed.  Calling it
after the EOF chunk was seen, but before the 'end' event was fired would
also cause weird behavior, and could lead to data being lost, since it
would not emit another 'readable' event.

This change makes it so that:

1. stream.unshift() does *not* set state.reading = false
2. stream.unshift() is allowed up until the 'end' event.
3. unshifting onto a EOF-encountered and zero-length (but not yet
end-emitted) stream will defer the 'end' event until the new data is
consumed.
4. pushing onto a EOF-encountered stream is now an error.

So, if you read(), you have that single tick to safely unshift() data
back into the stream, even if the null chunk was pushed, and the length
was 0.
2013-04-11 16:12:48 -07:00
isaacs 50be39792a blog: Fix title for v0.8.23 release 2013-04-11 11:06:20 -07:00
isaacs 67096fdb38 blog: Post for v0.8.23 2013-04-08 17:41:49 -07:00
Rod Vagg ccabd4a6fa process: expose NODE_MODULE_VERSION in process.versions 2013-04-08 16:48:18 +02:00
Ben Noordhuis e8c01739cd doc: document linux pwrite() bug
On Linux, positional writes don't work when the file is opened in
append mode. The kernel ignores the position argument and always
appends the data to the end of the file.

To quote the man page:

  POSIX requires that opening a file with the O_APPEND flag should have
  no affect on the location at which pwrite() writes data.  However, on
  Linux, if a file is opened with O_APPEND, pwrite() appends data to the
  end of the file, regardless of the value of offset.
2013-04-08 00:43:30 +02:00
isaacs aeef9518c6 doc: Correct caveats for http Readables 2013-04-05 11:07:53 -07:00
isaacs 0f460b03f3 blog: Post about 0.10.3 2013-04-03 11:28:09 -07:00
Michael Hart 440dcae987 Ensure BAD domain example actually uses domain 2013-04-01 10:09:27 -07:00
isaacs 1d17ced200 blog: v0.11.0 release 2013-03-28 14:53:29 -07:00
isaacs f1fa756681 blog: Update linux binary tarball shasums
I just accidentally the binary release.
2013-03-28 14:39:52 -07:00
isaacs 708e8589ea blog: Post about v0.10.2 2013-03-28 13:06:24 -07:00
isaacs 5ae26f3750 doc: Add 'don't ignore errors' section to domain
Also, an example program of using cluster and domain to handle errors
safely, with zero downtime, using process isolation.
2013-03-28 09:53:59 -07:00
Benjamin Ruston 024a8b0cb4 doc: debugger, dns, http: fix grammar 2013-03-28 16:50:37 +01:00
Benjamin Ruston 372911ffc7 doc: addon: fix grammar 2013-03-27 12:37:54 +01:00
Ben Noordhuis a80a132b38 doc: child_process: document 'error' event
Fixes #5130.
2013-03-26 16:34:43 +01:00
Ben Noordhuis 0e08e147c7 doc: fix formatting in tty.markdown
Fixes #5135.
2013-03-26 16:09:51 +01:00
Ben Noordhuis cfd0dca9ae crypto: make getCiphers() return non-SSL ciphers
Commit f53441a added crypto.getCiphers() as a function that returns the
names of SSL ciphers.

Commit 14a6c4e then added crypto.getHashes(), which returns the names of
digest algorithms, but that creates a subtle inconsistency: the return
values of crypto.getHashes() are valid arguments to crypto.createHash()
but that is not true for crypto.getCiphers() - the returned values are
only valid for SSL/TLS functions.

Rectify that by adding tls.getCiphers() and making crypto.getCiphers()
return proper cipher names.
2013-03-25 18:42:07 +01:00
Mathias Bynens 488b74d68b doc: mention `process.*.isTTY` under `process` 2013-03-25 13:54:32 +01:00
Ben Noordhuis 132c77e9f9 doc: document that stdio is usually blocking 2013-03-23 15:38:17 +01:00
isaacs 92cc187881 blog: Post for v0.10.1 2013-03-21 09:14:39 -07:00
Iskren Ivov Chernev 2f4a62c5e1 doc: fix streams2 SimpleProtocol example
A non-existing variable `b` was used to queue data for reading.
2013-03-20 00:34:31 +01:00
Ben Noordhuis 808b7ada07 doc: fix broken links in blog footer
The blog lives at blog.nodejs.org while the main website lives at
nodejs.org. Ergo, use absolute URLs for links to the main website.

Fixes #5062.
2013-03-18 14:41:51 +01:00
JeongHoon Byun f217b5ed62 doc: fix typo in crypto docs 2013-03-17 13:45:14 +01:00
Yi EungJun 852444a720 doc: https: Fix the link to tls.connect 2013-03-16 23:52:39 +01:00
koichik 1f53cfdeae doc: don't mark fs callbacks as optional
Refs #5005, #5008
2013-03-14 13:06:49 -07:00
Adam Malcontenti-Wilson 028c630ecd doc: change dgram to socket for properties of dgram.Socket
Fixes #4919.
2013-03-14 12:55:19 +01:00
Ben Noordhuis fa05e8a270 doc: implicit fs callbacks don't throw in v0.10
But they will in v0.12.

Re #5005.
2013-03-13 15:34:18 -07:00
Ben Noordhuis 7b7235a232 doc: add note on process.title max length
Fixes #5006.
2013-03-13 23:27:16 +01:00