- Oct 26, 2016
-
-
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 System * A process warning is emitted if a callback is not passed to async file system methods [#7897](https://github.com/nodejs/node/pull/7897). * Intl * Intl.v8BreakIterator constructor has been deprecated and will emit a process warning [#8908](https://github.com/nodejs/node/pull/8908). * Promises * Unhandled Promise rejections have been deprecated and will emit a process warning [#8217](https://github.com/nodejs/node/pull/8217). * Punycode * The `punycode` module has been deprecated [#7941](https://github.com/nodejs/node/pull/7941). * URL * An Experimental WHATWG URL Parser has been introduced [#7448](https://github.com/nodejs/node/pull/7448). PR-URL: https://github.com/nodejs/node/pull/9099
-
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>
-
Marc Udoff authored
Add a way through environment variables to set the --preserve-symlinks flag. Any non-null value of NODE_PRESERVE_SYMLINKS will enable symlinks. PR-URL: https://github.com/nodejs/node/pull/8749 Fixes: https://github.com/nodejs/node/issues/8509 Reviewed-By:
Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
Michaël Zasso authored
PR-URL: https://github.com/nodejs/node/pull/9253 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
- Oct 24, 2016
-
-
Gibson Fahnestock authored
PR-URL: https://github.com/nodejs/node/pull/9009 Reviewed-By:
Julien Gilli <jgilli@nodejs.org> Reviewed-By:
Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Gibson Fahnestock authored
PR-URL: https://github.com/nodejs/node/pull/9009 Reviewed-By:
Julien Gilli <jgilli@nodejs.org> Reviewed-By:
Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Gibson Fahnestock authored
Specifies teams to cc for platform specific issues - Existing teams: @nodejs/platform-arm, @nodejs/platform-freebsd, and @nodejs/platform-windows - New teams: @nodejs/platform-s390, @nodejs/platform-aix - Changed name: @nodejs/platform-solaris -> @nodejs/platform-smartos PR-URL: https://github.com/nodejs/node/pull/9009 Reviewed-By:
Julien Gilli <jgilli@nodejs.org> Reviewed-By:
Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Gibson Fahnestock authored
Adds `s390` and `ppc` as Arch labels, and `aix` as an OS label. PR-URL: https://github.com/nodejs/node/pull/9009 Reviewed-By:
Julien Gilli <jgilli@nodejs.org> Reviewed-By:
Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Rod Machen authored
Fixes several formatting errors in the process doc, including missing link references, misplaced underscores, and a missing backtick. Fixes: https://github.com/nodejs/node/issues/9223 PR-URL: https://github.com/nodejs/node/pull/9235 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Brian White <mscdex@mscdex.net>
-
Michaël Zasso authored
This allows us to use the exponentiation operator. PR-URL: https://github.com/nodejs/node/pull/9218 Ref: https://github.com/nodejs/node/pull/9208#issuecomment-255309920 Reviewed-By:
Teddy Katz <teddy.katz@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
-
- Oct 23, 2016
-
-
Brian White authored
PR-URL: https://github.com/nodejs/node/pull/8948 Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
- Oct 22, 2016
-
-
Rich Trott authored
This test was failing on FreeBSD from time to time in the project CI. The bug the test was written for would guarantee that the timer would fire at least 100ms late, but the assertion was firing if it was more than 50ms late. This changes the assertion to fire when the timer is more than 100ms late. I ran a modified version of this test using 0.10.38 (which has the bug) and 0.10.39 (which has the fix) to confirm that it still fails in the buggy one and passes in the fixed one. PR-URL: https://github.com/nodejs/node/pull/9198 Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Julien Gilli <jgilli@nodejs.org>
-
Rich Trott authored
`test-dgram-send-callback-buffer-length` was timing out (via the 200ms timeout in the code) on FreeBSD in CI. The 200ms timeout is arbitrary and not necessary. Remove it. PR-URL: https://github.com/nodejs/node/pull/9197 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Jeremiah Senkpiel authored
Sizes were mostly decided by using http://type-scale.com/ with the 1.250 "Major Third" scaling. PR-URL: https://github.com/nodejs/node/pull/8811 Reviewed-By:
Roman Reiss <me@silverwind.io> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By:
Rod Vagg <rod@vagg.org> Reviewed-By:
Phillip Johnsen <johphi@gmail.com>
-
- Oct 21, 2016
-
-
Kyle E. Mitchell authored
Updates the argument names `srcpath` and `dstpath` to match the more descriptive `existingPath` and `newPath` in the documentation. PR-URL: https://github.com/nodejs/node/pull/9145 Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com>
-
Kyle E. Mitchell authored
Clarifies documentation by replacing the argument names `srcpath` and `dstpath` with more descriptive `existingPath` and `newPath`, reflecting how POSIX describes `link()`. PR-URL: https://github.com/nodejs/node/pull/9145 Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Gibson Fahnestock <gibfahn@gmail.com>
-