Skip to content

Commit

Permalink
fixup! fixup! repl: don't use deprecated domain module
Browse files Browse the repository at this point in the history
  • Loading branch information
RedYetiDev committed Oct 1, 2024
1 parent 2205b0d commit 42e6441
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ global or scoped variable, the input `fs` will be evaluated on-demand as
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/55204
description: The ``process.setUncaughtExceptionCaptureCallback()`
description: The `process.setUncaughtExceptionCaptureCallback()`
function is now used instead of the `domain` module.
- version: v12.3.0
pr-url: https://github.com/nodejs/node/pull/27151
Expand Down
1 change: 0 additions & 1 deletion lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ function REPLServer(prompt,
};

function handleEvaluationError(e) {
self.emit('repl_error', e);
debug('eval error');
let errStack = '';

Expand Down
8 changes: 4 additions & 4 deletions test/fixtures/repl-tab-completion-nested-repls.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ ArrayStream.prototype.write = noop;
const repl = require('repl');

const putIn = new ArrayStream();
const testMe = repl.start('', putIn);

// Some errors are passed to the domain, but do not callback.
testMe.on('repl_error', function(err) {
throw err;
const testMe = repl.start({
prompt: '',
input: putIn,
output: process.stdout,
});

// Nesting of structures causes REPL to use a nested REPL for completion.
Expand Down
4 changes: 1 addition & 3 deletions test/parallel/test-repl-tab-complete-nested-repls.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ const result = spawnSync(process.execPath, [testFile]);
// The spawned process will fail. In Node.js 10.11.0, it will fail silently. The
// test here is to make sure that the error information bubbles up to the
// calling process.
assert.ok(result.status, 'testFile swallowed its error');
const err = result.stderr.toString();
assert.ok(err.includes('fhqwhgads'), err);
assert.ok(result.stdout.toString().includes('fhqwhgads'));

0 comments on commit 42e6441

Please sign in to comment.