Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Merge 'nodejs/master' into chakracore-master
Browse files Browse the repository at this point in the history
Sync nodejs/master at 08ea9ee as of 2016-06-14

PR-URL: #79
Reviewed-By: Jianchun Xu <Jianchun.Xu@microsoft.com>
  • Loading branch information
kunalspathak committed Jun 16, 2016
2 parents 1ec0729 + 08ea9ee commit 0402b9e
Show file tree
Hide file tree
Showing 983 changed files with 71,172 additions and 5,546 deletions.
16 changes: 5 additions & 11 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
<!--
Thank you for your pull request. Please review below requirements and walk
through the checklist. You can 'tick' a box by using the letter "x": [x].
Thank you for your pull request. Please review below requirements.
Run the test suite with: `make -j4 test` on UNIX or `vcbuild test nosign` on
Windows.
Bug fixes and new features should include tests and possibly a benchmark.
If this aims to fix a regression or you’re adding a feature, make sure you also
write a test. If possible, include a benchmark that quantifies your changes.
Finally, read through our contributors guide and make adjustments as necessary:
https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
-->

##### Checklist
<!-- remove lines that do not apply to you -->
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] tests and code linting passes
- [ ] `make -j4 test` (UNIX) or `vcbuild test nosign` (Windows) passes
- [ ] a test and/or benchmark is included
- [ ] documentation is changed or added
- [ ] the commit message follows commit guidelines
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.2.0">6.2.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.2.1">6.2.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.2.0">6.2.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.1.0">6.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.0.0">6.0.0</a><br/>
</td>
Expand Down
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ run `git shortlog` or `git log --oneline`.
Check the output of `git log --oneline files_that_you_changed` to find out
what subsystem (or subsystems) your changes touch.

If your patch fixes an open issue, you can add a reference to it at the end
of the log. Use the `Fixes:` prefix and the full issue URL. For example:

```
Fixes: https://github.com/nodejs/node/issues/1337
```

### Step 4: Rebase

Expand All @@ -133,8 +139,9 @@ $ git rebase upstream/master
### Step 5: Test

Bug fixes and features **should come with tests**. Add your tests in the
test/parallel/ directory. Look at other tests to see how they should be
structured (license boilerplate, common includes, etc.).
`test/parallel/` directory. For guidance on how to write a test for the Node.js
project, see this [guide](./doc/guides/writing_tests.md). Looking at other tests
to see how they should be structured can also help.

```text
$ ./configure && make -j8 test
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ The externally maintained libraries used by Node.js are:

- marked, located at tools/doc/node_modules/marked, is licensed as follows:
"""
Copyright (c) 2011-2012, Christopher Jeffrey (https://github.com/chjj/)
Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -1025,7 +1025,7 @@ The externally maintained libraries used by Node.js are:
- ESLint, located at tools/eslint, is licensed as follows:
"""
ESLint
Copyright (c) 2013 Nicholas C. Zakas. All rights reserved.
Copyright jQuery Foundation and other contributors, https://jquery.org/

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ test: all
$(MAKE) build-addons
$(MAKE) cctest
$(PYTHON) tools/test.py --mode=release -J \
addon doctool known_issues message parallel sequential
addon doctool known_issues message pseudo-tty parallel sequential
$(MAKE) lint

test-parallel: all
Expand All @@ -143,11 +143,15 @@ ADDONS_BINDING_GYPS := \
$(filter-out test/addons/??_*/binding.gyp, \
$(wildcard test/addons/*/binding.gyp))

ADDONS_BINDING_SOURCES := \
$(filter-out test/addons/??_*/*.cc, $(wildcard test/addons/*/*.cc)) \
$(filter-out test/addons/??_*/*.h, $(wildcard test/addons/*/*.h))

# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
# Depends on node-gyp package.json so that build-addons is (re)executed when
# node-gyp is updated as part of an npm update.
test/addons/.buildstamp: deps/npm/node_modules/node-gyp/package.json \
$(ADDONS_BINDING_GYPS) \
$(ADDONS_BINDING_GYPS) $(ADDONS_BINDING_SOURCES) \
deps/uv/include/*.h deps/v8/include/*.h \
src/node.h src/node_buffer.h src/node_object_wrap.h \
test/addons/.docbuildstamp
Expand Down Expand Up @@ -183,7 +187,8 @@ test-all-valgrind: test-build
test-ci: | build-addons
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=release --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) addons doctool known_issues message parallel sequential
$(TEST_CI_ARGS) addons doctool known_issues message pseudo-tty parallel \
sequential

test-release: test-build
$(PYTHON) tools/test.py --mode=release
Expand Down Expand Up @@ -438,6 +443,10 @@ PACKAGEMAKER ?= /Developer/Applications/Utilities/PackageMaker.app/Contents/MacO
PKGDIR=out/dist-osx

release-only:
@if `grep -q REPLACEME doc/api/*.md`; then \
echo 'Please update Added: tags in the documentation first.' ; \
exit 1 ; \
fi
@if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \
exit 0 ; \
else \
Expand Down
26 changes: 26 additions & 0 deletions benchmark/buffers/buffer-concat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use strict';
const common = require('../common.js');

const bench = common.createBenchmark(main, {
pieces: [1, 4, 16],
pieceSize: [1, 16, 256],
withTotalLength: [0, 1],
n: [1024]
});

function main(conf) {
const n = +conf.n;
const size = +conf.pieceSize;
const pieces = +conf.pieces;

const list = new Array(pieces);
list.fill(Buffer.allocUnsafe(size));

const totalLength = conf.withTotalLength ? pieces * size : undefined;

bench.start();
for (var i = 0; i < n * 1024; i++) {
Buffer.concat(list, totalLength);
}
bench.end(n);
}
7 changes: 6 additions & 1 deletion benchmark/child_process/child-process-exec-stdout.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
'use strict';
const common = require('../common.js');

var messagesLength = [64, 256, 1024, 4096];
// Windows does not support that long arguments
if (process.platform !== 'win32')
messagesLength.push(32768);
const bench = common.createBenchmark(main, {
len: [64, 256, 1024, 4096, 32768],
len: messagesLength,
dur: [5]
});

Expand Down
37 changes: 37 additions & 0 deletions benchmark/child_process/child-process-read-ipc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use strict';
if (process.argv[2] === 'child')
{
const len = +process.argv[3];
const msg = `"${'.'.repeat(len)}"`;
while (true) {
process.send(msg);
}
} else {
const common = require('../common.js');
const bench = common.createBenchmark(main, {
len: [64, 256, 1024, 4096, 32768],
dur: [5]
});
const spawn = require('child_process').spawn;
function main(conf) {
bench.start();

const dur = +conf.dur;
const len = +conf.len;

const options = { 'stdio': ['ignore', 'ignore', 'ignore', 'ipc'] };
const child = spawn(process.argv[0],
[process.argv[1], 'child', len], options);

var bytes = 0;
child.on('message', function(msg) {
bytes += msg.length;
});

setTimeout(function() {
child.kill();
const gbits = (bytes * 8) / (1024 * 1024 * 1024);
bench.end(gbits);
}, dur * 1000);
}
}
13 changes: 10 additions & 3 deletions benchmark/child_process/child-process-read.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
'use strict';
const common = require('../common.js');
const os = require('os');

var messagesLength = [64, 256, 1024, 4096];
// Windows does not support that long arguments
if (os.platform() !== 'win32')
messagesLength.push(32768);

const bench = common.createBenchmark(main, {
len: [64, 256, 1024, 4096, 32768],
len: messagesLength,
dur: [5]
});

Expand All @@ -13,11 +20,11 @@ function main(conf) {
const len = +conf.len;

const msg = '"' + Array(len).join('.') + '"';
const options = {'stdio': ['ignore', 'ipc', 'ignore']};
const options = { 'stdio': ['ignore', 'pipe', 'ignore'] };
const child = spawn('yes', [msg], options);

var bytes = 0;
child.on('message', function(msg) {
child.stdout.on('data', function(msg) {
bytes += msg.length;
});

Expand Down
33 changes: 33 additions & 0 deletions benchmark/url/url-format.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
'use strict';
const common = require('../common.js');
const url = require('url');
const v8 = require('v8');

const bench = common.createBenchmark(main, {
type: 'one two'.split(' '),
n: [25e6]
});

function main(conf) {
const type = conf.type;
const n = conf.n | 0;

const inputs = {
one: {slashes: true, host: 'localhost'},
two: {protocol: 'file:', pathname: '/foo'},
};
const input = inputs[type] || '';

// Force-optimize url.format() so that the benchmark doesn't get
// disrupted by the optimizer kicking in halfway through.
for (const name in inputs)
url.format(inputs[name]);

v8.setFlagsFromString('--allow_natives_syntax');
eval('%OptimizeFunctionOnNextCall(url.format)');

bench.start();
for (var i = 0; i < n; i += 1)
url.format(input);
bench.end(n);
}
6 changes: 6 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,11 @@ parser.add_option('--no-browser-globals',
help='do not export browser globals like setTimeout, console, etc. ' +
'(This mode is not officially supported for regular applications)')

parser.add_option('--without-inspector',
action='store_true',
dest='without_inspector',
help='disable experimental V8 inspector support')

parser.add_option('--engine',
action='store',
dest='engine',
Expand Down Expand Up @@ -819,6 +824,7 @@ def configure_node(o):
o['variables']['library_files'] = options.linked_module

o['variables']['asan'] = int(options.enable_asan or 0)
o['variables']['v8_inspector'] = b(not options.without_inspector)

if options.use_xcode and options.use_ninja:
raise Exception('--xcode and --ninja cannot be used together.')
Expand Down
2 changes: 2 additions & 0 deletions deps/npm/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ html/*.png
*.pyc

/test/tap/builtin-config

.nyc_output
4 changes: 4 additions & 0 deletions deps/npm/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -398,3 +398,7 @@ Rachel Evans <git@rve.org.uk>
Sam Minnee <sam@silverstripe.com>
Zirak <zirakertan@gmail.com>
Daniel Lupu <lupu.daniel.f@gmail.com>
Gianluca Casati <fibo@users.noreply.github.com>
André Herculano <andresilveirah@gmail.com>
Wyatt Preul <wpreul@gmail.com>
Myles Borins <mborins@us.ibm.com>
91 changes: 91 additions & 0 deletions deps/npm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,94 @@
### v3.9.5 (2016-05-27):

Just a quick point release. We had an issue where I (Kat) included the
`.nyc_output/` directory in `npm@3.9.3` and `npm@3.9.4`. The issue got reported
right after that second release
([`#12873`](https://github.com/npm/npm/issues/12873)), and now there's this
small point release that's there to fix the issue sooner.

* [`f96aea0`](https://github.com/npm/npm/commit/f96aea085be981cdb59bd09f16da40717426f981)
[#12878](https://github.com/npm/npm/pull/12878)
Ignore `.nyc_output` to avoid an accidental publish or commit filled with
code coverage data.
([@TheAlphaNerd](https://github.com/TheAlphaNerd))

### v3.9.4 (2016-05-26):

Hey all! It's that time again!

This week continues our current `big-bug` squashing push, although there's none
that are ready to release quite yet -- we're working on it!

It's also worth noting that we're entering the main part of conference season,
so you can probably expect a bit of a dev slowdown as a lot of us wombats attend
or speak at the various conferences. Remember [npm.camp](npm.camp) is happening
in 2 months and the lineup is looking pretty great! Tickets are still on sale.
Come hang out with us! WOO FUN! 🎉😸

#### BUGFIX

* [`cac0038`](https://github.com/npm/npm/commit/cac0038868b18295f9f299e762e20034f32a3e11)
[#12845](https://github.com/npm/npm/pull/12845)
Progress bar during tarball packing now prints `pack:packagename` instead of
`pack:[object Object]`.
([@iarna](https://github.com/iarna))

#### DOC UPDATES

* [`0b81622`](https://github.com/npm/npm/commit/0b816225c743c9203db5d92fb4dd3a9293833298)
[#12840](https://github.com/npm/npm/pull/12840)
Remove sexualized language from comment in code.
([@geek](https://github.com/geek))
* [`d6dff24`](https://github.com/npm/npm/commit/d6dff2481cb587c392f22afb893ac3136371a64c)
[#12802](https://github.com/npm/npm/pull/12802)
Small grammar fix in `cli/npm.md`.
([@andresilveira](https://github.com/andresilveira))
* [`cb38e0f`](https://github.com/npm/npm/commit/cb38e0fff82a6c1c110026b95b07a8c32e27ec01)
[#12782](https://github.com/npm/npm/pull/12782)
Documents that `NOTICE` files started getting included after
[npm/fstream-npm#17](https://github.com/npm/fstream-npm/pull/17).
([@SimenB](https://github.com/SimenB))
* [`70a3ae4`](https://github.com/npm/npm/commit/70a3ae4d4ec76b3ec51f00bf5261f1147829f9fe)
[#12776](https://github.com/npm/npm/pull/12776)
`npm run-script` used to have a `<pkg>` argument that allowed you to target
specific packages' scripts. This was removed as one of the breaking changes
for `npm@2`.
This patch removes a mention of that argument, which really doesn't exist
anymore.
([@fibo](https://github.com/fibo))

#### DEP UPDATES

* [`4a4470d`](https://github.com/npm/npm/commit/4a4470ddd1d9b0b62cb94f3bff5ab6b8e6db527a)
`aproba@1.0.3`
([@iarna](https://github.com/iarna))

#### TEST IMPROVEMENTS

So it turns out, `t.comment` in `tap` is actually pretty nice!
There's also a couple other test improvements by Rebecca landing here.

* [`9fd04dd`](https://github.com/npm/npm/commit/9fd04dd6be493465d7ac5f14dd9328e66069c1bf)
[#12851](https://github.com/npm/npm/pull/12851)
Rewrite `shrinkwrap-prod-dependency-also` test to use `common.npm`
([@iarna](https://github.com/iarna))
* [`3bc4a8e`](https://github.com/npm/npm/commit/3bc4a8ee58cb0e0adc84b4f135330f2b1e20d992)
[#12851](https://github.com/npm/npm/pull/12851)
Clean up `rm-linked` test.
([@iarna](https://github.com/iarna))
* [`bf7f7f2`](https://github.com/npm/npm/commit/bf7f7f273a794f7573bbbc84b1c216fdcd9e0ef9)
[#12851](https://github.com/npm/npm/pull/12851)
Clean up `outdated-symlink` test.
([@iarna](https://github.com/iarna))
* [`ca0baa4`](https://github.com/npm/npm/commit/ca0baa4dac85b1df4e26ef0c73d39314ca6858ca)
[#12851](https://github.com/npm/npm/pull/12851)
Improve diagnostics for `shrinkwrap-scoped-auth` test.
([@iarna](https://github.com/iarna))
* [`fbec9fd`](https://github.com/npm/npm/commit/fbec9fd5bb0abce589120d14c1f2b03b58cecce1)
[#12851](https://github.com/npm/npm/pull/12851)
Rewrite `shrinkwrap-dev-dependency` test to use `common.npm`.
([@iarna](https://github.com/iarna))

### v3.9.3 (2016-05-19):

This week continues our `big-bug` squashing adventure! Things are churning along
Expand Down
Loading

0 comments on commit 0402b9e

Please sign in to comment.