scripts/check-export-surface.mjs fails when a public name that the last release had is gone from
this tree and the CHANGELOG's upgrade list does not name it. In 1.3.0, estates that upgraded by
following the CHANGELOG hit removed names (formatTs, the render*Fn query primitives,
docsFile) that the list never mentioned, or said were still exported.
node scripts/check-export-surface.mjs --port ts # TypeScript, listed from source
node scripts/check-export-surface.mjs --port python # needs uv
node scripts/check-export-surface.mjs --port csharp --build # builds the library assemblies first
node scripts/check-export-surface.mjs --port jvm # reads server/java/*/target/classes
node scripts/test-check-export-surface.mjs # the matching rules' own testsWhere it runs: the gates lane of scripts/ci-local.sh (TypeScript and the tests), the
python and csharp lanes after conformance, the java lane after java-reactor, and
scripts/prerelease.mjs before a candidate publishes anything, for each port it publishes.
| Port | Listed by | What counts as public |
|---|---|---|
ts |
list-ts.mjs |
Object.keys of every exports entry of every package in the publish set (scripts/publish-set.mjs) |
python |
list_python.py |
every module with no _-prefixed segment; its __all__, or else its public names (a plain module: only names it defines; a package: re-exports too) |
jvm |
list-jvm.mjs (javap) |
public classes of every reactor module, and their public and protected members, by name |
csharp |
csharp/ (System.Reflection.Metadata) |
public types of every packable library, and their public and protected members, by name |
Protected members count on the JVM and in C# because an adopter's own generator subclasses ours. A signature change is not seen: a member is gone only when no overload of its name is left.
baseline/<port>.json is the last release's surface, recorded from what the registries
published. The upgrade text is every ### Upgrading… subsection above that release's own
## [<release>] heading in CHANGELOG.md, plus the Upgrading: paragraph of each fragment in
changelog.d/.
A removal passes only when the upgrade text names it inside an inline code span. A fenced code block shows replacement code and names nothing.
- a removed package entry, module, class or type, in full or by a trailing part of two segments or
more (
apidocs.builder); a JVM or C# type also by its simple name. An entry inside another removed entry is covered by the outer one; - a removed name in an entry that is still there, by the name itself, in an upgrade bullet that
also names its entry: the package entry or module as above, or for a JVM or C# member its type's
simple name. A name alone (
of,root,entityFile) repeats across entries and means nothing.
There is no exception list: a removed public name is in the upgrade list, or the check fails.
Once a release is on every registry, record its surface as the new baseline and commit it:
node scripts/export-surface/record-published.mjs 1.3.0 # every port, from the registries
node scripts/export-surface/record-published.mjs 1.3.0 --port ts # one portIt needs npm, uv, curl, the JDK and dotnet, downloads into $DEV_SCRATCH (or the system temp
directory) and deletes it afterwards. The Maven version is the npm major + 7. A package that was
not published at that version is left out of the baseline and says so. This is the only way a
baseline is recorded: it is what the registries published, never this tree.