build: remove private QA package compat shims

This commit is contained in:
Peter Steinberger
2026-04-27 00:25:54 +01:00
parent 09a635a28b
commit eccb79db99
19 changed files with 123 additions and 194 deletions

View File

@@ -30,6 +30,16 @@ function readEntrypoints() {
return new Set(entrypoints.filter((entry) => entry !== "index"));
}
function readPrivateLocalOnlySubpaths() {
const subpaths = JSON.parse(
readFileSync(
path.join(repoRoot, "scripts/lib/plugin-sdk-private-local-only-subpaths.json"),
"utf8",
),
);
return new Set(subpaths.filter((entry) => typeof entry === "string" && !entry.includes("/")));
}
function parsePluginSdkSubpath(specifier) {
if (!specifier.startsWith("openclaw/plugin-sdk/")) {
return null;
@@ -51,6 +61,7 @@ function compareEntries(left, right) {
async function collectViolations() {
const entrypoints = readEntrypoints();
const exports = readPackageExports();
const privateLocalOnlySubpaths = readPrivateLocalOnlySubpaths();
const files = (await collectTypeScriptFilesFromRoots(scanRoots, { includeTests: true })).toSorted(
(left, right) =>
normalizeRepoPath(repoRoot, left).localeCompare(normalizeRepoPath(repoRoot, right)),
@@ -72,6 +83,9 @@ async function collectViolations() {
if (!subpath) {
return;
}
if (privateLocalOnlySubpaths.has(subpath)) {
return;
}
const missingFrom = [];
if (!entrypoints.has(subpath)) {