File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,15 +50,15 @@ const config = {
5050 dependsOn : [ '^publish' ] ,
5151 type : 'worker' ,
5252 options : {
53- worker : 'scripts/src/worker/publish.js ' ,
53+ worker : 'scripts/src/worker/publish.mts ' ,
5454 } ,
5555 cache : false ,
5656 } ,
5757 'publish-dry-run' : {
5858 dependsOn : [ '^publish-dry-run' ] ,
5959 type : 'worker' ,
6060 options : {
61- worker : 'scripts/src/worker/publish.js ' ,
61+ worker : 'scripts/src/worker/publish.mts ' ,
6262 dryRun : true ,
6363 } ,
6464 cache : false ,
Original file line number Diff line number Diff line change 1- // @ts -check
1+ import type { WorkerRunnerFunction } from 'lage' ;
22
33import { $ , fs } from 'zx' ;
44import { join } from 'node:path' ;
55
6- /**
7- * @param {{ target: { cwd: string; label: string }, options: { dryRun?: boolean } } } data
8- */
9- export async function run ( { target, options } ) {
6+ export const run : WorkerRunnerFunction = async ( { target } ) => {
107 const pkg = await fs . readJson ( join ( target . cwd , 'package.json' ) ) ;
118
129 if ( pkg . private ) {
1310 return ;
1411 }
1512
16- const dryRun = options ?. dryRun ?? false ;
13+ const dryRun = target . options ?. dryRun ?? false ;
1714 const args = [ '--tolerate-republish' , ...( dryRun ? [ '--dry-run' ] : [ ] ) ] ;
1815
1916 await $ ( { cwd : target . cwd , verbose : true } ) `yarn npm publish ${ args } ` ;
20- }
17+ } ;
You can’t perform that action at this time.
0 commit comments