Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ca6b414
module: optimize require performance
mapleeit Jun 12, 2018
21b14d2
module: fix bug when parent is null
mapleeit Jun 12, 2018
9e5c554
module: fix require.resolve case
mapleeit Jun 13, 2018
8941fb7
inspector: stop dragging platform pointer
Jun 8, 2018
2749460
doc: make Deprecation cycle explanation more brief
Trott Jun 13, 2018
772d390
deps: float ea7abee from openssl / CVE-2018-0732
rvagg Jun 12, 2018
0179e94
test: fix deprecation warning due to util.print
tniessen Jun 11, 2018
a703df9
crypto: fix behavior of createCipher in wrap mode
tniessen Jun 12, 2018
17e378b
perf_hooks: set bootstrap complete in only one place
jasnell Jun 3, 2018
b55f6a0
perf_hooks: remove less useful bootstrap marks
jasnell Jun 3, 2018
a24b691
workers,trace_events: set thread name for workers
jasnell Jun 10, 2018
dcad7c9
doc: switch the order of Writable and Readable
Jun 14, 2018
b505d2a
Revert "workers,trace_events: set thread name for workers"
jasnell Jun 15, 2018
0aa242e
doc: wrap releases.md at 80 chars
Trott Jun 15, 2018
0351f9a
doc: correct styling of _GitHub_ in onboarding doc
Trott Jun 15, 2018
0b27cb4
doc: remove linking of url text to url
Trott Jun 15, 2018
dc10ddf
doc: wrap pull-requests.md at 80 characters
Trott Jun 15, 2018
dabcd47
doc: wrap style guide at 80 characters
Trott Jun 15, 2018
ff00a76
tools: lint doc/*.md files
Trott Jun 15, 2018
859a8d1
doc: use Class Method label consistently
Trott Jun 15, 2018
f56c965
doc: fix heading of optional console method args
targos Jun 13, 2018
1da8855
doc: fix indentation in console.md
vsemozhetbyt Jun 16, 2018
1e54c24
http2: fix memory leak for uncommon headers
addaleax Jun 15, 2018
54ee8cb
src: remove unused argc var in node_stat_watcher
danbev Jun 15, 2018
1d8a231
process: implement process.hrtime.bigint()
joyeecheung Jun 11, 2018
7012950
doc: add davisjam to collaborators
davisjam Jun 11, 2018
452d73d
doc: remove obsolete wiki references from BUILDING
Trott Jun 16, 2018
b6b019f
doc: use imperative in COLLABORATOR_GUIDE
Trott Jun 15, 2018
a13eba7
tools: do not disable `quotes` rule in .eslintrc.js
Trott Jun 15, 2018
64de66d
net: emit 'close' when socket ends before connect
Jun 12, 2018
8fa640e
loader: remove unused error code in module_job
devsnek Jun 15, 2018
4970e2b
doc: eliminate _you_ from N-API doc
Trott Jun 18, 2018
8944a4f
test: move test-benchmark-path to sequential
Trott Jun 18, 2018
7ae718c
module: optimize require performance
mapleeit Jun 12, 2018
a8b24b6
module: fix bug when parent is null
mapleeit Jun 12, 2018
b5cbf39
module: fix require.resolve case
mapleeit Jun 13, 2018
4454a01
module: use internal cache instead of public one
mapleeit Jun 19, 2018
de6af7c
module: resolve conficts
mapleeit Jun 19, 2018
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: 7 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,32 +147,32 @@ module.exports = {
message: '__defineSetter__ is deprecated.',
}
],
/* eslint-disable max-len, quotes */
/* eslint-disable max-len */
// If this list is modified, please copy the change to lib/.eslintrc.yaml
'no-restricted-syntax': [
'error',
{
selector: "CallExpression[callee.object.name='assert'][callee.property.name='doesNotThrow']",
message: "Please replace `assert.doesNotThrow()` and add a comment next to the code instead."
message: 'Please replace `assert.doesNotThrow()` and add a comment next to the code instead.'
},
{
selector: `CallExpression[callee.object.name='assert'][callee.property.name='rejects'][arguments.length<2]`,
selector: "CallExpression[callee.object.name='assert'][callee.property.name='rejects'][arguments.length<2]",
message: 'assert.rejects() must be invoked with at least two arguments.',
},
{
selector: `CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])`,
selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])",
message: 'Use an object as second argument of assert.throws()',
},
{
selector: `CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.length<2]`,
selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.length<2]",
message: 'assert.throws() must be invoked with at least two arguments.',
},
{
selector: `CallExpression[callee.name='setTimeout'][arguments.length<2]`,
selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]",
message: 'setTimeout() must be invoked with at least two arguments.',
},
{
selector: `CallExpression[callee.name='setInterval'][arguments.length<2]`,
selector: "CallExpression[callee.name='setInterval'][arguments.length<2]",
message: 'setInterval() must be invoked with at least 2 arguments.',
},
{
Expand Down
5 changes: 1 addition & 4 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ $ make

### `Intl` (ECMA-402) support:

[Intl](https://github.com/nodejs/node/wiki/Intl) support is
[Intl](https://github.com/nodejs/node/blob/master/doc/api/intl.md) support is
enabled by default, with English data only.

#### Default: `small-icu` (English only) support
Expand All @@ -321,9 +321,6 @@ the full `Intl` (ECMA-402) APIs. It does not need to download
any dependencies to function. You can add full
data at runtime.

*Note:* more docs are on
[the node wiki](https://github.com/nodejs/node/wiki/Intl).

#### Build with full ICU support (all locales supported by ICU):

With the `--download=all`, this may download ICU if you don't have an
Expand Down
18 changes: 9 additions & 9 deletions COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,21 +453,21 @@ the documentation for the assigned deprecation identifier must remain in the
Node.js API documentation.

<a id="deprecation-cycle"></a>
A _Deprecation cycle_ is one full Node.js major release during which an API
has been in one of the three Deprecation levels. (Note that Documentation-Only
Deprecations may land in a Node.js minor release but must not be upgraded to
a Runtime Deprecation until the next major release.)
A _Deprecation cycle_ is a major release during which an API has been in one of
the three Deprecation levels. Documentation-Only Deprecations may land in a
minor release but must not be upgraded to a Runtime Deprecation until the next
major release.

No API can be moved to End-of-life without first having gone through a
Runtime Deprecation cycle. However, there is no requirement that deprecated
code must progress ultimately to *End-of-Life*. Documentation-only and runtime
deprecations may remain indefinitely.

A best effort will be made to communicate pending deprecations and associated
mitigations with the ecosystem as soon as possible (preferably before the pull
request adding the deprecation lands on the master branch). All deprecations
included in a Node.js release should be listed prominently in the "Notable
Changes" section of the release notes.
Communicate pending deprecations and associated mitigations with the ecosystem
as soon as possible (preferably before the pull request adding the deprecation
lands on the master branch). Use the `notable-change` label on all pull requests
that add a new deprecation or move an existing deprecation to a new deprecation
level.

### Involving the TSC

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ lint-md-build: tools/remark-cli/node_modules \
.PHONY: lint-md
ifneq ("","$(wildcard tools/remark-cli/node_modules/)")

LINT_MD_DOC_FILES = $(shell ls doc/**/*.md)
LINT_MD_DOC_FILES = $(shell ls doc/*.md doc/**/*.md)
run-lint-doc-md = tools/remark-cli/cli.js -q -f $(LINT_MD_DOC_FILES)
# Lint all changed markdown files under doc/
tools/.docmdlintstamp: $(LINT_MD_DOC_FILES)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ For more information about the governance of the Node.js project, see
**Daniel Bevenius** &lt;daniel.bevenius@gmail.com&gt;
* [DavidCai1993](https://github.com/DavidCai1993) -
**David Cai** &lt;davidcai1993@yahoo.com&gt; (he/him)
* [davisjam](https://github.com/davisjam) -
**Jamie Davis** &lt;davisjam@vt.edu&gt; (he/him)
* [devsnek](https://github.com/devsnek) -
**Gus Caplan** &lt;me@gus.host&gt; (he/him)
* [edsadr](https://github.com/edsadr) -
Expand Down
7 changes: 6 additions & 1 deletion deps/openssl/openssl/crypto/dh/dh_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,15 @@ static int generate_key(DH *dh)
int ok = 0;
int generate_new_key = 0;
unsigned l;
BN_CTX *ctx;
BN_CTX *ctx = NULL;
BN_MONT_CTX *mont = NULL;
BIGNUM *pub_key = NULL, *priv_key = NULL;

if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
DHerr(DH_F_GENERATE_KEY, DH_R_MODULUS_TOO_LARGE);
return 0;
}

ctx = BN_CTX_new();
if (ctx == NULL)
goto err;
Expand Down
8 changes: 6 additions & 2 deletions doc/STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,19 @@
* 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>
* ``` * `name` {type|type2} Optional description. **Default:** `value`. ```
<!--lint disable maximum-line-length remark-lint-->
* For example: <code>* `byteOffset` {integer} Index of first byte to expose. **Default:** `0`.</code>
<!--lint enable maximum-line-length remark-lint-->
* 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>
* Use official styling for capitalization in products and projects.
* OK: JavaScript, Google's V8
<!--lint disable prohibited-strings remark-lint-->
* NOT OK: Javascript, Google's v8
<!-- lint enable prohibited-strings remark-lint-->

See also API documentation structure overview in [doctools README][].

Expand Down
21 changes: 12 additions & 9 deletions doc/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ changes:
* `stdout` {stream.Writable}
* `stderr` {stream.Writable}
* `ignoreErrors` {boolean} Ignore errors when writing to the underlying
streams. **Default:** `true`.
streams. **Default:** `true`.
* `colorMode` {boolean|string} Set color support for this `Console` instance.
Setting to `true` enables coloring while inspecting values, setting to
`'auto'` will make color support depend on the value of the `isTTY` property
Expand Down Expand Up @@ -164,7 +164,7 @@ operates similarly to the `clear` shell command. On Windows, `console.clear()`
will clear only the output in the current terminal viewport for the Node.js
binary.

### console.count([label='default'])
### console.count([label])
<!-- YAML
added: v8.3.0
-->
Expand Down Expand Up @@ -197,7 +197,7 @@ undefined
>
```

### console.countReset([label='default'])
### console.countReset([label])
<!-- YAML
added: v8.3.0
-->
Expand Down Expand Up @@ -381,7 +381,7 @@ console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
// └─────────┴─────┘
```

### console.time(label)
### console.time([label])
<!-- YAML
added: v0.1.104
-->
Expand All @@ -392,7 +392,7 @@ are identified by a unique `label`. Use the same `label` when calling
[`console.timeEnd()`][] to stop the timer and output the elapsed time in
milliseconds to `stdout`. Timer durations are accurate to the sub-millisecond.

### console.timeEnd(label)
### console.timeEnd([label])
<!-- YAML
added: v0.1.104
changes:
Expand Down Expand Up @@ -453,7 +453,7 @@ The following methods are exposed by the V8 engine in the general API but do
not display anything unless used in conjunction with the [inspector][]
(`--inspect` flag).

### console.markTimeline(label)
### console.markTimeline([label])
<!-- YAML
added: v8.0.0
-->
Expand All @@ -476,11 +476,11 @@ the **Profile** panel of the inspector.
```js
console.profile('MyLabel');
// Some code
console.profileEnd();
console.profileEnd('MyLabel');
// Adds the profile 'MyLabel' to the Profiles panel of the inspector.
```

### console.profileEnd()
### console.profileEnd([label])
<!-- YAML
added: v8.0.0
-->
Expand All @@ -490,6 +490,9 @@ current JavaScript CPU profiling session if one has been started and prints
the report to the **Profiles** panel of the inspector. See
[`console.profile()`][] for an example.

If this method is called without a label, the most recently started profile is
stopped.

### console.timeStamp([label])
<!-- YAML
added: v8.0.0
Expand Down Expand Up @@ -523,7 +526,7 @@ This method does not display anything unless used in the inspector. The
[`console.group()`]: #console_console_group_label
[`console.log()`]: #console_console_log_data_args
[`console.profile()`]: #console_console_profile_label
[`console.profileEnd()`]: #console_console_profileend
[`console.profileEnd()`]: #console_console_profileend_label
[`console.time()`]: #console_console_time_label
[`console.timeEnd()`]: #console_console_timeend_label
[`console.timeStamp()`]: #console_console_timestamp_label
Expand Down
2 changes: 1 addition & 1 deletion doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
// OK
```

### ECDH.convertKey(key, curve[, inputEncoding[, outputEncoding[, format]]])
### Class Method: ECDH.convertKey(key, curve[, inputEncoding[, outputEncoding[, format]]])
<!-- YAML
added: v10.0.0
-->
Expand Down
7 changes: 3 additions & 4 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ napi_status napi_fatal_exception(napi_env env, napi_value err);
```

- `[in] env`: The environment that the API is invoked under.
- `[in] err`: The error you want to pass to `'uncaughtException'`.
- `[in] err`: The error that is passed to `'uncaughtException'`.

Trigger an `'uncaughtException'` in JavaScript. Useful if an async
callback throws an exception with no way to recover.
Expand Down Expand Up @@ -1019,9 +1019,8 @@ napi_value Init(napi_env env, napi_value exports) {
}
```

If you expect that your module will be loaded multiple times during the lifetime
of the Node.js process, you can use the `NAPI_MODULE_INIT` macro to initialize
your module:
If the module will be loaded multiple times during the lifetime of the Node.js
process, use the `NAPI_MODULE_INIT` macro to initialize the module:

```C
NAPI_MODULE_INIT() {
Expand Down
78 changes: 0 additions & 78 deletions doc/api/perf_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,26 +219,6 @@ The high resolution millisecond timestamp at which the Node.js process
completed bootstrapping. If bootstrapping has not yet finished, the property
has the value of -1.

### performanceNodeTiming.clusterSetupEnd
<!-- YAML
added: v8.5.0
-->

* {number}

The high resolution millisecond timestamp at which cluster processing ended. If
cluster processing has not yet ended, the property has the value of -1.

### performanceNodeTiming.clusterSetupStart
<!-- YAML
added: v8.5.0
-->

* {number}

The high resolution millisecond timestamp at which cluster processing started.
If cluster processing has not yet started, the property has the value of -1.

### performanceNodeTiming.loopExit
<!-- YAML
added: v8.5.0
Expand All @@ -261,24 +241,6 @@ The high resolution millisecond timestamp at which the Node.js event loop
started. If the event loop has not yet started (e.g., in the first tick of the
main script), the property has the value of -1.

### performanceNodeTiming.moduleLoadEnd
<!-- YAML
added: v8.5.0
-->

* {number}

The high resolution millisecond timestamp at which main module load ended.

### performanceNodeTiming.moduleLoadStart
<!-- YAML
added: v8.5.0
-->

* {number}

The high resolution millisecond timestamp at which main module load started.

### performanceNodeTiming.nodeStart
<!-- YAML
added: v8.5.0
Expand All @@ -289,46 +251,6 @@ added: v8.5.0
The high resolution millisecond timestamp at which the Node.js process was
initialized.

### performanceNodeTiming.preloadModuleLoadEnd
<!-- YAML
added: v8.5.0
-->

* {number}

The high resolution millisecond timestamp at which preload module load ended.

### performanceNodeTiming.preloadModuleLoadStart
<!-- YAML
added: v8.5.0
-->

* {number}

The high resolution millisecond timestamp at which preload module load started.

### performanceNodeTiming.thirdPartyMainEnd
<!-- YAML
added: v8.5.0
-->

* {number}

The high resolution millisecond timestamp at which third\_party\_main
processing ended. If third\_party\_main processing has not yet ended, the
property has the value of -1.

### performanceNodeTiming.thirdPartyMainStart
<!-- YAML
added: v8.5.0
-->

* {number}

The high resolution millisecond timestamp at which third\_party\_main
processing started. If third\_party\_main processing has not yet started, the
property has the value of -1.

### performanceNodeTiming.v8Start
<!-- YAML
added: v8.5.0
Expand Down
Loading