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

doc: improve doc/markdown file organization coherence #31771

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
19fbcc1
doc: merge CODE_OF_CONDUCT.md and coc.md
DavenportEmma Feb 13, 2020
82404d7
doc: change underscore to hyphen in file name
DavenportEmma Feb 13, 2020
7c306dc
doc: move guide file to doc/guides
DavenportEmma Feb 13, 2020
63535cd
doc: update guide name
DavenportEmma Feb 13, 2020
fd5de31
doc: move guides to appropriate directory
DavenportEmma Feb 13, 2020
0e71d06
doc: move files from doc/ to doc/guides
DavenportEmma Feb 13, 2020
aa9de2a
doc: rename and move STYLE_GUIDE.md
DavenportEmma Feb 13, 2020
36b7c22
update broken links in CODE_OF_CONDUCT.md
DavenportEmma Feb 13, 2020
09b6894
doc: update foundation name in onboarding
tniessen Feb 10, 2020
5e41765
doc: expand C++ README with information about exception handling
addaleax Feb 10, 2020
e5e011d
doc: add directions to mark a release line as lts
Feb 10, 2020
d565041
test: improve test-fs-stat-bigint
Trott Feb 11, 2020
9da57a8
test: fix flaky parallel/test-repl-history-navigation test
BridgeAR Feb 9, 2020
bc55b57
lib: fix few comment typos in fs/watchers.js
lundibundi Feb 9, 2020
b9a7625
stream: removed outdated TODO
ronag Feb 8, 2020
26cb448
doc: fix default server timeout description for https
puzpuzpuz Feb 8, 2020
9179141
doc: update contact email for @ryzokuken
ryzokuken Feb 7, 2020
94eb0f9
doc: fix typo on fs docs
juanarbol Feb 3, 2020
611a158
worker: add support for .cjs extension
aduh95 Feb 6, 2020
9e805b1
doc: add prerequisites information for Arch
ryzokuken Feb 7, 2020
d0ed431
benchmark: swap var for let in benchmarks
RamirezAlex Jul 31, 2019
4bf888d
benchmark: use let instead of var
dnlup Jan 31, 2020
9cbf6af
crypto: fix performance regression
ronag Feb 11, 2020
13c05cd
doc: add glossary.md
gengjiawen May 1, 2019
9a1c19b
test: mark test-fs-stat-bigint flaky on FreeBSD
Trott Feb 11, 2020
0875837
stream: fix async iterator destroyed error order
ronag Jan 11, 2020
ad79237
doc: merge CODE_OF_CONDUCT.md and coc.md
DavenportEmma Feb 13, 2020
e1bd95d
doc: change underscore to hyphen in file name
DavenportEmma Feb 13, 2020
07bc3ee
doc: move guide file to doc/guides
DavenportEmma Feb 13, 2020
12354ee
doc: update guide name
DavenportEmma Feb 13, 2020
695f089
doc: move guides to appropriate directory
DavenportEmma Feb 13, 2020
ee9573c
doc: move files from doc/ to doc/guides
DavenportEmma Feb 13, 2020
64397e2
doc: rename and move STYLE_GUIDE.md
DavenportEmma Feb 13, 2020
d50459f
update broken links in CODE_OF_CONDUCT.md
DavenportEmma Feb 13, 2020
6d9b3d8
Revert "doc: merge CODE_OF_CONDUCT.md and coc.md"
DavenportEmma Feb 14, 2020
1c6cf86
Merge branch 'issue31741' of github.com:ConorDavenport/node into issu…
DavenportEmma Feb 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ Installation via Linux package manager can be achieved with:
* Fedora: `sudo dnf install python gcc-c++ make`
* CentOS and RHEL: `sudo yum install python gcc-c++ make`
* OpenSUSE: `sudo zypper install python gcc-c++ make`
* Arch Linux, Manjaro: `sudo pacman -S python gcc make`

FreeBSD and OpenBSD users may also need to install `libexecinfo`.

Expand Down
42 changes: 41 additions & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
# Code of Conduct
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@conordavenport this one should be left as is, with the link over to the nodejs/admin repo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, thanks for pointing that out


* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
The Node.js project has a Code of Conduct that *all* contributors are
expected to follow. This code describes the *minimum* behavior expectations
for all contributors.

As a contributor to Node.js, how you choose to act and interact towards your
fellow contributors, as well as to the community, will reflect back not only
on yourself but on the project as a whole. The Code of Conduct is designed and
intended, above all else, to help establish a culture within the project that
allows anyone and everyone who wants to contribute to feel safe doing so.

Should any individual act in any way that is considered in violation of the
Code of Conduct, corrective actions will be taken. It is possible, however,
for any individual to *act* in such a manner that is not in violation of the
strict letter of the Code of Conduct guidelines while still going completely
against the spirit of what that Code is intended to accomplish.

Open, diverse, and inclusive communities live and die on the basis of trust.
Contributors can disagree with one another so long as they trust that those
disagreements are in good faith and everyone is working towards a common goal.

## Bad actors

All contributors to Node.js tacitly agree to abide by both the letter and
spirit of the Code of Conduct. Failure, or unwillingness, to do so will
result in contributions being respectfully declined.

A *bad actor* is someone who repeatedly violates the *spirit* of the Code of
Conduct through consistent failure to self-regulate the way in which they
interact with other contributors in the project. In doing so, bad actors
alienate other contributors, discourage collaboration, and generally reflect
poorly on the project as a whole.

Being a bad actor may be intentional or unintentional. Typically, unintentional
bad behavior can be easily corrected by being quick to apologize and correct
course *even if you are not entirely convinced you need to*. Giving other
contributors the benefit of the doubt and having a sincere willingness to admit
that you *might* be wrong is critical for any successful open collaboration.

Don't be a bad actor.

* [Node.js Contributor Covenant Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/master/Moderation-Policy.md)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ For information about the governance of the Node.js project, see
* [rvagg](https://github.com/rvagg) -
**Rod Vagg** <rod@vagg.org>
* [ryzokuken](https://github.com/ryzokuken) -
**Ujjwal Sharma** <usharma1998@gmail.com> (he/him)
**Ujjwal Sharma** <ryzokuken@disroot.org> (he/him)
* [saghul](https://github.com/saghul) -
**Saúl Ibarra Corretgé** <saghul@gmail.com>
* [sam-github](https://github.com/sam-github) -
Expand Down
7 changes: 3 additions & 4 deletions benchmark/module/module-loader-deep.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function main({ ext, cache, files }) {
`${benchmarkDirectory}/a.js`,
'module.exports = {};'
);
for (var i = 0; i <= files; i++) {
for (let i = 0; i <= files; i++) {
fs.mkdirSync(`${benchmarkDirectory}/${i}`);
fs.writeFileSync(
`${benchmarkDirectory}/${i}/package.json`,
Expand All @@ -37,14 +37,13 @@ function main({ ext, cache, files }) {
}

function measureDir(cache, files) {
var i;
if (cache) {
for (i = 0; i <= files; i++) {
for (let i = 0; i <= files; i++) {
require(`${benchmarkDirectory}/${i}`);
}
}
bench.start();
for (i = 0; i <= files; i++) {
for (let i = 0; i <= files; i++) {
require(`${benchmarkDirectory}/${i}`);
}
bench.end(files);
Expand Down
9 changes: 4 additions & 5 deletions benchmark/module/module-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const bench = common.createBenchmark(main, {
function main({ n, name, cache, files, dir }) {
tmpdir.refresh();
fs.mkdirSync(benchmarkDirectory);
for (var i = 0; i <= files; i++) {
for (let i = 0; i <= files; i++) {
fs.mkdirSync(`${benchmarkDirectory}${i}`);
fs.writeFileSync(
`${benchmarkDirectory}${i}/package.json`,
Expand All @@ -42,15 +42,14 @@ function main({ n, name, cache, files, dir }) {
}

function measureDir(n, cache, files, name) {
var i;
if (cache) {
for (i = 0; i <= files; i++) {
for (let i = 0; i <= files; i++) {
require(`${benchmarkDirectory}${i}${name}`);
}
}
bench.start();
for (i = 0; i <= files; i++) {
for (var j = 0; j < n; j++)
for (let i = 0; i <= files; i++) {
for (let j = 0; j < n; j++)
require(`${benchmarkDirectory}${i}${name}`);
// Pretend mixed input (otherwise the results are less representative due to
// highly specialized code).
Expand Down
2 changes: 1 addition & 1 deletion benchmark/napi/function_args/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function main({ n, engine, type }) {
const args = generateArgs(type);

bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
fn.apply(null, args);
}
bench.end(n);
Expand Down
4 changes: 2 additions & 2 deletions benchmark/napi/function_call/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ try {
}
const napi = napi_binding.hello;

var c = 0;
let c = 0;
function js() {
return c++;
}
Expand All @@ -44,7 +44,7 @@ const bench = common.createBenchmark(main, {
function main({ n, type }) {
const fn = type === 'cxx' ? cxx : type === 'napi' ? napi : js;
bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
fn();
}
bench.end(n);
Expand Down
4 changes: 2 additions & 2 deletions benchmark/net/net-c2s-cork.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const bench = common.createBenchmark(main, {
dur: [5],
});

var chunk;
var encoding;
let chunk;
let encoding;

function main({ dur, len, type }) {
switch (type) {
Expand Down
4 changes: 2 additions & 2 deletions benchmark/net/net-c2s.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const bench = common.createBenchmark(main, {
dur: [5],
});

var chunk;
var encoding;
let chunk;
let encoding;

function main({ dur, len, type }) {
switch (type) {
Expand Down
4 changes: 2 additions & 2 deletions benchmark/net/net-pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const bench = common.createBenchmark(main, {
dur: [5],
});

var chunk;
var encoding;
let chunk;
let encoding;

function main({ dur, len, type }) {
switch (type) {
Expand Down
12 changes: 6 additions & 6 deletions benchmark/net/net-s2c.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const bench = common.createBenchmark(main, {
dur: [5]
});

var chunk;
var encoding;
var recvbuf;
var received = 0;
let chunk;
let encoding;
let recvbuf;
let received = 0;

function main({ dur, sendchunklen, type, recvbuflen, recvbufgenfn }) {
if (isFinite(recvbuflen) && recvbuflen > 0)
Expand All @@ -38,8 +38,8 @@ function main({ dur, sendchunklen, type, recvbuflen, recvbufgenfn }) {
}

const reader = new Reader();
var writer;
var socketOpts;
let writer;
let socketOpts;
if (recvbuf === undefined) {
writer = new Writer();
socketOpts = { port: PORT };
Expand Down
4 changes: 2 additions & 2 deletions benchmark/net/net-wrap-js-stream-passthrough.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const bench = common.createBenchmark(main, {
flags: ['--expose-internals']
});

var chunk;
var encoding;
let chunk;
let encoding;

function main({ dur, len, type }) {
// Can only require internals inside main().
Expand Down
8 changes: 4 additions & 4 deletions benchmark/net/tcp-raw-c2s.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function main({ dur, len, type }) {
const PORT = common.PORT;

const serverHandle = new TCP(TCPConstants.SERVER);
var err = serverHandle.bind('127.0.0.1', PORT);
let err = serverHandle.bind('127.0.0.1', PORT);
if (err)
fail(err, 'bind');

Expand All @@ -38,7 +38,7 @@ function main({ dur, len, type }) {

// The meat of the benchmark is right here:
bench.start();
var bytes = 0;
let bytes = 0;

setTimeout(() => {
// report in Gb/sec
Expand Down Expand Up @@ -67,7 +67,7 @@ function main({ dur, len, type }) {
}

function client(type, len) {
var chunk;
let chunk;
switch (type) {
case 'buf':
chunk = Buffer.alloc(len, 'x');
Expand Down Expand Up @@ -102,7 +102,7 @@ function main({ dur, len, type }) {
function write() {
const writeReq = new WriteWrap();
writeReq.oncomplete = afterWrite;
var err;
let err;
switch (type) {
case 'buf':
err = clientHandle.writeBuffer(writeReq, chunk);
Expand Down
8 changes: 4 additions & 4 deletions benchmark/net/tcp-raw-pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function main({ dur, len, type }) {

// Server
const serverHandle = new TCP(TCPConstants.SERVER);
var err = serverHandle.bind('127.0.0.1', PORT);
let err = serverHandle.bind('127.0.0.1', PORT);
if (err)
fail(err, 'bind');

Expand Down Expand Up @@ -66,7 +66,7 @@ function main({ dur, len, type }) {
};

// Client
var chunk;
let chunk;
switch (type) {
case 'buf':
chunk = Buffer.alloc(len, 'x');
Expand All @@ -83,7 +83,7 @@ function main({ dur, len, type }) {

const clientHandle = new TCP(TCPConstants.SOCKET);
const connectReq = new TCPConnectWrap();
var bytes = 0;
let bytes = 0;

err = clientHandle.connect(connectReq, '127.0.0.1', PORT);
if (err)
Expand Down Expand Up @@ -118,7 +118,7 @@ function main({ dur, len, type }) {
function write() {
const writeReq = new WriteWrap();
writeReq.oncomplete = afterWrite;
var err;
let err;
switch (type) {
case 'buf':
err = clientHandle.writeBuffer(writeReq, chunk);
Expand Down
8 changes: 4 additions & 4 deletions benchmark/net/tcp-raw-s2c.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function main({ dur, len, type }) {
const PORT = common.PORT;

const serverHandle = new TCP(TCPConstants.SERVER);
var err = serverHandle.bind('127.0.0.1', PORT);
let err = serverHandle.bind('127.0.0.1', PORT);
if (err)
fail(err, 'bind');

Expand All @@ -38,7 +38,7 @@ function main({ dur, len, type }) {
if (err)
fail(err, 'connect');

var chunk;
let chunk;
switch (type) {
case 'buf':
chunk = Buffer.alloc(len, 'x');
Expand All @@ -62,7 +62,7 @@ function main({ dur, len, type }) {
const writeReq = new WriteWrap();
writeReq.async = false;
writeReq.oncomplete = afterWrite;
var err;
let err;
switch (type) {
case 'buf':
err = clientHandle.writeBuffer(writeReq, chunk);
Expand Down Expand Up @@ -108,7 +108,7 @@ function main({ dur, len, type }) {
fail(err, 'connect');

connectReq.oncomplete = function() {
var bytes = 0;
let bytes = 0;
clientHandle.onread = function(buffer) {
// We're not expecting to ever get an EOF from the client.
// Just lots of data forever.
Expand Down
2 changes: 1 addition & 1 deletion benchmark/os/cpus.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, {

function main({ n }) {
bench.start();
for (var i = 0; i < n; ++i)
for (let i = 0; i < n; ++i)
cpus();
bench.end(n);
}
2 changes: 1 addition & 1 deletion benchmark/os/loadavg.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, {

function main({ n }) {
bench.start();
for (var i = 0; i < n; ++i)
for (let i = 0; i < n; ++i)
loadavg();
bench.end(n);
}
2 changes: 1 addition & 1 deletion benchmark/os/networkInterfaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, {

function main({ n }) {
bench.start();
for (var i = 0; i < n; ++i)
for (let i = 0; i < n; ++i)
networkInterfaces();
bench.end(n);
}
4 changes: 2 additions & 2 deletions benchmark/path/basename-posix.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ const bench = common.createBenchmark(main, {
});

function main({ n, pathext }) {
var ext;
let ext;
const extIdx = pathext.indexOf('|');
if (extIdx !== -1) {
ext = pathext.slice(extIdx + 1);
pathext = pathext.slice(0, extIdx);
}

bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
posix.basename(i % 3 === 0 ? `${pathext}${i}` : pathext, ext);
}
bench.end(n);
Expand Down
4 changes: 2 additions & 2 deletions benchmark/path/basename-win32.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ const bench = common.createBenchmark(main, {
});

function main({ n, pathext }) {
var ext;
let ext;
const extIdx = pathext.indexOf('|');
if (extIdx !== -1) {
ext = pathext.slice(extIdx + 1);
pathext = pathext.slice(0, extIdx);
}

bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
win32.basename(i % 3 === 0 ? `${pathext}${i}` : pathext, ext);
}
bench.end(n);
Expand Down
2 changes: 1 addition & 1 deletion benchmark/path/dirname-posix.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const bench = common.createBenchmark(main, {

function main({ n, path }) {
bench.start();
for (var i = 0; i < n; i++) {
for (let i = 0; i < n; i++) {
posix.dirname(i % 3 === 0 ? `${path}${i}` : path);
}
bench.end(n);
Expand Down
Loading