Skip to content

doc: document REPL DEP0185 throws and uncaught-exception behavior - #64993

Open
edsadr wants to merge 1 commit into
nodejs:mainfrom
edsadr:repl-doc-improvement
Open

doc: document REPL DEP0185 throws and uncaught-exception behavior#64993
edsadr wants to merge 1 commit into
nodejs:mainfrom
edsadr:repl-doc-improvement

Conversation

@edsadr

@edsadr edsadr commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Two doc-only improvements to doc/api/repl.md, both filling gaps left by recent semver-major REPL changes:

  1. repl.REPLServer is an ES class. Calling it without new is End-of-Life (DEP0185) and throws a native V8 TypeError at runtime. The "Class: REPLServer" section showed examples that use new but did not tell users that the new-less form throws. A short prose note is added after the construction examples pointing to the DEP0185 entry in doc/api/deprecations.md.

  2. PR repl: use inspector over vmΒ #64034 ("repl: use inspector over vm") removed the old "Global uncaught exceptions" subsection because the domain-based restrictions it documented no longer exist. The removal was correct, but the current uncaught-exception model was only partially documented via the 'unhandled' description on the handleError option. A top-level Error handling section is added. The prose is anchored to the existing Uncaught Error: REPL await example in the preceding await keyword section and documents the current behavior: uncaught exceptions are printed by default, uncaughtException listeners work freely in standalone and nested REPLs, and the handleError option can forward exceptions to 'uncaughtException' by returning 'unhandled'.

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. repl Issues and PRs related to the REPL subsystem. labels Aug 3, 2026
edsadr added a commit to edsadr/node that referenced this pull request Aug 3, 2026
Two doc-only improvements to `doc/api/repl.md`, both filling gaps left
by recent semver-major REPL changes:

1. `repl.REPLServer` is an ES class; calling it without `new` is
   End-of-Life (DEP0185) and throws a native V8 `TypeError`. The
   "Class: REPLServer" section now notes this and links to the DEP0185
   entry in `doc/api/deprecations.md`. No `Stability: 0` banner is
   added because the class itself is not deprecated β€” only the
   `new`-less invocation is β€” matching the parallel DEP0184/DEP0195
   "classes without `new`" convention.

2. PR nodejs#64034 ("repl: use inspector over vm") removed the old
   "Global uncaught exceptions" subsection because the `domain`-based
   restrictions it documented no longer exist. A new top-level
   `### Error handling` section documents the current model (mirroring
   the `### Error handling` convention in async_hooks/http2/quic),
   anchored to the existing `Uncaught Error: REPL await` example.

Refs: nodejs#59495
Refs: nodejs#54869
Refs: nodejs#54842
Refs: nodejs#64034
PR-URL: nodejs#64993
Signed-off-by: Adrian Estrada <edsadr@gmail.com>
@edsadr
edsadr force-pushed the repl-doc-improvement branch from 2af31ef to 7f0999c Compare August 3, 2026 23:44
Two doc-only improvements to `doc/api/repl.md`, both filling gaps left
by recent semver-major REPL changes:

1. `repl.REPLServer` is an ES class; calling it without `new` is
   End-of-Life (DEP0185) and throws a native V8 `TypeError`. The
   "Class: REPLServer" section now notes this and links to the DEP0185
   entry in `doc/api/deprecations.md`. No `Stability: 0` banner is
   added because the class itself is not deprecated β€” only the
   `new`-less invocation is β€” matching the parallel DEP0184/DEP0195
   "classes without `new`" convention.

2. PR nodejs#64034 ("repl: use inspector over vm") removed the old
   "Global uncaught exceptions" subsection because the `domain`-based
   restrictions it documented no longer exist. A new top-level
   `### Error handling` section documents the current model (mirroring
   the `### Error handling` convention in async_hooks/http2/quic),
   anchored to the existing `Uncaught Error: REPL await` example.

Refs: nodejs#59495
Refs: nodejs#54869
Refs: nodejs#54842
Refs: nodejs#64034
PR-URL: nodejs#64993
Signed-off-by: Adrian Estrada <edsadr@gmail.com>
@edsadr
edsadr force-pushed the repl-doc-improvement branch from 7f0999c to e3a7241 Compare August 3, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. repl Issues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants