Граф коммитов

16778 Коммитов

Автор SHA1 Сообщение Дата
Michael Dawson ef4768754c doc: add supported platforms list
PR-URL: https://github.com/nodejs/node/pull/11872
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-03-20 13:43:15 -04:00
Luca Maraschi 6aed32c579 test: add tests for unixtimestamp generation
This test checks for the different input types for the generation
of UNIX timestamps in the fs module.

PR-URL: https://github.com/nodejs/node/pull/11886
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-03-20 13:18:16 -04:00
Luca Maraschi 1ff6796083 test: added net.connect lookup type check
Check the options passed to Socket.prototype.connect() to
validate the type of the lookup property.

PR-URL: https://github.com/nodejs/node/pull/11873
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-03-20 12:45:16 -04:00
Ben Noordhuis 03a6c6ea8c tls: fix segfault on destroy after partial read
OnRead() calls into JS land which can result in the SSL context object
being destroyed on return.  Check that `ssl_ != nullptr` afterwards.

Fixes: https://github.com/nodejs/node/issues/11885
PR-URL: https://github.com/nodejs/node/pull/11898
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-20 16:51:29 +01:00
AnnaMag 7ef2d90e1b test: fix assertion in vm test
Prototypes are not strict equal when they are from
different contexts. Therefore, assert.strictEqual()
fails for objects that are created in different
contexts, e.g., in vm.runInContext().

Instead of expecting the prototypes to be equal,
only check the properties of the objects
for equality.

PR-URL: https://github.com/nodejs/node/pull/11862
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-20 09:16:23 +01:00
Vse Mozhet Byt 4895e0c1f0 doc: add vsemozhetbyt to collaborators
PR-URL: https://github.com/nodejs/node/pull/11932
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2017-03-20 03:16:59 +02:00
Franziska Hinkelmann dd8982dc74 deps: cherry-pick 09de996 from V8 upstream
Original commit message:
  [debugger] fix switch block source positions.

  The switch statement itself is part of the switch block.
  However, the source position of the statement is outside of
  the block. This leads to confusion for the debugger, if the
  switch block pushes a block context: the current context is
  a block context, but the scope analysis based on the current
  source position tells the debugger that we should be outside
  the scope, so we should have the function context.

  R=marja@chromium.org
  BUG=v8:6085
  Review-Url: https://codereview.chromium.org/2744213003
  Cr-Commit-Position: refs/heads/master@{#43744}
  Committed: 09de9969cc

Fixes: https://github.com/nodejs/node/issues/11746
PR-URL: https://github.com/nodejs/node/pull/11905
Fixes: https://github.com/nodejs/node/issues/11746
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2017-03-19 21:41:47 +01:00
Danny Nemer 5bda5faffd readline: add option to stop duplicates in history
Adds `options.deDupeHistory` for `readline.createInterface(options)`. If
`options.deDupeHistory` is `true`, when a new input line being added to
the history list duplicates an older one, removes the older line from
the list. Defaults to `false`.

Many users would appreciate this option, as it is a common setting in
shells. This option certainly should not be default behavior, as it
would be problematic in applications such as the `repl`, which inherits
from the readline `Interface`.

Extends documentation to reflect this API addition.

Adds tests for when `options.deDupeHistory` is truthy, and when
`options.deDupeHistory` is falsey.

PR-URL: https://github.com/nodejs/node/pull/2982
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-03-17 17:01:32 -04:00
Rich Trott df69d95b76 test: add coverage for child_process bounds check
Make sure that monkey-patching process.execArgv doesn't cause
child_process to incorrectly munge execArgv in fork().

This basically is adding coverage for an `index > 0` check (see Refs).
Previously, that condition was never false in any of the tests.

PR-URL: https://github.com/nodejs/node/pull/11800
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Refs: c67207731f/lib/child_process.js (L76)
2017-03-17 13:58:57 -07:00
Ruslan Bekenev 2e74b0da8f doc: add note that vm module is not a security mechanism
the text added in this commit should warn users about
wrong idea that vm module can be secure to run unsafe scripts
in sandboxes

PR-URL: https://github.com/nodejs/node/pull/11557
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-17 11:19:13 -07:00
James M Snell 989713d343 lib: avoid using forEach
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:55 -07:00
James M Snell f6dbead126 util: avoid using forEach
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:50 -07:00
James M Snell 2d230faa56 module: avoid using forEach
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:45 -07:00
James M Snell ae9e640f30 repl: avoid using forEach
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:40 -07:00
James M Snell 53cf483401 readline: avoid using forEach
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:35 -07:00
James M Snell 42e55eb37b net: avoid using forEach
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:30 -07:00
James M Snell 4d090855c6 lib: avoid using forEach in LazyTransform
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:25 -07:00
James M Snell a993beb915 fs: avoid using forEach
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:20 -07:00
James M Snell 5aa7d4daca tls: avoid using forEach
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:16 -07:00
James M Snell 910a8998fb stream: avoid using forEach
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:10 -07:00
James M Snell c8acd08a37 benchmark: benchmark comparing forEach with for
PR-URL: https://github.com/nodejs/node/pull/11582
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 11:09:03 -07:00
Jan Krems 704263139b lib: Fix swallowed events in inspect integration
PR-URL: https://github.com/nodejs/node/pull/11869
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 10:49:09 -07:00
Jan Krems b57f9ee3bf deps: Add node-inspect 1.10.6
This updates the bundled `node-inspect` to 1.10.6.

Highlights:

* `node --debug-port=1234 inspect` respects the custom port.
* Test stability improvements on various platforms.

Compare: https://github.com/nodejs/node-inspect/compare/v1.10.4...v1.10.6

PR-URL: https://github.com/nodejs/node/pull/11869
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 10:48:58 -07:00
Noj Vek 38299d2456 Fix #7065: cli help documentation for --inspect
Adding documentation to node.1 and cli.md

PR-URL: https://github.com/nodejs/node/pull/11660
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-17 10:27:01 -07:00
AnnaMag 6473737bb1 test: failing behaviour on sandboxed Proxy
CopyProperties() causes sandboxed Proxy to throw error
when in fact no code has been run. The function will
be removed with the updates to the V8 API.

Here, failing Proxy test case is moved to known_issues.

PR-URL: https://github.com/nodejs/node/pull/11671
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-17 09:44:41 -07:00
liusi 379eec357d build: add cpp linting to windows build
This PR adds cpp linting to windows build script. After this change,
running command `vcbuild lint` will run both cpp linting and javascript
linting on a windows machine.

PR-URL: https://github.com/nodejs/node/pull/11856
Fixes: https://github.com/nodejs/node/issues/11816
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-17 09:22:46 -07:00
Jan Krems c7b60165a6 repl: Empty command should be sent to eval function
This fixes a regression introduced in https://github.com/nodejs/node/pull/6171

PR-URL: https://github.com/nodejs/node/pull/11871
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-17 08:58:22 -07:00
Daniel Bevenius f0d4237ef5 build: mac OBJ_DIR should point to obj.target
I think there might be an issue with the value of OBJ_DIR when
using a "mac" os. The value is currently specified in common.gypi
which is included by node.gyp:
'OBJ_DIR': '<(PRODUCT_DIR)/obj',

In the generated Makefile (out/Makefile) the object output directory
is:
obj := $(builddir)/obj

And in the included node.target.mk we have the OBJS declared:
OBJS := \
         $(obj).target/$(TARGET)/src/async-wrap.o \
         $(obj).target/$(TARGET)/src/cares_wrap.o \

If OBJ_DIR is used in node.gyp to point to generated object files
on mac they will not be found.

PR-URL: https://github.com/nodejs/node/pull/11857
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-17 13:50:27 +01:00
Gireesh Punathil d631af59c0
test: delay child exit in AIX for pseudo-tty tests
The tests in pseudo-tty takes the form of child node writing some data
and exiting, while parent python consume them through pseudo tty
implementations, and validate the result.

While there is no synchronization between child and parent, this works
for most platforms, except AIX, where the child exits even before the
parent could setup the read loop, under race conditions

Fixing the race condition is ideally done through sending ACK messages
to and forth, but involves massive changes and have side effect. The
workaround is to address them in AIX alone, by adding a reasonable
delay.

PR-URL: https://github.com/nodejs/node/pull/11715
Fixes: https://github.com/nodejs/node/issues/7973
Fixes: https://github.com/nodejs/node/issues/9765
Fixes: https://github.com/nodejs/node/issues/11541
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-03-17 12:28:44 +00:00
Timothy Gu d099f8e317 src: remove explicit UTF-8 validity check in url
This step was never part of the URL Standard's host parser algorithm,
and is rendered unnecessary after IDNA errors are no longer ignored.

PR-URL: https://github.com/nodejs/node/pull/11859
Refs: c2a302c50b "src: do not ignore IDNA conversion error"
Refs: https://url.spec.whatwg.org/#concept-host-parser
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-16 16:39:39 -07:00
jBarz 4cdb0e89d8 tls: keep track of stream that is closed
TLSWrap object keeps a pointer reference to the underlying
TCPWrap object. This TCPWrap object could be closed and deleted
by the event-loop which leaves us with a dangling pointer.
So the TLSWrap object needs to track the "close" event on the
TCPWrap object.

PR-URL: https://github.com/nodejs/node/pull/11776
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-16 16:24:07 -07:00
Sam Roberts 303962aca1 doc: linkable commit message guidelines
Put the commit guidelines themselves under a heading to be more
prominent, and to allow linking directly to them (instead of the section
on how to use git).

Link the pull request template to the guidelines, so contributors can
find them.

PR-URL: https://github.com/nodejs/node/pull/11792
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-16 15:42:57 -07:00
Rich Trott 5e3d536ea3 test: fix flaky test-domain-abort-on-uncaught
test-domain-abort-on-uncaught is flaky under load. Move it to sequential
so it is not competing with other tests for resources.

PR-URL: https://github.com/nodejs/node/pull/11817
Fixes: https://github.com/nodejs/node/issues/11814
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-16 15:35:17 -07:00
detailyang 746339ef6d doc: gcc version is at least 4.8.5 in BUILDING.md
>= 4.8.5 is required because of compiler bugs in earlier versions

PR-URL: https://github.com/nodejs/node/pull/11840
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-16 15:21:32 -07:00
Joyee Cheung 7b830f4e4a test: add more and refactor test cases to net.connect
PR-URL: https://github.com/nodejs/node/pull/11847
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-16 15:09:58 -07:00
cjihrig db39273a8a doc: increase Buffer.concat() documentation
This commit adds documentation for two edge cases in
Buffer.concat(). Those cases are:

- totalLength is specified, but is not an integer.
- The combined buffer length is greater than totalLength.

PR-URL: https://github.com/nodejs/node/pull/11845
Fixes: https://github.com/nodejs/node/issues/11605
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-03-16 15:07:10 -07:00
Shahar Or 5bfd13b81e
util: display Symbol keys in inspect by default
I use symbol key properties. And I find it awful that they do
not show up in inspection. I can alter
`util.inspect.defaultOptions.showHidden` each time I debug. Does
that sound like fun to you? Isn't fun a core principle life?

The way I see it, it is not about the spec or about what is
enumerable/hidden, etc. When inspecting, it is about ease of
access to the information. That's how I see it. Does anyone have
any other thoughts?

Fixes: https://github.com/nodejs/node/issues/9709
PR-URL: https://github.com/nodejs/node/pull/9726
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-16 13:05:58 +01:00
Joyee Cheung 474e9d64b5 test: add more test cases of server.listen option
* Test listening with different handle and fd
* Test listening without callback

PR-URL: https://github.com/nodejs/node/pull/11778/
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-03-16 13:17:32 +08:00
Christian d'Heureuse e296ffb360 doc: fix mistakes in stream doc (object mode)
This patch fixes some trivial documentation mistakes for streams
operating in object mode.

For `unshift()`, `_write()`, `push()` and `_transform()`, the data type
of the `chunk` parameter is extended with `any` and the description
is corrected to take into account that streams can operate in object mode.

PR-URL: https://github.com/nodejs/node/pull/11807
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-03-15 16:08:06 -07:00
DavidCai b5eccc4c7e lib, test: add duplicate symbol checking in E()
Add duplicate symbol checking in E() to avoid potential confusing
result. Increase coverage of internal/errors.

PR-URL: https://github.com/nodejs/node/pull/11829
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-15 17:09:33 +01:00
mr-spd 5bd1642dd1 lib: remove unused msg parameter in debug_agent
Removed the msg parameter in the Client function
of _debug_agent.js, because it is unused.

PR-URL: https://github.com/nodejs/node/pull/11833
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
2017-03-15 17:03:02 +01:00
Rich Trott db277f00fe readline: remove unneeded eslint-disable comment
Remove a comment disabling an ESLint rule that is not triggered by the
code anyway.

PR-URL: https://github.com/nodejs/node/pull/11836
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-15 16:59:07 +01:00
AnnaMag 1a210c4ee4 test: added test for indexed properties
Currently, indexed properties are correctly copied
onto the sandbox by CopyProperties().
This will break when CopyProperties() is removed
after adjusting NamedPropertyHandlerConfiguration
config() to use property callbacks from the new
V8 API. To fix it, we will set a config for indexed
properties.

This test is a preparation step for the patch
that removes CopyProperties().

PR-URL: https://github.com/nodejs/node/pull/11769
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-14 22:09:01 -07:00
Brian White 71097744b2 fs: more realpath*() optimizations
Including:

* Skip URL instance check for common (string) cases

* Avoid regexp on non-Windows platforms when parsing the root of a path

* Skip call to `getOptions()` in common case where no `options` is passed

* Avoid `hasOwnProperty()`

PR-URL: https://github.com/nodejs/node/pull/11665
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-14 21:54:48 -07:00
Brian White 6a5ab5d550 fs: include more fs.stat*() optimizations
Including:

* Move async *stat() functions to FillStatsArray() now used by the
sync *stat() functions

* Avoid creating fs.Stats instances for implicit async/sync *stat()
calls used in various fs functions

* Store reference to Float64Array data on C++ side for easier/faster
access, instead of passing from JS to C++ on every async/sync *stat()
call

PR-URL: https://github.com/nodejs/node/pull/11665
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-14 21:54:40 -07:00
Alexey Orlenko 3d7245c098 test: refactor test-util-inspect.js
* Enclose tests that used to introduce module-level variables into
  their own scopes.
* Replace ES5 anonymous functions with arrow functions where it makes
  sense.
* And make one arrow function a regular function thus fixing a bug in a
  getter inside an object created in "Array with dynamic properties"
  test.  This getter has never been invoked though, so the test hasn't been
  failing.
* Convert snake_case identifiers to camelCase.
* Make some variable names more readable.
* Replace regular expressions in maxArrayLength tests with simple
  assert.strictEquals() and assert(...endsWith()) checks, as suggested
  in <https://github.com/nodejs/node/pull/11576#discussion_r103738263>.

PR-URL: https://github.com/nodejs/node/pull/11779
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-14 21:10:32 -07:00
Alexey Orlenko 7acc482432 test: add arrow functions to test-util-inspect
Even though arrow functions and ES5 anonymous functions are technically
the same for util.js, it won't hurt to test both.  The same goes for
async functions.

PR-URL: https://github.com/nodejs/node/pull/11781
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-03-14 17:52:13 -07:00
Amelia Clarke 1faf136bfd doc: argument types for dns methods
Refs: https://github.com/nodejs/node/issues/9399
PR-URL: https://github.com/nodejs/node/pull/11764
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-14 17:29:52 -07:00
Alexey Orlenko 205f4e5006 test: fix repl-function-redefinition-edge-case
`test/known_issues/test-repl-function-redefinition-edge-case.js` had
been introduced as a part of https://github.com/nodejs/node/pull/7624
but the meat of the test became fixed in
007386ee81. Despite that, the test
continued to fail since it was broken itself: there was a missing colon
in the expected output.

This commit adds the missing colon and moves the test from
`test/known_issues` to `test/parallel`.

PR-URL: https://github.com/nodejs/node/pull/11772
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-14 17:27:22 -07:00
Gaara 27f4c9407f doc: fix a typo in api/process.md
Fix a mistyped module name in example REPL sessions found in the
description of the 'warning' event: it should be `events` instead of
`event`.

PR-URL: https://github.com/nodejs/node/pull/11780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-14 17:21:57 -07:00