perf(build): skip dts for runtime build profiles

This commit is contained in:
Vincent Koc
2026-05-30 23:01:50 +02:00
parent 8fe50a2136
commit ada22739be
3 changed files with 22 additions and 13 deletions

View File

@@ -54,6 +54,7 @@ Docs: https://docs.openclaw.ai
- CI/tooling: route script edits through conventional owner tests when matching `test/scripts` or `src/scripts` coverage already exists.
- CI/tooling: honor option terminators in the memory FD repro script so follow-on arguments are not reparsed.
- Release/CI/E2E: honor option terminators across release, Parallels smoke, plugin gauntlet, and extension-memory scripts.
- Performance: skip declaration bundling for runtime-only CLI startup and gateway watch build profiles.
- Performance: reuse prepared provider handles, strict tool schemas, gateway runtime metadata, session maintenance config, plugin metadata, bundled skill allowlists, package-local plugin artifacts, and single-entry store writes.
## 2026.5.28

View File

@@ -176,11 +176,17 @@ export const BUILD_ALL_PROFILE_STEP_ENV = {
},
},
gatewayWatch: {
tsdown: {
OPENCLAW_RUN_NODE_SKIP_DTS_BUILD: "1",
},
"runtime-postbuild": {
OPENCLAW_RUNTIME_POSTBUILD_STATIC_ASSETS: "0",
},
},
cliStartup: {
tsdown: {
OPENCLAW_RUN_NODE_SKIP_DTS_BUILD: "1",
},
"runtime-postbuild": {
OPENCLAW_RUNTIME_POSTBUILD_STATIC_ASSETS: "0",
},

View File

@@ -239,20 +239,22 @@ describe("resolveBuildAllSteps", () => {
]);
});
it("skips bundled tsdown declarations for CI artifacts", () => {
const tsdown = resolveBuildAllSteps("ciArtifacts").find((step) => step.label === "tsdown");
if (!tsdown) {
throw new Error("Missing ciArtifacts tsdown step");
}
it("skips bundled tsdown declarations for runtime-only profiles", () => {
for (const profile of ["ciArtifacts", "gatewayWatch", "cliStartup"]) {
const tsdown = resolveBuildAllSteps(profile).find((step) => step.label === "tsdown");
if (!tsdown) {
throw new Error(`Missing ${profile} tsdown step`);
}
expect(BUILD_ALL_PROFILE_STEP_ENV.ciArtifacts.tsdown).toEqual({
OPENCLAW_RUN_NODE_SKIP_DTS_BUILD: "1",
});
expect(
resolveBuildAllStep(tsdown, { env: { OPENCLAW_RUN_NODE_SKIP_DTS_BUILD: "0" } }).options.env,
).toMatchObject({
OPENCLAW_RUN_NODE_SKIP_DTS_BUILD: "1",
});
expect(BUILD_ALL_PROFILE_STEP_ENV[profile].tsdown).toEqual({
OPENCLAW_RUN_NODE_SKIP_DTS_BUILD: "1",
});
expect(
resolveBuildAllStep(tsdown, { env: { OPENCLAW_RUN_NODE_SKIP_DTS_BUILD: "0" } }).options.env,
).toMatchObject({
OPENCLAW_RUN_NODE_SKIP_DTS_BUILD: "1",
});
}
});
it("uses a minimal built runtime profile for gateway watch regression", () => {