Skip to content

typedoc is writing 1 byte to STDERR when successful, causing other tools to raise flags #1566

@kaiyoma

Description

@kaiyoma

Expected Behavior

typedoc should not be writing anything to STDERR if it was successful.

Actual Behavior

typedoc writes a single byte (a newline, I think) to STDERR on success. This is problematic because other tools (like Rush.js, for instance, which I'm using) interpret STDERR content to mean that something failed. When I run typedoc through Rush, I get messages like this:

==[ SUCCESS WITH WARNINGS: 1 project ]=========================================

--[ WARNING: babel-plugin-generate-i18n-id ]----------------[ 10.85 seconds ]--

Projects succeeded with warnings.

Steps to reproduce the bug

You can see here pretty clearly that there's one byte of content in STDERR, even though the build was successful:

$ yarn typedoc > typedoc.stdout 2> typedoc.stderr

$ ls -l typedoc.std*
-rw-r--r-- 1 Kyle Getz 197121   1 Apr  9 11:09 typedoc.stderr
-rw-r--r-- 1 Kyle Getz 197121 234 Apr  9 11:09 typedoc.stdout

$ cat typedoc.stdout
yarn run v1.22.5
$ C:\Work\web-components\packages\babel-plugin-generate-i18n-id\node_modules\.bin\typedoc
Info: Documentation generated at C:\Work\web-components\packages\babel-plugin-generate-i18n-id\docs
Done in 10.96s.

(I tested this same sequence of commands with a non-typedoc tool and the STDERR file was 0 bytes, as expected.)

Environment

  • Typedoc version: 0.20.32
  • TypeScript version: 4.2.3
  • Node.js version: 14.15.0
  • OS: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions