- Oct 27, 2016
-
-
marzelin authored
PR-URL: https://github.com/nodejs/node/pull/9026 Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Alejandro Oviedo Garcia authored
This commit changes string manipulation in favor of template literals in the `util` module. PR-URL: https://github.com/nodejs/node/pull/9120 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Anna Henningsen authored
Instead of writing to the REPL’s input stream for the alignment spaces in `.editor` mode, let `readline` handle the spaces properly (echoing them using `_ttyWrite` and adding them to the current line buffer). Fixes: https://github.com/nodejs/node/issues/9189 PR-URL: https://github.com/nodejs/node/pull/9207 Reviewed-By:
Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
In `.editor` mode, `repl.write()` would have crashed when the `key` argument was not present, because the overwritten `_ttyWrite` of REPLs doesn’t check for the absence of a second argument like `readline.write()` does. Since the docs indicate that the argument is optional, add a check paralleling the one in `readline.write()`. PR-URL: https://github.com/nodejs/node/pull/9207 Reviewed-By:
Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
anu0012 authored
PR-URL: https://github.com/nodejs/node/pull/9144 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Brian White <mscdex@mscdex.net>
-
Josh Gavant authored
PR-URL: https://github.com/nodejs/node/pull/9193 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Deverick authored
Replaces function expressions with ES6 arrow functions as well as improve the comparison operator to check if operands are of same types. PR-URL: https://github.com/nodejs/node/pull/9239 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Rich Trott authored
The repeat option in test.py did not work as expected if `-j` was set to more than one. Repeated tests running at the same time could share temp directories and cause test failures. This was observed with: tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive By using copy.deepCopy(), the repeated tests are separate objects and not references to the same objects. Setting `thread_id` on one of them will now not change the `thread_id` on all of them. And `thread_id` is how the temp directory (and common.PORT as well) are determined. Refs: https://github.com/nodejs/node/pull/9228 PR-URL: https://github.com/nodejs/node/pull/9249 Reviewed-By:Sakthipriyan Vairamani <thechargingvolcano@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:
Santiago Gimeno <santiago.gimeno@gmail.com>
-
Ben Noordhuis authored
Replace calls to assert.equal() and assert.notEqual() with assert.strictEqual() and assert.strictNotEqual() respectively. PR-URL: https://github.com/nodejs/node/pull/9263 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Evan Lucas <evanlucas@me.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
BethGriggs authored
Removed the errorTimer from test-http-set-timeout.js, as this timer is not necessary to test the setTimeout functionality. Also edited the console.log message on line 8 to log the correct timeout duration. Changed var to const, and added common.mustCall() to on timeout and on error callbacks. Fixes: https://github.com/nodejs/node/issues/9256 PR-URL: https://github.com/nodejs/node/pull/9264 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Eugene Ostroukhov authored
This implementation switches to V8 inspector from the V8 repository. The new inspector integration is now using final APIs and exposes a stable wire protocol, removing the need for pointing the users to specific devtools version. PR-URL: https://github.com/nodejs/node/pull/9028 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
- Oct 26, 2016
-
-
cjihrig authored
Fixes: https://github.com/nodejs/node/issues/4351 Fixes: https://github.com/nodejs/node/issues/6763 Refs: https://github.com/nodejs/node/pull/8280 PR-URL: https://github.com/nodejs/node/pull/9267 Reviewed-By:
Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Jeena Lee authored
- Changed `assert.ok()` to `assert.strictEqual()`. - Changed `var` to `const` where possible. PR-URL: https://github.com/nodejs/node/pull/9231 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ilkka Myller <ilkka.myller@nodefield.com>
-
Brian White authored
PR-URL: https://github.com/nodejs/node/pull/9243 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
James M Snell authored
Add buffer.transcode(source, from, to) method. Primarily uses ICU to transcode a buffer's content from one of Node.js' supported encodings to another. Originally part of a proposal to add a new unicode module. Decided to refactor the approach towrds individual PRs without a new module. Refs: https://github.com/nodejs/node/pull/8075 PR-URL: https://github.com/nodejs/node/pull/9038 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
cjihrig authored
This commit adds coverage for the timeout option used by child_process exec() and execFile(). PR-URL: https://github.com/nodejs/node/pull/9208 Reviewed-By:
Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com>
-
James M Snell authored
Rather than the pseudo-wcwidth impl used currently, use the ICU character properties database to calculate string width and determine if a character is full width or not. This allows the algorithm to correctly identify emoji's as full width, ensures the algorithm will continue to fucntion properly as new unicode codepoints are added, and it's faster. This was originally part of a proposal to add a new unicode module, but has been split out. Refs: https://github.com/nodejs/node/pull/8075 PR-URL: https://github.com/nodejs/node/pull/9040 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Steven R Loomis <srloomis@us.ibm.com>
-
- Oct 25, 2016
-
-
James M Snell authored
the WHATWG url parser relies on ICU's punycode implementation. A handful of the standard tests fail when ICU is not present because of the additional checks that are not implemented. For now, skip the parse and setter tests if ICU is not present. PR-URL: https://github.com/nodejs/node/pull/9246 Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Roman Reiss <me@silverwind.io> Reviewed-By:
Johan Bergström <bugs@bergstroem.nu> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
James M Snell authored
PR-URL: https://github.com/nodejs/node/pull/9246 Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Roman Reiss <me@silverwind.io> Reviewed-By:
Johan Bergström <bugs@bergstroem.nu> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
James M Snell authored
Notable Changes: * Buffer * Passing invalid input to Buffer.byteLength will now throw an error [#8946](https://github.com/nodejs/node/pull/8946). * Calling Buffer without new is now deprecated and will emit a process warning [#8169](https://github.com/nodejs/node/pull/8169). * Passing a negative number to allocUnsafe will now throw an error [#7079](https://github.com/nodejs/node/pull/7079). * Child Process * The fork and execFile methods now have stronger argument validation [#7399](https://github.com/nodejs/node/pull/7399). * Cluster * The worker.suicide method is deprecated and will emit a process warning [#3747](https://github.com/nodejs/node/pull/3747). * Deps * V8 has been updated to 5.4.500.36 [#8317](https://github.com/nodejs/node/pull/8317), [#8852](https://github.com/nodejs/node/pull/8852), [#9253](https://github.com/nodejs/node/pull/9253). * NODE_MODULE_VERSION has been updated to 51 [#8808](https://github.com/nodejs/node/pull/8808). * File Syst...
-
Evan Lucas authored
This fixes one of the tests that has been failing on CI on freebsd for a bit by removing an unnecessary timer. PR-URL: https://github.com/nodejs/node/pull/9199 Fixes: https://github.com/nodejs/node/issues/7929 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Ben Noordhuis authored
It's only used once at startup in a single place so create the string in place instead of caching it for the lifetime of the isolate. PR-URL: https://github.com/nodejs/node/pull/9213 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ben Noordhuis authored
Check that invoking a callback on a receiver from a different context works. It ran afoul of an `env->context() == isolate->GetCurrentContext()` assertion so retrieve the environment from the callback context and the context to enter from the environment's context() method. We could also have retrieved the environment from the receiver's context and that would have made little practical difference. It just seemed more correct to get it from the callback context because that is the actual execution context. PR-URL: https://github.com/nodejs/node/pull/9221 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Ben Noordhuis authored
Use zero-copy external string resources for storing the built-in JS source code. Saves a few hundred kilobyte of memory and consistently speeds up `benchmark/misc/startup.js` by 2.5%. Everything old is new again! Commit 74954ce7 ("Add string class that uses ExternalAsciiStringResource.") from 2011 did the same thing but I removed that in 2013 in commit 34b0a361 ("src: don't use NewExternal() with unaligned strings") because of a limitation in the V8 API. V8 no longer requires that strings are aligned if they are one-byte strings so it should be safe to re-enable external strings again. PR-URL: https://github.com/nodejs/node/pull/5458 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
-
Oliver Salzburg authored
Environment variables should be treated case-insensitive on Windows platforms and case-sensitive on UNIX platforms. This commit ensures this behavior persists. Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> PR-URL: https://github.com/nodejs/node/pull/9166 Fixes: https://github.com/nodejs/node/issues/9157
-
Oliver Salzburg authored
On Windows OS, environment variables are case-insensitive and are treated likewise in NodeJS. This can be confusing and can lead to hard-to-debug problems when moving code from one environment to another. Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> PR-URL: https://github.com/nodejs/node/pull/9166 Fixes: https://github.com/nodejs/node/issues/9157
-
cjihrig authored
Code coverage showed that the execSync() variable inheritStderr was never set to the default value of true. This is because the default case is hit whenever normalizeExecArgs() returns an object without an 'options' property. However, this can never be the case because normalizeExecArgs() unconditionally creates the options object. This commit removes the unreachable code. PR-URL: https://github.com/nodejs/node/pull/9209 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
-
cjihrig authored
This commit adds coverage for errors returned by execFileSync() when the child process exits with a non-zero code. PR-URL: https://github.com/nodejs/node/pull/9211 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Ben Noordhuis authored
Commit 93a44d52 ("src: fix deferred events not working with -e") defers evaluation of the script to the next tick. A side effect of that change is that 'beforeExit' listeners run before the actual script. 'beforeExit' is emitted when the event loop is empty but process.nextTick() does not ref the event loop. Fix that by using setImmediate(). Because it is implemented in terms of a uv_check_t handle, it interacts with the event loop properly. Fixes: https://github.com/nodejs/node/issues/8534 PR-URL: https://github.com/nodejs/node/pull/8821 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Ben Noordhuis authored
Remove parallel/test-v8-inspector-json-protocol, it duplicates the test found in inspector/test-inspector. PR-URL: https://github.com/nodejs/node/pull/9184 Reviewed-By:
Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ben Noordhuis authored
Fix a nullptr dereference when an invalid path is requested. Regression introduced in commit 69fc85dc ("inspector: generate UUID for debug targets"), caught by Coverity. PR-URL: https://github.com/nodejs/node/pull/9184 Reviewed-By:
Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ben Noordhuis authored
There is no point in trying to search for files in a directory that we know does not exist, so stop doing that. Reduces the total number of stat(2) calls and the number of stat(2) misses on a medium-sized application by about 21% and 29% respectively. Reduces the total number of package.json open(2) calls and the number of open(2) misses by about 21% and 93% (!) respectively. Before: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 50.93 0.178419 38 4702 lstat 29.08 0.101875 36 2800 2010 stat 11.36 0.039796 43 932 215 open 5.39 0.018897 34 550 fstat 3.24 0.011337 34 336 pread ------ ----------- ----------- --------- --------- ---------------- 100.00 0.350324 9320 2225 total After: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 55.49 0.176638 38 4702 lstat 24.76 0.078826 35 2225 1435 stat 10.19 0.032434 44 733 16 open 6.19 0.019719 36 550 fstat 3.37 0.010723 32 336 pread ------ ----------- ----------- --------- --------- ---------------- 100.00 0.318340 8546 1451 total PR-URL: https://github.com/nodejs/node/pull/9196 Reviewed-By:Brian White <mscdex@mscdex.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Evan Lucas <evanlucas@me.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ben Noordhuis authored
Discourage using require.extensions because it slows down the module loader. The number of file system operations that the module system has to perform in order to resolve a `require(...)` statement to a filename is proportional to the number of registered extensions. PR-URL: https://github.com/nodejs/node/pull/9196 Reviewed-By:
Brian White <mscdex@mscdex.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Evan Lucas <evanlucas@me.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ben Noordhuis authored
Verify that a package.json without a .main property loads index.js. PR-URL: https://github.com/nodejs/node/pull/9196 Reviewed-By:
Brian White <mscdex@mscdex.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Evan Lucas <evanlucas@me.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ben Noordhuis authored
Increase the number of iterations from 1e4 to 1e5. Makes the test pass for me locally when previously it would fail 9 out of 10 times because the running time was not enough to smooth away the outliers. Fixes: https://github.com/nodejs/node/issues/8744 PR-URL: https://github.com/nodejs/node/pull/9241 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
not-an-aardvark <not-an-aardvark@users.noreply.github.com>
-
Ben Noordhuis authored
Move sequential/test-crypto-timing-safe-equal-benchmarks to test/pummel because it fails for me locally quite frequently and because it takes about five or six seconds to complete, which is too long for a test in test/sequential. Fixes: https://github.com/nodejs/node/issues/8744 PR-URL: https://github.com/nodejs/node/pull/9241 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
not-an-aardvark <not-an-aardvark@users.noreply.github.com>
-
Ben Noordhuis authored
Reorder the initialization logic so that program-wide, per-isolate and per-environment initialization is more cleanly separated. PR-URL: https://github.com/nodejs/node/pull/9224 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ben Noordhuis authored
NodeInstanceData is not used meaningfully and makes the initialization logic harder to follow. Let's remove it and delete 100 lines of code in one fell swoop. PR-URL: https://github.com/nodejs/node/pull/9224 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ben Noordhuis authored
Don't bother shrinking the read buffer on the final read because we dispose it immediately afterwards. Avoids some unnecessary memory allocation and copying. PR-URL: https://github.com/nodejs/node/pull/9132 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ben Noordhuis authored
Stop reading from disk when we read fewer bytes than requested because the next read will be the zero-sized EOF. PR-URL: https://github.com/nodejs/node/pull/9132 Reviewed-By:
James M Snell <jasnell@gmail.com>
-