Skip to content

(v6.x backport) test: refactor test-stream2-readable-wrap.js #11797

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
299 commits
Select commit Hold shift + click to select a range
e728718
doc: update TheAlphaNerd to MylesBorins
MylesBorins Jan 3, 2017
075de21
assert: update comments
Jan 2, 2017
0a07d2b
benchmark: improve readability of net benchmarks
mscdex Dec 25, 2016
0f06879
test: improve test-fs-null-bytes
edsadr Dec 30, 2016
bbb6c69
test: mark test-tty-wrap as flaky for AIX
mhdawson Jan 4, 2017
599f9d7
meta: decharter the http working group
jasnell Jan 4, 2017
40833a4
net: prefer === to ==
notarseniy Feb 22, 2017
a3b49dd
doc: link to readable and writeable stream section
seppevs Feb 22, 2017
2f2dc0d
doc: document clientRequest.aborted
zbjornson Feb 24, 2017
c976aad
test: favor assertions over console logging
Trott Feb 25, 2017
d63a712
doc: argument types for assert methods
ameliavoncat Feb 25, 2017
be3d43b
build: add rule to clean addon tests build
joyeecheung Feb 23, 2017
a95851e
process: fix typo in comments
levsthings Feb 22, 2017
92346db
assert: apply minor refactoring
Trott Feb 22, 2017
60cde96
test: fix flaky test-vm-timeout-rethrow
kunalspathak Feb 24, 2017
c5d7c33
doc: note message event listeners ref IPC channels
DiegoRBaquero Feb 22, 2017
4e9c36a
test: add cases for unescape & unescapeBuffer
watilde Feb 17, 2017
e918edb
lib: add constant kMaxCallbacksUntilQueueIsShortened
danbev Feb 3, 2017
9c4077d
lib: rename kMaxCallbacksUntilQueueIsShortened
JungMinu Feb 21, 2017
ae4515d
test: throw check in test-zlib-write-after-close
Feb 21, 2017
cd1dca6
doc,test: args to `buffer.copy` can be Uint8Arrays
addaleax Feb 21, 2017
64afb0b
test: increase coverage of vm
DavidCai1111 Feb 22, 2017
ed04212
build: fail on CI if leftover processes
Trott Feb 9, 2017
5b5b1d6
src: update http-parser link
danbev Feb 21, 2017
109c852
build: fix newlines in addon build output
mscdex Feb 20, 2017
7c1d578
tty: avoid oob warning in TTYWrap::GetWindowSize()
reklatsmasters Feb 18, 2017
baf1865
tls: do not crash on STARTTLS when OCSP requested
indutny Jan 9, 2017
aaaa4c7
benchmark: add dgram bind(+/- params) benchmark
vsemozhetbyt Feb 11, 2017
57f6d55
test: add regex check to test-module-loading
tarang9211 Feb 16, 2017
a98c1f6
doc: add comment for net.Server's error event
jjqq2013 Feb 12, 2017
1628672
test: improve coverage in test-crypto.dh
ejc-main Feb 9, 2017
ba48075
test: add error checking in callback
Trott Feb 17, 2017
f921637
test: refactor test-http-response-splitting
notarseniy Feb 16, 2017
49a66a4
test: add test cases for path
hiroppy Feb 18, 2017
170cb3c
test: fix over-dependence on native promise impl
ofrobots Jan 17, 2017
8ca88c5
src: remove usage of deprecated debug API
hashseed Feb 2, 2017
253f289
child_process: refactor internal/child_process.js
notarseniy Feb 14, 2017
cb9b7bf
test: add coverage for utf8CheckIncomplete()
sushi90 Feb 16, 2017
f5d9202
child_process: remove empty if condition
cjihrig Feb 16, 2017
f3546b7
vm: refactor vm module
jasnell Feb 15, 2017
1c2ce91
test: remove unused args and comparison fix
sashashakun Feb 14, 2017
5f1b9a4
doc: improve test/README.md
joyeecheung Feb 7, 2017
444066e
test: improve crypto coverage
Feb 10, 2017
fcad958
test: consolidate buffer.read() in a file
larissayvette Feb 10, 2017
9394ba7
doc: add STYLE_GUIDE (moved from nodejs/docs)
gibfahn Feb 12, 2017
5398b09
doc: change STYLE-GUIDE to STYLE_GUIDE
Dean-Coakley Feb 20, 2017
cb9cb32
test: cases to querystring related to empty string
watilde Feb 13, 2017
1ace4e2
util: use ES2015+ Object.is to check negative zero
shinnn Feb 13, 2017
c74fa1b
tools: suggest python2 command in configure
silverwind Feb 15, 2017
9a516bc
child_process: move anonymous class to top level
JacksonTian Feb 3, 2017
28d25fd
test: refactor test-dgram-membership
Trott Feb 14, 2017
0e4f5c7
test: improve message in net-connect-local-error
Trott Feb 15, 2017
4ddab7f
doc: dns examples implied string args were arrays
sam-github Feb 13, 2017
c6346d1
doc: describe when stdout/err is sync
sam-github Jan 18, 2017
f266573
assert: remove unneeded condition
Trott Feb 11, 2017
6a80edc
assert: unlock the assert API
Trott Feb 10, 2017
d6093e7
test: improve crypto coverage
akito0107 Feb 10, 2017
c4bf1b5
timer,domain: maintain order of timer callbacks
jBarz Dec 29, 2016
08a2708
doc: update code examples in domain.md
vsemozhetbyt Feb 1, 2017
e2a3ac0
src: remove unused typedef
bnoordhuis Feb 12, 2017
ffea1e8
child_process: exit spawnSync with null on signal
cjihrig Feb 10, 2017
69fe507
doc: update link to V8 Embedder's guide
fhinkel Feb 13, 2017
6853412
test: add coverage for dgram _createSocketHandle()
cjihrig Feb 10, 2017
104e68c
test: refactor test-repl-sigint-nested-eval
Trott Feb 10, 2017
319bf43
test: improve punycode test coverage
seppevs Feb 3, 2017
77d1398
src: support UTF-8 in compiled-in JS source files
bnoordhuis Feb 2, 2017
c30245f
test: refactor test-repl-sigint
Trott Feb 11, 2017
7a1d236
doc: update email and add personal pronoun
JungMinu Feb 12, 2017
49dfa89
timer: remove duplicated word in comment
asafdav2 Feb 12, 2017
d0036c7
test: improve test-assert.js
Feb 1, 2017
09d96c9
meta: adding Italo A. Casas PGP Fingerprint
italoacasas Feb 6, 2017
4a7bf0a
test: querystring.escape with multibyte characters
watilde Feb 9, 2017
7550a3b
test: refactor test-dgram-setBroadcast.js
cjihrig Feb 9, 2017
4ddbff5
test: add vm module edge cases
fhinkel Feb 9, 2017
fe9bf31
src: fix delete operator on vm context
fhinkel Feb 9, 2017
c0cac51
meta: remove Chris Dickinson from CTC
chrisdickinson Feb 9, 2017
39c8a36
test: adapt test-debugger-pid to localized Windows
vsemozhetbyt Feb 9, 2017
a81fbbd
doc: drop "and io.js" from release section
bnoordhuis Jan 28, 2017
c7339f5
doc: improve consistency in documentation titles
vsemozhetbyt Feb 7, 2017
339a9e5
doc: edit maxBuffer/Unicode paragraph for clarity
Trott Feb 7, 2017
8a078c8
doc: clarify the behavior of Buffer.byteLength
seishun Feb 9, 2017
9c368b4
test: add coverage for string array dgram send()
cjihrig Feb 8, 2017
a609afc
tools: add compile_commands.json gyp generator
bnoordhuis Aug 5, 2016
1366b64
test: improve checks in test-path-parse-format
cjihrig Feb 7, 2017
096bc4a
doc: add links between cork() and uncork()
mcollina Feb 7, 2017
7060745
doc: add and fix System Error properties
darai0512 Jan 24, 2017
d58b2e0
doc: fix typo in dgram doc
Trott Feb 5, 2017
6e7d5a9
build: disable C4267 conversion compiler warning
bnoordhuis Feb 6, 2017
b3771a7
test: remove obsolete comment from dgram test
ALJCepeda Sep 21, 2016
94c4ce9
test: increase specificity in dgram test
Trott Feb 5, 2017
4a4b84b
test: improve crypto.setEngine coverage to check for errors
seppevs Feb 3, 2017
b5bbd8b
benchmark: add assert.deep[Strict]Equal benchmarks
joyeecheung Jan 31, 2017
b065847
doc: remove extraneous paragraph from assert doc
Trott Feb 5, 2017
3213768
doc: improve testing guide
joyeecheung Feb 3, 2017
6af30ec
doc: add not-an-aardvark as ESLint contact
Trott Feb 4, 2017
eaab99e
test: simplify output handling in repl tests
Trott Feb 2, 2017
1ae783b
meta: add explicit deprecation and semver-major policy
jasnell Aug 3, 2016
b2a8894
doc: typographical fixes in COLLABORATOR_GUIDE.md
addaleax Feb 4, 2017
af780c9
doc: fix "initial delay" link in http.md
Krinkle Feb 1, 2017
b0b99b7
doc: remove assertions about assert
Trott Feb 2, 2017
f717b3b
doc: edit stability text for clarity and style
Trott Feb 2, 2017
331e4da
doc: clarify msg when doc/api/cli.md not updated
Jan 18, 2017
7e89c2a
doc: add personal pronouns option
Trott Jan 31, 2017
5293ea8
src: unconsume stream fix in internal http impl
Kasher Jan 26, 2017
d1375ad
readline: update 6 comparions to strict
umairishaq Jan 31, 2017
79e5eb2
crypto: Remove expired certs from CNNIC whitelist
shigeki Nov 4, 2016
1d415a5
crypto: add cert check issued by StartCom/WoSign
shigeki Nov 4, 2016
0907684
test: improve coverage on removeListeners functions
Feb 3, 2017
e8f784e
test: fix timing sensitivity in debugger test
ofrobots Jan 26, 2017
e6b2ddd
test: add path.join's test
hiroppy Jan 29, 2017
7823aac
test: improve error messages in test-npm-install
gonenduk Jan 26, 2017
e0ce463
doc: fix confusing example in dns.md
vsemozhetbyt Jan 26, 2017
6264aed
doc: edit CONTRIBUTING.md for clarity
Trott Jan 27, 2017
666ef49
doc: correct and complete dgram's Socket.bind docs
strugee Jan 26, 2017
8932367
doc: add who to CC list for dgram
cjihrig Jan 27, 2017
f98a7fa
doc: fix typo in http.md
magnetikonline Jan 24, 2017
ed1a5b4
benchmark: move setImmediate benchmarks to timers
joshuacolvin Jan 26, 2017
e064866
stream: move legacy to lib/internal dir
yorkie Aug 9, 2016
ea06647
test-console: streamline arrow fn and refine regex
jonniedarko Jan 27, 2017
1eeb38d
test: add 2nd argument to throws in test-assert
Marlena Jan 29, 2017
72f644d
test: require handler to be run in sigwinch test
Trott Jan 30, 2017
ff905ee
benchmark: move punycode benchmark out of net
mscdex Dec 25, 2016
9a99608
test: improve test-event-emitter-modify-in-emit
edsadr Jan 6, 2017
3103c6e
test: provide duration/interval to timers
Trott Nov 4, 2016
9f0abf4
tools: add lint rule to enforce timer arguments
Trott Nov 4, 2016
50523dd
test: refactor test-fs-utimes
jun-oka Oct 26, 2016
0678b70
test: improve test-fs-readfile-zero-byte-liar
edsadr Jan 2, 2017
198b7b7
test: improve test-http-chunked-304
edsadr Jan 7, 2017
7b19f05
test: allow testing uid and gid separately
cjihrig Jan 5, 2017
cd5b561
test: refactor the code in test-child-process-spawn-loop.js
sivaprs Jan 4, 2017
d7df7c1
test: improve zlib-from-gzip-with-trailing-garbage
lfkwtz Jan 7, 2017
803040c
test: refactor test-watch-file.js
sivaprs Jan 7, 2017
a41dd25
test: improve the code in test-process-hrtime
edsadr Jan 8, 2017
ea2973e
doc: specify sorted requires in tests
sam-github Jan 9, 2017
d494d84
test: refactor test-doctool-html.js
hiroppy Jan 8, 2017
29e00ed
test: fix misplaced ) in http response statuscode test
nfriedly Jan 8, 2017
f8cfe64
test: validate 'expected' argument to mustCall()
nfriedly Oct 11, 2016
4153c36
lib: refactor crypto cipher/hash/curve getters
Trott Jan 8, 2017
b2d9cc6
test: refactor the code of test-keep-alive.js
sivaprs Jan 8, 2017
839b1aa
test: refactor test-crypto-padding-aes256
radelmann Jan 5, 2017
485ba22
test: add test for noAssert option in buf.read*()
larissayvette Jan 5, 2017
dedb83c
src: enable writev for pipe handles on Unix
aqrln Jan 7, 2017
4e1642f
test: move resource intensive test to sequential
Trott Jan 11, 2017
4153b35
benchmark: don't lint autogenerated modules
mscdex Jan 12, 2017
1219635
test: use realpath for NODE_TEST_DIR in common.js
gibfahn Jan 10, 2017
7001e2d
test: fix temp-dir option in tools/test.py
gibfahn Jan 10, 2017
eea8abb
readline: refactor construct Interface
JacksonTian Jan 18, 2016
03cafe3
test: improve tests in pummel/test-exec
chasestarr Jan 12, 2017
5b992e5
test: no unused args test-fs-watch-file.js
istinson Jan 12, 2017
21e1a16
doc: remove duplicate properties bullet in readme
trendsetter37 Jan 11, 2017
9bdb1f3
lib: refactor bootstrap_node.js regular expression
Trott Jan 12, 2017
b4b1c2e
test: check error msg test-writeint.js
liirene1 Jan 12, 2017
912873b
util: improve readability of normalizeEncoding
joyeecheung Dec 24, 2016
fcc928c
test,repl: add coverage for repl .clear+useGlobal
Trott Jan 12, 2017
81d25e8
test: add http_incoming's matchKnownFields test
hiroppy Jan 14, 2017
ac0d8f8
test: delete duplicate test of noAssert in readUInt*
larissayvette Jan 13, 2017
8b32821
test,util: remove lint workarounds
Trott Jan 13, 2017
92b392c
test: increase test-crypto.js strictness
Trott Jan 13, 2017
aa5cf7c
test: improve the code in test-process-cpuUsage
edsadr Jan 12, 2017
a3ada12
crypto,tls: fix mutability of return values
Trott Jan 13, 2017
a61b5e6
build: don't squash signal handlers with --shared
Dec 30, 2016
670e976
lib: remove unnecessary parameter for assertCrypto()
JacksonTian Jan 16, 2017
58ddc58
build: move source files from headers section
danbev Jan 17, 2017
3eecc92
test: tests for _readableStream.awaitDrain
shmuga Jan 17, 2017
2a36798
test: add http-common's test
hiroppy Jan 16, 2017
f6f3fa0
doc: HTTP response getHeader doc fix
fhalde Jan 15, 2017
565881d
test: simplify array initialization
Trott Jan 17, 2017
55515e6
test: refactor test-repl-tab-complete
Trott Jan 18, 2017
9f261a6
test: add message verification on assert.throws
tmeisenh Jan 19, 2017
fbbe68c
test: don't connect to :: (use localhost instead)
gibfahn Jan 17, 2017
8ecd878
test: fix flaky test-regress-GH-897
Trott Jan 19, 2017
1c8caa8
crypto: freelist_max_len is gone in OpenSSL 1.1.0
agl Jan 17, 2017
3eada26
src: add a missing space in node_os.cc
aqrln Jan 21, 2017
1830d5d
src: remove unnecessary req_wrap_obj
danbev Jan 21, 2017
7704b08
test: check fd 0,1,2 are used, not access mode
jBarz Dec 16, 2016
48c9c68
test: increase coverage for punycode's decode
hiroppy Jan 21, 2017
dd69952
test: improve test-assert
richnologies Jan 20, 2017
4fee955
url: fix surrogate handling in encodeAuth()
TimothyGu Feb 14, 2017
fa276ef
buffer: improve toJSON() performance
mscdex Jan 19, 2017
25963ec
test: fix and improve debugger-client test
thefourtheye Dec 21, 2016
6966a58
test: refactor test-debugger-remote
thefourtheye Dec 26, 2016
e862e09
test: fix process.title expectation
thefourtheye Jan 3, 2017
1c36e6d
test: increase timeout in break-on-uncaught
thefourtheye Jan 15, 2017
d0e934f
deps: backport dfb8d33 from V8 upstream
targos Feb 21, 2017
e71fc70
test: add regression test for V8 parse error
targos Feb 21, 2017
4f9e4b4
test: add dgram.Socket.prototype.sendto's test
hiroppy Jan 19, 2017
04ecae7
test: reduce unmanaged parallelism in domain test
joyeecheung Dec 19, 2016
97167f1
test: refactor the code in test-fs-watch.js
sivaprs Dec 21, 2016
9515cc2
doc: DEFAULT_ECDH_CURVE was added in 0.11.13
sam-github Jan 24, 2017
c43fbbd
test: test hmac binding robustness
sam-github Jan 20, 2017
e6eb8da
tools: rename eslintrc to an undeprecated format
thefourtheye Jul 13, 2016
daca360
doc: document argument variant in the repl.md
vsemozhetbyt Dec 10, 2016
6e8ae7f
test: improve test-fs-write-file-sync
edsadr Jan 7, 2017
c2dc381
test: refactor cluster-preload.js
hiroppy Jan 9, 2017
1bbb611
test: add test case to test-http-response-statuscode.js
hiroppy Jan 14, 2017
9f5a905
test: improve code in test-http-host-headers
edsadr Jan 16, 2017
3c5f65f
test: improve test-stream2-large-read-stall
stefanjudis Jan 10, 2017
b70f977
test: improve code in test-domain-multi
edsadr Jan 15, 2017
ba4d56e
test: improve code in test-console-instance
edsadr Jan 17, 2017
3033201
test: improving coverage for dgram
hiroppy Jan 13, 2017
d481a63
test: refactor test-fs-read-zero-length.js
hiroppy Jan 10, 2017
01a43fd
test: improving coverage of dns-lookup
hiroppy Jan 17, 2017
60785e6
build: sort sources alphabetically
danbev Jan 18, 2017
3a6fd1d
test: increase coverage of string-decoder
hiroppy Jan 18, 2017
52d09f2
test: update V8 flag in test
fhinkel Dec 20, 2016
9232aa3
test: add dgram.Socket.prototype.bind's test
hiroppy Jan 19, 2017
23fc1ef
src: add NODE_NO_WARNINGS to --help output
cjihrig Jan 20, 2017
24abcaa
test: improve code in test-crypto-verify
edsadr Jan 20, 2017
076d56e
crypto: return the retval of HMAC_Update
tmeisenh Jan 19, 2017
b68f488
test: update Buffer.lastIndexOf
dcposch Dec 7, 2016
38de652
doc: clarify Buffer.indexOf/lastIndexOf edge cases
dcposch Dec 7, 2016
056d83d
buffer: fix comments in bidirectionalIndexOf
dcposch Dec 7, 2016
9d37abb
buffer: improve compare() performance
mscdex Jan 20, 2017
d954adf
querystring: improve parse() performance
mscdex Jan 18, 2017
a02671d
querystring: improve stringify() performance
mscdex Jan 17, 2017
e84efde
querystring: improve unescapeBuffer performance
mscdex Jan 16, 2017
6a5ac26
test: add process.assert's test
hiroppy Jan 20, 2017
418ae41
test: increase coverage for exec() functions
cjihrig Jan 20, 2017
a420d01
doc: update http.md for consistency and clarity
lance Jan 9, 2017
0004f05
tools,doc: add Google Analytics tracking.
phillipj Jan 25, 2017
6e25ea5
test: enhance test-timers
Trott Jan 23, 2017
644d08b
test: expand test coverage of fs.js
vinimdocarmo Jan 24, 2017
a9acc2f
test: check noAssert option in buf.write*()
larissayvette Jan 10, 2017
82b3002
benchmark: add benchmark for object properties
targos Jan 21, 2017
9496494
test: expand test coverage of events.js
vinimdocarmo Jan 23, 2017
7b040f2
test: expand test coverage of fs.js
vinimdocarmo Jan 23, 2017
c004d43
benchmark: add more thorough timers benchmarks
Fishrock123 Jan 20, 2017
aa58444
test: allow for slow hosts in spawnSync() test
Trott Jan 25, 2017
8ccb207
test: increase coverage for stream's duplex
hiroppy Jan 23, 2017
bae0174
doc: for style, remove "isn't" contraction
sam-github Jan 24, 2017
66d6ee7
doc: remove Chris Dickinson from active releasers
bnoordhuis Jan 26, 2017
35509f2
http: make request.abort() destroy the socket
lpinca Jan 15, 2017
d7a94a9
test: check error message in test-http-outgoing-proto
hkalexling Jan 21, 2017
5b0d378
test: guarantee test runs in test-readline-keys
Trott Jan 26, 2017
07610f6
test: add known_issues test for #10223
AnnaMag Jan 26, 2017
6cc0db8
test: add an exception test to http-write-head
hiroppy Jan 27, 2017
ae333d7
dgram: remove this aliases
cjihrig Feb 8, 2017
23e2a42
test: increase dgram ref()/unref() coverage
cjihrig Feb 8, 2017
eec96ef
test: increase setMulticastLoopback() coverage
cjihrig Feb 10, 2017
c61d7d2
dgram: fix possibly deoptimizing use of arguments
vsemozhetbyt Feb 8, 2017
0e636c8
process: improve memoryUsage() performance
mscdex Feb 22, 2017
f343cb3
os: improve loadavg() performance
mscdex Feb 23, 2017
3da0c77
fs: improve performance for sync stat() functions
mscdex Feb 23, 2017
1ad17f6
benchmark,lib,test: adjust for linting
Trott Jan 1, 2017
89bca14
tools: update ESLint to current version
Trott Jan 1, 2017
dd97f20
tools: remove custom align-function-arguments rule
Trott Jan 1, 2017
10413ca
doc: add missing entry in v6 changelog table
lpinca Feb 24, 2017
c2e818d
doc: restrict the ES.Next features usage in tests
DavidCai1111 Feb 19, 2017
94cd536
test: refactor test-stream2-readable-wrap.js
DavidGoussev Dec 31, 2016
058b7b4
test: add last line hard return
DavidGoussev Mar 13, 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
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ test/disabled
test/tmp*/
tools/eslint
node_modules
benchmark/tmp/
9 changes: 7 additions & 2 deletions .eslintrc → .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ rules:
computed-property-spacing: 2
eol-last: 2
func-call-spacing: 2
indent: [2, 2, {SwitchCase: 1, MemberExpression: 1}]
func-name-matching: 2
indent: [2, 2, {ArrayExpression: first,
CallExpression: {arguments: first},
MemberExpression: 1,
ObjectExpression: first,
SwitchCase: 1}]
key-spacing: [2, {mode: minimum}]
keyword-spacing: 2
linebreak-style: [2, unix]
Expand Down Expand Up @@ -119,11 +124,11 @@ rules:
template-curly-spacing: 2

# Custom rules in tools/eslint-rules
align-function-arguments: 2
align-multiline-assignment: 2
assert-fail-single-argument: 2
assert-throws-arguments: [2, { requireTwo: false }]
new-with-error: [2, Error, RangeError, TypeError, SyntaxError, ReferenceError]
timer-arguments: 2

# Global scoped method and vars
globals:
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ Felix Becker <felix.b@outlook.com>
Igor Klopov <igor@klopov.com>
Tsarevich Dmitry <dimhotepus@users.noreply.github.com>
Ojas Shirekar <ojas.shirekar@gmail.com>
Noah Rose <noahroseledesma@seattleacademy.org>
Noah Rose Ledesma <noahroseledesma@seattleacademy.org>
Rafael Cepeda <rcepeda1993@gmail.com>
Chinedu Francis Nwafili <frankie.nwafili@gmail.com>
Braydon Fuller <braydon@bitpay.com>
Expand Down
3 changes: 2 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ Prerequisites:
* 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.
including the Community edition (remember to select
"Common Tools for Visual C++ 2015" feature during installation).
* 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
225 changes: 212 additions & 13 deletions COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

* [Issues and Pull Requests](#issues-and-pull-requests)
* [Accepting Modifications](#accepting-modifications)
- [Internal vs. Public API](#internal-vs-public-api)
- [Breaking Changes](#breaking-changes)
- [Deprecations](#deprecations)
- [Involving the CTC](#involving-the-ctc)
* [Landing Pull Requests](#landing-pull-requests)
- [Technical HOWTO](#technical-howto)
Expand Down Expand Up @@ -84,6 +87,206 @@ All pull requests that modify executable code should be subjected to
continuous integration tests on the
[project CI server](https://ci.nodejs.org/).

### Internal vs. Public API

Due to the nature of the JavaScript language, it can often be difficult to
establish a clear distinction between which parts of the Node.js implementation
represent the "public" API Node.js users should assume to be stable and which
are considered part of the "internal" implementation detail of Node.js itself.
A general rule of thumb has been to base the determination off what
functionality is actually *documented* in the official Node.js API
documentation. However, it has been repeatedly demonstrated that either the
documentation does not completely cover implemented behavior or that Node.js
users have come to rely heavily on undocumented aspects of the Node.js
implementation.

While there are numerous exceptions, the following general rules should be
followed to determine which aspects of the Node.js API are considered
"internal":

- Any and all functionality exposed via `process.binding(...)` is considered to
be internal and *not* part of the Node.js Public API.
- Any and all functionality implemented in `lib/internal/**/*.js` that is not
re-exported by code in `lib/*.js`, or is not documented as part of the
Node.js Public API, is considered to be internal.
- Any object property or method whose key is a non-exported `Symbol` is
considered to be an internal property.
- Any object property or method whose key begins with the underscore `_` prefix,
and is not documented as part of the Node.js Public API, is considered to be
an internal property.
- Any object, property, method, argument, behavior, or event not documented in
the Node.js documentation is considered to be internal.
- Any native C/C++ APIs/ABIs exported by the Node.js `*.h` header files that
are hidden behind the `NODE_WANT_INTERNALS` flag are considered to be
internal.

Exception to each of these points can be made if use or behavior of a given
internal API can be demonstrated to be sufficiently relied upon by the Node.js
ecosystem such that any changes would cause too much breakage. The threshold
for what qualifies as "too much breakage" is to be decided on a case-by-case
basis by the CTC.

If it is determined that a currently undocumented object, property, method,
argument, or event *should* be documented, then a pull request adding the
documentation is required in order for it to be considered part of the "public"
API.

Making a determination about whether something *should* be documented can be
difficult and will need to be handled on a case-by-case basis. For instance, if
one documented API cannot be used successfully without the use of a second
*currently undocumented* API, then the second API *should* be documented. If
using an API in a manner currently undocumented achieves a particular useful
result, a decision will need to be made whether or not that falls within the
supported scope of that API; and if it does, it should be documented.

Breaking changes to internal elements are permitted in semver-patch or
semver-minor commits but Collaborators should take significant care when
making and reviewing such changes. Before landing such commits, an effort
must be made to determine the potential impact of the change in the ecosystem
by analyzing current use and by validating such changes through ecosystem
testing using the [Canary in the Goldmine](https://github.com/nodejs/citgm)
tool. If a change cannot be made without ecosystem breakage, then CTC review is
required before landing the change as anything less than semver-major.

If a determination is made that a particular internal API (for instance, an
underscore `_` prefixed property) is sufficiently relied upon by the ecosystem
such that any changes may break user code, then serious consideration should be
given to providing an alternative Public API for that functionality before any
breaking changes are made.

### Breaking Changes

Backwards-incompatible changes may land on the master branch at any time after
sufficient review by collaborators and approval of at least two CTC members.

Examples of breaking changes include, but are not necessarily limited to,
removal or redefinition of existing API arguments, changing return values
(except when return values do not currently exist), removing or modifying
existing properties on an options argument, adding or removing errors,
changing error messages in any way, altering expected timing of an event (e.g.
moving from sync to async responses or vice versa), and changing the
non-internal side effects of using a particular API.

With a few notable exceptions outlined below, when backwards incompatible
changes to a *Public* API are necessary, the existing API *must* be deprecated
*first* and the new API either introduced in parallel or added after the next
major Node.js version following the deprecation as a replacement for the
deprecated API. In other words, as a general rule, existing *Public* APIs
*must not* change (in a backwards incompatible way) without a deprecation.

Exception to this rule is given in the following cases:

* Adding or removing errors thrown or reported by a Public API;
* Changing error messages;
* Altering the timing and non-internal side effects of the Public API.

Such changes *must* be handled as semver-major changes but MAY be landed
without a [Deprecation cycle](#deprecation-cycle).

From time-to-time, in particularly exceptional cases, the CTC may be asked to
consider and approve additional exceptions to this rule.

Purely additive changes (e.g. adding new events to EventEmitter
implementations, adding new arguments to a method in a way that allows
existing code to continue working without modification, or adding new
properties to an options argument) are handled as semver-minor changes.

Note that errors thrown, along with behaviors and APIs implemented by
dependencies of Node.js (e.g. those originating from V8) are generally not
under the control of Node.js and therefore *are not directly subject to this
policy*. However, care should still be taken when landing updates to
dependencies when it is known or expected that breaking changes to error
handling may have been made. Additional CI testing may be required.

#### When breaking changes actually break things

Breaking changes are difficult primarily because they change the fundamental
assumptions a user of Node.js has when writing their code and can cause
existing code to stop functioning as expected -- costing developers and users
time and energy to fix.

Because breaking (semver-major) changes are permitted to land in master at any
time, it should be *understood and expected* that at least some subset of the
user ecosystem *may* be adversely affected *in the short term* when attempting
to build and use Node.js directly from master. This potential instability is
precisely why Node.js offers distinct Current and LTS release streams that
offer explicit stability guarantees.

Specifically:

* Breaking changes should *never* land in Current or LTS except when:
* Resolving critical security issues.
* Fixing a critical bug (e.g. fixing a memory leak) requires a breaking
change.
* There is CTC consensus that the change is required.
* If a breaking commit does accidentally land in a Current or LTS branch, an
attempt to fix the issue will be made before the next release; If no fix is
provided then the commit will be reverted.

When any change is landed in master, and it is determined that the such
changes *do* break existing code, a decision may be made to revert those
changes either temporarily or permanently. However, the decision to revert or
not can often be based on many complex factors that are not easily codified. It
is also possible that the breaking commit can be labeled retroactively as a
semver-major change that will not be backported to Current or LTS branches.

### Deprecations

Deprecation refers to the identification of Public APIs that should no longer
be used and that may be removed or modified in non-backwards compatible ways in
a future major release of Node.js. Deprecation *may* be used with internal APIs
if there is expected impact on the user community.

Node.js uses three fundamental Deprecation levels:

* *Documentation-Only Deprecation* refers to elements of the Public API that are
being staged for deprecation in a future Node.js major release. An explicit
notice indicating the deprecated status is added to the API documentation
*but no functional changes are implemented in the code*. There will be no
runtime deprecation warning emitted for such deprecations.

* *Runtime Deprecation* refers to the use of process warnings emitted at
runtime the first time that a deprecated API is used. A command-line
switch can be used to escalate such warnings into runtime errors that will
cause the Node.js process to exit. As with Documentation-Only Deprecation,
the documentation for the API must be updated to clearly indicate the
deprecated status.

* *End-of-life* refers to APIs that have gone through Runtime Deprecation and
are ready to be removed from Node.js entirely.

Documentation-Only Deprecations *may* be handled as semver-minor or
semver-major changes. Such deprecations have no impact on the successful
operation of running code and therefore should not be viewed as breaking
changes.

Runtime Deprecations and End-of-life APIs (internal or public) *must* be
handled as semver-major changes unless there is CTC consensus to land the
deprecation as a semver-minor.

All Documentation-Only and Runtime deprecations will be assigned a unique
identifier that can be used to persistently refer to the deprecation in
documentation, emitted process warnings, or errors thrown. Documentation for
these identifiers will be included in the Node.js API documentation and will
be immutable once assigned. Even if End-of-Life code is removed from Node.js,
the documentation for the assigned deprecation identifier must remain in the
Node.js API documentation.

<a id="deprecation-cycle"></a>
A "Deprecation cycle" is one full Node.js major release during which an API
has been in one of the three Deprecation levels. (Note that Documentation-Only
Deprecations may land in a Node.js minor release but must not be upgraded to
a Runtime Deprecation until the next major release.)

No API can be moved to End-of-life without first having gone through a
Runtime Deprecation cycle.

A best effort will be made to communicate pending deprecations and associated
mitigations with the ecosystem as soon as possible (preferably *before* the pull
request adding the deprecation lands in master). All deprecations included in
a Node.js release should be listed prominently in the "Notable Changes" section
of the release notes.

### Involving the CTC

Collaborators may opt to elevate pull requests or issues to the CTC for
Expand Down Expand Up @@ -120,6 +323,7 @@ information regarding the change process:
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.
Expand Down Expand Up @@ -290,15 +494,15 @@ You can find more information [in the full LTS plan](https://github.com/nodejs/l

#### How does LTS work?

Once a stable branch enters LTS, changes in that branch are limited to bug
Once a Current branch enters LTS, changes in that branch are limited to bug
fixes, security updates, possible npm updates, documentation updates, and
certain performance improvements that can be demonstrated to not break existing
applications. Semver-minor changes are only permitted if required for bug fixes
and then only on a case-by-case basis with LTS WG and possibly Core Technical
Committee (CTC) review. Semver-major changes are permitted only if required for
security related fixes.

Once a stable branch moves into Maintenance mode, only **critical** bugs,
Once a Current branch moves into Maintenance mode, only **critical** bugs,
**critical** security fixes, and documentation updates will be permitted.

#### Landing semver-minor commits in LTS
Expand All @@ -318,9 +522,8 @@ CTC for further discussion.

#### How are LTS Branches Managed?

There are currently three LTS branches: `v4.x`, `v0.10`, and `v0.12`. Each
of these is paired with a "staging" branch: `v4.x-staging`, `v0.10-staging`,
and `v0.12-staging`.
There are currently two LTS branches: `v6.x` and `v4.x`. Each of these is paired
with a "staging" branch: `v6.x-staging` and `v4.x-staging`.

As commits land in `master`, they are cherry-picked back to each staging
branch as appropriate. If the commit applies only to the LTS branch, the
Expand All @@ -341,18 +544,14 @@ please feel free to include that information in the PR thread.

Several LTS related issue and PR labels have been provided:

* `lts-watch-v6.x` - tells the LTS WG that the issue/PR needs to be considered
for landing in the `v6.x-staging` branch.
* `lts-watch-v4.x` - tells the LTS WG that the issue/PR needs to be considered
for landing in the `v4.x-staging` branch.
* `lts-watch-v0.10` - tells the LTS WG that the issue/PR needs to be considered
for landing in the `v0.10-staging` branch.
* `lts-watch-v0.12` - tells the LTS WG that the issue/PR needs to be considered
for landing in the `v0.12-staging` branch.
* `land-on-v6.x` - tells the release team that the commit should be landed
in a future v6.x release
* `land-on-v4.x` - tells the release team that the commit should be landed
in a future v4.x release
* `land-on-v0.10` - tells the release team that the commit should be landed
in a future v0.10 release
* `land-on-v0.12` - tells the release team that the commit should be landed
in a future v0.12 release

Any collaborator can attach these labels to any PR/issue. As commits are
landed into the staging branches, the `lts-watch-` label will be removed.
Expand Down
Loading