fix: include matrix runtime deps for bundled installs

This commit is contained in:
Peter Steinberger
2026-03-28 07:26:30 +00:00
parent 30bf4dd1ce
commit 30be04cd87
3 changed files with 25 additions and 0 deletions

View File

@@ -1215,6 +1215,7 @@
"linkedom": "^0.18.12",
"long": "^5.3.2",
"markdown-it": "^14.1.1",
"matrix-js-sdk": "41.2.0",
"node-edge-tts": "^1.2.10",
"osc-progress": "^0.3.0",
"pdfjs-dist": "^5.5.207",
@@ -1263,6 +1264,7 @@
}
},
"optionalDependencies": {
"@matrix-org/matrix-sdk-crypto-nodejs": "^0.4.0",
"openshell": "0.1.0"
},
"engines": {

6
pnpm-lock.yaml generated
View File

@@ -126,6 +126,9 @@ importers:
markdown-it:
specifier: ^14.1.1
version: 14.1.1
matrix-js-sdk:
specifier: 41.2.0
version: 41.2.0
node-edge-tts:
specifier: ^1.2.10
version: 1.2.10
@@ -236,6 +239,9 @@ importers:
specifier: ^4.1.2
version: 4.1.2(@opentelemetry/api@1.9.1)(@types/node@25.5.0)(@vitest/browser-playwright@4.1.2)(jsdom@29.0.1(@noble/hashes@2.0.1))(vite@8.0.3(@types/node@25.5.0)(esbuild@0.27.3)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3))
optionalDependencies:
'@matrix-org/matrix-sdk-crypto-nodejs':
specifier: ^0.4.0
version: 0.4.0
openshell:
specifier: 0.1.0
version: 0.1.0

View File

@@ -46,6 +46,16 @@ function collectPluginSdkSubpathReferences() {
return references;
}
function readRootPackageJson(): {
dependencies?: Record<string, string>;
optionalDependencies?: Record<string, string>;
} {
return JSON.parse(readFileSync(resolve(REPO_ROOT, "package.json"), "utf8")) as {
dependencies?: Record<string, string>;
optionalDependencies?: Record<string, string>;
};
}
describe("plugin-sdk package contract guardrails", () => {
it("keeps package.json exports aligned with built plugin-sdk entrypoints", () => {
expect(collectPluginSdkPackageExports()).toEqual([...pluginSdkEntrypoints].toSorted());
@@ -74,4 +84,11 @@ describe("plugin-sdk package contract guardrails", () => {
expect(failures).toEqual([]);
});
it("mirrors matrix runtime deps needed by the bundled host graph", () => {
const { dependencies = {}, optionalDependencies = {} } = readRootPackageJson();
expect(dependencies["matrix-js-sdk"]).toBe("41.2.0");
expect(optionalDependencies["@matrix-org/matrix-sdk-crypto-nodejs"]).toBe("^0.4.0");
});
});