This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 342
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ref: nodejs/node#3804 PR-URL: nodejs/node#5167 Reviewed-By: rvagg - Rod Vagg <rod@vagg.org> Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
Ref: nodejs/node#3804 PR-URL: nodejs/node#5167 Reviewed-By: rvagg - Rod Vagg <rod@vagg.org> Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
PR-URL: nodejs/node#5500 Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
This commit makes input type checking consistent across all path functions. PR-URL: nodejs/node#5348 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Previously, we emitted ip and addressType. This change includes the host as the last argument to the lookup event. PR-URL: nodejs/node#5598 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
The string template was closed after `${buf.length}` causing a syntax error within the example. PR-URL: nodejs/node#5781 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#5765 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit addresses nodejs/node#5431 by changing the way that the repl handles assignment to the global _ variable. Prior to this commit, node sets the result of the last expression evaluated in the repl to `_`. This causes problems for users of underscore, lodash and other packages where it is common to assign `_` to the package, e.g. `_ = require('lodash');`. Changes in this commit now result in the following behavior. - If unassigned on the repl, `_` continues to refer to the last evaluated expression. - If assigned, the default behavior of assigning `_` to the last evaluated expression is disabled, and `_` now references whatever value was explicitly set. A warning is issued on the repl - 'expression assignment to _ now disabled'. - If `_` is assigned multiple times, the warning is only displayed once. - When `.clear` is executed in the repl, `_` continues to refer to its most recent value, whatever that is (this is per existing behavior). If `_` had been explicitly set prior to `.clear` it will not change again with the evaluation of the next expression. PR-URL: nodejs/node#5535 Fixes: nodejs/node#5431 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit improves setImmediate() performance by moving the try-finally block that wraps callback execution into a separate function because currently v8 never tries to optimize functions that contain try-finally blocks. With this change, there is a ~20-40% improvement in the included setImmediate() depth benchmarks. The breadth benchmarks show a slight improvement. PR-URL: nodejs/node#4169 Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Now that the Buffer.alloc, allocUnsafe, and from methods have landed, add a linting rule that requires their use within lib. Tests and benchmarks are explicitly excluded by the rule. PR-URL: nodejs/node#5740 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Enable support for standalone block statements. ```js node 🙈 ₹ git:(upstream ⚡ bare-block) ./node > { var x = 3; console.log(x); } 3 undefined > {} {} > { x:1, y:"why not", z: function() {} } { x: 1, y: 'why not', z: [Function] } > ``` For the ambiguous inputs like `{ x }`, the existing REPL behaviour (ES6 literal shorthand) is preserved (prefers expression over statement). Fixes: nodejs/node#5576 PR-URL: nodejs/node#5581 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
test-repl-tab-complete includes tests that ensure that certain keys do not appear in tab completions or that completion does not crash the repl. It performed these tests by comparing completion output to a hardcoded list of expected keys. This list is made incorrect by any api changes that occur when new versions of V8 are introduced. With this change, we assert that the specific keys to be avoided are not present in the output instead. PR-URL: nodejs/node#5772 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
The need for an overview of blocking vs non-blocking was identified in the docs WG Q1 roadmap. As there are several topics also pending creation, this one tries to hit the correct level of detail based on completion of the others. One which is referenced is https://github.com/nodejs/node/pull/4936/files and URLs within this PR need to change based on where that will land on the node website. PR-URL: nodejs/node#5326 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Recent phantom weakness API changes to buffer, ebbbc5a, ending up introducing an alignment restriction on the native buffer pointers. It turns out that there are uses in the modules ecosystem that rely on the ability to create buffers with unaligned pointers (e.g. node-ffi). It turns out there is a simpler solution possible here. As a side effect this also removes the need to have to reserve the first internal field on buffers. PR-URL: nodejs/node#5752 Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Buffers instances can have arbitrary alignment. `node-ffi` depends on this. Add some regression tests to ensure we don't break this in the future. PR-URL: nodejs/node#5752 Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
When the previous set of changes (bfff07b4) it was possible to have the context get garbage collected while sandbox was still live. We need to tie the lifetime of the context to the lifetime of the sandbox. Fixes: nodejs/node#5768 PR-URL: nodejs/node#5786 Reviewed-By: jasnell - James M Snell <jasnell@gmail.com> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Asynchronous functions in `zlib` should not emit the close event. This fixes an issue where asynchronous calls in a for loop could exhaust memory because the pending event prevents the objects from being garbage collected. Fixes: nodejs/node#1668 PR-URL: nodejs/node#5707 Reviewed-By: jasnell - James M Snell <jasnell@gmail.com> Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Brings tls.markdown into alignment with the node.js styleguide, specifically regarding the use of personal pronouns. Also, fixes various typos, punctuation errors, missing definite/indefinite articles and other minor grammatical issues. PR-URL: nodejs/node#5706 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Removed an unused `var self = this` that is no longer required. PR-URL: nodejs/node#5224 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This uses libuv's mkdtemp function to provide a way to create a temporary folder, using a prefix as the path. The prefix is appended six random characters. The callback function will receive the name of the folder that was created. Usage example: fs.mkdtemp('/tmp/foo-', function(err, folder) { console.log(folder); // Prints: /tmp/foo-Tedi42 }); The fs.mkdtempSync version is also provided. Usage example: console.log(fs.mkdtemp('/tmp/foo-')); // Prints: tmp/foo-Tedi42 This pull request also includes the relevant documentation changes and tests. PR-URL: nodejs/node#5333 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Convert string concatenation to template literals. Enforce with lint rule. PR-URL: nodejs/node#5778 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Added appropriate in-document links. Clarified a bit of `setImmediate`, including a quick grammar fix (plural possessive apostrophe). PR-URL: nodejs/node#5792 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Refs: nodejs/node#5615 PR-URL: nodejs/node#5619 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Rod Vagg <rod@vagg.org>
Refs: nodejs/node#5792 PR-URL: nodejs/node#5793 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reduce resoures required by test. Clarify comment explaining source of test and what the test is looking for. Fixes: nodejs/node#5725 PR-URL: nodejs/node#5728 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Currently the DNS module imports isIP from both cares and `net` and uses both of them both throughout the code base. This PR removes the direct dependency `dns` has on `net` and uses `isIp` from c-ares all the time. Note that both functions do the same thing. PR-URL: nodejs/node#5804 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Test was flaky on centos7-64 due to an uncaught ECONNRESET on the worker code. This catches the error so the process will exit with code 0. Fixes: nodejs/node#5604 PR-URL: nodejs/node#5802 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Don't check that the `disconnect` event is emitted before the `exit` event as the order is not guaranteed. PR-URL: nodejs/node#5814 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#5700 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Fixes: nodejs/node#5823 Refs: nodejs/node#5793 PR-URL: nodejs/node#5825 Reviewed-By: Myles Borins <myles.borins@gmail.com>
PR-URL: nodejs/node#5103 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Original commit message: Unbreak --gdbjit for embedders. Embedders don't use d8.cc. Move gdbjit initialization to api.cc. Review URL: https://codereview.chromium.org/1710253002 Fixes: nodejs/node#2076 PR-URL: nodejs/node#5577 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
reduce using RegExp for string test. This pull reuqest replaces various usages of regular expressions in favor of the ES2015 startsWith and endsWith methods. PR-URL: nodejs/node#5753 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
Event 9 must include the string terminator in the last descriptor. Event 23 must be published with no descriptors, in accordance with the manifest. PR-URL: nodejs/node#5742 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Using let in for loops showed a regression in 4.4.0. @ofrobots suggested that we avoid using let in for loops until TurboFan becomes the default optimiser. The regression that was detected was when looking at how long it took to create a new buffer from an array of data. When using `for (let i=0; i<length; i++) ` we saw the operation take almost 40% longer compared to `var i=0`. PR-URL: nodejs/node#5819 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Trevor Norris <trevnorris@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Ref: http://github.com/nodejs/benchmarking/issues/38
Adds Buffer.prototype.swap16() and Buffer.prototype.swap32() methods that mutate the Buffer instance in-place by swapping the 16-bit and 32-bit byte-order. Example: ```js const buf = Buffer([0x1, 0x2, 0x3, 0x4]); buf.swap16(); console.log(buf); // prints Buffer(0x2, 0x1, 0x4, 0x3); buf.swap32(); console.log(buf); // prints Buffer(0x3, 0x4, 0x1, 0x2); ``` PR-URL: nodejs/node#5724 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Only treat the gzip magic bytes, when encountered within the file after reading a single block, as the start of a new member when the previous member has ended. Add test files that reliably reproduce #5852. The gzipped file in test/fixtures/pseudo-multimember-gzip.gz contains the gzip magic bytes exactly at the position that node encounters after having read a single block, leading it to believe that a new data member is starting. Fixes: nodejs/node#5852 PR-URL: nodejs/node#5863 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Fail early in require('crypto'), require('tls'), require('https'), etc when crypto is not available (rather than depending on an internal try/catch). Add documentation for detecting when crypto is not available. PR-URL: nodejs/node#5611 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The tty.ReadStream constructor initializes this as a socket, which causes a read to be initiated. Even though during stdin initalization we call readStop shortly after, the read operation can consume keypress events from the system buffers. Fixes: nodejs/node#5384 PR-URL: nodejs/node#5776 Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Readable.resume() schedules the resume operation onto the next tick, whereas pause() has immediate effect. This means that in a sequence stream.resume(); stream.pause(); .. the 'pause' event will be triggered before the resume operation is performed. For process.stdin, we are relying on the 'pause' event to stop reading on the underlying handle. This fix ensures that reads are started and stopped in the same order as resume() and pause() are called. PR-URL: nodejs/node#5776 Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Now that the CTC has expanded, this PR calls for a vote of the CTC to reinstate Michael Dawson (@mhdawson) as a full voting member. Voted on and approved by the CTC on 2016-03-23 PR-URL: nodejs/node#5633 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Alexis Campailla <orangemocha@nodejs.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Implementing the suggestion in nodejs/node#4554 this pull request renames the parameter name in all the places that accept an event name as a parameter. Previously, the parameter has been called `event` or `type`. Now as suggested it is consistently called `eventName`. PR-URL: nodejs/node#5850 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Notable changes: * buffer: Now properly throws RangeErrors on out-of-bounds writes (Matt Loring) nodejs/node#5605 - This effects write{Float|Double} when the noAssert option is not used. * timers: - Returned timeout objects now have a Timeout constructor name (Jeremiah Senkpiel) nodejs/node#5793 - Performance of Immediate processing is now ~20-40% faster (Brian White) nodejs/node#4169 * vm: Fixed a contextify regression introduced in v5.9.0 (Ali Ijaz Sheikh) nodejs/node#5800 PR-URL: nodejs/node#5831
Current html result of a list after heading is <div class="signature"><ul>...</div></ul>. Correct it to <div class="signature"><ul>...</ul></div>. PR-URL: nodejs/node#5874 Fixes: nodejs/node#5873 Reviewed-By: Roman Reiss <me@silverwind.io>
Fix long-broken test-debugger-client by adding missing `\r\n\r\n` separator. PR-URL: nodejs/node#5851 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
In several places throughout the code we write directly to stderr to report warnings (deprecation, possible eventemitter memory leak). The current design of simply dumping the text to stderr is less than ideal. This PR introduces a new "process warnings" mechanism that emits 'warning' events on the global process object. These are invoked with a `warning` argument whose value is an Error object. By default, these warnings will be printed to stderr. This can be suppressed using the `--no-warnings` and `--no-deprecation` command line flags. For warnings, the 'warning' event will still be emitted by the process, allowing applications to handle the warnings in custom ways. The existing `--no-deprecation` flag will continue to supress all deprecation output generated by the core lib. The `--trace-warnings` command line flag will tell Node.js to print the full stack trace of warnings as part of the default handling. The existing `--no-deprecation`, `--throw-deprecation` and `--trace-deprecation` flags continue to work as they currently do, but the exact output of the warning message is modified to occur on process.nextTick(). The stack trace for the warnings and deprecations preserve and point to the correct call site. A new `process.emitWarning()` API is provided to permit userland to emit warnings and deprecations using the same consistent mechanism. Test cases and documentation are included. PR-URL: nodejs/node#4782 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Wyatt Preul <wpreul@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Increase timeout on Raspberry Pi to alleviate flakiness. Fixes: nodejs/node#5854 PR-URL: nodejs/node#5856 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: nodejs/node#5876 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#5616 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
This makes several changes: 1. Allow path/filename to be passed in as a Buffer on fs methods 2. Add `options.encoding` to fs.readdir, fs.readdirSync, fs.readlink, fs.readlinkSync and fs.watch. 3. Documentation updates For 1... it's now possible to do: ```js fs.open(Buffer('/fs/foo/bar'), 'w+', (err, fd) => { }); ``` For 2... ```js fs.readdir('/fs/foo/bar', {encoding:'hex'}, (err,list) => { }); fs.readdir('/fs/foo/bar', {encoding:'buffer'}, (err, list) => { }); ``` encoding can also be passed as a string ```js fs.readdir('/fs/foo/bar', 'hex', (err,list) => { }); ``` The default encoding is set to UTF8 so this addresses the discrepency that existed previously between fs.readdir and fs.watch handling filenames differently. Fixes: nodejs/node#2088 Refs: nodejs/node#3519 PR-URL: nodejs/node#5616 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: nodejs/node#5616 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Introduce `--no-browser-globals` configure flag. With this flag set, following globals won't be exported: - `setTimeout`, `clearTimeout`, `setInterval`, `clearInterval`, `setImmediate`, `clearImmediate` - `console` These are provided by the DOM implementation in browser, so the `--no-browser-globals` flag may be helpful when embedding node.js within chromium/webkit. Inspired-By: atom/node@82e10ce PR-URL: nodejs/node#5853 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
Looks good to me |
LGTM. That CI run failed because it tried to rebase the code with the latest Node.js master. Here is a correct run: https://ci.nodejs.org/job/node-test-pull-request/2083/ |
Sync to nodejs/master (3/25/2016) at nodejs/node@8363ede PR-URL: nodejs#46 Reviewed-By: Sandeep Agarwal <Agarwal.Sandeep@microsoft.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
parallel/test-debugger-util-regression => debugger test, disable sequential/test-process-warnings => different stack trace message PR-URL: nodejs#46 Reviewed-By: Sandeep Agarwal <Agarwal.Sandeep@microsoft.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Thanks @agarwal-sandeep @thefourtheye! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sync to nodejs/master as of 3/25/2016.
No changes in chakrashim. Saw 2 new unit test failures and addressed.
@nodejs/node-chakracore Please review. Thanks!