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: remove unused modules #4684

Closed
wants to merge 15 commits into from
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
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ rules:
# list: https://github.com/eslint/eslint/tree/master/docs/rules#variables
## disallow use of undefined variables (globals)
no-undef: 2
## disallow declaration of variables that are not used in the code
no-unused-vars: [2, {"args": "none"}]

# Custom rules in tools/eslint-rules
require-buffer: 2
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ Binaries, installers, and source tarballs are available at
<https://nodejs.org/download/release/>, listed under their version strings.
The [latest](https://nodejs.org/download/release/latest/) directory is an
alias for the latest Stable release. The latest LTS release from an LTS
line is available in the form: latest-lts-_codename_. For example:
<https://nodejs.org/download/release/latest-lts-argon>
line is available in the form: latest-_codename_. For example:
<https://nodejs.org/download/release/latest-argon>

**Nightly** builds are available at
<https://nodejs.org/download/nightly/>, listed under their version
Expand Down Expand Up @@ -444,6 +444,8 @@ Releases of Node.js and io.js will be signed with one of the following GPG keys:
* **Jeremiah Senkpiel** &lt;[email protected]&gt; `FD3A5288F042B6850C66B31F09FE44734EB7990E`
* **James M Snell** &lt;[email protected]&gt; `71DCFD284A79C3B38668286BC97EC7A07EDE3FC1`
* **Rod Vagg** &lt;[email protected]&gt; `DD8F2338BAE7501E3DD5AC78C273792F7D83545D`
* **Myles Borins** &lt;[email protected]&gt; `C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8`
* **Evan Lucas** &lt;[email protected]&gt; `B9AE9905FFD7803F25714661B63B535A4C206CA9`

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

Expand All @@ -454,6 +456,8 @@ gpg --keyserver pool.sks-keyservers.net --recv-keys 0034A06D9D9B0064CE8ADF6BF174
gpg --keyserver pool.sks-keyservers.net --recv-keys FD3A5288F042B6850C66B31F09FE44734EB7990E
gpg --keyserver pool.sks-keyservers.net --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D
gpg --keyserver pool.sks-keyservers.net --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
gpg --keyserver pool.sks-keyservers.net --recv-keys B9AE9905FFD7803F25714661B63B535A4C206CA9
```

See the section above on [Verifying Binaries](#verifying-binaries) for
Expand Down
4 changes: 3 additions & 1 deletion doc/api/http.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,8 @@ Listening on a file descriptor is not supported on Windows.
This function is asynchronous. The last parameter `callback` will be added as
a listener for the `'listening'` event. See also [`net.Server.listen()`][].

Returns `server`.

### server.listen(path[, callback])

Start a UNIX socket server listening for connections on the given `path`.
Expand Down Expand Up @@ -781,7 +783,7 @@ should be used to determine the number of bytes in a given encoding.
And Node.js does not check whether Content-Length and the length of the body
which has been transmitted are equal or not.

## http.IncomingMessage
## Class: http.IncomingMessage

An `IncomingMessage` object is created by [`http.Server`][] or
[`http.ClientRequest`][] and passed as the first argument to the `'request'`
Expand Down
18 changes: 17 additions & 1 deletion doc/api/readline.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,22 @@ line interface:
process.exit(0);
});

## Example: Read File Stream Line-by-Line

A common case for `readline`'s `input` option is to pass a filesystem readable
stream to it. This is how one could craft line-by-line parsing of a file:

const readline = require('readline');
const fs = require('fs');

const rl = readline.createInterface({
input: fs.createReadStream('sample.txt')
});

rl.on('line', function (line) {
console.log('Line from file:', line);
});

## readline.clearLine(stream, dir)

Clears current line of given TTY stream in a specified direction.
Expand All @@ -247,7 +263,7 @@ Clears the screen from the current position of the cursor down.

## readline.createInterface(options)

Creates a readline `Interface` instance. Accepts an `options Object that takes
Creates a readline `Interface` instance. Accepts an `options` Object that takes
the following values:

- `input` - the readable stream to listen to (Required).
Expand Down
2 changes: 1 addition & 1 deletion doc/api/stream.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ To implement any sort of stream, the pattern is the same:
[`util.inherits`][] method is particularly helpful for this.)
2. Call the appropriate parent class constructor in your constructor,
to be sure that the internal mechanisms are set up properly.
2. Implement one or more specific methods, as detailed below.
3. Implement one or more specific methods, as detailed below.

The class to extend and the method(s) to implement depend on the sort
of stream class you are writing:
Expand Down
68 changes: 38 additions & 30 deletions doc/api_assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,28 @@ body {
font-size: 62.5%;
margin: 0;
padding: 0;
color: #3a3a3a;
background: #fcfefa;
color: #333;
background: #fff;
}

#content {
font-size: 1.8em;
}

a {
color: #FE5210;
a,
a:link,
a:active {
color: #80bd01;
text-decoration: none;
}

a:visited {
color: #FE7110;
border-radius: 2px;
padding: .1em .2em;
margin: -.1em 0;
}

a:hover,
a:focus {
color: #FFA158;
color: #fff;
background-color: #80bd01;
}

strong {
Expand Down Expand Up @@ -170,7 +172,6 @@ dd + dt.pre {
}

h1, h2, h3, h4, h5, h6 {
color: #301004;
text-rendering: optimizeLegibility;
font-weight: 700;
position: relative;
Expand Down Expand Up @@ -280,7 +281,7 @@ code.pre {
}

#intro a {
color: #333;
color: #ddd;
font-size: 1.25em;
font-weight: bold;
}
Expand All @@ -296,7 +297,6 @@ hr {
}

#toc h2 {
color: #C73E09;
margin-top: 0;
font-size: 1.0em;
line-height: 0;
Expand Down Expand Up @@ -339,12 +339,14 @@ p code,
li code {
font-size: 0.9em;
color: #040404;
background-color: #f2f5f0;
padding: 0.2em 0.4em;
background-color: #f0f0f0;
padding: .1em .2em;
border-radius: 2px;
}

a code {
color: inherit;
background: inherit;
}

span.type {
Expand All @@ -360,12 +362,13 @@ span.type {

#column1.interior {
width: 702px;
border-left: 234px solid #f2f5f0;
margin-left: 234px;
padding-left: 2.0em;
}

#column2.interior {
width: 234px;
background: #333;
position: fixed;
height: 100%;
overflow-y: scroll;
Expand All @@ -377,18 +380,18 @@ span.type {
bottom: 0;
left: 0;
width: 234px;
height: 5em;
background: linear-gradient(rgba(242,245,240, 0), rgba(242,245,240, 1));
height: 4em;
background: linear-gradient(rgba(242,245,240, 0), rgba(51, 51, 51, 1));
pointer-events: none;
}

#column2 ul {
list-style: none;
margin-left: 0em;
margin-top: 1.25em;
background: #f2f5f0;
background: #333;
margin-bottom: 0;
padding-bottom: 4em;
padding-bottom: 3em;
}

#column2 ul li {
Expand All @@ -403,19 +406,24 @@ span.type {
}

#column2 ul li a {
color: #7a7a7a;
color: #ccc;
border-radius: 0;
}

#column2 ul li a.active {
color: #533;
border-bottom: 1px solid #533;
#column2 ul li a.active,
#column2 ul li a.active:hover,
#column2 ul li a.active:focus {
color: #80bd01;
border-radius: 0;
border-bottom: 1px solid #80bd01;
background: none;
}

#footer {
padding: 0;
min-height: 24px;
background: #333;
color: white;
#intro a:hover,
#column2 ul li a:hover,
#column2 ul li a:focus {
color: #fff;
background: none;
}

span > .mark,
Expand Down Expand Up @@ -455,7 +463,7 @@ td > *:last-child {
font-size: 2.1em;
}
#column1.interior {
border-left: 0;
margin-left: 0;
padding-left: 0.5em;
padding-right: 0.5em;
width: auto;
Expand All @@ -473,7 +481,7 @@ td > *:last-child {
font-size: 2.4em;
}
#column1.interior {
border-left: 0;
margin-left: 0;
padding-left: 0.5em;
padding-right: 0.5em;
width: auto;
Expand Down
Loading