Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #6244

Closed
wants to merge 3,121 commits into from
Closed

Master #6244

wants to merge 3,121 commits into from

Conversation

lpsuerj
Copy link

@lpsuerj lpsuerj commented Apr 16, 2016

Run tests in parallel if the environment variable JOBS
(which should contain a number of parallel jobs) is set.

PR-URL: #6208
Reviewed-By: Rod Vagg [email protected]
Reviewed-By: Myles Borins [email protected]
Reviewed-By: Rich Trott [email protected]
Reviewed-By: Ben Noordhuis [email protected]

watilde and others added 30 commits March 14, 2016 08:48
PR-URL: #5678
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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: #4810
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremy Whitlock <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
net.createServer('aPipe') and net.createServer(8080) are mistakes,
and now throw a TypeError instead of silently being treated as an
object.

PR-URL: #2904
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
OPENSSL_NO_SSL2 and OPENSSL_NO_WEAK_SSL_CIPHERS are defined in
opensslconf.h

Fixes: nodejs/Release#85
PR-URL: #5630
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
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: #5685
Reviewed-By: Claudio Rodriguez <[email protected]>
Reviewed-By: James M Snell <[email protected]>
`isIPv4` and `isIPv6` are implemented on top of `isIP`, which in turn
checks the sting for being both IPv4 and IPv6, which can be inefficient
in some scenarios. This commit makes them use `uv_inet_pton` directly
instead.

PR-URL: #5478
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
According to the spec gzipped archives can contain more than one
compressed member. Previously Node's gzip implementation would only
unzip the first member and throw away the rest of the compressed data.
Issue #4306 is an example of this occurring in daily use.

Fixes: #4306
PR-URL: #5120
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Per #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: #5617
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
process.send and child.send use JSON.stringify to serialize
the message.

Fixes: #5453
PR-URL: #5723
Reviewed-By: Jeremy Whitlock <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Add the proposed Testing WG. WORKING_GROUPS.md indicates that opening
a pull request to that file is the way to request that a charter be
ratified by the TC. So, that's what this is.

The charter document is currently:
https://github.com/nodejs/testing/blob/master/Charter.md

PR-URL: #5461
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Alexis Campailla <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
`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: #5635
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
If both -i and -e flags are specified, do not ignore the -i. Instead,
launch the interactive REPL and start by evaluating the passed string.

Fixes: #1197
PR-URL: #5655
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
This removes the ability to run linting from the source tarball,
rationale being that developers should use a git clone instead.

Also, fix the path of removing artifacts from the openssl dependency
since it now lives in `deps/openssl/openssl/`.

Tarballs shrink with ~10%.

PR-URL: #5695
Fixes: #5618
Reviewed-By: Rod Vagg <[email protected]>
Reviewed-By: thefourtheye <[email protected]>
Reviewed-By: James Snell <[email protected]>
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: #4682
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: #5673
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James Snell <[email protected]>
Reviewed-By: Brian White <[email protected]>
Uses better troff formatting.
Removes v8 options from the man page.

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

PR-URL: #5497
Reviewed-By: James Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Fixes: https:github.com//issues/5682
PR-URL: #5736
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Document that util._extend was never intended to be used
and should be considered deprecated.

PR-URL: #4903
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Do not call the linkManPages if the tok type is code

Fixes: #5686
PR-URL: #5721
Reviewed-By: James M Snell <[email protected]>
Notable changes:

* **contextify**: Fixed a memory consumption issue related to heavy use
of `vm.createContext` and `vm.runInNewContext`. (Ali Ijaz Sheikh)
#5392
* **governance**: The following members have been added as
collaborators:
  - Andreas Madsen (@AndreasMadsen)
  - Benjamin Gruenbaum (@benjamingr)
  - Claudio Rodriguez (@claudiorodriguez)
  - Glen Keane (@thekemkid)
  - Jeremy Whitlock (@whitlockjc)
  - Matt Loring (@matthewloring)
  - Phillip Johnsen (@phillipj)
* **lib**: copy arguments object instead of leaking it (Nathan Woltman)
#4361
* **src**: allow combination of -i and -e cli flags (Rich Trott)
#5655
* **v8**: backport fb4ccae from v8 upstream (Vladimir Krivosheev) #4231
  -  breakout events from v8 to offer better support for external
     debuggers
* **zlib**: add support for concatenated members (Kári Tristan
Helgason) #5120

PR-URL: #5702
PR-URL: #5688
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Fixes: #2305
The format of certain code comments in the `path` documentation results
in the code blocks being invalid. I also find it confusing at least as
formatted on the website. This change is intended to improve those
comments.

PR-URL: #5670
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Brian White <[email protected]>
SSL sockets leak whenever keep alive is enabled, ca option is set in
the global agent, and requests are sent without the ca property.
In the following case at Agent.prototype.createSocket a socket will
be created with a hashtag name that includes data from the global
agents’ ca property.

On subsequent requests at Agent.prototype.addRequest we do not find
the free socket, because the hashtag name generated there does not
take into account the global agents’ ca property, thus creating a new
socket and leaving the first socket to timeout. closes: #5699

PR-URL: #5713
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Changes the multiline return example commments in querystring
which have the example out-of-comment, into single comment
lines to remain consistent with other docs.

PR-URL: #5705
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Ref: #3804

PR-URL: #5167
Reviewed-By: rvagg - Rod Vagg <[email protected]>
Reviewed-By: joaocgreis - João Reis <[email protected]>
Ref: #3804

PR-URL: #5167
Reviewed-By: rvagg - Rod Vagg <[email protected]>
Reviewed-By: joaocgreis - João Reis <[email protected]>
PR-URL: #5500
Reviewed-By: Shigeki Ohtsu <[email protected]>
This commit makes input type checking consistent across all path
functions.

PR-URL: #5348
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
Previously, we emitted ip and addressType. This change includes the host
as the last argument to the lookup event.

PR-URL: #5598
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
The string template was closed after `${buf.length}`
causing a syntax error within the example.

PR-URL: #5781
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax and others added 28 commits April 11, 2016 22:50
In 6899094 (#2325),
the conditions for increasing `readableState.awaitDrain` when
writing to a piping destination returns false were changed so
that they could not actually be met, effectively leaving
`readableState.awaitDrain` with a constant value of 0.

This patch changes the conditions to testing whether the
stream for which `.write()` returned false is still a piping
destination, which was likely the intention of the original
patch.

Fixes: #5820
Fixes: #5257
PR-URL: #6023
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
As Node.js expects either Python 2.6 or 2.7 installed to work properly,
simplejson module is no longer necessary. It was included in Python 2.6
as the json module.

PR-URL: #6101
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Reduce client connections from 10 to 4 in a test that is causing issues
on Raspberry Pi 2 devices in CI.

Fixes: #5122
PR-URL: #6138
Reviewed-By: Benjamin Gruenbaum <[email protected]>
os.userInfo() calls libuv's uv_os_get_passwd() function. It returns
an object containing the current effective user's username, uid,
gid, shell, and home directory. On Windows, the uid and gid are
-1, and the shell is null.

Refs: #5582
PR-URL: #6104
Reviewed-By: James M Snell <[email protected]>
Original commit message:

    tools: fix tickprocessor Cpp symbols on mac

    Despite man page documentation:

        -f Display the symbol table of a dynamic library flat (as one
           file not separate modules).

    `nm` on mac treats `-f` as a shorthand for `-format`. The `-f` argument
    does not seem to be required, so just remove it completely.

    (For `-format` documentation - see `nm --help` on mac).

    BUG=

    Review URL: https://codereview.chromium.org/1840633002

    Cr-Commit-Position: refs/heads/master@{#35445}

Fix: #5903
PR-URL: #6179
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
net streams can request multiple chunks to be written in a synchronous
fashion. If this is combined with cork/uncork, en error is currently
thrown because of a regression introduced in:
89aeab9
(#4354).

Fixes: #6154
PR-URL: #6164
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Mathias Buus <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Change the regular expression that recognizes “simple” JS expressions
to requiring that the full line needs to match it.

Previously, in terms like `a().b.`, `b.` would be a partial match.
This meant that completion would evaluate `b` and either fail with
a `ReferenceError` or, if `b` was some global, return the properties
of the global `b` object.

PR-URL: #6192
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
PR-URL: #6194
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: #6153
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Upstream PR: npm/npm#12310

PR-URL: #6153
Reviewed-By: Jeremiah Senkpiel <[email protected]>
* Pick up the branch head for V8 5.0 stable [1]
* Edit v8 gitignore to allow trace_event copy
* Update V8 DEP trace_event as per deps/v8/DEPS [2]

[1] https://chromium.googlesource.com/v8/v8.git/+/3c67831
[2] https://chromium.googlesource.com/chromium/src/base/trace_event/common/+/4b09207e447ae5bd34643b4c6321bee7b76d35f9

Ref: #5945
PR-URL: #6111
Reviewed-By: targos - Michaël Zasso <[email protected]>
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
Reviewed-By: indutny - Fedor Indutny <[email protected]>
V8 5.0 introduced a small modification for the unexpected end of input
error.

PR-URL: #5945
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
Reviewed-By: indutny - Fedor Indutny <[email protected]>
PR-URL: #6090
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Fixes: #2895
This commit improves module loading performance by at least ~25-35%
in the module-loader benchmarks.

Some optimization strategies include:
* Try-finally/try-catch isolation
* Replacing regular expressions with manual parsing
* Avoiding unnecessary string and array creation
* Avoiding constant recompilation of anonymous functions and
function definitions within functions

PR-URL: #5172
Reviewed-By: James M Snell <[email protected]>
Though not a POSIX signal, SIGINFO is supported by BSD systems
(including Mac OS X) and is amongst the few signals that can be
triggered in a terminal via a simple key combination (CTRL-T).

On Linux, SIGINFO is an alias for SIGPWR; hence the defensive
conditionals in src/node.cc.

PR-URL: #6093
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
The debugger tests in parallel fail with `make test` sometimes (all the
time?). This appears to be related to running in parallel, as it does
not fail with `make test-ci`, when run via `tools/test.py` or directly
from the command line with `./node
test/parallel/test-debugger-util-regression.js`.

A separate issue may be opened to find out why it is failing in
parallel, but for now, I think it's important to fix `make test`
promptly.

I suspect the issue is that the tests are relying on a default port
somewhere and so they are colliding when run in parallel. But that's
just a guess for the moment.

PR-URL: #6205
Fixes: #6201
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
This commit switches from the eslint command-line tool to a custom
tool that uses eslint programmatically in order to perform linting
in parallel and to display linting results incrementally instead of
buffering them until the end.

Fixes: #5596
PR-URL: #5638
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Remove realpath() and realpathSync() cache.
Use the native uv_fs_realpath() which is faster
then the JS implementation by a few orders of magnitude.

PR-URL: #3594
Reviewed-By: Trevor Norris <[email protected]>
Reviewed-By: Brian White <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Aligns the functionality of SlowBuffer with the new Buffer
constructor API. Next step is to docs-only deprecate
SlowBuffer.

Replace the internal uses of SlowBuffer with
`Buffer.allocUnsafeSlow(size)`

PR-URL: #5833
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
With the addition of `Buffer.allocUnsafeSlow(size)`
`SlowBuffer` can be deprecated... but docs-only for now.

PR-URL: #5833
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
PR-URL: #5833
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
PR-URL: #6224
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
PR-URL: #6225
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
PR-URL: #6226
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #6227
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Do to various reasons, outlined in the committed document, domains were
only in core for 2 years before being deprecated. This outline explains
why they received criticism from the community and never gained traction
with module authors.

Also included is an example script that accompanies the postmortem
analysis.

PR-URL: #6159
Reviewed-By: Robert Lindstädt <[email protected]>
Reviewed-By: Kelvin Knighton <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Brian White <[email protected]>
Run tests in parallel if the environment variable JOBS
(which should contain a number of parallel jobs) is set.

PR-URL: #6208
Reviewed-By: Rod Vagg <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@targos targos added the invalid Issues and PRs that are invalid. label Apr 16, 2016
@targos targos closed this Apr 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues and PRs that are invalid.
Projects
None yet
Development

Successfully merging this pull request may close these issues.