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 b22a189 as of 2018-04-04
This commit was automatically generated. For any problems, please contact jackhorton

Reviewed-By: Kyle Farnung <[email protected]>
  • Loading branch information
chakrabot committed Apr 4, 2018
2 parents c3f4ab4 + b22a189 commit 46bf174
Show file tree
Hide file tree
Showing 76 changed files with 1,179 additions and 1,306 deletions.
28 changes: 16 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,36 +236,40 @@ v8:
tools/make-v8.sh
$(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)

.PHONY: jstest
jstest: build-addons build-addons-napi ## Runs addon tests and JS tests
$(PYTHON) tools/test.py --mode=release --flaky-tests=$(FLAKY_TESTS) -J \
$(CI_JS_SUITES) \
$(CI_NATIVE_SUITES)

.PHONY: test
# This does not run tests of third-party libraries inside deps.
test: all ## Runs default tests, linters, and builds docs.
# Build the addons before running the tests so the test results
# can be displayed together
$(MAKE) -s build-addons
$(MAKE) -s build-addons-napi
$(MAKE) -s doc-only
$(MAKE) -s lint
$(MAKE) -s test-doc
$(MAKE) -s cctest
$(PYTHON) tools/test.py --mode=release --flaky-tests=$(FLAKY_TESTS) -J \
$(CI_JS_SUITES) \
$(CI_NATIVE_SUITES) \
$(CI_DOC)
$(MAKE) -s jstest

.PHONY: test-only
test-only: all ## For a quick test, does not run linter or build docs.
# Build the addons before running the tests so the test results
# can be displayed together
$(MAKE) build-addons
$(MAKE) build-addons-napi
$(MAKE) cctest
$(PYTHON) tools/test.py --mode=release -J \
$(CI_JS_SUITES) \
$(CI_NATIVE_SUITES)
$(MAKE) jstest

# Used by `make coverage-test`
test-cov: all
# Build the addons before running the tests so the test results
# can be displayed together
$(MAKE) build-addons
$(MAKE) build-addons-napi
# $(MAKE) cctest
$(PYTHON) tools/test.py --mode=release -J \
$(CI_JS_SUITES) \
$(CI_NATIVE_SUITES)
$(MAKE) jstest
$(MAKE) lint

test-parallel: all
Expand Down
2 changes: 1 addition & 1 deletion deps/openssl/doc/UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Since perl is not a build requirement in node, they all should be
generated in advance and statically stored in the repository. We
provide two sets of asm files, one is asm_latest(avx2 and addx
supported) in `deps/openssl/asm` and the other asm_obsolete(without
avx1/2 and addx) in `deps/openssl/asm_obsolute`, which depends on
avx1/2 and addx) in `deps/openssl/asm_obsolete`, which depends on
supported features in assemblers. Each directory has a `Makefile`
to generate asm files with perl scripts in openssl sources.

Expand Down
6 changes: 3 additions & 3 deletions doc/STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
* Use a capital letter after the "Note:" label.
* Preferably, make the note a new paragraph for better visual distinction.
* Function arguments or object properties should use the following format:
* <code>* \`name\` {type|type2} Optional description. \*\*Default:\*\* \`defaultValue\`</code>
* E.g. <code>* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`</code>
* The `type` should refer to a Node.js type or a [JavaScript type][]
* <code>* \`name\` {type|type2} Optional description. \*\*Default:\*\* \`defaultValue\`.</code>
* E.g. <code>* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`.</code>
* The `type` should refer to a Node.js type or a [JavaScript type][].
* Function returns should use the following format:
* <code>* Returns: {type|type2} Optional description.</code>
* E.g. <code>* Returns: {AsyncHook} A reference to `asyncHook`.</code>
Expand Down
2 changes: 1 addition & 1 deletion doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Addon module name is `addon`.
Once the source code has been written, it must be compiled into the binary
`addon.node` file. To do so, create a file called `binding.gyp` in the
top-level of the project describing the build configuration of the module
using a JSON-like format. This file is used by [node-gyp][] -- a tool written
using a JSON-like format. This file is used by [node-gyp][] a tool written
specifically to compile Node.js Addons.

```json
Expand Down
68 changes: 66 additions & 2 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Assert

<!--introduced_in=v0.10.0-->
<!--introduced_in=v0.1.21-->

> Stability: 2 - Stable
Expand All @@ -13,6 +13,70 @@ A `strict` and a `legacy` mode exist, while it is recommended to only use
For more information about the used equality comparisons see
[MDN's guide on equality comparisons and sameness][mdn-equality-guide].

## Class: assert.AssertionError

A subclass of `Error` that indicates the failure of an assertion. All errors
thrown by the `assert` module will be instances of the `AssertionError` class.

### new assert.AssertionError(options)
<!-- YAML
added: v0.1.21
-->
* `options` {Object}
* `message` {string} If provided, the error message is going to be set to this
value.
* `actual` {any} The `actual` property on the error instance is going to
contain this value. Internally used for the `actual` error input in case
e.g., [`assert.strictEqual()`] is used.
* `expected` {any} The `expected` property on the error instance is going to
contain this value. Internally used for the `expected` error input in case
e.g., [`assert.strictEqual()`] is used.
* `operator` {string} The `operator` property on the error instance is going
to contain this value. Internally used to indicate what operation was used
for comparison (or what assertion function triggered the error).
* `stackStartFn` {Function} If provided, the generated stack trace is going to
remove all frames up to the provided function.

A subclass of `Error` that indicates the failure of an assertion.

All instances contain the built-in `Error` properties (`message` and `name`)
and:

* `actual` {any} Set to the actual value in case e.g.,
[`assert.strictEqual()`] is used.
* `expected` {any} Set to the expected value in case e.g.,
[`assert.strictEqual()`] is used.
* `generatedMessage` {boolean} Indicates if the message was auto-generated
(`true`) or not.
* `code` {string} This is always set to the string `ERR_ASSERTION` to indicate
that the error is actually an assertion error.
* `operator` {string} Set to the passed in operator value.

```js
const assert = require('assert');

// Generate an AssertionError to compare the error message later:
const { message } = new assert.AssertionError({
actual: 1,
expected: 2,
operator: 'strictEqual'
});

// Verify error output:
try {
assert.strictEqual(1, 2);
} catch (err) {
assert(err instanceof assert.AssertionError);
assert.strictEqual(err.message, message);
assert.strictEqual(err.name, 'AssertionError [ERR_ASSERTION]');
assert.strictEqual(err.actual, 1);
assert.strictEqual(err.expected, 2);
assert.strictEqual(err.code, 'ERR_ASSERTION');
assert.strictEqual(err.operator, 'strictEqual');
assert.strictEqual(err.generatedMessage, true);
}
```

## Strict mode
<!-- YAML
added: v9.9.0
Expand Down Expand Up @@ -503,7 +567,7 @@ changes:
* `actual` {any}
* `expected` {any}
* `message` {any}
* `operator` {string} **Default:** '!='
* `operator` {string} **Default:** `'!='`
* `stackStartFunction` {Function} **Default:** `assert.fail`

> Stability: 0 - Deprecated: Use `assert.fail([message])` or other assert
Expand Down
5 changes: 2 additions & 3 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,11 @@ asyncResource.emitAfter();
* `type` {string} The type of async event.
* `options` {Object}
* `triggerAsyncId` {number} The ID of the execution context that created this
async event. **Default:** `executionAsyncId()`
async event. **Default:** `executionAsyncId()`.
* `requireManualDestroy` {boolean} Disables automatic `emitDestroy` when the
object is garbage collected. This usually does not need to be set (even if
`emitDestroy` is called manually), unless the resource's asyncId is retrieved
and the sensitive API's `emitDestroy` is called with it.
**Default:** `false`
and the sensitive API's `emitDestroy` is called with it. **Default:** `false`.

Example usage:

Expand Down
Loading

0 comments on commit 46bf174

Please sign in to comment.