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

test: fix test-bootstrap-modules to account for workers module #23876

Closed
wants to merge 221 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
4153114
doc: add WebAssembly to globals
styfle Oct 8, 2018
dd161ca
doc: remove style instruction that is not followed
Trott Oct 9, 2018
d61cb65
doc: remove personal pronoun from domain.md
Trott Oct 9, 2018
080b015
doc: remove personal pronoun from worker_threads
Trott Oct 9, 2018
2f17cdb
doc: edit for minor fixes to prcoess.md
Trott Oct 9, 2018
ebf04c1
test: fix compiler warning in doc/api/addons.md
danbev Oct 8, 2018
907ebd2
http2: make Http2Settings constructors delegate
danbev Oct 8, 2018
e34761f
test: add test for a vm indexed property
conectado Oct 7, 2018
8c04c37
src: fix usage of deprecated v8::Date::New
targos Oct 6, 2018
8624cba
vm: pass parsing_context to ScriptCompiler::CompileFunctionInContext
Oct 1, 2018
b279b96
test: add logging to test-worker-memory
Trott Oct 11, 2018
650e924
doc: rewrite consensus seeking in guide
Trott Oct 9, 2018
772709c
src: replace NO_RETURN with [[noreturn]]
refack Oct 8, 2018
5c9ef5e
tools: update node-lint-md-cli-rollup
Trott Oct 9, 2018
9cc73d3
tools,icu: read full ICU version info from file
refack Oct 4, 2018
cdba84e
test: rename WPT console test
Trott Oct 8, 2018
9efe84e
test: add WPT console-label-conversion test
Trott Oct 8, 2018
3a5887f
test: separate WPT console test from other test
Trott Oct 8, 2018
cea396a
src: remove unused limits header from util-inl.h
danbev Oct 9, 2018
3721f14
tls: make StreamWrap work correctly in "drain" callback
oyyd Oct 7, 2018
f681691
src: revert removal of SecureContext `_external` getter
dyatlov Jul 8, 2018
efe4f5e
lib: http server, friendly error messages
sagitsofan Sep 20, 2018
05108eb
src: improve SSL version extraction logic
gireeshpunathil Sep 24, 2018
678019c
src: fix bug in MallocedBuffer constructor
tniessen Oct 12, 2018
dd3dd5f
doc: revise security-reporting text in README
Trott Oct 10, 2018
d025420
test: fixing assertion value order
joesepi Oct 12, 2018
243c227
test: fix assert.strictEqual argument order
et4891 Oct 12, 2018
9197a72
test: improve test-gc-http-client-connaborted
lundibundi Oct 1, 2018
e402b22
test: improve test-gc-http-client-onerror
lundibundi Oct 1, 2018
dc52a51
test: move some gc tests back to parallel/, unmark flaky
addaleax Oct 9, 2018
9b0a4fa
zlib: generate error code names in C++
addaleax Oct 7, 2018
5213276
doc: describe SNI host name format
sam-github Oct 9, 2018
61c323f
http: reduce duplicated code for cleaning parser
starkwang Oct 9, 2018
bb4da05
test: refactor common.ddCommand()
Trott Oct 10, 2018
8def037
test: rename common.ddCommand()
Trott Oct 10, 2018
61cb4cf
test: adding test coverage for SourceTextModule.evaluate
kaltepeter Oct 12, 2018
20455c1
test: fix parameter order passed to strictEqual
shannonfarvolden Oct 12, 2018
104f099
crypto: fix length argument to snprintf()
bnoordhuis Oct 12, 2018
ba2e704
test: fix `assert.strictEqual` arguments in test/parallel/test-c-ares.js
jungkumseok Oct 12, 2018
4a17d0d
repl: remove unused variable e from try catch
khalidadil Oct 12, 2018
ac9277f
test: fix order of values in test assertions
jehaines Oct 12, 2018
dfe8821
test: fix http local address test assertion
widatama Oct 12, 2018
1ee3abb
repl: remove unused variable from try catch
mmisiarek Oct 12, 2018
cf7a379
test: strictEqual correct order for http-information-processing test
ivansieder Oct 12, 2018
69ed89d
test: fix assert.strictEqual argument order
andy-ganchrow Oct 12, 2018
fd43fd4
lib: remove unused 'e' from catch
pdxmholmes Oct 12, 2018
8ff0f42
test: swap assert.strictEqual args to actual, expected
epeden Oct 12, 2018
db6d7be
test: fix incorrect ordering of args in assert.strictEqual()
mdaum Oct 12, 2018
87ce723
test: correct assert test
rmarkins-godaddy Oct 12, 2018
158405b
test: remove unused e variable in catch statement
DennyScott Oct 12, 2018
6fb488f
test: fix incorrect expectation order
Oct 12, 2018
e790ac2
test: correct order for assert.strictEqual for inspector-helper test
nolanmar511 Oct 12, 2018
b2c8182
test: update test-cluster-worker-events to use arrow functions
Oct 12, 2018
59ecf06
test: mark `test-http2-session-timeout` as flake on ARM
refack Oct 13, 2018
a0c8f85
doc,meta: add references to outside C++ guides
refack Oct 7, 2018
34ebbfd
doc,meta: refresh wording in colab guide
refack Oct 6, 2018
a7ed986
doc,meta: assign PR semantics
refack Oct 6, 2018
174732e
worker: remove delete MessagePort.prototype.hasRef
Oct 12, 2018
879e074
test: correctly order assertion arguments
sheminusminus Oct 12, 2018
a5c698b
test: swap actual and expected in assertions
yitongding Oct 12, 2018
21fc4ee
test: replace function with arrow function
yitongding Oct 12, 2018
5f00557
test: flip assertion arguments for make-callback/test.js
Oct 12, 2018
3b0b3d6
readline: assert without the use of event listener
Oct 12, 2018
1421885
test: swap the order arguments are passed to assert
n370 Oct 12, 2018
cf42a2d
doc: edit BUILDING.md
Trott Oct 12, 2018
0b21a88
test: inline common module boolean
ashleysimpson Oct 12, 2018
00e4e56
test: remove unused variable from catch
Oct 12, 2018
42135af
test: remove unused "e" from catch in http2 test
Oct 12, 2018
fe781bc
benchmark: added a test benchmark for worker
umarov Oct 12, 2018
e074d0b
test: removed mustCallAsync from common and added inside testcase
quinnlangille Oct 12, 2018
af40bdd
test: fix assert.strictEqual params order
Oct 12, 2018
6daa5f9
test: fix argument order for assert.strictEqual
inklin Oct 12, 2018
cee22b7
lib: remove an unused variable
chenyil Oct 12, 2018
84a18b3
test: removed unused variable
Oct 12, 2018
aecba73
src: move default assignment of async_id_ in async_wrap.h
davesters Oct 12, 2018
0df91e6
trace_events: destroy platform before tracing
ofrobots Sep 18, 2018
5fea320
src: ready background workers before bootstrap
ofrobots Sep 26, 2018
5468509
bootstrapper: move internalBinding to NativeModule
devsnek Sep 22, 2018
a01858d
lib: migrate to getOptions in loaders.js
rxiayth Oct 12, 2018
5f3f648
lib: migrate from process.binding to internalBinding
madeinjam Oct 12, 2018
2c2862f
test: change to arrow functions in send-bad-arguments
annatangzhao Oct 12, 2018
f9c893a
tools: update ESLint to 5.7.0
cjihrig Oct 12, 2018
932cb33
crypto: move field initialization to class
Oct 12, 2018
25b4484
doc: wrap links in <>
ChALkeR Sep 2, 2018
06ac720
doc: fix pr-url in repl.md
ChALkeR Sep 2, 2018
8740259
doc: use reserved domains for examples in url.md
ChALkeR Sep 2, 2018
cd07dc9
doc: fix url example to match behavior
ChALkeR Oct 10, 2018
ad3c820
test: fix assertion order
Chrn Oct 12, 2018
575da3d
test: fix assertion order test-tls-server-verify
Oct 12, 2018
2736b8c
lib: switch to internalBinding for cjs loader
DrakiaXYZ Oct 12, 2018
ab8cf3d
test: fix assertion argument order
carlrc Oct 12, 2018
5e100f2
test: rename process.argv[0] to process.execPath, rename ex to err
kaltepeter Oct 12, 2018
f0ae2ed
test: fix strictEqual argument order
fastereder Oct 12, 2018
e47616f
test: modernizing test-dgram-listen-after-bind with arrow functions
chrisforrette Oct 12, 2018
bcb954f
test: fix argument order in asserts
Oct 12, 2018
865cfa9
test: use arrow functions in test-exception-handler
jennazee Oct 12, 2018
035e01c
lib: removed unused variable
Oct 12, 2018
8df2020
test: modernized test to use arrow functions
ggoforth Oct 12, 2018
3c780c8
test: reversed arguments in strictqual to reflect documentation
scabhi Oct 12, 2018
78daac7
test: update function keywords to fat arrows
RobertMonks Oct 12, 2018
bc6765c
test: fix ordering of assertion values
maccuaa Oct 12, 2018
940c412
test: fix strictEqual assertion arguments
a0viedo Oct 12, 2018
dd86c16
test: fix assertions args order in test/parallel/test-fs-chmod.js
milsosa Oct 12, 2018
c2bc862
test: fix argument order in assertions
Oct 12, 2018
b86b2ce
test: put expected assert value in correct place
jfarseneau-wb Oct 12, 2018
c4664e4
test: modernize test-child-process-flush-stdio
Oct 12, 2018
e003e9b
test: properly order test assertion variables
DavidRS91 Oct 12, 2018
ffb9e78
test: fixed incorrect variable order in assert.strictEqual()
MokhammadDaniyal Oct 12, 2018
2b85a60
test: fix order of assert.strictEqual() args to actual, expected
joshua-belcher Oct 12, 2018
f81b9cb
lib: migrate process.binding('config') to getOptions()
jonnyk20 Oct 12, 2018
913e40e
test: swap assert argument order in test-vm-create-and-run-in-context.js
lefrog Oct 12, 2018
da7f3a9
test: switch arguments of assert()
FieldOfPoppies Oct 12, 2018
3e5cd58
test: fix assert order in test-vm-context
lee-gray Oct 12, 2018
e912533
lib: migrate process.binding to getOptions
randy5235 Oct 12, 2018
c6bc9e7
test: use the correct parameter order on assert.strictEqual()
lrdcasimir Oct 12, 2018
cdfbb62
lib: migrate process.binding to internalBinding
surreal8 Oct 12, 2018
7f1e8d8
test: fix assert.strictEqual arg order in test-tls-ecdh-multiple.js
takdeerkaur Oct 12, 2018
7e80f32
test: fix assert.strictEqual() argument order
benschaaf Oct 12, 2018
8f1bea8
test: fix test-dgram-pingpong assertion arg order
gendelbendel Oct 12, 2018
b9c99cf
test: corret assertion arg order in test-regress-GH-892.js
elvisphilipn Oct 12, 2018
d6f07ca
test: replaced functions with arrow functions
edgarzapeka Oct 12, 2018
8c96fd5
test: refactor functions to es6
M1chaelChen Oct 12, 2018
2e86c7e
test: updating assertion on test so it fits the new method signature
leomoreno Oct 12, 2018
5f69a2c
src: remove unused UVHandle methods
MarianneDr Oct 12, 2018
179499c
test: reorder asserts arguments
frony Oct 12, 2018
c0136d9
src: use default initializers over settings fields on the constructor
andrewjdmccann Oct 12, 2018
9662dd6
test: correct labelling of asserts errors
nofwayy Oct 12, 2018
12f395d
test: fix strictEqual assertion argument in test-tls-ecdh-auto
popopome Oct 12, 2018
8cbc9b6
test: fix assert.strictEqual() argument order
ssamuels0916 Oct 12, 2018
caebc2b
test: corrected the order of arguments in assert.strictEqual()
parisandmilo Oct 12, 2018
a6fd45f
test: use correct argument order for assert.strictEqual()
Oct 12, 2018
a214716
test: updating assertion and expect order in test-tls-client-verify.js
Oct 12, 2018
c6185e5
test: refactor callback functions to arrow functions
seanhealy Oct 12, 2018
6b718be
test: fix assertion argument order
carlrc Oct 12, 2018
9a6e819
test: fix assertions argument order
KelvinLawHF1 Oct 12, 2018
40cd531
src: use MallocedBuffer abstraction for buffers
codyhazelwood Oct 12, 2018
b99cde1
test: swap expected and actual arguments in assert.strictEqual()
erin-bush Oct 12, 2018
b5303cd
test: added test for generateKeyPair
rxiayth Oct 12, 2018
ee9da79
test: reverse the order of assertion statement arguments in pingpong …
AllanZhengYP Oct 12, 2018
edc075b
test: fix assert.strictEqual() arguments order
Oct 12, 2018
d4ae8d5
test: assert.strictEqual parameters ordered correctly
jdenbroeder Oct 12, 2018
6643ad9
test: switch strictEqual parameters - actual first before expected
chrisbautista Oct 12, 2018
952a12c
test: fix strictEqual assertion order on readline tests
Oct 12, 2018
6b84131
test: modernize test-crypto-domain
naris93 Oct 12, 2018
dd04e70
test: fix order of assert arguments in vm-new-script-this-context
Oct 12, 2018
fa364aa
test: added async-hook benchmark
peterjreynoldsii Oct 12, 2018
bf2a091
test: reverse order of args in reconnect-error assert
jackelin-herrera Oct 12, 2018
43ccfc7
build: add .DS_store to .gitgnore
frony Oct 12, 2018
f03674b
test: removed unused error variable in try catch
mhussa20 Oct 12, 2018
4a1f542
test: update strictEqual arguments order
crpahl Oct 12, 2018
566ad88
test: removed unused variable in fs-watch-file-slow
makitoda Oct 12, 2018
7d60a22
test: fix order of parameters to assert.strictEqual
jasonnutter Oct 12, 2018
47ab96a
test: fix argument order in assertions
Oct 12, 2018
84c6353
test: fix assert.strictEqual() parameter order in test-path-maklong.js
Oct 12, 2018
017ab49
test: fix assertion arguments order
seantcoyote Oct 12, 2018
55309b3
test: increased code coverage for proxySessionHandler
justin0022 Oct 12, 2018
14053e1
test: reversed actual and expected values for .strictEqual()
sshakeel Oct 12, 2018
69ad9e6
test: add crypto.scrypt test case with different encoding
yitongding Oct 12, 2018
0834198
test: fixed strictEqual arguments order
ruyadorno Oct 12, 2018
80a78dc
test: fix arguments ordering for assertions to match the docs
lirantal Oct 12, 2018
34a9218
test: fix order of arguments passed to strictEqual
eojthebrave Oct 12, 2018
115093d
test: fix strictEqual input parameters order
AlixAng Oct 12, 2018
b72120d
test: corrected assertion arguments order
pliab Oct 12, 2018
23522c2
test: fix strictEqual order for timers test
Oct 12, 2018
e572dcd
src: add default initializer in tls_wrap
richardhoehn Oct 12, 2018
3ccadb8
test: fix assert value order
EthanWeber7 Oct 12, 2018
23c87e5
test: fix parameter order of assertions
obxpete Oct 12, 2018
7f5b37c
test: fix assert.strictEqual() argument order
lotharthesavior Oct 12, 2018
9fc4b45
test: switch order of assertion arguments
zzidante Oct 12, 2018
086f379
test: updated assert test values to doc standards
keeysnc Oct 12, 2018
f0926e6
test: fix assertion order
ErickWendel Oct 12, 2018
37a49e2
module: removed unused variable
momander Oct 12, 2018
39b4f71
test: correct assertion argument order
JeffMarvin Oct 12, 2018
b701a7e
test: reversed 1st and 2nd arguments for assert.strictEqual()
vchoubey08 Oct 12, 2018
db1d0f9
test: fix backward assertion arguments
svassr Oct 12, 2018
20d4cba
test: update assertion parameter order
seanhealy Oct 12, 2018
43c2aa3
test: reverse arguments in assert.strictEqual
past5 Oct 12, 2018
7dcd0d6
test: fix parameters in test-repl.js
binaryme Oct 12, 2018
6173ebf
test: fix assertions args order
milsosa Oct 12, 2018
bb15aa6
test: re-order strictEqual paramater calls
ptichonczuk-tc Oct 12, 2018
f80d915
test: fix order of assert args in client response domain test
sheminusminus Oct 12, 2018
31ceeff
src: change macro to fn
Oct 12, 2018
eb416f6
test: fix assert equal order of arguments
Oct 12, 2018
79b6ce9
test: change order of assert.strictEquals arguments
chucktheobald Oct 12, 2018
5305a0d
test: fix assert parameter order in test-https-localaddress.js
iansu Oct 12, 2018
ad532f1
test: fix assert.strictEqual() argument order
Oct 12, 2018
7c714b5
test: assertions arguments match docs
Agheb Oct 12, 2018
52614ff
test: increased code coverage for slowCases
jehaines Oct 12, 2018
bf2e6c7
test: use smaller keys for a faster keygen test
sam-github Oct 11, 2018
0a1dde4
test: add test coverage for fs.truncate
christian-bromann Oct 12, 2018
975e0a1
zlib: refactor zlib internals
addaleax Sep 22, 2018
df75888
test: fix strictEqual arguments order
jonathansamines Oct 12, 2018
ab9527d
tools,test: cleanup and dedup code
refack Oct 3, 2018
2b863f0
tools,test: add list of slow tests
refack Oct 10, 2018
887c525
src: remove OCB support ifdef OPENSSL_NO_OCB
codebytere Oct 15, 2018
c98496d
doc: cleanup and references in C++ guide
refack Oct 14, 2018
a45586e
src: update v8::Object::GetPropertyNames() usage
cjihrig Oct 14, 2018
47e2648
crypto: simplify error handling in ECDH::New
tniessen Oct 13, 2018
7744e84
crypto: simplify internal state handling
tniessen Oct 13, 2018
b5a5626
tls: prevent multiple connection errors
cjihrig Oct 13, 2018
e94c953
src: changed stdio_pipes_ to std::vector
niboch Oct 12, 2018
eb6a2c6
test: check codes of thrown errors
truonghnancy Oct 12, 2018
a4b217b
doc: simplify security reporting text
Trott Oct 16, 2018
65223e2
build: fix `./configure --enable-d8`
bnoordhuis Oct 14, 2018
78d4167
tools: prefer filter to remove empty strings
thefourtheye Oct 18, 2018
bf93064
tools: do not lint commit message if var undefined
Trott Oct 18, 2018
493654c
doc: improve README.md
Trott Oct 17, 2018
63c27ce
tools: clarify commit message linting
Trott Oct 18, 2018
850ba35
deps: add missing ares_android.h file
cjihrig Oct 16, 2018
3c0b3d5
meta: clarify fast-track approval
jasnell Oct 19, 2018
111018c
doc: add Backport-PR-URL info in backport guide
ofrobots Oct 16, 2018
543efb9
test: correct order of args in buffer compare
Oct 12, 2018
c5ecc02
doc: document use of buffer.swap16() for utf16be
jasnell Oct 19, 2018
261219b
doc: add missing deprecation labels
jasnell Oct 19, 2018
433507a
benchmark: coerce PORT to number
ofrobots Oct 17, 2018
a37f7c2
crypto: remove DiffieHellman.initialised_
tniessen Oct 17, 2018
a3b15ad
test: reversed params in assert.strictEqual()
durad Oct 12, 2018
9de80e6
test: fix argument order in assertion
Oct 12, 2018
3f63297
test: improve test coverage for fs module
leomoreno Oct 12, 2018
8b431ad
src: remove function hasTextDecoder in encoding.js
chichiwang Oct 12, 2018
e343e4c
test: fix test-bootstrap-modules for account for workers
refack Oct 25, 2018
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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ deps/uv/docs/src/guide/
deps/v8/gypfiles/Debug/
deps/v8/gypfiles/Release/
deps/v8/third_party/eu-strip/

.DS_Store
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ matrix:
script:
- make lint
# Lint the first commit in the PR.
- git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata
- \[ -z "$TRAVIS_COMMIT_RANGE" \] || (echo -e '\nLinting the commit message according to the guidelines at https://goo.gl/p2fr5Q\n' && git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx -q core-validate-commit --no-validate-metadata)
- name: "Test Suite"
install:
- ./configure
Expand Down
27 changes: 11 additions & 16 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ which it is attached.

### Input

Node.js relies on V8 and libuv. Therefore, we adopt a subset of their
supported platforms.
Node.js relies on V8 and libuv. We adopt a subset of their supported platforms.

### Strategy

Expand Down Expand Up @@ -111,8 +110,8 @@ platforms in production.
community will only address issues that reproduce on native GNU/Linux
systems. Issues that only reproduce on WSL should be reported in the
[WSL issue tracker](https://github.com/Microsoft/WSL/issues). Running the
Windows binary (`node.exe`) in WSL is not recommended, and will not work
without adjustment (such as stdio redirection).
Windows binary (`node.exe`) in WSL is not recommended. It will not work
without workarounds such as stdio redirection.

### Supported toolchains

Expand Down Expand Up @@ -144,10 +143,8 @@ Otherwise `configure` will fail with an error. This can be avoided by
either providing a newer assembler as per the list above or by
using the `--openssl-no-asm` flag.

*Note:* The forthcoming OpenSSL-1.1.1 will require higher
version. Please refer
https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_ia32cap.html for
details.
The forthcoming OpenSSL-1.1.1 will have different requirements. Please refer to
https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_ia32cap.html for details.

## Building Node.js on supported platforms

Expand Down Expand Up @@ -216,7 +213,7 @@ $ make test-only

At this point, you are ready to make code changes and re-run the tests.

If you are running tests prior to submitting a Pull Request, the recommended
If you are running tests before submitting a Pull Request, the recommended
command is:

```console
Expand Down Expand Up @@ -344,7 +341,7 @@ Prerequisites:
and tools which can be included in the global `PATH`.
* The [NetWide Assembler](http://www.nasm.us/), for OpenSSL assembler modules.
If not installed in the default location, it needs to be manually added
to `PATH`. Build with `openssl-no-asm` option does not require this.
to `PATH`. A build with the `openssl-no-asm` option does not need this.
* **Optional** (to build the MSI): the [WiX Toolset v3.11](http://wixtoolset.org/releases/)
and the [Wix Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension).

Expand All @@ -369,12 +366,10 @@ To test if Node.js was built correctly:

### Android/Android-based devices (e.g. Firefox OS)

Although these instructions for building on Android are provided, please note
that Android is not an officially supported platform at this time. Patches to
improve the Android build are accepted. However, there is no testing on Android
in the current continuous integration environment. The participation of people
dedicated and determined to improve Android building, testing, and support is
encouraged.
Android is not a supported platform. Patches to improve the Android build are
welcome. There is no testing on Android in the current continuous integration
environment. The participation of people dedicated and determined to improve
Android building, testing, and support is encouraged.

Be sure you have downloaded and extracted
[Android NDK](https://developer.android.com/tools/sdk/ndk/index.html) before in
Expand Down
75 changes: 39 additions & 36 deletions COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ As soon as the PR is ready to land, please do so. Landing your own pull requests
allows other Collaborators to focus on other pull requests. If your pull request
is still awaiting the [minimum time to land](#waiting-for-approvals), add the
`author ready` label so other Collaborators know it can land as soon as the time
ends.
ends. If instead you wish to land the PR yourself, indicate this intent by using
the "assign yourself" button, to self-assign the PR.

## Accepting Modifications

Expand Down Expand Up @@ -139,30 +140,26 @@ the CI outcome.

### Consensus Seeking

If there is no disagreement amongst Collaborators, a pull request should be
landed given appropriate review, a green CI, and the minimum
[waiting time](#waiting-for-approvals) for a PR. If it is still awaiting the
[minimum time to land](#waiting-for-approvals), please add the `author ready`
label to it so it is obvious that the PR can land as soon as the time ends.

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 TSC for resolution.

If any Collaborator objects to a change *without giving any additional
explanation or context*, and the objecting Collaborator fails to respond to
explicit requests for explanation or context within a reasonable period of
time, the objection may be dismissed. Note that this does not apply to
objections that are explained.

Note that 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 TSC](#involving-the-tsc). This does not necessarily mean that the
PR must be put onto the TSC meeting agenda. If multiple TSC members approve
(`LGTM`) the PR and no Collaborators oppose the PR, it should be landed. Where
there is disagreement among TSC members or objections from one or more
Collaborators, `semver-major` pull requests may be put on the TSC meeting
agenda.
If there are no objecting Collaborators, a pull request may land if it has the
needed [approvals](#code-reviews), [CI](#testing-and-ci), and
[wait time](#waiting-for-approvals). If a pull request meets all requirements
except the [wait time](#waiting-for-approvals), please add the
[`author ready`](#author-ready-pull-requests) label.

Where there is disagreement among Collaborators, consensus should be sought if
possible. If reaching consensus is not possible, a Collaborator may escalate the
issue to the TSC.

Collaborators should not block a pull request without providing a reason.
Another Collaborator may ask an objecting Collaborator to explain their
objection. If the objector is unresponsive, another Collaborator may dismiss the
objection.

[Breaking changes](#breaking-changes) must receive
[TSC review](#involving-the-tsc). If two TSC members approve the pull request
and no Collaborators object, then it may land. If there are objections, a
Collaborator may apply the `tsc-agenda` label. That will put the pull request on
the TSC meeting agenda.

#### Helpful resources

Expand Down Expand Up @@ -190,7 +187,9 @@ Collaborators that previously approved the pull request. If someone disagrees
with the fast-tracking request, remove the label and leave a comment indicating
why the pull request should not be fast-tracked. The pull request can be landed
once two or more Collaborators approve both the pull request and the
fast-tracking request, and the necessary CI testing is done.
fast-tracking request, and the necessary CI testing is done. A request to
fast-track a PR made by a different Collaborator than the pull-request author
counts as a fast-track approval.

### Testing and CI

Expand Down Expand Up @@ -505,12 +504,16 @@ The TSC should serve as the final arbiter where required.

## Landing Pull Requests

1. Avoid landing PRs that are assigned to someone else. Authors who wish to land
their own PRs will self-assign them, or delegate to someone else. If in
doubt, ask the assignee whether it is okay to land.
1. Never use GitHub's green ["Merge Pull Request"][] button. Reasons for not
using the web interface button:
* The merge method will add an unnecessary merge commit.
* The squash & merge method can add metadata (the PR #) to the commit title.
* If more than one author has contributed to the PR, keep the most recent
author when squashing.
* The "Create a merge commit" method will add an unnecessary merge commit.
* The "Squash and merge" method will add metadata (the PR #) to the commit
title. If more than one author has contributed to the PR, squashing will
only keep the most recent author.
* The "Rebase and merge" method has no way of adding metadata to the commit.
1. Make sure the CI is done and the result is green. If the CI is not green,
check for flaky tests and infrastructure failures. Please check if those were
already reported in the appropriate repository ([node][flaky tests] and
Expand All @@ -521,13 +524,12 @@ The TSC should serve as the final arbiter where required.
present.
1. Review the commit message to ensure that it adheres to the guidelines
outlined in the [contributing][] guide.
1. 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.
1. Add all necessary [metadata](#metadata) to commit messages before landing. If
you are unsure exactly how to format the commit messages, use the commit log
as a reference. See [this commit][commit-example] as an example.

Check PRs from new contributors to make sure the person's name and email address
are correct before merging.
For PRs from first time contributors, be [welcoming](#welcoming-first-time-contributors).
Also, verify that their git settings are to their liking.

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.
Expand Down Expand Up @@ -905,6 +907,7 @@ If you cannot find who to cc for a file, `git shortlog -n -s <file>` may help.
[`node-core-utils`]: https://github.com/nodejs/node-core-utils
[backporting guide]: doc/guides/backporting-to-release-lines.md
[contributing]: ./doc/guides/contributing/pull-requests.md#commit-message-guidelines
[commit-example]: https://github.com/nodejs/node/commit/b636ba8186
[flaky tests]: https://github.com/nodejs/node/issues?q=is%3Aopen+is%3Aissue+label%3A%22CI+%2F+flaky+test%22y
[git-node]: https://github.com/nodejs/node-core-utils/blob/master/docs/git-node.md
[git-node-metadata]: https://github.com/nodejs/node-core-utils/blob/master/docs/git-node.md#git-node-metadata
Expand Down
88 changes: 60 additions & 28 deletions CPP_STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Table of Contents

* [Guides and References](#guides-and-references)
* [Formatting](#formatting)
* [Left-leaning (C++ style) asterisks for pointer declarations](#left-leaning-c-style-asterisks-for-pointer-declarations)
* [C++ style comments](#c-style-comments)
Expand All @@ -25,14 +26,30 @@
* [Avoid throwing JavaScript errors in C++ methods](#avoid-throwing-javascript-errors-in-c)
* [Avoid throwing JavaScript errors in nested C++ methods](#avoid-throwing-javascript-errors-in-nested-c-methods)

Unfortunately, the C++ linter (based on
[Google’s `cpplint`](https://github.com/google/styleguide)), which can be run
explicitly via `make lint-cpp`, does not currently catch a lot of rules that are
specific to the Node.js C++ code base. This document explains the most common of
these rules:

## Guides and References

The Node.js C++ codebase strives to be consistent in its use of language
features and idioms, as well as have some specific guidelines for the use of
runtime features.

Coding guidelines are based on the following guides (highest priority first):
1. This document
2. The [Google C++ Style Guide][]
3. The ISO [C++ Core Guidelines][]

In general code should follow the C++ Core Guidelines, unless overridden by the
Google C++ Style Guide or this document. At the moment these guidelines are
checked manually by reviewers, with the goal to validate this with automatic
tools.

## Formatting

Unfortunately, the C++ linter (based on [Google’s `cpplint`][]), which can be
run explicitly via `make lint-cpp`, does not currently catch a lot of rules that
are specific to the Node.js C++ code base. This document explains the most
common of these rules:

### Left-leaning (C++ style) asterisks for pointer declarations

`char* buffer;` instead of `char *buffer;`
Expand Down Expand Up @@ -175,40 +192,39 @@ class FancyContainer {

### Use `nullptr` instead of `NULL` or `0`

What it says in the title.
Further reading in the [C++ Core Guidelines][ES.47].

### Ownership and Smart Pointers

"Smart" pointers are classes that act like pointers, e.g.
by overloading the `*` and `->` operators. Some smart pointer types can be
used to automate ownership bookkeeping, to ensure these responsibilities are
met. `std::unique_ptr` is a smart pointer type introduced in C++11, which
expresses exclusive ownership of a dynamically allocated object; the object
is deleted when the `std::unique_ptr` goes out of scope. It cannot be
copied, but can be moved to represent ownership transfer.
`std::shared_ptr` is a smart pointer type that expresses shared ownership of a
dynamically allocated object. `std::shared_ptr`s can be copied; ownership
of the object is shared among all copies, and the object
is deleted when the last `std::shared_ptr` is destroyed.

Prefer to use `std::unique_ptr` to make ownership
transfer explicit. For example:
* [R.20]: Use `std::unique_ptr` or `std::shared_ptr` to represent ownership
* [R.21]: Prefer `unique_ptr` over `shared_ptr` unless you need to share
ownership

Use `std::unique_ptr` to make ownership transfer explicit. For example:

```cpp
std::unique_ptr<Foo> FooFactory();
void FooConsumer(std::unique_ptr<Foo> ptr);
```

Never use `std::auto_ptr`. Instead, use `std::unique_ptr`.
Since `std::unique_ptr` has only move semantics, passing one by value transfers
ownership to the callee and invalidates the caller's instance.

Don't use `std::auto_ptr`, it is deprecated ([Reference][cppref_auto_ptr]).

## Others

### Type casting

- Always avoid C-style casts (`(type)value`)
- `dynamic_cast` does not work because RTTI is not enabled
- Use `static_cast` for casting whenever it works
- `reinterpret_cast` is okay if `static_cast` is not appropriate
- Use `static_cast<T>` if casting is required, and it is valid
- Use `reinterpret_cast` only when it is necessary
- Avoid C-style casts (`(type)value`)
- `dynamic_cast` does not work because Node.js is built without
[Run Time Type Information][]

Further reading:
* [ES.48]: Avoid casts
* [ES.49]: If you must use a cast, use a named cast

### Using `auto`

Expand Down Expand Up @@ -299,9 +315,25 @@ exports.foo = function(str) {

#### Avoid throwing JavaScript errors in nested C++ methods

When you have to throw the errors from C++, try to do it at the top level and
not inside of nested calls.
When you need to throw a JavaScript exception from C++ (i.e.
`isolate()->ThrowException()`) prefer to do it as close to the return to JS as
possible, and not inside of nested C++ calls. Since this changes the JS
execution state doing it closest to where it is consumed reduces the chances of
side effects.

Node.js is built [without C++ exception handling][], so code using `throw` or
even `try` and `catch` **will** break.

Using C++ `throw` is not allowed.

[C++ Core Guidelines]: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
[Google C++ Style Guide]: https://google.github.io/styleguide/cppguide.html
[Google’s `cpplint`]: https://github.com/google/styleguide
[errors]: https://github.com/nodejs/node/blob/master/doc/guides/using-internal-errors.md
[ES.47]: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-nullptr
[ES.48]: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-casts
[ES.49]: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-casts-named
[R.20]: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-owner
[R.21]: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-unique
[Run Time Type Information]: https://en.wikipedia.org/wiki/Run-time_type_information
[cppref_auto_ptr]: https://en.cppreference.com/w/cpp/memory/auto_ptr
[without C++ exception handling]: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_exceptions.html#intro.using.exception.no
32 changes: 12 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,23 +159,17 @@ source and a list of supported platforms.

## Security

Security flaws in Node.js should be reported by emailing [email protected].
Please do not disclose security bugs publicly until they have been handled by
the security team.
If you find a security vulnerability in Node.js, please report it to
[email protected]. Please withhold public disclosure until after the security
team has addressed the vulnerability.

Your email will be acknowledged within 24 hours, and you will receive a more
detailed response to your email within 48 hours indicating the next steps in
handling your report.
The security team will acknowledge your email within 24 hours. You will receive
a more detailed response within 48 hours.

There are no hard and fast rules to determine if a bug is worth reporting as
a security issue. The general rule is an issue worth reporting should allow an
attacker to compromise the confidentiality, integrity, or availability of the
Node.js application or its system for which the attacker does not already have
the capability.

To illustrate the point, here are some examples of past issues and what the
Security Response Team thinks of them. When in doubt, however, please do send
us a report nonetheless.
There are no hard and fast rules to determine if a bug is worth reporting as a
security issue. Here are some examples of past issues and what the Security
Response Team thinks of them. When in doubt, please do send us a report
nonetheless.


### Public disclosure preferred
Expand Down Expand Up @@ -214,9 +208,7 @@ When in doubt, please do send us a report.

## Current Project Team Members

The Node.js project team comprises a group of core collaborators and a sub-group
that forms the _Technical Steering Committee_ (TSC) which governs the project.
For more information about the governance of the Node.js project, see
For information about the governance of the Node.js project, see
[GOVERNANCE.md](./GOVERNANCE.md).

### TSC (Technical Steering Committee)
Expand Down Expand Up @@ -593,7 +585,7 @@ Node.js releases are signed with one of the following GPG keys:
* **Rod Vagg** &lt;[email protected]&gt;
`DD8F2338BAE7501E3DD5AC78C273792F7D83545D`

The full set of trusted release keys can be imported by running:
To import the full set of trusted release keys:

```shell
gpg --keyserver pool.sks-keyservers.net --recv-keys 94AE36675C464D64BAFA68DD7434390BDBE9B9C5
Expand All @@ -609,7 +601,7 @@ gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273
See the section above on [Verifying Binaries](#verifying-binaries) for how to
use these keys to verify a downloaded file.

Previous releases may also have been signed with one of the following GPG keys:
Other keys used to sign some previous releases:

* **Chris Dickinson** &lt;[email protected]&gt;
`9554F04D7259F04124DE6B476D5A82AC7E37093B`
Expand Down
Loading