From f556b43e3e91bd6da2c70e1025214cfc1888b853 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 5 Jul 2016 16:18:38 +0200 Subject: [PATCH 001/221] build: add --enable-d8 configure option Add an option to the configure script for building d8. Useful for testing V8 standalone. PR-URL: https://github.com/nodejs/node/pull/7538 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Rod Vagg --- configure | 7 +++++++ node.gyp | 3 +++ 2 files changed, 10 insertions(+) diff --git a/configure b/configure index 0be3a52bf7e886..d14648cf8fc148 100755 --- a/configure +++ b/configure @@ -223,6 +223,11 @@ parser.add_option('--release-urlbase', '`sourceUrl` and `headersUrl`. When compiling a release build, this ' 'will default to https://nodejs.org/download/release/') +parser.add_option('--enable-d8', + action='store_true', + dest='enable_d8', + help=optparse.SUPPRESS_HELP) # Unsupported, undocumented. + parser.add_option('--v8-options', action='store', dest='v8_options', @@ -804,6 +809,8 @@ def configure_v8(o): o['variables']['v8_optimized_debug'] = 0 # Compile with -O0 in debug builds. o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables. o['variables']['v8_use_snapshot'] = 'false' if options.without_snapshot else 'true' + o['variables']['node_enable_d8'] = b(options.enable_d8) + def configure_openssl(o): o['variables']['node_use_openssl'] = b(not options.without_ssl) diff --git a/node.gyp b/node.gyp index 5058682bff8f8e..e17c58b7038622 100644 --- a/node.gyp +++ b/node.gyp @@ -209,6 +209,9 @@ 'conditions': [ + [ 'node_enable_d8=="true"', { + 'dependencies': [ 'deps/v8/src/d8.gyp:d8' ], + }], [ 'node_tag!=""', { 'defines': [ 'NODE_TAG="<(node_tag)"' ], }], From 50ae37e350363c9d875b8c365c43b05c74916a1f Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Wed, 11 May 2016 17:54:42 -0400 Subject: [PATCH 002/221] test: add --repeat option to tools/test.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Manual backport from master to 4.x stream, original commit message follows. I often want to run a test many times to see if a failure can be recreated and I believe this is a common use case. We even have this job in the CI https://ci.nodejs.org/job/node-stress-single-test/configure but often you want to run it on a specific machine. This patch adds the --repeat option so that you can repeat the selected set of tests a number of times. Given existing options in test.py this will allow you to run one or more tests for the number of repeats specified. For example: tools/test.py -j8 --repeat 1000 parallel/test-process-exec-argv runs the test-process-exec-argv test 1000 times, running 8 copies in parallel tools/test.py --repeat 2 would run the entire test suite twice. PR-URL: https://github.com/nodejs/node/pull/6700 Reviewed-By: Ben Noorhduis Reviewed-By: James M Snell Reviewed-By: Fedor Indutny Reviewed-By: thefourtheye - Sakthipriyan Vairamani Reviewed-By: joaocgreis - João Reis Reviewed-By: Johan Bergström --- tools/test.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/test.py b/tools/test.py index 55328a338ef9a8..49971fd6e2f290 100755 --- a/tools/test.py +++ b/tools/test.py @@ -774,8 +774,7 @@ def AddTestsToList(self, result, current_path, path, context, arch, mode): tests = self.GetConfiguration(context).ListTests(current_path, path, arch, mode) for t in tests: t.variant_flags = v - result += tests - + result += tests * context.repeat def GetTestStatus(self, context, sections, defs): self.GetConfiguration(context).GetTestStatus(sections, defs) @@ -828,7 +827,8 @@ def GetTestStatus(self, context, sections, defs): class Context(object): def __init__(self, workspace, buildspace, verbose, vm, expect_fail, - timeout, processor, suppress_dialogs, store_unexpected_output): + timeout, processor, suppress_dialogs, + store_unexpected_output, repeat): self.workspace = workspace self.buildspace = buildspace self.verbose = verbose @@ -838,6 +838,7 @@ def __init__(self, workspace, buildspace, verbose, vm, expect_fail, self.processor = processor self.suppress_dialogs = suppress_dialogs self.store_unexpected_output = store_unexpected_output + self.repeat = repeat def GetVm(self, arch, mode): if arch == 'none': @@ -1369,6 +1370,9 @@ def BuildOptions(): default="") result.add_option('--temp-dir', help='Optional path to change directory used for tests', default=False) + result.add_option('--repeat', + help='Number of times to repeat given tests', + default=1, type="int") return result @@ -1533,7 +1537,8 @@ def Main(): options.timeout, processor, options.suppress_dialogs, - options.store_unexpected_output) + options.store_unexpected_output, + options.repeat) # First build the required targets if not options.no_build: reqs = [ ] From c41efe4d68712917b30d5f5ad7dc26e35d6e111e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Cie=C5=9Blak?= Date: Wed, 20 Jul 2016 08:44:28 +0000 Subject: [PATCH 003/221] build: add node_module_version to config.gypi Enable targetting of a different node version than the currently running one when building binary modules. Based on nodejs/node@410296c37 PR-URL: https://github.com/nodejs/node/pull/8171 Ref: https://github.com/nodejs/node/pull/8027 Ref: https://github.com/nodejs/node/pull/7808 Ref: https://github.com/nodejs/node-gyp/pull/855 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- configure | 2 ++ node.gyp | 1 + test/parallel/test-module-version.js | 10 ++++++++++ 3 files changed, 13 insertions(+) create mode 100644 test/parallel/test-module-version.js diff --git a/configure b/configure index d14648cf8fc148..a54d30a161f694 100755 --- a/configure +++ b/configure @@ -769,6 +769,8 @@ def configure_node(o): if options.enable_static: o['variables']['node_target_type'] = 'static_library' + o['variables']['node_module_version'] = 46 + if options.linked_module: o['variables']['library_files'] = options.linked_module diff --git a/node.gyp b/node.gyp index e17c58b7038622..37d2400dfd2d3a 100644 --- a/node.gyp +++ b/node.gyp @@ -15,6 +15,7 @@ 'node_enable_v8_vtunejit%': 'false', 'node_target_type%': 'executable', 'node_core_target_name%': 'node', + 'node_module_version%': '', 'library_files': [ 'src/node.js', 'lib/_debug_agent.js', diff --git a/test/parallel/test-module-version.js b/test/parallel/test-module-version.js new file mode 100644 index 00000000000000..34fb3095a2339f --- /dev/null +++ b/test/parallel/test-module-version.js @@ -0,0 +1,10 @@ +'use strict'; +require('../common'); +const assert = require('assert'); + +// Check for existence +assert(process.config.variables.hasOwnProperty('node_module_version')); + +// Ensure that `node_module_version` is an Integer +assert(!Number.isNaN(parseInt(process.config.variables.node_module_version))); +assert.strictEqual(process.config.variables.node_module_version, 46); From 29139bff65571f7f294e0b2b992437144b160bf4 Mon Sep 17 00:00:00 2001 From: Phillip Johnsen Date: Mon, 8 Aug 2016 23:31:27 +0200 Subject: [PATCH 004/221] doc: improve server.listen() random port Minor rewording related to making a server listen to a random port, and added how to retrieve which port was randomly chosen by the OS. Also changed documented `server.listen()` signature as it does in fact not require `port` to be provided. PR-URL: https://github.com/nodejs/node/pull/8025 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- doc/api/http.md | 8 +++++--- doc/api/net.md | 17 +++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index 01e4244e2a8d68..a01408c321d21d 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -640,15 +640,17 @@ Start a UNIX socket server listening for connections on the given `path`. This function is asynchronous. `callback` will be added as a listener for the `'listening'` event. See also [`net.Server.listen(path)`][]. -### server.listen(port[, hostname][, backlog][, callback]) +### server.listen([port][, hostname][, backlog][, callback]) Begin accepting connections on the specified `port` and `hostname`. If the `hostname` is omitted, the server will accept connections on any IPv6 address -(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. Use a -port value of `0` to have the operating system assign an available port. +(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. +Omit the port argument, or use a port value of `0`, to have the operating system +assign a random port, which can be retrieved by using `server.address().port` +after the `'listening'` event has been emitted. To listen to a unix socket, supply a filename instead of port and hostname. diff --git a/doc/api/net.md b/doc/api/net.md index cc93231c5eb713..0e1099227d0b3d 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -73,8 +73,7 @@ var server = net.createServer((socket) => { // grab a random port. server.listen(() => { - address = server.address(); - console.log('opened server on %j', address); + console.log('opened server on', server.address()); }); ``` @@ -140,7 +139,7 @@ The last parameter `callback` will be added as a listener for the [`'listening'`][] event. The parameter `backlog` behaves the same as in -[`server.listen(port[, hostname][, backlog][, callback])`][`server.listen(port, host, backlog, callback)`]. +[`server.listen([port][, hostname][, backlog][, callback])`][`server.listen(port, host, backlog, callback)`]. ### server.listen(options[, callback]) Begin accepting connections on the specified `port` and `hostname`. If the `hostname` is omitted, the server will accept connections on any IPv6 address -(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. Use a -port value of `0` to have the operating system assign an available port. +(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. +Omit the port argument, or use a port value of `0`, to have the operating system +assign a random port, which can be retrieved by using `server.address().port` +after the `'listening'` event has been emitted. Backlog is the maximum length of the queue of pending connections. The actual length will be determined by the OS through sysctl settings such as From 77df52326456ba1a0619add65fb6048ce7bf56b4 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Thu, 11 Aug 2016 18:05:39 -0400 Subject: [PATCH 005/221] test: exclude tests for AIX Exclude tests for AIX in 4.x stream now that its been added to regular regression runs. This will avoid known failures from making the build look RED while also being able to catch any new regressions if they are introduced. PR-URL: https://github.com/nodejs/node/pull/8076 Reviewed-By: James M Snell Reviewed-By: Joao Reis Reviewed-By: Colin Ihrig --- test/parallel/parallel.status | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status index 2cdc5b7b07cb64..fe35cb6da6333b 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -31,3 +31,14 @@ test-tls-connect-address-family : PASS,FLAKY # regressions until this work is complete [$system==aix] test-fs-watch-enoent : FAIL, PASS +# Disable so we don't get failures now that AIX has been +# added to regular CI runs +test-regress-GH-1899 : FAIL, PASS +test-stdio-closed : FAIL, PASS + +# Flaky until https://github.com/nodejs/build/issues/415 is resolved. +# On some of the buildbots, AAAA queries for localhost don't resolve +# to an address and neither do any of the alternatives from the +# localIPv6Hosts list from test/common.js. +test-https-connect-address-family : PASS,FLAKY +test-tls-connect-address-family : PASS,FLAKY From 0e5286162922b3a81c8543bc11741a3035571127 Mon Sep 17 00:00:00 2001 From: Ryan Lewis Date: Wed, 29 Jun 2016 08:59:20 -0700 Subject: [PATCH 006/221] doc: grammar fixes to event loop guide PR-URL: https://github.com/nodejs/node/pull/7479 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- .../the-event-loop-timers-and-nexttick.md | 172 +++++++++--------- 1 file changed, 90 insertions(+), 82 deletions(-) diff --git a/doc/topics/the-event-loop-timers-and-nexttick.md b/doc/topics/the-event-loop-timers-and-nexttick.md index ebb46a0b1f22d9..1f2456a17c0e2f 100644 --- a/doc/topics/the-event-loop-timers-and-nexttick.md +++ b/doc/topics/the-event-loop-timers-and-nexttick.md @@ -9,7 +9,7 @@ offloading operations to the system kernel whenever possible. Since most modern kernels are multi-threaded, they can handle multiple operations executing in the background. When one of these operations completes, the kernel tells Node.js so that the appropriate callback -may added to the `poll` queue to eventually be executed. We'll explain +may added to the **poll** queue to eventually be executed. We'll explain this in further detail later in this topic. ## Event Loop Explained @@ -17,7 +17,7 @@ this in further detail later in this topic. When Node.js starts, it initializes the event loop, processes the provided input script (or drops into the REPL, which is not covered in this document) which may make async API calls, schedule timers, or call -`process.nextTick()`, then begins processing the event loop. +`process.nextTick()`, then begins processing the event loop. The following diagram shows a simplified overview of the event loop's order of operations. @@ -47,36 +47,36 @@ Each phase has a FIFO queue of callbacks to execute. While each phase is special in its own way, generally, when the event loop enters a given phase, it will perform any operations specific to that phase, then execute callbacks in that phase's queue until the queue has been -exhausted or the maximum number of callbacks have executed. When the +exhausted or the maximum number of callbacks has executed. When the queue has been exhausted or the callback limit is reached, the event loop will move to the next phase, and so on. Since any of these operations may schedule _more_ operations and new -events processed in the `poll` phase are queued by the kernel, poll +events processed in the **poll** phase are queued by the kernel, poll events can be queued while polling events are being processed. As a result, long running callbacks can allow the poll phase to run much -longer than a timer's threshold. See the [`timers`](#timers) and -[`poll`](#poll) sections for more details. +longer than a timer's threshold. See the [**timers**](#timers) and +[**poll**](#poll) sections for more details. _**NOTE:** There is a slight discrepancy between the Windows and the Unix/Linux implementation, but that's not important for this demonstration. The most important parts are here. There are actually seven or eight steps, but the ones we care about — ones that Node.js -actually uses are those above._ +actually uses - are those above._ -## Phases Overview: +## Phases Overview -* `timers`: this phase executes callbacks scheduled by `setTimeout()` +* **timers**: this phase executes callbacks scheduled by `setTimeout()` and `setInterval()`. -* `I/O callbacks`: most types of callback except timers, setImmedate, close -* `idle, prepare`: only used internally -* `poll`: retrieve new I/O events; node will block here when appropriate -* `check`: setImmediate callbacks are invoked here -* `close callbacks`: e.g socket.on('close', ...) +* **I/O callbacks**: most types of callback except timers, `setImmedate()`, close +* **idle, prepare**: only used internally +* **poll**: retrieve new I/O events; node will block here when appropriate +* **check**: `setImmediate()` callbacks are invoked here +* **close callbacks**: e.g socket.on('close', ...) Between each run of the event loop, Node.js checks if it is waiting for -any asynchronous I/O or timer and it shuts down cleanly if there are not +any asynchronous I/O or timers and shuts down cleanly if there are not any. ## Phases in Detail @@ -90,7 +90,7 @@ scheduled after the specified amount of time has passed; however, Operating System scheduling or the running of other callbacks may delay them. -_**Note**: Technically, the [`poll` phase](#poll) controls when timers +_**Note**: Technically, the [**poll** phase](#poll) controls when timers are executed._ For example, say you schedule a timeout to execute after a 100 ms @@ -102,10 +102,8 @@ takes 95 ms: var fs = require('fs'); function someAsyncOperation (callback) { - - // let's assume this takes 95ms to complete + // Assume this takes 95ms to complete fs.readFile('/path/to/file', callback); - } var timeoutScheduled = Date.now(); @@ -131,78 +129,77 @@ someAsyncOperation(function () { }); ``` -When the event loop enters the `poll` phase, it has an empty queue -(`fs.readFile()` has not completed) so it will wait for the number of ms +When the event loop enters the **poll** phase, it has an empty queue +(`fs.readFile()` has not completed), so it will wait for the number of ms remaining until the soonest timer's threshold is reached. While it is waiting 95 ms pass, `fs.readFile()` finishes reading the file and its -callback which takes 10 ms to complete is added to the `poll` queue and +callback which takes 10 ms to complete is added to the **poll** queue and executed. When the callback finishes, there are no more callbacks in the queue, so the event loop will see that the threshold of the soonest -timer has been reached then wrap back to the `timers` phase to execute +timer has been reached then wrap back to the **timers** phase to execute the timer's callback. In this example, you will see that the total delay -between the timer being scheduled and its callback being executed will +between the timer being scheduled and its callback being executed will be 105ms. -Note: To prevent the `poll` phase from starving the event loop, libuv -also has a hard maximum (system dependent) before it stops `poll`ing for +Note: To prevent the **poll** phase from starving the event loop, libuv +also has a hard maximum (system dependent) before it stops polling for more events. -### I/O callbacks: +### I/O callbacks This phase executes callbacks for some system operations such as types of TCP errors. For example if a TCP socket receives `ECONNREFUSED` when attempting to connect, some \*nix systems want to wait to report the -error. This will be queued to execute in the `I/O callbacks` phase. - -### poll: +error. This will be queued to execute in the **I/O callbacks** phase. -The poll phase has two main functions: +### poll -1. Executing scripts for timers who's threshold has elapsed, then -2. Processing events in the `poll` queue. +The **poll** phase has two main functions: +1. Executing scripts for timers whose threshold has elapsed, then +2. Processing events in the **poll** queue. -When the event loop enters the `poll` phase _and there are no timers +When the event loop enters the **poll** phase _and there are no timers scheduled_, one of two things will happen: -* _If the `poll` queue **is not empty**_, the event loop will iterate -through its queue of callbacks executing them synchronously until -either the queue has been exhausted, or the system-dependent hard limit +* _If the **poll** queue **is not empty**_, the event loop will iterate +through its queue of callbacks executing them synchronously until +either the queue has been exhausted, or the system-dependent hard limit is reached. -* _If the `poll` queue **is empty**_, one of two more things will +* _If the **poll** queue **is empty**_, one of two more things will happen: * If scripts have been scheduled by `setImmediate()`, the event loop - will end the `poll` phase and continue to the `check` phase to + will end the **poll** phase and continue to the **check** phase to execute those scheduled scripts. * If scripts **have not** been scheduled by `setImmediate()`, the event loop will wait for callbacks to be added to the queue, then - execute it immediately. + execute them immediately. -Once the `poll` queue is empty the event loop will check for timers +Once the **poll** queue is empty the event loop will check for timers _whose time thresholds have been reached_. If one or more timers are -ready, the event loop will wrap back to the timers phase to execute +ready, the event loop will wrap back to the **timers** phase to execute those timers' callbacks. -### `check`: +### check -This phase allows a person to execute callbacks immediately after the -`poll` phase has completed. If the `poll` phase becomes idle and -scripts have been queued with `setImmediate()`, the event loop may -continue to the `check` phase rather than waiting. +This phase allows a person to execute callbacks immediately after the +**poll** phase has completed. If the **poll** phase becomes idle and +scripts have been queued with `setImmediate()`, the event loop may +continue to the **check** phase rather than waiting. `setImmediate()` is actually a special timer that runs in a separate phase of the event loop. It uses a libuv API that schedules callbacks to -execute after the `poll` phase has completed. +execute after the **poll** phase has completed. Generally, as the code is executed, the event loop will eventually hit -the `poll` phase where it will wait for an incoming connection, request, -etc. However, after a callback has been scheduled with `setImmediate()`, -then the `poll` phase becomes idle, it will end and continue to the -`check` phase rather than waiting for `poll` events. +the **poll** phase where it will wait for an incoming connection, request, +etc. However, if a callback has been scheduled with `setImmediate()` +and the **poll** phase becomes idle, it will end and continue to the +**check** phase rather than waiting for **poll** events. -### `close callbacks`: +### close callbacks If a socket or handle is closed abruptly (e.g. `socket.destroy()`), the `'close'` event will be emitted in this phase. Otherwise it will be @@ -214,12 +211,12 @@ emitted via `process.nextTick()`. ways depending on when they are called. * `setImmediate()` is designed to execute a script once the current -`poll` phase completes. -* `setTimeout()` schedules a script to be run -after a minimum threshold in ms has elapsed. +**poll** phase completes. +* `setTimeout()` schedules a script to be run after a minimum threshold +in ms has elapsed. The order in which the timers are executed will vary depending on the -context in which they are called. If both are called from within the +context in which they are called. If both are called from within the main module, then timing will be bound by the performance of the process (which can be impacted by other applications running on the machine). @@ -248,7 +245,6 @@ setImmediate(function immediate () { immediate timeout - However, if you move the two calls within an I/O cycle, the immediate callback is always executed first: @@ -278,22 +274,22 @@ The main advantage to using `setImmediate()` over `setTimeout()` is `setImmediate()` will always be executed before any timers if scheduled within an I/O cycle, independently of how many timers are present. -## `process.nextTick()`: +## `process.nextTick()` ### Understanding `process.nextTick()` You may have noticed that `process.nextTick()` was not displayed in the -diagram, even though its a part of the asynchronous API. This is because +diagram, even though it's a part of the asynchronous API. This is because `process.nextTick()` is not technically part of the event loop. Instead, -the nextTickQueue will be processed after the current operation -completes, regardless of the current `phase` of the event loop. +the `nextTickQueue` will be processed after the current operation +completes, regardless of the current phase of the event loop. Looking back at our diagram, any time you call `process.nextTick()` in a given phase, all callbacks passed to `process.nextTick()` will be resolved before the event loop continues. This can create some bad situations because **it allows you to "starve" your I/O by making -recursive `process.nextTick()` calls.** which prevents the event loop -from reaching the `poll` phase. +recursive `process.nextTick()` calls**, which prevents the event loop +from reaching the **poll** phase. ### Why would that be allowed? @@ -319,9 +315,9 @@ What we're doing is passing an error back to the user but only *after* we have allowed the rest of the user's code to execute. By using `process.nextTick()` we guarantee that `apiCall()` always runs its callback *after* the rest of the user's code and *before* the event loop -is allowed to proceed. To acheive this, the JS call stack is allowed to +is allowed to proceed. To achieve this, the JS call stack is allowed to unwind then immediately execute the provided callback which allows a -person to make recursive calls to nextTick without reaching a +person to make recursive calls to `process.nextTick()` without reaching a `RangeError: Maximum call stack size exceeded from v8`. This philosophy can lead to some potentially problematic situations. @@ -343,21 +339,33 @@ var bar = 1; ``` The user defines `someAsyncApiCall()` to have an asynchronous signature, -actually operates synchronously. When it is called, the callback -provided to `someAsyncApiCall ()` is called in the same phase of the +but it actually operates synchronously. When it is called, the callback +provided to `someAsyncApiCall()` is called in the same phase of the event loop because `someAsyncApiCall()` doesn't actually do anything -asynchronously. As a result, the callback tries to reference `bar` but -it may not have that variable in scope yet because the script has not +asynchronously. As a result, the callback tries to reference `bar` even +though it may not have that variable in scope yet, because the script has not been able to run to completion. -By placing it in a `process.nextTick()`, the script still has the +By placing the callback in a `process.nextTick()`, the script still has the ability to run to completion, allowing all the variables, functions, -etc., to be initialized prior to the callback being called. It also has +etc., to be initialized prior to the callback being called. It also has the advantage of not allowing the event loop to continue. It may be -useful that the user be alerted to an error before the event loop is -allowed to continue. +useful for the user to be alerted to an error before the event loop is +allowed to continue. Here is the previous example using `process.nextTick()`: + +```js +function someAsyncApiCall (callback) { + process.nextTick(callback); +}; + +someAsyncApiCall(() => { + console.log('bar', bar); // 1 +}); + +var bar = 1; +``` -A real world example in node would be: +Here's another real world example: ```js const server = net.createServer(() => {}).listen(8080); @@ -367,10 +375,10 @@ server.on('listening', () => {}); When only a port is passed the port is bound immediately. So the `'listening'` callback could be called immediately. Problem is that the -`.on('listening')` will not have been set by that time. +`.on('listening')` will not have been set by that time. To get around this the `'listening'` event is queued in a `nextTick()` -to allow the script to run to completion. Which allows the user to set +to allow the script to run to completion. Which allows the user to set any event handlers they want. ## `process.nextTick()` vs `setImmediate()` @@ -389,7 +397,7 @@ percentage of the packages on npm. Every day more new modules are being added, which mean every day we wait, more potential breakages occur. While they are confusing, the names themselves won't change. -*We recommend developers use `setImmediate()` in all cases because its +*We recommend developers use `setImmediate()` in all cases because it's easier to reason about (and it leads to code that's compatible with a wider variety of environments, like browser JS.)* @@ -413,11 +421,11 @@ server.listen(8080); server.on('listening', function() { }); ``` -Say that listen() is run at the beginning of the event loop, but the +Say that `listen()` is run at the beginning of the event loop, but the listening callback is placed in a `setImmediate()`. Now, unless a -hostname is passed binding to the port will happen immediately. Now for -the event loop to proceed it must hit the `poll` phase, which means -there is a non-zero chance that a connection could have been received +hostname is passed binding to the port will happen immediately. Now for +the event loop to proceed it must hit the **poll** phase, which means +there is a non-zero chance that a connection could have been received allowing the connection event to be fired before the listening event. Another example is running a function constructor that was to, say, From b630be2309823679cbb01db2331da684fa7d0f31 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Wed, 29 Jun 2016 23:33:00 +0530 Subject: [PATCH 007/221] net: export isIPv4, isIPv6 directly from cares MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function objects encapsulating `isIPv4` and `isIPv6` are not necessary. They can be directly exposed from `cares`. PR-URL: https://github.com/nodejs/node/pull/7481 Reviewed-By: Colin Ihrig Reviewed-By: Michaël Zasso Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- lib/net.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/net.js b/lib/net.js index c1de0384ea42a9..f32af94fbf94e1 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1569,14 +1569,10 @@ Server.prototype.unref = function() { exports.isIP = cares.isIP; -exports.isIPv4 = function(input) { - return cares.isIPv4(input); -}; +exports.isIPv4 = cares.isIPv4; -exports.isIPv6 = function(input) { - return cares.isIPv6(input); -}; +exports.isIPv6 = cares.isIPv6; if (process.platform === 'win32') { From f7796f23e32de67f2376e0b08ef5875fddb323f7 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 9 Jul 2016 22:27:38 +0200 Subject: [PATCH 008/221] util: inspect boxed symbols like other primitives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inspect boxed symbol objects in the same way other boxed primitives are inspected. Fixes: https://github.com/nodejs/node/issues/7639 PR-URL: https://github.com/nodejs/node/pull/7641 Reviewed-By: Michaël Zasso Reviewed-By: Ben Noordhuis Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: Sakthipriyan Vairamani --- lib/util.js | 4 ++++ test/parallel/test-util-inspect.js | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/util.js b/lib/util.js index cd643c3120714a..8d9afe921f4292 100644 --- a/lib/util.js +++ b/lib/util.js @@ -314,6 +314,10 @@ function formatValue(ctx, value, recurseTimes) { formatted = formatPrimitiveNoColor(ctx, raw); return ctx.stylize('[String: ' + formatted + ']', 'string'); } + if (typeof raw === 'symbol') { + formatted = formatPrimitiveNoColor(ctx, raw); + return ctx.stylize('[Symbol: ' + formatted + ']', 'symbol'); + } if (typeof raw === 'number') { formatted = formatPrimitiveNoColor(ctx, raw); return ctx.stylize('[Number: ' + formatted + ']', 'number'); diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index e0264c34f7b685..98567027dd3519 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -333,6 +333,7 @@ test_lines({ // test boxed primitives output the correct values assert.equal(util.inspect(new String('test')), '[String: \'test\']'); +assert.equal(util.inspect(Object(Symbol('test'))), '[Symbol: Symbol(test)]'); assert.equal(util.inspect(new Boolean(false)), '[Boolean: false]'); assert.equal(util.inspect(new Boolean(true)), '[Boolean: true]'); assert.equal(util.inspect(new Number(0)), '[Number: 0]'); From ea36c61edafa76e000dab5d5fe482943591a8fbf Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sun, 26 Jun 2016 03:54:12 -0400 Subject: [PATCH 009/221] deps: `MASM.UseSafeExceptionHandlers` for OpenSSL Use `msvs_settings.MASM.UseSafeExceptionHandlers` when building OpenSSL assembly code on Windows. This option appends `/safeseh` to the list of assembler flags when building `.asm` files on Windows. Having this option in place, separate rules in `masm_compile.gypi` are no longer needed. Fix: #7426 PR-URL: https://github.com/nodejs/node/pull/7427 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Bert Belder --- deps/openssl/masm_compile.gypi | 44 ---------------------------------- deps/openssl/openssl.gyp | 7 +++++- 2 files changed, 6 insertions(+), 45 deletions(-) delete mode 100644 deps/openssl/masm_compile.gypi diff --git a/deps/openssl/masm_compile.gypi b/deps/openssl/masm_compile.gypi deleted file mode 100644 index c18e484f73c3b1..00000000000000 --- a/deps/openssl/masm_compile.gypi +++ /dev/null @@ -1,44 +0,0 @@ -{ - 'conditions': [ - ['target_arch=="ia32"', { - 'rules': [ - { - 'rule_name': 'Assemble', - 'extension': 'asm', - 'inputs': [], - 'outputs': [ - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - ], - 'action': [ - 'ml.exe', - '/Zi', - '/safeseh', - '/Fo', '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - '/c', '<(RULE_INPUT_PATH)', - ], - 'process_outputs_as_sources': 0, - 'message': 'Assembling <(RULE_INPUT_PATH) to <(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj.', - } - ], - }, 'target_arch=="x64"', { - 'rules': [ - { - 'rule_name': 'Assemble', - 'extension': 'asm', - 'inputs': [], - 'outputs': [ - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - ], - 'action': [ - 'ml64.exe', - '/Zi', - '/Fo', '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj', - '/c', '<(RULE_INPUT_PATH)', - ], - 'process_outputs_as_sources': 0, - 'message': 'Assembling <(RULE_INPUT_PATH) to <(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).obj.', - } - ], - }], - ], -} diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp index db57033d54e20e..b25efe60d5e8e6 100644 --- a/deps/openssl/openssl.gyp +++ b/deps/openssl/openssl.gyp @@ -121,7 +121,12 @@ }], # end of conditions of openssl_no_asm ['OS=="win"', { 'defines' : ['<@(openssl_defines_all_win)'], - 'includes': ['masm_compile.gypi',], + 'msvs_settings': { + 'MASM': { + # Use /safeseh, see commit: 01fa5ee + 'UseSafeExceptionHandlers': 'true', + }, + }, }, { 'defines' : ['<@(openssl_defines_all_non_win)'] }] From 9ddc615d0ede0fe2629cfc5c304b2ea76ae40e20 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sat, 16 Jul 2016 00:04:07 -0400 Subject: [PATCH 010/221] deps: no /safeseh for ml64.exe `ml64.exe` doesn't support `/safeseh` option. Do not attempt to use it if `target_arch=="x64"`. See: https://msdn.microsoft.com/en-us/library/s0ksfwcf.aspx PR-URL: https://github.com/nodejs/node/pull/7759 Reviewed-By: Ben Noordhuis Reviewed-By: Robert Jefe Lindstaedt Reviewed-By: Minwoo Jung --- deps/openssl/openssl.gyp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp index b25efe60d5e8e6..ae5c980e06a5ab 100644 --- a/deps/openssl/openssl.gyp +++ b/deps/openssl/openssl.gyp @@ -121,15 +121,17 @@ }], # end of conditions of openssl_no_asm ['OS=="win"', { 'defines' : ['<@(openssl_defines_all_win)'], + }, { + 'defines' : ['<@(openssl_defines_all_non_win)'] + }], + ['target_arch=="ia32" and OS=="win"', { 'msvs_settings': { 'MASM': { # Use /safeseh, see commit: 01fa5ee 'UseSafeExceptionHandlers': 'true', }, }, - }, { - 'defines' : ['<@(openssl_defines_all_non_win)'] - }] + }], ], 'include_dirs': ['<@(openssl_include_dirs)'], 'direct_dependent_settings': { From 4f3107190d132b9ae8f71c0b5d3d8ec545c731c4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 16 May 2016 14:56:30 -0700 Subject: [PATCH 011/221] doc: add `added:` info for dgram.*Membership() Since I was doing the necessary git archaeology anyway, I took the time to add YAML information to the docs about when `addMembership()` and `dropMembership()` first appeared in their current forms. PR-URL: https://github.com/nodejs/node/pull/6753 Ref: https://github.com/nodejs/node/issues/6578 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis --- doc/api/dgram.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/api/dgram.md b/doc/api/dgram.md index d47cfe22ebb735..cf5230ae700b8c 100644 --- a/doc/api/dgram.md +++ b/doc/api/dgram.md @@ -71,6 +71,9 @@ socket.on('message', (msg, rinfo) => { ``` ### socket.addMembership(multicastAddress[, multicastInterface]) + * `multicastAddress` {String} * `multicastInterface` {String}, Optional @@ -174,6 +177,9 @@ Close the underlying socket and stop listening for data on it. If a callback is provided, it is added as a listener for the [`'close'`][] event. ### socket.dropMembership(multicastAddress[, multicastInterface]) + * `multicastAddress` {String} * `multicastInterface` {String}, Optional From f6e332da2dbaa03906c93f98285d388885af13ed Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 8 Jul 2016 17:17:47 -0700 Subject: [PATCH 012/221] lib: implement consistent brace style This change is in preparation for lint-enforced brace style. PR-URL: https://github.com/nodejs/node/pull/8348 Reviewed-By: James M Snell Reviewed-By: Myles Borins --- lib/_stream_readable.js | 8 +++++--- lib/module.js | 3 +-- lib/net.js | 3 +-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index c9beafa9bee8e7..a6e5c5d46f05fe 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -802,9 +802,11 @@ Readable.prototype.wrap = function(stream) { // important when wrapping filters and duplexes. for (var i in stream) { if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }; }(i); + this[i] = function(method) { + return function() { + return stream[method].apply(stream, arguments); + }; + }(i); } } diff --git a/lib/module.js b/lib/module.js index 141ee18ddb9f8a..36e0b160c99038 100644 --- a/lib/module.js +++ b/lib/module.js @@ -488,8 +488,7 @@ Module._preloadModules = function(requests) { var parent = new Module('internal/preload', null); try { parent.paths = Module._nodeModulePaths(process.cwd()); - } - catch (e) { + } catch (e) { if (e.code !== 'ENOENT') { throw e; } diff --git a/lib/net.js b/lib/net.js index f32af94fbf94e1..4a71fada719049 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1155,8 +1155,7 @@ function createServerHandle(address, port, addressType, fd) { if (typeof fd === 'number' && fd >= 0) { try { handle = createHandle(fd); - } - catch (e) { + } catch (e) { // Not a fd we can listen on. This will trigger an error. debug('listen invalid fd=' + fd + ': ' + e.message); return uv.UV_EINVAL; From 337d2dd38179d573b2ee94e36859e418cd2b1e1f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 8 Jul 2016 17:21:25 -0700 Subject: [PATCH 013/221] test: implement consistent braces This change is in preparation for lint enforcement of brace style. PR-URL: https://github.com/nodejs/node/pull/8348 Reviewed-By: James M Snell Reviewed-By: Myles Borins --- .../test-dgram-broadcast-multi-process.js | 3 +-- .../test-child-process-fork-exec-path.js | 6 ++---- .../parallel/test-child-process-recv-handle.js | 6 ++---- test/parallel/test-cluster-basic.js | 4 +--- .../test-cluster-bind-privileged-port.js | 3 +-- test/parallel/test-cluster-bind-twice.js | 9 +++------ test/parallel/test-cluster-eaddrinuse.js | 6 ++---- test/parallel/test-cluster-listening-port.js | 3 +-- test/parallel/test-cluster-message.js | 4 +--- test/parallel/test-cluster-net-listen.js | 3 +-- .../test-cluster-shared-handle-bind-error.js | 3 +-- ...uster-shared-handle-bind-privileged-port.js | 3 +-- .../test-cluster-uncaught-exception.js | 6 ++---- test/parallel/test-cluster-worker-death.js | 3 +-- test/parallel/test-crypto-authenticated.js | 18 ++++++++---------- test/parallel/test-debugger-util-regression.js | 6 ++---- test/parallel/test-fs-open.js | 3 +-- test/parallel/test-fs-realpath.js | 3 +-- test/parallel/test-http-server-stale-close.js | 3 +-- test/parallel/test-next-tick-errors.js | 3 +-- test/parallel/test-process-argv-0.js | 3 +-- test/parallel/test-repl-domain.js | 3 +-- test/parallel/test-vm-context.js | 3 +-- test/pummel/test-fs-watch-file-slow.js | 3 +-- test/pummel/test-regress-GH-814.js | 6 ++---- 25 files changed, 40 insertions(+), 76 deletions(-) diff --git a/test/internet/test-dgram-broadcast-multi-process.js b/test/internet/test-dgram-broadcast-multi-process.js index 60bf46b5dc0b71..191967ce492be7 100644 --- a/test/internet/test-dgram-broadcast-multi-process.js +++ b/test/internet/test-dgram-broadcast-multi-process.js @@ -94,8 +94,7 @@ if (process.argv[2] !== 'child') { //all child process are listening, so start sending sendSocket.sendNext(); } - } - else if (msg.message) { + } else if (msg.message) { worker.messagesReceived.push(msg.message); if (worker.messagesReceived.length === messages.length) { diff --git a/test/parallel/test-child-process-fork-exec-path.js b/test/parallel/test-child-process-fork-exec-path.js index 35a730b0da6c42..ee62b2123f2e2f 100644 --- a/test/parallel/test-child-process-fork-exec-path.js +++ b/test/parallel/test-child-process-fork-exec-path.js @@ -12,13 +12,11 @@ if (process.env.FORK) { assert.equal(process.argv[0], copyPath); process.send(msg); process.exit(); -} -else { +} else { common.refreshTmpDir(); try { fs.unlinkSync(copyPath); - } - catch (e) { + } catch (e) { if (e.code !== 'ENOENT') throw e; } fs.writeFileSync(copyPath, fs.readFileSync(nodePath)); diff --git a/test/parallel/test-child-process-recv-handle.js b/test/parallel/test-child-process-recv-handle.js index 441740e2d483bd..6491dd032e0fcb 100644 --- a/test/parallel/test-child-process-recv-handle.js +++ b/test/parallel/test-child-process-recv-handle.js @@ -49,14 +49,12 @@ function worker() { if (n === 1) { assert.equal(msg, 'one'); assert.equal(handle, undefined); - } - else if (n === 2) { + } else if (n === 2) { assert.equal(msg, 'two'); assert.equal(typeof handle, 'object'); // Also matches null, therefore... assert.ok(handle); // also check that it's truthy. handle.close(); - } - else if (n === 3) { + } else if (n === 3) { assert.equal(msg, 'three'); assert.equal(handle, undefined); process.exit(); diff --git a/test/parallel/test-cluster-basic.js b/test/parallel/test-cluster-basic.js index 5a5efabbab821a..b48ae4de4643d8 100644 --- a/test/parallel/test-cluster-basic.js +++ b/test/parallel/test-cluster-basic.js @@ -18,9 +18,7 @@ if (cluster.isWorker) { http.Server(function() { }).listen(common.PORT, '127.0.0.1'); -} - -else if (cluster.isMaster) { +} else if (cluster.isMaster) { var checks = { cluster: { diff --git a/test/parallel/test-cluster-bind-privileged-port.js b/test/parallel/test-cluster-bind-privileged-port.js index 9f4ef8ee5e8b81..4aed915fa3524f 100644 --- a/test/parallel/test-cluster-bind-privileged-port.js +++ b/test/parallel/test-cluster-bind-privileged-port.js @@ -18,8 +18,7 @@ if (cluster.isMaster) { cluster.fork().on('exit', common.mustCall(function(exitCode) { assert.equal(exitCode, 0); })); -} -else { +} else { var s = net.createServer(common.fail); s.listen(42, common.fail.bind(null, 'listen should have failed')); s.on('error', common.mustCall(function(err) { diff --git a/test/parallel/test-cluster-bind-twice.js b/test/parallel/test-cluster-bind-twice.js index 6328f588b30b2a..8bd57a3fba43c8 100644 --- a/test/parallel/test-cluster-bind-twice.js +++ b/test/parallel/test-cluster-bind-twice.js @@ -64,8 +64,7 @@ if (!id) { process.on('exit', function() { assert(ok); }); -} -else if (id === 'one') { +} else if (id === 'one') { if (cluster.isMaster) return startWorker(); http.createServer(common.fail).listen(common.PORT, function() { @@ -75,8 +74,7 @@ else if (id === 'one') { process.on('message', function(m) { if (m === 'QUIT') process.exit(); }); -} -else if (id === 'two') { +} else if (id === 'two') { if (cluster.isMaster) return startWorker(); let ok = false; @@ -96,8 +94,7 @@ else if (id === 'two') { ok = true; }); }); -} -else { +} else { assert(0); // bad command line argument } diff --git a/test/parallel/test-cluster-eaddrinuse.js b/test/parallel/test-cluster-eaddrinuse.js index 7947fb9bab8e05..88b6de2dde4230 100644 --- a/test/parallel/test-cluster-eaddrinuse.js +++ b/test/parallel/test-cluster-eaddrinuse.js @@ -21,8 +21,7 @@ if (id === 'undefined') { }); }); }); -} -else if (id === 'worker') { +} else if (id === 'worker') { let server = net.createServer(common.fail); server.listen(common.PORT, common.fail); server.on('error', common.mustCall(function(e) { @@ -36,7 +35,6 @@ else if (id === 'worker') { })); }); })); -} -else { +} else { assert(0); // Bad argument. } diff --git a/test/parallel/test-cluster-listening-port.js b/test/parallel/test-cluster-listening-port.js index dc048c891c7b8c..810364a92648e4 100644 --- a/test/parallel/test-cluster-listening-port.js +++ b/test/parallel/test-cluster-listening-port.js @@ -19,7 +19,6 @@ if (cluster.isMaster) { // ensure that the 'listening' handler has been called assert(port); }); -} -else { +} else { net.createServer(common.fail).listen(0); } diff --git a/test/parallel/test-cluster-message.js b/test/parallel/test-cluster-message.js index 427c3058903d5d..cfe3bf801edeb7 100644 --- a/test/parallel/test-cluster-message.js +++ b/test/parallel/test-cluster-message.js @@ -40,9 +40,7 @@ if (cluster.isWorker) { }); server.listen(common.PORT, '127.0.0.1'); -} - -else if (cluster.isMaster) { +} else if (cluster.isMaster) { var checks = { global: { diff --git a/test/parallel/test-cluster-net-listen.js b/test/parallel/test-cluster-net-listen.js index c79d4cf1a27dad..81bd1641d3b761 100644 --- a/test/parallel/test-cluster-net-listen.js +++ b/test/parallel/test-cluster-net-listen.js @@ -14,8 +14,7 @@ if (cluster.isMaster) { process.on('exit', function() { assert.equal(worker, null); }); -} -else { +} else { // listen() without port should not trigger a libuv assert net.createServer(common.fail).listen(process.exit); } diff --git a/test/parallel/test-cluster-shared-handle-bind-error.js b/test/parallel/test-cluster-shared-handle-bind-error.js index 288b4b443a45bc..f5a08a1ed8481e 100644 --- a/test/parallel/test-cluster-shared-handle-bind-error.js +++ b/test/parallel/test-cluster-shared-handle-bind-error.js @@ -16,8 +16,7 @@ if (cluster.isMaster) { server.close(); })); }); -} -else { +} else { var s = net.createServer(common.fail); s.listen(common.PORT, common.fail.bind(null, 'listen should have failed')); s.on('error', common.mustCall(function(err) { diff --git a/test/parallel/test-cluster-shared-handle-bind-privileged-port.js b/test/parallel/test-cluster-shared-handle-bind-privileged-port.js index 90bab2febe41e7..9dc0e4ea773137 100644 --- a/test/parallel/test-cluster-shared-handle-bind-privileged-port.js +++ b/test/parallel/test-cluster-shared-handle-bind-privileged-port.js @@ -20,8 +20,7 @@ if (cluster.isMaster) { cluster.fork().on('exit', common.mustCall(function(exitCode) { assert.equal(exitCode, 0); })); -} -else { +} else { var s = net.createServer(common.fail); s.listen(42, common.fail.bind(null, 'listen should have failed')); s.on('error', common.mustCall(function(err) { diff --git a/test/parallel/test-cluster-uncaught-exception.js b/test/parallel/test-cluster-uncaught-exception.js index 04eac2e8ce63d4..1f04b71f01ac73 100644 --- a/test/parallel/test-cluster-uncaught-exception.js +++ b/test/parallel/test-cluster-uncaught-exception.js @@ -23,8 +23,7 @@ if (isTestRunner) { master.on('exit', function(code) { exitCode = code; }); -} -else if (cluster.isMaster) { +} else if (cluster.isMaster) { process.on('uncaughtException', function() { process.nextTick(function() { process.exit(MAGIC_EXIT_CODE); @@ -33,7 +32,6 @@ else if (cluster.isMaster) { cluster.fork(); throw new Error('kill master'); -} -else { // worker +} else { // worker process.exit(); } diff --git a/test/parallel/test-cluster-worker-death.js b/test/parallel/test-cluster-worker-death.js index 65da9865b0dd2d..aec745b8b71f6d 100644 --- a/test/parallel/test-cluster-worker-death.js +++ b/test/parallel/test-cluster-worker-death.js @@ -5,8 +5,7 @@ var cluster = require('cluster'); if (!cluster.isMaster) { process.exit(42); -} -else { +} else { var seenExit = 0; var seenDeath = 0; var worker = cluster.fork(); diff --git a/test/parallel/test-crypto-authenticated.js b/test/parallel/test-crypto-authenticated.js index ae1599c1fce2f3..db0de9e2338a07 100644 --- a/test/parallel/test-crypto-authenticated.js +++ b/test/parallel/test-crypto-authenticated.js @@ -362,8 +362,7 @@ for (var i in TEST_CASES) { (function() { if (!test.password) return; if (common.hasFipsCrypto) { - assert.throws(function() - { crypto.createCipher(test.algo, test.password); }, + assert.throws(() => { crypto.createCipher(test.algo, test.password); }, /not supported in FIPS mode/); } else { var encrypt = crypto.createCipher(test.algo, test.password); @@ -383,8 +382,7 @@ for (var i in TEST_CASES) { (function() { if (!test.password) return; if (common.hasFipsCrypto) { - assert.throws(function() - { crypto.createDecipher(test.algo, test.password); }, + assert.throws(() => { crypto.createDecipher(test.algo, test.password); }, /not supported in FIPS mode/); } else { var decrypt = crypto.createDecipher(test.algo, test.password); @@ -415,9 +413,9 @@ for (var i in TEST_CASES) { 'ipxp9a6i1Mb4USb4', '6fKjEjR3Vl30EUYC'); encrypt.update('blah', 'ascii'); encrypt.final(); - assert.throws(function() { encrypt.getAuthTag(); }, / state/); - assert.throws(function() { - encrypt.setAAD(new Buffer('123', 'ascii')); }, / state/); + assert.throws(() => { encrypt.getAuthTag(); }, / state/); + assert.throws(() => { encrypt.setAAD(Buffer.from('123', 'ascii')); }, + / state/); })(); (function() { @@ -431,9 +429,9 @@ for (var i in TEST_CASES) { (function() { // trying to set tag on encryption object: var encrypt = crypto.createCipheriv(test.algo, - new Buffer(test.key, 'hex'), new Buffer(test.iv, 'hex')); - assert.throws(function() { - encrypt.setAuthTag(new Buffer(test.tag, 'hex')); }, / state/); + Buffer.from(test.key, 'hex'), Buffer.from(test.iv, 'hex')); + assert.throws(() => { encrypt.setAuthTag(Buffer.from(test.tag, 'hex')); }, + / state/); })(); (function() { diff --git a/test/parallel/test-debugger-util-regression.js b/test/parallel/test-debugger-util-regression.js index cf32ec3fa668e9..5d2446c6bd40ad 100644 --- a/test/parallel/test-debugger-util-regression.js +++ b/test/parallel/test-debugger-util-regression.js @@ -38,12 +38,10 @@ proc.stdout.on('data', (data) => { stdout.includes('> 4') && nextCount < 4) { nextCount++; proc.stdin.write('n\n'); - } - else if (stdout.includes('{ a: \'b\' }')) { + } else if (stdout.includes('{ a: \'b\' }')) { clearTimeout(timer); proc.stdin.write('.exit\n'); - } - else if (stdout.includes('program terminated')) { + } else if (stdout.includes('program terminated')) { // Catch edge case present in v4.x // process will terminate after call to util.inspect common.fail('the program should not terminate'); diff --git a/test/parallel/test-fs-open.js b/test/parallel/test-fs-open.js index 0818f2b7f63d8f..e2c9d327cc731a 100644 --- a/test/parallel/test-fs-open.js +++ b/test/parallel/test-fs-open.js @@ -8,8 +8,7 @@ try { // should throw ENOENT, not EBADF // see https://github.com/joyent/node/pull/1228 fs.openSync('/path/to/file/that/does/not/exist', 'r'); -} -catch (e) { +} catch (e) { assert.equal(e.code, 'ENOENT'); caughtException = true; } diff --git a/test/parallel/test-fs-realpath.js b/test/parallel/test-fs-realpath.js index 46fbbd85877a81..e58cf7ba6ca52e 100644 --- a/test/parallel/test-fs-realpath.js +++ b/test/parallel/test-fs-realpath.js @@ -53,8 +53,7 @@ function asynctest(testBlock, args, callback, assertBlock) { if (assertBlock) { try { ignoreError = assertBlock.apply(assertBlock, arguments); - } - catch (e) { + } catch (e) { err = e; } } diff --git a/test/parallel/test-http-server-stale-close.js b/test/parallel/test-http-server-stale-close.js index 7430566dfd17e2..819f503de547e4 100644 --- a/test/parallel/test-http-server-stale-close.js +++ b/test/parallel/test-http-server-stale-close.js @@ -13,8 +13,7 @@ if (process.env.NODE_TEST_FORK_PORT) { }, process.exit); req.write('BAM'); req.end(); -} -else { +} else { var server = http.createServer(function(req, res) { res.writeHead(200, {'Content-Length': '42'}); req.pipe(res); diff --git a/test/parallel/test-next-tick-errors.js b/test/parallel/test-next-tick-errors.js index 5898762eeb5e5a..d3e6d5dcabf14d 100644 --- a/test/parallel/test-next-tick-errors.js +++ b/test/parallel/test-next-tick-errors.js @@ -24,8 +24,7 @@ process.on('uncaughtException', function() { if (!exceptionHandled) { exceptionHandled = true; order.push('B'); - } - else { + } else { // If we get here then the first process.nextTick got called twice order.push('OOPS!'); } diff --git a/test/parallel/test-process-argv-0.js b/test/parallel/test-process-argv-0.js index 3299ec74ea7dd4..c3aacb60fa5403 100644 --- a/test/parallel/test-process-argv-0.js +++ b/test/parallel/test-process-argv-0.js @@ -16,7 +16,6 @@ if (process.argv[2] !== 'child') { process.on('exit', function() { assert.equal(childArgv0, process.execPath); }); -} -else { +} else { process.stdout.write(process.argv[0]); } diff --git a/test/parallel/test-repl-domain.js b/test/parallel/test-repl-domain.js index adc8478beef4af..759eb61405bae4 100644 --- a/test/parallel/test-repl-domain.js +++ b/test/parallel/test-repl-domain.js @@ -11,8 +11,7 @@ putIn.write = function(data) { // give a false negative. Don't throw, just print and exit. if (data === 'OK\n') { console.log('ok'); - } - else { + } else { console.error(data); process.exit(1); } diff --git a/test/parallel/test-vm-context.js b/test/parallel/test-vm-context.js index 48bceb14593679..06a891b5579b87 100644 --- a/test/parallel/test-vm-context.js +++ b/test/parallel/test-vm-context.js @@ -32,8 +32,7 @@ console.error('test runInContext signature'); var gh1140Exception; try { vm.runInContext('throw new Error()', context, 'expected-filename.js'); -} -catch (e) { +} catch (e) { gh1140Exception = e; assert.ok(/expected-filename/.test(e.stack), 'expected appearance of filename in Error stack'); diff --git a/test/pummel/test-fs-watch-file-slow.js b/test/pummel/test-fs-watch-file-slow.js index cb3bc5e579b86b..508de487f6dc23 100644 --- a/test/pummel/test-fs-watch-file-slow.js +++ b/test/pummel/test-fs-watch-file-slow.js @@ -11,8 +11,7 @@ var nevents = 0; try { fs.unlinkSync(FILENAME); -} -catch (e) { +} catch (e) { // swallow } diff --git a/test/pummel/test-regress-GH-814.js b/test/pummel/test-regress-GH-814.js index 820903d68873e7..7375eb98c6bf84 100644 --- a/test/pummel/test-regress-GH-814.js +++ b/test/pummel/test-regress-GH-814.js @@ -44,15 +44,13 @@ var timeToQuit = Date.now() + 8e3; //Test during no more than this seconds. if (bufPool.push(nuBuf) > 100) { bufPool.length = 0; } - } - else { + } else { throw new Error("Buffer GC'ed test -> FAIL"); } if (Date.now() < timeToQuit) { process.nextTick(main); - } - else { + } else { tail.kill(); console.log("Buffer GC'ed test -> PASS (OK)"); } From d1a50b3ed22a427b949eedeee62b899ac27b9799 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 8 Jul 2016 17:12:24 -0700 Subject: [PATCH 014/221] tools: enforce JS brace style with linting Enable `brace-style` in ESLint. Ref: https://github.com/nodejs/node/pull/7094#discussion_r70149215 PR-URL: https://github.com/nodejs/node/pull/8348 Reviewed-By: James M Snell Reviewed-By: Myles Borins --- .eslintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc b/.eslintrc index ffb768217805b9..8003652a962c7f 100644 --- a/.eslintrc +++ b/.eslintrc @@ -54,6 +54,7 @@ rules: # Stylistic Issues # http://eslint.org/docs/rules/#stylistic-issues + brace-style: [2, "1tbs", {allowSingleLine: true}] comma-spacing: 2 eol-last: 2 indent: [2, 2, {SwitchCase: 1}] From 9f1b790f798cd0ccc602f68442f32c15b5e3a3be Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 24 Aug 2016 15:14:04 +0200 Subject: [PATCH 015/221] net: make holding the buffer in memory more robust Set the `req.buffer` property, which serves as a way of keeping a `Buffer` alive that is being written to a stream, on the C++ side instead of the JS side. This closes a hole where buffers that were temporarily created in order to write strings with uncommon encodings (e.g. `hex`) were passed to the native side without being set as `req.buffer`. Fixes: https://github.com/nodejs/node/issues/8251 PR-URL: https://github.com/nodejs/node/pull/8252 Reviewed-By: James M Snell Reviewed-By: Trevor Norris Reviewed-By: Ben Noordhuis --- lib/net.js | 1 - src/stream_base.cc | 1 + .../test-net-write-fully-async-buffer.js | 34 +++++++++++++++++++ .../test-net-write-fully-async-hex-string.js | 32 +++++++++++++++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 test/parallel/test-net-write-fully-async-buffer.js create mode 100644 test/parallel/test-net-write-fully-async-hex-string.js diff --git a/lib/net.js b/lib/net.js index 4a71fada719049..b58d6ecf89e454 100644 --- a/lib/net.js +++ b/lib/net.js @@ -685,7 +685,6 @@ Socket.prototype._writeGeneric = function(writev, data, encoding, cb) { } else { var enc; if (data instanceof Buffer) { - req.buffer = data; // Keep reference alive. enc = 'buffer'; } else { enc = encoding; diff --git a/src/stream_base.cc b/src/stream_base.cc index f9fed08d134c50..8573d1c1c8f34d 100644 --- a/src/stream_base.cc +++ b/src/stream_base.cc @@ -225,6 +225,7 @@ int StreamBase::WriteBuffer(const FunctionCallbackInfo& args) { err = DoWrite(req_wrap, bufs, count, nullptr); req_wrap_obj->Set(env->async(), True(env->isolate())); + req_wrap_obj->Set(env->buffer_string(), args[1]); if (err) req_wrap->Dispose(); diff --git a/test/parallel/test-net-write-fully-async-buffer.js b/test/parallel/test-net-write-fully-async-buffer.js new file mode 100644 index 00000000000000..04fd1231fdc322 --- /dev/null +++ b/test/parallel/test-net-write-fully-async-buffer.js @@ -0,0 +1,34 @@ +'use strict'; +// Flags: --expose-gc + +// Note: This is a variant of test-net-write-fully-async-hex-string.js. +// This always worked, but it seemed appropriate to add a test that checks the +// behaviour for Buffers, too. +const common = require('../common'); +const net = require('net'); + +const data = Buffer.alloc(1000000); + +const server = net.createServer(common.mustCall(function(conn) { + conn.resume(); +})).listen(0, common.mustCall(function() { + const conn = net.createConnection(this.address().port, common.mustCall(() => { + let count = 0; + + function writeLoop() { + if (count++ === 200) { + conn.destroy(); + server.close(); + return; + } + + while (conn.write(Buffer.from(data))); + global.gc(true); + // The buffer allocated above should still be alive. + } + + conn.on('drain', writeLoop); + + writeLoop(); + })); +})); diff --git a/test/parallel/test-net-write-fully-async-hex-string.js b/test/parallel/test-net-write-fully-async-hex-string.js new file mode 100644 index 00000000000000..f3115d8d2f795e --- /dev/null +++ b/test/parallel/test-net-write-fully-async-hex-string.js @@ -0,0 +1,32 @@ +'use strict'; +// Flags: --expose-gc + +// Regression test for https://github.com/nodejs/node/issues/8251. +const common = require('../common'); +const net = require('net'); + +const data = Buffer.alloc(1000000).toString('hex'); + +const server = net.createServer(common.mustCall(function(conn) { + conn.resume(); +})).listen(0, common.mustCall(function() { + const conn = net.createConnection(this.address().port, common.mustCall(() => { + let count = 0; + + function writeLoop() { + if (count++ === 20) { + conn.destroy(); + server.close(); + return; + } + + while (conn.write(data, 'hex')); + global.gc(true); + // The buffer allocated inside the .write() call should still be alive. + } + + conn.on('drain', writeLoop); + + writeLoop(); + })); +})); From a5b6c2cdd7b0ccf147e19af86e008aa4fe783fab Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 18 Jun 2016 01:39:05 +0200 Subject: [PATCH 016/221] src: use RAII for mutexes and condition variables We will be introducing many more critical sections in the upcoming multi-isolate changes, so let's make manual synchronization a thing of the past. PR-URL: https://github.com/nodejs/node/pull/7334 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Trevor Norris --- node.gyp | 1 + src/debug-agent.cc | 15 +--- src/debug-agent.h | 3 +- src/node.cc | 30 ++++---- src/node_crypto.cc | 16 ++-- src/node_mutex.h | 187 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 212 insertions(+), 40 deletions(-) create mode 100644 src/node_mutex.h diff --git a/node.gyp b/node.gyp index 37d2400dfd2d3a..b72133b98327d3 100644 --- a/node.gyp +++ b/node.gyp @@ -169,6 +169,7 @@ 'src/node_http_parser.h', 'src/node_internals.h', 'src/node_javascript.h', + 'src/node_mutex.h', 'src/node_root_certs.h', 'src/node_version.h', 'src/node_watchdog.h', diff --git a/src/debug-agent.cc b/src/debug-agent.cc index df6e75d07ff38c..e420e6e96c373d 100644 --- a/src/debug-agent.cc +++ b/src/debug-agent.cc @@ -55,13 +55,7 @@ Agent::Agent(Environment* env) : state_(kNone), parent_env_(env), child_env_(nullptr), dispatch_handler_(nullptr) { - int err; - - err = uv_sem_init(&start_sem_, 0); - CHECK_EQ(err, 0); - - err = uv_mutex_init(&message_mutex_); - CHECK_EQ(err, 0); + CHECK_EQ(0, uv_sem_init(&start_sem_, 0)); } @@ -69,7 +63,6 @@ Agent::~Agent() { Stop(); uv_sem_destroy(&start_sem_); - uv_mutex_destroy(&message_mutex_); while (AgentMessage* msg = messages_.PopFront()) delete msg; @@ -274,7 +267,7 @@ void Agent::ChildSignalCb(uv_async_t* signal) { HandleScope scope(isolate); Local api = PersistentToLocal(isolate, a->api_); - uv_mutex_lock(&a->message_mutex_); + Mutex::ScopedLock scoped_lock(a->message_mutex_); while (AgentMessage* msg = a->messages_.PopFront()) { // Time to close everything if (msg->data() == nullptr) { @@ -305,14 +298,12 @@ void Agent::ChildSignalCb(uv_async_t* signal) { argv); delete msg; } - uv_mutex_unlock(&a->message_mutex_); } void Agent::EnqueueMessage(AgentMessage* message) { - uv_mutex_lock(&message_mutex_); + Mutex::ScopedLock scoped_lock(message_mutex_); messages_.PushBack(message); - uv_mutex_unlock(&message_mutex_); uv_async_send(&child_signal_); } diff --git a/src/debug-agent.h b/src/debug-agent.h index 0c465b8e1b6996..a061e8b1f6df89 100644 --- a/src/debug-agent.h +++ b/src/debug-agent.h @@ -22,6 +22,7 @@ #ifndef SRC_DEBUG_AGENT_H_ #define SRC_DEBUG_AGENT_H_ +#include "node_mutex.h" #include "util.h" #include "util-inl.h" #include "uv.h" @@ -115,7 +116,7 @@ class Agent { bool wait_; uv_sem_t start_sem_; - uv_mutex_t message_mutex_; + node::Mutex message_mutex_; uv_async_t child_signal_; uv_thread_t thread_; diff --git a/src/node.cc b/src/node.cc index 9ef702d404c457..00ab762b4bbeef 100644 --- a/src/node.cc +++ b/src/node.cc @@ -159,7 +159,7 @@ static double prog_start_time; static bool debugger_running; static uv_async_t dispatch_debug_messages_async; -static uv_mutex_t node_isolate_mutex; +static Mutex node_isolate_mutex; static v8::Isolate* node_isolate; static v8::Platform* default_platform; @@ -3535,18 +3535,17 @@ static void EnableDebug(Environment* env) { // Called from an arbitrary thread. static void TryStartDebugger() { - uv_mutex_lock(&node_isolate_mutex); + Mutex::ScopedLock scoped_lock(node_isolate_mutex); if (auto isolate = node_isolate) { v8::Debug::DebugBreak(isolate); uv_async_send(&dispatch_debug_messages_async); } - uv_mutex_unlock(&node_isolate_mutex); } // Called from the main thread. static void DispatchDebugMessagesAsyncCallback(uv_async_t* handle) { - uv_mutex_lock(&node_isolate_mutex); + Mutex::ScopedLock scoped_lock(node_isolate_mutex); if (auto isolate = node_isolate) { if (debugger_running == false) { fprintf(stderr, "Starting debugger agent.\n"); @@ -3562,7 +3561,6 @@ static void DispatchDebugMessagesAsyncCallback(uv_async_t* handle) { Isolate::Scope isolate_scope(isolate); v8::Debug::ProcessDebugMessages(); } - uv_mutex_unlock(&node_isolate_mutex); } @@ -3888,8 +3886,6 @@ void Init(int* argc, // Make inherited handles noninheritable. uv_disable_stdio_inheritance(); - CHECK_EQ(0, uv_mutex_init(&node_isolate_mutex)); - // init async debug messages dispatching // Main thread uses uv_default_loop CHECK_EQ(0, uv_async_init(uv_default_loop(), @@ -4177,12 +4173,13 @@ static void StartNodeInstance(void* arg) { #endif Isolate* isolate = Isolate::New(params); - uv_mutex_lock(&node_isolate_mutex); - if (instance_data->is_main()) { - CHECK_EQ(node_isolate, nullptr); - node_isolate = isolate; + { + Mutex::ScopedLock scoped_lock(node_isolate_mutex); + if (instance_data->is_main()) { + CHECK_EQ(node_isolate, nullptr); + node_isolate = isolate; + } } - uv_mutex_unlock(&node_isolate_mutex); if (track_heap_objects) { isolate->GetHeapProfiler()->StartTrackingHeapObjects(true); @@ -4251,10 +4248,11 @@ static void StartNodeInstance(void* arg) { env = nullptr; } - uv_mutex_lock(&node_isolate_mutex); - if (node_isolate == isolate) - node_isolate = nullptr; - uv_mutex_unlock(&node_isolate_mutex); + { + Mutex::ScopedLock scoped_lock(node_isolate_mutex); + if (node_isolate == isolate) + node_isolate = nullptr; + } CHECK_NE(isolate, nullptr); isolate->Dispose(); diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 8bf17b55c02292..7ce79fda7008d3 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -114,7 +114,7 @@ static X509_NAME *cnnic_ev_name = d2i_X509_NAME(nullptr, &cnnic_ev_p, sizeof(CNNIC_EV_ROOT_CA_SUBJECT_DATA)-1); -static uv_mutex_t* locks; +static Mutex* mutexes; const char* const root_certs[] = { #include "node_root_certs.h" // NOLINT(build/include_order) @@ -172,14 +172,7 @@ static void crypto_threadid_cb(CRYPTO_THREADID* tid) { static void crypto_lock_init(void) { - int i, n; - - n = CRYPTO_num_locks(); - locks = new uv_mutex_t[n]; - - for (i = 0; i < n; i++) - if (uv_mutex_init(locks + i)) - ABORT(); + mutexes = new Mutex[CRYPTO_num_locks()]; } @@ -187,10 +180,11 @@ static void crypto_lock_cb(int mode, int n, const char* file, int line) { CHECK(!(mode & CRYPTO_LOCK) ^ !(mode & CRYPTO_UNLOCK)); CHECK(!(mode & CRYPTO_READ) ^ !(mode & CRYPTO_WRITE)); + auto mutex = &mutexes[n]; if (mode & CRYPTO_LOCK) - uv_mutex_lock(locks + n); + mutex->Lock(); else - uv_mutex_unlock(locks + n); + mutex->Unlock(); } diff --git a/src/node_mutex.h b/src/node_mutex.h new file mode 100644 index 00000000000000..9e1d31654f7dbf --- /dev/null +++ b/src/node_mutex.h @@ -0,0 +1,187 @@ +#ifndef SRC_NODE_MUTEX_H_ +#define SRC_NODE_MUTEX_H_ + +#include "util.h" +#include "uv.h" + +namespace node { + +template class ConditionVariableBase; +template class MutexBase; +struct LibuvMutexTraits; + +using ConditionVariable = ConditionVariableBase; +using Mutex = MutexBase; + +template +class MutexBase { + public: + inline MutexBase(); + inline ~MutexBase(); + inline void Lock(); + inline void Unlock(); + + class ScopedLock; + class ScopedUnlock; + + class ScopedLock { + public: + inline explicit ScopedLock(const MutexBase& mutex); + inline explicit ScopedLock(const ScopedUnlock& scoped_unlock); + inline ~ScopedLock(); + + private: + template friend class ConditionVariableBase; + friend class ScopedUnlock; + const MutexBase& mutex_; + DISALLOW_COPY_AND_ASSIGN(ScopedLock); + }; + + class ScopedUnlock { + public: + inline explicit ScopedUnlock(const ScopedLock& scoped_lock); + inline ~ScopedUnlock(); + + private: + friend class ScopedLock; + const MutexBase& mutex_; + DISALLOW_COPY_AND_ASSIGN(ScopedUnlock); + }; + + private: + template friend class ConditionVariableBase; + mutable typename Traits::MutexT mutex_; + DISALLOW_COPY_AND_ASSIGN(MutexBase); +}; + +template +class ConditionVariableBase { + public: + using ScopedLock = typename MutexBase::ScopedLock; + + inline ConditionVariableBase(); + inline ~ConditionVariableBase(); + inline void Broadcast(const ScopedLock&); + inline void Signal(const ScopedLock&); + inline void Wait(const ScopedLock& scoped_lock); + + private: + typename Traits::CondT cond_; + DISALLOW_COPY_AND_ASSIGN(ConditionVariableBase); +}; + +struct LibuvMutexTraits { + using CondT = uv_cond_t; + using MutexT = uv_mutex_t; + + static inline int cond_init(CondT* cond) { + return uv_cond_init(cond); + } + + static inline int mutex_init(MutexT* mutex) { + return uv_mutex_init(mutex); + } + + static inline void cond_broadcast(CondT* cond) { + uv_cond_broadcast(cond); + } + + static inline void cond_destroy(CondT* cond) { + uv_cond_destroy(cond); + } + + static inline void cond_signal(CondT* cond) { + uv_cond_signal(cond); + } + + static inline void cond_wait(CondT* cond, MutexT* mutex) { + uv_cond_wait(cond, mutex); + } + + static inline void mutex_destroy(MutexT* mutex) { + uv_mutex_destroy(mutex); + } + + static inline void mutex_lock(MutexT* mutex) { + uv_mutex_lock(mutex); + } + + static inline void mutex_unlock(MutexT* mutex) { + uv_mutex_unlock(mutex); + } +}; + +template +ConditionVariableBase::ConditionVariableBase() { + CHECK_EQ(0, Traits::cond_init(&cond_)); +} + +template +ConditionVariableBase::~ConditionVariableBase() { + Traits::cond_destroy(&cond_); +} + +template +void ConditionVariableBase::Broadcast(const ScopedLock&) { + Traits::cond_broadcast(&cond_); +} + +template +void ConditionVariableBase::Signal(const ScopedLock&) { + Traits::cond_signal(&cond_); +} + +template +void ConditionVariableBase::Wait(const ScopedLock& scoped_lock) { + Traits::cond_wait(&cond_, &scoped_lock.mutex_.mutex_); +} + +template +MutexBase::MutexBase() { + CHECK_EQ(0, Traits::mutex_init(&mutex_)); +} + +template +MutexBase::~MutexBase() { + Traits::mutex_destroy(&mutex_); +} + +template +void MutexBase::Lock() { + Traits::mutex_lock(&mutex_); +} + +template +void MutexBase::Unlock() { + Traits::mutex_unlock(&mutex_); +} + +template +MutexBase::ScopedLock::ScopedLock(const MutexBase& mutex) + : mutex_(mutex) { + Traits::mutex_lock(&mutex_.mutex_); +} + +template +MutexBase::ScopedLock::ScopedLock(const ScopedUnlock& scoped_unlock) + : MutexBase(scoped_unlock.mutex_) {} + +template +MutexBase::ScopedLock::~ScopedLock() { + Traits::mutex_unlock(&mutex_.mutex_); +} + +template +MutexBase::ScopedUnlock::ScopedUnlock(const ScopedLock& scoped_lock) + : mutex_(scoped_lock.mutex_) { + Traits::mutex_unlock(&mutex_.mutex_); +} + +template +MutexBase::ScopedUnlock::~ScopedUnlock() { + Traits::mutex_lock(&mutex_.mutex_); +} + +} // namespace node + +#endif // SRC_NODE_MUTEX_H_ From 3f4a5fe61e9652265b55876e76ae899296135f7b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 10 Jul 2016 14:01:00 -0700 Subject: [PATCH 017/221] tools: increase lint coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend linting to tools/license2rtf.js and any other JS that gets added to the `tools` directory by default. This incidentally simplifies lint invocation. Ref: https://github.com/nodejs/node/pull/8349 PR-URL: https://github.com/nodejs/node/pull/7647 Reviewed-By: Michaël Zasso Reviewed-By: Ben Noordhuis Reviewed-By: Roman Reiss Reviewed-By: Сковорода Никита Андреевич --- .eslintignore | 4 +- Makefile | 4 +- tools/license2rtf.js | 100 +++++++++++++++++++++---------------------- vcbuild.bat | 3 +- 4 files changed, 55 insertions(+), 56 deletions(-) diff --git a/.eslintignore b/.eslintignore index 9b5c5fccb643e4..6791fbf312a08b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,7 +2,7 @@ lib/internal/v8_prof_polyfill.js lib/punycode.js test/addons/??_*/ test/fixtures -test/**/node_modules test/disabled test/tmp*/ -tools/doc/node_modules +tools/eslint +node_modules diff --git a/Makefile b/Makefile index fae09589f37d22..817fe4fae70450 100644 --- a/Makefile +++ b/Makefile @@ -644,8 +644,8 @@ bench-idle: $(NODE) benchmark/idle_clients.js & jslint: - $(NODE) tools/eslint/bin/eslint.js benchmark lib src test tools/doc \ - tools/eslint-rules --rulesdir tools/eslint-rules + $(NODE) tools/eslint/bin/eslint.js benchmark lib src test tools \ + --rulesdir tools/eslint-rules CPPLINT_EXCLUDE ?= CPPLINT_EXCLUDE += src/node_root_certs.h diff --git a/tools/license2rtf.js b/tools/license2rtf.js index f5a75a176dd6bb..0b66cc10f322f9 100644 --- a/tools/license2rtf.js +++ b/tools/license2rtf.js @@ -1,15 +1,16 @@ +'use strict'; -var assert = require('assert'), - Stream = require('stream'), - inherits = require('util').inherits; +const assert = require('assert'); +const Stream = require('stream'); +const inherits = require('util').inherits; /* * This filter consumes a stream of characters and emits one string per line. */ function LineSplitter() { - var self = this, - buffer = ""; + const self = this; + var buffer = ''; Stream.call(this); this.writable = true; @@ -38,33 +39,31 @@ inherits(LineSplitter, Stream); * This filter consumes lines and emits paragraph objects. */ function ParagraphParser() { - var self = this, - block_is_license_block = false, - block_has_c_style_comment, - is_first_line_in_paragraph, - paragraph_line_indent, - paragraph; - - Stream.call(this); - this.writable = true; - - resetBlock(false); - - this.write = function(data) { - parseLine(data + ''); - return true; - }; - - this.end = function(data) { - if (data) { - parseLine(data + ''); - } - flushParagraph(); - self.emit('end'); - }; + const self = this; + var block_is_license_block = false; + var block_has_c_style_comment; + var paragraph_line_indent; + var paragraph; + + Stream.call(this); + this.writable = true; + + resetBlock(false); + + this.write = function(data) { + parseLine(data + ''); + return true; + }; + + this.end = function(data) { + if (data) { + parseLine(data + ''); + } + flushParagraph(); + self.emit('end'); + }; function resetParagraph() { - is_first_line_in_paragraph = true; paragraph_line_indent = -1; paragraph = { @@ -165,8 +164,6 @@ function ParagraphParser() { if (line) paragraph.lines.push(line); - - is_first_line_in_paragraph = false; } } inherits(ParagraphParser, Stream); @@ -184,16 +181,16 @@ function Unwrapper() { this.writable = true; this.write = function(paragraph) { - var lines = paragraph.lines, - break_after = [], - i; + var lines = paragraph.lines; + var break_after = []; + var i; for (i = 0; i < lines.length - 1; i++) { var line = lines[i]; // When a line is really short, the line was probably kept separate for a // reason. - if (line.length < 50) { + if (line.length < 50) { // If the first word on the next line really didn't fit after the line, // it probably was just ordinary wrapping after all. var next_first_word_length = lines[i + 1].replace(/\s.*$/, '').length; @@ -203,7 +200,7 @@ function Unwrapper() { } } - for (i = 0; i < lines.length - 1; ) { + for (i = 0; i < lines.length - 1;) { if (!break_after[i]) { lines[i] += ' ' + lines.splice(i + 1, 1)[0]; } else { @@ -233,8 +230,8 @@ inherits(Unwrapper, Stream); * This filter generates an rtf document from a stream of paragraph objects. */ function RtfGenerator() { - var self = this, - did_write_anything = false; + const self = this; + var did_write_anything = false; Stream.call(this); this.writable = true; @@ -245,11 +242,11 @@ function RtfGenerator() { did_write_anything = true; } - var li = paragraph.li, - level = paragraph.level + (li ? 1 : 0), - lic = paragraph.in_license_block; + var li = paragraph.li; + var level = paragraph.level + (li ? 1 : 0); + var lic = paragraph.in_license_block; - var rtf = "\\pard"; + var rtf = '\\pard'; rtf += '\\sa150\\sl300\\slmult1'; if (level > 0) rtf += '\\li' + (level * 240); @@ -290,18 +287,19 @@ function RtfGenerator() { function rtfEscape(string) { return string .replace(/[\\\{\}]/g, function(m) { - return '\\' + m; + return '\\' + m; }) .replace(/\t/g, function() { return '\\tab '; }) + // eslint-disable-next-line no-control-regex .replace(/[\x00-\x1f\x7f-\xff]/g, function(m) { return '\\\'' + toHex(m.charCodeAt(0), 2); }) .replace(/\ufeff/g, '') .replace(/[\u0100-\uffff]/g, function(m) { return '\\u' + toHex(m.charCodeAt(0), 4) + '?'; - }); + }); } function emitHeader() { @@ -317,12 +315,12 @@ function RtfGenerator() { inherits(RtfGenerator, Stream); -var stdin = process.stdin, - stdout = process.stdout, - line_splitter = new LineSplitter(), - paragraph_parser = new ParagraphParser(), - unwrapper = new Unwrapper(), - rtf_generator = new RtfGenerator(); +const stdin = process.stdin; +const stdout = process.stdout; +const line_splitter = new LineSplitter(); +const paragraph_parser = new ParagraphParser(); +const unwrapper = new Unwrapper(); +const rtf_generator = new RtfGenerator(); stdin.setEncoding('utf-8'); stdin.resume(); diff --git a/vcbuild.bat b/vcbuild.bat index 12221606853232..2f25e9a563125a 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -342,7 +342,8 @@ goto jslint :jslint if not defined jslint goto exit echo running jslint -%config%\node tools\eslint\bin\eslint.js benchmark lib src test tools\doc tools\eslint-rules --rulesdir tools\eslint-rules +<<<<<<< d1e2db2a13ddc9fb2f8cd1400b52656910d7374f +%config%\node tools\eslint\bin\eslint.js benchmark lib src test tools --rulesdir tools\eslint-rules goto exit :create-msvs-files-failed From e46d1e026e7afcffbf51069e2cfeefc8c614b298 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 10 Aug 2016 15:22:01 -0700 Subject: [PATCH 018/221] doc: add POST_STATUS_TO_PR info to onboarding doc `POST_STATUS_TO_PR` previously did not work. Now it works. Update the onboarding documentation accordingly. PR-URL: https://github.com/nodejs/node/pull/8059 Reviewed-By: Anna Henningsen --- doc/onboarding.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/onboarding.md b/doc/onboarding.md index 99fbc61935c84d..32e00a36ea3b7e 100644 --- a/doc/onboarding.md +++ b/doc/onboarding.md @@ -110,8 +110,7 @@ Ensure everyone is added to https://github.com/orgs/nodejs/teams/collaborators * To start CI testing from this screen, you need to fill in two elements on the form: * The `CERTIFY_SAFE` box should be checked. By checking it, you are indicating that you have reviewed the code you are about to test and you are confident that it does not contain any malicious code. (We don't want people hijacking our CI hosts to attack other hosts on the internet, for example!) * The `PR_ID` box should be filled in with the number identifying the pull request containing the code you wish to test. For example, if the URL for the pull request is https://github.com/nodejs/node/issues/7006, then put `7006` in the `PR_ID`. - * The remaining elements on the form are typically unchanged. - * There is a checkbox for `POST_STATUS_TO_PR`. At the time of this writing, that checkbox does not do anything, but that is likely to change soon. Until that functionality is working, you will want to go back to the PR you are testing and paste `CI: ` into a comment on the pull request. + * The remaining elements on the form are typically unchanged with the exception of `POST_STATUS_TO_PR`. Check that if you want a CI status indicator to be automatically inserted into the PR. ### process for getting code in: From d6c2e383a221a85ea9f051e63190bfb8589533d2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 10 Aug 2016 15:51:14 -0700 Subject: [PATCH 019/221] doc: minor updates to onboarding doc PR-URL: https://github.com/nodejs/node/pull/8060 Reviewed-By: Anna Henningsen Reviewed-By: Franziska Hinkelmann Reviewed-By: James M Snell --- doc/onboarding.md | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/doc/onboarding.md b/doc/onboarding.md index 32e00a36ea3b7e..a53fe769090b35 100644 --- a/doc/onboarding.md +++ b/doc/onboarding.md @@ -1,14 +1,12 @@ -## pre-setup +# Onboarding -Ensure everyone is added to https://github.com/orgs/nodejs/teams/collaborators +This document is an outline of the things we tell new Collaborators at their +onboarding session. +* Prior to the onboarding session, add the new Collaborators to +[the Collaborators team](https://github.com/orgs/nodejs/teams/collaborators). -## onboarding to nodejs - -### intros - - -### **thank you** for doing this +## **thank you** for doing this * going to cover four things: * local setup @@ -16,8 +14,7 @@ Ensure everyone is added to https://github.com/orgs/nodejs/teams/collaborators * issues, labels, and reviewing code * merging code - -### setup: +## setup * notifications setup * use https://github.com/notifications or set up email @@ -34,7 +31,7 @@ Ensure everyone is added to https://github.com/orgs/nodejs/teams/collaborators * `#node-dev` on `chat.freenode.net` is the best place to interact with the CTC / other collaborators -### a little deeper about the project +## a little deeper about the project * collaborators are effectively part owners * the project has the goals of its contributors @@ -46,7 +43,7 @@ Ensure everyone is added to https://github.com/orgs/nodejs/teams/collaborators * generally: try to be nice to people -### managing the issue tracker +## managing the issue tracker * you have (mostly) free rein – don't hesitate to close an issue if you are confident that it should be closed * this will come more naturally over time @@ -113,7 +110,7 @@ Ensure everyone is added to https://github.com/orgs/nodejs/teams/collaborators * The remaining elements on the form are typically unchanged with the exception of `POST_STATUS_TO_PR`. Check that if you want a CI status indicator to be automatically inserted into the PR. -### process for getting code in: +## process for getting code in * the collaborator guide is a great resource: https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md#technical-howto @@ -145,7 +142,7 @@ Ensure everyone is added to https://github.com/orgs/nodejs/teams/collaborators * Info on PRs that don't like to apply found under [**"If `git am` fails"**](./onboarding-extras.md#if-git-am-fails). -### Landing PRs +## Landing PRs * Please never use GitHub's green "Merge Pull Request" button. * If you do, please force-push removing the merge. @@ -173,7 +170,7 @@ Landing a PR * close the original PR with "Landed in ``". -### exercise: make PRs adding yourselves to the README. +## exercise: make PRs adding yourselves to the README * Example: https://github.com/nodejs/node/commit/7b09aade8468e1c930f36b9c81e6ac2ed5bc8732 * to see full URL: `git log 7b09aade8468e1c930f36b9c81e6ac2ed5bc8732 -1` @@ -183,7 +180,7 @@ Landing a PR * Make sure to added the `PR-URL: `! -### final notes: +## final notes * don't worry about making mistakes: everybody makes them, there's a lot to internalize and that takes time (and we recognize that!) * very few (no?) mistakes are unrecoverable From 8fec02ffb8edc6396d552216d78b59e6ebbd8e07 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Sat, 2 Jul 2016 20:12:08 +0200 Subject: [PATCH 020/221] doc: delete non-existing zlib constants Some constants in the zlib docs are not in the actual code: zlib.Z_BINARY zlib.Z_TEXT zlib.Z_ASCII zlib.Z_UNKNOWN Also handled in https://github.com/nodejs/node/pull/7203, but marked as semver-major, so will not land in v6.x. Fixes: https://github.com/nodejs/node/issues/7204 PR-URL: https://github.com/nodejs/node/pull/7520 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Jeremiah Senkpiel --- doc/api/zlib.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/doc/api/zlib.md b/doc/api/zlib.md index 55dc6ebb348108..408cade112d6bf 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -239,13 +239,6 @@ Compression strategy. * `zlib.Z_FIXED` * `zlib.Z_DEFAULT_STRATEGY` -Possible values of the data_type field. - -* `zlib.Z_BINARY` -* `zlib.Z_TEXT` -* `zlib.Z_ASCII` -* `zlib.Z_UNKNOWN` - The deflate compression method (the only one supported in this version). * `zlib.Z_DEFLATED` From fdff642e0bf30f8731541d1caa7600d5d7b3255e Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Tue, 12 Jul 2016 06:56:08 -0500 Subject: [PATCH 021/221] doc: fix util.deprecate() example The arguments object is not created for arrow functions so the example was incorrect. PR-URL: https://github.com/nodejs/node/pull/7674 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig --- doc/api/util.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/util.md b/doc/api/util.md index 3f9165f02110af..d3d26dbb946774 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -58,7 +58,7 @@ Marks that a method should not be used any more. ```js const util = require('util'); -exports.puts = util.deprecate(() => { +exports.puts = util.deprecate(function() { for (var i = 0, len = arguments.length; i < len; ++i) { process.stdout.write(arguments[i] + '\n'); } From 590c52a3095c1967361d1dadfc6a14a756c51fae Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 13 Jul 2016 15:30:08 -0700 Subject: [PATCH 022/221] doc: update CTC governance information MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update some outdated material. Provide some minor fixes. Wrap to 80 characters. PR-URL: https://github.com/nodejs/node/pull/7719 Reviewed-By: Rod Vagg Reviewed-By: Ben Noordhuis Reviewed-By: Jeremiah Senkpiel Reviewed-By: Michael Dawson Reviewed-By: Julien Gilli Reviewed-By: Colin Ihrig Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Evan Lucas Reviewed-By: Fedor Indutny Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Trevor Norris --- GOVERNANCE.md | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 06cec91e7db8b6..34b2f5fd1ec936 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -2,8 +2,8 @@ ## Core Technical Committee -The Node.js project is jointly governed by a Core Technical Committee (CTC) -which is responsible for high-level guidance of the project. +The Node.js project is governed by a Core Technical Committee (CTC) which is +responsible for high-level guidance of the project. The CTC has final authority over this project including: @@ -14,11 +14,6 @@ The CTC has final authority over this project including: * Conduct guidelines * Maintaining the list of additional Collaborators -Initial membership invitations to the CTC were given to individuals who -had been active contributors to Node.js, and who have significant -experience with the management of the Node.js project. Membership is -expected to evolve over time according to the needs of the project. - For the current list of CTC members, see the project [README.md](./README.md#current-project-team-members). @@ -46,8 +41,8 @@ responsibility for the change. In the case of pull requests proposed by an existing Collaborator, an additional Collaborator is required for sign-off. Consensus should be sought if additional Collaborators participate and there is disagreement around a particular -modification. See [Consensus Seeking Process](#consensus-seeking-process) below for further detail -on the consensus model used for governance. +modification. See [Consensus Seeking Process](#consensus-seeking-process) below +for further detail on the consensus model used for governance. Collaborators may opt to elevate significant or controversial modifications, or modifications that have not found consensus to the @@ -87,9 +82,8 @@ members affiliated with the over-represented employer(s). ## CTC Meetings -The CTC meets weekly on a Google Hangout On Air. The meeting is run by -a designated moderator approved by the CTC. Each meeting should be -published to YouTube. +The CTC meets weekly in a voice conference call. The meeting is run by a +designated moderator approved by the CTC. Each meeting is streamed on YouTube. Items are added to the CTC agenda which are considered contentious or are modifications of governance, contribution policy, CTC membership, @@ -100,20 +94,20 @@ That should happen continuously on GitHub and be handled by the larger group of Collaborators. Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, +the next meeting's agenda by logging a GitHub issue. Any Collaborator, CTC member or the moderator can add the item to the agenda by adding the ***ctc-agenda*** tag to the issue. -Prior to each CTC meeting, the moderator will share the Agenda with -members of the CTC. CTC members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the CTC -cannot veto or remove items. +Prior to each CTC meeting, the moderator will share the agenda with +members of the CTC. CTC members can also add items to the agenda at the +beginning of each meeting. The moderator and the CTC cannot veto or remove +items. The CTC may invite persons or representatives from certain projects to participate in a non-voting capacity. -The moderator is responsible for summarizing the discussion of each -agenda item and sending it as a pull request after the meeting. +The moderator is responsible for summarizing the discussion of each agenda item +and sending it as a pull request after the meeting. ## Consensus Seeking Process @@ -121,11 +115,10 @@ The CTC follows a [Consensus Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) decision making model. -When an agenda item has appeared to reach a consensus, the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. +When an agenda item has appeared to reach a consensus, the moderator will ask +"Does anyone object?" as a final call for dissent from the consensus. -If an agenda item cannot reach a consensus, a CTC member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be approved by a majority of the CTC -or else the discussion will continue. Simple majority wins. +If an agenda item cannot reach a consensus, a CTC member can call for either a +closing vote or a vote to table the issue to the next meeting. The call for a +vote must be approved by a simple majority of the CTC or else the discussion +will continue. From 506e36706270221ed257f19621e31fe056867b87 Mon Sep 17 00:00:00 2001 From: Andras Date: Tue, 19 Jul 2016 19:40:12 -0400 Subject: [PATCH 023/221] doc: update readme with andrasq as a collaborator Reviewed-By: Rich Trott Reviewed-By: Evan Lucas PR-URL: https://github.com/nodejs/node/pull/7801 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 10aadde17ba7d5..97b09b37391ee5 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,7 @@ information about the governance of the Node.js project, see ### Collaborators * [addaleax](https://github.com/addaleax) - **Anna Henningsen** <anna@addaleax.net> +* [andrasq](https://github.com/andrasq) - **Andras** <andras@kinvey.com> * [AndreasMadsen](https://github.com/AndreasMadsen) - **Andreas Madsen** <amwebdk@gmail.com> * [bengl](https://github.com/bengl) - **Bryan English** <bryan@bryanenglish.com> * [benjamingr](https://github.com/benjamingr) - **Benjamin Gruenbaum** <benjamingr@gmail.com> From 26f5168c02dc5a8ef5a81a4a96e8b6b250397ef4 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Wed, 20 Jul 2016 08:24:57 -0700 Subject: [PATCH 024/221] doc: clarify that the node.js irc channel is not under tsc oversight MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There has been some question about whether the #node.js irc channel falls under the TSC oversight or not. See: https://github.com/nodejs/node/issues/7746 This clarifies that the #node.js irc channel is a community provided resource that is not currently directly under the oversight of the TSC/CTC. PR-URL: https://github.com/nodejs/node/pull/7810 Reviewed-By: Bryan Hughes Reviewed-By: Julien Gilli Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Rich Trott --- README.md | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 97b09b37391ee5..76ef2b04805907 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,21 @@ If you need help using or installing Node.js, please use the ## Resources for Newcomers -* [Website](https://nodejs.org/en/) -* [Contributing to the project](./CONTRIBUTING.md) -* IRC (general questions): [#node.js on chat.freenode.net](https://webchat.freenode.net?channels=node.js&uio=d4) -* IRC (node core development): [#node-dev on chat.freenode.net](https://webchat.freenode.net?channels=node-dev&uio=d4) +### Official Resources + +* [Website][] +* [Contributing to the project][] +* IRC (node core development): [#node-dev on chat.freenode.net][] + +### Unofficial Resources + +* IRC (general questions): [#node.js on chat.freenode.net][]. Please see +http://nodeirc.info/ for more information regarding the `#node.js` IRC channel. + +*Please note that unofficial resources are neither managed by (nor necessarily +endorsed by) the Node.js TSC/CTC. Specifically, such resources are not +currently covered by the [Node.js Moderation Policy][] and the selection and +actions of resource operators/moderators are not subject to TSC/CTC oversight.* ## Release Types @@ -265,3 +276,9 @@ keys: * **Isaac Z. Schlueter** <i@izs.me> `93C7E9E91B49E432C2F75674B0A78B0A6C481CF6` * **Julien Gilli** <jgilli@fastmail.fm> `114F43EE0176B71C7BC219DD50A3051F888C628D` * **Timothy J Fontaine** <tjfontaine@gmail.com> `7937DFD2AB06298B2293C3187D33FF9D0246406D` + +[Website]: https://nodejs.org/en/ +[Contributing to the project]: CONTRIBUTING.md +[Node.js Moderation Policy]: https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md +[#node.js on chat.freenode.net]: https://webchat.freenode.net?channels=node.js&uio=d4 +[#node-dev on chat.freenode.net]: https://webchat.freenode.net?channels=node-dev&uio=d4 From b01854dd9dd572b7e7e68bfa6fb3d994b115704d Mon Sep 17 00:00:00 2001 From: Prince J Wesley Date: Tue, 26 Jul 2016 10:20:29 +0530 Subject: [PATCH 025/221] doc: add princejwesley to collaborators PR-URL: https://github.com/nodejs/node/pull/7877 Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 76ef2b04805907..3aabcbcbed97be 100644 --- a/README.md +++ b/README.md @@ -211,6 +211,7 @@ information about the governance of the Node.js project, see * [petkaantonov](https://github.com/petkaantonov) - **Petka Antonov** <petka_antonov@hotmail.com> * [phillipj](https://github.com/phillipj) - **Phillip Johnsen** <johphi@gmail.com> * [pmq20](https://github.com/pmq20) - **Minqi Pan** <pmq2001@gmail.com> +* [princejwesley](https://github.com/princejwesley) - **Prince John Wesley** <princejohnwesley@gmail.com> * [qard](https://github.com/qard) - **Stephen Belanger** <admin@stephenbelanger.com> * [rlidwka](https://github.com/rlidwka) - **Alex Kocharin** <alex@kocharin.ru> * [rmg](https://github.com/rmg) - **Ryan Graham** <r.m.graham@gmail.com> From d759d4e0a6ba938cb7bbf9a1f02db33ce2290884 Mon Sep 17 00:00:00 2001 From: Bethany N Griggs Date: Mon, 18 Jul 2016 16:58:05 +0100 Subject: [PATCH 026/221] doc: remove platform assumption from CONTRIBUTING MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Specify that the ‘make test’ commands are Unix/OS X specific. - Link to BUILDING.md for other platform commands. Fixes: https://github.com/nodejs/node/issues/7646 PR-URL: https://github.com/nodejs/node/pull/7783 Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen --- CONTRIBUTING.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3ca53699f9d03..d251f8d6679ac7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -136,7 +136,6 @@ $ git fetch upstream $ git rebase upstream/master ``` - ### Step 5: Test Bug fixes and features **should come with tests**. Add your tests in the @@ -144,15 +143,28 @@ Bug fixes and features **should come with tests**. Add your tests in the project, see this [guide](./doc/guides/writing_tests.md). Looking at other tests to see how they should be structured can also help. +To run the tests on Unix / OS X: + ```text $ ./configure && make -j8 test ``` +Windows: + +```text +> vcbuild test +``` + +(See the [BUILDING.md](./BUILDING.md) for more details.) + Make sure the linter is happy and that all tests pass. Please, do not submit patches that fail either check. -Running `make test` will run the linter as well unless one or more tests fail. -If you want to run the linter without running tests, use `make lint`. +Running `make test`/`vcbuild test` will run the linter as well unless one or +more tests fail. + +If you want to run the linter without running tests, use +`make lint`/`vcbuild jslint`. If you are updating tests and just want to run a single test to check it, you can use this syntax to run it exactly as the test harness would: From bbbbb196588fa7f7012b6bc6df15f38bda672d5c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 20 Jul 2016 15:25:16 -0700 Subject: [PATCH 027/221] doc: add information about CTC quorum rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CTC quorum rules were not in writing. There was an informal understanding between CTC members. Document the rules to avoid differences in interpretation. PR-URL: https://github.com/nodejs/node/pull/7813 Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Julien Gilli --- GOVERNANCE.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 34b2f5fd1ec936..7e4fbf5e7c4565 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -119,6 +119,8 @@ When an agenda item has appeared to reach a consensus, the moderator will ask "Does anyone object?" as a final call for dissent from the consensus. If an agenda item cannot reach a consensus, a CTC member can call for either a -closing vote or a vote to table the issue to the next meeting. The call for a -vote must be approved by a simple majority of the CTC or else the discussion -will continue. +closing vote or a vote to table the issue to the next meeting. All votes +(including votes to close or table) pass if and only if more than 50% of the CTC +members (excluding individuals who explicitly abstain) vote in favor. For +example, if there are 20 CTC members, and 5 of those members indicate that they +abstain, then 8 votes in favor are required for a resolution to pass. From 7faf6dc0dac840cffc89fadb3fe0fee30e20e03b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 14 Jul 2016 20:16:26 -0700 Subject: [PATCH 028/221] meta: provide example activities Provide example activities to better distinguish Collaborator activities from CTC member activities. PR-URL: https://github.com/nodejs/node/pull/7744 Reviewed-By: Ben Noordhuis Reviewed-By: Julien Gilli --- GOVERNANCE.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 7e4fbf5e7c4565..490a2c91a678fc 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -56,6 +56,18 @@ For the current list of Collaborators, see the project A guide for Collaborators is maintained in [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md). +Typical activities of a Collaborator include: + +* helping users and novice contributors +* contributing code and documentation changes that improve the project +* reviewing and commenting on issues and pull requests +* participation in working groups +* merging pull requests + +While the above are typical things done by Collaborators, there are no required +activities to retain Collaborator status. There is currently no process by which +inactive Collaborators are removed from the project. + ## CTC Membership CTC seats are not time-limited. There is no fixed size of the CTC. The CTC @@ -80,6 +92,18 @@ the CTC membership shares an employer, then the situation must be immediately remedied by the resignation or removal of one or more CTC members affiliated with the over-represented employer(s). +Typical activities of a CTC member include: + +* attending the weekly meeting +* commenting on the weekly CTC meeting issue and issues labeled `ctc-agenda` +* participating in CTC email threads +* volunteering for tasks that arise from CTC meetings and related discussions +* other activities (beyond those typical of Collaborators) that facilitate the + smooth day-to-day operation of the Node.js project + +Note that CTC members are also Collaborators and therefore typically perform +Collaborator activities as well. + ## CTC Meetings The CTC meets weekly in a voice conference call. The meeting is run by a From ac40b2a9b6e1eb5d5d6fd591884c083ce2a9102e Mon Sep 17 00:00:00 2001 From: William Kapke Date: Wed, 27 Jul 2016 22:24:21 +0000 Subject: [PATCH 029/221] doc: add CTC meeting minutes 2016-07-27 PR-URL: https://github.com/nodejs/node/pull/7900 Reviewed-By: Rich Trott Reviewed-By: James M Snell --- doc/ctc-meetings/2016-07-27.md | 237 +++++++++++++++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 doc/ctc-meetings/2016-07-27.md diff --git a/doc/ctc-meetings/2016-07-27.md b/doc/ctc-meetings/2016-07-27.md new file mode 100644 index 00000000000000..d0b19393865f5b --- /dev/null +++ b/doc/ctc-meetings/2016-07-27.md @@ -0,0 +1,237 @@ +# Node Foundation CTC Meeting 2016-07-27 + +## Links + +* **Audio Recording**: https://www.youtube.com/watch?v=QAufnqo4ElY +* **GitHub Issue**: https://github.com/nodejs/node/issues/7881 +* **Minutes Google Doc**: +* _Previous Minutes Google Doc: _ + +## Present + +* Anna Henningsen @addaleax (observer) +* Сковорода Никита Андреевич @ChALkeR (CTC) +* Jeremiah Senkpiel @Fishrock123 (CTC) +* Fedor Indutny @indutny (CTC) +* James M Snell @jasnell (CTC) +* Julien Gilli @misterdjules (CTC) +* Mikeal Rogers @mikeal (observer/Node.js Foundation) +* Brian White @mscdex (CTC) +* Alexis Campailla @orangemocha (CTC) +* Rod Vagg @rvagg (CTC) +* Steven R Loomis @srl295 (observer/IBM/ICU) +* Trevor Norris @trevnorris (CTC) +* Rich Trott @Trott (CTC) +* William Kapke @williamkapke (observer) + + +## Standup + +* Anna Henningsen @addaleax (observer) + * Issues & PRs + * Some realpath work +* Сковорода Никита Андреевич @ChALkeR (CTC) + * Mostly comments and reviews, nothing significant +* Fedor Indutny @indutny (CTC) + * Issues, PRs, Direct-to-BIO experiments +* James M Snell @jasnell (CTC) + * Glorious vacation … + * Catching up + * Small clarification PR for IRC moderation +* Julien Gilli @misterdjules (CTC) + * PR reviews, especially https://github.com/nodejs/node/pull/7827, which looks like a very solid first contribution from a new contributor. +* Brian White @mscdex (CTC) + * Continued reworking of API docs + * Reviewed PRs, commented on issues +* Alexis Campailla @orangemocha (CTC) + * Investigating issues related to fs.realPath + * Investigating binary compatibility between Node and native modules compiled with different VS versions + * Working with team on various Windows issues in Node and libuv +* Rod Vagg @rvagg (CTC) + * NodeSummit / travel, Node v5 blog post nearly ready to post, bug in require() (still need to post in nodejs/node) + * Steven R Loomis @srl295 (observer/IBM/ICU) + * @ NodeSummit / prep… thinking about how to keep an eye on upcoming v8 changes. Did some more work on https://github.com/nodejs/node/issues/3460 (detect full-icu module). +* Trevor Norris @trevnorris (CTC) + * NodeSummit talk + * fs.realpath() + * Prepping AsyncWrap, target end of August +* Rich Trott @Trott (CTC) + * Updating governance text and whatnot + * Flaky tests + * NodeSummit talk +* William Kapke @williamkapke (Observer) + + +## Agenda + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + +### nodejs/node + +* Role of CTC in semver-major changes needs clarification [#7848](https://github.com/nodejs/node/issues/7848) +* Revert fs changes [#7846](https://github.com/nodejs/node/pull/7846) +* doc: add information about CTC quorum rules [#7813](https://github.com/nodejs/node/pull/7813) +* meta: provide example activities [#7744](https://github.com/nodejs/node/pull/7744) +* meta: realpath issues in v6 [#7726](https://github.com/nodejs/node/issues/7726) +* v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) +* punycode: deprecate punycode module [#7552](https://github.com/nodejs/node/pull/7552) +* Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/issues/7175) +* http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) +* Seek legal advice on LICENSE and copyright blocks in code [#3979](https://github.com/nodejs/node/issues/3979) + +### nodejs/post-mortem + +* Repositories to contribute collaboratively [#30](https://github.com/nodejs/post-mortem/issues/30) + +### nodejs/node-eps + +* proposal: WHATWG URL standard implementation [#28](https://github.com/nodejs/node-eps/pull/28) + + +## Previous Meeting + +### nodejs/node + +* [meta] realpath issues in v6 [#7726](https://github.com/nodejs/node/issues/7726) +* v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) +* http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) + +### nodejs/node-eps + +* proposal: WHATWG URL standard implementation [#28](https://github.com/nodejs/node-eps/pull/28) + +## Minutes + + +### Role of CTC in semver-major changes needs clarification [#7848](https://github.com/nodejs/node/issues/7848) + + + + +### Revert fs changes [#7846](https://github.com/nodejs/node/pull/7846) + + +James: has to do with recent changes - making callback mandatory on all async functions apparently _broke the planet_, quite a few modules broke including a number used by npm, so `npm set` failed to work for example. + +James: technically this should be viewed as a bugfix but we’ve already treated things involving errors as sensitive but this is on master and things a broken right now so suggesting that we revert this. Some alternatives are: not revert and get fixes in the ecosystem, revert and add warning. + +Rich: Myles endorsed [#7897](https://github.com/nodejs/node/pull/7897) as a better alternative to reverting as it includes a warning. What’s the preferred approach here James? + +James: revert, even though I don’t like it, we should revert and revisit. + +Trevor: the fact that it was allowed was a bad decision because throwing can lead to hard-to-debug situations. Reverting is the _only course of action_. + +Rod: wanted to clarify as a matter of culture - we should fix master as soon as we’re aware of breakage in the ecosystem and deal with things more cleanly as we can. + +Julien: multiple commits in the revert PR, we should have separate discussions about them. + +James: will ask on the PR that they be split into two. + +James: second question here is whether we want to emit a warning instead? + +Rod: the graceful-fs warnings are still widespread because lots of packages rely on very old versions and it’s taking a long time to get updates through the ecosystem. We have to be careful about (1) warning fatigue, (2) users not understanding the subtlety and interpreting warnings as errors. Would be good if we go a bit slower on moving to warnings. + +James: we could run with warnings off by default as a way of dealing warning fatigue but that’s another discussion we can have on GitHub. + +Rich: moving on, this can be done on Github. + +### doc: add information about CTC quorum rules [#7813](https://github.com/nodejs/node/pull/7813) + +Rich: there was a counter-proposal which seemed to be better so I updated to use Chalker’s alternative wording. **If anyone doesn’t want this to land please comment on it within the next 24 hours or so**. There hasn’t been too much discussion or disagreement. + +### meta: provide example activities [#7744](https://github.com/nodejs/node/pull/7744) + +Rich: Similar to the previous issue - have not got a whole lot of response, or a luke-warm response at least. Please comment in there if you have any problems with it, there are no negatives so it’ll land in the next 24 hours or so so please comment! + +### \[meta\] realpath issues in v6 [#7726](https://github.com/nodejs/node/issues/7726) + +Trevor: ran some benchmarks in CI to see how much time it would take to require() with and without cache in realpath. Haven’t done Windows but on the others there was between 10% to 100%, which is between 30us to 300us difference per require(). + +Alexis: [#7899](https://github.com/nodejs/node/pull/7899) reverts and also includes Myles’ reversions from the other fs issues. + +Trevor: probably should revert and leave cache out, we might take a small hit now in perf but will lead to greater potential in the future. + +Alexis: the cache was never a great API in the first place anyway. + +Trevor: propose we revert and leave the cache and introduce a better fix. + +Anna: agree with Trevor and Alexis. + +Rod: should we get benchmarks on Windows? + +Alexis: much more concerned about correctness than performance. + +Trevor: this is a short-term fix, so we shouldn’t have a problem bringing it in. + +Rich asked for disagreement with moving forward with reversion without cache? No disagreement. Need to comment on 7899, review & lgtm. Anna, Trevor or Alexis will move it forward. + +### v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) + +James: because this adds some semver-minor’s Myles is very concerned about stability. + +Julien: any ideas on how we might be able to get more testers for these? + +James: maybe in a week, will get some suggestions posted to the LTS repo that we can discuss. + +### punycode: deprecate punycode module [#7552](https://github.com/nodejs/node/pull/7552) + +James: this is a 3rd party dependency that we expose and there’s some fairly extensive usage out there but there is a newer version out there in npm that people should be using. + +Rich: no more comments? Please post on the repo. + +Rod: deprecation is fine but would really like a long deprecation cycle. + +James: how about soft deprecation in v7 and hard in v8? + +Rod: soft in v7 and revisit decision to hard prior to v8. + +Brian: if people build without ICU what would happen to punycode since we need it? + +James: This particular PR introduces a hard deprecation that moves it to internal/ and has a shim that exposes it, so we could still use it internally but just deprecate the external API. + +Brian: are we going to continue updating the non-ICU version for people going forward or just leave it? + +James: would prefer to just leave it as is. + +Chalker: on npm it has 5.7M downloads per month so people are already using it. + +James: clarify: soft deprecate now and revisit hard deprecation prior to v8? + +### http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) + +Rod: wanted to mention that Chris Dickinson expressed concerns on Twitter about us doing this same thing on querystring and that it was causing problems for him and didn’t like that it crept in to v6. + +James: Doug, from the express side, thinks this is a good decision and cleans up things for users. The querystring thing has + +… discussion tended towards accepting the change but CTC would like to solicit input from Chris Dickinson before getting it landed since he had raised some objections + +### Seek legal advice on LICENSE and copyright blocks in code [#3979](https://github.com/nodejs/node/issues/3979) + +Mikeal Rogers: discussing the SPDX stuff and restoration of licenses in the files. Mikeal and Rod will take the lead on moving forward with this. + +### Repositories to contribute collaboratively [post-mortem#30](https://github.com/nodejs/post-mortem/issues/30) + +Move to TSC meeting + +### proposal: WHATWG URL standard implementation [node-eps#28](https://github.com/nodejs/node-eps/pull/28) + +James: Passing WHATWG tests except some intentional ones. Performance is slower than our own url impl because of tests we fail. Any objections to moving forward? + +Rod: we’re going to have two implementations, this seems like a difficult thing to agree on. + +James: would like to eventually deprecate existing url.parse. + +Rich: let’s move on because this will be a big conversation. Let’s have a brief conversation next week and slot a bigger discussion next week. + +## Q/A on public fora + +No questions. + +## Upcoming Meetings + +* CTC: 2016-08-03 +* TSC: 2016-07-28 +* Build: 2016-08-09 +* Diagnostics: 2016-08-03 +* Post-Mortem: August +* API: August From 6d49f22e350b97f71a61eb45c6111a02e925b2ad Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 13 Jul 2016 15:41:17 -0700 Subject: [PATCH 030/221] meta: include a minimal CTC removal policy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add language identifying a request for voluntary resignation as the typical mechanism for addressing inactive CTC members. PR-URL: https://github.com/nodejs/node/pull/7720 Reviewed-By: Rod Vagg Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Ben Noordhuis Reviewed-By: Fedor Indutny Reviewed-By: Jeremiah Senkpiel Reviewed-By: Evan Lucas Reviewed-By: Shigeki Ohtsu Reviewed-By: Michael Dawson Reviewed-By: Rich Trott Reviewed-By: Brian White Reviewed-By: Julien Gilli Reviewed-By: James M Snell --- GOVERNANCE.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 490a2c91a678fc..d3ba8355e0fca8 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -56,6 +56,8 @@ For the current list of Collaborators, see the project A guide for Collaborators is maintained in [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md). +### Collaborator Activities + Typical activities of a Collaborator include: * helping users and novice contributors @@ -79,11 +81,15 @@ membership beyond these rules. The CTC may add additional members to the CTC by a standard CTC motion. -A CTC member may be removed from the CTC by voluntary resignation, or by -a standard CTC motion. +When a CTC member's participation in [CTC activities](#ctc-activities) has become +minimal for a sustained period of time, the CTC will request that the member +either indicate an intention to increase participation or voluntarily resign. + +CTC members may only be removed by voluntary resignation or through a standard +CTC motion. Changes to CTC membership should be posted in the agenda, and may be -suggested as any other agenda item (see "CTC Meetings" below). +suggested as any other agenda item (see [CTC Meetings](#ctc-meetings) below). No more than 1/3 of the CTC members may be affiliated with the same employer. If removal or resignation of a CTC member, or a change of @@ -92,6 +98,8 @@ the CTC membership shares an employer, then the situation must be immediately remedied by the resignation or removal of one or more CTC members affiliated with the over-represented employer(s). +### CTC Activities + Typical activities of a CTC member include: * attending the weekly meeting @@ -104,7 +112,7 @@ Typical activities of a CTC member include: Note that CTC members are also Collaborators and therefore typically perform Collaborator activities as well. -## CTC Meetings +### CTC Meetings The CTC meets weekly in a voice conference call. The meeting is run by a designated moderator approved by the CTC. Each meeting is streamed on YouTube. From b60473fac73605756e5393e9a409119cfa49ee8c Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Wed, 6 Jul 2016 14:33:51 -0700 Subject: [PATCH 031/221] doc: add CTC meeting minutes 2016-06-29 PR-URL: https://github.com/nodejs/node/pull/7571 Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- doc/ctc-meetings/2016-06-29.md | 187 +++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 doc/ctc-meetings/2016-06-29.md diff --git a/doc/ctc-meetings/2016-06-29.md b/doc/ctc-meetings/2016-06-29.md new file mode 100644 index 00000000000000..859cdc1df27c59 --- /dev/null +++ b/doc/ctc-meetings/2016-06-29.md @@ -0,0 +1,187 @@ +# Node Foundation CTC Meeting 2016-06-29 + +## Links + +* **Audio Recording**: TBP +* **GitHub Issue**: https://github.com/nodejs/node/issues/7474 +* **Minutes Google Doc**: +* _Previous Minutes Google Doc: _ + +## Present + +* Bradley Meck @bmeck (observer/GoDaddy/TC39) +* Сковорода Никита Андреевич @ChALkeR (CTC) +* Colin Ihrig @cjihrig (CTC) +* Evan Lucas @evanlucas (CTC) +* Jeremiah Senkpiel @Fishrock123 (CTC) +* James M Snell @jasnell (CTC) +* John-David Dalton @jdalton (observer/Lodash/Microsoft) +* Josh Gavant @joshgav (observer/Microsoft) +* Michael Dawson @mhdawson (CTC) +* Brian White @mscdex (CTC) +* Ali Ijaz Sheikh @ofrobots (CTC) +* Rod Vagg @rvagg (CTC) +* Trevor Norris @trevnorris (CTC) +* Rich Trott @Trott (CTC) + + +## Agenda + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + +### nodejs/node + +* New Buffer API backport to v4.x [#7475](https://github.com/nodejs/node/pull/7475) +* child_process: validate fork/execFile arguments [#7399](https://github.com/nodejs/node/pull/7399) +* Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/issues/7175) +* repl: Default `useGlobal` to false in CLI REPL. [#5703](https://github.com/nodejs/node/pull/5703) +* Seek legal advice on LICENSE and copyright blocks in code [#3979](https://github.com/nodejs/node/issues/3979) + +### nodejs/LTS + +* Mention odd-number release has eight months support as Current. [#113](https://github.com/nodejs/LTS/issues/113) + +### nodejs/node-eps + +* AsyncWrap public API proposal [#18](https://github.com/nodejs/node-eps/pull/18) + +## Standup + +* Bradley Meck @bmeck (observer/GoDaddy/TC39) + * Trying to gather all stakeholders in ES Module implementations into a meeting + * Back and forth with V8 about details of CJS bridge +* John-David Dalton @jdalton (observer/Lodash/Microsoft) + * Dropped caching from unambiguous JS proposal + * PR to Node EPS repo + * Discussed with V8 (Adam Klein) and Chakra about adding the API, no blockers +* Сковорода Никита Андреевич @ChALkeR (CTC) + * Filed #7475 to backport new Buffer API to 4.x LTS +* Colin Ihrig @cjihrig (CTC) + * Reviewing issues and PRs. Made a couple libuv PRs. +* Evan Lucas @evanlucas (CTC) + * Merged pr to allow passing prompt to readline + * Merged pr that prints experimental warning when using inspector + * Worked on v6.x branch a little +* Jeremiah Senkpiel @Fishrock123 (CTC) + * Was away a bit adjusting to Europe. + * Misc PRs/Issues work. + * Also working to resolve https://github.com/nodejs/node/issues/5426 (ages old timers issue) +* Josh Gavant @joshgav (observer/Microsoft) + * Scheduled next Diag WG meeting (7/13 12 Pacific) (https://github.com/nodejs/diagnostics/issues/60) + * “Inspector Gateway” proposal (https://github.com/nodejs/node/issues/7393) + * Module discussions +* Michael Dawson @mhdawson (CTC) + * Testing problematic PPC machine after move to new node, adding back to regular CI runs + * Working on ABI stable API prototype with Ian/Sampson + * Post mortem work with Richard C + * Misc PR reviews/lands + * Adding linuxOne to master test jobs in CI (since 5.1 landed there) + * LTS, Build WG meetings + * Starting to work on presentations for upcoming conferences +* Brian White @mscdex (CTC) + * Landed a fix for a StringDecoder regression + * Reviewed PRs, commented on issues +* Ali Ijaz Sheikh @ofrobots (CTC) + * Busy with non-Node stuff mostly. +* Rod Vagg @rvagg (CTC) + * Chat with Electron team + * Foundation board meeting + * npm publish bug hunt + * node-gyp release, fix for latest MSVS 2015 release +* Steven R Loomis @srl295 (observer/IBM/ICU) + * regrets for this meeting- nothing to add at this point(hopefully soon) +* Trevor Norris @trevnorris (CTC) + * working on solution for user API for AsyncWrap (?) +* Rich Trott @Trott (CTC) + * child_process fixes + * examining https://node-core-coverage.addaleax.net/ results (thanks, @addaleax!) + * re-certifying flaky tests + +## Minutes + +### child_process: validate fork/execFile arguments [#7399](https://github.com/nodejs/node/pull/7399) + +@trott: Semver-major change requires review. + +@trott: fixing a bug that James filed some time ago - if nonsensical arguments are passed to these methods they silently ignore those arguments. Rich and James think it should throw if you give it garbage. + +@nodejs/ctc: No objections. + +### Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/issues/7175) + +@trevnorris was to work on capturing new errors and handling them. Discovered that all fs methods suffer same issue. Trevor has idea on how to handle it, will submit PR in the next day or two. + +@bzoz understands Windows issues and will address them. + +### buffer: backport --zero-fill-buffers command line option [#5745](https://github.com/nodejs/node/pull/5745) + +See also [#7475](https://github.com/nodejs/node/pull/7475). + +Backport to v4. Was discussed and CTC thought it wasn’t a good idea, but want to revisit now. What was previous issue? @Fishrock123 - another change, possibly security-related, blocked it. + +@rvagg: Same objections as backport to 0.12, should be treated the same. + +@nodejs/ctc: No objections currently. This is relevant to security. + +### repl: Default `useGlobal` to false in CLI REPL. [#5703](https://github.com/nodejs/node/pull/5703) + +* Some discussion in the original issue: https://github.com/nodejs/node/issues/5659#issuecomment-195543607 +* Moving back to GitHub. + +### Mention odd-number release has eight months support as Current. [lts#113](https://github.com/nodejs/LTS/issues/113) + +* Current state is that Current (formerly Stable) branch is supported for **two** months after next release but some people think it’s **three** months. For example, v5 is supported till end of June 2016. But we’d like this to be stated clearly. + +@mhdawson: discussion in last LTS meeting but it’s not in the scope of the LTS WG’s work so it’s up to the CTC. Is it Current+2 or Current+3? + +@nodejs/ctc: Previous Current version is supported for two months after next version is released. + +@rvagg: v5 is still heavily used. + +@Fishrock123: npm metrics also show high usage of v5, not much decline. + +Need to make clear that people need to upgrade. Should we push this harder or adjust to usage pattern? + +@nodejs/ctc: Stick with plan to stop supporting v5 shortly. + +Metrics: https://nodejs.org/metrics/summaries/version.png + + +### AsyncWrap public API proposal [node-eps#18](https://github.com/nodejs/node-eps/pull/18) + +@Fishrock123 - responses have been primarily positive, time for CTC to consider. + +@rvagg - Goal is to raise awareness amongst CTC today, vote on it next week. + +@rvagg - currently marked as experimental. We should associate a message/warning with experimental API usage. EPs are for experimental APIs. + +@trevnorris - AsyncWrap cannot track callbacks from native addons. Also investigating why sometimes messages are dropped (?). + +### replace section 5.1 with unambiguous JavaScript grammar [node-eps#33](https://github.com/nodejs/node-eps/pull/33) + +@jdalton wants to get agreement from Node.js CTC so that he can proceed to browser vendors. + +TC39 may want to add other “goals” for files in addition to module and script such as asm.js, “frozen realms”. + +@rvagg: If we go with `.mjs` we’d have to have extensions for new parse goals too... + +@rvagg: We prefer a spec change in TC39/ES262 or an acknowledgement at least. @jdalton will add that caveat into the PR. + +@Fishrock123: What about avoiding double parsing? +@bmeck: Chakra said maybe, V8 said probably not. @trevnorris did benchmarks and they weren’t too bad. + +`module.root` for fat packages? With .mjs it wasn’t needed, people would include .js and .mjs files; but with new proposal it is needed. However `module.root` isn’t foolproof because people could use it for general redirection/hiding of package internals instead of only for ES6 modules. + +@rvagg: Let’s slate for vote on Wednesday 7/6, those who are unavailable can vote in the issues. + +## Q/A on public fora + +None. + +## Next Meeting + +* AsyncWrap public API proposal [node-eps#18](https://github.com/nodejs/node-eps/pull/18) +* replace section 5.1 with unambiguous JavaScript grammar. +[node-eps#33](https://github.com/nodejs/node-eps/pull/33) + +CTC: 2016-07-06 From f25518085397e59d3ebc81dc6b3f154ed5c0c1c2 Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Wed, 6 Jul 2016 14:01:36 -0700 Subject: [PATCH 032/221] doc: add CTC meeting minutes 2016-07-06 PR-URL: https://github.com/nodejs/node/pull/7570 Reviewed-By: James M Snell Reviewed-By: Evan Lucas --- doc/ctc-meetings/2016-07-06.md | 150 +++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 doc/ctc-meetings/2016-07-06.md diff --git a/doc/ctc-meetings/2016-07-06.md b/doc/ctc-meetings/2016-07-06.md new file mode 100644 index 00000000000000..232b83b9c7d6bf --- /dev/null +++ b/doc/ctc-meetings/2016-07-06.md @@ -0,0 +1,150 @@ +# Node Foundation CTC Meeting 2016-07-06 + +## Links + +* **Audio Recording**: TBP +* **GitHub Issue**: https://github.com/nodejs/node/issues/7558 +* **Minutes Google Doc**: +* _Previous Minutes Google Doc: _ + +## Present + +* Сковорода Никита Андреевич @ChALkeR (CTC) +* Colin Ihrig @cjihrig (CTC) +* Evan Lucas @evanlucas (CTC) +* Jeremiah Senkpiel @Fishrock123 (CTC) +* James Snell @jasnell (CTC) +* John-David Dalton @jdalton (observer/Microsoft) +* Josh Gavant @joshgav (observer/Microsoft) +* Michael Dawson @mhdawson (CTC) +* Brian White @mscdex (CTC) +* Alexis Campailla @orangemocha (CTC) +* Shigeki Ohtsu @shigeki (CTC) +* Trevor Norris @trevnorris (CTC) +* Rich Trott @Trott (CTC) + +## Standup + +* Сковорода Никита Андреевич @ChALkeR (CTC) + * Nothing significant. +* Colin Ihrig @cjihrig (CTC) + * Reviewed issues. Reviewed pull requests. Opened a couple PRs +* Evan Lucas @evanlucas (CTC) + * Commented on a few issues, not much else +* Jeremiah Senkpiel @Fishrock123 (CTC) + * v6.3.0 Release, most difficult to date, lots of merge conflicts. + * Various PR / Issue review +* John-David Dalton @jdalton (observer/Microsoft) + * Another round of questions with Chakra dev about Unambiguous JS Grammar confirming difficulty level of API is not significant + * Updated Unambiguous JS Grammar based on feedback +* Josh Gavant @joshgav (observer/Microsoft) + * Out for July 4th holiday. +* Michael Dawson @mhdawson (CTC) + * Added linuxOne to regression tests/watched for issues, all looks good, next step is to add to nightly releases + * Chasing down AIX build breaks test failures + * Continued work on ABI stable module API and scheduling of next WG meeting + * misc PR/Issue reviews/pull requests + * post-mortem work and scheduling of next meeting + * small update to benchmark graphs + * keeping up to date with issues +* Brian White @mscdex (CTC) + * Started the process of rebasing the old js http parser onto master to see how it compares to the current http implementation + * Reviewed PRs, commented on issues +* Alexis Campailla @orangemocha (CTC) + * Nothing to report (was out on vacation) +* Shigeki Ohtsu @shigeki (CTC) + * Reviewed only one PR for crypto doc +* Trevor Norris @trevnorris (CTC) + * Updated AsyncWrap EP + * fs.realpath() deep symlink PR +* Rich Trott @Trott (CTC) + * Onboarded @bzoz + * Fixing test-net-write-slow on FreeBSD (PR #7555) +* James M Snell @jasnell (CTC) + * WHATWG http implementation + * Closing up other business before going on vacation for a week + +## Agenda + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + +### nodejs/node + +* build: drop support for VS 2013 in v7 [#7484](https://github.com/nodejs/node/issues/7484) +* Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/issues/7175) + +### nodejs/node-eps + +* Replace section 5.1 with unambiguous JavaScript grammar. [#33](https://github.com/nodejs/node-eps/pull/33) +* AsyncWrap public API proposal [#18](https://github.com/nodejs/node-eps/pull/18) + +## Previous Meeting + +* New Buffer API backport to v4.x [#7475](https://github.com/nodejs/node/pull/7475) + + * New PR: https://github.com/nodejs/node/pull/7562 + +* child_process: validate fork/execFile arguments [#7399](https://github.com/nodejs/node/pull/7399) +* Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/issues/7175) +* repl: Default `useGlobal` to false in CLI REPL. [#5703](https://github.com/nodejs/node/pull/5703) +* Seek legal advice on LICENSE and copyright blocks in code [#3979](https://github.com/nodejs/node/issues/3979) +* Mention odd-number release has eight months support as Current. [#113](https://github.com/nodejs/LTS/issues/113) +* AsyncWrap public API proposal [#18](https://github.com/nodejs/node-eps/pull/18) + +## Minutes + +### build: drop support for VS 2013 in v7 [#7484](https://github.com/nodejs/node/issues/7484) (@jasnell) + +Consider v6 and v7 separately. All agree on moving to VS 2015 for v7. Only question is v6 prior to LTS. We need more info to make decision on v6. + +If we stay with 2013 for v6 we’ll have to support it for the entire lifetime of v6 LTS. But it needs to still be possible to build native addons with 2013. + +@jasnell - Our recommendation is to build native addons with VS 2015 unless it doesn’t work (e.g. in [node-sass#1283](https://github.com/sass/node-sass/issues/1283). + +@orangemocha - No problem building `node.exe` with VS 2015 in v7. But dropping support for 2013 would break some modules (breaking change) due to ABI incompatibilities, so it might not be appropriate for v6. Need more time to assess impact. + +### Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/issues/7175) + +@trevnorris - fix is working, test in development. Comment further in the PR. + +### Replace section 5.1 with unambiguous JavaScript grammar. [#33](https://github.com/nodejs/node-eps/pull/33) + +@jdalton added line stating explicitly that the .mjs proposal is still possible. + +Vote taken in favor of merging this PR. Alexis officially abstained. + +### AsyncWrap public API proposal [#18](https://github.com/nodejs/node-eps/pull/18) + +See also [#7565](https://github.com/nodejs/node/issues/7565), which questions whether AsyncWrap should exist (from @bnoordhuis). + +@jasnell - Error handling should be addressed. + +@trott - A vote for the EP means “*if* we implement, this is what the JavaScript API will look like” and not necessarily “we intend to implement this.” + +@trevnorris - Correct. Confirm the API, then more work is needed on implementation, e.g. to include info on promises. + +@trevnorris - biggest missing chunk is public C++ API. Trouble is that it requires exposing some things which are not currently in public headers. + +@trevnorris - Goal is to include this as experimental in v6 before LTS. But still waiting on additional hooks into promises from V8. + +@Fishrock123 - AsyncWrap is best bet for CLS across async activities, replaces deprecated domains. + +Vote: 7-8 ayes, 0 opposed, 0 abstentions. + + +## Q/A on public fora + +None. + +## Next Meeting + +* Move to VS 2015 for release build in v6? Is this a breaking change? + +## Upcoming TLP & WG Meetings + +* CTC: 2016-07-13 +* TSC: 2016-07-14 +* Diagnostics: 2016-07-13 +* Post-Mortem: [nodejs/post-mortem#31](https://github.com/nodejs/post-mortem/issues/31) +* LTS: +* Build: From 9700660d2be5ea0817042c4f46b62471f127ab95 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 3 Aug 2016 23:19:39 +0200 Subject: [PATCH 033/221] doc: add @addaleax to the CTC Voted on and approved at CTC meeting https://github.com/nodejs/node/issues/7948 (2016-08-03). PR-URL: https://github.com/nodejs/node/pull/7966 Reviewed-By: Evan Lucas Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3aabcbcbed97be..ec0ac14eeec574 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,7 @@ information about the governance of the Node.js project, see ### CTC (Core Technical Committee) +* [addaleax](https://github.com/addaleax) - **Anna Henningsen** <anna@addaleax.net> * [bnoordhuis](https://github.com/bnoordhuis) - **Ben Noordhuis** <info@bnoordhuis.nl> * [ChALkeR](https://github.com/ChALkeR) - **Сковорода Никита Андреевич** <chalkerx@gmail.com> * [chrisdickinson](https://github.com/chrisdickinson) - **Chris Dickinson** <christopher.s.dickinson@gmail.com> @@ -175,7 +176,6 @@ information about the governance of the Node.js project, see ### Collaborators -* [addaleax](https://github.com/addaleax) - **Anna Henningsen** <anna@addaleax.net> * [andrasq](https://github.com/andrasq) - **Andras** <andras@kinvey.com> * [AndreasMadsen](https://github.com/AndreasMadsen) - **Andreas Madsen** <amwebdk@gmail.com> * [bengl](https://github.com/bengl) - **Bryan English** <bryan@bryanenglish.com> From abefdca5ae1baca5ce3c3fa836586d5bb8731472 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Wed, 3 Aug 2016 15:34:39 -0700 Subject: [PATCH 034/221] doc: piscisaureus has stepped-down from the CTC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit piscisaureus has voluntarily stepped-down from the CTC PR-URL: https://github.com/nodejs/node/pull/7969 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Michael Dawson Reviewed-By: Сковорода Никита Андреевич --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ec0ac14eeec574..6562bcdb5c46d8 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,6 @@ information about the governance of the Node.js project, see * [mscdex](https://github.com/mscdex) - **Brian White** <mscdex@mscdex.net> * [ofrobots](https://github.com/ofrobots) - **Ali Ijaz Sheikh** <ofrobots@google.com> * [orangemocha](https://github.com/orangemocha) - **Alexis Campailla** <orangemocha@nodejs.org> -* [piscisaureus](https://github.com/piscisaureus) - **Bert Belder** <bertbelder@gmail.com> * [rvagg](https://github.com/rvagg) - **Rod Vagg** <rod@vagg.org> * [shigeki](https://github.com/shigeki) - **Shigeki Ohtsu** <ohtsu@iij.ad.jp> * [trevnorris](https://github.com/trevnorris) - **Trevor Norris** <trev.norris@gmail.com> @@ -210,6 +209,7 @@ information about the governance of the Node.js project, see * [othiym23](https://github.com/othiym23) - **Forrest L Norvell** <ogd@aoaioxxysz.net> * [petkaantonov](https://github.com/petkaantonov) - **Petka Antonov** <petka_antonov@hotmail.com> * [phillipj](https://github.com/phillipj) - **Phillip Johnsen** <johphi@gmail.com> +* [piscisaureus](https://github.com/piscisaureus) - **Bert Belder** <bertbelder@gmail.com> * [pmq20](https://github.com/pmq20) - **Minqi Pan** <pmq2001@gmail.com> * [princejwesley](https://github.com/princejwesley) - **Prince John Wesley** <princejohnwesley@gmail.com> * [qard](https://github.com/qard) - **Stephen Belanger** <admin@stephenbelanger.com> From b680eb99ade70115b22df603e50bc95d4ae227f2 Mon Sep 17 00:00:00 2001 From: yorkie Date: Tue, 2 Aug 2016 01:31:28 +0800 Subject: [PATCH 035/221] doctool: improve the title of pages in doc --- doc/template.html | 2 +- tools/doc/html.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/template.html b/doc/template.html index 71e3a21e1d4d5c..f3edaef72d0537 100644 --- a/doc/template.html +++ b/doc/template.html @@ -2,7 +2,7 @@ - __SECTION__ Node.js __VERSION__ Manual & Documentation + __SECTION__ | Node.js __VERSION__ Manual & Documentation diff --git a/tools/doc/html.js b/tools/doc/html.js index 769d601e26c800..75d5f085311601 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -118,7 +118,7 @@ function render(opts, cb) { template = template.replace(/__ID__/g, id); template = template.replace(/__FILENAME__/g, filename); - template = template.replace(/__SECTION__/g, section); + template = template.replace(/__SECTION__/g, section || 'Index'); template = template.replace(/__VERSION__/g, nodeVersion); template = template.replace(/__TOC__/g, toc); template = template.replace( From 009df788de0c16dd229e8cb8181a2a0386449db7 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Fri, 22 Jul 2016 21:40:27 -0400 Subject: [PATCH 036/221] doc: use `git-secure-tag` for release tags `git-secure-tag` recursively constructs an SHA-512 digest out of the git tree, and puts the hash from the tree's root into the tag annotation. This hash provides better integrity guarantees than the default SHA-1 merkle tree that git uses. Fix: #7579 PR-URL: https://github.com/nodejs/node/pull/7603 Reviewed-By: Rod Vagg Reviewed-By: James M Snell Reviewed-By: Evan Lucas --- doc/releases.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/releases.md b/doc/releases.md index b7e00683693027..f8723d4f831c80 100644 --- a/doc/releases.md +++ b/doc/releases.md @@ -189,10 +189,16 @@ Once you have produced builds that you're happy with, create a new tag. By waiti Tag summaries have a predictable format, look at a recent tag to see, `git tag -v v6.0.0`. The message should look something like `2016-04-26 Node.js v6.0.0 (Current) Release`. -Create a tag using the following command: +Install `git-secure-tag` npm module: +```console +$ npm install -g git-secure-tag ``` -$ git tag -sm 'YYYY-MM-DD Node.js vx.y.z (Release Type) Release' + +Create a tag using the following command: + +```sh +$ git secure-tag -sm 'YYYY-MM-DD Node.js vx.y.z (Release Type) Release' ``` The tag **must** be signed using the GPG key that's listed for you on the project README. From 9d9bcd7c5555f6ae96a584db02bfd340b708b387 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 2 Aug 2016 21:07:53 -0700 Subject: [PATCH 037/221] meta: clarify process for breaking changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/nodejs/node/issues/7848 PR-URL: https://github.com/nodejs/node/pull/7955 Reviewed-By: James M Snell Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Julien Gilli Reviewed-By: Anna Henningsen Reviewed-By: Brian White Reviewed-By: Michael Dawson --- COLLABORATOR_GUIDE.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index 90d73e80e9679b..2bab2e203145f0 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -60,12 +60,20 @@ and work schedules. Trivial changes (e.g. those which fix minor bugs or improve performance without affecting API or causing other wide-reaching impact) may be landed after a shorter delay. -Where there is no disagreement amongst Collaborators, a pull request -may be landed given appropriate review. Where there is discussion +For non-breaking changes, if there is no disagreement amongst Collaborators, a +pull request may be landed given appropriate review. Where there is discussion amongst Collaborators, consensus should be sought if possible. The lack of consensus may indicate the need to elevate discussion to the CTC for resolution (see below). +Breaking changes (that is, pull requests that require an increase in the +major version number, known as `semver-major` changes) must be elevated for +review by the CTC. This does not necessarily mean that the PR must be put onto +the CTC meeting agenda. If multiple CTC members approve (`LGTM`) the PR and no +Collaborators oppose the PR, it can be landed. Where there is disagreement among +CTC members or objections from one or more Collaborators, `semver-major` pull +requests should be put on the CTC meeting agenda. + All bugfixes require a test case which demonstrates the defect. The test should *fail* before the change, and *pass* after the change. From 08111e84b1d6e1d54579d6fb54a7b1066f6bb1b1 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 3 Aug 2016 16:32:05 -0700 Subject: [PATCH 038/221] doc: use consistent markdown in README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improve markdown practices in README: * consistent header indicators * consistent emphasis indicators * wrap bare URLs in `<` and `>` * wrap at 80 chars * specifying language in fenced code PR-URL: https://github.com/nodejs/node/pull/7971 Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Michaël Zasso Reviewed-By: James M Snell --- README.md | 309 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 200 insertions(+), 109 deletions(-) diff --git a/README.md b/README.md index 6562bcdb5c46d8..e87068c173ffee 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -Node.js -======= +# Node.js [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/nodejs/node?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/29/badge)](https://bestpractices.coreinfrastructure.org/projects/29) @@ -28,12 +27,13 @@ If you need help using or installing Node.js, please use the ### Unofficial Resources * IRC (general questions): [#node.js on chat.freenode.net][]. Please see -http://nodeirc.info/ for more information regarding the `#node.js` IRC channel. + for more information regarding the `#node.js` IRC +channel. -*Please note that unofficial resources are neither managed by (nor necessarily +_Please note that unofficial resources are neither managed by (nor necessarily endorsed by) the Node.js TSC/CTC. Specifically, such resources are not currently covered by the [Node.js Moderation Policy][] and the selection and -actions of resource operators/moderators are not subject to TSC/CTC oversight.* +actions of resource operators/moderators are not subject to TSC/CTC oversight._ ## Release Types @@ -86,20 +86,20 @@ documentation of the latest stable version. ### Verifying Binaries -Current, LTS and Nightly download directories all contain a *SHASUM256.txt* +Current, LTS and Nightly download directories all contain a _SHASUM256.txt_ file that lists the SHA checksums for each file available for download. -The *SHASUM256.txt* can be downloaded using curl. +The _SHASUM256.txt_ can be downloaded using curl. -``` +```console $ curl -O https://nodejs.org/dist/vx.y.z/SHASUMS256.txt ``` To check that a downloaded file matches the checksum, run it through `sha256sum` with a command such as: -``` +```console $ grep node-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c - ``` @@ -115,9 +115,8 @@ the GPG keys of individuals authorized to create releases. They are listed at the bottom of this README under [Release Team](#release-team). Use a command such as this to import the keys: -``` -$ gpg --keyserver pool.sks-keyservers.net \ - --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D +```console +$ gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D ``` _(See the bottom of this README for a full script to import active @@ -148,96 +147,177 @@ handling your report. ## Current Project Team Members The Node.js project team comprises a group of core collaborators and a sub-group -that forms the _Core Technical Committee_ (CTC) which governs the project. For more -information about the governance of the Node.js project, see +that forms the _Core Technical Committee_ (CTC) which governs the project. For +more information about the governance of the Node.js project, see [GOVERNANCE.md](./GOVERNANCE.md). ### CTC (Core Technical Committee) -* [addaleax](https://github.com/addaleax) - **Anna Henningsen** <anna@addaleax.net> -* [bnoordhuis](https://github.com/bnoordhuis) - **Ben Noordhuis** <info@bnoordhuis.nl> -* [ChALkeR](https://github.com/ChALkeR) - **Сковорода Никита Андреевич** <chalkerx@gmail.com> -* [chrisdickinson](https://github.com/chrisdickinson) - **Chris Dickinson** <christopher.s.dickinson@gmail.com> -* [cjihrig](https://github.com/cjihrig) - **Colin Ihrig** <cjihrig@gmail.com> -* [evanlucas](https://github.com/evanlucas) - **Evan Lucas** <evanlucas@me.com> -* [fishrock123](https://github.com/fishrock123) - **Jeremiah Senkpiel** <fishrock123@rocketmail.com> -* [indutny](https://github.com/indutny) - **Fedor Indutny** <fedor.indutny@gmail.com> -* [jasnell](https://github.com/jasnell) - **James M Snell** <jasnell@gmail.com> -* [mhdawson](https://github.com/mhdawson) - **Michael Dawson** <michael_dawson@ca.ibm.com> -* [misterdjules](https://github.com/misterdjules) - **Julien Gilli** <jgilli@nodejs.org> -* [mscdex](https://github.com/mscdex) - **Brian White** <mscdex@mscdex.net> -* [ofrobots](https://github.com/ofrobots) - **Ali Ijaz Sheikh** <ofrobots@google.com> -* [orangemocha](https://github.com/orangemocha) - **Alexis Campailla** <orangemocha@nodejs.org> -* [rvagg](https://github.com/rvagg) - **Rod Vagg** <rod@vagg.org> -* [shigeki](https://github.com/shigeki) - **Shigeki Ohtsu** <ohtsu@iij.ad.jp> -* [trevnorris](https://github.com/trevnorris) - **Trevor Norris** <trev.norris@gmail.com> -* [Trott](https://github.com/Trott) - **Rich Trott** <rtrott@gmail.com> +* [addaleax](https://github.com/addaleax) - +**Anna Henningsen** <anna@addaleax.net> +* [bnoordhuis](https://github.com/bnoordhuis) - +**Ben Noordhuis** <info@bnoordhuis.nl> +* [ChALkeR](https://github.com/ChALkeR) - +**Сковорода Никита Андреевич** <chalkerx@gmail.com> +* [chrisdickinson](https://github.com/chrisdickinson) - +**Chris Dickinson** <christopher.s.dickinson@gmail.com> +* [cjihrig](https://github.com/cjihrig) - +**Colin Ihrig** <cjihrig@gmail.com> +* [evanlucas](https://github.com/evanlucas) - +**Evan Lucas** <evanlucas@me.com> +* [fishrock123](https://github.com/fishrock123) - +**Jeremiah Senkpiel** <fishrock123@rocketmail.com> +* [indutny](https://github.com/indutny) - +**Fedor Indutny** <fedor.indutny@gmail.com> +* [jasnell](https://github.com/jasnell) - +**James M Snell** <jasnell@gmail.com> +* [mhdawson](https://github.com/mhdawson) - +**Michael Dawson** <michael_dawson@ca.ibm.com> +* [misterdjules](https://github.com/misterdjules) - +**Julien Gilli** <jgilli@nodejs.org> +* [mscdex](https://github.com/mscdex) - +**Brian White** <mscdex@mscdex.net> +* [ofrobots](https://github.com/ofrobots) - +**Ali Ijaz Sheikh** <ofrobots@google.com> +* [orangemocha](https://github.com/orangemocha) - +**Alexis Campailla** <orangemocha@nodejs.org> +* [rvagg](https://github.com/rvagg) - +**Rod Vagg** <rod@vagg.org> +* [shigeki](https://github.com/shigeki) - +**Shigeki Ohtsu** <ohtsu@iij.ad.jp> +* [trevnorris](https://github.com/trevnorris) - +**Trevor Norris** <trev.norris@gmail.com> +* [Trott](https://github.com/Trott) - +**Rich Trott** <rtrott@gmail.com> ### Collaborators -* [andrasq](https://github.com/andrasq) - **Andras** <andras@kinvey.com> -* [AndreasMadsen](https://github.com/AndreasMadsen) - **Andreas Madsen** <amwebdk@gmail.com> -* [bengl](https://github.com/bengl) - **Bryan English** <bryan@bryanenglish.com> -* [benjamingr](https://github.com/benjamingr) - **Benjamin Gruenbaum** <benjamingr@gmail.com> -* [bmeck](https://github.com/bmeck) - **Bradley Farias** <bradley.meck@gmail.com> -* [brendanashworth](https://github.com/brendanashworth) - **Brendan Ashworth** <brendan.ashworth@me.com> -* [bzoz](https://github.com/bzoz) - **Bartosz Sosnowski** <bartosz@janeasystems.com> -* [calvinmetcalf](https://github.com/calvinmetcalf) - **Calvin Metcalf** <calvin.metcalf@gmail.com> -* [claudiorodriguez](https://github.com/claudiorodriguez) - **Claudio Rodriguez** <cjrodr@yahoo.com> -* [domenic](https://github.com/domenic) - **Domenic Denicola** <d@domenic.me> -* [eljefedelrodeodeljefe](https://github.com/eljefedelrodeodeljefe) - **Robert Jefe Lindstaedt** <robert.lindstaedt@gmail.com> -* [estliberitas](https://github.com/estliberitas) - **Alexander Makarenko** <estliberitas@gmail.com> -* [firedfox](https://github.com/firedfox) - **Daniel Wang** <wangyang0123@gmail.com> -* [geek](https://github.com/geek) - **Wyatt Preul** <wpreul@gmail.com> -* [iarna](https://github.com/iarna) - **Rebecca Turner** <me@re-becca.org> -* [isaacs](https://github.com/isaacs) - **Isaac Z. Schlueter** <i@izs.me> -* [iWuzHere](https://github.com/iWuzHere) - **Imran Iqbal** <imran@imraniqbal.org> -* [JacksonTian](https://github.com/JacksonTian) - **Jackson Tian** <shvyo1987@gmail.com> -* [jbergstroem](https://github.com/jbergstroem) - **Johan Bergström** <bugs@bergstroem.nu> -* [jhamhader](https://github.com/jhamhader) - **Yuval Brik** <yuval@brik.org.il> -* [joaocgreis](https://github.com/joaocgreis) - **João Reis** <reis@janeasystems.com> -* [julianduque](https://github.com/julianduque) - **Julian Duque** <julianduquej@gmail.com> -* [JungMinu](https://github.com/JungMinu) - **Minwoo Jung** <jmwsoft@gmail.com> -* [lance](https://github.com/lance) - **Lance Ball** <lball@redhat.com> -* [lxe](https://github.com/lxe) - **Aleksey Smolenchuk** <lxe@lxe.co> -* [matthewloring](https://github.com/matthewloring) - **Matthew Loring** <mattloring@google.com> -* [mcollina](https://github.com/mcollina) - **Matteo Collina** <matteo.collina@gmail.com> -* [micnic](https://github.com/micnic) - **Nicu Micleușanu** <micnic90@gmail.com> -* [mikeal](https://github.com/mikeal) - **Mikeal Rogers** <mikeal.rogers@gmail.com> -* [monsanto](https://github.com/monsanto) - **Christopher Monsanto** <chris@monsan.to> -* [Olegas](https://github.com/Olegas) - **Oleg Elifantiev** <oleg@elifantiev.ru> -* [othiym23](https://github.com/othiym23) - **Forrest L Norvell** <ogd@aoaioxxysz.net> -* [petkaantonov](https://github.com/petkaantonov) - **Petka Antonov** <petka_antonov@hotmail.com> -* [phillipj](https://github.com/phillipj) - **Phillip Johnsen** <johphi@gmail.com> -* [piscisaureus](https://github.com/piscisaureus) - **Bert Belder** <bertbelder@gmail.com> -* [pmq20](https://github.com/pmq20) - **Minqi Pan** <pmq2001@gmail.com> -* [princejwesley](https://github.com/princejwesley) - **Prince John Wesley** <princejohnwesley@gmail.com> -* [qard](https://github.com/qard) - **Stephen Belanger** <admin@stephenbelanger.com> -* [rlidwka](https://github.com/rlidwka) - **Alex Kocharin** <alex@kocharin.ru> -* [rmg](https://github.com/rmg) - **Ryan Graham** <r.m.graham@gmail.com> -* [robertkowalski](https://github.com/robertkowalski) - **Robert Kowalski** <rok@kowalski.gd> -* [romankl](https://github.com/romankl) - **Roman Klauke** <romaaan.git@gmail.com> -* [ronkorving](https://github.com/ronkorving) - **Ron Korving** <ron@ronkorving.nl> -* [RReverser](https://github.com/RReverser) - **Ingvar Stepanyan** <me@rreverser.com> -* [saghul](https://github.com/saghul) - **Saúl Ibarra Corretgé** <saghul@gmail.com> -* [sam-github](https://github.com/sam-github) - **Sam Roberts** <vieuxtech@gmail.com> -* [santigimeno](https://github.com/santigimeno) - **Santiago Gimeno** <santiago.gimeno@gmail.com> -* [seishun](https://github.com/seishun) - **Nikolai Vavilov** <vvnicholas@gmail.com> -* [silverwind](https://github.com/silverwind) - **Roman Reiss** <me@silverwind.io> -* [srl295](https://github.com/srl295) - **Steven R Loomis** <srloomis@us.ibm.com> -* [stefanmb](https://github.com/stefanmb) - **Stefan Budeanu** <stefan@budeanu.com> -* [targos](https://github.com/targos) - **Michaël Zasso** <mic.besace@gmail.com> -* [tellnes](https://github.com/tellnes) - **Christian Tellnes** <christian@tellnes.no> -* [thealphanerd](https://github.com/thealphanerd) - **Myles Borins** <myles.borins@gmail.com> -* [thefourtheye](https://github.com/thefourtheye) - **Sakthipriyan Vairamani** <thechargingvolcano@gmail.com> -* [thekemkid](https://github.com/thekemkid) - **Glen Keane** <glenkeane.94@gmail.com> -* [thlorenz](https://github.com/thlorenz) - **Thorsten Lorenz** <thlorenz@gmx.de> -* [tunniclm](https://github.com/tunniclm) - **Mike Tunnicliffe** <m.j.tunnicliffe@gmail.com> -* [vkurchatkin](https://github.com/vkurchatkin) - **Vladimir Kurchatkin** <vladimir.kurchatkin@gmail.com> -* [whitlockjc](https://github.com/whitlockjc) - **Jeremy Whitlock** <jwhitlock@apache.org> -* [yorkie](https://github.com/yorkie) - **Yorkie Liu** <yorkiefixer@gmail.com> -* [yosuke-furukawa](https://github.com/yosuke-furukawa) - **Yosuke Furukawa** <yosuke.furukawa@gmail.com> -* [zkat](https://github.com/zkat) - **Kat Marchán** <kzm@sykosomatic.org> +* [andrasq](https://github.com/andrasq) - +**Andras** <andras@kinvey.com> +* [AndreasMadsen](https://github.com/AndreasMadsen) - +**Andreas Madsen** <amwebdk@gmail.com> +* [bengl](https://github.com/bengl) - +**Bryan English** <bryan@bryanenglish.com> +* [benjamingr](https://github.com/benjamingr) - +**Benjamin Gruenbaum** <benjamingr@gmail.com> +* [bmeck](https://github.com/bmeck) - +**Bradley Farias** <bradley.meck@gmail.com> +* [brendanashworth](https://github.com/brendanashworth) - +**Brendan Ashworth** <brendan.ashworth@me.com> +* [bzoz](https://github.com/bzoz) - +**Bartosz Sosnowski** <bartosz@janeasystems.com> +* [calvinmetcalf](https://github.com/calvinmetcalf) - +**Calvin Metcalf** <calvin.metcalf@gmail.com> +* [claudiorodriguez](https://github.com/claudiorodriguez) - +**Claudio Rodriguez** <cjrodr@yahoo.com> +* [domenic](https://github.com/domenic) - +**Domenic Denicola** <d@domenic.me> +* [eljefedelrodeodeljefe](https://github.com/eljefedelrodeodeljefe) - +**Robert Jefe Lindstaedt** <robert.lindstaedt@gmail.com> +* [estliberitas](https://github.com/estliberitas) - +**Alexander Makarenko** <estliberitas@gmail.com> +* [firedfox](https://github.com/firedfox) - +**Daniel Wang** <wangyang0123@gmail.com> +* [geek](https://github.com/geek) - +**Wyatt Preul** <wpreul@gmail.com> +* [iarna](https://github.com/iarna) - +**Rebecca Turner** <me@re-becca.org> +* [isaacs](https://github.com/isaacs) - +**Isaac Z. Schlueter** <i@izs.me> +* [iWuzHere](https://github.com/iWuzHere) - +**Imran Iqbal** <imran@imraniqbal.org> +* [JacksonTian](https://github.com/JacksonTian) - +**Jackson Tian** <shvyo1987@gmail.com> +* [jbergstroem](https://github.com/jbergstroem) - +**Johan Bergström** <bugs@bergstroem.nu> +* [jhamhader](https://github.com/jhamhader) - +**Yuval Brik** <yuval@brik.org.il> +* [joaocgreis](https://github.com/joaocgreis) - +**João Reis** <reis@janeasystems.com> +* [julianduque](https://github.com/julianduque) - +**Julian Duque** <julianduquej@gmail.com> +* [JungMinu](https://github.com/JungMinu) - +**Minwoo Jung** <jmwsoft@gmail.com> +* [lance](https://github.com/lance) - +**Lance Ball** <lball@redhat.com> +* [lxe](https://github.com/lxe) - +**Aleksey Smolenchuk** <lxe@lxe.co> +* [matthewloring](https://github.com/matthewloring) - +**Matthew Loring** <mattloring@google.com> +* [mcollina](https://github.com/mcollina) - +**Matteo Collina** <matteo.collina@gmail.com> +* [micnic](https://github.com/micnic) - +**Nicu Micleușanu** <micnic90@gmail.com> +* [mikeal](https://github.com/mikeal) - +**Mikeal Rogers** <mikeal.rogers@gmail.com> +* [monsanto](https://github.com/monsanto) - +**Christopher Monsanto** <chris@monsan.to> +* [Olegas](https://github.com/Olegas) - +**Oleg Elifantiev** <oleg@elifantiev.ru> +* [othiym23](https://github.com/othiym23) - +**Forrest L Norvell** <ogd@aoaioxxysz.net> +* [petkaantonov](https://github.com/petkaantonov) - +**Petka Antonov** <petka_antonov@hotmail.com> +* [phillipj](https://github.com/phillipj) - +**Phillip Johnsen** <johphi@gmail.com> +* [piscisaureus](https://github.com/piscisaureus) - +**Bert Belder** <bertbelder@gmail.com> +* [pmq20](https://github.com/pmq20) - +**Minqi Pan** <pmq2001@gmail.com> +* [princejwesley](https://github.com/princejwesley) - +**Prince John Wesley** <princejohnwesley@gmail.com> +* [qard](https://github.com/qard) - +**Stephen Belanger** <admin@stephenbelanger.com> +* [rlidwka](https://github.com/rlidwka) - +**Alex Kocharin** <alex@kocharin.ru> +* [rmg](https://github.com/rmg) - +**Ryan Graham** <r.m.graham@gmail.com> +* [robertkowalski](https://github.com/robertkowalski) - +**Robert Kowalski** <rok@kowalski.gd> +* [romankl](https://github.com/romankl) - +**Roman Klauke** <romaaan.git@gmail.com> +* [ronkorving](https://github.com/ronkorving) - +**Ron Korving** <ron@ronkorving.nl> +* [RReverser](https://github.com/RReverser) - +**Ingvar Stepanyan** <me@rreverser.com> +* [saghul](https://github.com/saghul) - +**Saúl Ibarra Corretgé** <saghul@gmail.com> +* [sam-github](https://github.com/sam-github) - +**Sam Roberts** <vieuxtech@gmail.com> +* [santigimeno](https://github.com/santigimeno) - +**Santiago Gimeno** <santiago.gimeno@gmail.com> +* [seishun](https://github.com/seishun) - +**Nikolai Vavilov** <vvnicholas@gmail.com> +* [silverwind](https://github.com/silverwind) - +**Roman Reiss** <me@silverwind.io> +* [srl295](https://github.com/srl295) - +**Steven R Loomis** <srloomis@us.ibm.com> +* [stefanmb](https://github.com/stefanmb) - +**Stefan Budeanu** <stefan@budeanu.com> +* [targos](https://github.com/targos) - +**Michaël Zasso** <mic.besace@gmail.com> +* [tellnes](https://github.com/tellnes) - +**Christian Tellnes** <christian@tellnes.no> +* [thealphanerd](https://github.com/thealphanerd) - +**Myles Borins** <myles.borins@gmail.com> +* [thefourtheye](https://github.com/thefourtheye) - +**Sakthipriyan Vairamani** <thechargingvolcano@gmail.com> +* [thekemkid](https://github.com/thekemkid) - +**Glen Keane** <glenkeane.94@gmail.com> +* [thlorenz](https://github.com/thlorenz) - +**Thorsten Lorenz** <thlorenz@gmx.de> +* [tunniclm](https://github.com/tunniclm) - +**Mike Tunnicliffe** <m.j.tunnicliffe@gmail.com> +* [vkurchatkin](https://github.com/vkurchatkin) - +**Vladimir Kurchatkin** <vladimir.kurchatkin@gmail.com> +* [whitlockjc](https://github.com/whitlockjc) - +**Jeremy Whitlock** <jwhitlock@apache.org> +* [yorkie](https://github.com/yorkie) - +**Yorkie Liu** <yorkiefixer@gmail.com> +* [yosuke-furukawa](https://github.com/yosuke-furukawa) - +**Yosuke Furukawa** <yosuke.furukawa@gmail.com> +* [zkat](https://github.com/zkat) - +**Kat Marchán** <kzm@sykosomatic.org> Collaborators & CTC members follow the [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in maintaining the Node.js project. @@ -246,18 +326,26 @@ maintaining the Node.js project. Releases of Node.js and io.js will be signed with one of the following GPG keys: -* **Chris Dickinson** <christopher.s.dickinson@gmail.com> `9554F04D7259F04124DE6B476D5A82AC7E37093B` -* **Colin Ihrig** <cjihrig@gmail.com> `94AE36675C464D64BAFA68DD7434390BDBE9B9C5` -* **Evan Lucas** <evanlucas@me.com> `B9AE9905FFD7803F25714661B63B535A4C206CA9` -* **James M Snell** <jasnell@keybase.io> `71DCFD284A79C3B38668286BC97EC7A07EDE3FC1` -* **Jeremiah Senkpiel** <fishrock@keybase.io> `FD3A5288F042B6850C66B31F09FE44734EB7990E` -* **Myles Borins** <myles.borins@gmail.com> `C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8` -* **Rod Vagg** <rod@vagg.org> `DD8F2338BAE7501E3DD5AC78C273792F7D83545D` -* **Sam Roberts** <octetcloud@keybase.io> `0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93` +* **Chris Dickinson** <christopher.s.dickinson@gmail.com> +`9554F04D7259F04124DE6B476D5A82AC7E37093B` +* **Colin Ihrig** <cjihrig@gmail.com> +`94AE36675C464D64BAFA68DD7434390BDBE9B9C5` +* **Evan Lucas** <evanlucas@me.com> +`B9AE9905FFD7803F25714661B63B535A4C206CA9` +* **James M Snell** <jasnell@keybase.io> +`71DCFD284A79C3B38668286BC97EC7A07EDE3FC1` +* **Jeremiah Senkpiel** <fishrock@keybase.io> +`FD3A5288F042B6850C66B31F09FE44734EB7990E` +* **Myles Borins** <myles.borins@gmail.com> +`C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8` +* **Rod Vagg** <rod@vagg.org> +`DD8F2338BAE7501E3DD5AC78C273792F7D83545D` +* **Sam Roberts** <octetcloud@keybase.io> +`0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93` The full set of trusted release keys can be imported by running: -``` +```shell gpg --keyserver pool.sks-keyservers.net --recv-keys 9554F04D7259F04124DE6B476D5A82AC7E37093B gpg --keyserver pool.sks-keyservers.net --recv-keys 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 gpg --keyserver pool.sks-keyservers.net --recv-keys 0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93 @@ -268,15 +356,18 @@ gpg --keyserver pool.sks-keyservers.net --recv-keys C4F0DFFF4E8C1A8236409D08E73B gpg --keyserver pool.sks-keyservers.net --recv-keys B9AE9905FFD7803F25714661B63B535A4C206CA9 ``` -See the section above on [Verifying Binaries](#verifying-binaries) for -details on what to do with these keys to verify that a downloaded file is official. +See the section above on [Verifying Binaries](#verifying-binaries) for details +on what to do with these keys to verify that a downloaded file is official. Previous releases of Node.js have been signed with one of the following GPG keys: -* **Isaac Z. Schlueter** <i@izs.me> `93C7E9E91B49E432C2F75674B0A78B0A6C481CF6` -* **Julien Gilli** <jgilli@fastmail.fm> `114F43EE0176B71C7BC219DD50A3051F888C628D` -* **Timothy J Fontaine** <tjfontaine@gmail.com> `7937DFD2AB06298B2293C3187D33FF9D0246406D` +* **Isaac Z. Schlueter** <i@izs.me> +`93C7E9E91B49E432C2F75674B0A78B0A6C481CF6` +* **Julien Gilli** <jgilli@fastmail.fm> +`114F43EE0176B71C7BC219DD50A3051F888C628D` +* **Timothy J Fontaine** <tjfontaine@gmail.com> +`7937DFD2AB06298B2293C3187D33FF9D0246406D` [Website]: https://nodejs.org/en/ [Contributing to the project]: CONTRIBUTING.md From 012ccf010e6b9b6912b68c0b0d44396b78e6cd1e Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Wed, 3 Aug 2016 15:57:49 -0700 Subject: [PATCH 039/221] doc: add CTC meeting minutes 2016-07-20 PR-URL: https://github.com/nodejs/node/pull/7970 Reviewed-By: Michael Dawson Reviewed-By: James M Snell --- doc/ctc-meetings/2016-07-20.md | 202 +++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 doc/ctc-meetings/2016-07-20.md diff --git a/doc/ctc-meetings/2016-07-20.md b/doc/ctc-meetings/2016-07-20.md new file mode 100644 index 00000000000000..02f16ae2ac24ca --- /dev/null +++ b/doc/ctc-meetings/2016-07-20.md @@ -0,0 +1,202 @@ +# Node Foundation CTC Meeting 2016-07-20 + +## Links + +* **Audio Recording**: TBP +* **GitHub Issue**: https://github.com/nodejs/node/issues/7809 +* **Minutes Google Doc**: +* _Previous Minutes Google Doc: _ + +## Present + +* Anna Henningsen @addaleax (observer) +* Ben Noordhuis @bnoordhuis (CTC) +* Сковорода Никита Андреевич @ChALkeR (CTC) +* Colin Ihrig @cjihrig (CTC) +* Evan Lucas @evanlucas (CTC) +* Jeremiah Senkpiel @Fishrock123 (CTC) +* Josh Gavant @joshgav (observer/Microsoft) +* Michael Dawson @mhdawson (CTC) +* Julien Gilli @misterdjules (CTC) +* Brian White @mscdex (CTC) +* Ali Ijaz Sheikh @ofrobots (CTC) +* Alexis Campailla @orangemocha (CTC) +* Rod Vagg @rvagg (CTC) +* Seth Thompson @s3ththompson (observer/Google) +* Shigeki Ohtsu @shigeki (CTC) +* Steven R Loomis @srl295 (observer/IBM/ICU) +* Myles Borins @TheAlphaNerd (observer) +* Trevor Norris @trevnorris (CTC) +* Rich Trott @Trott (CTC) + + +## Standup + +* Anna Henningsen @addaleax (observer) + * Issues & PRs + * looking into porting JS-based realpath to C +* Ben Noordhuis @bnoordhuis (CTC) + * The usual (PR review and comment) + * Updating code base to do less manual memory management. PR coming soon. +* Сковорода Никита Андреевич @ChALkeR (CTC) + * Some initial work on docs linting. + * Some comments on issues and PRs. +* Colin Ihrig @cjihrig (CTC) + * Reviewed issues and PRs + * Opened PRs +* Evan Lucas @evanlucas (CTC) + * working on v6.3.1 release + * working on repl bugfix +* Jeremiah Senkpiel @Fishrock123 (CTC) + * Did some timers review for https://github.com/nodejs/node/commit/5aac4c42da104c30d8f701f1042d61c2f06b7e6c + * Clearing out some other old stuff I’ve assigned myself to +* Josh Gavant @joshgav (observer/Microsoft) + * Internal Microsoft work. +* Michael Dawson @mhdawson (CTC) + * Misc issues with PPC machines, added new PPC + machines from newer openstack + * Working with Ian/Sampson on ABI stable abi, status + update at API WG meeting + * Working with Richard/Howard on post-mortem activities, + post-mortem WG meeting this week. + * Misc reviews/lands + * Reading/keeping up/commenting on issues + * Getting ready for Node Summit talk. +* Julien Gilli @misterdjules (CTC) + * Looking forward to getting more involved again + * Investigating timers bug. Looking for someone to mentor on it + * Reviewing and commenting on pull requests +* Brian White @mscdex (CTC) + * Diving deep into reworking API docs + * Reviewing PRs, commenting on issues +* Ali Ijaz Sheikh @ofrobots (CTC) + * shepherding some V8 backports, v8_inspector license issue and roll +* Alexis Campailla @orangemocha (CTC) + * Nothing to report. +* Rod Vagg @rvagg (CTC) + * Usual administrative stuff, some build maintenance +* Seth Thompson @s3ththompson (observer/Google) + * Setting priorities for the next quarter. + * Team is continuing work on v8_inspector. + * Migrating v8_inspector into V8 itself. +* Shigeki Ohtsu @shigeki (CTC) + * Nothing special. Working internal jobs. +* Steven R Loomis @srl295 (observer/IBM/ICU) + * Nodesummit prep… +* Myles Borins @TheAlphaNerd (observer) + * v4.5.0-rc.2 released + * Email sent to npm team +* Trevor Norris @trevnorris (CTC) + * realpath fix +* Rich Trott @Trott (CTC) + * CTC governance doc updates + * onboarded @andrasq, will set up something with @princejwesley next, open to other nominations for after that + * eliminating more flaky tests (IT NEVER ENDS!!!!11!!!) + + +## Agenda + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + +### nodejs/node + +* [meta] realpath issues in v6 [#7726](https://github.com/nodejs/node/issues/7726) +* v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) +* http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) + +### nodejs/node-eps + +* proposal: WHATWG URL standard implementation [#28](https://github.com/nodejs/node-eps/pull/28) + +## Previous Meeting + +* build: drop support for VS 2013 in v7 [#7484](https://github.com/nodejs/node/pull/7484) + +* Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/pull/7175) + +* http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) + +* v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) + +* proposal: WHATWG URL standard implementation [#28](https://github.com/nodejs/node-eps/pull/28) + +## Minutes + +### [meta] realpath issues in v6 [#7726](https://github.com/nodejs/node/issues/7726) + +@rvagg: some discussion of reversion to v5 behavior, i.e. JS implementation rather than libuv implementation. + +@trevnorris: looks like everybody’s leaning towards a full revert (or at least a partial revert). I don’t like this plan but will go along. + +@addaleax: Unfortunate to have to do full revert for *nix systems. But having alternate impl for Windows increases maintenance costs. + +As part of the new implementation, the `cache` parameter was removed from the method. It was created to improve perf for the JS impl but is considered less necessary since the native impl performs better anyway. + +Should we reinstate the `cache` parameter as part of the revert? Would this be a semver-major again? Does caching in the JS impl provide a significant perf benefit? + +@addaleax: Benchmarking fs perf will show how much benefit the caching capability in libuv provides. + +@mhdawson: we run two benchmarks nightly: one with caching and one without. + +@orangemocha: It seems okay to have two impl’s, one for Windows and one for *nix, increased maintenance surface isn’t a concern, libuv manages libuv impl. + +@rvagg: As we move v6 to LTS it would be best to have a known-good implementation. So would prefer a full revert, then fix libuv impl independently, then re-integrate. + +@thealphanerd: Could we provide both interfaces? Revert the primary one to original behavior and add a second one with libuv behavior? + +@rvagg: Still doesn’t address breaking change in Windows. + +@fishrock123: also in favor of reverting. This has been going on for a long time, best to revert and then fix. + +@orangemocha: should not compromise correctness for performance. + +@trevnorris: caching could be separated from fs API. For example, it could be part of `module` module. + +@rvagg: This is why I’m in favor of a full reversion. These other discussions may continue for a month and we need to correct problem now. + +@thealphanerd: do we have a list of the original bugs the libuv patch addressed? + +@saghul has a list. + +@rvagg: back to github for now. + +**Next steps**: continue discussion in GH. + +### v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) + +@thealphanerd is raising visibility for tests and feedback. + +@misterdjules may have some testers. + +### http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) + +@rvagg: Need choices to vote on. + +@ofrobots: Wants to explore more options including `map` so wait for vote. If the goal is to go to a map why don’t we do that now? + +@Fishrock123: Because community has taken dependencies on it being an object. + +@ofrobots: headers end up with “megamorphic IC’s” so wants to research further. + +@Fishrock123: We are fixing this because header names like `__proto__` conflict with default object properties. + +We should really just make an API for headers. + +@rvagg: We’ll come back to this next week. Prepare wording for vote if ready. + +**Next steps**: List available options and conduct vote next week. + + +## Q/A on public fora + +None. + +## Upcoming Meetings + +* CTC: 2016-07-27 +* TSC: 2016-07-28 +* Build: 2016-08-07 +* LTS: 2016-07-25 +* Diagnostics: 2016-08-03 +* Post-Mortem: August +* API: August From 94a82cd0a72ac2ae82d313df6b5f52898c0db1d0 Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Wed, 3 Aug 2016 15:01:46 -0700 Subject: [PATCH 040/221] doc: add CTC meeting minutes 2016-07-13 PR-URL: https://github.com/nodejs/node/pull/7968 Reviewed-By: James M Snell --- doc/ctc-meetings/2016-07-13.md | 236 +++++++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 doc/ctc-meetings/2016-07-13.md diff --git a/doc/ctc-meetings/2016-07-13.md b/doc/ctc-meetings/2016-07-13.md new file mode 100644 index 00000000000000..467b95deb28754 --- /dev/null +++ b/doc/ctc-meetings/2016-07-13.md @@ -0,0 +1,236 @@ +# Node Foundation CTC Meeting 2016-07-13 + +## Links + +* **Audio Recording**: TBP +* **GitHub Issue**: https://github.com/nodejs/node/issues/7707 +* [Minutes Google Doc](https://docs.google.com/document/d/1fP9_ZNcPoFh2VWCgUFu9-rDiDcMP88vhCC_oX6Aj528) +* _[Previous Minutes Google Doc](https://docs.google.com/document/d/1NWIKwYxDTApvc9Xbq5JTMorRPKIBuBKAA0zcjm8K_II)_ + +## Present + +* Anna Henningsen @addaleax (observer) +* Bradley Meck @bmeck (observer/GoDaddy/TC39) +* Ben Noordhuis @bnoordhuis (CTC) +* Colin Ihrig @cjihrig (CTC) +* Evan Lucas @evanlucas (CTC) +* Jeremiah Senkpiel @Fishrock123 (CTC) +* Fedor Indutny @indutny (CTC) +* Josh Gavant @joshgav (observer/Microsoft) +* Michael Dawson @mhdawson (CTC) +* Brian White @mscdex (CTC) +* Ali Ijaz Sheikh @ofrobots (CTC) +* Alexis Campailla @orangemocha (CTC) +* Rod Vagg @rvagg (CTC) +* Stephen Loomis @srl295 (observer/ICU) +* Myles Borins @TheAlphaNerd (observer) +* Trevor Norris @trevnorris (CTC) +* Rich Trott @Trott (CTC) + + +## Standup + +* Anna Henningsen @addaleax (observer) + * PRs & issues + * Some v4.x backports +* Bradley Meck @bmeck (observer/GoDaddy/TC39) + * Bad news from V8/Chakra. Can’t do property hoisting for Babel like CJS interop. + * Figuring out hooks for creating Modules in older Node versions +* Ben Noordhuis @bnoordhuis (CTC) + * Back-porting patches + * Moving stuff over from malloc() to new[] because of AIX + * ABI compatibility tool + * PRs & issues, of course - how could I forget? +* Colin Ihrig @cjihrig (CTC) + * Reviewed issues and PRs + * Opened a few PRs +* Evan Lucas @evanlucas (CTC) + * Simple doc fix + * Working on cherry-picking into v6.x +* Jeremiah Senkpiel @Fishrock123 (CTC) + * Fixed a TTY test that was silently failing for over a year + * misc PR & issue work +* Fedor Indutny @indutny (CTC) + * Various GYP-related tooling + * Code reviews, and fixing issues +* Josh Gavant @joshgav (observer/Microsoft) + * Diagnostics WG meeting + * debugging docs +* Michael Dawson @mhdawson (CTC) + * Added LinuxOne to v8 tests in CI + * Involvement on some AIX issues + * Working on ABI stable API, API WG meeting this week + * Re-scheduled post-mortem WG meeting for next week, LTS and diagnostic WG meetings + * misc reviews/lands and keeping up on issues +* Brian White @mscdex (CTC) + * Worked on PR to check for accidental git conflict markers when linting in CI + * Backported some commits to v4.x + * Reviewed PRs and commented on issues +* Ali Ijaz Sheikh @ofrobots (CTC) + * Back from vacation, buried in email (sorry for late responses!) +* Alexis Campailla @orangemocha (CTC) + * Investigating ABI incompatibilities. Preparing to drop VS 2013. + * Reviewed miscellaneous Windows issues. + * Resumed work on a PR for case normalization of the module cache on Windows +* Rod Vagg @rvagg (CTC) + * LTS README rework +* Steven Loomis @srl295 (observer/ICU) + * not much here, just trying to keep an eye on issues/PRs +* Myles Borins @TheAlphaNerd (observer) + * Working on v4.5.0 release https://github.com/nodejs/node/pull/7688 + * CITGM Enhancements (XML + Queue) + * Working with V8 team to improve workflow for managing floated commits https://github.com/nodejs/LTS/issues/111 +* Trevor Norris @trevnorris (CTC) + * Working fix for one of the realpath bugs + * Backporting for v4.x + * Working on AsyncWrap implementation details +* Rich Trott @Trott (CTC) + * Trying to handle flaky test outbreak on FreeBSD in CI + * Various ESLint updates/improvements + * Banging my head against test-tick-processor flakiness which is easily the longest-standing flaky test. + + +## Agenda + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + +### nodejs/node + +* build: drop support for VS 2013 in v7 [#7484](https://github.com/nodejs/node/pull/7484) +* Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/pull/7175) +* http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) +* v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) + +### nodejs/node-eps + +* proposal: WHATWG URL standard implementation [#28](https://github.com/nodejs/node-eps/pull/28) + + +## Previous Meeting + +### build: drop support for VS 2013 in v7 [#7484](https://github.com/nodejs/node/issues/7484) (@jasnell) + +To be discussed again. + +### Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/issues/7175) + +@trevnorris was to complete changes, to be discussed again. + +### Replace section 5.1 with unambiguous JavaScript grammar. [#33](https://github.com/nodejs/node-eps/pull/33) + +@jdalton’s proposal was merged. + +### AsyncWrap public API proposal [#18](https://github.com/nodejs/node-eps/pull/18) + +API was accepted, implementation TBD before October. + + +## Minutes + +### build: drop support for VS 2013 in v7 [#7484](https://github.com/nodejs/node/issues/7484) + +@orangemocha: Decision to drop in v7 isn’t controversial. Will need to add tests for modules compiled with 2013 used with Node compiled with 2015. + +@orangemocha: Main question is switching in v6 before LTS. Is it a breaking change? + +Issue with node-sass module only comes up on Windows XP so can be discounted. + +No way to be sure if user modules compiled with 2013 might be incompatible with Node compiled with 2015. Have to run tests. Will CITGM provide sufficient testing? + +@myles: may not be enough native modules in CITGM to provide confidence. + +@Fishrock123: be sure to also test on pre-gyp’ed modules. + +@orangemocha: we may never have complete confidence that this isn’t a breaking change, but node-sass is the only issue ever reported. + +@orangemocha: Should we support modules built with 2013 in v7? +@rvagg: need to include that in tests. + +**Next steps**: Run tests with modules compiled with 2013 to see if there are issues. Keep on agenda for next week and check on progress. + +### Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/pull/7175) + +* ELOOP fix: https://github.com/nodejs/node/pull/7548 +* Windows PR: https://github.com/nodejs/node/pull/7559 (see also https://github.com/nodejs/node/issues/7192) + +ELOOP issue has been resolved. Windows problem being addressed in another PR. May have to use JS impl for Windows. + +@rvagg: If libuv can’t handle the realpath issue for Windows what should we do? + +@orangemocha: We’re using the JS impl for Windows. + +@trevnorris: we can use the libuv impl and defer to the JS impl if the libuv impl throws unexpectedly. + +@rvagg: should we just revert? How common is the case where this provides a speed-up? + +@trevnorris: keep both libuv and js impl for now. + +**Next steps**: All please review #7548 and #7559. + +### http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) + +@mscdex: Prevent clash of header names with properties inherited from Object (e.g., __proto__). An object with a null prototype is already being used for the same purpose in `querystring.parse` since v6 release. + +@mscdex: Some have suggested cherry-picking some methods from Object such as `toString`: + + * So that object can be inspected. + * To ensure backward compatibility. + +@mscdex: An eventual goal may be to store headers in an ES6 Map instead of on a plain object, but that will change the API considerably. + +@evanlucas: we should follow what we did with query string parameters. + +@rvagg: first need to review as some opposition to that. + +**Next steps**: All review PR. + +### proposal: WHATWG URL standard implementation [node-eps#28](https://github.com/nodejs/node-eps/pull/28) + +@trevnorris: Some discussion about supporting unregistered schemes (e.g. `chrome://`). We should support them, Chrome supports them. + +@trevnorris: `url.parse` can handle incomplete URLs (e.g. no scheme). + +@rvagg: Most important question is should `URL` be a global? There would be a `url` module and a different `URL` global. + +@fishrock123: there would be a transition period and then functionality would be in `URL` + +@rvagg: new impl is quite different from existing `url` module. Would like to see a diff. Migration will be difficult. + +**Next steps**: Waiting for @jasnell to return. Review again next week. + +### v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) + +@thealphanerd: + +* Would like to include libuv v1.9.1. +* Would like very extensive testing prior to release to exclude breaking changes. + +How can we best test? + +@rvagg: Promote the RC on social media. + +@thealphanerd: npm could help test, Myles will reach out. + +@rvagg: Heroku? (Hunter Loftis) Travis CI? Probably not because it depends on nvm which doesn’t do RC’s yet. + +@thealphanerd: will talk with @ljharb about nvm support for RCs. + +**Next steps**: @thealphanerd will ping all to test RC. + +### ES Modules update + +@bmeck: named imports from CJS modules (e.g. `import {use, route} from "express"` or `import {readFile, readFileSync} from "fs"`) can’t work. + +Updates to come on the topic via: https://github.com/nodejs/node-eps/issues/26 + +## Q/A on public fora + +## Upcoming Meetings + +* CTC: 2016-07-20 +* TSC: 2016-07-14 +* Diagnostics: 2016-08-03 +* Post-Mortem: 2016-07-18 +* API: 2016-07-14 +* LTS: 2016-07-25 +* Build: 2016-07-19 From afbfbc04c9efa3c567b68cb2b612bada9934fedc Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Wed, 3 Aug 2016 14:35:48 -0700 Subject: [PATCH 041/221] tools: add .vscode folder to .gitignore PR-URL: https://github.com/nodejs/node/pull/7967 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Jackson Tian --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5eabf17883b951..8416e3bfccb1b8 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ ipch/ *.opensdf *.VC.opendb .vs/ +.vscode/ /config.mk /config.gypi From 6bfdc92860f8c46bf484b43873fbbde702cb0c94 Mon Sep 17 00:00:00 2001 From: Bryan English Date: Mon, 6 Jun 2016 16:28:50 -0700 Subject: [PATCH 042/221] doc: clarify "Reviewed-By" iff "LGTM" As per conversation with @Trott, make it clear that Reviewed-By lines should only be added for collaborators who've actually put a LGTM on the PR. PR-URL: https://github.com/nodejs/node/pull/7183 Reviewed-By: Myles Borins Reviewed-By: Evan Lucas Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: JacksonTian - Jackson Tian --- doc/onboarding.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/onboarding.md b/doc/onboarding.md index a53fe769090b35..a44d2170bca544 100644 --- a/doc/onboarding.md +++ b/doc/onboarding.md @@ -165,6 +165,7 @@ Landing a PR * `Reviewed-By: human ` * Easiest to use `git log` then do a search * (`/Name` + `enter` (+ `n` as much as you need to) in vim) + * Only include collaborators who have commented "LGTM" * `PR-URL: ` * `git push upstream master` * close the original PR with "Landed in ``". From e74daadeb62cde078abad595a0f2a7d98df80df0 Mon Sep 17 00:00:00 2001 From: yorkie Date: Sat, 6 Aug 2016 23:57:50 +0800 Subject: [PATCH 043/221] doc: clarify collaborators & ctc members relationships MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit inspired by this conversation https://github.com/nodejs/node/pull/7183#discussion_r73786541 PR-URL: https://github.com/nodejs/node/pull/7996 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Evan Lucas Reviewed-By: Colin Ihrig --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e87068c173ffee..a31c6ec0e1079e 100644 --- a/README.md +++ b/README.md @@ -319,8 +319,9 @@ more information about the governance of the Node.js project, see * [zkat](https://github.com/zkat) - **Kat Marchán** <kzm@sykosomatic.org> -Collaborators & CTC members follow the [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in -maintaining the Node.js project. +Collaborators (which includes CTC members) follow the +[COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in maintaining the Node.js +project. ### Release Team From d7e3edc7447fb97c3828725e72bf09d9fc96f105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D0=B2=D0=BE=D1=80=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Thu, 14 Jul 2016 12:46:04 +0300 Subject: [PATCH 044/221] tools: add remark-lint configuration in .remarkrc Specifies the configuration for remark-lint, a markdown linter. This configuration does not cause any warnings on any of the currently present *.md files (ignoring thirdparty). It is useful not only for possible future tooling that would check the markdown files syntax, but also as a configuration for editor plugins, e.g. linter-markdown for atom-linter. Refs: https://github.com/nodejs/node/pull/7637 Refs: https://github.com/nodejs/node/pull/7727 Refs: https://github.com/nodejs/node/pull/7757 PR-URL: https://github.com/nodejs/node/pull/7729 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Robert Jefe Lindstaedt --- .remarkrc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .remarkrc diff --git a/.remarkrc b/.remarkrc new file mode 100644 index 00000000000000..d00f2c2488286d --- /dev/null +++ b/.remarkrc @@ -0,0 +1,35 @@ +{ + "plugins": { + "remark-lint": { + "code-block-style": false, + "definition-case": false, + "emphasis-marker": false, + "first-heading-level": false, + "heading-increment": false, + "list-item-content-indent": false, + "list-item-bullet-indent": false, + "list-item-indent": false, + "list-item-spacing": false, + "maximum-heading-length": false, + "maximum-line-length": false, + "no-consecutive-blank-lines": false, + "no-duplicate-headings": false, + "no-emphasis-as-heading": false, + "no-file-name-articles": false, + "no-file-name-irregular-characters": false, + "no-heading-punctuation": false, + "no-html": false, + "no-inline-padding": false, + "no-shell-dollars": false, + "no-shortcut-reference-link": false, + "no-literal-urls": false, + "no-missing-blank-lines": false, + "no-multiple-toplevel-headings": false, + "no-undefined-references": false, + "ordered-list-marker-style": false, + "ordered-list-marker-value": false, + "table-pipe-alignment": false, + "unordered-list-marker-style": false + } + } +} From 98fe74fbc89989b2a83dd4369eba9186133742e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D0=B2=D0=BE=D1=80=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Sat, 6 Aug 2016 00:34:04 +0300 Subject: [PATCH 045/221] doc: fix a markdown error in CTC meeting minutes This fixes a markdown formatting error in 2016-07-13 CTC meeting minutes, __proto__ was rendered incorrectly. This was found by remark-lint. PR-URL: https://github.com/nodejs/node/pull/7729 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Robert Jefe Lindstaedt --- doc/ctc-meetings/2016-07-13.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ctc-meetings/2016-07-13.md b/doc/ctc-meetings/2016-07-13.md index 467b95deb28754..0c38f3b066a13a 100644 --- a/doc/ctc-meetings/2016-07-13.md +++ b/doc/ctc-meetings/2016-07-13.md @@ -169,7 +169,7 @@ ELOOP issue has been resolved. Windows problem being addressed in another PR. Ma ### http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) -@mscdex: Prevent clash of header names with properties inherited from Object (e.g., __proto__). An object with a null prototype is already being used for the same purpose in `querystring.parse` since v6 release. +@mscdex: Prevent clash of header names with properties inherited from Object (e.g., `__proto__`). An object with a null prototype is already being used for the same purpose in `querystring.parse` since v6 release. @mscdex: Some have suggested cherry-picking some methods from Object such as `toString`: From 532bbde4bf79feeeafe7663c3031ad0c580e3fd0 Mon Sep 17 00:00:00 2001 From: Josh Gavant Date: Thu, 4 Aug 2016 13:45:47 -0700 Subject: [PATCH 046/221] doc: add CTC meeting minutes 2016-08-03 PR-URL: https://github.com/nodejs/node/pull/7980 Reviewed-By: James M Snell Reviewed-By: Rich Trott --- doc/ctc-meetings/2016-08-03.md | 336 +++++++++++++++++++++++++++++++++ 1 file changed, 336 insertions(+) create mode 100644 doc/ctc-meetings/2016-08-03.md diff --git a/doc/ctc-meetings/2016-08-03.md b/doc/ctc-meetings/2016-08-03.md new file mode 100644 index 00000000000000..96884b42e1d381 --- /dev/null +++ b/doc/ctc-meetings/2016-08-03.md @@ -0,0 +1,336 @@ +# Node Foundation CTC Meeting 2016-08-03 + +## Links + +* **Audio Recording**: TBP +* **GitHub Issue**: https://github.com/nodejs/node/issues/7948 +* **Minutes Google Doc**: +* _Previous Minutes Google Doc: _ + + +## Present + +* Anna Henningsen @addaleax (observer) +* Bradley Meck @bmeck (observer/GoDaddy/TC39) +* Ben Noordhuis @bnoordhuis (CTC) +* Сковорода Никита Андреевич @ChALkeR (CTC) +* Colin Ihrig @cjihrig (CTC) +* Evan Lucas @evanlucas (CTC) +* Jeremiah Senkpiel @Fishrock123 (CTC) +* James M Snell @jasnell (CTC) +* Josh Gavant @joshgav (observer/Microsoft) +* Michael Dawson @mhdawson (CTC) +* Brian White @mscdex (CTC) +* Ali Ijaz Sheikh @ofrobots (CTC) +* Bert Belder @piscisaureus (CTC) +* Saúl Ibarra Corretgé @saghul (observer) +* Rich Trott @Trott (CTC) + + +## Standup + +* Anna Henningsen @addaleax (observer) + * Issues & PR review +* Bradley Meck @bmeck (observer/GoDaddy/TC39) + * Went to TC39 + * Modules are going to take a different direction +* Ben Noordhuis @bnoordhuis (CTC) + * Nothing special. +* Сковорода Никита Андреевич @ChALkeR (CTC) + * Working on the npm dataset rebuilding tool. Some comments on issues and PRs as usual. +* Colin Ihrig @cjihrig (CTC) + * Was on vacation + * Reviewing issues and PRs since I've been back +* Evan Lucas @evanlucas (CTC) + * A little cherry-picking to v6.x + * Working on getting commit validator running for PRs +* Jeremiah Senkpiel @Fishrock123 (CTC) + * Mostly away, experimenting with nucleus-js. +* James M Snell @jasnell (CTC) + * Node Summit + * Exploring the possibility of an HTTP/2 implementation in core + * Continued evaluation of the WHATWG URL implementation + * Foundation-y / TSC-y stuff + * Reviewing PRs, catching up still from vacation +* Josh Gavant @joshgav (observer/Microsoft) + * internal stuff, vacation +* Michael Dawson @mhdawson (CTC) + * Node Summit/catching up on issues after Node Summit + * Starting to add linuxOne release machine/jobs + * Adding new AIX machine from osuosl + * landed a few minutes PRs +* Brian White @mscdex (CTC) + * Commenting on issues/PRs. +* Ali Ijaz Sheikh @ofrobots (CTC) + * Node Summit & internal stuff. Spent rest of time shepherding some backports. + * Planning on writing a proposal for managing V8 for LTS +* Bert Belder @piscisaureus (CTC) + * Commented on an issue. +* Rich Trott @Trott (CTC) + * CTC/governance documentation updates + * Onboarding (danbev postponed but we’ll get there, now scheduling with fhinkel, additional nominees welcome) + * fixed a flaky test, investigating others + +## Agenda + +Extracted from **ctc-agenda** labelled issues and pull requests from the **nodejs org** prior to the meeting. + +### nodejs/node + +* CTC membership nomination: @addaleax [#7607](https://github.com/nodejs/node/issues/7607) + +* Revert fs changes [#7846](https://github.com/nodejs/node/pull/7846) + +* [meta] realpath issues in v6 [#7726](https://github.com/nodejs/node/issues/7726) + +* v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) + +* build: drop support for VS 2013 in v7 [#7484](https://github.com/nodejs/node/issues/7484) + +* http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) + + +### nodejs/node-eps + +* proposal: WHATWG URL standard implementation [#28](https://github.com/nodejs/node-eps/pull/28) + +### other + +* doc: @piscisaureus has stepped-down from the CTC [#7969](https://github.com/nodejs/node/pull/7969) + +## Previous Meeting + +### nodejs/node + +* Role of CTC in semver-major changes needs clarification [#7848](https://github.com/nodejs/node/issues/7848) +* Revert fs changes [#7846](https://github.com/nodejs/node/pull/7846) +* doc: add information about CTC quorum rules [#7813](https://github.com/nodejs/node/pull/7813) +* meta: provide example activities [#7744](https://github.com/nodejs/node/pull/7744) +* meta: realpath issues in v6 [#7726](https://github.com/nodejs/node/issues/7726) +* v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) +* punycode: deprecate punycode module [#7552](https://github.com/nodejs/node/pull/7552) +* Node 6 fs.realpath behavior changes [#7175](https://github.com/nodejs/node/issues/7175) +* http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) +* Seek legal advice on LICENSE and copyright blocks in code [#3979](https://github.com/nodejs/node/issues/3979) + +### nodejs/post-mortem + +* Repositories to contribute collaboratively [#30](https://github.com/nodejs/post-mortem/issues/30) + +### nodejs/node-eps + +* proposal: WHATWG URL standard implementation [#28](https://github.com/nodejs/node-eps/pull/28) + +## Minutes + +### CTC membership nomination: @addaleax [#7607](https://github.com/nodejs/node/issues/7607) + +Unanimous `aye`. + +**Next steps**: @rvagg to merge. + +--- + +### Revert fs changes [#7846](https://github.com/nodejs/node/pull/7846) + +Reverts: +https://github.com/nodejs/node/pull/7846 +https://github.com/nodejs/node/pull/7950 + +Warn instead of throw when callback is omitted, as in v5: +https://github.com/nodejs/node/pull/7897 + +@bnoordhuis: This change makes omitting the callback an immediate error. + +@trott: What do we need to do to get those PRs to land? + +@addaleax: Myles split off one commit to [#7950](https://github.com/nodejs/node/pull/7950). Not controversial, was requested by CTC last week. +This must be landed prior to #7846. + +@jasnell: Would like to see a CI and CITGM run and some additional testing to make sure we have exactly the right set of reverts. @jasnell will start it. + +@bnoordhuis: We need to print a deprecation warning [instead of throwing, when no callback]. + +@addaleax: That’s the plan after the reverts have landed. @thefourtheye plans to work on it. [see #7897]) + +@jasnell: process warning or deprecation warning? Will we use `util.printDeprecationWarning` or `process.emitWarning()`? +Deprecation warning is semver-major, process warning is semver-minor or even patch. + +[It's `printDeprecationWarning`, see [here](https://github.com/thefourtheye/io.js/blob/8c65f7b6a253ab4e26ffe0de791dc41fcee92244/lib/fs.js#L48).] + +@addaleax: PR to print warning already opened. Could be used instead of reverting, but we agreed to revert last week and it blocks the realpath revert. + +@Fishrock123: Unbreaking a break and replacing with warning shouldn’t be semver-major. + +@trott: @jasnell’s PR on semver policies says it should be semver-major. + +@Fishrock123: Since we already changed it in the v6 transition let’s just change it to a deprecation. + +@trott: Let’s do the reverts (#7846, #7950), discuss deprecation warning separately in GH (#7897). + +OK with everybody. + +**Next steps**: Do the reverts (#7846, #7950). Continue discussion on throw -> warning in #7897. + +--- + +### [meta] realpath issues in v6 [#7726](https://github.com/nodejs/node/issues/7726) + +@trott: Last week we concluded that Anna, Trevor, or Alexis would move it forward. + +@trott: Just the two reverts that are blocking. + +@addaleax: Yes. + +@saghul: Old JS impl did not resolve subst’ed drives. New libuv impl does. A test looks for the new behavior. ] + +@saghul: Some people are relying on the old JS impl behavior to shorten paths on Windows. What are the right semantics? Should `subst`ed drives resolve to original path or to shortened path? + +@piscisaureus: The whole reason we use realpath in `module` is to avoid a module being loaded multiple times via multiple symlinked paths. So the goal should be to always resolve to the true path. + +@piscisaureus: Path limit is 64k not likely to encounter. + +@saghul: There’s a test for the new code which expects realpath on a subst’ed drive to give the original path. We need to revert this test for reverted behavior. + +@addaleax: Reverting to fs JS impl would return to old behavior. + +@trott: Submit a PR to remove that test, or move to known issues tests. + +@piscisaureus: Leave the test to track changes in the future. + +@Fishrock123: Key is to revert to an impl the ecosystem is depending on. Discuss this in another PR in GitHub. + +@jasnell: It’s a revert of the internal impl, not the changed public API [i.e. so we have to consider it now.] + +What about reverting the removal of the `cache` option? + +@addaleax: Not including the `cache` option now would allow additional/alternate improvements in the future. + +@bnoordhuis: Are these changes to land in v7? + +@jasnell: The idea is to get these into *v6* before it goes LTS. + +* The realpath change would land in v6. +* The other changes (revert throwing error on callback) is only in master and would not land in v6. +* Are the realpath changes dependent on the others? +* Only Myles’ changes conflict with realpath [see previous item]. + +@jasnell: Do we have the steps lined up? + +@addaleax: Myles revert (#7846, #7950), then realpath revert. + +@? apply semver-major changes that were reverted, with deprecation warning. + +@chalker: Can we keep tests which were added? Revert removes some tests which aren’t actually related to changes. + +@piscisareus: Same as @saghul’s comment, and we agreed to keep the new tests. So yes we should keep them. + +**Next steps**: + +* Modify PR to keep tests related to new behavior for reference. +* Apply Myles' reverts (#7846, #7950) +* Apply `realpath` revert. +* Discuss other items (e.g. throw -> deprecation, proper realpath for subst'ed drives, cache impl) in GH issues. + +--- + +### v4.5.0 proposal [#7688](https://github.com/nodejs/node/pull/7688) + +@trott: Please test the RCs. + +@mhdawson and @jasnell: Building at IBM and not encountered anything. + +--- + +### build: drop support for VS 2013 in v7 [#7484](https://github.com/nodejs/node/issues/7484) + +@bnoordhuis: Based on @joaocgreis’s comment we can move from 2013 without trouble. + +@joshgav: @joaocgreis tested against many modules and with CITGM and encountered no problems. + +@piscisaureus: Can we wait for semver-major? + +@joshgav: Then we’ll be stuck with 2013 through out v6 LTS. + +@piscisaureus: Should we make another issue for v6? + +@jasnell: Let’s get this landed in master and test it out, then make a decision on putting in v6 before October. + +@trott: Getting pretty close, don’t want to be switching just a month before. + +**Next steps**: + +* Merge to master and test. +* Determine in September if we can apply in v6. + +--- + +### http: don't inherit from Object.prototype [#6102](https://github.com/nodejs/node/pull/6102) + +@chrisdickinson has concerns, @mscdex contacted. No response yet. + +@Fishrock123: Let’s remove `ctc-agenda` tag for next week. + +@jasnell: Plenty of discussion, heard from Doug Wilson that it’s a positive change. Would rather not hold up waiting for a response. Would be best to land before v7. + +@ofrobots: If we are going to change this we should have a plan for if/how we’ll get to maps. + +@Fishrock123: There are too many people currently depending on this being a regular object. + +@ofrobots: We shouldn’t break the ecosystem twice. We should target something with maps for v8 or longer timeframe. + +@Fishrock123: Motivation is ? + +Some feel we should wait for maps before making a breaking change. Jeremiah feels we should make an effective change now and not wait for an unknown future. + +@Fishrock123: We’ll need to provide both old and new APIs side by side, and that could be hard to do with maps. + +@ofrobots: We can delegate old API to a Proxy and add deprecation warnings on that handler. + +@?: Is Proxy performant enough? + +@ofrobots: For a deprecated path is it okay to take a performance hit? + +@evan: Okay with current change proposal (i.e. to not inherit from Object) as long as it’s considered semver-major. + +@jasnell will work on this. + +**Next steps**: Decide whether to merge this or wait for maps-based impl. + +--- + +### nodejs/node-eps proposal: WHATWG URL standard implementation [#28](https://github.com/nodejs/node-eps/pull/28) + +@trott: briefing now, longer discussion next week. + +@jasnell: Everyone keep reviewing it. Goal is to land as “experimental” in master, doesn’t have to go in v6. + +@trevnorris: -1 on global `URL` variable. + +@Fishrock123 also against new globals other than lang features. + +@jasnell: It’s a global in browsers. It can be removed, it’s in its own commit. + +**Next steps**: @nodejs/ctc review @jasnell's proposal. Discuss next week. + +--- + +### doc: @piscisaureus has stepped-down from the CTC [#7969](https://github.com/nodejs/node/pull/7969) + +@Fishrock123: submit PR to remove @piscisaureus and/or move to Collaborator. + +--- + +## Q/A on public fora + +No questions. + +## Upcoming Meetings + +* CTC: 2016-08-03 +* TSC: 2016-07-28 +* Build: 2016-08-07 +* LTS: 2016-07-25 +* Diagnostics: Sept +* Post-Mortem: August +* API: August From d3344aa2168310453daa709359cac82ee56b243e Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Wed, 10 Aug 2016 19:03:09 +0200 Subject: [PATCH 047/221] doc: Add fhinkel to collaborators Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Rich Trott PR-URL: https://github.com/nodejs/node/pull/8052 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a31c6ec0e1079e..dc8363b492cc58 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,8 @@ more information about the governance of the Node.js project, see **Robert Jefe Lindstaedt** <robert.lindstaedt@gmail.com> * [estliberitas](https://github.com/estliberitas) - **Alexander Makarenko** <estliberitas@gmail.com> +* [fhinkel](https://github.com/fhinkel) - +**Franziska Hinkelmann** <franziska.hinkelmann@gmail.com> * [firedfox](https://github.com/firedfox) - **Daniel Wang** <wangyang0123@gmail.com> * [geek](https://github.com/geek) - From 04515b891ae22a47c0a4cf74930a183531af404d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 10 Aug 2016 17:08:59 -0700 Subject: [PATCH 048/221] doc: move orangemocha to collaborators list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/8062 Reviewed-By: James M Snell Reviewed-By: Johan Bergström Reviewed-By: Anna Henningsen --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc8363b492cc58..daf5da14dcf71d 100644 --- a/README.md +++ b/README.md @@ -179,8 +179,6 @@ more information about the governance of the Node.js project, see **Brian White** <mscdex@mscdex.net> * [ofrobots](https://github.com/ofrobots) - **Ali Ijaz Sheikh** <ofrobots@google.com> -* [orangemocha](https://github.com/orangemocha) - -**Alexis Campailla** <orangemocha@nodejs.org> * [rvagg](https://github.com/rvagg) - **Rod Vagg** <rod@vagg.org> * [shigeki](https://github.com/shigeki) - @@ -256,6 +254,8 @@ more information about the governance of the Node.js project, see **Christopher Monsanto** <chris@monsan.to> * [Olegas](https://github.com/Olegas) - **Oleg Elifantiev** <oleg@elifantiev.ru> +* [orangemocha](https://github.com/orangemocha) - +**Alexis Campailla** <orangemocha@nodejs.org> * [othiym23](https://github.com/othiym23) - **Forrest L Norvell** <ogd@aoaioxxysz.net> * [petkaantonov](https://github.com/petkaantonov) - From 727c24f3a22ee0159b0066405dda526d46187c58 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 12 Aug 2016 14:34:11 -0700 Subject: [PATCH 049/221] doc: update Reviewing section of onboarding doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL; https://github.com/nodejs/node/pull/8086 Reviewed-By: Anna Henningsen Reviewed-By: targos - Michaël Zasso Reviewed-By: Franziska Hinkelmann Reviewed-By: Evan Lucas Reviewed-By: jasnell - James M Snell --- doc/onboarding.md | 56 ++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/doc/onboarding.md b/doc/onboarding.md index a44d2170bca544..991809df1ea40a 100644 --- a/doc/onboarding.md +++ b/doc/onboarding.md @@ -64,31 +64,37 @@ onboarding session. * will also come more naturally over time - * reviewing: - * primary goal is for the codebase to improve - * secondary (but not far off) is for the person submitting code to succeed - * helps grow the community - * and draws new people into the project - * Review a bit at a time. It is **very important** to not overwhelm newer people. - * it is tempting to micro-optimize / make everything about relative perf, - don't succumb to that temptation. we change v8 a lot more often now, contortions - that are zippy today may be unnecessary in the future - * be aware: your opinion carries a lot of weight! - * nits are fine, but try to avoid stalling the PR - * note that they are nits when you comment - * if they really are stalling nits, fix them yourself on merge (but try to let PR authors know they can fix these) - * improvement doesn't have to come all at once - * minimum wait for comments time - * There is a minimum waiting time which we try to respect for non-trivial changes, so that people who may have important input in such a distributed project are able to respond. - * It may help to set time limits and expectations: - * the collaborators are very distributed so it is unlikely that they will be looking at stuff the same time as you are. - * before merging code: give folks at least one working day to respond: "If no one objects, tomorrow at