Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v9.2.0 proposal #16992

Merged
merged 135 commits into from
Nov 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
adcaddf
test: improve assert messages in test-global
markmcnelis Nov 6, 2017
be266bd
test: move test-http-keepalive-maxsockets to sequential
Trott Nov 5, 2017
21e9888
test: check session timeout in http2
apapirovski Nov 4, 2017
8245e5a
http2: simplify subsequent rstStream calls
apapirovski Nov 4, 2017
8ad4f76
test: remove message argument in cluster setup test
mbornath Nov 6, 2017
bce5db2
src: CHECK() for argument overflow in Spawn()
cjihrig Nov 4, 2017
a184dbc
doc: update subprocess.killed
cjihrig Nov 4, 2017
928647c
doc: fix typo in assert.md
mjomble Nov 7, 2017
4d55a1d
test: improve assert messages in napi exception test
PaulBlanche Nov 6, 2017
4c11801
build: add missing options to help message
danbev Nov 2, 2017
bc19a93
test: use tmpDir in test-fs-utimes
Trott Nov 5, 2017
625999b
tools: don't lint files that have not changed
joyeecheung Oct 29, 2017
15dcb96
doc: fix a typo in n-api documentation
vipinmenon Nov 8, 2017
a465f2b
test: introduce test/common/internet.addresses
joyeecheung Oct 22, 2017
c662cc0
test: use internet.addresses in internet tests
joyeecheung Oct 22, 2017
bed0560
console: avoid adding infinite error listeners
mcollina Nov 5, 2017
c1cdc65
test: replace common.fixtiresDir with fixtures.readKey()
wsierakowski Nov 6, 2017
f71f41d
test: add values to error message
intercity-technology Nov 6, 2017
5d3a4ad
test: improve error emssage reporting in testNapiRun.js
Nov 6, 2017
25dd8f6
tools: add direct anchors for error codes
joyeecheung Nov 5, 2017
271c89e
test: improve assertion in test-require-dot
awegrzyn Nov 6, 2017
172652b
test: improve assert messages in stream test
katie-roberts Nov 8, 2017
81f14bf
deps: cherry-pick b8331cc030 from upstream V8
danbev Oct 30, 2017
2266caf
Revert "deps: cherry-pick b8331cc030 from upstream V8"
danbev Nov 9, 2017
8611e3b
fs: expose realpath(3) bindings
bnoordhuis Oct 5, 2017
28b7bf0
deps: cherry-pick b8331cc030 from upstream V8
danbev Oct 30, 2017
43c5726
src: fix UB in InternalModuleReadFile()
bnoordhuis Nov 7, 2017
1dc4fc1
build: include src\tracing when linting on win
danbev Nov 3, 2017
6e9973e
doc: improve documentation for the vm module
fhinkel Nov 7, 2017
1ee6df9
test: pass process.env to child processes
rvagg Oct 23, 2017
75405a1
deps: ICU 60 bump
srl295 Sep 21, 2017
0b93bbb
src: add openssl-system-ca-path configure option
danbev Nov 6, 2017
e60eff6
doc: fix a typo in the documentation
mamatha-jv Nov 10, 2017
38ac50a
deps: cherry-pick cc55747 from V8 upstream
fhinkel Nov 8, 2017
8311561
test: improve assertion messages
Nov 8, 2017
7f7dec8
test: cover vm.runInNewContext()
cjihrig Nov 9, 2017
f82d3e4
deps: upgrade libuv to 1.16.1
cjihrig Nov 10, 2017
41937be
src: add process.ppid
cjihrig Oct 30, 2017
a4557f2
build: remove cctest extension
yhwang Nov 2, 2017
942a9ed
tools,build: allow build without `remark-cli`
refack Nov 8, 2017
5df3dc1
src: make StreamBase prototype accessors robust
joyeecheung Nov 7, 2017
3ba52c1
doc: correct the spelling of omitting in dgram.md
vidyasubramanyam Nov 10, 2017
b46714c
doc: fix typos in N-API
SwathiKalahastri Nov 10, 2017
fbc7451
test: replace string concatenation with template
tanvikini Nov 10, 2017
b42013c
test: replace string concatenation with template
Nov 10, 2017
8da4983
crypto: use X509_STORE_CTX_new
davidben Sep 16, 2017
efd9bc3
crypto: make node_crypto_bio compat w/ OpenSSL 1.1
davidben Sep 14, 2017
201393f
crypto: estimate kExternalSize
davidben Sep 16, 2017
cc744b9
crypto: remove unnecessary SSLerr calls
davidben Sep 16, 2017
6a9c528
crypto: account for new 1.1.0 SSL APIs
davidben Sep 17, 2017
568d9d0
crypto: test DH keys work without a public half
davidben Sep 17, 2017
81760ff
crypto: use RSA and DH accessors
davidben Sep 17, 2017
6c3ae36
crypto: remove locking callbacks for OpenSSL 1.1.0
davidben Sep 18, 2017
59acd27
crypto: make CipherBase 1.1.0-compatible
davidben Sep 20, 2017
abe3dc4
crypto: make Hash 1.1.0-compatible
davidben Sep 22, 2017
fa1fc16
crypto: make SignBase compatible with OpenSSL 1.1.0
davidben Sep 22, 2017
5c24fc3
crypto: Make Hmac 1.1.0-compatible
davidben Sep 22, 2017
c42935b
crypto: add compat logic for "DSS1" and "dss1"
davidben Sep 23, 2017
8a8ac8c
crypto: hard-code tlsSocket.getCipher().version
davidben Sep 23, 2017
bec0421
test: update test expectations for OpenSSL 1.1.0
davidben Sep 17, 2017
85ffc2f
test: remove sha from test expectations
davidben Sep 23, 2017
627a15f
crypto: emulate OpenSSL 1.0 ticket scheme in 1.1
davidben Sep 23, 2017
d95b608
test: test with a larger RSA key
davidben Sep 23, 2017
08ac214
test: revise test-tls-econnreset for OpenSSL 1.1.0
davidben Sep 23, 2017
07102ac
crypto: remove deprecated ECDH calls w/ OpenSSL 1.1
davidben Sep 23, 2017
3d438f8
test: configure certs in tests
davidben Sep 23, 2017
8c29420
test: fix test-https-agent-session-eviction for 1.1
davidben Sep 23, 2017
a5e7255
crypto: make ALPN the same for OpenSSL 1.0.2 & 1.1.0
davidben Sep 23, 2017
f952caa
crypto: clear some SSL_METHOD deprecation warnings
davidben Sep 18, 2017
26e4c58
test: fix flaky test-http2-create-client-connect
davidben Sep 23, 2017
31dadd2
crypto: deprecate {ecdhCurve: false}
davidben Oct 21, 2017
407eb6f
test: enable mustCall() during child exit
vipinmenon Nov 10, 2017
fbec5ec
test: replace string concatenation with template
imkabir Nov 10, 2017
16c6222
lib: replace string concatenation with template
subbachari Nov 10, 2017
61fbd85
test: use template string for concatenation
vipinmenon Nov 10, 2017
385f658
test: change string concatenation to template
narkedi Nov 10, 2017
a935806
lib: replace string concatenation with template
chandrams Nov 10, 2017
df18174
lib: replace string concatenation with template
Nov 10, 2017
1fcd95e
doc: remove duplicate 'the' from http2 API doc
vipinmenon Nov 10, 2017
678e738
lib: change concatenated string to template
Nayanadask Nov 10, 2017
1ea546c
test: change concatenated string to template
Anaweshak Nov 10, 2017
1510fda
doc: outline commit message for breaking changes
MatonAnthony Nov 6, 2017
8eb32e1
lib: replace String concatenation with template
saiHemak Nov 10, 2017
651fee4
test: change concatenated string to template
deesebas Nov 10, 2017
44c3cc2
lib: change concatenated string to template
pajangid Nov 10, 2017
74f3372
doc: clarify the prerequisites for building with VS2017
seishun Nov 9, 2017
a79d86d
src: use unrefed async for GC tracking
addaleax Nov 4, 2017
6ea8768
test: unmark flaky test
addaleax Nov 4, 2017
7a53783
test: improve template value for test message
d1b1 Nov 6, 2017
2e2e802
test: make test-buffer-slow engine agnostic
Trott Oct 17, 2017
c74467f
test: make test-cli-syntax engine agnostic
Trott Oct 17, 2017
025eadf
test: make test-console-count engine agnostic
Trott Oct 17, 2017
4604294
test: make test-console engine agnostic
Trott Oct 17, 2017
bd7822b
test: make test-error-reporting engine agnostic
Trott Oct 17, 2017
b5b23bd
test: make test-http-outgoing-proto agnostic
Trott Oct 17, 2017
79e1831
test: make error stack test engine agnostic
Trott Oct 17, 2017
9bf8874
test: make test-os-eol engine agnostic
Trott Oct 17, 2017
e2f5648
test: make test-process-env-symbols agnostic
Trott Oct 17, 2017
591a692
test: make test-querystring-escape engine agnostic
Trott Oct 17, 2017
c81b086
test: make test-repl-harmony engine agnostic
Trott Oct 17, 2017
f8337ce
test: make test-repl-syntax-error-stack agnostic
Trott Oct 17, 2017
835ca63
test: make test-repl engine agnostic
Trott Oct 17, 2017
0be7f8c
test: make test-require-json engine agnostic
Trott Oct 17, 2017
3136578
test: make test-tls-external-accessor agnostic
Trott Oct 17, 2017
7c364a2
test: use common/fixtures module in hash-seed test
Nov 6, 2017
c4e2343
doc: drop support for VS2015
seishun Nov 7, 2017
83f9604
test: use ES6 classes instead of util.inherits
tniessen Nov 10, 2017
64a0c80
loader: test search module
clakech Nov 6, 2017
c179254
lib: improve the usage of TypeError[INVALID_ARG_TYPE]
starkwang Oct 28, 2017
7964849
src: explain implementation of vm module
fhinkel Nov 9, 2017
8dfd5a5
http2: multiple smaller code cleanups
jasnell Nov 4, 2017
54768f5
doc: reorganize COLLABORATOR_GUIDE.md
Trott Oct 1, 2017
35fc317
test: add a test description
grantgasp Nov 6, 2017
809dc09
test: refactor fs.write() test
Nov 6, 2017
7ba3599
tools: fix inspector-check reporting
danbev Oct 23, 2017
6c0fd55
lib: guard inspector console using process var
danbev Sep 25, 2017
02ea0ee
build: fix cctest compilation
danbev Nov 8, 2017
afbdd01
lib: replace string concatenation with template
narkedi Nov 10, 2017
ad02676
test: used fixturesDir from fixtures modules
Nov 6, 2017
6ddba2e
deps: patch V8 to 6.2.414.44
MylesBorins Nov 13, 2017
62a6bc0
doc: fix typo in http2 doc
devsnek Nov 13, 2017
75c1788
doc: recommend node-core-utils for metadata
Trott Nov 13, 2017
1418d9b
meta: 32 bit linux is experimental
refack Nov 3, 2017
881fe80
tools: remove unused trailing function arguments
Trott Nov 9, 2017
7f9d3f3
tools: enforce no unused trailing arguments tools directory
Trott Nov 9, 2017
614eac3
test: refactor addons-napi/test_promise/test.js
ka3e Nov 6, 2017
8658f26
test: refactor comments in test-child-process-spawnsync-maxbuf
chrbergert Nov 6, 2017
71181b9
src: turn inspector raw pointer into unique_ptr
fhinkel Nov 12, 2017
bdec4d9
src: fix compiler warning in process.ppid
cjihrig Nov 12, 2017
4e9bfdf
deps: cherry-pick 3c8195d from V8 upstream
fhinkel Nov 9, 2017
ad55db2
test: use fixtures module for path resolve
sercanyersen Nov 6, 2017
859abdb
test: reuse existing PassThrough implementation
tniessen Nov 10, 2017
71e592c
events: remove emit micro-optimizations
apapirovski Nov 7, 2017
50ec9bf
2017-11-14, Version 9.2.0 (Current)
evanlucas Nov 13, 2017
930f7a6
Working on v9.2.1
evanlucas Nov 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 9 additions & 11 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ in production.

| System | Support type | Version | Architectures | Notes |
|--------------|--------------|----------------------------------|----------------------|------------------|
| GNU/Linux | Tier 1 | kernel >= 2.6.32, glibc >= 2.12 | x86, x64, arm, arm64 | |
| GNU/Linux | Tier 1 | kernel >= 2.6.32, glibc >= 2.12 | x64, arm, arm64 | |
| macOS | Tier 1 | >= 10.10 | x64 | |
| Windows | Tier 1 | >= Windows 7 / 2008 R2 | x86, x64 | vs2015 or vs2017 |
| Windows | Tier 1 | >= Windows 7 / 2008 R2 | x86, x64 | vs2017 |
| SmartOS | Tier 2 | >= 15 < 16.4 | x86, x64 | see note1 |
| FreeBSD | Tier 2 | >= 10 | x64 | |
| GNU/Linux | Tier 2 | kernel >= 3.13.0, glibc >= 2.19 | ppc64le >=power8 | |
| AIX | Tier 2 | >= 7.1 TL04 | ppc64be >=power7 | |
| GNU/Linux | Tier 2 | kernel >= 3.10, glibc >= 2.17 | s390x | |
| macOS | Experimental | >= 10.8 < 10.10 | x64 | no test coverage |
| GNU/Linux | Experimental | kernel >= 2.6.32, glibc >= 2.12 | x86 | limited CI |
| Linux (musl) | Experimental | musl >= 1.0 | x64 | |

note1 - The gcc4.8-libs package needs to be installed, because node
Expand Down Expand Up @@ -76,7 +77,7 @@ Depending on host platform, the selection of toolchains may vary.

#### Windows

* Visual Studio 2015 or Visual C++ Build Tools 2015 or newer
* Visual Studio 2017 or the Build Tools thereof

## Building Node.js on supported platforms

Expand Down Expand Up @@ -192,14 +193,11 @@ $ [sudo] make install
Prerequisites:

* [Python 2.6 or 2.7](https://www.python.org/downloads/)
* One of:
* [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools)
* [Visual Studio 2015 Update 3](https://www.visualstudio.com/), all editions
including the Community edition (remember to select
"Common Tools for Visual C++ 2015" feature during installation).
* [Visual Studio 2017](https://www.visualstudio.com/downloads/), any edition (including the Build Tools SKU).
**Required Components:** "MSbuild", "VC++ 2017 v141 toolset" and at least one of the Windows SDKs.
*Note*: For "Windows 10 SDK (10.0.15063.0)" only the "Desktop C++ x86 and x64" flavor is required.
* The "Desktop development with C++" workload from
[Visual Studio 2017](https://www.visualstudio.com/downloads/) or the
"Visual C++ build tools" workload from the
[Build Tools](https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017),
with the default optional components.
* Basic Unix tools required for some tests,
[Git for Windows](http://git-scm.com/download/win) includes Git Bash
and tools which can be included in the global `PATH`.
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.1.0">9.1.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.2.0">9.2.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.1.0">9.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.0.0">9.0.0</a><br/>
</td>
<td valign="top">
Expand Down
59 changes: 31 additions & 28 deletions COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,60 +371,45 @@ The TSC should serve as the final arbiter where required.
* If more than one author has contributed to the PR, keep the most recent
author when squashing.

Always modify the original commit message to include additional meta
information regarding the change process:

- A `PR-URL:` line that references the *full* GitHub URL of the original
pull request being merged so it's easy to trace a commit back to the
conversation that led up to that change.
- A `Fixes: X` line, where _X_ either includes the *full* GitHub URL
for an issue, and/or the hash and commit message if the commit fixes
a bug in a previous commit. Multiple `Fixes:` lines may be added if
appropriate.
- A `Refs:` line referencing a URL for any relevant background.
- A `Reviewed-By: Name <email>` line for yourself and any
other Collaborators who have reviewed the change.
- Useful for @mentions / contact list if something goes wrong in the PR.
- Protects against the assumption that GitHub will be around forever.

Review the commit message to ensure that it adheres to the guidelines outlined
in the [contributing](./CONTRIBUTING.md#commit-message-guidelines) guide.

Add all necessary [metadata](#metadata) to commit messages before landing.

See the commit log for examples such as
[this one](https://github.com/nodejs/node/commit/b636ba8186) if unsure
exactly how to format your commit messages.

Additionally:
- Double check PRs to make sure the person's _full name_ and email
address are correct before merging.
- Except when updating dependencies, all commits should be self
contained (meaning every commit should pass all tests). This makes
it much easier when bisecting to find a breaking change.
- All commits should be self-contained (meaning every commit should pass all
tests). This makes it much easier when bisecting to find a breaking change.

### Technical HOWTO

Clear any `am`/`rebase` that may already be underway.
Clear any `am`/`rebase` that may already be underway:

```text
$ git am --abort
$ git rebase --abort
```

Checkout proper target branch
Checkout proper target branch:

```text
$ git checkout master
```

Update the tree (assumes your repo is set up as detailed in
[CONTRIBUTING.md](CONTRIBUTING.md#step-1-fork))
[CONTRIBUTING.md](CONTRIBUTING.md#step-1-fork)):

```text
$ git fetch upstream
$ git merge --ff-only upstream/master
```

Apply external patches
Apply external patches:

```text
$ curl -L https://github.com/nodejs/node/pull/xxx.patch | git am --whitespace=fix
Expand All @@ -442,21 +427,19 @@ against the original PR carefully and build/test on at least one platform
before landing. If the 3-way merge fails, then it is most likely that a conflicting
PR has landed since the CI run and you will have to ask the author to rebase.

Check and re-review the changes
Check and re-review the changes:

```text
$ git diff upstream/master
```

Check number of commits and commit messages
Check number of commits and commit messages:

```text
$ git log upstream/master...master
```

If there are multiple commits that relate to the same feature or
one with a feature and separate with a test for that feature,
you'll need to use `squash` or `fixup`:
Squash commits and add metadata:

```text
$ git rebase -i upstream/master
Expand Down Expand Up @@ -512,9 +495,28 @@ Save the file and close the editor. You'll be asked to enter a new
commit message for that commit. This is a good moment to fix incorrect
commit logs, ensure that they are properly formatted, and add
`Reviewed-By` lines.

* The commit message text must conform to the
[commit message guidelines](./CONTRIBUTING.md#commit-message-guidelines).

<a name="metadata"></a>
* Modify the original commit message to include additional metadata regarding
the change process. ([`node-core-utils`][] fetches the metadata for you.)

* Required: A `PR-URL:` line that references the *full* GitHub URL of the
original pull request being merged so it's easy to trace a commit back to
the conversation that led up to that change.
* Optional: A `Fixes: X` line, where _X_ either includes the *full* GitHub URL
for an issue, and/or the hash and commit message if the commit fixes
a bug in a previous commit. Multiple `Fixes:` lines may be added if
appropriate.
* Optional: One or more `Refs:` lines referencing a URL for any relevant
background.
* Required: A `Reviewed-By: Name <email>` line for yourself and any
other Collaborators who have reviewed the change.
* Useful for @mentions / contact list if something goes wrong in the PR.
* Protects against the assumption that GitHub will be around forever.

Run tests (`make -j4 test` or `vcbuild test`). Even though there was a
successful continuous integration run, other changes may have landed on master
since then, so running the tests one last time locally is a good practice.
Expand Down Expand Up @@ -678,3 +680,4 @@ LTS working group and the Release team.
[Stability Index]: doc/api/documentation.md#stability-index
[Enhancement Proposal]: https://github.com/nodejs/node-eps
[git-username]: https://help.github.com/articles/setting-your-username-in-git/
[`node-core-utils`]: https://github.com/nodejs/node-core-utils
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@ use `Refs:`.
- `Refs: http://eslint.org/docs/rules/space-in-parens.html`
- `Refs: https://github.com/nodejs/node/pull/3615`

5. If your commit introduces a breaking change (`semver-major`), it should
contain an explanation about the reason of the breaking change, which
situation would trigger the breaking change and what is the exact change.

Breaking changes will be listed in the wiki with the aim to make upgrading
easier. Please have a look at [Breaking Changes](https://github.com/nodejs/node/wiki/Breaking-changes-between-v4-LTS-and-v6-LTS)
for the level of detail that's suitable.

Sample complete commit message:

```txt
Expand Down Expand Up @@ -625,6 +633,7 @@ Focus first on the most significant aspects of the change:
1. Does this change make sense for Node.js?
2. Does this change make Node.js better, even if only incrementally?
3. Are there clear bugs or larger scale issues that need attending to?
4. Is the commit message readable and correct? If it contains a breaking change is it clear enough?

When changes are necessary, *request* them, do not *demand* them, and do not
assume that the submitter already knows how to add a test or run a benchmark.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ The externally maintained libraries used by Node.js are:
# ---------COPYING.libtabe ---- BEGIN--------------------
#
# /*
# * Copyrighy (c) 1999 TaBE Project.
# * Copyright (c) 1999 TaBE Project.
# * Copyright (c) 1999 Pai-Hsiang Hsiao.
# * All rights reserved.
# *
Expand Down
42 changes: 36 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ bench-ci: bench
lint-md-clean:
$(RM) -r tools/remark-cli/node_modules
$(RM) -r tools/remark-preset-lint-node/node_modules
$(RM) tools/.*mdlintstamp

lint-md-build:
@if [ ! -d tools/remark-cli/node_modules ]; then \
Expand All @@ -983,10 +984,31 @@ lint-md-build:
echo "Markdown linter: installing remark-preset-lint-node into tools/"; \
cd tools/remark-preset-lint-node && ../../$(NODE) ../../$(NPM) install; fi

lint-md: lint-md-build
@echo "Running Markdown linter..."
$(NODE) tools/remark-cli/cli.js -q -f \
./*.md doc src lib benchmark tools/doc/ tools/icu/
ifneq ("","$(wildcard tools/remark-cli/node_modules/)")
LINT_MD_TARGETS = src lib benchmark tools/doc tools/icu
LINT_MD_ROOT_DOCS := $(wildcard *.md)
LINT_MD_FILES := $(shell find $(LINT_MD_TARGETS) -type f \
-not -path '*node_modules*' -name '*.md') $(LINT_MD_ROOT_DOCS)
LINT_DOC_MD_FILES = $(shell ls doc/**/*.md)

tools/.docmdlintstamp: $(LINT_DOC_MD_FILES)
@echo "Running Markdown linter on docs..."
@$(NODE) tools/remark-cli/cli.js -q -f $(LINT_DOC_MD_FILES)
@touch $@

tools/.miscmdlintstamp: $(LINT_MD_FILES)
@echo "Running Markdown linter on misc docs..."
@$(NODE) tools/remark-cli/cli.js -q -f $(LINT_MD_FILES)
@touch $@

tools/.mdlintstamp: tools/.miscmdlintstamp tools/.docmdlintstamp

lint-md: | tools/.mdlintstamp
else
lint-md:
@echo "The markdown linter is not installed."
@echo "To install (requires internet access) run: $ make lint-md-build"
endif

LINT_JS_TARGETS = benchmark doc lib test tools
LINT_JS_CMD = tools/eslint/bin/eslint.js --cache \
Expand Down Expand Up @@ -1048,10 +1070,13 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
# and the actual filename is generated so it won't match header guards
ADDON_DOC_LINT_FLAGS=-whitespace/ending_newline,-build/header_guard

lint-cpp:
lint-cpp: tools/.cpplintstamp

tools/.cpplintstamp: $(LINT_CPP_FILES)
@echo "Running C++ linter..."
@$(PYTHON) tools/cpplint.py $(LINT_CPP_FILES)
@$(PYTHON) tools/cpplint.py $?
@$(PYTHON) tools/check-imports.py
@touch $@

lint-addon-docs: test/addons/.docbuildstamp
@echo "Running C++ linter on addon docs..."
Expand Down Expand Up @@ -1087,6 +1112,10 @@ lint:
lint-ci: lint
endif

lint-clean:
$(RM) tools/.*lintstamp
$(RM) .eslintcache

.PHONY: $(TARBALL)-headers \
all \
bench \
Expand Down Expand Up @@ -1127,6 +1156,7 @@ endif
install-bin \
install-includes \
lint \
lint-clean \
lint-ci \
lint-cpp \
lint-js \
Expand Down
8 changes: 3 additions & 5 deletions benchmark/_http-benchmarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ class TestDoubleBenchmarker {
create(options) {
const child = child_process.fork(this.executable, {
silent: true,
env: {
duration: options.duration,
connections: options.connections,
path: `http://127.0.0.1:${options.port}${options.path}`
}
env: Object.assign({}, process.env, {
test_url: `http://127.0.0.1:${options.port}${options.path}`
})
});
return child;
}
Expand Down
2 changes: 1 addition & 1 deletion benchmark/_test-double-benchmarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

const http = require('http');

http.get(process.env.path, function() {
http.get(process.env.test_url, function() {
console.log(JSON.stringify({ throughput: 1 }));
});
20 changes: 0 additions & 20 deletions benchmark/events/ee-emit-multi-args.js

This file was deleted.

44 changes: 38 additions & 6 deletions benchmark/events/ee-emit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,51 @@
const common = require('../common.js');
const EventEmitter = require('events').EventEmitter;

const bench = common.createBenchmark(main, { n: [2e6] });
const bench = common.createBenchmark(main, {
n: [2e6],
argc: [0, 2, 4, 10],
listeners: [1, 5, 10],
});

function main(conf) {
const n = conf.n | 0;
const argc = conf.argc | 0;
const listeners = Math.max(conf.listeners | 0, 1);

const ee = new EventEmitter();

for (var k = 0; k < 10; k += 1)
for (var k = 0; k < listeners; k += 1)
ee.on('dummy', function() {});

bench.start();
for (var i = 0; i < n; i += 1) {
ee.emit('dummy');
var i;
switch (argc) {
case 2:
bench.start();
for (i = 0; i < n; i += 1) {
ee.emit('dummy', true, 5);
}
bench.end(n);
break;
case 4:
bench.start();
for (i = 0; i < n; i += 1) {
ee.emit('dummy', true, 5, 10, false);
}
bench.end(n);
break;
case 10:
bench.start();
for (i = 0; i < n; i += 1) {
ee.emit('dummy', true, 5, 10, false, 5, 'string', true, false, 11, 20);
}
bench.end(n);
break;
default:
bench.start();
for (i = 0; i < n; i += 1) {
ee.emit('dummy');
}
bench.end(n);
break;
}
bench.end(n);
}
Loading