@devries-cameron20 / t3code-1 / commits / e1cb19b55b
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Use pnpm for server publish workflow (#2966)

Julius Marminge committed Jun 4, 2026 at 22:16 UTC e1cb19b55b9a29de03e2a2a7b3542f738f4843cb
1 file changed +31 -7
apps/server/scripts/cli.ts
+31 -7
@@ -195,6 +195,31 @@ const buildCmd = Command.make(
195 // publish subcommand
196 // ---------------------------------------------------------------------------
197
198 +interface PublishCommandConfig {
199 + readonly access: string;
200 + readonly tag: string;
201 + readonly provenance: boolean;
202 + readonly dryRun: boolean;
203 +}
204 +
205 +const createPnpmPublishArgs = (config: PublishCommandConfig): ReadonlyArray<string> => {
206 + const args = [
207 + "--filter",
208 + "t3",
209 + "publish",
210 + "--access",
211 + config.access,
212 + "--tag",
213 + config.tag,
214 + "--no-git-checks",
215 + ];
216 +
217 + if (config.provenance) args.push("--provenance");
218 + if (config.dryRun) args.push("--dry-run");
219 +
220 + return args;
221 +};
222 +
223 const publishCmd = Command.make(
224 "publish",
225 {
@@ -260,17 +285,16 @@ const publishCmd = Command.make(
285 const iconBackups = yield* applyPublishIconOverrides(repoRoot, serverDir);
286 return { iconBackups };
287 }),
263 - // Use: npm publish
288 + // Use: pnpm publish from the workspace root so pnpm-only workspace
289 + // config, including override selectors, is interpreted correctly.
290 () =>
291 Effect.gen(function* () {
266 - const args = ["publish", "--access", config.access, "--tag", config.tag];
267 - if (config.provenance) args.push("--provenance");
268 - if (config.dryRun) args.push("--dry-run");
292 + const args = createPnpmPublishArgs(config);
293
270 - yield* Effect.log(`[cli] Running: npm ${args.join(" ")}`);
294 + yield* Effect.log(`[cli] Running: pnpm ${args.join(" ")}`);
295 yield* runCommand(
272 - ChildProcess.make("npm", [...args], {
273 - cwd: serverDir,
296 + ChildProcess.make("pnpm", [...args], {
297 + cwd: repoRoot,
298 stdout: config.verbose ? "inherit" : "ignore",
299 stderr: "inherit",
300 // Windows needs shell mode to resolve .cmd shims.