Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1196355
test: fix spelling in test case comments
tniessen Jan 6, 2018
377fe93
fs: fix `createReadStream(…, {end: n})` for non-seekable fds
addaleax Mar 13, 2018
96c8781
test: remove mark flaky for moved test
BethGriggs Mar 1, 2018
1e1478a
crypto: reuse variable instead of reevaluation
tniessen Dec 18, 2017
7d0cdf2
test: make common.mustNotCall show file:linenumber
lance Nov 22, 2017
630a306
test: remove n-api intermediate files
Mar 15, 2018
bf88a08
test: remove orphaned entries from status
kfarnung Feb 27, 2018
94a954a
http: free the parser before emitting 'upgrade'
lpinca Jan 17, 2018
0f593be
stream: simplify `src._readableState` to `state`
Jan 20, 2018
1bc9c4e
doc: reorder section on updating PR branch
ofrobots Jan 24, 2018
dd6bcc6
doc: add Gibson Fahnestock to TSC
Trott Jan 31, 2018
83e5f41
doc: move Brian White to TSC Emeriti list
Trott Jan 31, 2018
9c4f6f5
doc: streamline README intro
Trott Jan 31, 2018
de312a3
test: verify the shell option works properly on execFile
jvelezpo Jan 25, 2018
67e9498
build: allow x86_64 as a dest_cpu alias for x64
rvagg Jan 9, 2018
5dade66
net: remove redundant code from _writeGeneric()
lpinca Jan 29, 2018
ebd9a18
test: update references to archived repository
tniessen Dec 31, 2017
096e4c6
readline: update references to archived repository
tniessen Dec 31, 2017
ddcfffb
build: refine static and shared lib build
yhwang Dec 5, 2017
eeaecce
stream: remove unreachable code
lpinca Jan 18, 2018
e22a645
test: use correct size in test-stream-buffer-list
lpinca Jan 18, 2018
4444802
doc: linkify missing types
vsemozhetbyt Jan 29, 2018
a47fda4
win, build: fix without-intl option
bzoz Dec 11, 2017
d4d4cec
win, build: fix intl-none option
poiru Jan 22, 2018
0a4c79b
process: fix reading zero-length env vars on win32
addaleax Jan 30, 2018
bc22bf0
tools: non-Ascii linter for /lib only
SirR4T Jan 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,20 +593,20 @@ Validate that the commit message is properly formatted using
$ git rev-list upstream/master...HEAD | xargs core-validate-commit
```

Optional: When landing your own commits, force push the amended commit to the
branch you used to open the pull request. If your branch is called `bugfix`,
then the command would be `git push --force-with-lease origin master:bugfix`.
When the pull request is closed, this will cause the pull request to
show the purple merged status rather than the red closed status that is
usually used for pull requests that weren't merged.

Time to push it:

```text
$ git push upstream master
```
* Optional: Force push the amended commit to the branch you used to
open the pull request. If your branch is called `bugfix`, then the
command would be `git push --force-with-lease origin master:bugfix`.
When the pull request is closed, this will cause the pull request to
show the purple merged status rather than the red closed status that is
usually used for pull requests that weren't merged. Only do this when
landing your own contributions.

* Close the pull request with a "Landed in `<commit hash>`" comment. If
Close the pull request with a "Landed in `<commit hash>`" comment. If
your pull request shows the purple merged status then you should still
add the "Landed in <commit hash>..<commit hash>" comment if you added
multiple commits.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
<a title="CII Best Practices" href="https://bestpractices.coreinfrastructure.org/projects/29"><img src="https://bestpractices.coreinfrastructure.org/projects/29/badge"></a>
</p>

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js
uses an event-driven, non-blocking I/O model that makes it lightweight and
efficient. The Node.js package ecosystem, [npm][], is the largest ecosystem of
open source libraries in the world.
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. For
more information on using Node.js, see the
[Node.js Website][].

The Node.js project is supported by the
[Node.js Foundation](https://nodejs.org/en/foundation/). Contributions,
Expand Down Expand Up @@ -248,6 +247,8 @@ For more information about the governance of the Node.js project, see
**Franziska Hinkelmann** &lt;franziska.hinkelmann@gmail.com&gt; (she/her)
* [Fishrock123](https://github.com/Fishrock123) -
**Jeremiah Senkpiel** &lt;fishrock123@rocketmail.com&gt;
* [gibfahn](https://github.com/gibfahn) -
**Gibson Fahnestock** &lt;gibfahn@gmail.com&gt; (he/him)
* [indutny](https://github.com/indutny) -
**Fedor Indutny** &lt;fedor.indutny@gmail.com&gt;
* [jasnell](https://github.com/jasnell) -
Expand All @@ -258,8 +259,6 @@ For more information about the governance of the Node.js project, see
**Matteo Collina** &lt;matteo.collina@gmail.com&gt; (he/him)
* [mhdawson](https://github.com/mhdawson) -
**Michael Dawson** &lt;michael_dawson@ca.ibm.com&gt; (he/him)
* [mscdex](https://github.com/mscdex) -
**Brian White** &lt;mscdex@mscdex.net&gt;
* [MylesBorins](https://github.com/MylesBorins) -
**Myles Borins** &lt;myles.borins@gmail.com&gt; (he/him)
* [ofrobots](https://github.com/ofrobots) -
Expand All @@ -285,6 +284,8 @@ For more information about the governance of the Node.js project, see
**Isaac Z. Schlueter** &lt;i@izs.me&gt;
* [joshgav](https://github.com/joshgav) -
**Josh Gavant** &lt;josh.gavant@outlook.com&gt;
* [mscdex](https://github.com/mscdex) -
**Brian White** &lt;mscdex@mscdex.net&gt;
* [nebrius](https://github.com/nebrius) -
**Bryan Hughes** &lt;bryan@nebri.us&gt;
* [orangemocha](https://github.com/orangemocha) -
Expand Down Expand Up @@ -594,7 +595,6 @@ Previous releases may also have been signed with one of the following GPG keys:
* [Contributing to the project][]
* [Working Groups][]

[npm]: https://www.npmjs.com
[Code of Conduct]: https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md
[Contributing to the project]: CONTRIBUTING.md
[Node.js Help]: https://github.com/nodejs/help
Expand Down
14 changes: 12 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ parser = optparse.OptionParser()
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
'android', 'aix')
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
'ppc64', 'x32','x64', 'x86', 's390', 's390x')
'ppc64', 'x32','x64', 'x86', 'x86_64', 's390', 's390x')
valid_arm_float_abi = ('soft', 'softfp', 'hard')
valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
valid_mips_arch = ('loongson', 'r1', 'r2', 'r6', 'rx')
Expand Down Expand Up @@ -825,6 +825,9 @@ def configure_node(o):
# the Makefile resets this to x86 afterward
if target_arch == 'x86':
target_arch = 'ia32'
# x86_64 is common across linuxes, allow it as an alias for x64
if target_arch == 'x86_64':
target_arch = 'x64'
o['variables']['host_arch'] = host_arch
o['variables']['target_arch'] = target_arch
o['variables']['node_byteorder'] = sys.byteorder
Expand All @@ -842,7 +845,6 @@ def configure_node(o):
configure_mips(o)

if flavor == 'aix':
o['variables']['node_core_target_name'] = 'node_base'
o['variables']['node_target_type'] = 'static_library'

if target_arch in ('x86', 'x64', 'ia32', 'x32'):
Expand Down Expand Up @@ -942,6 +944,13 @@ def configure_node(o):
else:
o['variables']['coverage'] = 'false'

if options.shared:
o['variables']['node_target_type'] = 'shared_library'
elif options.enable_static:
o['variables']['node_target_type'] = 'static_library'
else:
o['variables']['node_target_type'] = 'executable'

def configure_library(lib, output):
shared_lib = 'shared_' + lib
output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib))
Expand Down Expand Up @@ -1437,6 +1446,7 @@ config = {
'BUILDTYPE': 'Debug' if options.debug else 'Release',
'USE_XCODE': str(int(options.use_xcode or 0)),
'PYTHON': sys.executable,
'NODE_TARGET_TYPE': variables['node_target_type'],
}

if options.prefix:
Expand Down
2 changes: 1 addition & 1 deletion doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ It is not emitted in the worker.
added: v0.7.7
-->

* Returns: {Worker} A reference to `worker`.
* Returns: {cluster.Worker} A reference to `worker`.

In a worker, this function will close all servers, wait for the `'close'` event on
those servers, and then disconnect the IPC channel.
Expand Down
14 changes: 7 additions & 7 deletions doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ Interface's `input` *as if it were provided by the user*.
added: v0.7.7
-->

* `stream` {Writable}
* `stream` {stream.Writable}
* `dir` {number}
* `-1` - to the left from cursor
* `1` - to the right from cursor
Expand All @@ -338,7 +338,7 @@ in a specified direction identified by `dir`.
added: v0.7.7
-->

* `stream` {Writable}
* `stream` {stream.Writable}

The `readline.clearScreenDown()` method clears the given [TTY][] stream from
the current position of the cursor down.
Expand All @@ -349,9 +349,9 @@ added: v0.1.98
-->

* `options` {Object}
* `input` {Readable} The [Readable][] stream to listen to. This option is
* `input` {stream.Readable} The [Readable][] stream to listen to. This option is
*required*.
* `output` {Writable} The [Writable][] stream to write readline data to.
* `output` {stream.Writable} The [Writable][] stream to write readline data to.
* `completer` {Function} An optional function used for Tab autocompletion.
* `terminal` {boolean} `true` if the `input` and `output` streams should be
treated like a TTY, and have ANSI/VT100 escape codes written to it.
Expand Down Expand Up @@ -431,7 +431,7 @@ function completer(linePartial, callback) {
added: v0.7.7
-->

* `stream` {Writable}
* `stream` {stream.Writable}
* `x` {number}
* `y` {number}

Expand All @@ -443,7 +443,7 @@ given [TTY][] `stream`.
added: v0.7.7
-->

* `stream` {Readable}
* `stream` {stream.Readable}
* `interface` {readline.Interface}

The `readline.emitKeypressEvents()` method causes the given [Readable][]
Expand All @@ -469,7 +469,7 @@ if (process.stdin.isTTY)
added: v0.7.7
-->

* `stream` {Writable}
* `stream` {stream.Writable}
* `dx` {number}
* `dy` {number}

Expand Down
4 changes: 2 additions & 2 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,9 @@ added: v0.1.91

* `options` {Object | string}
* `prompt` {string} The input prompt to display. Defaults to `> `.
* `input` {Readable} The Readable stream from which REPL input will be read.
* `input` {stream.Readable} The Readable stream from which REPL input will be read.
Defaults to `process.stdin`.
* `output` {Writable} The Writable stream to which REPL output will be
* `output` {stream.Writable} The Writable stream to which REPL output will be
written. Defaults to `process.stdout`.
* `terminal` {boolean} If `true`, specifies that the `output` should be
treated as a TTY terminal, and have ANSI/VT100 escape codes written to it.
Expand Down
8 changes: 4 additions & 4 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ added: v0.11.15
-->

* `encoding` {string} The new default encoding
* Returns: `this`
* Returns: {this}

The `writable.setDefaultEncoding()` method sets the default `encoding` for a
[Writable][] stream.
Expand Down Expand Up @@ -771,7 +771,7 @@ readable.isPaused(); // === false
added: v0.9.4
-->

* Returns: `this`
* Returns: {this}

The `readable.pause()` method will cause a stream in flowing mode to stop
emitting [`'data'`][] events, switching out of flowing mode. Any data that
Expand Down Expand Up @@ -903,7 +903,7 @@ event has been emitted will return `null`. No runtime error will be raised.
added: v0.9.4
-->

* Returns: `this`
* Returns: {this}

The `readable.resume()` method causes an explicitly paused Readable stream to
resume emitting [`'data'`][] events, switching the stream into flowing mode.
Expand All @@ -926,7 +926,7 @@ added: v0.9.4
-->

* `encoding` {string} The encoding to use.
* Returns: `this`
* Returns: {this}

The `readable.setEncoding()` method sets the character encoding for
data read from the Readable stream.
Expand Down
1 change: 1 addition & 0 deletions lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ rules:
buffer-constructor: error
no-let-in-for-declaration: error
lowercase-name-for-primitive: error
non-ascii-character: error
2 changes: 1 addition & 1 deletion lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ function socketOnData(d) {
socket.removeListener('data', socketOnData);
socket.removeListener('end', socketOnEnd);
parser.finish();
freeParser(parser, req, socket);

var bodyHead = d.slice(bytesParsed, d.length);

Expand All @@ -398,7 +399,6 @@ function socketOnData(d) {
// Got Upgrade header or CONNECT method, but have no handler.
socket.destroy();
}
freeParser(parser, req, socket);
} else if (parser.incoming && parser.incoming.complete &&
// When the status code is 100 (Continue), the server will
// send a final response after this client sends a request
Expand Down
4 changes: 2 additions & 2 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,8 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
if (((state.pipesCount === 1 && state.pipes === dest) ||
(state.pipesCount > 1 && state.pipes.indexOf(dest) !== -1)) &&
!cleanedUp) {
debug('false write response, pause', src._readableState.awaitDrain);
src._readableState.awaitDrain++;
debug('false write response, pause', state.awaitDrain);
state.awaitDrain++;
increasedAwaitDrain = true;
}
src.pause();
Expand Down
11 changes: 9 additions & 2 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1919,8 +1919,7 @@ function ReadStream(path, options) {
this.flags = options.flags === undefined ? 'r' : options.flags;
this.mode = options.mode === undefined ? 0o666 : options.mode;

this.start = typeof this.fd !== 'number' && options.start === undefined ?
0 : options.start;
this.start = options.start;
this.end = options.end;
this.autoClose = options.autoClose === undefined ? true : options.autoClose;
this.pos = undefined;
Expand All @@ -1943,6 +1942,12 @@ function ReadStream(path, options) {
this.pos = this.start;
}

// Backwards compatibility: Make sure `end` is a number regardless of `start`.
// TODO(addaleax): Make the above typecheck not depend on `start` instead.
// (That is a semver-major change).
if (typeof this.end !== 'number')
this.end = Infinity;

if (typeof this.fd !== 'number')
this.open();

Expand Down Expand Up @@ -1996,6 +2001,8 @@ ReadStream.prototype._read = function(n) {

if (this.pos !== undefined)
toRead = Math.min(this.end - this.pos + 1, toRead);
else
toRead = Math.min(this.end - this.bytesRead + 1, toRead);

// already read everything we were supposed to read!
// treat as EOF.
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function setupConfig(_source) {
};
Object.defineProperty(Intl, 'v8BreakIterator', des);
}
// Dont let icu_data_dir leak through.
// Don't let icu_data_dir leak through.
delete process.icu_data_dir;
}

Expand Down
2 changes: 0 additions & 2 deletions lib/internal/streams/BufferList.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ BufferList.prototype.join = function(s) {
BufferList.prototype.concat = function(n) {
if (this.length === 0)
return Buffer.alloc(0);
if (this.length === 1)
return this.head.data;
const ret = Buffer.allocUnsafe(n >>> 0);
var p = this.head;
var i = 0;
Expand Down
8 changes: 1 addition & 7 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,13 +710,7 @@ Socket.prototype._writeGeneric = function(writev, data, encoding, cb) {
// Retain chunks
if (err === 0) req._chunks = chunks;
} else {
var enc;
if (data instanceof Buffer) {
enc = 'buffer';
} else {
enc = encoding;
}
err = createWriteReq(req, this._handle, data, enc);
err = createWriteReq(req, this._handle, data, encoding);
}

if (err)
Expand Down
3 changes: 2 additions & 1 deletion lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,8 @@ Interface.prototype._moveCursor = function(dx) {
Interface.prototype._ttyWrite = function(s, key) {
key = key || {};

// Ignore escape key - Fixes #2876
// Ignore escape key, fixes
// https://github.com/nodejs/node-v0.x-archive/issues/2876.
if (key.name === 'escape') return;

if (key.ctrl && key.shift) {
Expand Down
2 changes: 1 addition & 1 deletion lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ function REPLServer(prompt,
let previouslyInRawMode;
if (self.breakEvalOnSigint) {
// Start the SIGINT watchdog before entering raw mode so that a very
// quick Ctrl+C doesnt lead to aborting the process completely.
// quick Ctrl+C doesn't lead to aborting the process completely.
utilBinding.startSigintWatchdog();
previouslyInRawMode = self._setRawMode(false);
}
Expand Down
2 changes: 2 additions & 0 deletions lib/timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const TIMEOUT_MAX = 2147483647; // 2^31-1
// TimerWrap C++ handle, which makes the call after the duration to process the
// list it is attached to.
//
/* eslint-disable non-ascii-character */
//
// ╔════ > Object Map
// ║
Expand All @@ -64,6 +65,7 @@ const TIMEOUT_MAX = 2147483647; // 2^31-1
// ║
// ╚════ > Linked List
//
/* eslint-enable non-ascii-character */
//
// With this, virtually constant-time insertion (append), removal, and timeout
// is possible in the JavaScript layer. Any one list of timers is able to be
Expand Down
Loading