Package compatibility

Understand how SuperDoc declares and changes npm peer dependency compatibility.

SuperDoc changes compatibility ranges when an integration or its tested support changes, not on a fixed schedule. The peerDependencies and peerDependenciesMeta fields in each published package are the machine-readable requirements for that release.

@superdoc/react also carries an exact superdoc peer that release automation updates when the adapter and core are published together. Applications should upgrade those coordinated releases as a pair. This version-only synchronization can occur more often than an authored compatibility-policy change.

Why peer dependencies are different

A peer dependency is supplied by the application that installs SuperDoc. It lets SuperDoc and the application share a framework or integration runtime instead of installing unrelated copies. React, Yjs, PDF.js, and collaboration providers are examples of dependencies that can participate in this contract.

A regular dependency is selected as part of SuperDoc's package tree. Updating one can still affect bundle size, security review, or runtime behavior, but it does not normally require the application to provide a matching version.

Required and optional peers

A required peer must be available at a version accepted by the published range. Package managers can warn or fail when the application cannot provide one.

An optional peer is not needed to install the package or use unrelated features. The application must provide a compatible version when it uses the integration that depends on that peer.

Inspect the requirements for the version you install:

npm view superdoc@latest peerDependencies peerDependenciesMeta

Framework adapters and other published @superdoc/* packages declare their own peer requirements in the same fields.

How changes are released

Authored peer dependency changes receive manual review in addition to automated package checks.

ChangeRelease policy
Widen a tested rangeMinor release
Add an optional peerMinor release
Change a peer from required to optionalMinor release
Narrow a range or stop accepting a previously supported versionBreaking release
Add a required peerBreaking release
Change a peer from optional to requiredBreaking release
Remove or replace a peer contractBreaking release
Synchronize a release-managed exact peer to its coordinated core releaseCoordinated package release

Except for the coordinated version-only synchronization above, breaking peer changes require a major package release, release notes, and migration guidance. A security issue can require a faster compatibility change; when that happens, the release notes identify the affected versions and the required upgrade.

Before widening a range, validate the additional versions. Narrow a range only when SuperDoc can no longer support the removed versions safely.

On this page