MCPcopy
hub / github.com/CopilotKit/CopilotKit / addVersionFixtures

Function addVersionFixtures

scripts/__tests__/sync-plugin-skills.test.ts:140–176  ·  view source on GitHub ↗
(
    repoRoot: string,
    runtimePkgVersion: string,
    initialPluginVersion: string,
  )

Source from the content-addressed store, hash-verified

138 // Version sync — the plugin version tracks packages/runtime/package.json.
139
140 async function addVersionFixtures(
141 repoRoot: string,
142 runtimePkgVersion: string,
143 initialPluginVersion: string,
144 ) {
145 await writeFile(
146 join(repoRoot, "packages/runtime/package.json"),
147 JSON.stringify(
148 { name: "@copilotkit/runtime", version: runtimePkgVersion },
149 null,
150 2,
151 ) + "\n",
152 );
153 await mkdir(join(repoRoot, ".claude-plugin"), { recursive: true });
154 await writeFile(
155 join(repoRoot, ".claude-plugin/plugin.json"),
156 JSON.stringify(
157 { name: "copilotkit", version: initialPluginVersion },
158 null,
159 2,
160 ) + "\n",
161 );
162 await writeFile(
163 join(repoRoot, ".claude-plugin/marketplace.json"),
164 JSON.stringify(
165 {
166 name: "copilotkit",
167 metadata: { version: initialPluginVersion },
168 plugins: [
169 { name: "copilotkit", source: "./", version: initialPluginVersion },
170 ],
171 },
172 null,
173 2,
174 ) + "\n",
175 );
176 }
177
178 it("write mode copies runtime package.json version into plugin.json and marketplace.json", async () => {
179 await makeRepo(repo);

Callers 1

Calls 1

writeFileFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…