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

Commit

Permalink
meta: merge node/master into node-chakracore/master
Browse files Browse the repository at this point in the history
Merge 470bd39 as of 2018-01-11
This commit was automatically generated. For any problems, please contact jackhorton

Reviewed-By: Taylor Woll <tawoll@ntdev.microsoft.com>
  • Loading branch information
chakrabot committed Jan 21, 2018
2 parents 8374411 + 470bd39 commit be82dfb
Show file tree
Hide file tree
Showing 4,163 changed files with 116,438 additions and 20,563 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ end_of_line = ignore
trim_trailing_whitespace = ignore
charset = ignore

[{test/fixtures,deps,tools/eslint,tools/gyp,tools/icu,tools/msvs}/**]
[{test/fixtures,deps,tools/node_modules,tools/gyp,tools/icu,tools/msvs}/**]
insert_final_newline = false
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test/addons/??_*
test/es-module/test-esm-dynamic-import.js
test/fixtures
test/message/esm_display_syntax_error.mjs
tools/eslint
tools/node_modules
tools/icu
tools/remark-*
node_modules
Expand Down
4 changes: 3 additions & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ env:
node: true
es6: true

parser: babel-eslint

parserOptions:
ecmaVersion: 2017
sourceType: script

overrides:
- files: ["doc/api/esm.md", "*.mjs", "test/es-module/test-esm-example-loader.js"]
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.*
!deps/**/.*
!test/fixtures/**/.*
!tools/eslint/**/.*
!tools/node_modules/**/.*
!tools/doc/node_modules/**/.*
!.editorconfig
!.eslintignore
Expand Down
28 changes: 27 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ The externally maintained libraries used by Node.js are:
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

- ESLint, located at tools/eslint, is licensed as follows:
- ESLint, located at tools/node_modules/eslint, is licensed as follows:
"""
Copyright JS Foundation and other contributors, https://js.foundation

Expand All @@ -1084,6 +1084,32 @@ The externally maintained libraries used by Node.js are:
THE SOFTWARE.
"""

- babel-eslint, located at tools/node_modules/babel-eslint, is licensed as follows:
"""
Copyright (c) 2014-2016 Sebastian McKenzie <sebmck@gmail.com>

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

- gtest, located at deps/gtest, is licensed as follows:
"""
Copyright 2008, Google Inc.
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ COVTESTS ?= test-cov
GTEST_FILTER ?= "*"
GNUMAKEFLAGS += --no-print-directory
GCOV ?= gcov
PWD = $(CURDIR)

ifdef JOBS
PARALLEL_ARGS = -j $(JOBS)
Expand Down Expand Up @@ -640,7 +641,7 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets
available-node = \
if [ -x $(PWD)/$(NODE) ] && [ -e $(PWD)/$(NODE) ]; then \
$(PWD)/$(NODE) $(1); \
elif [ -x `which node` ] && [ -e `which node` ]; then \
elif [ -x `which node` ] && [ -e `which node` ] && [ `which node` ]; then \
`which node` $(1); \
else \
echo "No available node, cannot run \"node $(1)\""; \
Expand Down Expand Up @@ -913,7 +914,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,remark-cli,remark-preset-lint-node}
$(RM) -r $(TARNAME)/tools/{eslint-rules,node_modules,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 @@ -1115,7 +1116,7 @@ lint-md:
endif

LINT_JS_TARGETS = benchmark doc lib test tools
LINT_JS_CMD = tools/eslint/bin/eslint.js --cache \
LINT_JS_CMD = tools/node_modules/eslint/bin/eslint.js --cache \
--rulesdir=tools/eslint-rules --ext=.js,.mjs,.md \
$(LINT_JS_TARGETS)

Expand Down Expand Up @@ -1206,7 +1207,7 @@ cpplint: lint-cpp

.PHONY: lint
.PHONY: lint-ci
ifneq ("","$(wildcard tools/eslint/)")
ifneq ("","$(wildcard tools/node_modules/eslint/)")
lint: ## Run JS, C++, MD and doc linters.
@EXIT_STATUS=0 ; \
$(MAKE) lint-js || EXIT_STATUS=$$? ; \
Expand Down
40 changes: 20 additions & 20 deletions doc/api/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ endian format (`readDoubleBE()` returns big endian, `readDoubleLE()` returns
little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1627,7 +1627,7 @@ endian format (`readFloatBE()` returns big endian, `readFloatLE()` returns
little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1660,7 +1660,7 @@ added: v0.5.0
Reads a signed 8-bit integer from `buf` at the specified `offset`.

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Integers read from a `Buffer` are interpreted as two's complement signed values.

Expand Down Expand Up @@ -1694,7 +1694,7 @@ the specified endian format (`readInt16BE()` returns big endian,
`readInt16LE()` returns little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Integers read from a `Buffer` are interpreted as two's complement signed values.

Expand Down Expand Up @@ -1728,7 +1728,7 @@ the specified endian format (`readInt32BE()` returns big endian,
`readInt32LE()` returns little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Integers read from a `Buffer` are interpreted as two's complement signed values.

Expand Down Expand Up @@ -1763,7 +1763,7 @@ and interprets the result as a two's complement signed value. Supports up to 48
bits of accuracy.

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1795,7 +1795,7 @@ added: v0.5.0
Reads an unsigned 8-bit integer from `buf` at the specified `offset`.

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1827,7 +1827,7 @@ specified endian format (`readUInt16BE()` returns big endian, `readUInt16LE()`
returns little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1865,7 +1865,7 @@ specified endian format (`readUInt32BE()` returns big endian,
`readUInt32LE()` returns little endian).

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -1898,7 +1898,7 @@ and interprets the result as an unsigned integer. Supports up to 48
bits of accuracy.

Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
the result should be considered undefined behavior.
the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2236,7 +2236,7 @@ endian). `value` *should* be a valid 64-bit double. Behavior is undefined when
`value` is anything other than a 64-bit double.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2271,7 +2271,7 @@ endian). `value` *should* be a valid 32-bit float. Behavior is undefined when
`value` is anything other than a 32-bit float.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2304,7 +2304,7 @@ signed 8-bit integer. Behavior is undefined when `value` is anything other than
a signed 8-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

`value` is interpreted and written as a two's complement signed integer.

Expand Down Expand Up @@ -2337,7 +2337,7 @@ endian). `value` *should* be a valid signed 16-bit integer. Behavior is undefine
when `value` is anything other than a signed 16-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

`value` is interpreted and written as a two's complement signed integer.

Expand Down Expand Up @@ -2370,7 +2370,7 @@ endian). `value` *should* be a valid signed 32-bit integer. Behavior is undefine
when `value` is anything other than a signed 32-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

`value` is interpreted and written as a two's complement signed integer.

Expand Down Expand Up @@ -2404,7 +2404,7 @@ Supports up to 48 bits of accuracy. Behavior is undefined when `value` is
anything other than a signed integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2437,7 +2437,7 @@ valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
other than an unsigned 8-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2470,7 +2470,7 @@ endian). `value` should be a valid unsigned 16-bit integer. Behavior is
undefined when `value` is anything other than an unsigned 16-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2507,7 +2507,7 @@ endian). `value` should be a valid unsigned 32-bit integer. Behavior is
undefined when `value` is anything other than an unsigned 32-bit integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down Expand Up @@ -2543,7 +2543,7 @@ Supports up to 48 bits of accuracy. Behavior is undefined when `value` is
anything other than an unsigned integer.

Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
the end of `buf`, but the result should be considered undefined behavior.
the end of `buf`, but the resulting behavior is undefined.

Examples:

Expand Down
26 changes: 26 additions & 0 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,31 @@ readable stream will release any internal resources.
Implementors should not override this method, but instead implement
[`readable._destroy`][readable-_destroy].

##### readable[@@asyncIterator]
<!-- YAML
added: REPLACEME
-->

> Stability: 1 - Experimental
Returns an [AsyncIterator][async-iterator] to fully consume the stream.

```js
async function print(readable) {
readable.setEncoding('utf8');
let data = '';
for await (const k of readable) {
data += k;
}
console.log(data);
}

print(fs.createReadStream('file')).catch(console.log);
```

If the loop terminates with a `break` or a `throw`, the stream will be destroyed.
In other terms, iterating over a stream will consume the stream fully.

### Duplex and Transform Streams

#### Class: stream.Duplex
Expand Down Expand Up @@ -2328,3 +2353,4 @@ contain multi-byte characters.
[readable-destroy]: #stream_readable_destroy_error
[writable-_destroy]: #stream_writable_destroy_err_callback
[writable-destroy]: #stream_writable_destroy_error
[async-iterator]: https://github.com/tc39/proposal-async-iteration
Loading

0 comments on commit be82dfb

Please sign in to comment.