mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(coding-agent): assert source-only experimental package exports
This commit is contained in:
parent
1a46b923d7
commit
6f11c31d11
1 changed files with 8 additions and 2 deletions
|
|
@ -6,7 +6,8 @@ interface CodingAgentPackageJson {
|
|||
main: string;
|
||||
exports: {
|
||||
".": { import: string; types: string };
|
||||
"./client": { import: string; types: string };
|
||||
"./client": { source: string };
|
||||
"./experimental/plugin": { source: string };
|
||||
"./rpc-entry": { import: string };
|
||||
};
|
||||
}
|
||||
|
|
@ -20,7 +21,12 @@ describe("package distribution entrypoints", () => {
|
|||
expect(packageJson.bin.pi).toBe("dist/bundle/cli.js");
|
||||
expect(packageJson.main).toBe("./dist/index.js");
|
||||
expect(packageJson.exports["."].import).toBe("./dist/index.js");
|
||||
expect(packageJson.exports["./client"].import).toBe("./dist/client/index.js");
|
||||
expect(packageJson.exports["./rpc-entry"].import).toBe("./dist/bundle/rpc-entry.js");
|
||||
});
|
||||
|
||||
// Regression for #9132: internal experimental entrypoints must not be published runtime exports.
|
||||
test("keeps experimental exports source-only", () => {
|
||||
expect(packageJson.exports["./client"]).toEqual({ source: "./src/client/index.ts" });
|
||||
expect(packageJson.exports["./experimental/plugin"]).toEqual({ source: "./src/experimental/plugin.ts" });
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue