Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 8 additions & 6 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Support is divided into three tiers:
### Supported platforms

The community does not build or test against end of life distributions (EoL).
Thus we do not recommend that you use Node on end of life or unsupported platforms
in production.
Thus we do not recommend that you use Node on end of life or unsupported
platforms in production.

| System | Support type | Version | Architectures | Notes |
|--------------|--------------|----------------------------------|----------------------|------------------|
Expand Down Expand Up @@ -108,9 +108,11 @@ installed, you can find them under the menu `Xcode -> Open Developer Tool ->
More Developer Tools...`. This step will install `clang`, `clang++`, and
`make`.
* After building, you may want to setup [firewall rules](tools/macosx-firewall.sh)
to avoid popups asking to accept incoming network connections when running tests:
to avoid popups asking to accept incoming network connections when running
tests:

If the path to your build directory contains a space, the build will likely fail.
If the path to your build directory contains a space, the build will likely
fail.

```console
$ sudo ./tools/macosx-firewall.sh
Expand Down Expand Up @@ -238,8 +240,8 @@ Prerequisites:
* **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).

If the path to your build directory contains a space or a non-ASCII character, the
build will likely fail.
If the path to your build directory contains a space or a non-ASCII character,
the build will likely fail.

```console
> .\vcbuild
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Node.js Changelog

<!--lint disable maximum-line-length-->

To make the changelog easier to both use and manage, it has been split into
multiple files organized according to significant major and minor Node.js
release lines.
Expand Down
33 changes: 18 additions & 15 deletions COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ or a pull request.

Courtesy should always be shown to individuals submitting issues and pull
requests to the Node.js project. Be welcoming to first-time contributors,
identified by the GitHub ![First-time contributor](./doc/first_timer_badge.png) badge.
identified by the GitHub ![First-time contributor](./doc/first_timer_badge.png)
badge.

For first-time contributors, check if the commit author is the same as the
pull request author, and ask if they have configured their git
Expand Down Expand Up @@ -154,22 +155,23 @@ The pull request should have a CI status indicator if possible.
#### Useful CI Jobs

* [`node-test-pull-request`](https://ci.nodejs.org/job/node-test-pull-request/)
is the standard CI run we do to check Pull Requests. It triggers `node-test-commit`,
which runs the `build-ci` and `test-ci` targets on all supported platforms.
is the standard CI run we do to check Pull Requests. It triggers
`node-test-commit`, which runs the `build-ci` and `test-ci` targets on all
supported platforms.

* [`node-test-linter`](https://ci.nodejs.org/job/node-test-linter/)
only runs the linter targets, which is useful for changes that only affect comments
or documentation.
only runs the linter targets, which is useful for changes that only affect
comments or documentation.

* [`node-test-pull-request-lite`](https://ci.nodejs.org/job/node-test-pull-request-lite/)
only runs the linter job, as well as the tests on LinuxONE. Should only be used for
trivial changes that do not require being tested on all platforms.
only runs the linter job, as well as the tests on LinuxONE. Should only be used
for trivial changes that do not require being tested on all platforms.

* [`citgm-smoker`](https://ci.nodejs.org/job/citgm-smoker/)
uses [`CitGM`](https://github.com/nodejs/citgm) to allow you to run `npm install && npm test`
on a large selection of common modules. This is useful to check whether a
change will cause breakage in the ecosystem. To test Node.JS ABI changes
you can run [`citgm-abi-smoker`](https://ci.nodejs.org/job/citgm-abi-smoker/).
uses [`CitGM`](https://github.com/nodejs/citgm) to allow you to run
`npm install && npm test` on a large selection of common modules. This is
useful to check whether a change will cause breakage in the ecosystem. To test
Node.JS ABI changes you can run [`citgm-abi-smoker`](https://ci.nodejs.org/job/citgm-abi-smoker/).

* [`node-stress-single-test`](https://ci.nodejs.org/job/node-stress-single-test/)
is designed to allow one to run a group of tests over and over on a specific
Expand Down Expand Up @@ -480,17 +482,18 @@ Apply external patches:
$ curl -L https://github.com/nodejs/node/pull/xxx.patch | git am --whitespace=fix
```

If the merge fails even though recent CI runs were successful, then a 3-way merge may
be required. In this case try:
If the merge fails even though recent CI runs were successful, then a 3-way
merge may be required. In this case try:

```text
$ git am --abort
$ curl -L https://github.com/nodejs/node/pull/xxx.patch | git am -3 --whitespace=fix
```
If the 3-way merge succeeds you can proceed, but make sure to check the changes
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.
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:

Expand Down
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1005,13 +1005,17 @@ lint-md-clean:
$(RM) -r tools/remark-preset-lint-node/node_modules
$(RM) tools/.*mdlintstamp

lint-md-build:
@if [ ! -d tools/remark-cli/node_modules ]; then \
echo "Markdown linter: installing remark-cli into tools/"; \
cd tools/remark-cli && ../../$(NODE) ../../$(NPM) install; fi
@if [ ! -d tools/remark-preset-lint-node/node_modules ]; then \
echo "Markdown linter: installing remark-preset-lint-node into tools/"; \
cd tools/remark-preset-lint-node && ../../$(NODE) ../../$(NPM) install; fi
tools/remark-cli/node_modules: tools/remark-cli/package.json
@echo "Markdown linter: installing remark-cli into tools/"
@cd tools/remark-cli && $(call available-node,$(run-npm-install))

tools/remark-preset-lint-node/node_modules: \
tools/remark-preset-lint-node/package.json
@echo "Markdown linter: installing remark-preset-lint-node into tools/"
@cd tools/remark-preset-lint-node && $(call available-node,$(run-npm-install))

lint-md-build: tools/remark-cli/node_modules \
tools/remark-preset-lint-node/node_modules

ifneq ("","$(wildcard tools/remark-cli/node_modules/)")
LINT_MD_TARGETS = src lib benchmark tools/doc tools/icu
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
<p align="center">
<a href="https://nodejs.org/">
<img alt="Node.js" src="https://nodejs.org/static/images/logo-light.svg" width="400"/>
<img
alt="Node.js"
src="https://nodejs.org/static/images/logo-light.svg"
width="400"
/>
</a>
</p>
<p align="center">
<a title="CII Best Practices" href="https://bestpractices.coreinfrastructure.org/projects/29"><img src="https://bestpractices.coreinfrastructure.org/projects/29/badge"></a>
<a
title="CII Best Practices"
href="https://bestpractices.coreinfrastructure.org/projects/29">
<img src="https://bestpractices.coreinfrastructure.org/projects/29/badge">
</a>
</p>

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js
Expand Down
4 changes: 2 additions & 2 deletions doc/api/_toc.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@// NB(chrisdickinson): if you move this file, be sure to update tools/doc/html.js to
@// point at the new location.
@// NB(chrisdickinson): if you move this file, be sure to update
@// tools/doc/html.js to point at the new location.
* [About these Docs](documentation.html)
* [Usage & Example](synopsis.html)

Expand Down
20 changes: 10 additions & 10 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ instance is destroyed.
* `type` {string} The type of the async resource.
* `triggerAsyncId` {number} The unique ID of the async resource in whose
execution context this async resource was created.
* `resource` {Object} Reference to the resource representing the async operation,
needs to be released during _destroy_.
* `resource` {Object} Reference to the resource representing the async
operation, needs to be released during _destroy_.

Called when a class is constructed that has the _possibility_ to emit an
asynchronous event. This _does not_ mean the instance must call
Expand Down Expand Up @@ -283,11 +283,11 @@ The `TCPSERVERWRAP` is the server which receives the connections.

The `TCPWRAP` is the new connection from the client. When a new
connection is made the `TCPWrap` instance is immediately constructed. This
happens outside of any JavaScript stack (side note: a `executionAsyncId()` of `0`
means it's being executed from C++, with no JavaScript stack above it).
happens outside of any JavaScript stack (side note: a `executionAsyncId()` of
`0` means it's being executed from C++, with no JavaScript stack above it).
With only that information, it would be impossible to link resources together in
terms of what caused them to be created, so `triggerAsyncId` is given the task of
propagating what resource is responsible for the new resource's existence.
terms of what caused them to be created, so `triggerAsyncId` is given the task
of propagating what resource is responsible for the new resource's existence.

###### `resource`

Expand Down Expand Up @@ -534,8 +534,8 @@ const server = net.createServer((conn) => {
## JavaScript Embedder API

Library developers that handle their own asynchronous resources performing tasks
like I/O, connection pooling, or managing callback queues may use the `AsyncWrap`
JavaScript API so that all the appropriate callbacks are called.
like I/O, connection pooling, or managing callback queues may use the
`AsyncWrap` JavaScript API so that all the appropriate callbacks are called.

### `class AsyncResource()`

Expand Down Expand Up @@ -647,8 +647,8 @@ never be called.

#### `asyncResource.triggerAsyncId()`

* Returns: {number} The same `triggerAsyncId` that is passed to the `AsyncResource`
constructor.
* Returns: {number} The same `triggerAsyncId` that is passed to the
`AsyncResource` constructor.

[`after` callback]: #async_hooks_after_asyncid
[`before` callback]: #async_hooks_before_asyncid
Expand Down
1 change: 1 addition & 0 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Buffer

<!--introduced_in=v0.10.0-->
<!--lint disable maximum-line-length-->

> Stability: 2 - Stable

Expand Down
1 change: 1 addition & 0 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Child Process

<!--introduced_in=v0.10.0-->
<!--lint disable maximum-line-length-->

> Stability: 2 - Stable

Expand Down
17 changes: 9 additions & 8 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ changes:

* Returns: {Worker} A reference to `worker`.

In a worker, this function will close all servers, wait for the `'close'` event on
those servers, and then disconnect the IPC channel.
In a worker, this function will close all servers, wait for the `'close'` event
on those servers, and then disconnect the IPC channel.

In the master, an internal message is sent to the worker causing it to call
`.disconnect()` on itself.
Expand All @@ -280,8 +280,8 @@ Causes `.exitedAfterDisconnect` to be set.
Note that after a server is closed, it will no longer accept new connections,
but connections may be accepted by any other listening worker. Existing
connections will be allowed to close as usual. When no more connections exist,
see [`server.close()`][], the IPC channel to the worker will close allowing it to
die gracefully.
see [`server.close()`][], the IPC channel to the worker will close allowing it
to die gracefully.

The above applies *only* to server connections, client connections are not
automatically closed by workers, and disconnect does not wait for them to close
Expand Down Expand Up @@ -499,9 +499,9 @@ Emitted after the worker IPC channel has disconnected. This can occur when a
worker exits gracefully, is killed, or is disconnected manually (such as with
worker.disconnect()).

There may be a delay between the `'disconnect'` and `'exit'` events. These events
can be used to detect if the process is stuck in a cleanup or if there are
long-living connections.
There may be a delay between the `'disconnect'` and `'exit'` events. These
events can be used to detect if the process is stuck in a cleanup or if there
are long-living connections.

```js
cluster.on('disconnect', (worker) => {
Expand Down Expand Up @@ -673,7 +673,8 @@ Calls `.disconnect()` on each worker in `cluster.workers`.
When they are disconnected all internal handles will be closed, allowing the
master process to die gracefully if no other event is waiting.

The method takes an optional callback argument which will be called when finished.
The method takes an optional callback argument which will be called when
finished.

This can only be called from the master process.

Expand Down
13 changes: 8 additions & 5 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1167,8 +1167,8 @@ become deprecated in a future Node.js release.
added: v6.0.0
-->

Property for checking and controlling whether a FIPS compliant crypto provider is
currently in use. Setting to true requires a FIPS build of Node.js.
Property for checking and controlling whether a FIPS compliant crypto provider
is currently in use. Setting to true requires a FIPS build of Node.js.

### crypto.createCipher(algorithm, password[, options])
<!-- YAML
Expand Down Expand Up @@ -1212,7 +1212,8 @@ Adversaries][] for details.
- `options` {Object} [`stream.transform` options][]

Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
initialization vector (`iv`). Optional `options` argument controls stream behavior.
initialization vector (`iv`). Optional `options` argument controls stream
behavior.

The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
recent OpenSSL releases, `openssl list-cipher-algorithms` will display the
Expand Down Expand Up @@ -1301,7 +1302,8 @@ changes:
-->
- `prime` {string | Buffer | TypedArray | DataView}
- `primeEncoding` {string}
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to `2`.
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to
`2`.
- `generatorEncoding` {string}

Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
Expand All @@ -1324,7 +1326,8 @@ otherwise a number, [`Buffer`][], `TypedArray`, or `DataView` is expected.
added: v0.5.0
-->
- `primeLength` {number}
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to `2`.
- `generator` {number | string | Buffer | TypedArray | DataView} Defaults to
`2`.

Creates a `DiffieHellman` key exchange object and generates a prime of
`primeLength` bits using an optional specific numeric `generator`.
Expand Down
7 changes: 4 additions & 3 deletions doc/api/debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

Node.js includes an out-of-process debugging utility accessible via a
[V8 Inspector][] and built-in debugging client. To use it, start Node.js
with the `inspect` argument followed by the path to the script to debug; a prompt
will be displayed indicating successful launch of the debugger:
with the `inspect` argument followed by the path to the script to debug; a
prompt will be displayed indicating successful launch of the debugger:

```txt
$ node inspect myscript.js
Expand Down Expand Up @@ -173,7 +173,8 @@ breakpoint)
### V8 Inspector Integration for Node.js

V8 Inspector integration allows attaching Chrome DevTools to Node.js
instances for debugging and profiling. It uses the [Chrome Debugging Protocol][].
instances for debugging and profiling. It uses the
[Chrome Debugging Protocol][].

V8 Inspector can be enabled by passing the `--inspect` flag when starting a
Node.js application. It is also possible to supply a custom port with that flag,
Expand Down
12 changes: 6 additions & 6 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ is strongly recommended:

* [`Buffer.alloc(size[, fill[, encoding]])`][alloc] - Create a `Buffer` with
*initialized* memory.
* [`Buffer.allocUnsafe(size)`][alloc_unsafe_size] - Create a `Buffer` with *uninitialized*
memory.
* [`Buffer.allocUnsafe(size)`][alloc_unsafe_size] - Create a `Buffer` with
*uninitialized* memory.
* [`Buffer.allocUnsafeSlow(size)`][] - Create a `Buffer` with *uninitialized*
memory.
* [`Buffer.from(array)`][] - Create a `Buffer` with a copy of `array`
* [`Buffer.from(arrayBuffer[, byteOffset[, length]])`][from_arraybuffer] - Create a `Buffer`
that wraps the given `arrayBuffer`.
* [`Buffer.from(arrayBuffer[, byteOffset[, length]])`][from_arraybuffer] -
Create a `Buffer` that wraps the given `arrayBuffer`.
* [`Buffer.from(buffer)`][] - Create a `Buffer` that copies `buffer`.
* [`Buffer.from(string[, encoding])`][from_string_encoding] - Create a `Buffer` that copies
`string`.
* [`Buffer.from(string[, encoding])`][from_string_encoding] - Create a `Buffer`
that copies `string`.

<a id="DEP0006"></a>
### DEP0006: child\_process options.customFds
Expand Down
4 changes: 2 additions & 2 deletions doc/api/dgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@ added: v8.6.0

*Note: All references to scope in this section are referring to
[IPv6 Zone Indices][], which are defined by [RFC 4007][]. In string form, an IP
with a scope index is written as `'IP%scope'` where scope is an interface name or
interface number.*
with a scope index is written as `'IP%scope'` where scope is an interface name
or interface number.*

Sets the default outgoing multicast interface of the socket to a chosen
interface or back to system interface selection. The `multicastInterface` must
Expand Down
4 changes: 2 additions & 2 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ changes:
- `verbatim` {boolean} When `true`, the callback receives IPv4 and IPv6
addresses in the order the DNS resolver returned them. When `false`,
IPv4 addresses are placed before IPv6 addresses.
**Default:** currently `false` (addresses are reordered) but this is expected
to change in the not too distant future.
**Default:** currently `false` (addresses are reordered) but this is
expected to change in the not too distant future.
New code should use `{ verbatim: true }`.
- `callback` {Function}
- `err` {Error}
Expand Down
4 changes: 2 additions & 2 deletions doc/api/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ like [`fs.open()`][], will document that. The docs link to the corresponding man
pages (short for manual pages) which describe how the syscalls work.

Some syscalls, like lchown(2), are BSD-specific. That means, for
example, that [`fs.lchown()`][] only works on macOS and other BSD-derived systems,
and is not available on Linux.
example, that [`fs.lchown()`][] only works on macOS and other BSD-derived
systems, and is not available on Linux.

Most Unix syscalls have Windows equivalents, but behavior may differ on Windows
relative to Linux and macOS. For an example of the subtle ways in which it's
Expand Down
Loading