Carl Lei
804cc7670d
test: numeric flags to fs.open
...
This has been supperted for long but never tested nor documented.
PR-URL: https://github.com/nodejs/node/pull/3641
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-22 13:35:02 +01:00
Carl Lei
3f4409e571
doc: clarify that fs streams expect blocking fd
...
This clarifies that fs.createReadStream and fs.createWriteStream, when
passed a fd, expects the fd to be blocking, and suggests net.Socket as
an alternative.
PR-URL: https://github.com/nodejs/node/pull/3641
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-22 13:34:30 +01:00
Fedor Indutny
91ccbf0201
configure: v8_use_snapshot should be true
...
`v8_use_snapshot` should be either `true` or `false`, not 1 or 0.
PR-URL: https://github.com/nodejs/node/pull/3962
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2015-11-21 21:15:11 -05:00
Ben Noordhuis
c83d9b7065
crypto: update root certificates
...
Update the list of root certificates in src/node_root_certs.h with
tools/mk-ca-bundle.pl.
PR-URL: https://github.com/nodejs/node/pull/3951
Reviewed-By: Fedor Indutny <fedor@indutny.com >
2015-11-21 21:33:30 +01:00
Ben Noordhuis
8c4deff55d
tools: update certdata.txt
...
This is the latest certdata.txt from [0], last updated on 2015-11-13.
[0] https://hg.mozilla.org/mozilla-central/raw-file/64df3815df9c/security/nss/lib/ckfw/builtins/certdata.txt
PR-URL: https://github.com/nodejs/node/pull/3951
Reviewed-By: Fedor Indutny <fedor@indutny.com >
2015-11-21 21:33:01 +01:00
yorkie
8b97249893
fs: fix the error report on fs.link(Sync)
...
As the Node.js documentation specified:
> fs.link(srcpath, dstpath, callback)
But when we run:
```js
> fs.link()
```
We will get the below:
```js
TypeError: dest path must be a string
at TypeError (native)
at Object.fs.link (fs.js:915:11)
at repl:1:4
```
Just correct the message of relevant 2 errors in this PR :-)
PR-URL: https://github.com/nodejs/node/pull/3917
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-20 16:09:09 -08:00
Jan Schär
9472a0cfad
net: small code cleanup
...
`options` is already a param of the function.
PR-URL: https://github.com/nodejs/node/pull/3943
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-11-20 15:53:11 -08:00
Tristian Flanagan
dfee4e3712
module: fix column offsets in errors
...
Because Node modules are wrapped, errors on the first line
of a file leak the wrapper to the user and report the wrong
column number. This commit adds a line break to the module
wrapper so that the first line is treated the same as all
other lines. To compensate for the additional line, a line
offset of -1 is also applied to errors.
Fixes: https://github.com/nodejs/node/issues/2860
PR-URL: https://github.com/nodejs/node/pull/2867
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-11-20 16:26:24 -05:00
Alexander Gromnitsky
94c3507f5c
doc: fix broken references
...
PR-URL: https://github.com/nodejs/node/pull/3944
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Myles Borins <mborins@us.ibm.com >
2015-11-20 11:52:23 -08:00
Matt Loring
22478d3669
buffer: move checkFloat from lib into src
...
The type and range checks performed by this function can be done more
efficiently in native code.
PR-URL: https://github.com/nodejs/node/pull/3763
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-20 12:23:05 -07:00
Martin Forsberg
55b1eccae6
doc: move fs.existsSync() deprecation message
...
This commit moves the deprecation message for fs.existsSync()
above the function description, making message placement
uniform across the documentation.
PR-URL: https://github.com/nodejs/node/pull/3942
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-11-20 14:11:02 -05:00
Bryan English
174d4e484e
test: http complete list of non-concat headers
...
The original test was only testing some of the headers that shouldn't be
concatenated as per lib/_http_incoming.js, so now the full list is
there.
'content-length` gives a parse error if you set it to a string, so the
test for that header uses numbers.
PR-URL: https://github.com/nodejs/node/pull/3930
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-11-20 12:42:03 -05:00
Stefan Budeanu
56a2b9a246
crypto: disable crypto.createCipher in FIPS mode
...
FIPS 140-2 disallows use of MD5, which is used to derive the
initialization vector and key for createCipher(). Modify
all tests to expect exceptions in FIPS mode when disallowed
API is used, or to avoid testing such API in FIPS Mode.
PR-URL: https://github.com/nodejs/node/pull/3754
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-20 09:35:58 -08:00
Michael Cornacchia
6de82c69a0
test: fix race condition in unrefd interval test
...
Rely more on timers implementation rather than arbitrary timeouts.
Refs: https://github.com/nodejs/node/issues/1781
PR-URL: https://github.com/nodejs/node/pull/3550
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-11-20 12:29:30 -05:00
Minwoo Jung
d01eb6882f
lib: add 'pid' prefix in internal/util
...
This PR improves `prefix` in `util` that we've agreed on
https://github.com/nodejs/node/pull/3833
(separate code for javascript to move the printing function
to C++ directly)
PR-URL: https://github.com/nodejs/node/pull/3878
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-20 09:24:53 -08:00
cjihrig
ca2e8b292f
readline: deprecate undocumented exports
...
This commit moves several of readline's undocumented functions
into an internal module. Specifically, isFullWidthCodePoint,
stripVTControlCharacters, getStringWidth, and emitKeys are
moved to the internal module. The existing public exports
of the first three functions are given a deprecation notice.
Refs: https://github.com/nodejs/node/pull/3847
Fixes: https://github.com/nodejs/node/issues/3836
PR-URL: https://github.com/nodejs/node/pull/3862
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2015-11-19 17:01:25 -05:00
Stefan Budeanu
e499ea849c
test: skip/replace weak crypto tests in FIPS mode
...
FIPS 140-2 does not permit the use of MD5 and RC4, skip or tests
that use them, or substitute with stronger crypto where applicable.
PR-URL: https://github.com/nodejs/node/pull/3757
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: James Snell <jasnell@gmail.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2015-11-19 16:31:11 -05:00
cjihrig
5900d14966
doc: clarify module loading behavior
...
The module loading system will not append node_modules to a
path already ending in node_modules. This used to be documented,
but it was lost.
Fixes: https://github.com/nodejs/node/issues/3873
PR-URL: https://github.com/nodejs/node/pull/3920
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2015-11-19 13:12:00 -05:00
cjihrig
5f3ed61094
doc: add reference for buffer.inspect()
...
This commit refers readers to util.inspect() for an explanation
of buffer.inspect().
Fixes: https://github.com/nodejs/node/issues/3918
PR-URL: https://github.com/nodejs/node/pull/3921
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2015-11-19 13:02:32 -05:00
Wyatt Preul
007cfea308
util: remove pump
...
Remove util.pump and associated tests
PR-URL: https://github.com/nodejs/node/pull/2531
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-18 14:28:35 -08:00
Wyatt Preul
a2c0aa84e0
tty: Remove deprecated setRawMode wrapper
...
PR-URL: https://github.com/nodejs/node/pull/2528
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-18 13:16:02 -08:00
Wyatt Preul
4cf19ad1bb
util: Remove exec, has been deprecated for years
...
PR-URL: https://github.com/nodejs/node/pull/2530
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-18 13:04:16 -08:00
Stefan Budeanu
e4e5b13efd
test: avoid test timeouts on rpi
...
Generating 1024-bit primes on rpi test machines sometimes
causes timeouts. Avoid this situation by using 256-bit
primes when not running in FIPS mode.
Fixes: https://github.com/nodejs/node/issues/3881
PR-URL: https://github.com/nodejs/node/pull/3902
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Ben Noordhuis <ben@strongloop.com >
2015-11-18 09:52:07 -08:00
Rich Trott
ac319c3547
test: fix flaky test-child-process-spawnsync-input
...
Move portion of `test-child-process-spawnsync-input.js` (that has been
flaky on CentOS in CI) to its own file. This allows us to more easily
eliminate the cause of the flakiness without affecting other unrelated
portions of the test.
Fixes: https://github.com/nodejs/node/issues/3863
PR-URL: https://github.com/nodejs/node/pull/3889
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-18 07:58:17 -08:00
yorkie
72e3dd9f43
process: throw on non-function to nextTick()
...
This commit causes process.nextTick() to throw when its callback
argument is not a function.
PR-URL: https://github.com/nodejs/node/pull/3860
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2015-11-18 10:52:01 -05:00
Evan Lucas
339d3840c8
test: add OS X to module loading error test
...
Previously, this test was not supported on OS X. This change makes sure
that it is no longer skipped.
PR-URL: https://github.com/nodejs/node/pull/3901
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-11-18 09:43:57 -06:00
fansworld-claudio
9a628e2dac
test: module loading error fix solaris #3798
...
- refactor test to accept multiple error messages per platform
- add new message to be found in Solaris 11.3 as per #3798
PR-URL: https://github.com/nodejs/node/pull/3855
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2015-11-18 08:01:13 -06:00
Jeremiah Senkpiel
29cd1195ec
2015-11-17, Version 5.1.0 (Stable)
...
PR-URL: https://github.com/nodejs/node/pull/3736
2015-11-17 16:52:26 -05:00
Jackson Tian
b33e9da8f9
debugger: introduce exec method for debugger
...
In debugger, the usage of `repl` very ugly. I'd like there is a `p`
like gdb. So the `exec` is coming.
Usage:
```
$ ./iojs debug ~/git/node_research/server.js
< Debugger listening on port 5858
connecting to 127.0.0.1:5858 ... ok
break in /Users/jacksontian/git/node_research/server.js:1
> 1 var http = require('http');
2
3 http.createServer(function (req, res) {
debug> exec process.title
/Users/jacksontian/git/io.js/out/Release/iojs
debug>
```
And the `repl`:
```
debug> repl
Press Ctrl + C to leave debug repl
> process.title
'/Users/jacksontian/git/io.js/out/Release/iojs'
debug>
(^C again to quit)
```
The enter and leave debug repl is superfluous.
R-URL: https://github.com/nodejs/node/pull/1491
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-11-17 12:11:40 -08:00
Rod Vagg
8ceb36cb53
doc: document release types in readme
...
PR-URL: https://github.com/nodejs/node/pull/3482
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2015-11-17 22:09:25 +11:00
Rod Vagg
7ed09a36ec
doc: replace head of readme with updated text
...
PR-URL: https://github.com/nodejs/node/pull/3482
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2015-11-17 22:08:53 +11:00
Evan Lucas
4fed62c876
module: cache regular expressions
...
None of these regular expressions will change, so there is no need to
generate them every time in hot code paths.
Provides a small performance improvement in module loading. (5-10%)
PR-URL: https://github.com/nodejs/node/pull/3869
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-16 23:02:36 -08:00
Tristian Flanagan
e3949b2ca1
doc: sort repl alphabetically
...
Reorders, with no contextual changes, the repl documentation with class
definitions at the top and alphabetically.
PR-URL: https://github.com/nodejs/node/pull/3859
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-16 22:45:53 -08:00
Rich Trott
b3857723d3
test: move test-specific function out of common
...
common.checkSpawnSyncRet is only used in one test. Move it out of
common.js and into that test (test-child-process-spawnsync-input.js).
PR-URL: https://github.com/nodejs/node/pull/3871
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-16 22:37:32 -08:00
P.S.V.R
0ed3a7c11b
buffer: let WriteFloatGeneric silently drop values
...
Documentation currently states that setting noAssert and passing a value
larger than can fit in the Buffer will cause data to be silently
dropped. Change implementation to match documented behavior.
Fixes: https://github.com/nodejs/node/issues/3766
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-11-16 21:27:21 -07:00
Stefan Budeanu
df268f97bc
tls: use SHA1 for sessionIdContext
...
FIPS 140-2 disallows use of MD5, which is used to derive the
default sessionIdContext for tls.createServer().
PR-URL: https://github.com/nodejs/node/pull/3866
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-16 17:26:23 -05:00
Stefan Budeanu
424ae5d4ac
tls: Use SHA1 for sessionIdContext in FIPS mode
...
FIPS 140-2 disallows use of MD5, which is used to derive the
default sessionIdContext for tls.createServer().
PR-URL: https://github.com/nodejs/node/pull/3755
Reviewed-By: Fedor Indutny <fedor@indutny.com >
2015-11-16 16:47:00 -05:00
Rich Trott
5b80ca9339
test: fix flaky SmartOS test
...
SmartOS has an issue where it will trigger ECONNREFUSED when it should
not. See https://smartos.org/bugview/OS-2767 .
This change adds logic to test-net-server-max-connections.js to work
around the issue.
Fixes: https://github.com/nodejs/node/issues/2663
PR-URL: https://github.com/nodejs/node/pull/3830
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-16 13:25:26 -08:00
James M Snell
3f6b9214bd
doc: address use of profanity in code of conduct
...
PR-URL: https://github.com/nodejs/node/pull/3827
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Julien Gilli <jgilli@fastmail.fm >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Alexis Campailla <alexis@janeasystems.com >
2015-11-16 12:48:43 -08:00
Felix Böhm
a95eb5c671
debugger: also exit when the repl emits 'exit'
...
Exit the debug repl when repl emits 'exit'
Refs: https://github.com/nodejs/node-v0.x-archive/issues/5637
Fixes: https://github.com/nodejs/node-v0.x-archive/issues/5631
PR-URL: https://github.com/nodejs/node/pull/2369
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-16 10:05:24 -08:00
Bryan English
cd1123a0fb
doc: consistent reference-style links
...
Moved all the URLs in API docs to the bottom of the files as
reference-style links.
PR-URL: https://github.com/nodejs/node/pull/3845
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-16 07:36:59 -08:00
Rich Trott
a2144fce35
test: skip test if FreeBSD jail will break it
...
`test/internet/test-dgram-broadcast-multi-process.js` fails if it is in
a FreeBSD jail. This issue is with the way FreeBSD jails work and not
with Node. Skip the test if in a FreeBSD jail.
PR-URL: https://github.com/nodejs/node/pull/3839
Fixes: https://github.com/nodejs/node/issues/2472
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Ben Noordhuis <ben@strongloop.com >
2015-11-16 07:03:09 -08:00
Markus Tzoe
e2eb33483d
build: fix configuring with prebuilt libraries
...
Fix configure_library() to produce correct LDFLAGS when configuring with
prebuilt 3rd-party libraries (libuv, openssl, etc) using `pkg-config' or
`--shared-{LIBRARY}-includes=xxx --shared-{LIBRARY}-libpath=xxx'.
PR-URL: https://github.com/nodejs/node/pull/3135
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2015-11-16 12:17:45 +01:00
Minwoo Jung
9d0396cd63
util: use Object.create(null) for dictionary object
...
Fixes https://github.com/nodejs/node/issues/3788
`arrayToHash()` needs to use `Object.create(null)` for its dictionary object.
Refs: https://github.com/nodejs/node/pull/3791
PR-URL: https://github.com/nodejs/node/pull/3831
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-11-15 18:48:42 -08:00
Michael Cornacchia
c0bac95147
test: fix path to module for repl test on Windows
...
Use path join to construct the path instead of concatenating strings.
Replace backslash with double backslash so that they are escaped
correctly in the string passed to REPL.
PR-URL: https://github.com/nodejs/node/pull/3608
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-15 16:33:11 -08:00
Steven R. Loomis
84f09647d0
build: fix --with-intl=system-icu for x-compile
...
* add toolset stuff to icu-system.gyp
* update docs
Fixes: https://github.com/nodejs/node/issues/3801
PR-URL: https://github.com/nodejs/node/pull/3808
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-14 16:38:40 -08:00
Stefan Budeanu
11ad744a92
test: increase crypto strength for FIPS standard
...
Use stronger crypto (larger keys, etc.) for arbitrary tests so
they will pass in both FIPS and non-FIPS mode without altering
the original intent of the test cases.
PR-URL: https://github.com/nodejs/node/pull/3758
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-14 09:13:56 -08:00
Myles Borins
a49b3af00b
test: add test-zlib-flush-drain
...
This test assures that if flush is called while the zlib object needs
to be drained that it will defer the callback until after the drain.
PR-URL: https://github.com/nodejs/node/pull/3534
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-14 08:11:44 -08:00
Craig Cavalier
1736ad8264
zlib: only apply drain listener if given callback
...
When stream.flush() is called without a callback, an empty listener is
being added. Since flush may be called multiple times to push SSE's
down to the client, multiple noop listeners are being added. This in
turn causes the memory leak detected message.
PR-URL: https://github.com/nodejs/node/pull/3534
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-14 08:11:28 -08:00
Myles Borins
fa27c5634b
zlib: pass kind to recursive calls to flush
...
Bug spotted by @bnoordhuis while doing code review on #3534
Refs: https://github.com/nodejs/node/pull/3534#discussion_r43047477
PR-URL: https://github.com/nodejs/node/pull/3534
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-11-14 08:10:02 -08:00