Skip to content

Set up api-extractor for @rdk-moss/core to enforce the public API surface #14

Description

@QiaolongLi1201

The core kernel surface is now tagged @public (commit 68953fe), but nothing enforces it: a future PR can still add or change an export without review.

Goal: add api-extractor to @rdk-moss/core so the public surface is captured in a reviewable report (etc/core.api.md) and CI fails when the surface changes unexpectedly.

Steps:

  1. Add @microsoft/api-extractor as a dev dependency.
  2. Add packages/dmoss/api-extractor.json (extends the recommended config; point mainEntryPointFilePath at the built dist/index.d.ts).
  3. Commit the generated etc/core.api.md report.
  4. Wire api-extractor run into the package build / verify so a drifted surface fails CI.

Done when: running the check on an unchanged surface passes, and changing/removing a @public export makes it fail. This is the enforcement half of the API-stability work; the remaining packages (#12, and teaching) can follow the same pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions