@@ -195,6 +195,31 @@ const buildCmd = Command.make(
195195// publish subcommand
196196// ---------------------------------------------------------------------------
197197
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+
198223const publishCmd = Command . make (
199224 "publish" ,
200225 {
@@ -260,17 +285,16 @@ const publishCmd = Command.make(
260285 const iconBackups = yield * applyPublishIconOverrides ( repoRoot , serverDir ) ;
261286 return { iconBackups } ;
262287 } ) ,
263- // Use: npm publish
288+ // Use: pnpm publish from the workspace root so pnpm-only workspace
289+ // config, including override selectors, is interpreted correctly.
264290 ( ) =>
265291 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 ) ;
269293
270- yield * Effect . log ( `[cli] Running: npm ${ args . join ( " " ) } ` ) ;
294+ yield * Effect . log ( `[cli] Running: pnpm ${ args . join ( " " ) } ` ) ;
271295 yield * runCommand (
272- ChildProcess . make ( "npm " , [ ...args ] , {
273- cwd : serverDir ,
296+ ChildProcess . make ( "pnpm " , [ ...args ] , {
297+ cwd : repoRoot ,
274298 stdout : config . verbose ? "inherit" : "ignore" ,
275299 stderr : "inherit" ,
276300 // Windows needs shell mode to resolve .cmd shims.
0 commit comments