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

16778 Коммитов

Автор SHA1 Сообщение Дата
Amelia Clarke 73e2d0bce6 doc: argument types for crypto methods
Refs: https://github.com/nodejs/node/issues/9399
PR-URL: https://github.com/nodejs/node/pull/11799
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-03-14 17:17:13 -07:00
Amelia Clarke 38ba0c25d4 doc: missing argument types for events methods
Refs: https://github.com/nodejs/node/issues/9399
PR-URL: https://github.com/nodejs/node/pull/11802
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 17:15:35 -07:00
Alexander 8b03221b28 doc: correct comment error in stream.md
Fix comment about remove listener (not setting)

PR-URL: https://github.com/nodejs/node/pull/11804
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-14 17:13:30 -07:00
Vse Mozhet Byt 4d52d12fd1 doc: console.log() -> console.error() in events.md
PR-URL: https://github.com/nodejs/node/pull/11810
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-14 17:09:19 -07:00
Vse Mozhet Byt e494e427c9 doc: var -> let / const in events.md
PR-URL: https://github.com/nodejs/node/pull/11810
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-14 17:09:13 -07:00
Matej Krajčovič 2281944612 test: add regex to assert.throws
Make sure test matches this specific error message.

PR-URL: https://github.com/nodejs/node/pull/11815
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-14 17:06:53 -07:00
Italo A. Casas bc26c62524
2017-03-14, Version 7.7.3 (Current)
Notable changes:

* module: The [module loading global fallback]
(https://nodejs.org/dist/latest-v6.x/docs/api/modules.html#modules_loading_from_the_global_folders)
to the Node executable's directory now works correctly on Windows.
(Richard Lau) [#9283](https://github.com/nodejs/node/pull/9283)

* net: `Socket.prototype.connect` now once again functions without
a callback. (Juwan Yoo) [#11762](https://github.com/nodejs/node/pull/11762)

* url: `URL.prototype.origin` now properly specified an opaque return of
`'null'` for `file://` URLs. (Brian White)
[#11691](https://github.com/nodejs/node/pull/11691)

PR-URL: https://github.com/nodejs/node/pull/11831
2017-03-14 18:39:08 -04:00
Joyee Cheung c9bc3e50ed test: fail when child dies in fork-net
Previously when the child dies with errors in this test, the parent
will just hang and timeout, the errors in the child would be
swallowed. This makes it fail so at least there is more information
about why this test fails.

Also removes the unnecessary child.kill() call.

PR-URL: https://github.com/nodejs/node/pull/11684
Ref: https://github.com/nodejs/node/pull/11667
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-14 15:10:43 -07:00
Blake Embrey 39d9afe279 repl: refactor `LineParser` implementation
Move the core logic from `LineParser` should fail handling into the
recoverable error check for the REPL default eval.

PR-URL: https://github.com/nodejs/node/pull/6171
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-03-14 15:04:50 -07:00
Timothy Gu d77a7588cf url: spec-compliant URLSearchParams serializer
PR-URL: https://github.com/nodejs/node/pull/11626
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-03-14 13:14:20 -07:00
Daijiro Wachi 92bcc13be0 test: test resolveObject with an empty path
Add a case to test an URL object that has no path at all
for `url.resolveObject`.

PR-URL: https://github.com/nodejs/node/pull/11811
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-03-14 20:43:39 +01:00
Daijiro Wachi 879d6663ea net: remove an unused internal module `assertPort`
A module `assertPort` in `lib/internal/net.js` is not used anymore.

Refs: https://github.com/nodejs/node/pull/11667
PR-URL: https://github.com/nodejs/node/pull/11812
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-03-14 18:51:36 +01:00
Alexey Orlenko d3418b1319 doc: fix stylistic issues in api/net.md
* Change var to const in an example of server creation.
* Add missing semicolons.
* Use `console` syntax highlighting in `telnet` and `nc` invocation
  examples and add shell prompt symbols to be consistent with the rest
  of the documentation.

PR-URL: https://github.com/nodejs/node/pull/11786
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-15 01:10:12 +08:00
Evan Lucas 6ff495bfde
doc: add missing changelog heading for 7.7.2
When the release was cut, the changelog heading in CHANGELOG_V7
was accidentally omitted.

PR-URL: https://github.com/nodejs/node/pull/11823
Fixes: https://github.com/nodejs/node/issues/11822
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-03-14 09:58:46 -04:00
Santiago Gimeno 3be1db8702
test: fix flaky test-http-set-timeout-server
It can happen that the connection and server is closed before the second
reponse has been processed by server. In this case, the
`res.setTimeout()` callback will never be called causing the test to
fail. Fix this by only closing the connection and server when the 2nd
has been received.

PR-URL: https://github.com/nodejs/node/pull/11790
Fixes: https://github.com/nodejs/node/issues/11768
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-03-14 09:56:23 +01:00
Franziska Hinkelmann 1d1dbcafa8 doc: update to current V8 versions
Update the documentation to the correct V8 versions
in the guide *Maintaining V8 in Node.js*.

PR-URL: https://github.com/nodejs/node/pull/11787
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-14 09:08:31 +01:00
Daniel Bevenius 471aa19ffa build: add node_use_openssl check to install.py
When configuring --without-ssl and then running make install
openssl headers will be copied from deps/openssl to the target
installation directory.

This commit adds a check for is node_use_openssl is set in which
case the headers are not copied.

PR-URL: https://github.com/nodejs/node/pull/11766
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-13 19:51:26 +01:00
Rich Trott ea5a2f4e2b doc: improve child_process `maxBuffer` text
`maxBuffer` information in child_process.md used atypical formatting.
This uses a single consistent style for all instances of `maxBuffer`
information.

PR-URL: https://github.com/nodejs/node/pull/11791
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-13 11:44:04 -07:00
Rich Trott 78cdd4baa4 test: include all stdio strings for fork()
test-child-process-fork-stdio-string-variant was only testing 'pipe' for
its `stdio` value. Add `inherit` and `ignore`.

Also added a `common.mustCall()` to verify that the `message` event is
triggered.

PR-URL: https://github.com/nodejs/node/pull/11783
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-03-13 11:42:30 -07:00
Eugene Ostroukhov b170fb7c55 inspector: proper WS URLs when bound to 0.0.0.0
JSON target list response will now return appropriate IP address
for instances listening on 0.0.0.0.

Refs: https://github.com/nodejs/node/issues/11591
PR-URL: https://github.com/nodejs/node/pull/11755
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-13 10:41:51 -07:00
Bradley Farias 608ea94272 doc: package main can be directory with an index
This behavior dates back to 2011 but was not documented.

PR-URL: https://github.com/nodejs/node/pull/11581
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: James Snell <jasnell@gmail.com>
2017-03-13 10:28:07 -05:00
Juwan Yoo c6cbbf9263 net: allow missing callback for Socket.connect
Arguments of Socket.prototype.connect should be also normalized,
causing error when called without callback.

Changed Socket.prototype.connect's code same as net.connect and added
test.

Fixes: https://github.com/nodejs/node/issues/11761
PR-URL: https://github.com/nodejs/node/pull/11762
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2017-03-13 20:12:44 +08:00
Joyee Cheung efec14a7d1
assert: enforce type check in deepStrictEqual
Add checks for the built-in type tags to catch objects
with faked prototypes.

See https://tc39.github.io/ecma262/#sec-object.prototype.tostring
for a partial list of built-in tags.

Fixes: https://github.com/nodejs/node/issues/10258
PR-URL: https://github.com/nodejs/node/pull/10282
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-12 17:07:13 +01:00
Richard Lau 055482c21e
module: fix loading from global folders on Windows
Code was calculating $PREFIX/lib/node relative to process.execPath, but
on Windows process.execPath is $PREFIX\node.exe whereas everywhere else
process.execPath is $PREFIX/bin/node (where $PREFIX is the root of the
installed Node.js).

PR-URL: https://github.com/nodejs/node/pull/9283
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-11 22:08:19 +00:00
Richard Lau 92e7c93fce
test: add test for loading from global folders
Test executes with a copy of the node executable since $PREFIX/lib/node
is relative to the executable location.

PR-URL: https://github.com/nodejs/node/pull/9283
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-11 22:08:18 +00:00
Lukas Möller 443691a5ae
crypto: fix default encoding of LazyTransform
PullRequest #5522 and #5500 described the change
of the default encoding into UTF8 in crypto functions.

This however was only changed for the non-streaming API.
The streaming API still used binary as the default encoding.

This commit will change the default streaming API encoding to UTF8
to make both APIs behave the same.

It will also add tests to validate the behavior.

Refs: https://github.com/nodejs/node/pull/5522
Refs: https://github.com/nodejs/node/pull/5500
PR-URL: https://github.com/nodejs/node/pull/8611
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-03-11 22:43:35 +01:00
Brian White c67207731f
lib: simplify Module._resolveLookupPaths
This commit consists of two changes:

* Avoids returning request/id *just* for the debug() output
* Returns `null` instead of an empty array for the list of paths

PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:48:59 -05:00
Brian White e32425bfcd
module: avoid JSON.stringify() for cache key
By avoiding JSON.stringify() and simply joining the strings with a
delimiter that does not appear in paths, we can improve cached
require() performance by at least 50%.

Additionally, this commit removes the last source of permanent
function deoptimization (const) for _findPath().

PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:48:53 -05:00
Brian White 28dc848e70
lib: improve method of function calling
Using a more "direct" method of function calling yields better
performance.

PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:48:46 -05:00
Brian White 403b89e72b
module: avoid hasOwnProperty()
hasOwnProperty() is known to be slow, do a direct lookup on a "clean"
object instead.

PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:48:41 -05:00
Brian White 298a40e04e
module: use "clean" objects
PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:48:38 -05:00
Brian White a851b868c0
lib: remove sources of permanent deopts
PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:48:35 -05:00
Brian White 1c3df96570
fs: replace regexp with function
Replacing the path separator-finding regexp with a custom function
results in a measurable improvement in performance.

PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:48:31 -05:00
Brian White 34c9fc2e4e
fs: avoid multiple conversions to string
nullCheck() implicitly converts the argument to string when checking
the value, so this commit avoids any unnecessary additional (Buffer)
conversions to string.

PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:48:24 -05:00
Brian White 21b2440176
fs: avoid recompilation of closure
PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:48:20 -05:00
Brian White 190dc69c89
benchmark: add parameter for module benchmark
PR-URL: https://github.com/nodejs/node/pull/10789
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-03-10 23:46:36 -05:00
Timothy Gu 99b27ce99a url: prioritize toString when stringifying
The ES addition operator calls the ToPrimitive() abstract operation
without hint String, leading a subsequent OrdinaryToPrimitive() to call
valueOf() first on an object rather than the desired toString().

Instead, use template literals which directly call ToString() abstract
operation, per Web IDL spec.

PR-URL: https://github.com/nodejs/node/pull/11737
Fixes: b610a4db1c "url: enforce valid UTF-8 in WHATWG parser"
Refs: b610a4db1c (commitcomment-21200056)
Refs: https://tc39.github.io/ecma262/#sec-addition-operator-plus-runtime-semantics-evaluation
Refs: https://tc39.github.io/ecma262/#sec-template-literals-runtime-semantics-evaluation
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-10 20:02:24 -08:00
Joyee Cheung df97727272 doc: improve net.md on sockets and connections
* Improve description of socket.connect, net.connect,
  net.createConnection
* Nest the overloaded signatures
* Alias net.connect to net.createConnection
* Add type annotations to the options
* Make a separate section to explain IPC support and
  how to specify the path parameter.
* General improvements to wording and explanation

PR-URL: https://github.com/nodejs/node/pull/11700
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-03-11 10:53:50 +08:00
Timothy Gu 455e6f1dd8 util: throw toJSON errors when formatting %j
Previously all errors resulting from JSON.stringify were treated as a
proof for circularity of the object structure. That is not the case if
the `toJSON` method of the object throws an error. Explicitly check for
the exact error message when determining the object structure's
cyclicity.

PR-URL: https://github.com/nodejs/node/pull/11708
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-10 18:22:57 -08:00
James M Snell 98e54b0bd4 meta: restore original copyright header
A prior io.js era commit inappropriately removed the
original copyright statements from the source. This
restores those in any files still remaining from that
edit.

Ref: https://github.com/nodejs/TSC/issues/174
Ref: https://github.com/nodejs/node/pull/10599
PR-URL: https://github.com/nodejs/node/pull/10155

Note: This PR was required, reviewed-by and approved
by the Node.js Foundation Legal Committee and the TSC.
There is no `Approved-By:` meta data.
2017-03-10 11:23:48 -08:00
Benjamin Fleischer 1125c8a814
src: fix typos in node_lttng_provider.h
Is a semver-breaking change

Refs: https://github.com/nodejs/node/pull/11189#discussion_r99509433
PR-URL: https://github.com/nodejs/node/pull/11723
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-10 19:26:18 +01:00
Junliang Yan b806e18dd7 s390: enable march=z196
PR-URL: https://github.com/nodejs/node/pull/11730
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-10 08:38:08 -05:00
Shigeki Ohtsu dacaaa5fc0 test: add script to create 0-dns-cert.pem
0-dns-cert.pem  and 0-dns-key.pem were stored in `test/fixtures/key`
directory, but the cert file cannot be created with the openssl
command via Makefile.

Added a script to create it with using  `asn1.js` and
`asn1.js-rfc5280` and moved them out of key directory and put into
`test/fixtures/0-dns`.

The domains listed in the cert were also changed into example.com and
example.org to show the use for only testing.

Fixes: https://github.com/nodejs/node/issues/10228
PR-URL: https://github.com/nodejs/node/pull/11579
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-03-10 17:17:28 +09:00
Daniel Bevenius b98004b79c test: add hasCrypto check to tls-legacy-deprecated
Currently test-tls-legacy-deprecated will fail if node
was built using --without-ssl. This commit adds a check to
verify is crypto support exists and if not skip this test.

PR-URL: https://github.com/nodejs/node/pull/11747
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-10 07:34:15 +01:00
Timothy Gu e2f151f5b2 src: make process.env work with symbols in/delete
The getter for process.env already allows symbols to be used, and `in`
operator as a read-only operator can do the same.

`delete a[b]` operator in ES always returns `true` without doing
anything when `b in a === false`. Allow symbols in the deleter
accordingly.

PR-URL: https://github.com/nodejs/node/pull/11709
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-09 16:36:12 -08:00
Clarence Dimitri CHARLES 7a4adb5b60
test: add regex in test_cyclic_link_protection
PR-URL: https://github.com/nodejs/node/pull/11622
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-03-10 01:28:56 +01:00
Alexey Orlenko ec2f098156
util: change sparse arrays inspection format
Missing elements in sparse arrays used to be serialized to empty
placeholders delimited with commas by util.inspect() and in some cases
the result was a syntactically correct representation of a JavaScript
array with shorter length than the original one. This commit implements
@TimothyGu's suggestion to change the way util.inspect() formats sparse
arrays to something similar to how Firefox shows them.

Fixes: https://github.com/nodejs/node/issues/11570
PR-URL: https://github.com/nodejs/node/pull/11576
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-10 01:10:59 +01:00
Bartosz Sosnowski 6df23fa39f benchmark: fix punycode and get-ciphers benchmark
Add missing 'i=0' from for-loops from punycode and get-ciphers
benchmarks.

PR-URL: https://github.com/nodejs/node/pull/11720
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-03-09 22:01:45 +01:00
Steven R. Loomis 5efb15e30a
src: add missing #include <unicode/ustring.h>
* We use these functions that are declared in <unicode/ustring.h>

  u_strFromUTF8()
    u_strToUTF8()

* At present, <unicode/ustring.h> is indirectly included, but this will
likely change in future ICUs. Adding this header has been the right
thing to do for many years, so it is backwards compatible.

Fixes: https://github.com/nodejs/node/issues/11753
PR-URL: https://github.com/nodejs/node/issues/11754
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-03-09 10:06:04 -08:00
Brian White e4fbd8e244
test: add more WHATWG URL origin tests
PR-URL: https://github.com/nodejs/node/pull/11691
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-09 08:58:55 -05:00