Skip to content
Draft
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
9 changes: 0 additions & 9 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2068,14 +2068,6 @@ added: v21.2.0

Disable exposition of [Navigator API][] on the global scope.

### `--no-experimental-repl-await`

<!-- YAML
added: v16.6.0
-->

Use this flag to disable top-level await in REPL.

### `--no-experimental-require-module`

<!-- YAML
Expand Down Expand Up @@ -3850,7 +3842,6 @@ one is included in the list below.
* `--no-async-context-frame`
* `--no-deprecation`
* `--no-experimental-global-navigator`
* `--no-experimental-repl-await`
* `--no-experimental-sqlite`
* `--no-experimental-strip-types`
* `--no-experimental-websocket`
Expand Down
13 changes: 0 additions & 13 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -760,12 +760,6 @@ An operation outside the bounds of a `Buffer` was attempted.
An attempt has been made to create a `Buffer` larger than the maximum allowed
size.

<a id="ERR_CANNOT_WATCH_SIGINT"></a>

### `ERR_CANNOT_WATCH_SIGINT`

Node.js was unable to watch for the `SIGINT` signal.

<a id="ERR_CHILD_CLOSED_BEFORE_REPLY"></a>

### `ERR_CHILD_CLOSED_BEFORE_REPLY`
Expand Down Expand Up @@ -2136,13 +2130,6 @@ An invalid `options.protocol` was passed to `http.request()`.
Both `breakEvalOnSigint` and `eval` options were set in the [`REPL`][] config,
which is not supported.

<a id="ERR_INVALID_REPL_INPUT"></a>

### `ERR_INVALID_REPL_INPUT`

The input may not be used in the [`REPL`][]. The conditions under which this
error is used are described in the [`REPL`][] documentation.

<a id="ERR_INVALID_RETURN_PROPERTY"></a>

### `ERR_INVALID_RETURN_PROPERTY`
Expand Down
45 changes: 8 additions & 37 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,39 +170,6 @@ global or scoped variable, the input `fs` will be evaluated on-demand as
> fs.createReadStream('./some/file');
```

#### Global uncaught exceptions

<!-- YAML
changes:
- version: v12.3.0
pr-url: https://github.com/nodejs/node/pull/27151
description: The `'uncaughtException'` event is from now on triggered if the
repl is used as standalone program.
-->

The REPL uses the [`domain`][] module to catch all uncaught exceptions for that
REPL session.

This use of the [`domain`][] module in the REPL has these side effects:

* Uncaught exceptions only emit the [`'uncaughtException'`][] event in the
standalone REPL. Adding a listener for this event in a REPL within
another Node.js program results in [`ERR_INVALID_REPL_INPUT`][].

```js
const r = repl.start();

r.write('process.on("uncaughtException", () => console.log("Foobar"));\n');
// Output stream includes:
// TypeError [ERR_INVALID_REPL_INPUT]: Listeners for `uncaughtException`
// cannot be used in the REPL

r.close();
```

* Trying to use [`process.setUncaughtExceptionCaptureCallback()`][] throws
an [`ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE`][] error.

#### Assignment of the `_` (underscore) variable

<!-- YAML
Expand Down Expand Up @@ -242,6 +209,14 @@ Uncaught Error: foo

#### `await` keyword

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/64034
description: The `--experimental-repl-await` flag was removed. Top-level
`await` is always enabled and can no longer be disabled.
-->

Support for the `await` keyword is enabled at the top level.

```console
Expand Down Expand Up @@ -274,8 +249,6 @@ undefined
Uncaught SyntaxError: Identifier 'm' has already been declared
```

[`--no-experimental-repl-await`][] shall disable top-level await in REPL.

### Reverse-i-search

<!-- YAML
Expand Down Expand Up @@ -1174,9 +1147,7 @@ Original code from <https://gist.github.com/TooTallNate/2053342>.
[TTY keybindings]: readline.md#tty-keybindings
[ZSH]: https://en.wikipedia.org/wiki/Z_shell
[`'uncaughtException'`]: process.md#event-uncaughtexception
[`--no-experimental-repl-await`]: cli.md#--no-experimental-repl-await
[`ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE`]: errors.md#err_domain_cannot_set_uncaught_exception_capture
[`ERR_INVALID_REPL_INPUT`]: errors.md#err_invalid_repl_input
[`curl()`]: https://curl.haxx.se/docs/manpage.html
[`domain`]: domain.md
[`module.builtinModules`]: module.md#modulebuiltinmodules
Expand Down
4 changes: 0 additions & 4 deletions doc/node-config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,6 @@
"type": "boolean",
"description": "Print pending top-level await. If --require-module is true, evaluate asynchronous graphs loaded by `require()` but do not run the microtasks, in order to to find and print top-level await in the graph"
},
"experimental-repl-await": {
"type": "boolean",
"description": "experimental await keyword support in REPL"
},
"experimental-require-module": {
"type": "boolean",
"description": "Legacy alias for --require-module"
Expand Down
2 changes: 0 additions & 2 deletions lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,6 @@ E('ERR_BUFFER_OUT_OF_BOUNDS',
E('ERR_BUFFER_TOO_LARGE',
'Cannot create a Buffer larger than %s bytes',
RangeError);
E('ERR_CANNOT_WATCH_SIGINT', 'Cannot watch for SIGINT signals', Error);
E('ERR_CHILD_CLOSED_BEFORE_REPLY',
'Child closed before reply received', Error);
E('ERR_CHILD_PROCESS_IPC_REQUIRED',
Expand Down Expand Up @@ -1540,7 +1539,6 @@ E('ERR_INVALID_PROTOCOL',
TypeError);
E('ERR_INVALID_REPL_EVAL_CONFIG',
'Cannot specify both "breakEvalOnSigint" and "eval" for REPL', TypeError);
E('ERR_INVALID_REPL_INPUT', '%s', TypeError);
E('ERR_INVALID_RETURN_PROPERTY', (input, name, prop, value) => {
return `Expected a valid ${input} to be returned for the "${prop}" from the` +
` "${name}" hook but got ${determineSpecificType(value)}.`;
Expand Down
Loading
Loading