Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Merge nodejs/master
Browse files Browse the repository at this point in the history
Merge 98eab4a as of 2017-10-27.
This is an automatically created merge. For any problems please
contact @kunalspathak.
  • Loading branch information
chakrabot committed Nov 2, 2017
2 parents 4fc16fc + 98eab4a commit 50d2174
Show file tree
Hide file tree
Showing 60 changed files with 2,155 additions and 740 deletions.
5 changes: 2 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
lib/internal/v8_prof_polyfill.js
lib/punycode.js
test/addons/??_*/
test/addons/??_*
test/fixtures
test/tmp*/
tools/eslint
tools/icu
node_modules
benchmark/tmp/
benchmark/tmp
doc/**/*.js
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ deps/npm/node_modules/.bin/

# test artifacts
tools/faketime
tools/remark-cli
tools/remark-preset-lint-node
icu_config.gypi
*.tap

Expand Down
64 changes: 3 additions & 61 deletions .remarkrc
Original file line number Diff line number Diff line change
@@ -1,63 +1,5 @@
{
"plugins": {
"remark-lint/": {
"blockquote-indentation": 2,
"checkbox-character-style": { "checked": "x", "unchecked": " " },
"checkbox-content-indent": true,
"code-block-style": "fenced",
"definition-case": false,
"definition-spacing": true,
"emphasis-marker": false,
"fenced-code-flag": true,
"fenced-code-marker": "`",
"file-extension": "md",
"final-definition": true,
"final-newline": true,
"first-heading-level": 1,
"hard-break-spaces": true,
"heading-increment": false,
"heading-style": "atx",
"link-title-style": false,
"list-item-bullet-indent": false,
"list-item-content-indent": false,
"list-item-indent": false,
"list-item-spacing": false,
"maximum-heading-length": false,
"maximum-line-length": false,
"no-auto-link-without-protocol": true,
"no-blockquote-without-caret": true,
"no-consecutive-blank-lines": false,
"no-duplicate-definitions": true,
"no-duplicate-headings": false,
"no-emphasis-as-heading": false,
"no-file-name-articles": true,
"no-file-name-consecutive-dashes": true,
"no-file-name-irregular-characters": false,
"no-file-name-mixed-case": false,
"no-file-name-outer-dashes": true,
"no-heading-content-indent": true,
"no-heading-indent": true,
"no-heading-punctuation": false,
"no-html": false,
"no-inline-padding": true,
"no-literal-urls": false,
"no-missing-blank-lines": false,
"no-multiple-toplevel-headings": true,
"no-shell-dollars": true,
"no-shortcut-reference-image": true,
"no-shortcut-reference-link": false,
"no-table-indentation": true,
"no-tabs": true,
"no-undefined-references": false,
"no-unused-definitions": true,
"ordered-list-marker-style": false,
"ordered-list-marker-value": false,
"rule-style": true,
"strong-marker": "*",
"table-cell-padding": "padded",
"table-pipe-alignment": false,
"table-pipes": true,
"unordered-list-marker-style": false
}
}
"plugins": [
"./tools/remark-preset-lint-node/"
]
}
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.8.0">8.8.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.8.1">8.8.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.8.0">8.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.7.0">8.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.6.0">8.6.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V8.md#8.5.0">8.5.0</a><br/>
Expand Down
29 changes: 26 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,15 @@ uninstall:

clean:
$(RM) -r out/Makefile $(NODE_EXE) $(NODE_G_EXE) out/$(BUILDTYPE)/$(NODE_EXE) \
out/$(BUILDTYPE)/node.exp
out/$(BUILDTYPE)/node.exp
@if [ -d out ]; then find out/ -name '*.o' -o -name '*.a' -o -name '*.d' | xargs $(RM) -r; fi
$(RM) -r node_modules
@if [ -d deps/icu ]; then echo deleting deps/icu; $(RM) -r deps/icu; fi
$(RM) test.tap
# Next one is legacy remove this at some point
$(RM) -r test/tmp*
$(RM) -r test/.tmp*
$(MAKE) test-addons-clean

distclean:
$(RM) -r out
Expand Down Expand Up @@ -804,7 +808,7 @@ $(TARBALL): release-only $(NODE_EXE) doc
$(RM) -r $(TARNAME)/deps/openssl/openssl/{doc,demos,test}
$(RM) -r $(TARNAME)/deps/zlib/contrib # too big, unused
$(RM) -r $(TARNAME)/.{editorconfig,git*,mailmap}
$(RM) -r $(TARNAME)/tools/{eslint,eslint-rules,osx-pkg.pmdoc,pkgsrc}
$(RM) -r $(TARNAME)/tools/{eslint,eslint-rules,osx-pkg.pmdoc,pkgsrc,remark-cli,remark-preset-lint-node}
$(RM) -r $(TARNAME)/tools/{osx-*,license-builder.sh,cpplint.py}
$(RM) -r $(TARNAME)/test*.tap
find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs $(RM)
Expand Down Expand Up @@ -945,6 +949,21 @@ bench: bench-net bench-http bench-fs bench-tls

bench-ci: bench

lint-md-clean:
$(RM) -r tools/remark-cli/node_modules
$(RM) -r tools/remark-preset-lint-node/node_modules

lint-md-build:
if [ ! -d tools/remark-cli/node_modules ]; then \
cd tools/remark-cli && ../../$(NODE) ../../$(NPM) install; fi
if [ ! -d tools/remark-preset-lint-node/node_modules ]; then \
cd tools/remark-preset-lint-node && ../../$(NODE) ../../$(NPM) install; fi

lint-md: lint-md-build
@echo "Running Markdown linter..."
$(NODE) tools/remark-cli/cli.js -q -f \
./*.md doc src lib benchmark tools/doc/ tools/icu/

LINT_JS_TARGETS = benchmark doc lib test tools

lint-js:
Expand Down Expand Up @@ -1002,9 +1021,10 @@ lint:
@EXIT_STATUS=0 ; \
$(MAKE) lint-js || EXIT_STATUS=$$? ; \
$(MAKE) lint-cpp || EXIT_STATUS=$$? ; \
$(MAKE) lint-md || EXIT_STATUS=$$? ; \
exit $$EXIT_STATUS
CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
lint-ci: lint-js-ci lint-cpp
lint-ci: lint-js-ci lint-cpp lint-md
@if ! ( grep -IEqrs "$(CONFLICT_RE)" benchmark deps doc lib src test tools ) \
&& ! ( find . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \
exit 0 ; \
Expand Down Expand Up @@ -1067,6 +1087,9 @@ endif
lint-js \
lint-js-ci \
list-gtests \
lint-md \
lint-md-build \
lint-md-clean \
pkg \
release-only \
run-ci \
Expand Down
7 changes: 5 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,9 @@ def configure_engine(o):
o['variables']['chakracore_use_lto'] = "false"
o['variables']['chakracore_lto_build_flags'] = [ ]

def get_bin_override():
def make_bin_override():
if sys.platform == 'win32':
raise Exception('make_bin_override should not be called on win32.')
# If the system python is not the python we are running (which should be
# python 2), then create a directory with a symlink called `python` to our
# sys.executable. This directory will be prefixed to the PATH, so that
Expand Down Expand Up @@ -1511,7 +1513,8 @@ if options.prefix:

config = '\n'.join(map('='.join, config.iteritems())) + '\n'

bin_override = get_bin_override()
# On Windows there's no reason to search for a different python binary.
bin_override = None if sys.platform == 'win32' else make_bin_override()
if bin_override:
config = 'export PATH:=' + bin_override + ':$(PATH)\n' + config

Expand Down
2 changes: 1 addition & 1 deletion doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ changes:
* `expected` {any}
* `message` {any}

Similar to `assert.deepEqual()` with the following exceptions:
Identical to [`assert.deepEqual()`][] with the following exceptions:

1. Primitive values besides `NaN` are compared using the [Strict Equality
Comparison][] ( `===` ). Set and Map values, Map keys and `NaN` are compared
Expand Down
118 changes: 118 additions & 0 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,59 @@ Used when the native call from `process.cpuUsage` cannot be processed properly.
Used when an invalid value for the `format` argument has been passed to the
`crypto.ECDH()` class `getPublicKey()` method.

<a id="ERR_CRYPTO_ENGINE_UNKNOWN"></a>
### ERR_CRYPTO_ENGINE_UNKNOWN

Used when an invalid crypto engine identifier is passed to
[`require('crypto').setEngine()`][].

<a id="ERR_CRYPTO_FIPS_FORCED"></a>
### ERR_CRYPTO_FIPS_FORCED

Used when trying to enable or disable FIPS mode in the crypto module and
the [`--force-fips`][] command-line argument is used.

<a id="ERR_CRYPTO_FIPS_UNAVAILABLE"></a>
### ERR_CRYPTO_FIPS_UNAVAILABLE

Used when trying to enable or disable FIPS mode when FIPS is not available.

<a id="ERR_CRYPTO_HASH_DIGEST_NO_UTF16"></a>
### ERR_CRYPTO_HASH_DIGEST_NO_UTF16

Used when the UTF-16 encoding is used with [`hash.digest()`][]. While the
`hash.digest()` method does allow an `encoding` argument to be passed in,
causing the method to return a string rather than a `Buffer`, the UTF-16
encoding (e.g. `ucs` or `utf16le`) is not supported.

<a id="ERR_CRYPTO_HASH_FINALIZED"></a>
### ERR_CRYPTO_HASH_FINALIZED

Used when [`hash.digest()`][] is called multiple times. The `hash.digest()`
method must be called no more than one time per instance of a `Hash` object.

<a id="ERR_CRYPTO_HASH_UPDATE_FAILED"></a>
### ERR_CRYPTO_HASH_UPDATE_FAILED

Used when [`hash.update()`][] fails for any reason. This should rarely, if
ever, happen.

<a id="ERR_CRYPTO_INVALID_DIGEST"></a>
### ERR_CRYPTO_INVALID_DIGEST

Used when an invalid [crypto digest algorithm][] is specified.

<a id="ERR_CRYPTO_SIGN_KEY_REQUIRED"></a>
### ERR_CRYPTO_SIGN_KEY_REQUIRED

Used when a signing `key` is not provided to the [`sign.sign()`][] method.

<a id="ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH"></a>
### ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH

Used when calling [`crypto.timingSafeEqual()`][] with `Buffer`, `TypedArray`,
or `DataView` arguments of different lengths.

<a id="ERR_DNS_SET_SERVERS_FAILED"></a>
### ERR_DNS_SET_SERVERS_FAILED

Expand Down Expand Up @@ -1125,6 +1173,20 @@ for strict compliance with the API specification (which in some cases may accept
`func(undefined)` and `func()` are treated identically, and the
[`ERR_INVALID_ARG_TYPE`][] error code may be used instead.

<a id="ERR_MISSING_MODULE"></a>
### ERR_MISSING_MODULE

> Stability: 1 - Experimental
Used when an [ES6 module][] cannot be resolved.

<a id="ERR_MODULE_RESOLUTION_LEGACY"></a>
### ERR_MODULE_RESOLUTION_LEGACY

> Stability: 1 - Experimental
Used when a failure occurs resolving imports in an [ES6 module][].

<a id="ERR_MULTIPLE_CALLBACK"></a>
### ERR_MULTIPLE_CALLBACK

Expand Down Expand Up @@ -1169,16 +1231,42 @@ For example: `Buffer.write(string, encoding, offset[, length])`
Used generically to identify that an operation caused an out of memory
condition.

<a id="ERR_OUT_OF_RANGE"></a>
### ERR_OUT_OF_RANGE

Used generically when an input argument value values outside an acceptable
range.

<a id="ERR_PARSE_HISTORY_DATA"></a>
### ERR_PARSE_HISTORY_DATA

Used by the `REPL` module when it cannot parse data from the REPL history file.

<a id="ERR_REQUIRE_ESM"></a>
### ERR_REQUIRE_ESM

> Stability: 1 - Experimental
Used when an attempt is made to `require()` an [ES6 module][].

<a id="ERR_SERVER_ALREADY_LISTEN"></a>
### ERR_SERVER_ALREADY_LISTEN

Used when the [`server.listen()`][] method is called while a `net.Server` is
already listening. This applies to all instances of `net.Server`, including
HTTP, HTTPS, and HTTP/2 Server instances.

<a id="ERR_SOCKET_ALREADY_BOUND"></a>
### ERR_SOCKET_ALREADY_BOUND

Used when an attempt is made to bind a socket that has already been bound.

<a id="ERR_SOCKET_BAD_BUFFER_SIZE"></a>
### ERR_SOCKET_BAD_BUFFER_SIZE

Used when an invalid (negative) size is passed for either the `recvBufferSize`
or `sendBufferSize` options in [`dgram.createSocket()`][].

<a id="ERR_SOCKET_BAD_PORT"></a>
### ERR_SOCKET_BAD_PORT

Expand All @@ -1191,6 +1279,12 @@ value.
Used when an API function expecting a socket type (`udp4` or `udp6`) receives an
invalid value.

<a id="ERR_SOCKET_BUFFER_SIZE"></a>
### ERR_SOCKET_BUFFER_SIZE

Used when using [`dgram.createSocket()`][] and the size of the receive or send
`Buffer` cannot be determined.

<a id="ERR_SOCKET_CANNOT_SEND"></a>
### ERR_SOCKET_CANNOT_SEND

Expand Down Expand Up @@ -1297,6 +1391,21 @@ is emitted by an `EventEmitter` but an `'error'` handler is not registered).

Used when an invalid or unknown encoding option is passed to an API.

<a id="ERR_UNKNOWN_FILE_EXTENSION"></a>
### ERR_UNKNOWN_FILE_EXTENSION

> Stability: 1 - Experimental
Used when attempting to load a module with an unknown or unsupported file
extension.

<a id="ERR_UNKNOWN_MODULE_FORMAT"></a>
### ERR_UNKNOWN_MODULE_FORMAT

> Stability: 1 - Experimental
Used when attempting to load a module with an unknown or unsupported format.

<a id="ERR_UNKNOWN_SIGNAL"></a>
### ERR_UNKNOWN_SIGNAL

Expand Down Expand Up @@ -1342,7 +1451,13 @@ Used when a given value is out of the accepted range.
Used when an attempt is made to use a `zlib` object after it has already been
closed.

[`--force-fips`]: cli.html#cli_force_fips
[`crypto.timingSafeEqual()`]: crypto.html#crypto_crypto_timingsafeequal_a_b
[`dgram.createSocket()`]: dgram.html#dgram_dgram_createsocket_options_callback
[`ERR_INVALID_ARG_TYPE`]: #ERR_INVALID_ARG_TYPE
[`hash.digest()`]: crypto.html#crypto_hash_digest_encoding
[`hash.update()`]: crypto.html#crypto_hash_update_data_inputencoding
[`sign.sign()`]: crypto.html#crypto_sign_sign_privatekey_outputformat
[`subprocess.kill()`]: child_process.html#child_process_subprocess_kill_signal
[`subprocess.send()`]: child_process.html#child_process_subprocess_send_message_sendhandle_options_callback
[`fs.readFileSync`]: fs.html#fs_fs_readfilesync_path_options
Expand All @@ -1357,6 +1472,9 @@ closed.
[`new URLSearchParams(iterable)`]: url.html#url_constructor_new_urlsearchparams_iterable
[`process.on('uncaughtException')`]: process.html#process_event_uncaughtexception
[`process.send()`]: process.html#process_process_send_message_sendhandle_options_callback
[`require('crypto').setEngine()`]: crypto.html#crypto_crypto_setengine_engine_flags
[`server.listen()`]: net.html#net_server_listen
[ES6 module]: esm.html
[Node.js Error Codes]: #nodejs-error-codes
[V8's stack trace API]: https://github.com/v8/v8/wiki/Stack-Trace-API
[WHATWG URL API]: url.html#url_the_whatwg_url_api
Expand Down
Loading

0 comments on commit 50d2174

Please sign in to comment.