@@ -43,20 +43,20 @@ function execCliAsync (argString) {
43
43
44
44
function writePackageJson ( version , option ) {
45
45
option = option || { }
46
- var pkg = Object . assign ( option , { version : version } )
46
+ var pkg = Object . assign ( option , { version : version } )
47
47
fs . writeFileSync ( 'package.json' , JSON . stringify ( pkg ) , 'utf-8' )
48
48
delete require . cache [ require . resolve ( path . join ( process . cwd ( ) , 'package.json' ) ) ]
49
49
}
50
50
51
51
function writeBowerJson ( version , option ) {
52
52
option = option || { }
53
- var bower = Object . assign ( option , { version : version } )
53
+ var bower = Object . assign ( option , { version : version } )
54
54
fs . writeFileSync ( 'bower.json' , JSON . stringify ( bower ) , 'utf-8' )
55
55
}
56
56
57
57
function writeManifestJson ( version , option ) {
58
58
option = option || { }
59
- var manifest = Object . assign ( option , { version : version } )
59
+ var manifest = Object . assign ( option , { version : version } )
60
60
fs . writeFileSync ( 'manifest.json' , JSON . stringify ( manifest ) , 'utf-8' )
61
61
}
62
62
@@ -607,7 +607,7 @@ describe('cli', function () {
607
607
} )
608
608
609
609
it ( 'does not display `npm publish` if the package is private' , function ( ) {
610
- writePackageJson ( '1.0.0' , { private : true } )
610
+ writePackageJson ( '1.0.0' , { private : true } )
611
611
612
612
var result = execCli ( )
613
613
result . code . should . equal ( 0 )
@@ -666,7 +666,7 @@ describe('standard-version', function () {
666
666
667
667
describe ( 'with mocked conventionalRecommendedBump' , function ( ) {
668
668
beforeEach ( function ( ) {
669
- mockery . enable ( { warnOnUnregistered : false , useCleanCache : true } )
669
+ mockery . enable ( { warnOnUnregistered : false , useCleanCache : true } )
670
670
mockery . registerMock ( 'conventional-recommended-bump' , function ( _ , cb ) {
671
671
cb ( new Error ( 'bump err' ) )
672
672
} )
@@ -682,7 +682,7 @@ describe('standard-version', function () {
682
682
shell . exec ( 'git tag -a v1.0.0 -m "my awesome first release"' )
683
683
commit ( 'feat: new feature!' )
684
684
685
- require ( './index' ) ( { silent : true } )
685
+ require ( './index' ) ( { silent : true } )
686
686
. catch ( ( err ) => {
687
687
err . message . should . match ( / b u m p e r r / )
688
688
done ( )
@@ -692,9 +692,9 @@ describe('standard-version', function () {
692
692
693
693
describe ( 'with mocked conventionalChangelog' , function ( ) {
694
694
beforeEach ( function ( ) {
695
- mockery . enable ( { warnOnUnregistered : false , useCleanCache : true } )
695
+ mockery . enable ( { warnOnUnregistered : false , useCleanCache : true } )
696
696
mockery . registerMock ( 'conventional-changelog' , function ( ) {
697
- var readable = new stream . Readable ( { objectMode : true } )
697
+ var readable = new stream . Readable ( { objectMode : true } )
698
698
readable . _read = function ( ) {
699
699
}
700
700
setImmediate ( readable . emit . bind ( readable ) , 'error' , new Error ( 'changelog err' ) )
@@ -712,7 +712,7 @@ describe('standard-version', function () {
712
712
shell . exec ( 'git tag -a v1.0.0 -m "my awesome first release"' )
713
713
commit ( 'feat: new feature!' )
714
714
715
- require ( './index' ) ( { silent : true } )
715
+ require ( './index' ) ( { silent : true } )
716
716
. catch ( ( err ) => {
717
717
err . message . should . match ( / c h a n g e l o g e r r / )
718
718
return done ( )
@@ -725,7 +725,7 @@ describe('standard-version', function () {
725
725
shell . exec ( 'git tag -a v1.0.0 -m "my awesome first release"' )
726
726
commit ( 'feat: new feature!' )
727
727
728
- require ( './index' ) ( { silent : true } )
728
+ require ( './index' ) ( { silent : true } )
729
729
. then ( ( ) => {
730
730
// check last commit message
731
731
shell . exec ( 'git log --oneline -n1' ) . stdout . should . match ( / c h o r e \( r e l e a s e \) : 1 \. 1 \. 0 / )
@@ -738,7 +738,7 @@ describe('standard-version', function () {
738
738
describe ( 'without a package file to bump' , function ( ) {
739
739
it ( 'should exit with error' , function ( ) {
740
740
shell . rm ( 'package.json' )
741
- return require ( './index' ) ( { silent : true } )
741
+ return require ( './index' ) ( { silent : true } )
742
742
. catch ( ( err ) => {
743
743
err . message . should . equal ( 'no package file found' )
744
744
} )
@@ -754,7 +754,7 @@ describe('standard-version', function () {
754
754
commit ( 'feat: first commit' )
755
755
shell . exec ( 'git tag -a v1.0.0 -m "my awesome first release"' )
756
756
commit ( 'feat: new feature!' )
757
- return require ( './index' ) ( { silent : true } )
757
+ return require ( './index' ) ( { silent : true } )
758
758
. then ( ( ) => {
759
759
JSON . parse ( fs . readFileSync ( 'bower.json' , 'utf-8' ) ) . version . should . equal ( '1.1.0' )
760
760
getPackageVersion ( ) . should . equal ( '1.1.0' )
@@ -771,7 +771,7 @@ describe('standard-version', function () {
771
771
commit ( 'feat: first commit' )
772
772
shell . exec ( 'git tag -a v1.0.0 -m "my awesome first release"' )
773
773
commit ( 'feat: new feature!' )
774
- return require ( './index' ) ( { silent : true } )
774
+ return require ( './index' ) ( { silent : true } )
775
775
. then ( ( ) => {
776
776
JSON . parse ( fs . readFileSync ( 'manifest.json' , 'utf-8' ) ) . version . should . equal ( '1.1.0' )
777
777
getPackageVersion ( ) . should . equal ( '1.1.0' )
@@ -788,7 +788,7 @@ describe('standard-version', function () {
788
788
commit ( 'feat: first commit' )
789
789
shell . exec ( 'git tag -a v1.0.0 -m "my awesome first release"' )
790
790
commit ( 'feat: new feature!' )
791
- require ( './index' ) ( { silent : true } )
791
+ require ( './index' ) ( { silent : true } )
792
792
. then ( ( ) => {
793
793
JSON . parse ( fs . readFileSync ( 'npm-shrinkwrap.json' , 'utf-8' ) ) . version . should . equal ( '1.1.0' )
794
794
getPackageVersion ( ) . should . equal ( '1.1.0' )
@@ -807,7 +807,7 @@ describe('standard-version', function () {
807
807
commit ( 'feat: first commit' )
808
808
shell . exec ( 'git tag -a v1.0.0 -m "my awesome first release"' )
809
809
commit ( 'feat: new feature!' )
810
- return require ( './index' ) ( { silent : true } )
810
+ return require ( './index' ) ( { silent : true } )
811
811
. then ( ( ) => {
812
812
JSON . parse ( fs . readFileSync ( 'package-lock.json' , 'utf-8' ) ) . version . should . equal ( '1.1.0' )
813
813
getPackageVersion ( ) . should . equal ( '1.1.0' )
@@ -871,7 +871,7 @@ describe('standard-version', function () {
871
871
commit ( 'feat: first commit' )
872
872
shell . exec ( 'git tag -a v1.0.0 -m "my awesome first release"' )
873
873
commit ( 'feat: new feature!' )
874
- return require ( './index' ) ( { silent : true } )
874
+ return require ( './index' ) ( { silent : true } )
875
875
. then ( ( ) => {
876
876
JSON . parse ( fs . readFileSync ( 'bower.json' , 'utf-8' ) ) . version . should . equal ( '1.0.0' )
877
877
getPackageVersion ( ) . should . equal ( '1.1.0' )
0 commit comments