unstale

npm / react-docgen

react-docgen

What changed in react-docgen 6 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.

34 breaking11 new APIs and options1 performance7 behavior and defaults4 tooling18 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

react-docgen 83 changes

Breaking changes 1

  • Support is dropped for Node.js 16, 17, 18, 19 and 21; supported versions are Node.js 20.9.0 or newer 20.x versions, and Node.js 22.0.0 or newer.

    8.0.0release notes

Fixes and other changes 2

  • Prevents stack overflows caused by circular interface inheritance and type aliases.

    8.0.4release notes

  • Fixes a crash when classes with private fields are used.

    8.0.0release notes

react-docgen 77 changes

Breaking changes 3

  • Now returns an array of paths to types instead of one, so callers should check whether the array has any elements.

    7.0.0release notes

  • Node.js 14 is no longer supported; the minimum supported version is 16.14.0.

    7.0.0release notes

  • Resolves to an import specifier rather than an ImportDeclaration, so callers can identify the specific specifier and should check the parent path for the declaration.

    7.0.0release notes

Tooling 1

Fixes and other changes 3

  • TypeScript component props are now detected correctly when using PropsWithoutRef, PropsWithRef, or PropsWithChildren, though these types do not add props to the documentation.

    7.0.0release notes

  • Fixes detection when a class component's superclass is imported via a named import.

    7.0.0release notes

  • Fixes detection of React.Children when using ESM imports.

    7.0.0release notes

react-docgen 665 changes

Breaking changes 30

  • The library is no longer used, affecting integrations that check and work with the AST.

    6.0.0upgrade guide

  • The project now uses only the Babel toolchain internally, and parser ASTs no longer conform to estree.

    6.0.0upgrade guiderelease notes

  • The named export handlers was renamed to builtinHandlers.

    6.0.0upgrade guiderelease notes

  • The named export importers was renamed to builtinImporters.

    6.0.0upgrade guiderelease notes

  • The named export resolver was renamed to builtinResolvers.

    6.0.0upgrade guide

  • Renames the main export resolver.

    6.0.0release notes

  • The CLI no longer accepts input via stdin.

    6.0.0upgrade guide

  • The handler formerly named flowTypeHandler was renamed because it handles both Flow and TypeScript.

    6.0.0upgrade guiderelease notes

  • Use this annotation to mark a component in place of the removed @extends React.Component annotation.

    6.0.0upgrade guide

  • The DocumentationBuilder method toObject was renamed to build.

    6.0.0upgrade guiderelease notes

  • The exclude option was removed.

    6.0.0upgrade guide

  • react-docgen migrates to ES modules, which can affect how developers import and use the package.

    6.0.0release notes

  • Support for this component annotation on React class components was removed.

    6.0.0upgrade guiderelease notes

  • This class replaces the findAllComponentDefinitions resolver.

    6.0.0upgrade guiderelease notes

  • The utility formerly named resolveComponentDefinition was renamed.

    6.0.0upgrade guiderelease notes

  • The resolver was removed; use FindExportedDefinitionsResolver with the limit option instead.

    6.0.0upgrade guiderelease notes

  • This class replaces the findAllExportedComponentDefinitions resolver.

    6.0.0upgrade guiderelease notes

  • The handler API has no major changes, but integrations must use the Babel toolchain because ast-types is no longer used.

    6.0.0upgrade guide

  • The importer argument was removed from many utilities; importing is now handled through FileState, accessible as path.hub on NodePath objects.

    6.0.0upgrade guide

  • The named export is removed.

    6.0.0release notes

  • The utility was removed; the notes recommend Babel helpers or explicit checks such as path.isMemberExpression().

    6.0.0upgrade guiderelease notes

  • Only Node.js 14.18.0 or newer is supported.

    6.0.0upgrade guiderelease notes

  • The method now accepts only source text and a config object, replacing its previous multi-argument signature.

    6.0.0upgrade guiderelease notes

  • The return value is always an array, including when only one component is found.

    6.0.0upgrade guiderelease notes

  • The handler was renamed, changing the capitalization of the b in block.

    6.0.0upgrade guiderelease notes

  • The package is now pure ESM, so consumers must use it as an ES module.

    6.0.0upgrade guide

  • The CLI moved into its own package and was completely rewritten with different arguments and options.

    6.0.0upgrade guiderelease notes

  • Returned values are now ordered as defined in source code; type handling was removed because it was unused.

    6.0.0release notes

  • Resolvers now receive only a FileState argument, which provides parsing, traversal, options access, and file imports.

    6.0.0upgrade guide

  • The extension option was removed in favor of globs.

    6.0.0upgrade guide

New APIs and options 11

  • babelTypes is now exported and includes all types from @babel/types.

    6.0.0release notes

  • Adds a resolver that chains multiple resolvers using configurable chaining logic.

    6.0.0release notes

  • Adds an annotation for identifying components; its resolver is enabled by default.

    6.0.0release notes

  • Adds displayName and description to the Documentation type.

    6.0.0release notes

  • The DocumentationBuilder type is now exported for integrations.

    6.0.0release notes

  • Exports codes for detecting errors, including MISSING_DEFINITION and MULTIPLE_DEFINITIONS.

    6.0.0release notes

  • A fail-on-warning option was added to the CLI.

    6.0.0upgrade guide

  • A handler option was added to the CLI.

    6.0.0upgrade guide

  • An importer option was added to the CLI.

    6.0.0upgrade guide

  • NodePath is now exported for building TypeScript integrations.

    6.0.0release notes

  • Resolvers can now be classes as well as functions.

    6.0.0release notes

Performance 1

  • Caches file resolution in addition to parsing; clear the caches on every file change when files can change at runtime.

    6.0.0release notes

Behavior and default changes 7

  • The path argument now accepts a glob.

    6.0.0upgrade guide

  • The handler now supports all possible kinds of functions.

    6.0.0release notes

  • Flow parsing now supports qualified type names.

    6.0.0release notes

  • The ignore option now accepts a glob.

    6.0.0upgrade guide

  • Functions returning React.Children.map are now treated as components.

    6.0.0release notes

  • Resolution now supports destructuring.

    6.0.0release notes

  • JSDoc comments are now parsed for TypeScript structs.

    6.0.0release notes

Tooling 3

  • TypeScript parsing now supports files with the .cts extension.

    6.0.0release notes

  • TypeScript parsing now supports files with the .mts extension.

    6.0.0release notes

  • The package is written in TypeScript and now includes type definitions in its published package.

    6.0.0upgrade guide

Fixes and other changes 13

  • Parsing now supports class and function declarations without an identifier.

    6.0.0release notes

  • Correctly resolves values in an Object.values() call.

    6.0.0release notes

  • Handles cyclic references in PropTypes shape() and exact() methods.

    6.0.0release notes

  • Fixes handling of unresolved imported values.

    6.0.0release notes

  • Fixes using react-docgen in browsers.

    6.0.0release notes

  • Handles React.forwardRef calls that do not include a function.

    6.0.0release notes

  • Fixes TypeScript types when strict null checks are disabled.

    6.0.0release notes

  • Adds support for TSAsExpressions when stringifying expressions.

    6.0.0release notes

  • TypeScript now handles typeof import('...') correctly.

    6.0.0release notes

  • TypeScript now handles typeof MyType.property correctly.

    6.0.0release notes

  • TypeScript parsing now supports all possible literal types.

    6.0.0release notes

  • Fixes a crash when using TypeScript mapped types.

    6.0.0release notes

  • Handling of useImperativeHandle is now correct.

    6.0.0release notes