@@ -7,15 +7,15 @@ import {
77} from './constants' ;
88import type { LernaPackageDescription } from './list' ;
99import { listNpmPackages as listNpmPackagesFn } from './list' ;
10- import { spawnSync } from '../helpers/spawn-sync' ;
10+ import { spawnSync as spawnSyncFn } from '../helpers/spawn-sync' ;
1111import type { SpawnSyncOptionsWithStringEncoding } from 'child_process' ;
1212
1313export function publishNpmPackages (
1414 isDryRun = false ,
15- isAuxiliaryOnly = false ,
15+ useAuxiliaryPackagesOnly = false ,
1616 listNpmPackages : typeof listNpmPackagesFn = listNpmPackagesFn ,
1717 markBumpedFilesAsAssumeUnchangedFn : typeof markBumpedFilesAsAssumeUnchanged = markBumpedFilesAsAssumeUnchanged ,
18- spawnSyncFn : typeof spawnSync = spawnSync
18+ spawnSync : typeof spawnSyncFn = spawnSyncFn
1919) : void {
2020 const commandOptions : SpawnSyncOptionsWithStringEncoding = {
2121 stdio : 'inherit' ,
@@ -30,7 +30,7 @@ export function publishNpmPackages(
3030 ( packageConfig ) => ! EXCLUDE_RELEASE_PACKAGES . includes ( packageConfig . name )
3131 ) ;
3232
33- if ( isAuxiliaryOnly ) {
33+ if ( useAuxiliaryPackagesOnly ) {
3434 packages = packages . filter (
3535 ( packageConfig ) => ! MONGOSH_RELEASE_PACKAGES . includes ( packageConfig . name )
3636 ) ;
@@ -39,7 +39,7 @@ export function publishNpmPackages(
3939 // we use git update-index --assume-unchanged on files we know have been bumped
4040 markBumpedFilesAsAssumeUnchangedFn ( packages , true ) ;
4141 try {
42- spawnSyncFn (
42+ spawnSync (
4343 LERNA_BIN ,
4444 [
4545 'publish' ,
@@ -48,7 +48,9 @@ export function publishNpmPackages(
4848 '--no-changelog' ,
4949 '--exact' ,
5050 // During mongosh releases we handle the tags manually
51- ...( ! isAuxiliaryOnly ? [ '--no-git-tag-version' , '--no-push' ] : [ ] ) ,
51+ ...( ! useAuxiliaryPackagesOnly
52+ ? [ '--no-git-tag-version' , '--no-push' ]
53+ : [ ] ) ,
5254 '--force-publish' ,
5355 '--yes' ,
5456 '--no-verify-access' ,
@@ -59,7 +61,7 @@ export function publishNpmPackages(
5961 markBumpedFilesAsAssumeUnchangedFn ( packages , false ) ;
6062 }
6163
62- if ( ! isAuxiliaryOnly ) {
64+ if ( ! useAuxiliaryPackagesOnly ) {
6365 const mongoshVersion = packages . find (
6466 ( packageConfig ) => packageConfig . name === 'mongosh'
6567 ) ?. version ;
@@ -81,7 +83,7 @@ export function publishNpmPackages(
8183export function markBumpedFilesAsAssumeUnchanged (
8284 packages : LernaPackageDescription [ ] ,
8385 assumeUnchanged : boolean ,
84- spawnSyncFn : typeof spawnSync = spawnSync
86+ spawnSync : typeof spawnSyncFn = spawnSyncFn
8587) : void {
8688 const filesToAssume = [
8789 path . resolve ( PROJECT_ROOT , 'lerna.json' ) ,
@@ -93,7 +95,7 @@ export function markBumpedFilesAsAssumeUnchanged(
9395 }
9496
9597 for ( const f of filesToAssume ) {
96- spawnSyncFn (
98+ spawnSync (
9799 'git' ,
98100 [
99101 'update-index' ,
0 commit comments