Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b353cf3
benchmark: fix punycode test for --without-intl
TimothyGu Oct 17, 2017
218b8fd
fs: fix `createReadStream(…, {end: n})` for non-seekable fds
addaleax Mar 13, 2018
986fd40
util: escaping object keys in util.inspect()
ah-yu Nov 13, 2017
f0f7c2b
http: free the parser before emitting 'upgrade'
lpinca Jan 17, 2018
f068918
stream: remove unreachable code
lpinca Jan 18, 2018
9a56ad9
test: use correct size in test-stream-buffer-list
lpinca Jan 18, 2018
b665068
stream: simplify `src._readableState` to `state`
Jan 20, 2018
325dc27
doc: capitalize non-primitive types
vsemozhetbyt Jan 12, 2018
ddb42b5
doc: warn about GCM authenticity
tniessen Jan 25, 2018
9f02f29
doc: fix manpage warnings
silverwind Jan 29, 2018
c28a64a
doc: reorder section on updating PR branch
ofrobots Jan 24, 2018
67f9df9
url: simplify loop in parser
tniessen Jan 30, 2018
06c1ef7
doc: add Gibson Fahnestock to TSC
Trott Jan 31, 2018
de63954
test: fix flaky test-http-dns-error
bengl Oct 26, 2017
06a28aa
src: free memory before re-setting URLHost value
prog1dev Jan 23, 2018
4f1939b
tools: auto fix custom eslint rule
shobhitchittora Oct 31, 2017
9b0d337
doc: improve stream documentation
Jan 25, 2018
02eab11
test: speed up parallel/test-tls-session-cache
addaleax Jan 29, 2018
9f158ac
lib: remove debugger dead code
liqyan Jan 22, 2018
f4ccb9d
deps: update node-inspect to 1.11.3
Jan 24, 2018
cad0bbb
async_hooks: clean up comments
ofrobots Jan 30, 2018
b8d3c40
doc: move Brian White to TSC Emeriti list
Trott Jan 31, 2018
091ab5b
v8: add missing ',' in OpenBSD's 'sources' section.
qbit Jan 30, 2018
d594a68
build: add cflags for OpenBSD, remove stray comma.
qbit Jan 30, 2018
e6d6042
doc: streamline README intro
Trott Jan 31, 2018
5e86f20
string_decoder: reset decoder on end
jridgewell Feb 1, 2018
c570180
test: add test for tls benchmarks
apapirovski Feb 1, 2018
6ef1fa3
test: verify the shell option works properly on execFile
jvelezpo Jan 25, 2018
21441e8
win, build: fix intl-none option
poiru Jan 22, 2018
07f9147
doc: improve http.request documentation
Zarel Jan 8, 2018
0a5b0d5
doc: shell option for the execFile and execFileSync functions
jvelezpo Jan 18, 2018
89c1bf3
build: allow x86_64 as a dest_cpu alias for x64
rvagg Jan 9, 2018
2a18de3
test: remove destructor from node_test_fixture
danbev Feb 2, 2018
af3e5f2
net: remove redundant code from _writeGeneric()
lpinca Jan 29, 2018
433be0d
tools: add check for using process.binding crypto
danbev Dec 26, 2017
a3111ba
build: refine static and shared lib build
yhwang Dec 5, 2017
5590088
errors: remove ERR_OUTOFMEMORY
tniessen Dec 27, 2017
059a803
test: fix spelling in test case comments
tniessen Jan 6, 2018
63b0de2
lib: fix spelling in comments
tniessen Jan 6, 2018
790ef2f
test: update references to archived repository
tniessen Dec 31, 2017
8c25003
readline: update references to archived repository
tniessen Dec 31, 2017
f687bb1
test: move tmpdir to submodule of common
Trott Dec 25, 2017
9f380dc
tools: add .mjs linting for Windows
vsemozhetbyt Feb 4, 2018
88e0f23
test: add assertions for TextEncoder/Decoder
Jan 13, 2018
d503427
doc: linkify missing types
vsemozhetbyt Jan 29, 2018
bc66f08
deps: V8: backport 596d55a from upstream
MylesBorins Sep 18, 2017
44cb0d3
crypto: reuse variable instead of reevaluation
tniessen Dec 18, 2017
6ba7fd0
tools: non-Ascii linter for /lib only
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 @@ -245,6 +244,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 @@ -255,8 +256,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 @@ -282,6 +281,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 @@ -591,7 +592,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
13 changes: 3 additions & 10 deletions benchmark/http/http_server_for_chunky_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@

const assert = require('assert');
const http = require('http');
const fs = require('fs');
const { fork } = require('child_process');
const common = require('../common.js');
const { PIPE, tmpDir } = require('../../test/common');
const { PIPE } = require('../../test/common');
const tmpdir = require('../../test/common/tmpdir');
process.env.PIPE_NAME = PIPE;

try {
fs.accessSync(tmpDir, fs.F_OK);
} catch (e) {
fs.mkdirSync(tmpDir);
}
tmpdir.refresh();

var server;
try {
fs.unlinkSync(process.env.PIPE_NAME);
} catch (e) { /* ignore */ }

server = http.createServer(function(req, res) {
const headers = {
Expand Down
14 changes: 10 additions & 4 deletions benchmark/misc/punycode.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
'use strict';

const common = require('../common.js');
const icu = process.binding('icu');
let icu;
try {
icu = process.binding('icu');
} catch (err) {}
const punycode = require('punycode');

const bench = common.createBenchmark(main, {
method: ['punycode', 'icu'],
method: ['punycode'].concat(icu !== undefined ? ['icu'] : []),
n: [1024],
val: [
'افغانستا.icom.museum',
Expand Down Expand Up @@ -69,8 +72,11 @@ function main(conf) {
runPunycode(n, val);
break;
case 'icu':
runICU(n, val);
break;
if (icu !== undefined) {
runICU(n, val);
break;
}
// fallthrough
default:
throw new Error('Unexpected method');
}
Expand Down
8 changes: 4 additions & 4 deletions benchmark/module/module-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const fs = require('fs');
const path = require('path');
const common = require('../common.js');

const { refreshTmpDir, tmpDir } = require('../../test/common');
const benchmarkDirectory = path.join(tmpDir, 'nodejs-benchmark-module');
const tmpdir = require('../../test/common/tmpdir');
const benchmarkDirectory = path.join(tmpdir.path, 'nodejs-benchmark-module');

const bench = common.createBenchmark(main, {
thousands: [50],
Expand All @@ -15,7 +15,7 @@ const bench = common.createBenchmark(main, {
function main(conf) {
const n = +conf.thousands * 1e3;

refreshTmpDir();
tmpdir.refresh();
try { fs.mkdirSync(benchmarkDirectory); } catch (e) {}

for (var i = 0; i <= n; i++) {
Expand All @@ -35,7 +35,7 @@ function main(conf) {
else
measureDir(n, conf.useCache === 'true');

refreshTmpDir();
tmpdir.refresh();
}

function measureFull(n, useCache) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/tls/throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ function main(conf) {
};

server = tls.createServer(options, onConnection);
setTimeout(done, dur * 1000);
var conn;
server.listen(common.PORT, function() {
const opt = { port: common.PORT, rejectUnauthorized: false };
conn = tls.connect(opt, function() {
setTimeout(done, dur * 1000);
bench.start();
conn.on('drain', write);
write();
Expand Down
3 changes: 2 additions & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
],
}],
[ 'OS in "linux freebsd openbsd solaris aix"', {
'cflags': [ '-pthread', ],
'cflags': [ '-pthread' ],
'ldflags': [ '-pthread' ],
}],
[ 'OS in "linux freebsd openbsd solaris android aix"', {
Expand All @@ -295,6 +295,7 @@
'standalone_static_library': 1,
}],
['OS=="openbsd"', {
'cflags': [ '-I/usr/local/include' ],
'ldflags': [ '-Wl,-z,wxneeded' ],
}],
],
Expand Down
16 changes: 12 additions & 4 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 @@ -861,6 +861,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 @@ -878,7 +881,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 @@ -988,6 +990,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 @@ -1484,8 +1493,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.enable_static \
else '',
'NODE_TARGET_TYPE': variables['node_target_type'],
}

if options.prefix:
Expand Down
9 changes: 9 additions & 0 deletions deps/node-inspect/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
### 1.11.3

* [`93caa0f`](https://github.com/nodejs/node-inspect/commit/93caa0f5267c7ab452b258d3b03329a0bb5ac7f7) **docs:** Add missing oc in protocol
* [`2d87cbe`](https://github.com/nodejs/node-inspect/commit/2d87cbe76aa968dfc1ac69d9571af1be81abd8e0) **fix:** Make --inspect-port=0 work
* [`ebfd02e`](https://github.com/nodejs/node-inspect/commit/ebfd02ece9b642586023f7791da71defeb13d746) **chore:** Bump tap to 10.7
* [`c07adb1`](https://github.com/nodejs/node-inspect/commit/c07adb17b164c1cf3da8d38659ea9f5d7ff42e9c) **test:** Use useful break location
* [`94f0bf9`](https://github.com/nodejs/node-inspect/commit/94f0bf97d24c376baf3ecced2088d81715a73464) **fix:** Fix `takeHeapSnapshot()` truncation bug


### 1.11.2

* [`42e0cd1`](https://github.com/nodejs/node-inspect/commit/42e0cd111d89ed09faba1c0ec45089b0b44de011) **fix:** look for generic hint text
Expand Down
2 changes: 1 addition & 1 deletion deps/node-inspect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ node has two options:
1. `node --debug <file>`: Start `file` with remote debugging enabled.
2. `node debug <file>`: Start an interactive CLI debugger for `<file>`.

But for the Chrome inspector protol,
But for the Chrome inspector protocol,
there's only one: `node --inspect <file>`.

This project tries to provide the missing second option
Expand Down
31 changes: 12 additions & 19 deletions deps/node-inspect/lib/_inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,9 @@ const [ InspectClient, createRepl ] =

const debuglog = util.debuglog('inspect');

const DEBUG_PORT_PATTERN = /^--(?:debug|inspect)(?:-port|-brk)?=(\d{1,5})$/;
function getDefaultPort() {
for (const arg of process.execArgv) {
const match = arg.match(DEBUG_PORT_PATTERN);
if (match) {
return +match[1];
}
}
return 9229;
}

function portIsFree(host, port, timeout = 2000) {
if (port === 0) return Promise.resolve(); // Binding to a random port.

const retryDelay = 150;
let didTimeOut = false;

Expand Down Expand Up @@ -110,9 +101,11 @@ function runScript(script, scriptArgs, inspectHost, inspectPort, childPrint) {
let output = '';
function waitForListenHint(text) {
output += text;
if (/Debugger listening on/.test(output)) {
if (/Debugger listening on ws:\/\/\[?(.+?)\]?:(\d+)\//.test(output)) {
const host = RegExp.$1;
const port = Number.parseInt(RegExp.$2);
child.stderr.removeListener('data', waitForListenHint);
resolve(child);
resolve([child, port, host]);
}
}

Expand Down Expand Up @@ -160,10 +153,11 @@ class NodeInspector {
options.port,
this.childPrint.bind(this));
} else {
this._runScript = () => Promise.resolve(null);
this._runScript =
() => Promise.resolve([null, options.port, options.host]);
}

this.client = new InspectClient(options.port, options.host);
this.client = new InspectClient();

this.domainNames = ['Debugger', 'HeapProfiler', 'Profiler', 'Runtime'];
this.domainNames.forEach((domain) => {
Expand Down Expand Up @@ -223,17 +217,16 @@ class NodeInspector {

run() {
this.killChild();
const { host, port } = this.options;

return this._runScript().then((child) => {
return this._runScript().then(([child, port, host]) => {
this.child = child;

let connectionAttempts = 0;
const attemptConnect = () => {
++connectionAttempts;
debuglog('connection attempt #%d', connectionAttempts);
this.stdout.write('.');
return this.client.connect()
return this.client.connect(port, host)
.then(() => {
debuglog('connection established');
this.stdout.write(' ok');
Expand Down Expand Up @@ -288,7 +281,7 @@ class NodeInspector {

function parseArgv([target, ...args]) {
let host = '127.0.0.1';
let port = getDefaultPort();
let port = 9229;
let isRemote = false;
let script = target;
let scriptArgs = args;
Expand Down
10 changes: 6 additions & 4 deletions deps/node-inspect/lib/internal/inspect_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ function decodeFrameHybi17(data) {
}

class Client extends EventEmitter {
constructor(port, host) {
constructor() {
super();
this.handleChunk = this._handleChunk.bind(this);

this._port = port;
this._host = host;
this._port = undefined;
this._host = undefined;

this.reset();
}
Expand Down Expand Up @@ -284,7 +284,9 @@ class Client extends EventEmitter {
});
}

connect() {
connect(port, host) {
this._port = port;
this._host = host;
return this._discoverWebsocketPath()
.then((urlPath) => this._connectWebsocket(urlPath));
}
Expand Down
Loading