Skip to content

Async output in repl is showing after the prompt #35895

Description

@vsemozhetbyt
  • Version: 14.15.0, 15.0.1
  • Platform: Windows 10 x64
  • Subsystem: repl
>thrownewError();UncaughtError>// prompt is shown
>newPromise((rs,rj)=>{rj();})Promise{<rejected> undefined }>(node:4108) UnhandledPromiseRejectionWarning: undefined(node:4108) UnhandledPromiseRejectionWarning: Unhandledpromiserejection.Thiserrororiginatedeitherbythrowinginsideofanasyncfunctionwithoutacatchblock,orbyrejectingapromisewhichwasnothandledwith.catch().Toterminatethenodeprocessonunhandledpromiserejection,usetheCLIflag`--unhandled-rejections=strict`(seehttps://nodejs.org/api/cli.html#cli_unhandled_rejections_mode).(rejectionid: 7)// no NEW prompt 
>newPromise((rs,rj)=>{rj();}).catch(console.log)Promise{<pending>}>undefined// no NEW prompt 
>newPromise((rs,rj)=>{rj();}).catch(()=>{})Promise{<pending>}>// prompt is shown
>newPromise((rs,rj)=>{rs(42);}).then(console.log)Promise{<pending>}>42// no NEW prompt here

Metadata

Metadata

Assignees

No one assigned

    Labels

    replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions