@@ -9,8 +9,8 @@ import type {
99import type { createAndPublishDownloadCenterConfig as createAndPublishDownloadCenterConfigFn } from './download-center' ;
1010import { GithubRepo } from '@mongodb-js/devtools-github-repo' ;
1111import type { publishToHomebrew as publishToHomebrewType } from './homebrew' ;
12- import type { publishNpmPackages as publishNpmPackagesType } from './npm-packages' ;
13- import { runPublish } from './run- publish' ;
12+ import type { publishToNpm as publishToNpmType } from './npm-packages' ;
13+ import { publishMongosh } from './publish-mongosh ' ;
1414import { dummyConfig } from '../test/helpers' ;
1515
1616chai . use ( require ( 'sinon-chai' ) ) ;
@@ -26,10 +26,10 @@ function createStubBarque(overrides?: any): Barque {
2626 return sinon . createStubInstance ( Barque , overrides ) as unknown as Barque ;
2727}
2828
29- describe ( 'publish ' , function ( ) {
29+ describe ( 'publishMongosh ' , function ( ) {
3030 let config : Config ;
3131 let createAndPublishDownloadCenterConfig : typeof createAndPublishDownloadCenterConfigFn ;
32- let publishNpmPackages : typeof publishNpmPackagesType ;
32+ let publishToNpm : typeof publishToNpmType ;
3333 let writeBuildInfo : typeof writeBuildInfoType ;
3434 let publishToHomebrew : typeof publishToHomebrewType ;
3535 let shouldDoPublicRelease : typeof shouldDoPublicReleaseFn ;
@@ -42,7 +42,7 @@ describe('publish', function () {
4242 config = { ...dummyConfig } ;
4343
4444 createAndPublishDownloadCenterConfig = sinon . spy ( ) ;
45- publishNpmPackages = sinon . spy ( ) ;
45+ publishToNpm = sinon . spy ( ) ;
4646 writeBuildInfo = sinon . spy ( ) ;
4747 publishToHomebrew = sinon . spy ( ) ;
4848 shouldDoPublicRelease = sinon . spy ( ) ;
@@ -78,14 +78,14 @@ describe('publish', function () {
7878 getMostRecentDraftTagForRelease : sinon . stub ( ) . resolves ( undefined ) ,
7979 } ) ;
8080 try {
81- await runPublish (
81+ await publishMongosh (
8282 config ,
8383 githubRepo ,
8484 mongoHomebrewCoreForkRepo ,
8585 homebrewCoreRepo ,
8686 barque ,
8787 createAndPublishDownloadCenterConfig ,
88- publishNpmPackages ,
88+ publishToNpm ,
8989 writeBuildInfo ,
9090 publishToHomebrew ,
9191 shouldDoPublicRelease
@@ -103,14 +103,14 @@ describe('publish', function () {
103103 . resolves ( { name : 'v0.7.0-draft.42' , sha : 'wrong' } ) ,
104104 } ) ;
105105 try {
106- await runPublish (
106+ await publishMongosh (
107107 config ,
108108 githubRepo ,
109109 mongoHomebrewCoreForkRepo ,
110110 homebrewCoreRepo ,
111111 barque ,
112112 createAndPublishDownloadCenterConfig ,
113- publishNpmPackages ,
113+ publishToNpm ,
114114 writeBuildInfo ,
115115 publishToHomebrew ,
116116 shouldDoPublicRelease
@@ -123,14 +123,14 @@ describe('publish', function () {
123123 } ) ;
124124
125125 it ( 'publishes artifacts to barque' , async function ( ) {
126- await runPublish (
126+ await publishMongosh (
127127 config ,
128128 githubRepo ,
129129 mongoHomebrewCoreForkRepo ,
130130 homebrewCoreRepo ,
131131 barque ,
132132 createAndPublishDownloadCenterConfig ,
133- publishNpmPackages ,
133+ publishToNpm ,
134134 writeBuildInfo ,
135135 publishToHomebrew ,
136136 shouldDoPublicRelease
@@ -153,14 +153,14 @@ describe('publish', function () {
153153 } ) ;
154154
155155 it ( 'updates the download center config' , async function ( ) {
156- await runPublish (
156+ await publishMongosh (
157157 config ,
158158 githubRepo ,
159159 mongoHomebrewCoreForkRepo ,
160160 homebrewCoreRepo ,
161161 barque ,
162162 createAndPublishDownloadCenterConfig ,
163- publishNpmPackages ,
163+ publishToNpm ,
164164 writeBuildInfo ,
165165 publishToHomebrew ,
166166 shouldDoPublicRelease
@@ -175,14 +175,14 @@ describe('publish', function () {
175175 } ) ;
176176
177177 it ( 'promotes the release in github' , async function ( ) {
178- await runPublish (
178+ await publishMongosh (
179179 config ,
180180 githubRepo ,
181181 mongoHomebrewCoreForkRepo ,
182182 homebrewCoreRepo ,
183183 barque ,
184184 createAndPublishDownloadCenterConfig ,
185- publishNpmPackages ,
185+ publishToNpm ,
186186 writeBuildInfo ,
187187 publishToHomebrew ,
188188 shouldDoPublicRelease
@@ -192,34 +192,32 @@ describe('publish', function () {
192192 } ) ;
193193
194194 it ( 'writes analytics config and then publishes NPM packages' , async function ( ) {
195- await runPublish (
195+ await publishMongosh (
196196 config ,
197197 githubRepo ,
198198 mongoHomebrewCoreForkRepo ,
199199 homebrewCoreRepo ,
200200 barque ,
201201 createAndPublishDownloadCenterConfig ,
202- publishNpmPackages ,
202+ publishToNpm ,
203203 writeBuildInfo ,
204204 publishToHomebrew ,
205205 shouldDoPublicRelease
206206 ) ;
207207
208208 expect ( writeBuildInfo ) . to . have . been . calledOnceWith ( config ) ;
209- expect ( publishNpmPackages ) . to . have . been . calledWith ( ) ;
210- expect ( publishNpmPackages ) . to . have . been . calledAfter (
211- writeBuildInfo as any
212- ) ;
209+ expect ( publishToNpm ) . to . have . been . calledWith ( ) ;
210+ expect ( publishToNpm ) . to . have . been . calledAfter ( writeBuildInfo as any ) ;
213211 } ) ;
214212 it ( 'publishes to homebrew' , async function ( ) {
215- await runPublish (
213+ await publishMongosh (
216214 config ,
217215 githubRepo ,
218216 mongoHomebrewCoreForkRepo ,
219217 homebrewCoreRepo ,
220218 barque ,
221219 createAndPublishDownloadCenterConfig ,
222- publishNpmPackages ,
220+ publishToNpm ,
223221 writeBuildInfo ,
224222 publishToHomebrew ,
225223 shouldDoPublicRelease
@@ -242,14 +240,14 @@ describe('publish', function () {
242240 } ) ;
243241
244242 it ( 'does not update the download center config' , async function ( ) {
245- await runPublish (
243+ await publishMongosh (
246244 config ,
247245 githubRepo ,
248246 mongoHomebrewCoreForkRepo ,
249247 homebrewCoreRepo ,
250248 barque ,
251249 createAndPublishDownloadCenterConfig ,
252- publishNpmPackages ,
250+ publishToNpm ,
253251 writeBuildInfo ,
254252 publishToHomebrew ,
255253 shouldDoPublicRelease
@@ -259,14 +257,14 @@ describe('publish', function () {
259257 } ) ;
260258
261259 it ( 'does not promote the release in github' , async function ( ) {
262- await runPublish (
260+ await publishMongosh (
263261 config ,
264262 githubRepo ,
265263 mongoHomebrewCoreForkRepo ,
266264 homebrewCoreRepo ,
267265 barque ,
268266 createAndPublishDownloadCenterConfig ,
269- publishNpmPackages ,
267+ publishToNpm ,
270268 writeBuildInfo ,
271269 publishToHomebrew ,
272270 shouldDoPublicRelease
@@ -276,31 +274,31 @@ describe('publish', function () {
276274 } ) ;
277275
278276 it ( 'does not publish npm packages' , async function ( ) {
279- await runPublish (
277+ await publishMongosh (
280278 config ,
281279 githubRepo ,
282280 mongoHomebrewCoreForkRepo ,
283281 homebrewCoreRepo ,
284282 barque ,
285283 createAndPublishDownloadCenterConfig ,
286- publishNpmPackages ,
284+ publishToNpm ,
287285 writeBuildInfo ,
288286 publishToHomebrew ,
289287 shouldDoPublicRelease
290288 ) ;
291289
292- expect ( publishNpmPackages ) . not . to . have . been . called ;
290+ expect ( publishToNpm ) . not . to . have . been . called ;
293291 } ) ;
294292
295293 it ( 'does not publish to homebrew' , async function ( ) {
296- await runPublish (
294+ await publishMongosh (
297295 config ,
298296 githubRepo ,
299297 mongoHomebrewCoreForkRepo ,
300298 homebrewCoreRepo ,
301299 barque ,
302300 createAndPublishDownloadCenterConfig ,
303- publishNpmPackages ,
301+ publishToNpm ,
304302 writeBuildInfo ,
305303 publishToHomebrew ,
306304 shouldDoPublicRelease
@@ -310,14 +308,14 @@ describe('publish', function () {
310308 } ) ;
311309
312310 it ( 'does not release to barque' , async function ( ) {
313- await runPublish (
311+ await publishMongosh (
314312 config ,
315313 githubRepo ,
316314 mongoHomebrewCoreForkRepo ,
317315 homebrewCoreRepo ,
318316 barque ,
319317 createAndPublishDownloadCenterConfig ,
320- publishNpmPackages ,
318+ publishToNpm ,
321319 writeBuildInfo ,
322320 publishToHomebrew ,
323321 shouldDoPublicRelease
0 commit comments