Skip to content

[api-extractor] Incompatible release tags across package boundaries yield invalid roll-ups #4425

@Josmithr

Description

@Josmithr

Summary

Consider the following example where a mono-repo contains 2 packages: Foo and Bar, structured as follows:

Package Foo

/**
 * @alpha
 */
export interface IFoo {...}

Package Bar (depends on Foo)

import { IFoo } from "Foo";

/**
 * @public
 */
export interface IBar extends IFoo {...}

API-Extractor will generate an invalid public d.ts rollup for package Bar that looks like the following:

/* Excluded from this release type: IFoo*/
/**
 * @public
 */
export declare interface IBar extends IFoo {}

This isn't valid. At a minimum I would expect the following in the generated d.ts file:

import { IFoo } from "Foo";

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/api-extractor version? 7.38.3
Operating system? Linux
API Extractor scenario? rollups (.d.ts)
Would you consider contributing a PR? No
TypeScript compiler version? 5.1.6
Node.js version (node -v)? 18.17.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as intendedrepro confirmedThe issue comments included repro instructions, and the maintainers reproduced the problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions