@@ -50,8 +50,16 @@ const monorepoPackagesWithPrereleaseResult = [
50
50
{ path : "packages/c" , name : "@packages/c" , package : { version : "0.1.2" } } ,
51
51
{ path : "packages/d" , name : "@packages/d" , package : { version : "0.1.1" } } ,
52
52
// This can happen if a new module is published with a breaking version
53
- { path : "packages/e" , name : "@packages/e" , package : { version : "1.0.0-next.0" } } ,
54
- { path : "packages/f" , name : "@packages/f" , package : { version : "1.0.0-next.0" } } ,
53
+ {
54
+ path : "packages/e" ,
55
+ name : "@packages/e" ,
56
+ package : { version : "1.0.0-next.0" } ,
57
+ } ,
58
+ {
59
+ path : "packages/f" ,
60
+ name : "@packages/f" ,
61
+ package : { version : "1.0.0-next.0" } ,
62
+ } ,
55
63
] ;
56
64
57
65
const packageTemplate = ( {
@@ -406,7 +414,7 @@ describe("getPreviousVersion", () => {
406
414
} ) ;
407
415
408
416
test ( "should ignore greatest published monorepo package in maintenance mode" , async ( ) => {
409
- execPromise . mockClear ( )
417
+ execPromise . mockClear ( ) ;
410
418
mockFs ( {
411
419
"lerna.json" : `
412
420
{
@@ -424,21 +432,19 @@ describe("getPreviousVersion", () => {
424
432
// published version of test package
425
433
execPromise . mockReturnValueOnce ( "2.1.0" ) ;
426
434
427
- jest . spyOn ( Auto , 'getCurrentBranch' ) . mockReturnValueOnce ( 'major-2' )
428
-
435
+ jest . spyOn ( Auto , "getCurrentBranch" ) . mockReturnValueOnce ( "major-2" ) ;
429
436
430
437
plugin . apply ( {
431
- config : { prereleaseBranches : [ "next" ] , versionBranches : ' major-' } ,
438
+ config : { prereleaseBranches : [ "next" ] , versionBranches : " major-" } ,
432
439
hooks,
433
440
remote : "origin" ,
434
441
baseBranch : "main" ,
435
442
logger : dummyLog ( ) ,
436
443
prefixRelease : ( str ) => str ,
437
444
} as Auto . Auto ) ;
438
445
439
-
440
446
expect ( await hooks . getPreviousVersion . promise ( ) ) . toBe ( "1.5.0" ) ;
441
- expect ( execPromise ) . not . toHaveBeenCalled ( )
447
+ expect ( execPromise ) . not . toHaveBeenCalled ( ) ;
442
448
} ) ;
443
449
} ) ;
444
450
@@ -681,7 +687,7 @@ describe("publish", () => {
681
687
"--yes" ,
682
688
"from-package" ,
683
689
"--exact" ,
684
- "--no-verify-access"
690
+ "--no-verify-access" ,
685
691
] ) ;
686
692
} ) ;
687
693
@@ -704,7 +710,7 @@ describe("publish", () => {
704
710
"--yes" ,
705
711
"from-package" ,
706
712
false ,
707
- "--no-verify-access"
713
+ "--no-verify-access" ,
708
714
] ) ;
709
715
} ) ;
710
716
@@ -730,7 +736,7 @@ describe("publish", () => {
730
736
false ,
731
737
"--legacy-auth" ,
732
738
"abcd" ,
733
- "--no-verify-access"
739
+ "--no-verify-access" ,
734
740
] ) ;
735
741
} ) ;
736
742
@@ -755,7 +761,7 @@ describe("publish", () => {
755
761
false ,
756
762
"--contents" ,
757
763
"dist/publish-folder" ,
758
- "--no-verify-access"
764
+ "--no-verify-access" ,
759
765
] ) ;
760
766
} ) ;
761
767
@@ -1258,7 +1264,7 @@ describe("canary", () => {
1258
1264
"--no-git-reset" ,
1259
1265
"--no-git-tag-version" ,
1260
1266
"--exact" ,
1261
- "--no-verify-access"
1267
+ "--no-verify-access" ,
1262
1268
] ) ;
1263
1269
} ) ;
1264
1270
@@ -1429,7 +1435,7 @@ describe("canary", () => {
1429
1435
"--no-git-reset" ,
1430
1436
"--no-git-tag-version" ,
1431
1437
"--exact" ,
1432
- "--no-verify-access"
1438
+ "--no-verify-access" ,
1433
1439
] ) ;
1434
1440
} ) ;
1435
1441
@@ -1650,6 +1656,7 @@ describe("makeRelease", () => {
1650
1656
logger : dummyLog ( ) ,
1651
1657
prefixRelease : ( str ) => str ,
1652
1658
git : { publish } as any ,
1659
+ inOldVersionBranch : ( bool : boolean ) => bool ,
1653
1660
release : {
1654
1661
makeChangelog : ( ) => ( {
1655
1662
generateReleaseNotes : ( commits : IExtendedCommit [ ] ) =>
@@ -1661,6 +1668,7 @@ describe("makeRelease", () => {
1661
1668
await hooks . makeRelease . promise ( {
1662
1669
newVersion : "0.1.2" ,
1663
1670
from : "" ,
1671
+ to : "" ,
1664
1672
isPrerelease : false ,
1665
1673
fullReleaseNotes : "" ,
1666
1674
commits : [
@@ -1684,12 +1692,16 @@ describe("makeRelease", () => {
1684
1692
expect ( publish ) . toHaveBeenCalledWith (
1685
1693
"update package 1" ,
1686
1694
"@packages/a" ,
1687
- false
1695
+ false ,
1696
+ undefined ,
1697
+ true
1688
1698
) ;
1689
1699
expect ( publish ) . toHaveBeenCalledWith (
1690
1700
"update package 2" ,
1691
1701
"@packages/b" ,
1692
- false
1702
+ false ,
1703
+ undefined ,
1704
+ true
1693
1705
) ;
1694
1706
} ) ;
1695
1707
} ) ;
0 commit comments